ethyca-fides 2.71.1rc2__py2.py3-none-any.whl → 2.72.0__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of ethyca-fides might be problematic. Click here for more details.

Files changed (359) hide show
  1. {ethyca_fides-2.71.1rc2.dist-info → ethyca_fides-2.72.0.dist-info}/METADATA +2 -2
  2. {ethyca_fides-2.71.1rc2.dist-info → ethyca_fides-2.72.0.dist-info}/RECORD +272 -253
  3. fides/_version.py +3 -3
  4. fides/api/api/v1/endpoints/connection_endpoints.py +38 -45
  5. fides/api/api/v1/endpoints/generic_overrides.py +9 -3
  6. fides/api/api/v1/endpoints/saas_config_endpoints.py +60 -48
  7. fides/api/api/v1/endpoints/system.py +11 -43
  8. fides/api/api/v1/endpoints/user_endpoints.py +8 -1
  9. fides/api/app_setup.py +1 -3
  10. fides/api/common_exceptions.py +4 -0
  11. fides/api/email_templates/get_email_template.py +3 -0
  12. fides/api/email_templates/template_names.py +1 -0
  13. fides/api/email_templates/templates/manual_task_digest.html +316 -0
  14. fides/api/models/detection_discovery/monitor_task.py +1 -0
  15. fides/api/models/digest/digest_execution.py +11 -1
  16. fides/api/models/event_audit.py +9 -0
  17. fides/api/models/messaging_template.py +7 -0
  18. fides/api/models/privacy_request/privacy_request.py +1 -1
  19. fides/api/schemas/connection_configuration/connection_config.py +1 -30
  20. fides/api/schemas/messaging/messaging.py +15 -0
  21. fides/api/service/connectors/query_configs/saas_query_config.py +16 -0
  22. fides/api/service/connectors/saas/connector_registry_service.py +1 -138
  23. fides/api/service/connectors/saas_connector.py +9 -1
  24. fides/api/service/deps.py +8 -0
  25. fides/api/service/messaging/message_dispatch_service.py +38 -1
  26. fides/api/service/privacy_request/request_runner_service.py +32 -1
  27. fides/api/tasks/__init__.py +0 -1
  28. fides/api/util/connection_util.py +99 -215
  29. fides/api/util/event_audit_util.py +230 -0
  30. fides/api/util/masking_util.py +31 -0
  31. fides/api/util/saas_config_updater.py +66 -0
  32. fides/api/util/saas_util.py +1 -0
  33. fides/data/language/languages.yml +2 -0
  34. fides/service/connection/__init__.py +0 -0
  35. fides/service/connection/connection_service.py +651 -0
  36. fides/service/dataset/dataset_service.py +39 -0
  37. fides/service/event_audit_service.py +16 -22
  38. fides/service/privacy_request/privacy_request_service.py +103 -48
  39. fides/ui-build/static/admin/404.html +1 -1
  40. fides/ui-build/static/admin/_next/static/BOxlzhSs4KC4KKoRi_z4Y/_buildManifest.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/1099-d1b22e891705eaf8.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/{1115-90baef2a89f361ad.js → 1115-584dac093cef6cc3.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/1437-4604a69888906ec0.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/155-bf4e3ffb18f29226.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{1817-1ad037b7d6d2f6d2.js → 1817-6a6b4aea9d242c5b.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{1975.78e719130cfe3fd6.js → 1975.50599b6774562644.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{2040-fdecc41a18e40bdc.js → 2040-8eead9d29546a50f.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/2397-92f628c53688925b.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/2921-9b596ba7f5267afc.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/3377-80612c111e047cb6.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/{3696-90c8b336bbc46782.js → 3696-e4abb6a922b954a2.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/3700-1f9f6e5ebfa3ab0a.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/3772-b945c6839e43c753.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/{3923-98bea73b618292aa.js → 3923-c1e41661ebf57178.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/401-c2f1e4ea077f1f26.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/431-e01ee730c8ad9ece.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/4496-8204168bae78092d.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/4817-066598cef25d7e88.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/5185-bf5655b5d697b714.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/5258-63325c03319e87dc.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/{5279-12c9cbdc67ad7b14.js → 5279-fcac4a8575f41ecc.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/549-3e3b8d01bc984f96.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/5643-7800464c8df7a78e.js +1 -0
  64. fides/ui-build/static/admin/_next/static/chunks/{5783-d119cb132abd8a91.js → 5783-7deeb7de5d2db4c4.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/6277-0ab2a15c37b83b8d.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/6315-d0b886d849c2e5e3.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/6344-ca66a6e10d128179.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/{6853-7004a8c420b1ca02.js → 6853-6d64d627df6f8194.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/6954-8b106311a3be35f4.js +1 -0
  70. fides/ui-build/static/admin/_next/static/chunks/7245-53a20677c49b41c8.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/{7476-d055aa931da47ac0.js → 7476-08717f00da5f89ab.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/7488-bad160a2bfd89871.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/7630-775c578fa8109b0f.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/7773-24899908bf8ff659.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/{796-02086581996a0548.js → 796-6fe49d134f660156.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/8011-c23d609ed3f0efa5.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/8212-67ac884660ddb63a.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/8373-43b6df89a2085d6b.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/9046-28fe0723e3b6584f.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/9070-6d3aaaf5aa5913ba.js +1 -0
  81. fides/ui-build/static/admin/_next/static/chunks/9330-6eb11127296c54c2.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/{9676.b86ecbcfe5afd25d.js → 9676.1ea49d4b6e0541f2.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/9682-65d253d54f84f6f2.js +1 -0
  84. fides/ui-build/static/admin/_next/static/chunks/{9826-ccedc28e978ca9e1.js → 9826-1f42934a2863992e.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/9899-63998972698a49fb.js +1 -0
  86. fides/ui-build/static/admin/_next/static/chunks/9965-4709f43bf62af9a9.js +1 -0
  87. fides/ui-build/static/admin/_next/static/chunks/pages/{404-2eb8aed4939f1142.js → 404-962d132471cd41ba.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-a7c02dd2ff07f9e1.js → _app-4f697016cf2fb1bb.js} +43 -43
  89. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-055d058d16c02957.js +1 -0
  90. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-e2a5c951347195e3.js +1 -0
  91. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0058fe05f2d23d1a.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-7a258b7ecd6da4b8.js → add-vendors-7c829e58485fc821.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-fb5017ff5fa54fcc.js → configure-5c58b69dd473cc06.js} +1 -1
  94. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-e1e2fd704ac2d71d.js → [id]-58460ac9c1dface5.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-b6b2d50d894cefa5.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5fc78b78a51c239c.js → [id]-25ce8366e689363b.js} +1 -1
  97. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-b79bcb93b5f4c734.js → new-faa457089616711a.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-a7fe3925771bb6c3.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-069f4e3ee96ebf77.js → properties-45a2901a35edc8f7.js} +1 -1
  100. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-e9ec351281c54822.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-d2bf72508c3cad55.js → consent-a7a4e419e4086033.js} +1 -1
  102. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-2fa4b3a58f75f81d.js → [resourceUrn]-3b59925f6c9a13a9.js} +1 -1
  103. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-ffb6e0fe6712342e.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-3c935e93208d2bdd.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-5b31e3d7727b917a.js → [resourceUrn]-8d7d9152e215c3b6.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-96be972a983616e3.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-79d06a04698c47c0.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-e50e9c8e11412b2a.js +1 -0
  109. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-dd93cffd6744837d.js +1 -0
  110. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-878aa4ab0746df5b.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-a2e9c0bfa67c633d.js +1 -0
  112. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-70ca690b253a118e.js +1 -0
  113. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-844a8de0d1b506e2.js → [resourceUrn]-260f5deb68966b70.js} +1 -1
  114. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-11b07cf2d91b17ef.js → detection-d735dab3d9f3adc5.js} +1 -1
  115. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-5525cf287d4ab493.js → [resourceUrn]-c7f055275a2c503f.js} +1 -1
  116. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-ed4723e1b67d890e.js → discovery-b1cfd55c7e127865.js} +1 -1
  117. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-18f255a8bbeecaa4.js +1 -0
  118. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-e04a4e16ccf32aef.js +1 -0
  119. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-a40c4febe16a0a6d.js +1 -0
  120. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-f500a77eefb057e7.js +1 -0
  121. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-5c20080cdb053b1d.js +1 -0
  122. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-96355a68e8c28fe8.js +1 -0
  123. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-448729ee9d1d78c3.js +1 -0
  124. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-42c720ec5c941573.js +1 -0
  125. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a8fc95a46de38b35.js +1 -0
  126. fides/ui-build/static/admin/_next/static/chunks/pages/{index-b74d1e8608ae5b5d.js → index-ca794e85c16cba67.js} +1 -1
  127. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-2f1dc17eba11fb4e.js +1 -0
  128. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-bbec0140433a199b.js +1 -0
  129. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/[id]-058125922d1eaeec.js +1 -0
  130. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/new-7a5f76708c79f714.js +1 -0
  131. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-31bed1f86b89d1d8.js +1 -0
  132. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/[key]-d08f3a7cd2d011ec.js +1 -0
  133. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/new-cb2c7fbc26886052.js +1 -0
  134. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-40b9f1f70d27b660.js +1 -0
  135. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/[id]-a6ae72abe59ff830.js +1 -0
  136. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/add-template-a3e4b5b575b31be1.js +1 -0
  137. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-4918f86f7300ac9b.js +1 -0
  138. fides/ui-build/static/admin/_next/static/chunks/pages/notifications-9644c0f088a01fea.js +1 -0
  139. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-39b5586d9c8b64aa.js +1 -0
  140. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-5163f3213377bd35.js +1 -0
  141. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-0b1547cd9b114c6b.js +1 -0
  142. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-da562cba4cffd6bb.js +1 -0
  143. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-3a587676869d2ef6.js +1 -0
  144. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-defc3b917306a6d8.js +1 -0
  145. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-29fb7b39f8962650.js → table-migration-11a70bcfa672ce8f.js} +1 -1
  146. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-787621468b5a7619.js +1 -0
  147. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-24a8c2ab57625556.js +1 -0
  148. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-8f577df28ebca869.js → configure-1926359bdf5d6c30.js} +1 -1
  149. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-da634187d8201ab3.js +1 -0
  150. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-57a75c7e9659271a.js → [id]-47118b9976ad7212.js} +1 -1
  151. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-8964c2300206bc89.js → add-property-2e6b0d8b409ba1fd.js} +1 -1
  152. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-08472b2a6bf1d392.js → properties-32486c25255c9cb1.js} +1 -1
  153. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-e410d13a2b35cff4.js +1 -0
  154. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-aec1bf8a409ec75f.js +1 -0
  155. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4c20c08ca7ea8cff.js +1 -0
  156. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-8e4a76376927afd5.js +1 -0
  157. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-744f669431b84f71.js → domain-records-e3dcef1ec8cf8b9e.js} +1 -1
  158. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2e88cc7a6074a28b.js +1 -0
  159. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-604790638c656fbd.js → email-templates-7469d2f85396c693.js} +1 -1
  160. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-be2a885150adc133.js → locations-20789aa0c84d544e.js} +1 -1
  161. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-3c86162afe9759df.js → organization-f84a13eb9688cb5f.js} +1 -1
  162. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-b72df6f3d460125f.js +1 -0
  163. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-4fe3b90747d885e5.js → regulations-aa02bc818e089c49.js} +1 -1
  164. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-5be9ce7a745ce908.js +1 -0
  165. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-4d470bbf199a2f9c.js → [id]-2fc7c0d3988427b3.js} +1 -1
  166. fides/ui-build/static/admin/_next/static/chunks/pages/systems-86f5557384124f79.js +1 -0
  167. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-2589729c47976357.js +1 -0
  168. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-98f737e735eaa0f0.js → [id]-6217433a26599521.js} +1 -1
  169. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-562624e5461083ec.js → user-management-b6c4bf35c003965d.js} +1 -1
  170. fides/ui-build/static/admin/_next/static/chunks/{webpack-2766492c5dbceb0a.js → webpack-8eac1ea5c825c8b4.js} +1 -1
  171. fides/ui-build/static/admin/_next/static/css/de09ed8a0adf1ca2.css +1 -0
  172. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  173. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  174. fides/ui-build/static/admin/add-systems.html +1 -1
  175. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  176. fides/ui-build/static/admin/consent/configure.html +1 -1
  177. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  178. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  179. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  180. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  181. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  182. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  183. fides/ui-build/static/admin/consent/properties.html +1 -1
  184. fides/ui-build/static/admin/consent/reporting.html +1 -1
  185. fides/ui-build/static/admin/consent.html +1 -1
  186. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  187. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  188. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  189. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  190. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  191. fides/ui-build/static/admin/data-catalog.html +1 -1
  192. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  193. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/data-explorer.html +1 -0
  194. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  195. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  196. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  197. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  198. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  199. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  200. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  201. fides/ui-build/static/admin/datamap.html +1 -1
  202. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  203. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  204. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  205. fides/ui-build/static/admin/dataset/new.html +1 -1
  206. fides/ui-build/static/admin/dataset.html +1 -1
  207. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  208. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  209. fides/ui-build/static/admin/datastore-connection.html +1 -1
  210. fides/ui-build/static/admin/index.html +1 -1
  211. fides/ui-build/static/admin/integrations/[id].html +1 -1
  212. fides/ui-build/static/admin/integrations.html +1 -1
  213. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  214. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  215. fides/ui-build/static/admin/lib/fides.js +2 -2
  216. fides/ui-build/static/admin/login/[provider].html +1 -1
  217. fides/ui-build/static/admin/login.html +1 -1
  218. fides/ui-build/static/admin/notifications/digests/[id].html +1 -0
  219. fides/ui-build/static/admin/notifications/digests/new.html +1 -0
  220. fides/ui-build/static/admin/notifications/digests.html +1 -0
  221. fides/ui-build/static/admin/notifications/providers/[key].html +1 -0
  222. fides/ui-build/static/admin/notifications/providers/new.html +1 -0
  223. fides/ui-build/static/admin/notifications/providers.html +1 -0
  224. fides/ui-build/static/admin/notifications/templates/[id].html +1 -0
  225. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -0
  226. fides/ui-build/static/admin/notifications/templates.html +1 -0
  227. fides/ui-build/static/admin/notifications.html +1 -0
  228. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  229. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  230. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  231. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  232. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  233. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  234. fides/ui-build/static/admin/poc/forms.html +1 -1
  235. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  236. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  237. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  238. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  239. fides/ui-build/static/admin/privacy-requests.html +1 -1
  240. fides/ui-build/static/admin/properties/[id].html +1 -1
  241. fides/ui-build/static/admin/properties/add-property.html +1 -1
  242. fides/ui-build/static/admin/properties.html +1 -1
  243. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  244. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  245. fides/ui-build/static/admin/settings/about.html +1 -1
  246. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  247. fides/ui-build/static/admin/settings/consent.html +1 -1
  248. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  249. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  250. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  251. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  252. fides/ui-build/static/admin/settings/domains.html +1 -1
  253. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  254. fides/ui-build/static/admin/settings/locations.html +1 -1
  255. fides/ui-build/static/admin/settings/organization.html +1 -1
  256. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  257. fides/ui-build/static/admin/settings/regulations.html +1 -1
  258. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  259. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  260. fides/ui-build/static/admin/systems.html +1 -1
  261. fides/ui-build/static/admin/taxonomy.html +1 -1
  262. fides/ui-build/static/admin/user-management/new.html +1 -1
  263. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  264. fides/ui-build/static/admin/user-management.html +1 -1
  265. fides/ui-build/static/admin/_next/static/ayPtYqII_BsdUxHOkbH2k/_buildManifest.js +0 -1
  266. fides/ui-build/static/admin/_next/static/chunks/155-c1ae010c664e2245.js +0 -1
  267. fides/ui-build/static/admin/_next/static/chunks/2921-66f65496c3a09316.js +0 -1
  268. fides/ui-build/static/admin/_next/static/chunks/3585-efd5d41f08e180c4.js +0 -1
  269. fides/ui-build/static/admin/_next/static/chunks/3855-12ee1dfbbe47fd28.js +0 -1
  270. fides/ui-build/static/admin/_next/static/chunks/3872-04d3afbfa41a7782.js +0 -1
  271. fides/ui-build/static/admin/_next/static/chunks/401-ffe4e8436e1eceb9.js +0 -1
  272. fides/ui-build/static/admin/_next/static/chunks/409-c1256ecda1b15db6.js +0 -1
  273. fides/ui-build/static/admin/_next/static/chunks/431-78bf05f35d7eec4f.js +0 -1
  274. fides/ui-build/static/admin/_next/static/chunks/4558-de5ced790b3380dc.js +0 -1
  275. fides/ui-build/static/admin/_next/static/chunks/4608-a9941d0c236ebca1.js +0 -1
  276. fides/ui-build/static/admin/_next/static/chunks/4718-6585c97c26647e65.js +0 -1
  277. fides/ui-build/static/admin/_next/static/chunks/502-d3ecae97b67befbd.js +0 -1
  278. fides/ui-build/static/admin/_next/static/chunks/504-88caa30c03374e9b.js +0 -1
  279. fides/ui-build/static/admin/_next/static/chunks/5185-51eaa78e3ed6bfb7.js +0 -1
  280. fides/ui-build/static/admin/_next/static/chunks/5309-3b6cf0cc9d0c6a83.js +0 -1
  281. fides/ui-build/static/admin/_next/static/chunks/5574-c31ea831371610d5.js +0 -1
  282. fides/ui-build/static/admin/_next/static/chunks/5643-10a36584c399526c.js +0 -1
  283. fides/ui-build/static/admin/_next/static/chunks/6277-182efc294d413f64.js +0 -1
  284. fides/ui-build/static/admin/_next/static/chunks/6882-10296485ec326e6b.js +0 -1
  285. fides/ui-build/static/admin/_next/static/chunks/6954-4b24e1731c1cc3b3.js +0 -1
  286. fides/ui-build/static/admin/_next/static/chunks/7045-f15044a4d4525946.js +0 -1
  287. fides/ui-build/static/admin/_next/static/chunks/7079-bbc7b856802a4834.js +0 -1
  288. fides/ui-build/static/admin/_next/static/chunks/7158-04745cc8d684b2e7.js +0 -1
  289. fides/ui-build/static/admin/_next/static/chunks/7218-e2983b96b95e33b4.js +0 -1
  290. fides/ui-build/static/admin/_next/static/chunks/7630-d0d3a0fe3f95e971.js +0 -1
  291. fides/ui-build/static/admin/_next/static/chunks/7725-f2a7be705b75dcc3.js +0 -1
  292. fides/ui-build/static/admin/_next/static/chunks/7929-0fd0d4948bc8d70e.js +0 -1
  293. fides/ui-build/static/admin/_next/static/chunks/8002-ed832921ad190832.js +0 -1
  294. fides/ui-build/static/admin/_next/static/chunks/9046-2a332fe338535c84.js +0 -1
  295. fides/ui-build/static/admin/_next/static/chunks/9226-4a7027057f55ca2a.js +0 -1
  296. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-4ec03eed67572861.js +0 -1
  297. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-2ca59996860a33c5.js +0 -1
  298. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-58920afe2b67f952.js +0 -1
  299. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-92182be6603c2842.js +0 -1
  300. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ab54b19609bff325.js +0 -1
  301. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-ae4909cad9b67822.js +0 -1
  302. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-4a1af12d2d7cd660.js +0 -1
  303. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-99573a1ee3ef8f4c.js +0 -1
  304. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-6e429b7511028d60.js +0 -1
  305. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-56fd0f3e465e52b6.js +0 -1
  306. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-29c1fb777bd464e0.js +0 -1
  307. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-0d512528b498d75c.js +0 -1
  308. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-040813022f0890c9.js +0 -1
  309. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-2635ef588bf06145.js +0 -1
  310. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-15616bea02397ef4.js +0 -1
  311. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d4031e438c363fff.js +0 -1
  312. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-9463af37079762d0.js +0 -1
  313. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-60a4a9eb4aab4c11.js +0 -1
  314. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-ea198c4a7869f402.js +0 -1
  315. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-0e3a6ac4797ffbbb.js +0 -1
  316. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-816e02b6cbe4a684.js +0 -1
  317. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-b6838162200141b3.js +0 -1
  318. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-223c2d1ded51bfb1.js +0 -1
  319. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-153eb88ab4e7dc6d.js +0 -1
  320. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-f682b1def859931e.js +0 -1
  321. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-e8d2140787045acd.js +0 -1
  322. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-e3f93462a08251bf.js +0 -1
  323. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-b5f7d6afdecd013d.js +0 -1
  324. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-248ad9f65a872442.js +0 -1
  325. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-aedb66a62042b10a.js +0 -1
  326. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-018df38b7cd77fdb.js +0 -1
  327. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-6ca9099d03aab817.js +0 -1
  328. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-0f2c90786ea005a4.js +0 -1
  329. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-200b51a725f8b2d1.js +0 -1
  330. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-febf156d2977f3ac.js +0 -1
  331. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-648d775d0fce49dc.js +0 -1
  332. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-7af00f72cf694077.js +0 -1
  333. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-f7753e9effae3816.js +0 -1
  334. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-f3e6e74e0efb005c.js +0 -1
  335. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4d658222ec800511.js +0 -1
  336. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-5edfec10a945ca43.js +0 -1
  337. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-a3275554ffe8e640.js +0 -1
  338. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/[key]-77239269acc2d31a.js +0 -1
  339. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/new-8bf1821722b082e9.js +0 -1
  340. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-8d92be437793c96f.js +0 -1
  341. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-8cbdfd08e0fa88fb.js +0 -1
  342. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-2deb6becece69d46.js +0 -1
  343. fides/ui-build/static/admin/_next/static/chunks/pages/systems-0f1d833282f09684.js +0 -1
  344. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-a8cfa7de4948b374.js +0 -1
  345. fides/ui-build/static/admin/_next/static/css/64fac6fb884435c2.css +0 -1
  346. fides/ui-build/static/admin/messaging/[id].html +0 -1
  347. fides/ui-build/static/admin/messaging/add-template.html +0 -1
  348. fides/ui-build/static/admin/messaging.html +0 -1
  349. fides/ui-build/static/admin/settings/messaging-providers/[key].html +0 -1
  350. fides/ui-build/static/admin/settings/messaging-providers/new.html +0 -1
  351. fides/ui-build/static/admin/settings/messaging-providers.html +0 -1
  352. {ethyca_fides-2.71.1rc2.dist-info → ethyca_fides-2.72.0.dist-info}/WHEEL +0 -0
  353. {ethyca_fides-2.71.1rc2.dist-info → ethyca_fides-2.72.0.dist-info}/entry_points.txt +0 -0
  354. {ethyca_fides-2.71.1rc2.dist-info → ethyca_fides-2.72.0.dist-info}/licenses/LICENSE +0 -0
  355. {ethyca_fides-2.71.1rc2.dist-info → ethyca_fides-2.72.0.dist-info}/top_level.txt +0 -0
  356. /fides/ui-build/static/admin/_next/static/{ayPtYqII_BsdUxHOkbH2k → BOxlzhSs4KC4KKoRi_z4Y}/_ssgManifest.js +0 -0
  357. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{[id]-bd1042a0e9be6aff.js → [id]-a270325109398f48.js} +0 -0
  358. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{new-469ad83c8cfa1290.js → new-2e0c8e249f286427.js} +0 -0
  359. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-629c88e90699369b.js → new-e399005c3bb4db1b.js} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6882],{18225:function(e,n,i){var t=i(24246),s=i(96306);n.Z=e=>{let{alignment:n="center",...i}=e;return(0,t.jsx)(s.kCb,{boxSize:"full",align:"center",justify:n,children:(0,t.jsx)(s.$jN,{color:"primary",...i})})}},77213:function(e,n,i){i.d(n,{Z:function(){return f}});var t=i(24246),s=i(96306),r=i(88038),o=i.n(r),a=i(86677);i(27378);var l=i(25980),u=i(90867),c=i(42478),d=i(77830),g=()=>{let e=(0,a.useRouter)();return(0,t.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,t.jsxs)(s.xuv,{children:[(0,t.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,t.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,t.jsx)(s.wpx,{onClick:()=>{e.push(d.AD)},children:"Configure"})]}),(0,t.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:n,title:i,padded:r=!0,mainProps:d}=e,f=(0,l.hz)(),h=(0,a.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,v=!(f.flags.messagingConfiguration&&x),{data:m}=(0,c.JE)(void 0,{skip:v}),{data:p}=(0,u.PW)(void 0,{skip:v}),j=f.flags.messagingConfiguration&&(!m||!p)&&x;return(0,t.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,t.jsxs)(o(),{children:[(0,t.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,t.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,t.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,t.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[j?(0,t.jsx)(g,{}):null,n]})]})}},79789:function(e,n,i){i.d(n,{Hn:function(){return a},XU:function(){return o},Z5:function(){return l},aG:function(){return d},cB:function(){return r},hX:function(){return c},vQ:function(){return u}});var t=i(24246),s=i(96306);let r=e=>{let{text:n,...i}=e;return(0,t.jsx)(s.X6q,{fontSize:"sm",mt:4,mb:1,...i,children:n})},o=e=>{let{children:n}=e;return(0,t.jsx)(s.xvT,{fontSize:"14px",mb:4,children:n})},a=e=>{let{children:n,href:i}=e;return(0,t.jsx)(s.rUS,{href:i,textDecoration:"underline",isExternal:!0,children:n})},l=e=>{let{children:n}=e;return(0,t.jsx)(s.QI$,{fontSize:"14px",mb:4,children:n})},u=e=>{let{children:n}=e;return(0,t.jsx)(s.GSI,{fontSize:"14px",mb:4,ml:6,children:n})},c=e=>{let{children:n}=e;return(0,t.jsx)(s.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:n})},d=e=>{let{data:n}=e;return(0,t.jsxs)(s.iA_,{fontSize:"14px",children:[(0,t.jsx)(s.hrZ,{children:(0,t.jsxs)(s.Tr,{children:[(0,t.jsx)(s.Th,{children:"Permission"}),(0,t.jsx)(s.Th,{children:"Description"})]})}),(0,t.jsx)(s.p3B,{children:n.map(e=>(0,t.jsxs)(s.Tr,{children:[(0,t.jsx)(s.Td,{children:(0,t.jsx)(s.Vp9,{children:e.permission})}),(0,t.jsx)(s.Td,{children:e.description})]},e.permission))})]})}},12627:function(e,n,i){var t=i(24246),s=i(79283),r=i(34929);n.Z=e=>{let{selectedTaxonomies:n,showDisabled:i=!1,...o}=e,{getDataCategoryDisplayNameProps:a,getDataCategories:l}=(0,r.Z)(),u=(i?l():l().filter(e=>e.active)).filter(e=>!(null==n?void 0:n.includes(e.fides_key))).map(e=>{let{name:n,primaryName:i}=a(e.fides_key);return{value:e.fides_key,name:n,primaryName:i,description:e.description||""}});return(0,t.jsx)(s.l,{options:u,...o})}},89200:function(e,n,i){var t=i(24246),s=i(47935),r=i(98559),o=i(80356);n.Z=e=>{let{resource:n}=e;return(0,t.jsx)(s.G3,{value:(0,r.Z)(n),fontWeight:(0,o.Z)(n)?"semibold":"normal"})}},5945:function(e,n,i){var t=i(24246),s=i(47935),r=i(8151);let o={[r.e.ATTENTION_REQUIRED]:"error",[r.e.APPROVED]:"success",[r.e.IN_REVIEW]:"warning",[r.e.CLASSIFYING]:"info",[r.e.NONE]:"marble"};n.Z=e=>{let{status:n}=e;return(0,t.jsx)(s.A4,{color:o[n],value:n})}},99763:function(e,n,i){var t=i(24246),s=i(96306),r=i(79789),o=i(8151),a=i(61099),l=i(7940),u=i(21910);n.Z=e=>{var n;let{resource:i,onClose:c}=e,d=(0,l.G)(i),g=(0,o.u)(i),f=(d===u.D$.FIELD||d===u.D$.TABLE)&&g===o.e.IN_REVIEW;return(0,t.jsxs)(s.dys,{isOpen:!!i,onClose:c,size:"md",children:[(0,t.jsx)(s.P1B,{}),(0,t.jsxs)(s.scA,{"data-testid":"resource-details",children:[(0,t.jsx)(s.OXI,{children:(null==i?void 0:i.name)||(null==i?void 0:i.urn)}),(0,t.jsx)(s.cCv,{}),(0,t.jsxs)(s.Ng0,{children:[(0,t.jsx)(r.cB,{text:"Title",mt:0}),(0,t.jsx)(r.XU,{children:null!==(n=null==i?void 0:i.name)&&void 0!==n?n:null==i?void 0:i.urn}),(null==i?void 0:i.description)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.cB,{text:"Description"}),(0,t.jsx)(r.XU,{children:null==i?void 0:i.description})]}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.cB,{text:"Data categories"}),(0,t.jsx)(a.Z,{resource:i})]})]})]})]})}},28976:function(e,n,i){var t=i(24246),s=i(96306);n.Z=e=>{let{onHideClick:n,onDetailClick:i}=e;return(0,t.jsxs)(s.v2r,{children:[(0,t.jsx)(s.j2t,{as:s.wpx,size:"small",type:"text",icon:(0,t.jsx)(s.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-menu"}),(0,t.jsxs)(s.qyq,{children:[i&&(0,t.jsx)(s.sNh,{onClick:i,"data-testid":"view-resource-details",children:"View details"}),n&&(0,t.jsx)(s.sNh,{onClick:n,"data-testid":"hide-resource",children:"Hide"})]})]})}},8151:function(e,n,i){i.d(n,{e:function(){return s},u:function(){return o}});var t,s,r=i(21910);(t=s||(s={})).ATTENTION_REQUIRED="Attention required",t.IN_REVIEW="In review",t.APPROVED="Approved",t.CLASSIFYING="Classifying",t.NONE="None";let o=e=>{if(!e)return"Approved";let n=e.diff_status===r.LL.ADDITION||e.diff_status===r.LL.REMOVAL,i=e.child_diff_statuses&&(e.child_diff_statuses[r.LL.ADDITION]||e.child_diff_statuses[r.LL.REMOVAL]);if(n||i)return"Attention required";let t=e.diff_status===r.LL.CLASSIFICATION_QUEUED||e.diff_status===r.LL.CLASSIFYING,s=e.child_diff_statuses&&(e.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]||e.child_diff_statuses[r.LL.CLASSIFYING]);if(t||s)return"Classifying";let o=e.diff_status===r.LL.CLASSIFICATION_ADDITION||e.diff_status===r.LL.CLASSIFICATION_UPDATE,a=e.child_diff_statuses&&(e.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]);return o||a?"In review":"Approved"}},61099:function(e,n,i){var t=i(24246),s=i(96306),r=i(27378),o=i(12627),a=i(34929),l=i(26183),u=i(70675);n.Z=e=>{var n,i,c;let{resource:d}=e,[g,f]=(0,r.useState)(!1),{getDataCategoryDisplayName:h}=(0,a.Z)(),[x]=(0,u.NA)(),v=(null===(n=d.classifications)||void 0===n?void 0:n.length)?d.classifications[0].label:null,m=null!==(c=d.user_assigned_data_categories)&&void 0!==c?c:[],p=!v&&!(null==m?void 0:m.length),j=null===(i=d.sub_field_urns)||void 0===i?void 0:i.length,_=e=>{x({staged_resource_urn:d.urn,monitor_config_id:d.monitor_config_id,user_assigned_data_categories:[...m,e]})},y=e=>{var n;x({staged_resource_urn:d.urn,monitor_config_id:d.monitor_config_id,user_assigned_data_categories:null!==(n=null==m?void 0:m.filter(n=>n!==e))&&void 0!==n?n:[]})},C=!g&&!!m.length,I=!g&&!!v&&!m.length;return(0,t.jsxs)(l.Z,{"data-testid":"edit-category-cell",children:[p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.j8w,{"data-testid":"no-classifications",color:"white",children:"None"}),!j&&(0,t.jsx)(s.j8w,{onClick:()=>f(!0),addable:!0,"data-testid":"taxonomy-add-btn","aria-label":"Add category"})]}),C&&(0,t.jsxs)(t.Fragment,{children:[m.map(e=>(0,t.jsx)(s.j8w,{"data-testid":"user-classification-".concat(e),color:"white",closable:!0,onClose:()=>y(e),closeButtonLabel:"Remove category",children:h(e)},e)),(0,t.jsx)(s.j8w,{onClick:()=>f(!0),addable:!0,"data-testid":"taxonomy-add-btn","aria-label":"Add category"})]}),I&&(0,t.jsxs)(s.j8w,{onClick:()=>f(!0),color:"white","data-testid":"classification-".concat(v),hasSparkle:!0,children:[h(v),(0,t.jsx)(s.PJP.I8b,{size:10})]}),g&&(0,t.jsx)(s.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,t.jsx)(o.Z,{selectedTaxonomies:m,onChange:e=>{f(!1),_(e)},onBlur:()=>f(!1),open:!0})})]})}},7940:function(e,n,i){i.d(n,{G:function(){return s}});var t=i(21910);let s=e=>{var n,i,s;return e?e.resource_type?e.resource_type:(null===(n=e.schemas)||void 0===n?void 0:n.length)?t.D$.DATABASE:(null===(i=e.tables)||void 0===i?void 0:i.length)?t.D$.SCHEMA:(null===(s=e.fields)||void 0===s?void 0:s.length)?t.D$.TABLE:t.D$.FIELD:void 0}},98559:function(e,n){n.Z=e=>{let{name:n,urn:i,monitor_config_id:t,database_name:s,schema_name:r,table_name:o,top_level_field_name:a,top_level_field_urn:l}=e;if(!a)return n;let u=i.split(".");return l?i.replace("".concat(l).concat("."),""):([t,s,r,o,a].forEach(e=>{if(e){let n=u.indexOf(e);n>-1&&u.splice(n,1)}}),u.join("."))}},36168:function(e,n){n.Z=e=>{var n;return!!e.parent_table_urn&&null!==(n=e.sub_field_urns)&&void 0!==n&&!!n.length&&!e.top_level_field_name}},80356:function(e,n,i){var t=i(7940),s=i(36168),r=i(21910);n.Z=e=>(0,t.G)(e)!==r.D$.FIELD||(0,s.Z)(e)},42478:function(e,n,i){i.d(n,{FU:function(){return u},JE:function(){return s},Ki:function(){return d},SU:function(){return g},W:function(){return f},h9:function(){return r},jc:function(){return t},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:t,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:o,useGetMessagingConfigurationDetailsQuery:a,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:f}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,n,i,t)=>{let s=await t({url:"messaging/default/active"});return s.error&&404===s.error.status?{data:null}:s},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6954],{14441:function(e,t,n){var a,i,l=1/0,s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o="\ud800-\udfff",d="\\u2700-\\u27bf",c="a-z\\xdf-\\xf6\\xf8-\\xff",u="A-Z\\xc0-\\xd6\\xd8-\\xde",x="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="['’]",g="["+x+"]",f="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",m="["+c+"]",h="[^"+o+x+"\\d+"+d+c+u+"]",v="(?:\ud83c[\udde6-\uddff]){2}",b="[\ud800-\udbff][\udc00-\udfff]",j="["+u+"]",y="(?:"+m+"|"+h+")",_="(?:"+p+"(?:d|ll|m|re|s|t|ve))?",C="(?:"+p+"(?:D|LL|M|RE|S|T|VE))?",N="(?:"+f+"|\ud83c[\udffb-\udfff])?",k="[\\ufe0e\\ufe0f]?",T="(?:\\u200d(?:"+["[^"+o+"]",v,b].join("|")+")"+k+N+")*",w="(?:"+["["+d+"]",v,b].join("|")+")"+(k+N+T),E=RegExp(p,"g"),O=RegExp(f,"g"),A=RegExp([j+"?"+m+"+"+_+"(?="+[g,j,"$"].join("|")+")","(?:"+j+"|"+h+")+"+C+"(?="+[g,j+y,"$"].join("|")+")",j+"?"+y+"+"+_,j+"+"+C,"\\d+",w].join("|"),"g"),S=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,I="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,z="object"==typeof self&&self&&self.Object===Object&&self,Z=I||z||Function("return this")(),L=(a={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==a?void 0:a[e]}),R=Object.prototype.toString,P=Z.Symbol,F=P?P.prototype:void 0,U=F?F.toString:void 0;function q(e){return null==e?"":function(e){if("string"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==R.call(t))return U?U.call(e):"";var t,n=e+"";return"0"==n&&1/e==-l?"-0":n}(e)}var J=(i=function(e,t,n){return e+(n?"_":"")+t.toLowerCase()},function(e){var t;return function(e,t,n,a){for(var i=-1,l=e?e.length:0;++i<l;)n=t(n,e[i],i,e);return n}(function(e,t,n){if(e=q(e),void 0===t){var a;return(a=e,S.test(a))?e.match(A)||[]:e.match(s)||[]}return e.match(t)||[]}(((t=q(t=e))&&t.replace(r,L).replace(O,"")).replace(E,"")),i,"")});e.exports=J},58754:function(e,t,n){"use strict";var a=n(24246),i=n(96306),l=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:s=!0,children:r,rightContent:o,style:d,...c}=e;return(0,a.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,a.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,a.jsx)(i.lQT,{className:n||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,a.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,a.jsx)(l.m,{className:r?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),r]})}},10342:function(e,t,n){"use strict";var a=n(24246),i=n(96306),l=n(46238);t.Z=e=>{let{title:t,tooltip:n,children:s,...r}=e;return(0,a.jsxs)(i.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...r,children:[(0,a.jsxs)(i.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,a.jsx)(i.xvT,{as:"span",mx:1,children:(0,a.jsx)(l.b,{label:n})}):void 0]}),(0,a.jsx)(i.Kqy,{p:6,spacing:6,children:s})]})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var a=n(24246),i=n(96306),l=n(79894),s=n.n(l),r=n(27378);let{Text:o}=i.AntTypography,d=e=>{let{items:t,...n}=e,l=(0,r.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,r={...e},d=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,a.jsx)(o,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,id:l?"breadcrumb-current-page":void 0,children:r.title})),d)?r.title=(0,a.jsx)(i.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,a.jsx)(s(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[t]);return(0,a.jsx)(i.zrq,{items:l,...n})}},34391:function(e,t,n){"use strict";n.d(t,{Z:function(){return G}});var a=n(24246),i=n(51472),l=n(96306),s=n(34090),r=n(79894),o=n.n(r),d=n(86677),c=n(27378),u=n(16134),x=n(10342),p=n(40324),g=n(812),f=n(46238),m=n(77830),h=n(8411),v=n(46628),b=n(28079),j=n(7426),y=n(34334),_=n(16277);let C=e=>{let{index:t}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.j0,{autoFocus:0!==t,name:"translations.".concat(t,".title"),label:"Title of privacy notice as displayed to user",variant:"stacked"}),(0,a.jsx)(p.Ks,{name:"translations.".concat(t,".description"),label:"Privacy notice displayed to the user",variant:"stacked"})]})},N=e=>{let{languageOptions:t,handleCreateLanguage:n}=e,[i,s]=(0,c.useState)(!1);return i?(0,a.jsx)(l.WPr,{autoFocus:!0,defaultOpen:!0,allowClear:!0,placeholder:"Select a language...",options:t,onChange:e=>{n(e),s(!1)},"data-testid":"select-language",className:"w-full",optionFilterProp:"label"}):(0,a.jsx)(l.wpx,{block:!0,icon:(0,a.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:()=>s(!0),"data-testid":"add-language-btn",className:"mb-1",children:"Add"})},k=e=>{let{index:t,name:n,isOOB:i}=e;return(0,a.jsxs)(l.kCb,{direction:"column",gap:6,children:[(0,a.jsxs)(l.X6q,{size:"sm",children:["Edit ",n," translation"]}),i?(0,a.jsx)(_.f,{languageName:n}):null,(0,a.jsx)(C,{index:t})]})};var T=e=>{var t,n,i,r;let{availableTranslations:o}=e,{values:d,setFieldValue:p}=(0,s.u6)(),[g,f]=(0,c.useState)(!1),[m,h]=(0,c.useState)(null!==(r=null===(n=d.translations)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.language)&&void 0!==r?r:""),{data:v}=(0,j.tB)({api_set:!1}),b=null==v?void 0:null===(i=v.plus_consent_settings)||void 0===i?void 0:i.enable_translations,_=(0,u.C)(y.Zp),T=(0,u.C)(y.G1);(0,y.Ah)({page:_,size:T});let w=(0,u.C)(y.fJ).slice().sort((e,t)=>e.name.localeCompare(t.name)),E=w.filter(e=>{var t;return null===(t=d.translations)||void 0===t?void 0:t.every(t=>t.language!==e.id)}).map(e=>({label:e.name,value:e.id})),O=e=>{h(e),f(!1)},A=e=>{let t=null==o?void 0:o.find(t=>t.language===e);f(!!t);let n=null!=t?t:{language:e,title:"",description:""};h(e),p("translations",[...d.translations,n])},S=e=>{var t,n;let a=d.translations?d.translations.slice().filter(t=>t.language!==e):[],i=m===e?null!==(n=null===(t=a[a.length-1])||void 0===t?void 0:t.language)&&void 0!==n?n:"":m;p("translations",a),h(i)},I=e=>{var t,n;return null!==(n=null===(t=w.find(t=>t.id===e))||void 0===t?void 0:t.name)&&void 0!==n?n:e};return b?(0,a.jsx)(x.Z,{title:"Localizations",children:(0,a.jsx)(s.F2,{name:"translations",render:()=>(0,a.jsx)(l.A5g,{activeKey:m,onChange:O,type:"editable-card",tabBarExtraContent:!!E.length&&(0,a.jsx)(N,{languageOptions:E,handleCreateLanguage:A}),hideAdd:!0,onEdit:(e,t)=>{"remove"===t&&S(e)},items:d.translations.map(e=>({key:e.language,label:I(e.language),children:(0,a.jsx)(k,{index:d.translations.findIndex(t=>t.language===e.language),name:I(e.language),isOOB:g}),closable:d.translations.length>1}))})})}):(0,a.jsx)(x.Z,{title:"Notice text",children:(0,a.jsx)(C,{index:0})})},w=n(97181),E=n(55484),O=n(16394),A=n(65063),S=n(21910);let I=(0,O.Jt)(A.ye),z=(0,O.Jt)(A.B8),Z=[{language:S.eU.EN,title:"",description:""}],L={name:"",consent_mechanism:S.J7.OPT_IN,data_uses:[],enforcement_level:S.QT.FRONTEND,disabled:!0,translations:Z,children:[]},R=e=>{var t,n,a,i;return{name:null!==(t=e.name)&&void 0!==t?t:L.name,consent_mechanism:null!==(n=e.consent_mechanism)&&void 0!==n?n:L.consent_mechanism,data_uses:null!==(a=e.data_uses)&&void 0!==a?a:L.data_uses,enforcement_level:null!==(i=e.enforcement_level)&&void 0!==i?i:L.enforcement_level,notice_key:e.notice_key,disabled:e.disabled,has_gpc_flag:e.has_gpc_flag,id:e.id,internal_description:e.internal_description,translations:e.translations?e.translations.map(e=>{var t;let{privacy_notice_history_id:n,...a}=e;return{...a,title:null!==(t=e.title)&&void 0!==t?t:""}}):Z,children:e.children}},P=E.Ry().shape({name:E.Z_().required().label("Title"),consent_mechanism:E.Z_().required().label("Consent mechanism")});var F=n(14441),U=n.n(F),q=e=>{let{isEditing:t}=e,{values:n,setFieldValue:i}=(0,s.u6)();return(0,c.useEffect)(()=>{t||i("notice_key",U()(n.name))},[n.name,t,i]),(0,a.jsx)(p.j0,{name:"notice_key",label:"Key used in Fides cookie",variant:"stacked"})},J=n(71922);let{Text:B}=l.AntTypography,D=e=>{let{regions:t,label:n,tooltip:i}=e;return(0,a.jsxs)(l.gCW,{align:"start",children:[(0,a.jsxs)(l.kCb,{align:"start",children:[n?(0,a.jsx)(l.lXp,{htmlFor:"regions",fontSize:"xs",my:0,mr:1,children:n}):null,(0,a.jsx)(f.b,{label:i})]}),(0,a.jsx)(l.xuv,{w:"100%","data-testid":"notice-locations",children:(0,a.jsxs)(l.vyj,{size:[0,2],wrap:!0,children:[null==t?void 0:t.map(e=>{let t=(0,l.QCN)(e);return(0,a.jsx)(l.j8w,{children:t?(0,l.c1K)({isoEntry:t,showFlag:!0}):h.Z8[e]},e)}),!(null==t?void 0:t.length)&&(0,a.jsxs)(B,{italic:!0,children:["No locations assigned. Navigate to the"," ",(0,a.jsx)(o(),{href:m.w0,children:"experiences view"})," ","configure."]})]})})]})};var G=e=>{let{privacyNotice:t,availableTranslations:n}=e,r=(0,d.useRouter)(),o=(0,l.pmc)(),f=t?R(t):L;(0,b.fd)();let h=(0,u.C)(b.qv),j=(0,u.C)(J.sX),y=(0,u.C)(J.Zp),_=(0,u.C)(J.G1);(0,J.J6)({page:y,size:_});let C=e=>{var t;let{id:n}=e,a=j.find(e=>e.id===n);return null!==(t=null==a?void 0:a.name)&&void 0!==t?t:n},N=j.some(e=>{var n;return null===(n=e.children)||void 0===n?void 0:n.some(e=>e.id===(null==t?void 0:t.id))}),[k]=(0,J.vL)(),[E]=(0,J.p4)(),O=(0,c.useMemo)(()=>!!t,[t]),A=async e=>{let n;if(O){var a,i;let l={...e,id:t.id,translations:null!==(a=e.translations)&&void 0!==a?a:[],children:null!==(i=e.children)&&void 0!==i?i:[]};n=await k(l)}else n=await E(e);(0,g.D4)(n)?o((0,v.Vo)((0,g.e$)(n.error))):(o((0,v.t5)("Privacy notice ".concat(O?"updated":"created"))),O||r.push(m.IT))};return(0,a.jsx)(s.J9,{initialValues:f,enableReinitialize:!0,onSubmit:A,validationSchema:P,children:e=>{var o,d;let{values:c,setFieldValue:u,dirty:g,isValid:f,isSubmitting:m}=e;return(0,a.jsx)(s.l0,{children:(0,a.jsxs)(l.Kqy,{spacing:10,children:[(0,a.jsxs)(l.Kqy,{spacing:6,children:[(0,a.jsxs)(x.Z,{title:"Privacy notice details",children:[(0,a.jsx)(p.j0,{label:"Notice title",name:"name",isRequired:!0,variant:"stacked"}),(0,a.jsx)(w.d,{name:"consent_mechanism",label:"Consent mechanism",options:I,isRequired:!0,layout:"stacked"}),(0,a.jsx)(q,{isEditing:O}),(0,a.jsx)(p.w8,{name:"has_gpc_flag",label:"Configure whether this notice conforms to the Global Privacy Control",variant:"stacked"}),(0,a.jsx)(D,{regions:null==t?void 0:t.configured_regions,label:"Locations where privacy notice is shown to visitors",tooltip:"To configure locations, change the privacy experiences where this notice is shown"}),(0,a.jsx)(l.izJ,{}),!N&&(0,a.jsx)(i.Z,{label:"Child notices",addButtonLabel:"Add notice children",allItems:j.map(e=>({id:e.id,name:e.name})),values:null!==(d=null===(o=c.children)||void 0===o?void 0:o.map(e=>({id:e.id,name:e.name})))&&void 0!==d?d:[],setValues:e=>u("children",e),idField:"id",getItemLabel:C,draggable:!0,maxHeight:100,baseTestId:"children"}),(0,a.jsx)(w.d,{name:"data_uses",label:"Data use",options:h,mode:"multiple",layout:"stacked"}),(0,a.jsx)(w.d,{name:"enforcement_level",label:"Enforcement level",options:z,isRequired:!0,layout:"stacked"})]}),(0,a.jsx)(T,{availableTranslations:n})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(l.wpx,{onClick:()=>{r.back()},children:"Cancel"}),(0,a.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:m||!g||!f,loading:m,"data-testid":"save-btn",children:"Save"})]})]})})}})}},65063:function(e,t,n){"use strict";n.d(t,{B8:function(){return l},Ep:function(){return s},ye:function(){return i}});var a=n(21910);let i=new Map([[a.J7.OPT_IN,"Opt in"],[a.J7.NOTICE_ONLY,"Notice only"],[a.J7.OPT_OUT,"Opt out"]]),l=new Map([[a.QT.SYSTEM_WIDE,"System wide"],[a.QT.FRONTEND,"Front end"],[a.QT.NOT_APPLICABLE,"Not applicable"]]),s=new Map([["gpp_us_national","GPP US National"],["gpp_us_state","GPP US State"]])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7045],{17245:function(e,t,r){r.d(t,{HK:function(){return a},VY:function(){return i.V},pI:function(){return d},h0:function(){return n.h},Rx:function(){return h},rK:function(){return f}});var n=r(36866),i=r(84306),s=r(812);let a=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let r="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?r=t.data.detail:(0,s.tB)(t)&&(r=t.data.detail[0].msg),e(r)}}};var l=r(27378),u=r(20682),o=r(21910);let d=e=>{let{data:t}=(0,u.$I)({}),r=(0,l.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,l.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===o.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=r.find(t=>{var r;return t.identifier===(null===(r=e.saas_config)||void 0===r?void 0:r.type)});if(t)return t}return e},[e,r])};var c=r(40431);let p=()=>({search:c.Oi.withDefault("")}),h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:r}=e,n=(0,l.useMemo)(()=>p(),[]),[i,s]=(0,c.XI)(n,{history:"push"}),a=(0,l.useMemo)(()=>({searchQuery:i.search||t||void 0}),[i,t]),u=(0,l.useCallback)(e=>{s({search:e||null})},[s]),o=(0,l.useCallback)(()=>{s({search:null})},[s]);return(0,l.useEffect)(()=>{r&&r(a)},[a,r]),{...a,updateSearch:u,resetSearch:o,searchProps:{value:a.searchQuery||"",onChange:u,onClear:()=>u("")}}},v=e=>({sortKey:e?(0,c.jx)([...e]):c.Oi.withDefault(""),sortOrder:(0,c.km)(["ascend","descend"])}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:r,onSortingChange:n,validColumns:i}=e,s=(0,l.useMemo)(()=>v(i),[i]),[a,u]=(0,c.XI)(s,{history:"push"}),o=(0,l.useMemo)(()=>{var e;return{sortKey:a.sortKey||t,sortOrder:null!==(e=a.sortOrder)&&void 0!==e?e:r}},[a,t,r]),d=(0,l.useCallback)((e,t)=>{u({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[u]),p=(0,l.useCallback)(()=>{u({sortKey:null,sortOrder:null})},[u]);return(0,l.useEffect)(()=>{n&&n(o)},[o,n]),{...o,updateSorting:d,resetSorting:p,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:o.sortOrder,sortedInfo:o.sortKey?{field:o.sortKey,order:o.sortOrder}:void 0}}}},84306:function(e,t,r){r.d(t,{V:function(){return s}});var n=r(24246),i=r(96306);let s=()=>{let e=(0,i.pmc)();return{errorAlert:(t,r,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,n.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(i.zMQ,{}),(0,n.jsxs)(i.xuv,{children:[r&&(0,n.jsx)(i.CdC,{children:r}),(0,n.jsx)(i.XaZ,{children:t})]}),(0,n.jsx)(i.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,r,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,n.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(i.zMQ,{}),(0,n.jsxs)(i.xuv,{children:[r&&(0,n.jsx)(i.CdC,{children:r}),(0,n.jsx)(i.XaZ,{children:t})]}),(0,n.jsx)(i.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},36866:function(e,t,r){r.d(t,{h:function(){return o}});var n=r(40431),i=r(27378),s=r(55484);let a=(0,n.jo)({parse(e){let t=parseInt(e,10);try{return s.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var l=r(32735);let u=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:a.withDefault(l.Ej),size:r.pageSizeOptions?(0,n.bJ)(r.pageSizeOptions).withDefault(null!==(e=r.pageSize)&&void 0!==e?e:l.L8):a.withDefault(null!==(t=r.pageSize)&&void 0!==t?t:l.L8)}},o=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:s=l.L8,pageSizeOptions:a,showSizeChanger:o=!0}=r,d=null!=a?a:l.VZ,c=(0,i.useMemo)(()=>u({pageSize:s,pageSizeOptions:a}),[s,a]),[p,h]=(0,n.XI)(c,{history:"push"}),v={pageIndex:null!==(e=p.page)&&void 0!==e?e:l.Ej,pageSize:null!==(t=p.size)&&void 0!==t?t:s};return{...v,updatePageIndex:e=>{h({page:e})},updatePageSize:e=>{h({page:e!==v.pageSize?l.Ej:v.pageIndex,size:e})},resetPagination:()=>{h({page:l.Ej,size:s})},nextPage:()=>{h(e=>{let{page:t,size:r}=e;return{page:t+1,size:r}})},previousPage:()=>{h(e=>{let{page:t,size:r}=e;return{page:t-1,size:r}})},pageSizeOptions:d,showSizeChanger:o}}},14908:function(e,t,r){var n=r(86677),i=r(27378);let s=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:r}=e,a=(0,n.useRouter)(),l=a.asPath.split("#")[1]||t[0],[u,o]=(0,i.useState)(l);return(0,i.useEffect)(()=>{r&&t.includes(r)&&o(r)},[r,t,a.isReady]),{activeTab:u,onTabChange:(0,i.useCallback)(async e=>{if(!t.includes(e)){await a.replace({pathname:a.pathname,query:a.query,hash:void 0}),o(t[0]);return}a.isReady&&(await a.replace({pathname:a.pathname,query:a.query,hash:s(e)},void 0,{shallow:!0}),o(e))},[a,t]),setActiveTab:o}}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7079],{30454:function(e,s,t){var a=t(40699);e.exports=function(e){return a(e,5)}},77867:function(e,s,t){"use strict";var a=t(24246),i=t(96306);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){"use strict";var a=t(24246);let{Link:i}=t(96306).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,s,t){"use strict";t.d(s,{Z:function(){return m}});var a=t(24246),i=t(96306),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(42478),u=t(77830),p=()=>{let e=(0,l.useRouter)();return(0,a.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,a.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:s,title:t,padded:n=!0,mainProps:u}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),g="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.messagingConfiguration&&g),{data:y}=(0,c.JE)(void 0,{skip:x}),{data:f}=(0,d.PW)(void 0,{skip:x}),_=m.flags.messagingConfiguration&&(!y||!f)&&g;return(0,a.jsxs)(i.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[_?(0,a.jsx)(p,{}):null,s]})]})}},19904:function(e,s,t){"use strict";t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},83099:function(e,s,t){"use strict";var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!(null==s?void 0:s.includes(e.fides_key))).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},71248:function(e,s,t){"use strict";t.d(s,{A:function(){return o}});var a=t(24246),i=t(34090),n=t(46782),r=t(97181),l=t(40324);let o=e=>{var s,t;let{name:o,fieldSchema:d,isRequired:c,layout:u="stacked",secretsSchema:p,validate:m}=e,h=(null===(t=d.allOf)||void 0===t?void 0:null===(s=t[0])||void 0===s?void 0:s.$ref)&&d.allOf[0].$ref!==n.j?null==p?void 0:p.definitions[d.allOf[0].$ref.replace("#/definitions/","")]:void 0,g=!!(null==h?void 0:h.enum)||d.options,x="boolean"===d.type,y=()=>{var e;if((null===(e=d.allOf)||void 0===e?void 0:e[0].$ref)===n.j)return"Enter dataset.collection.field"};return(0,a.jsx)(i.gN,{id:o,name:o,validate:m,children:e=>{let{field:s}=e;if(g){var t,i,n;let e=null!==(n=null==h?void 0:null===(t=h.enum)||void 0===t?void 0:t.map(e=>({label:e,value:e})))&&void 0!==n?n:null===(i=d.options)||void 0===i?void 0:i.map(e=>({label:e,value:e}));return(0,a.jsx)(r.d,{name:s.name,id:s.name,label:d.title,isRequired:c,tooltip:d.description,layout:u,options:e,mode:d.multiselect?"multiple":void 0},s.name)}return x?(0,a.jsx)(r.d,{name:s.name,id:s.name,label:d.title,isRequired:c,tooltip:d.description,layout:u,options:[{label:"False",value:"false"},{label:"True",value:"true"}]},s.name):(0,a.jsx)(l.j0,{...s,label:d.title,tooltip:d.description,isRequired:c,type:d.sensitive?"password":"text",placeholder:y(),autoComplete:"off",color:"gray.700",variant:u})}},o)}},46782:function(e,s,t){"use strict";t.d(s,{j:function(){return n},l:function(){return r}});var a=t(30454),i=t.n(a);let n="#/definitions/FidesDatasetReference",r=e=>{let s=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===n&&((null==s?void 0:s.includes("."))?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},t=s=>{var t,a;return null!==(a=null==e?void 0:null===(t=e.required)||void 0===t?void 0:t.includes(s))&&void 0!==a&&a};return{validateField:s,isRequiredField:t,getFieldValidation:(e,a)=>{if(t(e))return e=>{var t;return s(a.title,e,null===(t=a.allOf)||void 0===t?void 0:t[0].$ref)}},preprocessValues:s=>{let t=i()(s);return e&&Object.keys(e.properties).forEach(s=>{var a,i;if((null===(a=e.properties[s].allOf)||void 0===a?void 0:a[0].$ref)===n){let e=null===(i=t.secrets[s])||void 0===i?void 0:i.split(".");e&&(t.secrets[s]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[s].title||t.secrets[s].startsWith("http://")||t.secrets[s].startsWith("https://")||(t.secrets[s]="https://".concat(t.secrets[s])),"integer"===e.properties[s].type&&"string"==typeof t.secrets[s]&&""===t.secrets[s].trim()&&(t.secrets[s]=void 0)}),t}}}},16220:function(e,s,t){"use strict";t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){"use strict";var a=t(24246),i=t(96306);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){"use strict";t.d(s,{Z:function(){return x}});var a=t(24246),i=t(96306),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:g}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var x=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),x=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){x((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[v,{isLoading:b}]=g(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await v(m).unwrap(),x((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){x((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:b,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||b,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){"use strict";var a=t(96306),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},41337:function(e,s,t){"use strict";var a=t(24246),i=t(96306);t(27378);var n=t(88337),r=t(16394),l=t(14746);let o=l.Ny+l.iW.get(n.R.WEBSITE),d=e=>void 0!==e.connection_type,c=e=>void 0!==e.encoded_icon,u=e=>(null==e?void 0:e.connection_type)===n.R.WEBSITE,p=e=>(null==e?void 0:e.connection_type)===n.R.SAAS;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,t;let a;if(c(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(u(s)){let t=null===(e=s.secrets)||void 0===e?void 0:e.url;if(!t)return o;let a=(0,r.ge)(t);return(0,r.tl)(a,100)}if(d(s)){if(p(s)&&(null===(t=s.saas_config)||void 0===t?void 0:t.type)){let e=s.saas_config.type,t=l.LN.get(e);return t?l.Ny+t:l.Ny+l.iW.get(n.R.SAAS)}a=[...l.iW].find(e=>{let[t]=e;return s.connection_type.toString()===t.toString()})}else if(c(s)){let{identifier:e}=s;a=[...l.iW].find(s=>{let[t]=s;return t.toLowerCase()===e.toLowerCase()})}return a?l.Ny+a[1]:l.VD})(),fallbackSrc:u(s)?o:l.VD,alt:(()=>{if(d(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return c(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){"use strict";var a=t(24246),i=t(96306);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),g=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},x=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:x,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:x,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:g,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){"use strict";t.d(s,{s:function(){return l}});var a=t(24246),i=t(96306),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){"use strict";var a=t(24246),i=t(96306),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},19812:function(e,s,t){"use strict";t.d(s,{t:function(){return l}});var a=t(17245),i=t(14207),n=t(27378),r=t(41966);let l=e=>{var s,t,l;let{connectionConfig:o}=e,[d]=(0,i.S6)(),{data:c}=(0,i.Eg)(null!==(t=null==o?void 0:o.key)&&void 0!==t?t:""),u=null!==(l=null==c?void 0:null===(s=c.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==l?l:[],p=u.map(e=>({label:e,value:e})),{data:m}=(0,r.LH)({onlyUnlinkedDatasets:!0,minimal:!0}),h=(0,n.useMemo)(()=>{var e;return null!==(e=null==m?void 0:m.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[m]),{errorAlert:g,successAlert:x}=(0,a.VY)();return{dropdownOptions:[...p,...h],initialDatasets:u,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],l=await d({connection_key:s,dataset_pairs:r}).unwrap();(null===(a=l.failed)||void 0===a?void 0:a.length)>0?g(l.failed[0].message):n&&x("Dataset successfully updated!")}}}},42478:function(e,s,t){"use strict";t.d(s,{FU:function(){return d},JE:function(){return i},Ki:function(){return u},SU:function(){return p},W:function(){return m},h9:function(){return n},jc:function(){return a},qt:function(){return o},sn:function(){return c}});let{useGetEmailInviteStatusQuery:a,useGetActiveMessagingProviderQuery:i,useCreateMessagingConfigurationMutation:n,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:p,useDeleteMessagingConfigurationByKeyMutation:m}=t(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,s,t,a)=>{let i=await a({url:"messaging/default/active"});return i.error&&404===i.error.status?{data:null}:i},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},72774:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});var a=t(24246),i=t(96306),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, certain fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases, where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){"use strict";t.d(s,{U:function(){return a}});let a=e=>{let s=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:s,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}},21103:function(e,s,t){"use strict";t.d(s,{Z:function(){return s$}});var a,i,n,r,l=t(24246),o=t(96306),d=t(79894),c=t.n(d),u=t(86677),p=t.n(u),m=t(27378),h=t(16134),g=t(25980),x=t(45938),y=t(16220),f=t(77830),_=t(84720),v=t(14908),b=t(46628),j=t(26089),k=t(19904),w=t(16394),C=t(20682),S=t(41337);let T=e=>{let{connectionConfig:s,hiddenTypes:t=[]}=e,a=(0,h.C)(C.pw),{data:i}=(0,C.$I)(a),n=(0,m.useMemo)(()=>(null==i?void 0:i.items)||[],[i]),[r,l]=(0,m.useState)(),o=(0,m.useMemo)(()=>[...n].filter(e=>!t.includes(e.identifier)).sort((e,s)=>e.human_readable>s.human_readable?1:-1),[n,t]),d=(0,m.useMemo)(()=>{let e=new Map;return null==o||o.map(s=>e.set(s.human_readable,{value:s})),e},[o]),c=(0,m.useMemo)(()=>{var e;return(null===(e=n.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,n]);return(0,m.useMemo)(()=>{let e=n.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&l(e)},[s,n]),{dropDownOptions:d,selectedValue:r,setSelectedValue:l,systemType:c}};var D=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:n,onChange:r,selectedValue:d}=e,c=(0,m.useRef)(null),[u,p]=(0,m.useState)(!1),[h,g]=(0,m.useState)(""),x=()=>{p(!1)},y=null===(s=[...n].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,m.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(g(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,m.useMemo)(()=>(0,w.Ds)(f,100),[f]),v=(0,m.useMemo)(()=>[...n].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[n,h]);return(0,l.jsxs)(o.v2r,{isLazy:!0,onClose:x,onOpen:()=>{p(!0)},strategy:"fixed",matchWidth:!0,children:[(0,l.jsx)(o.j2t,{"aria-label":null!=y?y:i,as:o.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,l.jsx)(o.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,l.jsx)(o.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,l.jsxs)(o.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,l.jsx)(o.xuv,{px:"8px",mt:2,children:(0,l.jsxs)(o.BZy,{size:"sm",children:[(0,l.jsx)(o.Z8_,{pointerEvents:"none",children:(0,l.jsx)(o.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,l.jsx)(o.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,l.jsx)(o.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,l.jsx)(o.wpx,{onClick:()=>{r(void 0),g(""),x()},size:"small",children:"Clear"})}),(0,l.jsx)(o.xuv,{overflowY:"auto",maxHeight:"272px",children:v.map(e=>{let[s,t]=e;return(0,l.jsx)(o.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,l.jsxs)(o.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>r(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,l.jsx)(S.Z,{data:t.value}),(0,l.jsx)(o.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},A=t(17245),q=t(1315),E=t(21910),R=t(84306),I=t(14207),z=t(59301),F=(0,o.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),L=t(19812),O=e=>{let{status:s,failure_reason:t}=e;if("error"===s){let e="Connection test failed.";return t&&(e+=" ".concat(t)),(0,l.jsx)(o.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"})},Z=t(8627),P=t(32885),W=t(65450),N=t(40324),M=t(34090),U=t(55484),V=t(97181),B=t(57072),K=t(5785),H=t(27259);let Y=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,l.jsxs)(o.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,l.jsx)(o.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,l.jsx)(o.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var G=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:n}=(0,B.MO)(),r=(0,h.C)(K.qb),{errorAlert:d}=(0,A.VY)();return n?null:(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:U.Ry({fields:U.IX().of(U.Ry().shape({pii_field:U.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:U.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:U.IX(U.Z_()).label("Data Categories")}))}),children:e=>(0,l.jsx)(M.l0,{style:{marginTop:0},noValidate:!0,children:(0,l.jsx)(o.gCW,{align:"stretch",children:(0,l.jsx)(M.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,l.jsx)(o.xuv,{w:"416px",children:"PII Field"}),(0,l.jsx)(o.xuv,{w:"416px",children:"DSR Package Label"}),(0,l.jsx)(o.xuv,{w:"416px",children:"Data Categories"}),(0,l.jsx)(o.xuv,{visibility:"hidden",children:(0,l.jsx)(o.lr0,{})})]}),(0,l.jsx)(o.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,l.jsxs)(o.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(V.d,{name:"fields.".concat(t,".data_categories"),options:r.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,l.jsx)(o.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,l.jsx)(o.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,l.jsx)(o.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,l.jsx)(Y,{isSubmitting:t,onCancelClick:i})]})}})})})})},$=e=>{let{connectionConfig:s}=e,t=(0,m.useRef)(!1),{successAlert:a}=(0,A.VY)(),{handleError:i}=(0,A.HK)(),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)([]),{isOpen:u,onOpen:p,onClose:h}=(0,o.qY0)(),{data:g,isFetching:x,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[v]=(0,I._d)(),b=async(e,t)=>{try{r(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await v(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{r(!1)}};(0,m.useEffect)(()=>(t.current=!0,f&&g&&c(g.fields),()=>{t.current=!1}),[g,f]);let j=(0,l.jsx)(o.wpx,{disabled:!s||n,loading:n,onClick:p,children:"Customize DSR"});return(0,l.jsxs)(l.Fragment,{children:[s?j:(0,l.jsx)(o.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:j}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{minWidth:"775px",children:[(0,l.jsx)(o.xBx,{children:"Customize DSR"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(o.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(x||y)&&(0,l.jsx)(o.M5Y,{children:(0,l.jsx)(o.$jN,{})}),t.current&&!y?(0,l.jsx)(G,{data:d,isSubmitting:n,onSaveClick:b,onCancel:h}):null]})})]})]})]})},Q=t(98784),J=t.n(Q),X=t(71248),ee=t(46782),es=t(73183),et=t(95492),ea=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),r=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&n()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Delete integration"}),(0,l.jsx)(o.wpx,{"aria-label":"Delete integration",icon:(0,l.jsx)(et.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,onClose:r,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Delete integration"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsx)(o.Kqy,{direction:"column",spacing:"15px",children:(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,l.jsxs)(o.mzw,{children:[(0,l.jsx)(o.wpx,{onClick:r,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ei=t(99792);let en=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},er=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ei.Z.SAAS&&(t+="_api"),t},el=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:n,onTestConnectionClick:r,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:h,datasetDropdownOptions:x,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[v,{isLoading:b,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,g.hz)(),{getFieldValidation:w,preprocessValues:C}=(0,ee.l)(s),S=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(C(e))},T=async e=>{Object.keys(await e.validateForm()).length>0||r(await v(m.key))},D=(null==m?void 0:m.disabled)||!1;return(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===E.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?J().cloneDeep(m.secrets):{},e.dataset=h,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(t=>{var a,i;let[n,r]=t;if((null===(a=r.allOf)||void 0===a?void 0:a[0].$ref)===ee.j){let s=e.secrets[n];s&&(e.secrets[n]="".concat(s.dataset,".").concat(s.field))}if((null===(i=s.properties[n])||void 0===i?void 0:i.type)==="boolean"){let s=e.secrets[n];"boolean"==typeof s&&(e.secrets[n]=s.toString())}}),e}return J().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),en(e,s)})(),onSubmit:(e,s)=>{n(C(e),s)},validateOnBlur:!0,children:e=>{var t;let n=!e.dirty&&(null==m?void 0:m.authorized);return(0,l.jsx)(M.l0,{children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsxs)("div",{className:"flex flex-row",children:[m?(0,l.jsx)(es.Z,{connection_key:null==m?void 0:m.key,disabled:D,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,l.jsx)(ea,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,l.jsx)(N.j0,{name:"instance_key",id:"instance_key",label:"Integration identifier",isRequired:!0,disabled:!!(null==m?void 0:m.key),tooltip:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration."},"instance_key"),s?Object.entries(s.properties).map(e=>{var t;let[a,i]=e;return"advanced_settings"===a?null:(0,l.jsx)(X.A,{name:"secrets.".concat(a),fieldSchema:i,isRequired:null===(t=s.required)||void 0===t?void 0:t.includes(a),secretsSchema:s,validate:w(a,i),layout:"inline"},"secrets.".concat(a))}):null,k&&(0,l.jsx)(V.d,{name:"enabled_actions",id:"enabled_actions",label:"Request types",isRequired:!0,layout:"inline",mode:"multiple",tooltip:"The request types that are supported for this integration",options:p.supported_actions.map(e=>({label:J().upperFirst(e),value:e}))},"enabled_actions"),E.Zi.DATABASE===p.type&&!y&&(0,l.jsx)(V.d,{name:"dataset",id:"dataset",tooltip:"Select datasets to associate with this integration",label:"Datasets",options:x,layout:"inline",mode:"multiple"}),(0,l.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||n?(0,l.jsx)(o.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:b||j,onClick:()=>T(e),"data-testid":"test-connection-button",children:u}):null,k&&E.Zi.DATABASE===p.type&&!J().isEmpty(h)&&(0,l.jsx)(o.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!n?(0,l.jsx)(o.wpx,{loading:i,onClick:()=>S(e.values,e),children:"Authorize integration"}):null,p.type===E.Zi.MANUAL?(0,l.jsx)($,{connectionConfig:m}):null,(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit","data-testid":"save-integration-btn",children:"Save"})]})]})})}})},eo=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:er(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},ed=async(e,s,t,a,i)=>{var n;let r=a?a.key:er(t,s),l={access:E.uv.WRITE,connection_type:s.type===E.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},ec=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eu=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,R.V)(),{handleError:l}=(0,A.HK)(),[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(!1),{dropdownOptions:p,patchConnectionDatasetConfig:h,initialDatasets:x}=(0,L.t)({connectionConfig:i}),[y]=(0,I.NG)(),[f]=(0,P.IB)(),[_]=(0,I.rO)(),[v]=(0,W.Zh)(),[b]=(0,W.qd)(),[j]=(0,P.kg)(),[k,w]=(0,W._w)(),{plus:C}=(0,g.hz)(),S=(0,m.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]);return{isSubmitting:o,isAuthorizing:c,handleSubmit:async e=>{let n=!i;try{if(d(!0),a.type===E.Zi.SAAS&&n)i=(await eo(e,s,a,t,C?f:y)).connection;else{let n=await ed(e,a,t,i,C?j:b);i||a.type!==E.Zi.DATABASE||(i=n.succeeded[0]),a.type!==E.Zi.MANUAL&&await ec(e,s,t,S,v)}i&&e.dataset&&a.type===E.Zi.DATABASE&&await h(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{d(!1)}},handleAuthorization:async e=>{let n=!i;try{u(!0),n?i=(await eo(e,s,a,t,y)).connection:await ec(e,s,t,S,v);let r=await _(i.key).unwrap();u(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{u(!1)}},datasetDropdownOptions:p,initialDatasets:x,handleDelete:async()=>{try{await k(t),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:w}},ep=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[n,r]=(0,m.useState)(),d=(0,o.pmc)(),c=t.type===E.Zi.MANUAL,{data:u}=(0,C.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:g,handleSubmit:x,handleAuthorization:y,datasetDropdownOptions:f,initialDatasets:_,handleDelete:v,deleteDatastoreConnectionResult:j}=eu({secretsSchema:u,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return u||t.type===E.Zi.MANUAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,l.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,l.jsx)("div",{style:{marginTop:"12px"},children:(0,l.jsxs)(z.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,l.jsx)(F,{})]})})]}),(0,l.jsx)(el,{secretsSchema:u,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:g,onSaveClick:x,onTestConnectionClick:e=>{var s,t;r(e);let a=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...b.MA,status:a,description:(0,l.jsx)(O,{status:a,failure_reason:null===(t=e.data)||void 0===t?void 0:t.failure_reason})})},onTestDatasetsClick:()=>{p().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:f,initialDatasets:_,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:j}),a?(0,l.jsxs)(o.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[n&&n.data&&void 0!==n.fulfilledTimeStamp?(0,l.jsx)(Z.s,{succeeded:"succeeded"===n.data.test_status,timestamp:n.fulfilledTimeStamp}):(0,l.jsx)(Z.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,l.jsx)(o.LZC,{})]}):null]}):null};var em=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),[r,d]=(0,m.useState)(null),{successAlert:c}=(0,A.VY)(),[u,{isLoading:p}]=(0,q.qd)(),g=(0,h.C)(C.pw),{data:x}=(0,C.$I)(g),y=(0,m.useMemo)(()=>(null==x?void 0:x.items)||[],[x]),{handleError:f}=(0,A.HK)(),_=()=>{p||(r&&d(null),n())},v=async()=>{try{if(r){var e;let s={...r,instance_key:r.connection_type===E.Rj.SAAS?null===(e=r.saas_config)||void 0===e?void 0:e.fides_key:r.key},a=y.find(e=>(null==r?void 0:r.saas_config)&&e.identifier===(null==r?void 0:r.saas_config.type)||e.identifier===(null==r?void 0:r.connection_type));(await ed(s,a,t,r,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),n()}}catch(e){f(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{onClick:i,children:"Link integration"}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Unlinked Integrations"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.Kqy,{direction:"column",spacing:"15px",children:[(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,l.jsx)(o.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,l.jsxs)(o.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==r?void 0:r.key)===e.key?"gray.100":"unset",color:(null==r?void 0:r.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},className:"mb-2",children:[(0,l.jsx)(S.Z,{data:e,className:"mr-2"}),(0,l.jsx)(o.xvT,{children:e.name})]},e.key))})]})}),(0,l.jsxs)(o.mzw,{className:"flex gap-4",children:[(0,l.jsx)(o.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:v,loading:p,disabled:!r||p,className:"w-1/2",children:"Link integration"})]})]})]})]})},eh=t(44553);let eg=[E.Rj.WEBSITE,E.Rj.TEST_WEBSITE];var ex=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:n}=T({connectionConfig:s,hiddenTypes:eg}),r=(0,h.C)(I.dR),{data:d}=(0,I.AZ)({...r,orphaned_from_system:!0}),[c,u]=(0,m.useState)([]);(0,m.useEffect)(()=>{d&&u(d.items.filter(e=>!eg.includes(e.connection_type)))},[d]);let p=(0,o.qY0)();return(0,l.jsxs)(o.xuv,{id:"con-wrapper",px:6,children:[(0,l.jsxs)(o.kCb,{py:5,children:[(0,l.jsxs)(o.Kqy,{direction:{base:"column",lg:"row"},children:[(0,l.jsx)(D,{list:a,label:"Integration type",selectedValue:i,onChange:n,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,l.jsx)(em,{connectionConfigs:c,systemFidesKey:t}):null,(0,l.jsx)(k.ZP,{scopes:[E.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,l.jsx)(o.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:p.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,l.jsx)(eh.Z,{isOpen:p.isOpen,onClose:p.onClose})]}),(null==i?void 0:i.type)&&[E.Zi.DATABASE,E.Zi.DATA_CATALOG,E.Zi.SAAS,E.Zi.MANUAL,E.Zi.EMAIL].includes(i.type)?(0,l.jsx)(ep,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:n,systemFidesKey:t}):null]})},ey=t(71922),ef=t(31883);let e_=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:n,name:r}=s,d="".concat(n,"-notice_id"),[c,,u]=(0,M.U$)(d),{setValue:p}=u;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{flexGrow:1,children:[i&&(0,l.jsx)(o.LqM,{}),(0,l.jsx)(o.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:r})]}),(0,l.jsx)(o.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},ev=e=>{let{connectionKey:s,...t}=e,a=(0,o.pmc)(),{data:i,isLoading:n}=(0,P.EQ)(s),[r,{isLoading:d}]=(0,P.Am)(),c=(0,h.C)(ey.Zp),u=(0,h.C)(ey.G1),{data:p,isLoading:g}=(0,ey.J6)({page:c,size:u}),[x,y]=(0,m.useState)(),[f,_]=(0,m.useState)([]),v=(0,m.useMemo)(()=>null==x?void 0:x.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[x]),j=e=>{let s=e.notice_id;if(s){let e=null==p?void 0:p.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return f.filter(e=>s.includes(e.value))}}return f},k=async()=>{let e=await r({connectionKey:s,consentableItems:x});(0,ef.D4)(e)?a((0,b.Vo)("Failed to save bidirectional consent")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Your bidirectional consent settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,m.useEffect)(()=>{i&&y(i)},[i]),(0,m.useEffect)(()=>{p&&_(p.items.map(e=>({label:e.name,value:e.id})))},[p]),n||g)return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.OdW,{height:"35px"})});if(!x||!x.length||!p)return null;let w=(e,s)=>{y(x.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,l.jsxs)(o.Qdk,{border:"none",children:[(0,l.jsxs)(o.KFZ,{children:[(0,l.jsx)(o.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,l.jsx)(o.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Bidirectional consent"})}),(0,l.jsx)(o.XEm,{})]}),(0,l.jsxs)(o.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,l.jsx)(o.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,l.jsx)(M.J9,{initialValues:v||{},onSubmit:k,children:(0,l.jsxs)(M.l0,{children:[(0,l.jsx)(o.MIq,{columns:2,spacing:3,children:x.map(e=>{var s;return(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(e_,{item:e,options:f,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,l.jsx)(e_,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,l.jsx)(o.Ugi,{justifyContent:"flex-end",mt:3,children:(0,l.jsx)(o.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var eb=t(57865),ej=t(3124),ek=t.n(ej),ew=(0,o.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),eC=(0,o.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let eS=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},eT=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,eD=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=eT(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((J().isNil(l)||J().isEmpty(l))&&(J().isNil(o)||J().isEmpty(o)))&&(J().isEqual(l,o)||(J().isNil(l)||J().isEmpty(l)?a.push(r):J().isNil(o)||J().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eA=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,n=[],r=[],o=[];t.custom_fields||a.custom_fields?{addedFields:n,removedFields:r,changedFields:o}=eD(t.custom_fields,a.custom_fields):{addedFields:n,removedFields:r,changedFields:o}=eD(t,a);let d=[];if(n.length>0&&d.push(["added ",(0,l.jsx)("b",{children:n.join(", ")})]),r.length>0&&d.push(["removed ",(0,l.jsx)("b",{children:r.join(", ")})]),o.length>0&&d.push(["changed ",(0,l.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,l.jsxs)(l.Fragment,{children:[d.map((e,s)=>(0,l.jsxs)(m.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:p,formattedDate:h}=eS(i);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:s})," ",u," on ",h," at ",p]})},eq=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eE=(e,s)=>{if(J().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eR=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eI=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},ez=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eF=(0,m.createContext)(null),eL=()=>(0,m.useContext)(eF);var eO=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,m.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,l.jsx)(eF.Provider,{value:i,children:s})},eZ=t(62165),eP=t(30320),eW=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eL(),i=m.Children.toArray(t).filter(e=>{if(m.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=J().get(null==a?void 0:a.before,s),i=J().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&J().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&J().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,l.jsx)(o.Kqy,{marginTop:"0px !important",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s})}),(0,l.jsx)(o.Kqy,{children:i})]})})},eN=t(46238),eM=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eL(),[d]=(0,M.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[g,x]=(0,m.useState)([]),[y,f]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||[],s=J().get(null==n?void 0:n.after,i.name)||[];f(!J().isEqual(e,s)),x(e.length>s.length?e:s)},[n,i.name]),(0,m.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[g]);let _={};return y&&(_="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eN.b,{label:a})]}),(0,l.jsx)(o.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(p,"px")},children:(p?c.value:g).map((e,s)=>(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===r&&y&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eU=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eL(),[d]=(0,M.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[g,x]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||"",s=J().get(null==n?void 0:n.after,i.name)||"";x(!J().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[n,i.name,c.value]);let y={};return g&&(y="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eN.b,{label:a})]}),(0,l.jsx)(o.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(p,"px")},children:c.value}),"before"===r&&g&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eP.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),n=t===E.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",r=Object.keys(s).sort();return(0,l.jsx)(eW,{heading:"Custom fields",children:r.map(e=>i(e)?(0,l.jsx)(eM,{label:e,name:"".concat(n,".").concat(e)},e):(0,l.jsx)(eU,{label:e,name:"".concat(n,".").concat(e)},e))})},eB=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:n}=eL(),[r]=(0,M.U$)(a),d={...r,value:r.value},[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{u(J().get(null==i?void 0:i.before,a.name)!==J().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let p={};return c&&(p="before"===n?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:p,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",minHeight:"46px",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,l.jsx)(eN.b,{label:t})]}),void 0!==d.value&&(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===n&&c&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eK=e=>{let{initialValues:s}=e,t=(0,eZ.hz)();return(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,l.jsx)(M.l0,{children:(0,l.jsxs)(o.Kqy,{children:[(0,l.jsxs)(eW,{heading:"System details",children:[t.dictionaryService?(0,l.jsx)(eU,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,l.jsx)(eU,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eU,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(eU,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eM,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eM,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,l.jsxs)(eW,{heading:"Data processing properties",children:[(0,l.jsx)(eB,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,l.jsx)(eB,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,l.jsx)(eU,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,l.jsx)(eB,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,l.jsx)(eM,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,l.jsx)(eB,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,l.jsx)(eM,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,l.jsx)(eB,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,l.jsx)(eU,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,l.jsxs)(eW,{heading:"Administrative properties",children:[(0,l.jsx)(eU,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,l.jsx)(eU,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,l.jsx)(eU,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(eU,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(eU,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,l.jsx)(eM,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,l.jsx)(eU,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,l.jsx)(eU,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,l.jsx)(eU,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,l.jsx)(eV,{customFields:s.custom_fields,resourceType:E.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)(eW,{heading:"Data use",children:[(0,l.jsx)(eU,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,l.jsx)(eW,{heading:"Features",children:(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,l.jsxs)(eW,{heading:"Special category data",children:[(0,l.jsx)(eB,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,l.jsxs)(eW,{heading:"Third parties",children:[(0,l.jsx)(eB,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,l.jsx)(eV,{customFields:s.privacy_declarations[0].custom_fields,resourceType:E.P6.PRIVACY_DECLARATION})]},t)),(0,l.jsxs)(eW,{heading:"Data flow",children:[(0,l.jsx)(eM,{name:"ingress",label:"Sources"}),(0,l.jsx)(eM,{name:"egress",label:"Destinations"})]})]})})})};let eH=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eY=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsxs)(o.xBx,{backgroundColor:ek().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,l.jsxs)(o.X6q,{size:"xs",children:[(0,l.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,l.jsx)(l.Fragment,{children:eH(s.before,s.after).map((e,s)=>(0,l.jsx)(o.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.olH,{})]})]}),(0,l.jsx)(o.fef,{paddingTop:0,paddingBottom:6,children:(0,l.jsxs)(o.kCb,{justifyContent:"space-between",children:[(0,l.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,l.jsx)(eO,{selectedHistory:s,formType:"before",children:(0,l.jsx)(eK,{initialValues:null==s?void 0:s.before})})}),(0,l.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,l.jsx)(eO,{selectedHistory:s,formType:"after",children:(0,l.jsx)(eK,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eG=e=>{let{system:s}=e,[t,a]=(0,m.useState)(1),{data:i}=(0,P.Xc)({system_key:s.fides_key,page:t,size:10}),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(null),u=(0,h.C)(P.o),{data:p=[]}=(0,W.K3)(),g=(null==i?void 0:i.items)||[],x=e=>{c(e=ez(e=eI(e=eq(e=eE(e=eR(e),u),p)))),r(!0)},{formattedTime:y,formattedDate:f}=eS(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.iA_,{ml:"24px",children:[(0,l.jsx)(o.hrZ,{children:(0,l.jsx)(o.Tr,{children:(0,l.jsxs)(o.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ek().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,l.jsx)(o.p3B,{children:g.map((e,s)=>{let t=eA(e);return t?(0,l.jsx)(o.Tr,{onClick:()=>x(e),style:{cursor:"pointer"},children:(0,l.jsx)(o.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,l.jsxs)(o.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,l.jsx)(o.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,l.jsx)(eC,{})}),(0,l.jsx)(o.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,l.jsx)(ew,{})})]}),(0,l.jsx)(eY,{selectedHistory:d,isOpen:n,onClose:()=>{r(!1),c(null)}})]})},e$=t(52368),eQ=t(3765),eJ=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,l.jsx)(o.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,l.jsx)(o.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,l.jsx)(o.Ugi,{mt:4,children:(0,l.jsx)(o.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eX=t(58452);let e0=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:n,onOpen:r,onClose:d}=(0,o.qY0)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,l.jsx)(o.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,l.jsx)(o.xvT,{children:t||s.data_use})}),(0,l.jsx)(o.LZC,{}),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:r,"data-testid":"delete-btn",children:(0,l.jsx)(o.pJl,{})}),(0,l.jsx)(eX.Z,{isOpen:n,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,l.jsxs)(o.xvT,{children:["You are about to delete the data use declaration"," ",(0,l.jsx)(o.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,l.jsx)(o.izJ,{})]})},e1=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,l.jsx)(o.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,l.jsxs)(o.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s}),(0,l.jsx)(o.LZC,{}),a||null]}),(0,l.jsx)(o.Kqy,{spacing:0,children:t}),(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},e2=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:n,allDataUses:r}=e,d=e=>{let s=r.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(eb.gU);return(0,l.jsx)(e1,{heading:s,footerButton:!c&&(0,l.jsx)(o.wpx,{onClick:a,size:"small",icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,l.jsx)(e0,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:n},e.id))})};var e4=t(33162),e3=t(54748),e6=t(28325),e5=t(30234);let e8=U.Ry().shape({data_categories:U.IX(U.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:U.Z_().required().label("Data use")}),e9={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e7=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},se=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:n,includeCustomFields:r,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:p}=(0,e3.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e6.Z)(),g=(0,m.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsxs)(e5.Z,{heading:"Data use declaration",children:[(0,l.jsx)(N.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u,variant:"stacked"}),(0,l.jsx)(V.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u}),(0,l.jsx)(V.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,l.jsx)(V.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",layout:"stacked"}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(V.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:p,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:c}),(0,l.jsx)(o.UO1,{in:"Legitimate interests"===n.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked"})})})]}),(0,l.jsx)(o.xuv,{mt:5,pl:4,children:(0,l.jsx)(N.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,l.jsx)(N.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,l.jsx)(e5.Z,{heading:"Features",children:(0,l.jsx)(V.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,l.jsx)(e5.Z,{heading:"Dataset reference",children:(0,l.jsx)(V.d,{name:"dataset_references",label:"Dataset references",options:g,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e5.Z,{heading:"Special category data",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(V.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:n.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked"})})})]})}),(0,l.jsx)(e5.Z,{heading:"Third parties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsxs)(o.Kqy,{mt:4,spacing:4,children:[(0,l.jsx)(N.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked"}),(0,l.jsx)(V.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple"})]})})]})}),r?(0,l.jsx)(e4.uc,{resourceType:E.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},ss=(e,s)=>e?{...e,customFieldValues:s||{}}:e9,st=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e4.mZ)({resourceType:E.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e7(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,m.useMemo)(()=>ss(t,i),[t,i])}},sa=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,n=null==a?void 0:a.id,{handleSubmit:r,initialValues:d}=st({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:n}),c=(0,h.C)(eb.gU);return(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:d,onSubmit:r,validationSchema:e8,children:e=>{let{dirty:s,values:a}=e;return(0,l.jsxs)(M.l0,{"data-testid":"declaration-form",children:[(0,l.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsx)(se,{values:a,lockedForGVL:c,privacyDeclarationId:n,...i}),(0,l.jsxs)(o.kCb,{w:"100%",children:[(0,l.jsx)(o.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})}})},si=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:n="privacy-declaration-modal",children:r}=e;return(0,l.jsxs)(o.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"left",p:0,"data-testid":n,children:[(0,l.jsx)(o.xBx,{p:0,children:(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(o.fef,{pb:4,children:r})]})]})};var sn=e=>{let{system:s,includeCustomFields:t,...a}=e,{isOpen:i,onClose:n,onOpen:r}=(0,o.qY0)(),[d,c]=(0,m.useState)(void 0),{createDataUse:u,updateDataUse:p,deleteDataUse:h}=(0,eQ.Z)(s),g=()=>{n(),c(void 0)},x=()=>{r(),c(void 0)},y=async e=>(g(),d)?p(d,e):u(e);return(0,m.useEffect)(()=>{n()},[n,s.fides_key]),(0,l.jsxs)(o.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,l.jsx)(eJ,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:x}):(0,l.jsx)(e2,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:x,handleEdit:e=>{r(),c(e)},handleDelete:h,allDataUses:a.allDataUses}),(0,l.jsx)(si,{isOpen:i,onClose:g,heading:"Configure data use",children:(0,l.jsx)(sa,{initialValues:d,onSubmit:y,onCancel:g,includeCustomFields:t,...a})})]})},sr=e=>{let{system:s}=e,{isLoading:t,...a}=(0,e$.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),n=a.allDataUses.filter(e=>e.active),r=a.allDataSubjects.filter(e=>e.active),d={...a,allDataCategories:i,allDataUses:n,allDataSubject:r};return(0,l.jsxs)(o.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,l.jsxs)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,l.jsx)(o.rUS,{as:c(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,l.jsx)(o.$jN,{}):(0,l.jsx)(sn,{system:s,includeCustomFields:!0,...d})]})},sl=t(812),so=t(93237),sd=t(69525),sc=t(33335);let su={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:"",system_groups:[]},sp=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a||"",system_groups:e.system_groups||[]}},sm=e=>{let s=e.fides_key?e.fides_key:(0,sc.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,system_groups:e.system_groups};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sh,useAddSystemAssetMutation:sg,useUpdateSystemAssetsMutation:sx,useDeleteSystemAssetsMutation:sy,usePopulateSystemAssetsMutation:sf}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,w.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var s_=t(69353),sv=t(36345);let sb=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sj=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sk=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sw=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,l.jsxs)(o.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sC=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:n=[]}=(0,W.K3)(),{plus:r}=(0,eZ.hz)(),d=(0,h.T)(),c=(0,e4.mZ)({resourceType:E.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...u}=(0,e$.f)({includeDatasets:!0,includeDisabled:!1}),p=(0,m.useMemo)(()=>t?sp(t,c.customFieldValues):su,[t,c.customFieldValues]),[g]=(0,W.in)(),y=(0,m.useMemo)(()=>U.Ry().shape({name:U.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await g({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==p.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:U.Z_().min(1).url().nullable()}),[g,p.name]),f=(0,eZ.hz)(),[_,v]=(0,W.f7)(),[j,k]=(0,W.qQ)(),[w]=sf();(0,P.Rd)(void 0,{skip:!f.dictionaryService});let[C]=(0,P.qz)(),{data:S}=(0,s_.QD)(void 0,{skip:!r}),T=(0,m.useMemo)(()=>(null==S?void 0:S.map(e=>({value:e.fides_key,label:e.name})))||[],[S]),D=(0,h.C)(P.o),A=(0,h.C)(eb.gU),q=(0,m.useMemo)(()=>!!(t&&(null==n?void 0:n.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,n]),R=(0,m.useMemo)(()=>u.allDatasets?u.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[u.allDatasets]),I=(0,o.pmc)(),z=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await C({vendor_id:e.vendor_id});if(s.isError){if(!((0,sl.fn)(s.error)&&404===s.error.status)){let e=(0,sl.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");I((0,b.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,sd.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let r=sm({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=q?await j(r):await _(r),await c.upsertCustomFields(e),!q&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await w({systemKey:n.data.fides_key});(0,sl.D4)(e)&&I((0,b.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sl.D4)(n)?I({status:"error",description:(0,sl.e$)(n.error,"An unexpected error occurred while ".concat(q?"editing":"creating"," the system. Please try again."))}):(I.closeAll(),t.resetForm({values:e}),s(n.data),d((0,eb.b3)("initial")))},F=e=>{if(f.dictionaryService){if(!e){d((0,eb.b3)("hiding")),d((0,eb.gQ)(!1));return}d((0,eb.b3)("showing")),f.tcf&&(0,sl.cj)(e)===sl.c6.GVL?d((0,eb.gQ)(!0)):d((0,eb.gQ)(!1))}},L=k.isLoading||v.isLoading||c.isLoading;return(0,l.jsx)(M.J9,{initialValues:p,enableReinitialize:!0,onSubmit:z,validationSchema:y,children:e=>{let{dirty:s,values:n,isValid:d}=e;return(0,l.jsxs)(M.l0,{children:[(0,l.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,l.jsxs)(o.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,l.jsx)(sw,{system:t}):null,(0,l.jsx)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,l.jsx)(sw,{system:t}):null,(0,l.jsxs)(e5.Z,{heading:"System details",children:[f.dictionaryService?(0,l.jsx)(sv.Z,{label:"System name",options:D,onVendorSelected:F,isCreate:!t,lockedForGVL:A}):(0,l.jsx)(N.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,l.jsx)(N.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(so.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?"}),(0,l.jsx)(V.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:p.tags?p.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?"}),r&&(0,l.jsx)(V.d,{name:"system_groups",label:"System groups",options:T,tooltip:"Which system groups are associated with this system?",mode:"multiple",layout:"stacked"})]}),(0,l.jsx)(e5.Z,{heading:"Dataset reference",children:(0,l.jsx)(V.d,{name:"dataset_references",label:"Dataset references",options:R,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e5.Z,{heading:"Data processing properties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(o.xuv,{mb:4,children:(0,l.jsx)(so.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:A})}),(0,l.jsx)(o.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!n.processes_personal_data||A}),(0,l.jsx)(o.UO1,{in:n.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:n.exempt_from_privacy_regulations,disabled:A})})})]})}),(0,l.jsx)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,l.jsxs)(o.Kqy,{spacing:4,mt:4,children:[(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:A}),(0,l.jsx)(o.UO1,{in:n.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(V.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sb,tooltip:"What is the legal basis under which profiling is performed?",disabled:A,isRequired:n.uses_profiling})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:A}),(0,l.jsx)(o.UO1,{in:n.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(V.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sj,tooltip:"What is the legal basis under which the data is transferred?",isRequired:n.does_international_transfers,disabled:A})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:A}),(0,l.jsx)(o.UO1,{in:n.requires_data_protection_assessments,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:A,isRequired:n.requires_data_protection_assessments})})})]})]})})]})}),(0,l.jsxs)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,l.jsxs)(e5.Z,{heading:"Cookie properties",children:[(0,l.jsx)(so.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:A}),(0,l.jsx)(so.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:A}),(0,l.jsx)(so.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:A}),(0,l.jsx)(so.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:A})]}),(0,l.jsxs)(e5.Z,{heading:"Administrative properties",children:[(0,l.jsx)(N.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,l.jsx)(so.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:A}),(0,l.jsx)(so.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(so.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(N.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(V.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sk,tooltip:"What is the role of the business with regard to data processing?",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(so.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:A}),(0,l.jsx)(N.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(so.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"}),(0,l.jsx)(so.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:A}),(0,l.jsx)(so.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),n.fides_key?(0,l.jsx)(e4.uc,{resourceType:E.P6.SYSTEM,resourceFidesKey:n.fides_key}):null]})]}),(0,l.jsx)(o.xuv,{mt:6,children:(0,l.jsx)(o.wpx,{htmlType:"submit",type:"primary",disabled:L||!s||!d,loading:L,"data-testid":"save-btn",children:"Save"})}),i]})}})},sS=t(59003),sT=t(92222),sD=t(30952),sA=t(47935),sq=t(90111),sE=t(8133),sR=t(83099),sI=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[n,r,{setValue:d,setTouched:c}]=(0,M.U$)(s),u=!!(r.touched&&r.error);return(0,l.jsx)(o.NIc,{isInvalid:u,isRequired:!0,children:(0,l.jsxs)(o.jqI,{vertical:!0,children:[(0,l.jsxs)(o.jqI,{align:"center",children:[t&&(0,l.jsx)(N.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,l.jsx)(eN.b,{label:i})]}),(0,l.jsx)(sR.Z,{...n,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,l.jsx)(N.Bc,{isInvalid:u,message:r.error,fieldName:s})]})})};(a=n||(n={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sz=U.Ry().shape({name:U.Z_().required("Enter a name for this asset"),domain:U.Z_().required("Enter a valid domain for this asset"),asset_type:U.Z_().required("Select an asset type"),data_uses:U.IX().min(1,"Select at least one data use"),base_url:U.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sF={name:"",description:"",duration:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sL=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:i,...r}=e,d=!i,[c,{isLoading:u}]=sg(),[p,{isLoading:m}]=sx(),h=(0,o.pmc)(),g=async e=>{let s=await c({systemKey:a,asset:e});if((0,sl.D4)(s)){let e=(0,sl.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,b.Vo)(e))}else h((0,b.t5)("Asset added successfully")),t()},x=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sl.D4)(s)){let e=(0,sl.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,b.Vo)(e))}else h((0,b.t5)("Asset updated successfully")),t()};return(0,l.jsx)(sE.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...r,children:(0,l.jsx)(M.J9,{initialValues:null!=i?i:sF,onSubmit:e=>{d?g(e):x(e)},validationSchema:sz,children:e=>{let{values:s,isValid:a,dirty:i}=e,r=!!s.asset_type&&"Cookie"===s.asset_type,c=!!s.asset_type&&"Cookie"!==s.asset_type;return(0,l.jsxs)(M.l0,{children:[(0,l.jsxs)(o.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,l.jsx)(sq.Z,{children:(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,l.jsxs)(o.jqI,{vertical:!0,gap:20,children:[(0,l.jsx)(N.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(V.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sl.MM)(n),layout:"stacked",disabled:!d}),(0,l.jsx)(sI,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,l.jsx)(N.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(N.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:r,children:(0,l.jsx)(N.j0,{id:"duration",name:"duration",label:"Duration",variant:"stacked",placeholder:"e.g. '1 day', '30 minutes', '1 year'",tooltip:"Cookie duration is how long a cookie stays stored in the user's browser before automatically expiring and being deleted.",isRequired:r})}),(0,l.jsx)(o.UO1,{in:c,children:(0,l.jsx)(N.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:c})})]})]}),(0,l.jsxs)(o.jqI,{justify:"space-between",children:[(0,l.jsx)(o.wpx,{onClick:t,children:"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!i,"data-testid":"save-btn",children:"Save"})]})]})}})})},sO=t(8411),sZ=t(72625),sP=t(29850),sW=t(77685),sN=e=>{let{systemKey:s,systemName:t,asset:a,readonly:i}=e,[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(),[u,p]=(0,m.useState)(!1),[h,{isLoading:g}]=sx(),{successAlert:x,errorAlert:y}=(0,A.VY)(),f=(0,o.qY0)(),{asset_type:_,name:v}=a,b=(0,m.useCallback)(e=>{e.preventDefault(),p(!0)},[]),j=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,ef.D4)(l)?y((0,sl.e$)(l.error)):x(n?"".concat(i," has been added to your system inventory and the ").concat(_,' "').concat(v,'" has been assigned to that system.'):"".concat(_," ").concat(v," has been assigned to ").concat(i)),r(!1),c(void 0)},k=e=>{c(e),f.onOpen()};return i?(0,l.jsx)(o.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,l.jsxs)(l.Fragment,{children:[!n&&(0,l.jsxs)(o.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,l.jsx)(o.PJP.I8b,{})]}),!!n&&(0,l.jsx)(sP.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:b,onSelect:(e,s)=>k({newSystemKey:e,newSystemName:s.label}),loading:g}),u&&(0,l.jsx)(sW.i,{isOpen:!0,onClose:()=>p(!1),onSuccessfulSubmit:(e,s)=>k({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,l.jsx)(o.cVQ,{isOpen:f.isOpen,onClose:f.onClose,onConfirm:()=>{j(d)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==d?void 0:d.newSystemName,"?"),isCentered:!0})]})},sM=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:n}]=sy(),r=(0,o.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,o.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,ef.D4)(e)?r((0,b.Vo)((0,sl.e$)(e.error,"A problem occurred removing this asset. Please try again"))):r((0,b.t5)("Asset removed successfully"))};return(0,l.jsxs)(o.jqI,{className:"gap-1",children:[(0,l.jsx)(o.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,l.jsx)(o.wpx,{size:"small",onClick:u,loading:n,"data-testid":"remove-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact Bidirectional consent.",isCentered:!0})]})},sU=t(34929),sV=t(26183),sB=e=>{var s,t;let{asset:a,systemId:i,readonly:n}=e,{getDataUseDisplayName:r}=(0,sU.Z)(),[d]=sx(),{errorAlert:c,successAlert:u}=(0,R.V)(),[p,h]=(0,m.useState)(!1),g=async e=>{let s=[...a.data_uses||[],e],t=await d({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,ef.D4)(t)?c((0,sl.e$)(t.error)):u("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},x=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await d({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,ef.D4)(n)?c((0,sl.e$)(n.error)):u("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},y=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return n?(0,l.jsx)(sV.Z,{children:y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",children:e.label},e.key))}):(0,l.jsxs)(sV.Z,{children:[!p&&(0,l.jsxs)(l.Fragment,{children:[y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>x(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,l.jsx)(o.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),p&&(0,l.jsx)(o.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,l.jsx)(sR.Z,{selectedTaxonomies:a.data_uses||[],onSelect:g,onBlur:()=>h(!1),open:!0})})]})},sK=e=>{let{systemKey:s,systemName:t,lockedForGVL:a,onEditClick:i}=e,r=(0,sT.Cl)(),d=r.display({id:"select",cell:e=>{let{row:s}=e;return(0,l.jsx)(sZ.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(sZ.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),c=r.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Asset"}),u=r.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Type"}),p=r.display({id:"system",cell:e=>(0,l.jsx)(sN,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),m=r.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,l.jsx)(sB,{asset:e.row.original,systemId:s,readonly:a}),header:"Categories of consent",size:200}),h=r.accessor(e=>e.locations,{id:"locations",cell:e=>(0,l.jsx)(sZ.mb,{values:e.getValue().map(e=>{let s=(0,o.QCN)(e);return{label:s?(0,o.c1K)({isoEntry:s,showFlag:!0}):sO.Z8[e],key:e}})}),header:"Locations",size:300}),g=r.accessor(e=>e.domain,{id:"domain",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Domain"}),x=r.accessor(e=>e.duration,{id:"duration",cell:e=>e.row.original.asset_type===n.COOKIE?(0,l.jsx)(sA.G3,{value:e.getValue()}):null,header:"Duration"}),y=r.accessor(e=>e.page,{id:"page",cell:e=>(0,l.jsx)(sZ.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,l.jsx)(sZ.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),f=r.display({id:"actions",cell:e=>{let{row:t}=e;return(0,l.jsx)(sM,{asset:t.original,systemKey:s,onEditClick:()=>i(t.original)})},header:"Actions"}),_=[c,u,p,m,h,g,x,y];return a?_:[d,..._,f]},sH=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:p,endRange:g,pageIndex:x,setTotalPages:y,resetPageIndexToDefault:f}=(0,sA.oi)(),[_,v]=(0,m.useState)(""),[j,k]=(0,m.useState)(void 0),[w,C]=(0,m.useState)({}),[S]=sy(),T=(0,h.C)(eb.gU),D=(0,o.pmc)(),{data:A,isLoading:q,isFetching:E}=sh({fides_key:t.fides_key,search:_,page:x,size:i}),{isOpen:R,onClose:I,onOpen:z}=(0,o.qY0)(),{isOpen:F,onClose:L,onOpen:O}=(0,o.qY0)();(0,m.useEffect)(()=>{f()},[_,f]),(0,m.useEffect)(()=>{y(null==A?void 0:A.pages)},[A,y]);let Z=sK({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{k(e),z()},lockedForGVL:T}),P=(0,sS.b7)({getCoreRowModel:(0,sT.sC)(),columns:Z,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:w}}),W=P.getSelectedRowModel().rows.map(e=>e.original.id),N=async()=>{let e=await S({systemKey:t.fides_key,asset_ids:W});(0,ef.D4)(e)?D((0,b.Vo)((0,sl.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(P.resetRowSelection(),D((0,b.t5)("Assets removed successfully"))),L()};return t?q?(0,l.jsx)(sA.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.xvT,{fontSize:"sm",mb:4,children:T?"This page displays all assets associated with this system. Use the table below to review these technologies for compliance and detailed insights.":"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,l.jsxs)(sA.Q$,{children:[(0,l.jsx)(sD.f,{value:_,onChange:v}),!T&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,l.jsx)(sL,{isOpen:R,onClose:()=>{k(void 0),I()},systemKey:t.fides_key,asset:j}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.ZNm,{}),iconPosition:"end",onClick:O,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:F,onClose:L,onConfirm:N,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact Bidirectional consent.",isCentered:!0})]})]}),(0,l.jsx)(sA.ZK,{tableInstance:P,emptyTableNotice:(0,l.jsx)(o.oj8,{image:o.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,l.jsx)(sA.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d||E,onNextPageClick:c,isNextPageDisabled:u||E,startRange:p,endRange:g})]}):null},sY=e=>{let{setActiveTab:s}=e,t=(0,u.useRouter)(),a=(0,o.pmc)();(0,m.useEffect)(()=>{let{status:e}=t.query;if(e&&t.isReady){s("integrations"),"succeeded"===e?a((0,b.t5)("Integration successfully authorized.")):a((0,b.Vo)("Failed to authorize integration."));let i={...t.query};delete i.status,t.replace({pathname:t.pathname,query:i,hash:"integrations"},void 0,{shallow:!0})}},[t.query,s,t,a])};(i=r||(r={})).INFORMATION="information",i.DATA_USES="data-uses",i.DATA_FLOW="data-flow",i.INTEGRATIONS="integrations",i.ASSETS="assets",i.HISTORY="history";let sG=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,l.jsxs)(o.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,l.jsx)(j.Z,{onClick:s,children:"view it now"})," or"," ",(0,l.jsx)(j.Z,{onClick:t,children:"add privacy declarations in the next tab"}),"."]})]})};var s$=e=>{var s,t;let{isCreate:a}=e,i=(0,u.useRouter)(),{activeTab:n,onTabChange:d,setActiveTab:p}=(0,v.Z)({tabKeys:Object.values(r)}),[j,k]=(0,m.useState)(!1),{systemOrDatamapRoute:w}=(0,y.V)(),C=(0,o.pmc)(),S=(0,h.T)(),[T,D]=(0,m.useState)(void 0),{plus:A}=(0,g.hz)(),q=i.query.id,{data:E}=(0,W.rn)(q,{skip:!q||a});(0,m.useEffect)(()=>{E&&D(E.processes_personal_data)},[E]);let R=(0,m.useCallback)(e=>{void 0===E&&k(!0),i.push({pathname:f.Dv,query:{id:e.fides_key}});let s={...b.MA,description:(0,l.jsx)(sG,{onViewDatamap:()=>{i.push(w).then(()=>{C.closeAll()})},onAddPrivacyDeclaration:()=>{d("data-uses"),C.closeAll()}})};C({...s})},[E,i,w,C,d]);(0,m.useEffect)(()=>{a&&(S((0,eb.b3)("initial")),S((0,eb.gQ)(!1)))},[S,a]);let{attemptAction:I}=(0,x.oI)(),z=(0,m.useCallback)(e=>{I().then(async s=>{s&&d(e)})},[I,d]);sY({setActiveTab:p});let F=[{label:"Information",key:"information",children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{px:6,mb:9,children:[(0,l.jsx)(x.eB,{}),(0,l.jsx)(sC,{onSuccess:R,system:E})]}),j?(0,l.jsx)(o.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,l.jsxs)(o.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,l.jsx)(o.rUS,{as:c(),href:w,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",key:"data-uses",children:E?(0,l.jsx)(o.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,l.jsx)(sr,{system:E})}):null,disabled:!E||!T},{label:"Data flow",key:"data-flow",children:E?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsxs)(o.xuv,{px:6,paddingBottom:2,children:[(0,l.jsx)(o.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,l.jsx)(_.q,{system:E,isSystemTab:!0})]}):null,disabled:!E},{label:"Integrations",key:"integrations",children:E?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:2,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,children:A?(0,l.jsxs)(l.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,l.jsx)(o.rUS,{href:f.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,l.jsx)(ex,{connectionConfig:E.connection_configs,systemFidesKey:E.fides_key}),(null===(s=E.connection_configs)||void 0===s?void 0:s.key)&&(0,l.jsx)(ev,{m:6,connectionKey:null===(t=E.connection_configs)||void 0===t?void 0:t.key})]}):null,disabled:!E}];return A&&F.push({label:"Assets",key:"assets",children:E?(0,l.jsx)(sH,{system:E}):null,disabled:!E}),A&&F.push({label:"History",key:"history",children:E?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:6,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,l.jsx)(eG,{system:E})]}):null,disabled:!E}),{tabData:F,activeKey:n,onTabChange:z}}},54748:function(e,s,t){"use strict";var a=t(27378),i=t(21910);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){"use strict";var a=t(27378),i=t(21910);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7158],{90980:function(e,i,s){s.d(i,{R:function(){return o}});var t=s(24246),a=s(96306),r=s(79894),l=s.n(r),n=s(63662);let o=e=>{let{onClick:i,...s}=e;return(0,t.jsxs)(a.kCb,{alignItems:"center",mt:-4,mb:3,onClick:i,cursor:"pointer",...s,children:[(0,t.jsx)(a.wpx,{"aria-label":"Back",icon:(0,t.jsx)(a.Rpv,{}),className:"mr-2",size:"small"}),(0,t.jsx)(a.xvT,{as:"a",fontSize:"sm",fontWeight:"500",children:"Back"})]})};i.Z=e=>{let{backPath:i,...s}=e,r=(0,n.useRouter)();return(0,t.jsxs)(a.kCb,{alignItems:"center",mb:6,...s,children:[(0,t.jsx)(a.wpx,{onClick:()=>r.push(i),"aria-label":"Back",icon:(0,t.jsx)(a.Rpv,{}),className:"mr-2",size:"small"}),(0,t.jsx)(a.xvT,{as:l(),href:i,fontSize:"sm",fontWeight:"500",children:"Back"})]})}},10792:function(e,i,s){s.d(i,{Z:function(){return E}});var t=s(24246),a=s(96306),r=s(27378),l=s(17245),n=s(90710),o=s(51980),d=s(90104),c=s.n(d),u=s(56141),m=s.n(u),f=s(92465),_=s.n(f),y=s(25389),p=s.n(y),x=s(15539),g=s.n(x),h=s(86677),v=s(812),w=s(77830),k=s(17828),j=s(42478);let b=e=>{let{serviceType:i,isOpen:s,onClose:l}=e,[o]=(0,j.SU)(),[d,c]=(0,r.useState)(!1),[u]=a.PPS.useForm(),m=i===n.q.twilio_text,f=e=>{let i="An unexpected error occurred. Please try again.";return(0,v.Ot)(e)?i=e.data.detail:(0,v.tB)(e)&&(i=e.data.detail[0].msg),i},_=async e=>{c(!0);try{let s=await o({service_type:i,details:{to_identity:m?{phone_number:e.phone}:{email:e.email}}});(0,v.D4)(s)?a.Pg3.error(f(s.error)):(a.Pg3.success("Test message sent successfully!"),l())}catch(e){a.Pg3.error(f(e))}finally{c(!1)}},y=m?"SMS":"email",p=()=>{l()};return(0,t.jsx)(a.$zI,{title:"Test ".concat(y),open:s,onCancel:p,footer:null,children:(0,t.jsx)(a.gCW,{spacing:4,children:(0,t.jsxs)(a.PPS,{form:u,onFinish:_,layout:"vertical",style:{width:"100%"},children:[m?(0,t.jsx)(a.PPS.Item,{name:"phone",label:"Phone number",rules:[{required:!0,message:"Phone number is required"},{pattern:/^\+?[1-9]\d{1,14}$/,message:"Please enter a valid phone number"}],children:(0,t.jsx)(a.uFc,{placeholder:"+1234567890"})}):(0,t.jsx)(a.PPS.Item,{name:"email",label:"Email address",rules:[{required:!0,message:"Email address is required"},{type:"email",message:"Please enter a valid email address"}],children:(0,t.jsx)(a.uFc,{placeholder:"test@example.com"})}),(0,t.jsx)(a.PPS.Item,{style:{marginBottom:0,marginTop:24},children:(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px"},children:[(0,t.jsx)(a.wpx,{onClick:p,disabled:d,children:"Cancel"}),(0,t.jsx)(a.wpx,{type:"primary",htmlType:"submit",loading:d,"data-testid":"send-test-message-btn",children:d?"Sending...":"Send test ".concat(y)})]})})]})})})},S=()=>{let[e]=(0,j.SU)(),[i,s]=(0,r.useState)(!1),[t,l]=(0,r.useState)({}),o=e=>{let i="An unexpected error occurred. Please try again.";return(0,v.Ot)(e)?i=e.data.detail:(0,v.tB)(e)&&(i=e.data.detail[0].msg),i};return{verifyConfiguration:async i=>{s(!0);try{let s=i===n.q.twilio_text,t=await e({service_type:i,details:{to_identity:s?{phone_number:"+15551234567"}:{email:"test@example.com"}}});if((0,v.D4)(t)){a.Pg3.error(o(t.error));let e=new Date().toISOString();return l(s=>({...s,[i]:{timestamp:e,success:!1}})),!1}a.Pg3.success("Configuration verified successfully!");let r=new Date().toISOString();return l(e=>({...e,[i]:{timestamp:r,success:!0}})),!0}catch(e){return a.Pg3.error(o(e)),!1}finally{s(!1)}},isVerifying:i,isConfigurationVerified:e=>{var i;return!!(null===(i=t[e])||void 0===i?void 0:i.success)},getVerificationData:e=>t[e]}};var P=e=>{var i,s,d;let{configKey:u}=e,f=(0,h.useRouter)(),{handleError:y}=(0,l.HK)(),{verifyConfiguration:x,isVerifying:P,getVerificationData:V}=S(),q=!!u,[D,C]=(0,r.useState)(!1),[I,E]=(0,r.useState)(!1),[A,F]=(0,r.useState)(q?"**********":"secret_keys"),[B]=a.PPS.useForm(),[T]=(0,j.h9)(),[W]=(0,j.sn)(),[N]=(0,j.Ki)(),{data:R,refetch:O}=(0,j.FU)({key:u},{skip:!u}),M={email_from:(null==R?void 0:null===(i=R.details)||void 0===i?void 0:i.email_from)||"",domain:(null==R?void 0:null===(s=R.details)||void 0===s?void 0:s.domain)||"",aws_region:(null==R?void 0:null===(d=R.details)||void 0===d?void 0:d.aws_region)||"",auth_method:q?"**********":"secret_keys",aws_access_key_id:q?"**********":"",aws_secret_access_key:q?"**********":"",aws_assume_role_arn:q?"**********":""};(0,r.useEffect)(()=>{if(R){var e,i,s;let t={email_from:(null===(e=R.details)||void 0===e?void 0:e.email_from)||"",domain:(null===(i=R.details)||void 0===i?void 0:i.domain)||"",aws_region:(null===(s=R.details)||void 0===s?void 0:s.aws_region)||"",auth_method:"**********",aws_access_key_id:"**********",aws_secret_access_key:"**********",aws_assume_role_arn:"**********"};B.setFieldsValue(t),F("**********"),E(!1)}},[R,B]);let K=(()=>{let e=V(n.q.aws_ses);if(e){if(!e.success)return{isVerified:!1,status:"Verify configuration"};let i=new Date(e.timestamp),s=(0,o.B)(i,new Date,{addSuffix:!0});return{isVerified:!0,status:"Verified ".concat(s),timestamp:e.timestamp}}if(R){let{last_test_succeeded:e,last_test_timestamp:i}=R;if(i){let s=new Date(i),t=(0,o.B)(s,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(t):"Verify configuration",timestamp:i}}}let i=f.query.last_test_succeeded,s=f.query.last_test_timestamp;if(s){let e="true"===i||"1"===i,t=new Date(s),a=(0,o.B)(t,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(a):"Verify configuration",timestamp:s}}return{isVerified:!1,status:"Verify configuration"}})(),U=e=>g()(p()(e,e=>q&&"**********"===e?void 0:e),_()),z=(0,r.useCallback)(()=>{let e=B.getFieldsValue(),i=e.email_from,{domain:s}=e,t=i&&""!==i.trim(),a=s&&""!==s.trim();return t||a?Promise.resolve():Promise.reject(Error("Either email from or domain must be provided"))},[B]),Z=async e=>{try{var i,s,t,r;if(q&&u){let r=[],l=(null==R?void 0:null===(i=R.details)||void 0===i?void 0:i.email_from)||"",o=(null==R?void 0:null===(s=R.details)||void 0===s?void 0:s.domain)||"",d=(null==R?void 0:null===(t=R.details)||void 0===t?void 0:t.aws_region)||"";(e.email_from!==l||e.domain!==o||e.aws_region!==d)&&r.push(W({key:u,config:{key:(null==R?void 0:R.key)||u,name:null==R?void 0:R.name,service_type:(null==R?void 0:R.service_type)||n.q.aws_ses,details:{...null==R?void 0:R.details,email_from:e.email_from||null,domain:e.domain||null,aws_region:e.aws_region}}}));let m={auth_method:e.auth_method,aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key,aws_assume_role_arn:e.aws_assume_role_arn},f=U(m);if(c()(f)||r.push(N({key:u,secrets:f})),0===r.length){a.Pg3.info("No changes to save.");return}let _=await Promise.all(r);if(_.some(e=>(0,v.D4)(e))){let e=_.find(e=>(0,v.D4)(e));y(null==e?void 0:e.error)}else a.Pg3.success("AWS SES configuration successfully updated."),E(!1),O&&O()}else{let i={service_type:n.q.aws_ses,details:{email_from:e.email_from||null,domain:e.domain||null,aws_region:e.aws_region},secrets:{auth_method:e.auth_method,aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key,aws_assume_role_arn:e.aws_assume_role_arn}},s=await T(i);if((0,v.D4)(s))y(s.error);else{a.Pg3.success("AWS SES configuration successfully created."),E(!1);let e=null===(r=s.data)||void 0===r?void 0:r.key;if(e){let i=w.GE.replace("[key]",e);f.push(i)}else f.push(w.AD)}}}catch(e){y(e)}},X=async()=>{try{await x(n.q.aws_ses)&&O&&setTimeout(()=>{O()},500)}catch(e){y(e)}},G=()=>{B.validateFields(["email_from","domain"]).catch(()=>{})};return(0,t.jsxs)(a.xuv,{position:"relative",children:[(0,t.jsx)(a.PPS,{form:B,layout:"vertical",initialValues:M,onFinish:Z,onValuesChange:(e,i)=>{let s={...i},t={...M};q&&Object.keys(s).forEach(e=>{"**********"===s[e]&&(s[e]=t[e])}),void 0!==e.auth_method&&(F(e.auth_method),"automatic"===e.auth_method&&B.setFieldsValue({aws_access_key_id:"",aws_secret_access_key:""})),E(!m()(s,t))},children:(0,t.jsxs)(a.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,t.jsx)(a.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsxs)(a.Ugi,{children:[(0,t.jsx)(k.Z,{}),(0,t.jsx)(a.X6q,{as:"h3",size:"xs",children:"AWS SES email messaging configuration"})]})}),(0,t.jsxs)(a.xuv,{px:6,py:6,children:[(0,t.jsx)(a.PPS.Item,{name:"email_from",label:"Email from",rules:[{validator:z}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc,{placeholder:q?"Enter new email from":"Enter email from",onChange:()=>G()})}),(0,t.jsx)(a.PPS.Item,{name:"domain",label:"Domain",rules:[{validator:z}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc,{placeholder:q?"Enter new domain":"Enter domain",onChange:()=>G()})}),(0,t.jsx)(a.PPS.Item,{name:"aws_region",label:"AWS region",rules:[{required:!0,message:"AWS region is required"}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc,{placeholder:q?"Enter new AWS region":"Enter AWS region (e.g., us-east-1)"})}),(0,t.jsx)(a.PPS.Item,{name:"auth_method",label:"Authentication method",rules:[{required:!0,message:"Authentication method is required"}],style:{marginBottom:24},children:(0,t.jsx)(a.WPr,{placeholder:"Select authentication method",options:[{label:"Secret keys",value:"secret_keys"},{label:"Automatic",value:"automatic"}]})}),("secret_keys"===A||q&&"**********"===A)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.PPS.Item,{name:"aws_access_key_id",label:"AWS access key ID",rules:"secret_keys"===A||q&&"**********"===A?[{required:!0,message:"AWS access key ID is required for secret keys authentication"}]:[],style:{marginBottom:24},children:(0,t.jsx)(a.uFc.Password,{placeholder:q?"Enter new AWS access key ID":"Enter AWS access key ID"})}),(0,t.jsx)(a.PPS.Item,{name:"aws_secret_access_key",label:"AWS secret access key",rules:"secret_keys"===A||q&&"**********"===A?[{required:!0,message:"AWS secret access key is required for secret keys authentication"}]:[],style:{marginBottom:24},children:(0,t.jsx)(a.uFc.Password,{placeholder:q?"Enter new AWS secret access key":"Enter AWS secret access key"})})]}),(0,t.jsx)(a.PPS.Item,{name:"aws_assume_role_arn",label:"AWS assume role ARN",children:(0,t.jsx)(a.uFc.Password,{placeholder:q?"Enter new AWS assume role ARN":"Enter AWS assume role ARN (optional)"})}),(0,t.jsxs)(a.xuv,{mt:6,className:"flex justify-between",children:[(0,t.jsx)(a.xuv,{children:q&&K.isVerified&&(0,t.jsx)(a.wpx,{type:"default",onClick:()=>C(!0),"data-testid":"send-test-message-btn",children:"Send test email"})}),(0,t.jsxs)(a.xuv,{className:"flex",children:[q?(0,t.jsx)(a.wpx,{onClick:X,className:"mr-2","data-testid":"test-btn",loading:P,icon:K.isVerified&&!P?(0,t.jsx)(a.StI,{}):void 0,children:P?"Verifying":K.isVerified?"Verified":K.status}):(0,t.jsx)(a.wpx,{onClick:()=>f.push(w.AD),className:"mr-2",children:"Cancel"}),(0,t.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",disabled:!I,children:"Save"})]})]})]})]})}),(0,t.jsx)(b,{serviceType:n.q.aws_ses,isOpen:D,onClose:()=>C(!1)})]})},V=s(44907),q=e=>{var i;let{configKey:s}=e,d=(0,h.useRouter)(),{handleError:u}=(0,l.HK)(),{verifyConfiguration:f,isVerifying:y,getVerificationData:x}=S(),[k,P]=(0,r.useState)(!1),[q,D]=(0,r.useState)(!1),[C]=a.PPS.useForm(),[I]=(0,j.h9)(),[E]=(0,j.sn)(),[A]=(0,j.Ki)(),F=!!s,{data:B,refetch:T}=(0,j.FU)({key:s},{skip:!s}),W={domain:(null==B?void 0:null===(i=B.details)||void 0===i?void 0:i.domain)||"",mailgun_api_key:F?"**********":""};(0,r.useEffect)(()=>{if(B){var e;let i={domain:(null===(e=B.details)||void 0===e?void 0:e.domain)||"",mailgun_api_key:"**********"};C.setFieldsValue(i),D(!1)}},[B,C]);let N=(()=>{let e=x(n.q.mailgun);if(e){if(!e.success)return{isVerified:!1,status:"Verify configuration"};let i=new Date(e.timestamp),s=(0,o.B)(i,new Date,{addSuffix:!0});return{isVerified:!0,status:"Verified ".concat(s),timestamp:e.timestamp}}if(B){let{last_test_succeeded:e,last_test_timestamp:i}=B;if(i){let s=new Date(i),t=(0,o.B)(s,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(t):"Verify configuration",timestamp:i}}}let i=d.query.last_test_succeeded,s=d.query.last_test_timestamp;if(s){let e="true"===i||"1"===i,t=new Date(s),a=(0,o.B)(t,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(a):"Verify configuration",timestamp:s}}return{isVerified:!1,status:"Verify configuration"}})(),R=e=>g()(p()(e,e=>F&&"**********"===e?void 0:e),_()),O=async e=>{try{var i,t;if(F&&s){let t=[],r=(null==B?void 0:null===(i=B.details)||void 0===i?void 0:i.domain)||"";e.domain!==r&&""!==e.domain.trim()&&t.push(E({key:s,config:{key:(null==B?void 0:B.key)||s,name:null==B?void 0:B.name,service_type:(null==B?void 0:B.service_type)||n.q.mailgun,details:{...null==B?void 0:B.details,is_eu_domain:"false",domain:e.domain}}}));let l=R({mailgun_api_key:e.mailgun_api_key});if(c()(l)||t.push(A({key:s,secrets:l})),0===t.length){a.Pg3.info("No changes to save.");return}let o=await Promise.all(t);if(o.some(e=>(0,v.D4)(e))){let e=o.find(e=>(0,v.D4)(e));u(null==e?void 0:e.error)}else a.Pg3.success("Mailgun configuration successfully updated."),D(!1),T&&T()}else{let i={service_type:n.q.mailgun,details:{is_eu_domain:"false",domain:e.domain},secrets:{mailgun_api_key:e.mailgun_api_key}},s=await I(i);if((0,v.D4)(s))u(s.error);else{a.Pg3.success("Mailgun configuration successfully created."),D(!1);let e=null===(t=s.data)||void 0===t?void 0:t.key;if(e){let i=w.GE.replace("[key]",e);d.push(i)}else d.push(w.AD)}}}catch(e){u(e)}},M=async()=>{try{await f(n.q.mailgun)&&T&&setTimeout(()=>{T()},500)}catch(e){u(e)}};return(0,t.jsxs)(a.xuv,{position:"relative",children:[(0,t.jsx)(a.PPS,{form:C,layout:"vertical",initialValues:W,onFinish:O,onValuesChange:(e,i)=>{let s={...i},t={...W};F&&"**********"===s.mailgun_api_key&&(s.mailgun_api_key=t.mailgun_api_key),D(!m()(s,t))},children:(0,t.jsxs)(a.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,t.jsx)(a.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsxs)(a.Ugi,{children:[(0,t.jsx)(V.Z,{}),(0,t.jsx)(a.X6q,{as:"h3",size:"xs",children:"Mailgun email messaging configuration"})]})}),(0,t.jsxs)(a.xuv,{px:6,py:6,children:[(0,t.jsx)(a.PPS.Item,{name:"domain",label:"Domain",rules:[{required:!0,message:"Domain is required"},{type:"string",min:1,message:"Domain cannot be empty"}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc,{placeholder:F?"Enter new domain":"Enter domain"})}),(0,t.jsx)(a.PPS.Item,{name:"mailgun_api_key",label:"API key",rules:[{required:!0,message:"API key is required"},{type:"string",min:1,message:"API key cannot be empty"}],children:(0,t.jsx)(a.uFc.Password,{placeholder:F?"Enter new API key":"Enter API key"})}),(0,t.jsxs)(a.xuv,{mt:6,className:"flex justify-between",children:[(0,t.jsx)(a.xuv,{children:F&&N.isVerified&&(0,t.jsx)(a.wpx,{type:"default",onClick:()=>P(!0),"data-testid":"send-test-message-btn",children:"Send test email"})}),(0,t.jsxs)(a.xuv,{className:"flex",children:[F?(0,t.jsx)(a.wpx,{onClick:M,className:"mr-2","data-testid":"test-btn",loading:y,icon:N.isVerified&&!y?(0,t.jsx)(a.StI,{}):void 0,children:y?"Verifying":N.isVerified?"Verified":N.status}):(0,t.jsx)(a.wpx,{onClick:()=>d.push(w.AD),className:"mr-2",children:"Cancel"}),(0,t.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",disabled:!q,children:"Save"})]})]})]})]})}),(0,t.jsx)(b,{serviceType:n.q.mailgun,isOpen:k,onClose:()=>P(!1)})]})},D=s(5144),C=e=>{var i;let{configKey:s}=e,d=(0,h.useRouter)(),{handleError:u}=(0,l.HK)(),{verifyConfiguration:f,isVerifying:y,getVerificationData:x}=S(),[k,P]=(0,r.useState)(!1),[V,q]=(0,r.useState)(!1),[C]=a.PPS.useForm(),[I]=(0,j.h9)(),[E]=(0,j.sn)(),[A]=(0,j.Ki)(),F=!!s,{data:B,refetch:T}=(0,j.FU)({key:s},{skip:!s}),W={email:(null==B?void 0:null===(i=B.details)||void 0===i?void 0:i.twilio_email_from)||"",twilio_api_key:F?"**********":""};(0,r.useEffect)(()=>{if(B){var e;let i={email:(null===(e=B.details)||void 0===e?void 0:e.twilio_email_from)||"",twilio_api_key:"**********"};C.setFieldsValue(i),q(!1)}},[B,C]);let N=(()=>{let e=x(n.q.twilio_email);if(e){if(!e.success)return{isVerified:!1,status:"Verify configuration"};let i=new Date(e.timestamp),s=(0,o.B)(i,new Date,{addSuffix:!0});return{isVerified:!0,status:"Verified ".concat(s),timestamp:e.timestamp}}if(B){let{last_test_succeeded:e,last_test_timestamp:i}=B;if(i){let s=new Date(i),t=(0,o.B)(s,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(t):"Verify configuration",timestamp:i}}}let i=d.query.last_test_succeeded,s=d.query.last_test_timestamp;if(s){let e="true"===i||"1"===i,t=new Date(s),a=(0,o.B)(t,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(a):"Verify configuration",timestamp:s}}return{isVerified:!1,status:"Verify configuration"}})(),R=e=>g()(p()(e,e=>F&&"**********"===e?void 0:e),_()),O=async e=>{try{var i,t;if(F&&s){let t=[],r=(null==B?void 0:null===(i=B.details)||void 0===i?void 0:i.twilio_email_from)||"";e.email!==r&&""!==e.email.trim()&&t.push(E({key:s,config:{key:(null==B?void 0:B.key)||s,name:null==B?void 0:B.name,service_type:(null==B?void 0:B.service_type)||n.q.twilio_email,details:{...null==B?void 0:B.details,twilio_email_from:e.email}}}));let l=R({twilio_api_key:e.twilio_api_key});if(c()(l)||t.push(A({key:s,secrets:l})),0===t.length){a.Pg3.info("No changes to save.");return}let o=await Promise.all(t);if(o.some(e=>(0,v.D4)(e))){let e=o.find(e=>(0,v.D4)(e));u(null==e?void 0:e.error)}else a.Pg3.success("Twilio email configuration successfully updated."),q(!1),T&&T()}else{let i={service_type:n.q.twilio_email,details:{twilio_email_from:e.email},secrets:{twilio_api_key:e.twilio_api_key}},s=await I(i);if((0,v.D4)(s))u(s.error);else{a.Pg3.success("Twilio email configuration successfully created."),q(!1);let e=null===(t=s.data)||void 0===t?void 0:t.key;if(e){let i=w.GE.replace("[key]",e);d.push(i)}else d.push(w.AD)}}}catch(e){u(e)}},M=async()=>{try{await f(n.q.twilio_email)&&T&&setTimeout(()=>{T()},500)}catch(e){u(e)}};return(0,t.jsxs)(a.xuv,{position:"relative",children:[(0,t.jsx)(a.PPS,{form:C,layout:"vertical",initialValues:W,onFinish:O,onValuesChange:(e,i)=>{let s={...i},t={...W};F&&"**********"===s.twilio_api_key&&(s.twilio_api_key=t.twilio_api_key),q(!m()(s,t))},children:(0,t.jsxs)(a.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,t.jsx)(a.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsxs)(a.Ugi,{children:[(0,t.jsx)(D.Z,{}),(0,t.jsx)(a.X6q,{as:"h3",size:"xs",children:"Twilio email messaging configuration"})]})}),(0,t.jsxs)(a.xuv,{px:6,py:6,children:[(0,t.jsx)(a.PPS.Item,{name:"email",label:"Email",rules:[{required:!0,message:"Email is required"},{type:"email",message:"Please enter a valid email"}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc,{placeholder:F?"Enter new email":"Enter email"})}),(0,t.jsx)(a.PPS.Item,{name:"twilio_api_key",label:"API key",rules:[{required:!0,message:"API key is required"},{type:"string",min:1,message:"API key cannot be empty"}],children:(0,t.jsx)(a.uFc.Password,{placeholder:F?"Enter new API key":"Enter API key"})}),(0,t.jsxs)(a.xuv,{mt:6,className:"flex justify-between",children:[(0,t.jsx)(a.xuv,{children:F&&N.isVerified&&(0,t.jsx)(a.wpx,{type:"default",onClick:()=>P(!0),"data-testid":"send-test-message-btn",children:"Send test email"})}),(0,t.jsxs)(a.xuv,{className:"flex",children:[F?(0,t.jsx)(a.wpx,{onClick:M,className:"mr-2","data-testid":"test-btn",loading:y,icon:N.isVerified&&!y?(0,t.jsx)(a.StI,{}):void 0,children:y?"Verifying":N.isVerified?"Verified":N.status}):(0,t.jsx)(a.wpx,{onClick:()=>d.push(w.AD),className:"mr-2",children:"Cancel"}),(0,t.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",disabled:!V,children:"Save"})]})]})]})]})}),(0,t.jsx)(b,{serviceType:n.q.twilio_email,isOpen:k,onClose:()=>P(!1)})]})},I=e=>{let{configKey:i}=e,s=(0,h.useRouter)(),{verifyConfiguration:l,isVerifying:d,getVerificationData:u}=S(),[f,y]=(0,r.useState)(!1),[x,k]=(0,r.useState)(!1),[P]=a.PPS.useForm(),[V]=(0,j.h9)(),[q]=(0,j.Ki)(),C=!!i,{data:I,refetch:E}=(0,j.FU)({key:i},{skip:!i}),A={account_sid:C?"**********":"",auth_token:C?"**********":"",messaging_service_sid:C?"**********":"",phone:C?"**********":""};(0,r.useEffect)(()=>{I&&(P.setFieldsValue({account_sid:"**********",auth_token:"**********",messaging_service_sid:"**********",phone:"**********"}),k(!1))},[I,P]);let F=(()=>{let e=u(n.q.twilio_text);if(e){if(!e.success)return{isVerified:!1,status:"Verify configuration"};let i=new Date(e.timestamp),s=(0,o.B)(i,new Date,{addSuffix:!0});return{isVerified:!0,status:"Verified ".concat(s),timestamp:e.timestamp}}if(I){let{last_test_succeeded:e,last_test_timestamp:i}=I;if(i){let s=new Date(i),t=(0,o.B)(s,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(t):"Verify configuration",timestamp:i}}}let i=s.query.last_test_succeeded,t=s.query.last_test_timestamp;if(t){let e="true"===i||"1"===i,s=new Date(t),a=(0,o.B)(s,new Date,{addSuffix:!0});return{isVerified:e,status:e?"Verified ".concat(a):"Verify configuration",timestamp:t}}return{isVerified:!1,status:"Verify configuration"}})(),B=e=>g()(p()(e,e=>C&&"**********"===e?void 0:e),_()),T=e=>{let i="An unexpected error occurred. Please try again.";return(0,v.Ot)(e)?i=e.data.detail:(0,v.tB)(e)&&(i=e.data.detail[0].msg),i},W=(0,r.useCallback)(()=>{let e=P.getFieldsValue(),i=e.messaging_service_sid,s=e.phone,t=i&&""!==i.trim()&&"**********"!==i,a=s&&""!==s.trim()&&"**********"!==s;return t||a?Promise.resolve():Promise.reject(Error("Either messaging service SID or phone number must be provided"))},[P]),N=async e=>{try{if(C&&i){let s={twilio_account_sid:e.account_sid,twilio_auth_token:e.auth_token,twilio_messaging_service_sid:e.messaging_service_sid,twilio_sender_phone_number:e.phone},t=B(s);if(c()(t)){a.Pg3.info("No changes to save.");return}let r=await q({key:i,secrets:t});(0,v.D4)(r)?a.Pg3.error(T(r.error)):(a.Pg3.success("Twilio SMS configuration successfully updated."),k(!1),E&&E())}else{let i={service_type:n.q.twilio_text,secrets:{twilio_account_sid:e.account_sid,twilio_auth_token:e.auth_token,twilio_messaging_service_sid:e.messaging_service_sid,twilio_sender_phone_number:e.phone}},r=await V(i);if((0,v.D4)(r))a.Pg3.error(T(r.error));else{var t;a.Pg3.success("Twilio SMS configuration successfully created."),k(!1);let e=null===(t=r.data)||void 0===t?void 0:t.key;if(e){let i=w.GE.replace("[key]",e);s.push(i)}else s.push(w.AD)}}}catch(e){a.Pg3.error("An unexpected error occurred. Please try again.")}},R=async()=>{try{await l(n.q.twilio_text)&&E&&setTimeout(()=>{E()},500)}catch(e){a.Pg3.error("An unexpected error occurred during verification.")}},O=()=>{P.validateFields(["messaging_service_sid","phone"]).catch(()=>{})};return(0,t.jsxs)(a.xuv,{position:"relative",children:[(0,t.jsx)(a.PPS,{form:P,layout:"vertical",initialValues:A,onFinish:N,onValuesChange:(e,i)=>{let s={...i},t={...A};C&&Object.keys(s).forEach(e=>{"**********"===s[e]&&(s[e]=t[e])}),k(!m()(s,t))},children:(0,t.jsxs)(a.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,t.jsx)(a.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsxs)(a.Ugi,{children:[(0,t.jsx)(D.Z,{}),(0,t.jsx)(a.X6q,{as:"h3",size:"xs",children:"Twilio SMS messaging configuration"})]})}),(0,t.jsxs)(a.xuv,{px:6,py:6,children:[(0,t.jsx)(a.PPS.Item,{name:"account_sid",label:"Account SID",rules:[{required:!0,message:"Account SID is required"},{type:"string",min:1,message:"Account SID cannot be empty"}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc.Password,{placeholder:C?"Enter new account SID":"Enter account SID"})}),(0,t.jsx)(a.PPS.Item,{name:"auth_token",label:"Auth token",rules:[{required:!0,message:"Auth token is required"},{type:"string",min:1,message:"Auth token cannot be empty"}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc.Password,{placeholder:C?"Enter new auth token":"Enter auth token"})}),(0,t.jsx)(a.PPS.Item,{name:"messaging_service_sid",label:"Messaging service SID",rules:[{validator:W}],style:{marginBottom:24},children:(0,t.jsx)(a.uFc.Password,{placeholder:C?"Enter new messaging service SID":"Enter messaging service SID",onChange:()=>O()})}),(0,t.jsx)(a.PPS.Item,{name:"phone",label:"Phone number",rules:[{validator:W}],children:(0,t.jsx)(a.uFc.Password,{placeholder:C?"Enter new phone number":"Enter phone number",onChange:()=>O()})}),(0,t.jsxs)(a.xuv,{mt:6,className:"flex justify-between",children:[(0,t.jsx)(a.xuv,{children:C&&F.isVerified&&(0,t.jsx)(a.wpx,{type:"default",onClick:()=>y(!0),"data-testid":"send-test-message-btn",children:"Send test SMS"})}),(0,t.jsxs)(a.xuv,{className:"flex",children:[C?(0,t.jsx)(a.wpx,{onClick:R,className:"mr-2","data-testid":"test-btn",loading:d,icon:F.isVerified&&!d?(0,t.jsx)(a.StI,{}):void 0,children:d?"Verifying":F.isVerified?"Verified":F.status}):(0,t.jsx)(a.wpx,{onClick:()=>s.push(w.AD),className:"mr-2",children:"Cancel"}),(0,t.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",disabled:!x,children:"Save"})]})]})]})]})}),(0,t.jsx)(b,{serviceType:n.q.twilio_text,isOpen:f,onClose:()=>y(!1)})]})},E=e=>{let{configKey:i,initialProviderType:s}=e,[o,d]=(0,r.useState)(s||""),c=!!i,{handleError:u}=(0,l.HK)(),{data:m,isLoading:f,error:_}=(0,j.FU)({key:i},{skip:!i}),{data:y}=(0,j.qt)();(0,r.useEffect)(()=>{c&&(null==m?void 0:m.service_type)&&d(m.service_type)},[c,null==m?void 0:m.service_type]),(0,r.useEffect)(()=>{_&&u(_)},[_,u]);let p=(0,r.useMemo)(()=>{var e;let i=new Set((null==y?void 0:null===(e=y.items)||void 0===e?void 0:e.map(e=>e.service_type))||[]),s=!c&&i.has(n.q.mailgun),t=!c&&i.has(n.q.twilio_email),a=!c&&i.has(n.q.twilio_text),r=!c&&i.has(n.q.aws_ses);return[{value:n.q.mailgun,label:n.k.mailgun,disabled:s,title:s?"Only one messaging provider of each type can be created":void 0},{value:n.q.twilio_email,label:n.k.twilio_email,disabled:t,title:t?"Only one messaging provider of each type can be created":void 0},{value:n.q.twilio_text,label:n.k.twilio_text,disabled:a,title:a?"Only one messaging provider of each type can be created":void 0},{value:n.q.aws_ses,label:n.k.aws_ses,disabled:r,title:r?"Only one messaging provider of each type can be created":void 0}]},[y,c]);return c&&f?(0,t.jsx)(a.xuv,{display:"flex",justifyContent:"center",alignItems:"center",height:"200px",children:(0,t.jsx)(a.$jN,{})}):!c||m||f?(0,t.jsxs)(a.xuv,{children:[!c&&(0,t.jsxs)(a.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,mb:4,children:[(0,t.jsx)(a.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,t.jsx)(a.X6q,{as:"h3",size:"xs",children:"Select messaging provider"})}),(0,t.jsx)(a.xuv,{px:6,py:6,children:(0,t.jsx)(a.PPS,{layout:"vertical",children:(0,t.jsx)(a.PPS.Item,{label:"Provider type",name:"provider_type",rules:[{required:!0,message:"Please select a provider type"}],children:(0,t.jsx)(a.WPr,{placeholder:"Choose a messaging provider...",value:o||void 0,onChange:e=>d(e),options:p})})})})]}),o&&(()=>{switch(o){case n.q.mailgun:return(0,t.jsx)(q,{configKey:i});case n.q.twilio_email:return(0,t.jsx)(C,{configKey:i});case n.q.twilio_text:return(0,t.jsx)(I,{configKey:i});case n.q.aws_ses:return(0,t.jsx)(P,{configKey:i});default:return null}})()]}):(0,t.jsx)(a.xuv,{children:(0,t.jsxs)(a.xvT,{color:"red.500",children:["Messaging configuration not found for key: ",i]})})}},90710:function(e,i,s){s.d(i,{k:function(){return a},q:function(){return t}});let t={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text",aws_ses:"aws_ses"},a={mailgun:"Mailgun email",twilio_email:"Twilio email",twilio_text:"Twilio SMS",aws_ses:"AWS SES email"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7218],{95492:function(e,s,t){t.d(s,{l:function(){return n}});var i=t(24246);let n=(0,t(96306).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},94799:function(e,s,t){t.d(s,{k:function(){return l}});var i=t(76649);let n=e=>(0,i.Ln)({id:"string"},e),l=e=>(null!=e?e:[]).filter(n)},30320:function(e,s,t){t.d(s,{m:function(){return d}});var i=t(27378),n=t(25980),l=t(17245),a=t(32885),r=t(94799);let d=e=>{let{resourceFidesKey:s,resourceType:t}=e,{errorAlert:d}=(0,l.VY)(),{plus:o}=(0,n.hz)(),c=(0,i.useMemo)(()=>null!=s?s:"",[]),u=(0,a.YU)(!0,{skip:!o}),m=(0,a.VN)(t,{skip:!o}),{data:f,isLoading:x,error:h,isError:y}=(0,a.PV)(null!=s?s:"",{skip:""!==c&&!(o&&c)}),[g]=(0,a._D)(),p=u.isLoading||m.isLoading||x,j=(0,i.useMemo)(()=>new Map((0,r.k)(u.data).map(e=>{var s;return[e.id,{...e,options:(null!==(s=e.allowed_values)&&void 0!==s?s:[]).map(e=>({value:e,label:e}))}]})),[u.data]),C=(0,i.useMemo)(()=>{var e;return null===(e=m.data)||void 0===e?void 0:e.filter(e=>e.active)},[m.data]),k=(0,i.useMemo)(()=>new Map((0,r.k)(C).map(e=>[e.id,e])),[C]),v=(0,i.useMemo)(()=>y&&(null==h?void 0:h.status)===404?new Map:new Map((0,r.k)(f).map(e=>[e.custom_field_definition_id,e])),[f,y,h]),w=(0,i.useMemo)(()=>{let e=[...k.keys()];return e.sort(),e},[k]),_=(0,i.useMemo)(()=>{let e={};return C&&v&&C.forEach(s=>{let t=v.get(s.id||"");t&&(s.allow_list_id&&"string[]"===s.field_type?e[t.custom_field_definition_id]=t.value:e[t.custom_field_definition_id]=t.value.toString())}),e},[C,v]),b=(0,i.useCallback)(async e=>{if(!o)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:s;if(!i)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let l=[],a=[];w.forEach(e=>{let s=v.get(e),t=n[e];void 0===t||""===t||Array.isArray(t)&&0===t.length?(null==s?void 0:s.id)&&a.push(s.id):l.push({custom_field_definition_id:e,resource_id:i,id:null==s?void 0:s.id,value:t})});try{await g({resource_type:t,resource_id:i,upsert:l,delete:a})}catch(e){d("One or more custom fields have failed to save, please try again."),console.error(e)}},[o,v,d,s,w,g,t]);return{customFieldValues:_,definitionIdToCustomField:v,idToAllowListWithOptions:j,idToCustomFieldDefinition:k,isEnabled:o,isLoading:p,sortedCustomFieldDefinitionIds:w,upsertCustomFields:b}}},33162:function(e,s,t){t.d(s,{uc:function(){return u},mZ:function(){return c.m}});var i=t(24246),n=t(96306),l=t(34090),a=t(30234),r=t(21910),d=t(97181),o=t(40324),c=t(30320);let u=e=>{let{resourceFidesKey:s,resourceType:t}=e,{idToAllowListWithOptions:u,idToCustomFieldDefinition:m,isEnabled:f,isLoading:x,sortedCustomFieldDefinitionIds:h}=(0,c.m)({resourceFidesKey:s,resourceType:t});return f&&0!==h.length?(0,i.jsx)(a.Z,{heading:"Custom fields",children:(0,i.jsx)(n.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,i.jsx)(n.kCb,{flexDir:"column",gap:"24px",children:x?(0,i.jsx)(n.M5Y,{children:(0,i.jsx)(n.$jN,{})}):h.length>0&&(0,i.jsx)(n.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:h.map(e=>{let s=m.get(e);if(!s)return null;let t="customFieldValues.".concat(s.id);if(!s.allow_list_id&&s.field_type===r.AL.STRING)return(0,i.jsx)(l.gN,{name:t,children:e=>{let{field:t}=e;return(0,i.jsx)(o.j0,{...t,label:s.name,tooltip:s.description,variant:"stacked"})}},e);let n=u.get(s.allow_list_id);if(!n)return null;let{options:a}=n;return(0,i.jsx)(d.d,{name:t,allowClear:!0,mode:s.field_type!==r.AL.STRING?"multiple":void 0,label:s.name,options:a,tooltip:s.description,layout:"stacked",className:"w-full"},e)})})})})}):null};t(94799)},45938:function(e,s,t){t.d(s,{Gt:function(){return m},eB:function(){return f},oI:function(){return u}});var i=t(24246),n=t(34090),l=t(27378),a=t(16134),r=t(38602),d=t(58452);let o=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,a.T)(),s=(0,a.C)(r.DB),t=(0,l.useCallback)(()=>{c.current=void 0,o.current=void 0},[]),i=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),t())},[e,t]),n=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),t())},[e,t]);return{attemptAction:(0,l.useCallback)(()=>s?(e((0,r.h7)()),o.current||(o.current=new Promise(e=>{c.current=e})),o.current):Promise.resolve(!0),[s,e]),onConfirm:i,onClose:n}},m=e=>{let{id:s,name:t}=e,{dirty:i}=(0,n.u6)(),d=(0,a.T)();return(0,l.useEffect)(()=>(d((0,r.Zu)({id:s,name:t})),()=>{d((0,r.dz)({id:s}))}),[d,s,t]),(0,l.useEffect)(()=>{d((0,r.$p)({id:s,isDirty:i}))},[i,d,s]),null},f=()=>{let{onConfirm:e,onClose:s}=u(),t=(0,a.C)(r.uv);return(0,i.jsx)(d.Z,{isOpen:t,onClose:s,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},84720:function(e,s,t){t.d(s,{q:function(){return C}});var i=t(24246),n=t(96306),l=t(27378),a=t(34090),r=t(812),d=t(45938),o=t(14048),c=t(95492);let u=e=>{let{systems:s,dataFlows:t,onDataFlowSystemChange:l}=e,{setFieldValue:r}=(0,a.u6)(),d=t.map(e=>e.fides_key),o=e=>{let s=t.filter(s=>s.fides_key!==e.fides_key);r("dataFlowSystems",s),l(s)};return(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,i.jsx)(n.hrZ,{children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsx)(n.Th,{})]})}),(0,i.jsx)(n.p3B,{children:s.filter(e=>d.includes(e.fides_key)).map(e=>(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"end",children:(0,i.jsx)(n.wpx,{"aria-label":"Unassign data flow from system",icon:(0,i.jsx)(c.l,{}),onClick:()=>o(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var m=t(26917),f=e=>{let{allSystems:s,dataFlowSystems:t,onChange:l,flowType:r}=e,{setFieldValue:d}=(0,a.u6)(),o=e=>{if(t.find(s=>s.fides_key===e.fides_key)){let s=t.filter(s=>s.fides_key!==e.fides_key);d("dataFlowSystems",s),l(s)}else{let s=[...t,{fides_key:e.fides_key,type:"system"}];d("dataFlowSystems",s),l(s)}};return(0,i.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,i.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsxs)(n.Th,{textAlign:"right",children:["Set as ",r]})]})}),(0,i.jsx)(n.p3B,{children:s.map(e=>{let s=!!t.find(s=>s.fides_key===e.fides_key);return(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"right",children:(0,i.jsx)(n.rAg,{checked:s,onChange:()=>o(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let x=(e,s)=>{var t,i;return(null===(t=e.name)||void 0===t?void 0:t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))||(null===(i=e.description)||void 0===i?void 0:i.toLocaleLowerCase().includes(s.toLocaleLowerCase()))};var h=e=>{let{currentSystem:s,systems:t,isOpen:r,onClose:d,dataFlowSystems:o,onDataFlowSystemChange:c,flowType:u}=e,{setFieldValue:h}=(0,a.u6)(),[y,g]=(0,l.useState)(""),[p,j]=(0,l.useState)(o),C=async()=>{c(p),d()},k=0===t.length,v=(0,l.useMemo)(()=>t?t.filter(e=>e.fides_key!==s.fides_key).filter(e=>x(e,y)):[],[t,s.fides_key,y]),w=(0,l.useMemo)(()=>{let e=new Set(p.map(e=>e.fides_key));return v.every(s=>e.has(s.fides_key))},[v,p]);return(0,i.jsxs)(n.u_l,{isOpen:r,onClose:d,size:"2xl",isCentered:!0,children:[(0,i.jsx)(n.ZAr,{}),(0,i.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,i.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsxs)(n.xvT,{fontSize:"2xl",lineHeight:8,fontWeight:"semibold",children:["Configure ",u.toLocaleLowerCase()," systems"]}),(0,i.jsxs)(n.j8w,{color:"success",children:["Assigned to ",p.length," systems"]})]}),(0,i.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:k?(0,i.jsx)(n.xvT,{children:"No systems found"}):(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Add or remove destination systems from your data map"}),(0,i.jsx)(n.xuv,{children:(0,i.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,i.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,i.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:w,onChange:e=>{if(e&&t){let e=v.map(e=>({fides_key:e.fides_key,type:"system"}));h("dataFlowSystems",e),j(e)}else j([])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,i.jsx)(m.Z,{value:y,onChange:g,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,i.jsx)(f,{flowType:u,allSystems:v,dataFlowSystems:p,onChange:j})]})}),(0,i.jsxs)(n.mzw,{justifyContent:"flex-start",children:[(0,i.jsx)(n.wpx,{onClick:d,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),!k&&(0,i.jsx)(n.wpx,{type:"primary",onClick:C,"data-testid":"confirm-btn",children:"Confirm"})]})]})]})},y=t(46628),g=t(1315);let p={dataFlowSystems:[]},j=e=>{let{system:s,isIngress:t,isSystemTab:c}=e,m=(0,n.pmc)(),f=t?"Source":"Destination",x="".concat(f,"s"),j=(0,n.qY0)(),[C]=(0,g.qQ)(),{data:k=[]}=(0,g.K3)(),v=(0,l.useMemo)(()=>{let e=t?s.ingress:s.egress;e||(e=[]);let i=k?k.map(e=>e.fides_key):[];return e.filter(e=>i.includes(e.fides_key))},[t,s,k]),[w,_]=(0,l.useState)(v);(0,l.useEffect)(()=>{_(v)},[v]);let b=async(e,i)=>{let{dataFlowSystems:n}=e,{resetForm:l}=i,a={...s,ingress:t?n:s.ingress,egress:t?s.egress:n},d=await C(a);(0,r.D4)(d)?m((0,y.Vo)("Failed to update data flows")):m((0,y.t5)("".concat(x," updated"))),l({values:{dataFlowSystems:n}})};return(0,i.jsxs)(n.Qdk,{children:[(0,i.jsx)(n.KFZ,{height:"68px",paddingLeft:c?6:2,"data-testid":"data-flow-button-".concat(f),children:(0,i.jsxs)(n.kCb,{alignItems:"center",justifyContent:"start",flex:1,textAlign:"left",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"semibold",mr:2,children:x}),(0,i.jsx)(n.Vp9,{ml:2,backgroundColor:"primary.400",borderRadius:"6px",color:"white",children:w.length}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.XEm,{})]})}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",padding:6,"data-testid":"data-flow-panel-".concat(f),children:(0,i.jsx)(n.Kqy,{borderRadius:"md",backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:(0,i.jsx)(a.J9,{initialValues:p,onSubmit:b,children:e=>{let{isSubmitting:t,dirty:l,resetForm:r}=e;return(0,i.jsxs)(a.l0,{children:[(0,i.jsx)(d.Gt,{id:"".concat(s.fides_key,":").concat(f),name:"".concat(f," Data Flow")}),(0,i.jsx)(n.wpx,{onClick:j.onOpen,type:"primary",size:"small",icon:(0,i.jsx)(o.A5,{}),iconPosition:"end",className:"mb-4","data-testid":"assign-systems-btn",children:"Configure ".concat(x.toLocaleLowerCase())}),(0,i.jsx)(u,{systems:k,dataFlows:w,onDataFlowSystemChange:_}),(0,i.jsxs)("div",{className:"mt-6 flex gap-2",children:[(0,i.jsx)(n.wpx,{disabled:!l&&w===v,onClick:()=>{_(v),r({values:{dataFlowSystems:v}})},"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:t,disabled:!l&&w===v,"data-testid":"save-btn",children:"Save"})]}),j.isOpen?(0,i.jsx)(h,{currentSystem:s,systems:k,isOpen:j.isOpen,onClose:j.onClose,dataFlowSystems:w,onDataFlowSystemChange:_,flowType:f}):null]})}})})})]})},C=e=>{let{system:s,isSystemTab:t}=e;return(0,i.jsxs)(n.UQy,{allowToggle:!0,"data-testid":"data-flow-accordion",children:[(0,i.jsx)(j,{system:s,isIngress:!0,isSystemTab:t}),(0,i.jsx)(j,{system:s,isSystemTab:t})]})}},30234:function(e,s,t){var i=t(24246),n=t(96306);s.Z=e=>{let{heading:s,HeadingButton:t,children:l}=e;return(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(n.X6q,{as:"h3",size:"xs",children:s}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.LZC,{}),(0,i.jsx)(t,{})]}):null]}),(0,i.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:l})]})})}},52368:function(e,s,t){t.d(s,{f:function(){return d}});var i=t(16134),n=t(30002),l=t(28079),a=t(41966),r=t(57072);let d=e=>{let{includeDatasets:s,includeDisabled:t}=e,{isLoading:d}=(0,r.MO)(),{isLoading:o}=(0,n.te)(),{isLoading:c}=(0,l.fd)(),{isLoading:u}=(0,a.LH)({onlyUnlinkedDatasets:!1,minimal:!0},{skip:!s}),m=(0,i.C)(r.qb),f=(0,i.C)(r.Bd),x=(0,i.C)(n.ZL),h=(0,i.C)(n.H7),y=(0,i.C)(l.U3),g=(0,i.C)(l.jp),p=(0,i.C)(a.Q4);return{allDataCategories:t?m:f,allDataSubjects:t?x:h,allDataUses:t?y:g,allDatasets:s?p:void 0,isLoading:d||o||c||u}}},31883:function(e,s,t){t.d(s,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=t(19043)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7630],{77213:function(e,t,n){n.d(t,{Z:function(){return p}});var i=n(24246),r=n(96306),s=n(88038),a=n.n(s),o=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(42478),d=n(77830),g=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(d.AD)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:s=!0,mainProps:d}=e,p=(0,l.hz)(),m=(0,o.useRouter)(),f="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,y=!(p.flags.messagingConfiguration&&f),{data:x}=(0,c.JE)(void 0,{skip:y}),{data:v}=(0,u.PW)(void 0,{skip:y}),h=p.flags.messagingConfiguration&&(!x||!v)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[h?(0,i.jsx)(g,{}):null,t]})]})}},58754:function(e,t,n){var i=n(24246),r=n(96306),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:u,...c}=e;return(0,i.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.lQT,{className:n||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},51472:function(e,t,n){var i=n(24246),r=n(96306),s=n(47397),a=n(7078),o=n(18397),l=n(11055),u=n(27378),c=n(40324),d=n(46238);let g=e=>{let{item:t,label:n,draggable:o,onDeleteItem:l,onEditItem:u,tooltip:c,onRowClick:g,maxH:p=10,rowTestId:m}=e,f=(0,s.o)(),y=(0,i.jsxs)(r.kCb,{direction:"row",gap:2,maxH:p,w:"full",px:2,align:"center",role:"group",className:"group",borderY:"1px",my:"-1px",borderColor:"gray.200",_hover:g?{bgColor:"gray.100"}:void 0,bgColor:"white",position:"relative",children:[o&&(0,i.jsx)(r.VVU,{onPointerDown:e=>f.start(e),cursor:"grab"}),(0,i.jsxs)(r.kCb,{direction:"row",gap:2,p:2,align:"center",w:"full",cursor:g?"pointer":"auto",onClick:()=>{g&&g(t)},overflow:"clip","data-testid":m,children:[(0,i.jsx)(r.xvT,{fontSize:"sm",userSelect:"none",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:n}),(0,i.jsx)(d.b,{label:c})]}),(0,i.jsxs)(r.vyj,{className:"invisible absolute right-2 bg-white group-hover:visible",children:[u&&(0,i.jsx)(r.wpx,{"aria-label":"Edit",onClick:()=>u(t),icon:(0,i.jsx)(r.PJP.I8b,{}),size:"small","data-testid":"edit-".concat(m)}),l&&(0,i.jsx)(r.wpx,{"aria-label":"Delete",onClick:()=>l(t),icon:(0,i.jsx)(r.PJP.ZNm,{}),size:"small","data-testid":"delete-".concat(m)})]})]});return o?(0,i.jsx)(a.e,{value:t,dragListener:!1,dragControls:f,children:y}):y},p=e=>{let{label:t,options:n,onOptionSelected:s,baseTestId:a}=e,[o,l]=(0,u.useState)(!1),[c,d]=(0,u.useState)(void 0);return o?(0,i.jsx)(r.xuv,{w:"full",children:(0,i.jsx)(r.WPr,{labelInValue:!0,placeholder:"Select...",filterOption:(e,t)=>{var n;return(null!==(n=null==t?void 0:t.label)&&void 0!==n?n:"").toLowerCase().includes(e.toLowerCase())},value:c,options:n,onChange:e=>{s(e),l(!1),d(void 0)},className:"w-full","data-testid":"select-".concat(a)})}):(0,i.jsx)(r.wpx,{onClick:()=>l(!0),"data-testid":"add-".concat(a),block:!0,icon:(0,i.jsx)(r.jBn,{boxSize:4}),iconPosition:"end",children:t})};t.Z=e=>{let{label:t,tooltip:n,draggable:s,addButtonLabel:a,allItems:u,idField:m,nameField:f=m,values:y,setValues:x,canDeleteItem:v,getTooltip:h,onRowClick:b,onEditItem:C,selectOnAdd:j,getItemLabel:T,createNewValue:E,maxHeight:w=36,baseTestId:_}=e,S=e=>e instanceof Object&&m&&m in e?e[m]:e,I=u.every(e=>"string"==typeof e)?u.filter(e=>y.every(t=>t!==e)):u.filter(e=>y.every(t=>S(t)!==S(e))),R=e=>{x(y.filter(t=>t!==e).slice())},P=null!=T?T:e=>e instanceof Object&&m&&m in e?f&&f in e?e[f]:e[m]:e,q=e=>{let t=e instanceof Object&&m&&m in e?e[m]:e;return{label:P(e),value:t}},M=e=>u.every(e=>"string"==typeof e)?e.value:u.find(t=>t[m]===e.value),k=e=>{let t=E?E(e):M(e);x([t,...y.slice()]),j&&b&&b(t),j&&C&&C(t)},A={border:"1px",borderColor:"gray.200",borderRadius:"md",w:"full",maxH:"8.5rem",overflowY:"auto"},V=s?(0,i.jsx)(r.xuv,{as:o.E.div,layoutScroll:!0,...A,children:(0,i.jsx)(l.M,{values:y,onReorder:e=>x(e.slice()),children:y.map(e=>{let t=S(e);return(0,i.jsx)(g,{item:e,label:P(e),onDeleteItem:!v||v&&v(e)?R:void 0,onEditItem:C,onRowClick:b,draggable:!0,maxH:w,rowTestId:"".concat(_,"-row-").concat(t),tooltip:h&&h(e)?h(e):void 0},t)})})}):(0,i.jsx)(r.xuv,{...A,children:(0,i.jsx)(r.aVo,{children:y.map(e=>{let t=S(e);return(0,i.jsx)(g,{item:e,label:P(e),onRowClick:b,onDeleteItem:R,tooltip:h&&h(e)?h(e):void 0,maxH:w,rowTestId:"".concat(_,"-row-").concat(t)},t)})})});return y.length?(0,i.jsxs)(r.kCb,{align:"start",direction:"column",w:"full",gap:4,children:[t?(0,i.jsx)(c.__,{htmlFor:"test",fontSize:"xs",my:0,mr:1,children:t}):null,(0,i.jsx)(d.b,{label:n}),V,I.length?(0,i.jsx)(p,{label:null!=a?a:"Add new",options:I.map(e=>q(e)),onOptionSelected:k,baseTestId:_}):null]}):(0,i.jsx)(p,{label:null!=a?a:"Add new",options:I.map(e=>q(e)),onOptionSelected:k,baseTestId:_})}},10342:function(e,t,n){var i=n(24246),r=n(96306),s=n(46238);t.Z=e=>{let{title:t,tooltip:n,children:a,...o}=e;return(0,i.jsxs)(r.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,i.jsxs)(r.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,i.jsx)(r.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.b,{label:n})}):void 0]}),(0,i.jsx)(r.Kqy,{p:6,spacing:6,children:a})]})}},70788:function(e,t,n){n.d(t,{m:function(){return u}});var i=n(24246),r=n(96306),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,u=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},u=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:o.title})),u)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},67810:function(e,t,n){n.d(t,{Z:function(){return s}}),(i=r||(r={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",i.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",i.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",i.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",i.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",i.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var i,r,s={[r.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[r.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[r.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[r.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[r.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[r.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},20149:function(e,t,n){var i=n(24246),r=n(77830),s=n(96306),a=n(34090),o=n(86677),l=n(16134),u=n(10342),c=n(40324),d=n(51472),g=n(67810),p=n(64826);let m=()=>{var e;let t=(0,l.C)(p.Zp),n=(0,l.C)(p.G1);(0,p.gz)({page:t,size:n});let r=(0,l.C)(p.YO),{values:s,setFieldValue:o}=(0,a.u6)();return(0,i.jsx)(d.Z,{label:"Associated properties",addButtonLabel:"Add property",idField:"id",nameField:"name",allItems:r.map(e=>({id:e.id,name:e.name})),values:null!==(e=s.properties)&&void 0!==e?e:[],setValues:e=>o("properties",e),draggable:!0,maxHeight:100,baseTestId:"property"})};t.Z=e=>{let{template:t,handleSubmit:n,handleDelete:l}=e,d=(0,o.useRouter)(),p=()=>{d.push(r.q)},f={type:t.type,content:t.content,properties:t.properties||[],is_enabled:t.is_enabled,id:t.id||""};return(0,i.jsx)(a.J9,{enableReinitialize:!0,initialValues:f,onSubmit:n,children:e=>{let{dirty:t,isValid:n,isSubmitting:r}=e;return(0,i.jsxs)(a.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,i.jsx)(s.xuv,{py:3,children:(0,i.jsxs)(u.Z,{title:"".concat(g.Z[f.type]),children:[(0,i.jsx)(c.j0,{isRequired:!0,label:"Email subject",name:"content.subject",variant:"stacked"}),(0,i.jsx)(c.Ks,{isRequired:!0,label:"Message body",name:"content.body",value:"test",variant:"stacked",resize:!0}),(0,i.jsx)(s.xuv,{py:3,children:(0,i.jsx)(m,{})}),(0,i.jsx)(c.w8,{name:"is_enabled",label:"Enable message",variant:"switchFirst"})]})}),(0,i.jsxs)(s.kCb,{justifyContent:"space-between",width:"100%",paddingTop:2,children:[f.id&&l&&(0,i.jsx)(s.wpx,{"data-testid":"delete-template-button",loading:!1,className:"mr-3",onClick:l,children:"Delete"}),(0,i.jsxs)(s.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:[(0,i.jsx)(s.wpx,{loading:!1,className:"mr-3",onClick:p,children:"Cancel"}),(0,i.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:r||!t||!n,loading:r,"data-testid":"submit-btn",children:"Save"})]})]})]})}})}},5058:function(e,t,n){n.d(t,{Vw:function(){return s},ms:function(){return i},pS:function(){return r},vm:function(){return a}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:r,useCreateMessagingTemplateByTypeMutation:s,usePatchMessagingTemplateByIdMutation:a}=n(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},47466:function(e,t,n){n.d(t,{KC:function(){return a},ew:function(){return o},gQ:function(){return s},jM:function(){return i},lE:function(){return r}});let{useGetMessagingTemplatesQuery:i,useUpdateMessagingTemplatesMutation:r,useGetMessagingTemplateByIdQuery:s,useGetMessagingTemplateDefaultQuery:a,useDeleteMessagingTemplateByIdMutation:o}=n(78780).u.injectEndpoints({endpoints:e=>({getMessagingTemplates:e.query({query:()=>({url:"messaging/templates"}),providesTags:()=>["Messaging Templates"]}),updateMessagingTemplates:e.mutation({query:e=>({url:"messaging/templates",method:"PUT",body:e}),invalidatesTags:()=>["Messaging Templates"]}),getMessagingTemplateById:e.query({query:e=>({url:"/messaging/templates/".concat(e)}),providesTags:()=>["Property-Specific Messaging Templates"]}),getMessagingTemplateDefault:e.query({query:e=>({url:"/messaging/templates/default/".concat(e)})}),deleteMessagingTemplateById:e.mutation({query:e=>({url:"/messaging/templates/".concat(e),method:"DELETE"}),invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},42478:function(e,t,n){n.d(t,{FU:function(){return u},JE:function(){return r},Ki:function(){return d},SU:function(){return g},W:function(){return p},h9:function(){return s},jc:function(){return i},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:i,useGetActiveMessagingProviderQuery:r,useCreateMessagingConfigurationMutation:s,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:p}=n(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,n,i)=>{let r=await i({url:"messaging/default/active"});return r.error&&404===r.error.status?{data:null}:r},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},31883:function(e,t,n){n.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=n(19043)},11055:function(e,t,n){n.d(t,{M:function(){return d}});var i=n(24246),r=n(29427),s=n(27378),a=n(40976),o=n(18397),l=n(42308),u=n(25431),c=n(39556);let d=(0,s.forwardRef)(function({children:e,as:t="ul",axis:n="y",onReorder:d,values:m,...f},y){let x=(0,l.h)(()=>o.E[t]),v=[],h=(0,s.useRef)(!1);return(0,r.k)(!!m,"Reorder.Group must be provided a values prop"),(0,s.useEffect)(()=>{h.current=!1}),(0,i.jsx)(x,{...f,ref:y,ignoreStrict:!0,children:(0,i.jsx)(a.Y.Provider,{value:{axis:n,registerItem:(e,t)=>{let i=v.findIndex(t=>e===t.value);-1!==i?v[i].layout=t[n]:v.push({value:e,layout:t[n]}),v.sort(p)},updateOrder:(e,t,n)=>{if(h.current)return;let i=function(e,t,n,i){if(!i)return e;let r=e.findIndex(e=>e.value===t);if(-1===r)return e;let s=i>0?1:-1,a=e[r+s];if(!a)return e;let o=e[r],l=a.layout,d=(0,c.t)(l.min,l.max,.5);return 1===s&&o.layout.max+n>d||-1===s&&o.layout.min+n<d?(0,u.uo)(e,r,r+s):e}(v,e,t,n);v!==i&&(h.current=!0,d(i.map(g).filter(e=>-1!==m.indexOf(e))))}},children:e})})});function g(e){return e.value}function p(e,t){return e.layout.min-t.layout.min}},7078:function(e,t,n){n.d(t,{e:function(){return C}});var i=n(24246),r=n(29427),s=n(27378),a=n(40976),o=n(18397),l=n(42308),u=n(69222),c=n(67412);function d(e){let t=(0,l.h)(()=>(0,u.BX)(e)),{isStatic:n}=(0,s.useContext)(c._);if(n){let[,n]=(0,s.useState)(e);(0,s.useEffect)(()=>t.on("change",n),[])}return t}var g=n(13998);let p=e=>e&&"object"==typeof e&&e.mix,m=e=>p(e)?e.mix:void 0;var f=n(64306),y=n(95984);function x(e,t){let n=d(t()),i=()=>n.set(t());return i(),(0,f.L)(()=>{let t=()=>y.Wi.preRender(i,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,y.Pn)(i)}}),n}function v(e,t){let n=(0,l.h)(()=>[]);return x(e,()=>{n.length=0;let i=e.length;for(let t=0;t<i;t++)n[t]=e[t].get();return t(n)})}var h=n(3522);function b(e,t=0){return(0,h.i)(e)?e:d(t)}let C=(0,s.forwardRef)(function({children:e,style:t={},value:n,as:c="li",onDrag:d,layout:p=!0,...f},y){let h=(0,l.h)(()=>o.E[c]),C=(0,s.useContext)(a.Y),j={x:b(t.x),y:b(t.y)},T=function(e,t,n,i){if("function"==typeof e)return function(e){u.S1.current=[],e();let t=x(u.S1.current,e);return u.S1.current=void 0,t}(e);let r="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,i=e[0+n],r=e[1+n],s=e[2+n],a=e[3+n],o=(0,g.s)(r,s,{mixer:m(s[0]),...a});return t?o(i):o}(t,void 0,void 0);return Array.isArray(e)?v(e,r):v([e],([e])=>r(e))}([j.x,j.y],([e,t])=>e||t?1:"unset");(0,r.k)(!!C,"Reorder.Item must be a child of Reorder.Group");let{axis:E,registerItem:w,updateOrder:_}=C;return(0,i.jsx)(h,{drag:E,...f,dragSnapToOrigin:!0,style:{...t,x:j.x,y:j.y,zIndex:T},layout:p,onDrag:(e,t)=>{let{velocity:i}=t;i[E]&&_(n,j[E].get(),i[E]),d&&d(e,t)},onLayoutMeasure:e=>w(n,e),ref:y,ignoreStrict:!0,children:e})})},40976:function(e,t,n){n.d(t,{Y:function(){return i}});let i=(0,n(27378).createContext)(null)},47397:function(e,t,n){n.d(t,{o:function(){return a}});var i=n(42308);class r{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}}let s=()=>new r;function a(){return(0,i.h)(s)}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7725],{74833:function(e,t,s){var r=s(56127),n=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(n,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var s=e.length;s--&&t.test(e.charAt(s)););return s}},91936:function(e,t,s){var r=s(74833),n=s(11611),o=s(55193),i=0/0,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var s=u.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):a.test(e)?i:+e}},58754:function(e,t,s){"use strict";var r=s(24246),n=s(96306),o=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:i=!0,children:a,rightContent:u,style:l,...c}=e;return(0,r.jsxs)("div",{...c,style:i?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(n.lQT,{className:s||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,u&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:u})]}),!!s&&(0,r.jsx)(o.m,{className:a?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),a]})}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return l}});var r=s(24246),n=s(96306),o=s(79894),i=s.n(o),a=s(27378);let{Text:u}=n.AntTypography,l=e=>{let{items:t,...s}=e,o=(0,a.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let o=s===t.length-1,a={...e},l=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,r.jsx)(u,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,id:o?"breadcrumb-current-page":void 0,children:a.title})),l)?a.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,r.jsx)(i(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,r.jsx)(n.zrq,{items:o,...s})}},54762:function(e,t,s){"use strict";s.d(t,{l:function(){return a}});var r=s(24246),n=s(96306),o=s(62165),i=s(21910);let a=e=>{let{consentStatus:t}=e,{flags:s}=(0,o.hz)(),{assetConsentStatusLabels:a}=s;return a&&(null==t?void 0:t.status)===i.pF.ALERT?(0,r.jsx)(n.esZ,{title:null==t?void 0:t.message,"data-testid":"discovery-status-icon-alert-tooltip",children:(0,r.jsx)("div",{className:"mb-px","data-testid":"discovery-status-icon-alert",children:(0,r.jsx)(n.PJP.OdJ,{style:{color:"var(--fidesui-error)"}})})}):null}},37059:function(e,t,s){"use strict";s.d(t,{Ak:function(){return v},EY:function(){return m},Tj:function(){return g},Ud:function(){return a},Vr:function(){return f},WJ:function(){return l},mi:function(){return T},nP:function(){return d},nS:function(){return p},rs:function(){return c},sX:function(){return y},ut:function(){return h},wi:function(){return u}});var r=s(78780),n=s(16394),o=s(21910),i=s(98145);let{useGetAggregateMonitorResultsQuery:a,useGetDiscoveredSystemAggregateQuery:u,useGetDiscoveredAssetsQuery:l,useAddMonitorResultSystemsMutation:c,useIgnoreMonitorResultSystemsMutation:d,useAddMonitorResultAssetsMutation:m,useIgnoreMonitorResultAssetsMutation:p,useRestoreMonitorResultAssetsMutation:g,useUpdateAssetsSystemMutation:y,useUpdateAssetsDataUseMutation:v,useUpdateAssetsMutation:f,useGetConsentBreakdownQuery:T,useGetWebsiteMonitorResourceFiltersQuery:h}=r.u.injectEndpoints({endpoints:e=>({getAggregateMonitorResults:e.query({query:e=>{let{page:t=1,size:s=20,search:r}=e;return{url:"/plus/discovery-monitor/aggregate-results",params:{page:t,size:s,search:r,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredSystemAggregate:e.query({query:e=>{let{key:t,page:s=1,size:r=20,search:n,diff_status:o}=e;return{url:"/plus/discovery-monitor/system-aggregate-results",params:{monitor_config_id:t,page:s,size:r,search:n,diff_status:o}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredAssets:e.query({query:e=>{let{key:t,system:s,page:r=1,size:a=20,search:u,diff_status:l=[o.LL.ADDITION],sort_by:c=[i.r6.CONSENT_AGGREGATED,"urn"],sort_asc:d=!0,resource_type:m,data_uses:p,locations:g,consent_aggregated:y}=e,v=Array.isArray(c)?c:[c],f=(0,n.$J)({sort_by:v,resource_type:m,data_uses:p,locations:g,consent_aggregated:y});return{url:"/plus/discovery-monitor/".concat(t,"/results?").concat(f.toString()),params:{resolved_system_id:s,page:r,size:a,search:u,diff_status:l,sort_asc:d}}},providesTags:()=>["Discovery Monitor Results"]}),addMonitorResultSystems:e.mutation({query:e=>{let{monitor_config_key:t,resolved_system_ids:s}=e,r=(0,n.du)(s,"resolved_system_ids");return{url:"/plus/discovery-monitor/".concat(t,"/promote"),method:"POST",params:r?new URLSearchParams(r):new URLSearchParams}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultSystems:e.mutation({query:e=>{let{monitor_config_key:t,resolved_system_ids:s}=e,r=(0,n.du)(s,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(t,"/mute?").concat(r)}},invalidatesTags:["Discovery Monitor Results"]}),addMonitorResultAssets:e.mutation({query:e=>{var t;let s=new URLSearchParams;return null===(t=e.urnList)||void 0===t||t.forEach(e=>s.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/promote?".concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultAssets:e.mutation({query:e=>{var t;let s=new URLSearchParams;return null===(t=e.urnList)||void 0===t||t.forEach(e=>s.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/mute?".concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),restoreMonitorResultAssets:e.mutation({query:e=>{var t;let s=new URLSearchParams({status_to_set:o.LL.ADDITION});return null===(t=e.urnList)||void 0===t||t.forEach(e=>s.append("staged_resource_urns",e)),{method:"POST",url:"/plus/discovery-monitor/un-mute?".concat(s)}},invalidatesTags:["Discovery Monitor Results"]}),updateAssetsSystem:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.urnList.map(t=>({urn:t,user_assigned_system_key:e.systemKey}))}),invalidatesTags:["Discovery Monitor Results","System Assets"]}),updateAssetsDataUse:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.urnList.map(t=>({urn:t,user_assigned_data_uses:e.dataUses}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssets:e.mutation({query:e=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(e.monitorId,"/results"),body:e.assets}),invalidatesTags:["Discovery Monitor Results"]}),getConsentBreakdown:e.query({query:e=>{let{stagedResourceUrn:t,status:s,page:r=1,size:n=20}=e;return{url:"/plus/discovery-monitor/staged_resource/".concat(encodeURIComponent(t),"/consent"),params:{status:s,page:r,size:n}}}}),getWebsiteMonitorResourceFilters:e.query({query:e=>{let{monitor_config_id:t,resolved_system_id:s,diff_status:r=[o.LL.ADDITION],search:i,resource_type:a,data_uses:u,locations:l,consent_aggregated:c}=e,d={monitor_config_id:t,resolved_system_id:s,diff_status:r};i&&(d.search=i);let m=(0,n.$J)({resource_type:a,data_uses:u,locations:l,consent_aggregated:c}).toString();return{url:m?"/plus/filters/website_monitor_resources?".concat(m):"/plus/filters/website_monitor_resources",params:d}},providesTags:["Discovery Monitor Results"]})})})},98145:function(e,t,s){"use strict";s.d(t,{EI:function(){return u},LM:function(){return m},Vq:function(){return d},X1:function(){return c},r6:function(){return i},vQ:function(){return a}});var r,n,o,i,a,u,l=s(21910);let c={[l.lg.WITH_CONSENT]:"Consent respected",[l.lg.WITHOUT_CONSENT]:"Consent ignored",[l.lg.EXEMPT]:"Exempt",[l.lg.UNKNOWN]:"Unknown",[l.lg.PRE_CONSENT]:"Pre-Consent",[l.lg.CMP_ERROR]:"CMP failure",[l.lg.NOT_APPLICABLE]:"Not applicable"},d={[l.lg.WITH_CONSENT]:"Asset was detected after the user gave consent",[l.lg.WITHOUT_CONSENT]:"The user explicitly opted out, but this asset still loaded. This is a serious compliance issue and may indicate that consent settings are not being enforced.",[l.lg.EXEMPT]:"Asset is valid regardless of consent",[l.lg.UNKNOWN]:"Did not find consent information for this asset. You may need to re-run the monitor.",[l.lg.PRE_CONSENT]:"Assets loaded before the user had a chance to give consent. This violates opt-in compliance requirements if your CMP is configured for explicit consent.",[l.lg.CMP_ERROR]:"The Consent Management Platform (CMP) was not detected when the service ran. It likely failed to load or wasn't available.",[l.lg.NOT_APPLICABLE]:"No privacy notices apply to this asset"},m=[l.lg.WITHOUT_CONSENT,l.lg.PRE_CONSENT,l.lg.CMP_ERROR];(r=i||(i={})).NAME="name",r.RESOURCE_TYPE="resource_type",r.SYSTEM="system",r.DATA_USES="data_uses",r.LOCATIONS="locations",r.DOMAIN="domain",r.PAGE="page",r.CONSENT_AGGREGATED="consent_aggregated",r.ACTIONS="actions",(n=a||(a={})).SYSTEM_NAME="system_name",n.TOTAL_UPDATES="total_updates",n.DATA_USE="data_use",n.LOCATIONS="locations",n.DOMAINS="domains",n.ACTIONS="actions",(o=u||(u={})).LOCATION="location",o.PAGE="page"}}]);