ethyca-fides 2.59.1rc0__py2.py3-none-any.whl → 2.59.2b1__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.
Files changed (230) hide show
  1. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/METADATA +2 -2
  2. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/RECORD +202 -198
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/c9c72b3d550b_data_migration_cookie_asset.py +218 -0
  5. fides/api/api/v1/endpoints/storage_endpoints.py +5 -4
  6. fides/api/db/system.py +1 -121
  7. fides/api/models/asset.py +1 -2
  8. fides/api/models/fides_user.py +1 -0
  9. fides/api/models/privacy_notice.py +14 -19
  10. fides/api/models/sql_models.py +0 -51
  11. fides/api/schemas/application_config.py +1 -0
  12. fides/api/schemas/connection_configuration/connection_secrets_datahub.py +3 -3
  13. fides/api/schemas/connection_configuration/connection_secrets_postgres.py +7 -7
  14. fides/api/schemas/messaging/messaging.py +9 -2
  15. fides/api/schemas/storage/storage.py +35 -1
  16. fides/api/schemas/storage/storage_secrets_docs_only.py +8 -2
  17. fides/api/schemas/system.py +1 -2
  18. fides/api/service/connectors/postgres_connector.py +1 -0
  19. fides/api/service/storage/gcs.py +38 -0
  20. fides/api/service/storage/storage_authenticator_service.py +28 -0
  21. fides/api/service/storage/storage_uploader_service.py +25 -1
  22. fides/api/tasks/storage.py +45 -1
  23. fides/api/util/storage_util.py +2 -0
  24. fides/service/messaging/aws_ses_service.py +25 -16
  25. fides/ui-build/static/admin/404.html +1 -1
  26. fides/ui-build/static/admin/_next/static/4ZsbAUsCLedx18AUPZCUU/_buildManifest.js +1 -0
  27. fides/ui-build/static/admin/_next/static/chunks/146-106021bf1ae6e912.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/{1817-6abbe957a53026d7.js → 1817-11bb237f57d9ad27.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/{1904-281183a117e26585.js → 1904-3c40738cb0fd2a7c.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/{2479-b4f7a1c7c711cb65.js → 2479-50f431c0e2c0de3c.js} +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/3244-4b76482dcc5d576f.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/{3702-3d814671c31eaca3.js → 3702-31d37a0217f82615.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/{3855-237afbbea7f54707.js → 3855-da54ef27afd56c46.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/{3872-c53d74aebd12cfd3.js → 3872-68b4ceba8f632bc0.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/401-49cdd118a89cc343.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/4060-bad5f07013c7bb49.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/{4121-476f657b03a78965.js → 4121-4914fb77e60d31f4.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/4481-7a992683e9191bc9.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/{5480-1623dbacdf4e6794.js → 5480-d177a83facd21738.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/{5487-9a2aecb0ec63d567.js → 5487-22de631f1d186527.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/5973-1020589bef6dd253.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/6277-c46c9eb59177b850.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/{6372-2aee10b79089521a.js → 6372-0ca1b9521b5489fd.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/6853-7d7eb22f19d3806c.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{6954-127745bfdc5bc0b3.js → 6954-981a8a444780bedb.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{7751-3913b8c055f599e5.js → 7751-09c6424d673d8aa4.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{79-77cfed02164241ca.js → 79-7ca48fb1a0b52f96.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/9572-8f5947db1a6da260.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/9767-162b0f8524990149.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/{9951-66aad0602aadfbe2.js → 9951-8ceba69296972ce9.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-13a604eb8d39dffc.js → _app-fc9e922ec354be47.js} +46 -46
  52. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a8c51c7bdbb405e2.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-78de4bde88e18b0f.js → [id]-7122d8a8c20e7cd2.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-c02b14c50b19bd91.js → new-300fd2800c417d0b.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-85ddbe3ae50c7527.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-75c2ed6ba3de48cd.js → [id]-5a9269aa00a16596.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-487ae57dc7e2ded2.js → new-78808c75ba86c0be.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-65091908d6296afc.js → privacy-notices-047c409bc5e12d1a.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-01d1371e690ae190.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-d08a38d4f198691a.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-6b3d1fe762c747d8.js → [systemId]-cc5431e4fbd6d39e.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-61eafb8444bffb76.js → [monitorId]-f073ddcfb916988e.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-e7869f658e3017b9.js → activity-73025c2ac5a00347.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-5aff1d01c6c30ad6.js → new-f3a6dd67f012b005.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-f4d57b3432c57112.js → dataset-3b703775de1ca75e.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-b2b1168d0361baa8.js → [id]-b905c75f68786c2f.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-c804349a417a888b.js → new-abd92bec98bdbb66.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-0faa9b3c4555e585.js → datastore-connection-52c3f076edb49944.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/{index-e72904e316ede1b0.js → index-1bccf315f995267a.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-afcf73fd0337dde0.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-2ce76b506ba8404a.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-54ea39f203182c53.js → [id]-2fc14bda8d314449.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-3219ddeb37d46398.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-8e17802ab6b2d3fd.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-9d71495b42f34038.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-a36cf070c98a6cbd.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-7986cf3b36456353.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-f6d6e3d9d556387c.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-e6c477f2ac098e0b.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-255655d6c367faad.js +1 -0
  81. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-c01d24583e9485f0.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-0b47ff26897c1d9a.js → test-datasets-d5f777510ab8dfd2.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-820893393f1516ee.js → systems-e9a111ef0c32161e.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-517419b35435604a.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-d527d1d1635541df.js → [id]-32ec340d4b390d07.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-facb8c0128a44cb1.js → user-management-c8ca51efbeccf39b.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/webpack-01277b766c8eb076.js +1 -0
  88. fides/ui-build/static/admin/_next/static/css/72caf4a266697967.css +1 -0
  89. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  90. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  91. fides/ui-build/static/admin/add-systems.html +1 -1
  92. fides/ui-build/static/admin/ant-poc.html +1 -1
  93. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  94. fides/ui-build/static/admin/consent/configure.html +1 -1
  95. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  96. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  97. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  98. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  99. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  100. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  101. fides/ui-build/static/admin/consent/properties.html +1 -1
  102. fides/ui-build/static/admin/consent/reporting.html +1 -1
  103. fides/ui-build/static/admin/consent.html +1 -1
  104. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  105. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  106. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  107. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  108. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  109. fides/ui-build/static/admin/data-catalog.html +1 -1
  110. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  111. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  112. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  113. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  114. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  115. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  116. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  117. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  118. fides/ui-build/static/admin/datamap.html +1 -1
  119. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  120. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  121. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  122. fides/ui-build/static/admin/dataset/new.html +1 -1
  123. fides/ui-build/static/admin/dataset.html +1 -1
  124. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  125. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  126. fides/ui-build/static/admin/datastore-connection.html +1 -1
  127. fides/ui-build/static/admin/index.html +1 -1
  128. fides/ui-build/static/admin/integrations/[id].html +1 -1
  129. fides/ui-build/static/admin/integrations.html +1 -1
  130. fides/ui-build/static/admin/login/[provider].html +1 -1
  131. fides/ui-build/static/admin/login.html +1 -1
  132. fides/ui-build/static/admin/messaging/[id].html +1 -1
  133. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  134. fides/ui-build/static/admin/messaging.html +1 -1
  135. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  136. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  137. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  138. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  139. fides/ui-build/static/admin/privacy-requests.html +1 -1
  140. fides/ui-build/static/admin/properties/[id].html +1 -1
  141. fides/ui-build/static/admin/properties/add-property.html +1 -1
  142. fides/ui-build/static/admin/properties.html +1 -1
  143. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  144. fides/ui-build/static/admin/settings/about.html +1 -1
  145. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -0
  146. fides/ui-build/static/admin/settings/consent.html +1 -1
  147. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  148. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  149. fides/ui-build/static/admin/settings/domains.html +1 -1
  150. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  151. fides/ui-build/static/admin/settings/locations.html +1 -1
  152. fides/ui-build/static/admin/settings/organization.html +1 -1
  153. fides/ui-build/static/admin/settings/regulations.html +1 -1
  154. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  155. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  156. fides/ui-build/static/admin/systems.html +1 -1
  157. fides/ui-build/static/admin/taxonomy.html +1 -1
  158. fides/ui-build/static/admin/user-management/new.html +1 -1
  159. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  160. fides/ui-build/static/admin/user-management.html +1 -1
  161. fides/ui-build/static/admin/_next/static/chunks/1376-92890c17ce39ca0d.js +0 -1
  162. fides/ui-build/static/admin/_next/static/chunks/146-d1820217dc36d46d.js +0 -1
  163. fides/ui-build/static/admin/_next/static/chunks/3244-3d94bf3393366412.js +0 -1
  164. fides/ui-build/static/admin/_next/static/chunks/401-50974f107c2712fc.js +0 -1
  165. fides/ui-build/static/admin/_next/static/chunks/4060-52fd85fb1e15a2b8.js +0 -1
  166. fides/ui-build/static/admin/_next/static/chunks/4481-288d74a33473cff7.js +0 -1
  167. fides/ui-build/static/admin/_next/static/chunks/5973-2db5181149073311.js +0 -1
  168. fides/ui-build/static/admin/_next/static/chunks/6853-ca5dacd25c9ccb7c.js +0 -1
  169. fides/ui-build/static/admin/_next/static/chunks/9572-2b9b10e146130c85.js +0 -1
  170. fides/ui-build/static/admin/_next/static/chunks/9767-bf415d0daea960cd.js +0 -1
  171. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a6926f7ec7ad10cf.js +0 -1
  172. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-7eeeee3769e73f78.js +0 -1
  173. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-7a1976c0d1aca8b6.js +0 -1
  174. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-75989f9732d90793.js +0 -1
  175. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-59d30d48fcae067c.js +0 -1
  176. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-373fb3a596099fc9.js +0 -1
  177. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-d889076067104e56.js +0 -1
  178. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-3355b4803b2916f3.js +0 -1
  179. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-3ac47981f1e2b0aa.js +0 -1
  180. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-fe743440d7eb007b.js +0 -1
  181. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-cdc866af93898716.js +0 -1
  182. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-a7dc8113067dff42.js +0 -1
  183. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2f03e981234c40ad.js +0 -1
  184. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-5bcc7a6976e01a56.js +0 -1
  185. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-8fccd670220dbf60.js +0 -1
  186. fides/ui-build/static/admin/_next/static/chunks/webpack-03e375f6d6b2c71b.js +0 -1
  187. fides/ui-build/static/admin/_next/static/css/687135955af5b7e1.css +0 -1
  188. fides/ui-build/static/admin/_next/static/rE0VXR2bXlzSJjVNbhHjr/_buildManifest.js +0 -1
  189. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/WHEEL +0 -0
  190. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/entry_points.txt +0 -0
  191. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/licenses/LICENSE +0 -0
  192. {ethyca_fides-2.59.1rc0.dist-info → ethyca_fides-2.59.2b1.dist-info}/top_level.txt +0 -0
  193. /fides/ui-build/static/admin/_next/static/{rE0VXR2bXlzSJjVNbhHjr → 4ZsbAUsCLedx18AUPZCUU}/_ssgManifest.js +0 -0
  194. /fides/ui-build/static/admin/_next/static/chunks/{1100-45c0634b4f51d10c.js → 1100-22c375e757f23150.js} +0 -0
  195. /fides/ui-build/static/admin/_next/static/chunks/{3086-d1ba90bc6ac9174b.js → 3086-ffd15c92ea81b3d6.js} +0 -0
  196. /fides/ui-build/static/admin/_next/static/chunks/{5102-626b9ff42e904276.js → 5102-3acf312a8f0d7720.js} +0 -0
  197. /fides/ui-build/static/admin/_next/static/chunks/{5826-1f4f74bf3b5348e4.js → 5826-226c8843e715b6ad.js} +0 -0
  198. /fides/ui-build/static/admin/_next/static/chunks/{6395-4224d6d26d1e8bb7.js → 6395-04041b53946664b1.js} +0 -0
  199. /fides/ui-build/static/admin/_next/static/chunks/{8433-c4c765833ab9cc07.js → 8433-dd6d8dae02275d66.js} +0 -0
  200. /fides/ui-build/static/admin/_next/static/chunks/{8934-ffa2b0509bc7a845.js → 8934-6881185f0c5c0f6d.js} +0 -0
  201. /fides/ui-build/static/admin/_next/static/chunks/{9282-1a48b10b114d01f4.js → 9282-23b38e03f897722f.js} +0 -0
  202. /fides/ui-build/static/admin/_next/static/chunks/{9327-4970d356f7000c0b.js → 9327-fb7ef941b5176077.js} +0 -0
  203. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-29560aa2e6a60963.js → 404-a3c57a06ff67cf1f.js} +0 -0
  204. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-58e9256e86916ecd.js → manual-c4c0c42bbe0f5548.js} +0 -0
  205. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-2392e3a101fae073.js → multiple-93907c53f342831f.js} +0 -0
  206. /fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-404f3c9018952800.js → ant-poc-8fcf312148606e7e.js} +0 -0
  207. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-7dfe37b9f0ff9a3c.js → add-vendors-5e83ee7792c0f75f.js} +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-dba7848b760ba227.js → configure-ea7b2c628260c84c.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-f67fda6a71d0a46b.js → properties-893753088b9729a3.js} +0 -0
  210. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-75395dfc224cf44b.js → consent-7e5adfec9134a268.js} +0 -0
  211. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-fa65c67ec8c4b5e6.js → [projectUrn]-4b2c10ff79e46e50.js} +0 -0
  212. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-e76a07ee6ee8d55f.js → projects-05bbb01e37766b80.js} +0 -0
  213. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-38476c697da53480.js → action-center-cf48ed7dc04c3af2.js} +0 -0
  214. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-423172d31de8e9c6.js → datamap-6c63a6295668ed4e.js} +0 -0
  215. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-704553f5329fb9d4.js → [...subfieldNames]-7a99a6c5c2fc2abe.js} +0 -0
  216. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-06c19dca941edb14.js → [collectionName]-39aab1de4df0660d.js} +0 -0
  217. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-eac517f43d5f53a8.js → [datasetId]-2cf04998a7521a7d.js} +0 -0
  218. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-66f5fbadd8455805.js → [id]-8950b4aff799099c.js} +0 -0
  219. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-d441abb1f045940f.js → add-template-4cad85d5b6d52734.js} +0 -0
  220. /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-eef56c95b08aa24c.js → messaging-57c7aa44af163623.js} +0 -0
  221. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-b8c94b10ab90b061.js → configure-d8d23d06ce1d9dae.js} +0 -0
  222. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-f4fb941df069b7bf.js → [id]-6cca2c8ebbff78aa.js} +0 -0
  223. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-bccb6ffab25aa214.js → add-property-f09f98007725fa51.js} +0 -0
  224. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9a7ac623370b7c00.js → properties-9034bab3d7200d9b.js} +0 -0
  225. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-4412a7b468b6d4bf.js → about-92dada8329e89092.js} +0 -0
  226. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-d9088f5cd9fb2822.js → domain-records-368a4183139ea5e0.js} +0 -0
  227. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-cf09ad896c7396a6.js → email-templates-e4498b6310074705.js} +0 -0
  228. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-759564ca0ae62840.js → locations-18f56b6b76abb71d.js} +0 -0
  229. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-2dce4501fca920b3.js → regulations-0350314337abff11.js} +0 -0
  230. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-dd053a3bf2a9ca6c.js → [id]-022910a52efbad76.js} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[146],{95372:function(a){a.exports=function(a,_,n,F){for(var i=a.length,e=n+(F?1:-1);F?e--:++e<i;)if(_(a[e],e,a))return e;return -1}},56632:function(a,_,n){var F=n(89278),i=n(80068),e=n(50098);a.exports=function(a){return function(_,n,r){var t=Object(_);if(!i(_)){var o=F(n,3);_=e(_),n=function(a){return o(t[a],a,t)}}var s=a(_,n,r);return s>-1?t[o?_[s]:s]:void 0}}},64925:function(a,_,n){var F=n(56632)(n(66259));a.exports=F},66259:function(a,_,n){var F=n(95372),i=n(89278),e=n(47991),r=Math.max;a.exports=function(a,_,n){var t=null==a?0:a.length;if(!t)return -1;var o=null==n?0:e(n);return o<0&&(o=r(t+o,0)),F(a,i(_,3),o)}},94919:function(a,_,n){var F=n(91936),i=1/0;a.exports=function(a){return a?(a=F(a))===i||a===-i?(a<0?-1:1)*17976931348623157e292:a==a?a:0:0===a?a:0}},47991:function(a,_,n){var F=n(94919);a.exports=function(a){var _=F(a),n=_%1;return _==_?n?_-n:_:0}},34929:function(a,_,n){"use strict";var F=n(24246),i=n(64925),e=n.n(i),r=n(27378),t=n(16134),o=n(30002),s=n(28079),u=n(57072);let l=()=>{let{isLoading:a}=(0,s.fd)(),_=(0,t.C)(s.U3),{isLoading:n}=(0,u.MO)(),F=(0,t.C)(u.qb),{isLoading:i}=(0,o.te)();return{dataUses:_,dataSubjects:(0,t.C)(o.ZL),dataCategories:F,isLoading:a||n||i}};_.Z=()=>{let{dataUses:a,dataCategories:_,dataSubjects:n,isLoading:i}=l(),t=function(a){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return a.split(".").slice(0,_).join(".")},o=function(a,_){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,F=_(a);if(!F)return{};let i=_(t(a,n)),e=!!F.parent_key;return{name:F.name||void 0,primaryName:e&&(null==i?void 0:i.name)!==F.name&&(null==i?void 0:i.name)||void 0}},s=function(a,_){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:i,primaryName:e}=o(a,_,n);return i?e?(0,F.jsxs)(r.Fragment,{children:[(0,F.jsxs)("strong",{children:[e,":"]})," ",i]},a):(0,F.jsx)("strong",{children:i},a):a},u=_=>e()(a,{fides_key:_}),S=a=>e()(_,{fides_key:a}),d=a=>e()(n,{fides_key:a});return{getDataUses:()=>a,getDataUseByKey:u,getDataUseDisplayName:a=>s(a,u,1),getDataUseDisplayNameProps:a=>o(a,u,1),getDataCategories:()=>_,getDataCategoryByKey:S,getDataCategoryDisplayName:a=>s(a,S,2),getDataCategoryDisplayNameProps:a=>o(a,S,2),getDataSubjects:()=>n,getDataSubjectByKey:d,getDataSubjectDisplayName:a=>{let _=d(a);return _?_.name:a},getPrimaryKey:t,isLoading:i}}},8411:function(a,_,n){"use strict";n.d(_,{NA:function(){return e},Z8:function(){return i}});var F=n(62656);let i={[F._F.ER]:"Eritrea",[F._F.DJ]:"Djibouti",[F._F.MR]:"Mauritania",[F._F.NA]:"Namibia",[F._F.GH]:"Ghana",[F._F.SS]:"South Sudan",[F._F.SC]:"Seychelles",[F._F.IO]:"British Indian Ocean Territory",[F._F.GQ]:"Equatorial Guinea",[F._F.AO]:"Angola",[F._F.CG]:"Republic of the Congo",[F._F.BW]:"Botswana",[F._F.BI]:"Burundi",[F._F.DZ]:"Algeria",[F._F.TD]:"Chad",[F._F.NG]:"Nigeria",[F._F.TZ]:"Tanzania",[F._F.EH]:"Western Sahara",[F._F.SN]:"Senegal",[F._F.LR]:"Liberia",[F._F.ZA]:"South Africa",[F._F.CV]:"Cape Verde",[F._F.GM]:"Gambia",[F._F.SD]:"Sudan",[F._F.KM]:"Comoros",[F._F.SZ]:"Eswatini",[F._F.UG]:"Uganda",[F._F.MG]:"Madagascar",[F._F.RW]:"Rwanda",[F._F.CD]:"DR Congo",[F._F.CM]:"Cameroon",[F._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[F._F.TG]:"Togo",[F._F.MU]:"Mauritius",[F._F.NE]:"Niger",[F._F.BJ]:"Benin",[F._F.EG]:"Egypt",[F._F.LS]:"Lesotho",[F._F.ET]:"Ethiopia",[F._F.MA]:"Morocco",[F._F.YT]:"Mayotte",[F._F.BF]:"Burkina Faso",[F._F.RE]:"R\xe9union",[F._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[F._F.CF]:"Central African Republic",[F._F.MZ]:"Mozambique",[F._F.MW]:"Malawi",[F._F.ML]:"Mali",[F._F.ZM]:"Zambia",[F._F.LY]:"Libya",[F._F.GW]:"Guinea-Bissau",[F._F.SO]:"Somalia",[F._F.KE]:"Kenya",[F._F.GN]:"Guinea",[F._F.ZW]:"Zimbabwe",[F._F.TN]:"Tunisia",[F._F.SL]:"Sierra Leone",[F._F.GA]:"Gabon",[F._F.CI]:"Ivory Coast",[F._F.JO]:"Jordan",[F._F.PK]:"Pakistan",[F._F.KP]:"North Korea",[F._F.MO]:"Macau",[F._F.AM]:"Armenia",[F._F.SY]:"Syria",[F._F.TJ]:"Tajikistan",[F._F.SA]:"Saudi Arabia",[F._F.KR]:"South Korea",[F._F.NP]:"Nepal",[F._F.PH]:"Philippines",[F._F.IQ]:"Iraq",[F._F.LB]:"Lebanon",[F._F.MN]:"Mongolia",[F._F.PS]:"Palestine",[F._F.YE]:"Yemen",[F._F.JP]:"Japan",[F._F.KZ]:"Kazakhstan",[F._F.LK]:"Sri Lanka",[F._F.MM]:"Myanmar",[F._F.KG]:"Kyrgyzstan",[F._F.CN]:"China",[F._F.AF]:"Afghanistan",[F._F.OM]:"Oman",[F._F.IN]:"India",[F._F.LA]:"Laos",[F._F.UZ]:"Uzbekistan",[F._F.MV]:"Maldives",[F._F.ID]:"Indonesia",[F._F.VN]:"Vietnam",[F._F.MY]:"Malaysia",[F._F.TW]:"Taiwan",[F._F.KH]:"Cambodia",[F._F.AE]:"United Arab Emirates",[F._F.HK]:"Hong Kong",[F._F.GE]:"Georgia",[F._F.BD]:"Bangladesh",[F._F.KW]:"Kuwait",[F._F.TM]:"Turkmenistan",[F._F.QA]:"Qatar",[F._F.BH]:"Bahrain",[F._F.BN]:"Brunei",[F._F.TH]:"Thailand",[F._F.BT]:"Bhutan",[F._F.SG]:"Singapore",[F._F.IL]:"Israel",[F._F.AZ]:"Azerbaijan",[F._F.TL]:"Timor-Leste",[F._F.IR]:"Iran",[F._F.TR]:"Turkey",[F._F.MK]:"North Macedonia",[F._F.IE]:"Ireland",[F._F.DK]:"Denmark",[F._F.SK]:"Slovakia",[F._F.MD]:"Moldova",[F._F.AX]:"\xc5land Islands",[F._F.PL]:"Poland",[F._F.BA]:"Bosnia and Herzegovina",[F._F.SM]:"San Marino",[F._F.CZ]:"Czechia",[F._F.EE]:"Estonia",[F._F.XK]:"Kosovo",[F._F.FO]:"Faroe Islands",[F._F.SJ]:"Svalbard and Jan Mayen",[F._F.GG]:"Guernsey",[F._F.FR]:"France",[F._F.NL]:"Netherlands",[F._F.FI]:"Finland",[F._F.PT]:"Portugal",[F._F.DE]:"Germany",[F._F.MT]:"Malta",[F._F.JE]:"Jersey",[F._F.IS]:"Iceland",[F._F.ES]:"Spain",[F._F.GI]:"Gibraltar",[F._F.NO]:"Norway",[F._F.CY]:"Cyprus",[F._F.RS]:"Serbia",[F._F.LT]:"Lithuania",[F._F.MC]:"Monaco",[F._F.LU]:"Luxembourg",[F._F.UA]:"Ukraine",[F._F.IM]:"Isle of Man",[F._F.RO]:"Romania",[F._F.BE]:"Belgium",[F._F.SE]:"Sweden",[F._F.ME]:"Montenegro",[F._F.LV]:"Latvia",[F._F.VA]:"Vatican City",[F._F.AT]:"Austria",[F._F.AL]:"Albania",[F._F.LI]:"Liechtenstein",[F._F.GR]:"Greece",[F._F.IT]:"Italy",[F._F.AD]:"Andorra",[F._F.GB]:"United Kingdom",[F._F.RU]:"Russia",[F._F.SI]:"Slovenia",[F._F.BY]:"Belarus",[F._F.CH]:"Switzerland",[F._F.HU]:"Hungary",[F._F.BG]:"Bulgaria",[F._F.HR]:"Croatia",[F._F.TC]:"Turks and Caicos Islands",[F._F.CW]:"Cura\xe7ao",[F._F.GP]:"Guadeloupe",[F._F.UM]:"United States Minor Outlying Islands",[F._F.GT]:"Guatemala",[F._F.PM]:"Saint Pierre and Miquelon",[F._F.BQ]:"Caribbean Netherlands",[F._F.GL]:"Greenland",[F._F.SX]:"Sint Maarten",[F._F.PA]:"Panama",[F._F.AW]:"Aruba",[F._F.MQ]:"Martinique",[F._F.AG]:"Antigua and Barbuda",[F._F.BM]:"Bermuda",[F._F.CU]:"Cuba",[F._F.GD]:"Grenada",[F._F.NI]:"Nicaragua",[F._F.LC]:"Saint Lucia",[F._F.KN]:"Saint Kitts and Nevis",[F._F.DO]:"Dominican Republic",[F._F.VC]:"Saint Vincent and the Grenadines",[F._F.BZ]:"Belize",[F._F.HT]:"Haiti",[F._F.JM]:"Jamaica",[F._F.BS]:"Bahamas",[F._F.MX]:"Mexico",[F._F.MF]:"Saint Martin",[F._F.SV]:"El Salvador",[F._F.BL]:"Saint Barth\xe9lemy",[F._F.AI]:"Anguilla",[F._F.MS]:"Montserrat",[F._F.VG]:"British Virgin Islands",[F._F.BB]:"Barbados",[F._F.HN]:"Honduras",[F._F.KY]:"Cayman Islands",[F._F.DM]:"Dominica",[F._F.TT]:"Trinidad and Tobago",[F._F.CR]:"Costa Rica",[F._F.SR]:"Suriname",[F._F.CX]:"Christmas Island",[F._F.WS]:"Samoa",[F._F.PF]:"French Polynesia",[F._F.AS]:"American Samoa",[F._F.NC]:"New Caledonia",[F._F.TK]:"Tokelau",[F._F.PW]:"Palau",[F._F.KI]:"Kiribati",[F._F.VU]:"Vanuatu",[F._F.PN]:"Pitcairn Islands",[F._F.CK]:"Cook Islands",[F._F.FJ]:"Fiji",[F._F.PG]:"Papua New Guinea",[F._F.MP]:"Northern Mariana Islands",[F._F.NU]:"Niue",[F._F.TV]:"Tuvalu",[F._F.NF]:"Norfolk Island",[F._F.TO]:"Tonga",[F._F.FM]:"Micronesia",[F._F.SB]:"Solomon Islands",[F._F.NR]:"Nauru",[F._F.WF]:"Wallis and Futuna",[F._F.GU]:"Guam",[F._F.AU]:"Australia",[F._F.NZ]:"New Zealand",[F._F.MH]:"Marshall Islands",[F._F.CC]:"Cocos (Keeling) Islands",[F._F.VE]:"Venezuela",[F._F.PY]:"Paraguay",[F._F.BR]:"Brazil",[F._F.CO]:"Colombia",[F._F.PE]:"Peru",[F._F.CL]:"Chile",[F._F.UY]:"Uruguay",[F._F.AR]:"Argentina",[F._F.GY]:"Guyana",[F._F.BO]:"Bolivia",[F._F.GF]:"French Guiana",[F._F.EC]:"Ecuador",[F._F.FK]:"Falkland Islands",[F._F.US_AL]:"Alabama",[F._F.US_AK]:"Alaska",[F._F.US_AZ]:"Arizona",[F._F.US_AR]:"Arkansas",[F._F.US_CA]:"California",[F._F.US_CO]:"Colorado",[F._F.US_CT]:"Connecticut",[F._F.US_DE]:"Delaware",[F._F.US_DC]:"District of Columbia (DC)",[F._F.US_FL]:"Florida",[F._F.US_GA]:"Georgia",[F._F.US_HI]:"Hawaii",[F._F.US_ID]:"Idaho",[F._F.US_IL]:"Illinois",[F._F.US_IN]:"Indiana",[F._F.US_IA]:"Iowa",[F._F.US_KS]:"Kansas",[F._F.US_KY]:"Kentucky",[F._F.US_LA]:"Louisiana",[F._F.US_ME]:"Maine",[F._F.US_MD]:"Maryland",[F._F.US_MA]:"Massachusetts",[F._F.US_MI]:"Michigan",[F._F.US_MN]:"Minnesota",[F._F.US_MS]:"Mississippi",[F._F.US_MO]:"Missouri",[F._F.US_MT]:"Montana",[F._F.US_NE]:"Nebraska",[F._F.US_NV]:"Nevada",[F._F.US_NH]:"New Hampshire",[F._F.US_NJ]:"New Jersey",[F._F.US_NM]:"New Mexico",[F._F.US_NY]:"New York",[F._F.US_NC]:"North Carolina",[F._F.US_ND]:"North Dakota",[F._F.US_OH]:"Ohio",[F._F.US_OK]:"Oklahoma",[F._F.US_OR]:"Oregon",[F._F.US_PA]:"Pennsylvania",[F._F.US_PR]:"Puerto Rico",[F._F.US_RI]:"Rhode Island",[F._F.US_SC]:"South Carolina",[F._F.US_SD]:"San Diego",[F._F.US_TN]:"Tennessee",[F._F.US_TX]:"Texas",[F._F.US_UT]:"Utah",[F._F.US_VA]:"Virginia",[F._F.US_VI]:"United States Virgin Islands",[F._F.US_VT]:"Vermon",[F._F.US_WA]:"Washington",[F._F.US_WV]:"West Virginia",[F._F.US_WI]:"Wisconsin",[F._F.US_WY]:"Wyoming",[F._F.CA_AB]:"Alberta",[F._F.CA_BC]:"British Columbia",[F._F.CA_MB]:"Manitoba",[F._F.CA_NB]:"New Brunswick",[F._F.CA_NL]:"Newfoundland and Labrador",[F._F.CA_NS]:"Nova Scotia",[F._F.CA_ON]:"Ontario",[F._F.CA_PE]:"Prince Edward Island",[F._F.CA_QC]:"Quebec",[F._F.CA_SK]:"Saskatchewan",[F._F.CA_NT]:"Northwest Territories",[F._F.CA_NU]:"Nunavut",[F._F.CA_YT]:"Yukon",[F._F.CA]:"Canada",[F._F.US]:"United States",[F._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[F._F.CARIBBEAN]:"Caribbean",[F._F.EEA]:"European Economic Area (EEA)",[F._F.NON_EEA]:"Non European Economic Area"},e=new Map(Object.entries(i));Object.entries(i).map(a=>({value:a[0],label:a[1]}))},78238:function(a,_,n){"use strict";n.d(_,{g:function(){return F}});let F=["essential","functional.service.improve","personalize","analytics","marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"];_.Z=a=>F.includes(a)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3244],{77867:function(e,s,t){var a=t(24246),i=t(77181);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){var a=t(24246),i=t(77181);s.Z=e=>(0,a.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...e})},77213:function(e,s,t){t.d(s,{Z:function(){return p}});var a=t(24246),i=t(77181),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(77830),u=()=>{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(c.fz)},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."," "]})]})})},p=e=>{let{children:s,title:t,padded:n=!0,mainProps:c}=e,p=(0,o.hz)(),h=(0,l.useRouter)(),m="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(p.flags.privacyRequestsConfiguration&&m),{data:g}=(0,d.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),f=p.flags.privacyRequestsConfiguration&&(!g||!y)&&m;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",...c,children:[f?(0,a.jsx)(u,{}):null,s]})]})}},19904:function(e,s,t){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}},26089:function(e,s,t){var a=t(24246),i=t(77181);s.Z=e=>{let{onClick:s,children:t}=e;return(0,a.jsx)(i.wpx,{onClick:s,type:"link",role:"link",size:"large",className:"m-0 p-0 font-medium text-gray-700 underline",children:t})}},16220:function(e,s,t){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){var a=t(24246),i=t(77181);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){t.d(s,{Z:function(){return g}});var a=t(24246),i=t(77181),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),h=t(78780);let{reducer:m}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=h.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 g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[h,m]=(0,n.useState)(null),g=(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())){g((0,d.Vo)("Only zip files are allowed."));return}m(e[0])}}),[b,{isLoading:v}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(h)try{var e;await b(h).unwrap(),g((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){g((0,d.Vo)((0,o.e$)(e)))}finally{m(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()}),h?(0,a.jsx)(i.xvT,{children:h.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:v,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!h||v,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(77181),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){var a=t(24246),i=t(77181);t(27378);var n=t(62656),r=t(16394),l=t(14746);let o=l.Ny+l.iW.get(n.Rj.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.Rj.WEBSITE;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(c(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(u(s)){var t;let e=null===(t=s.secrets)||void 0===t?void 0:t.url;if(!e)return o;let a=(0,r.ge)(e);return(0,r.tl)(a,100)}if(d(s))e=[...l.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(c(s)){let{identifier:t}=s;e=[...l.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?l.Ny+e[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){var a=t(24246),i=t(77181);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)(),[h,m]=(0,n.XX)(),x=async()=>{await h({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{m.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:g,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:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:m.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(77181),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){var a=t(24246),i=t(77181),n=t(34090);s.Z=e=>{let{disabled:s=!1,displayHelpIcon:t=!0,helpIconVisibility:r=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:p,autoFocus:h}=u,[m,x]=(0,n.U$)(u);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:l,isInvalid:!!(x.error&&x.touched),children:[o&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:p,minWidth:"150px",children:o}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...m,autoComplete:"off",autoFocus:h}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===c&&(0,a.jsx)(i.IIB,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",isDisabled:s,placeholder:d,size:"sm"}),"textarea"===c&&(0,a.jsx)(i.gxH,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:m.value||""}),(0,a.jsx)(i.J1D,{children:x.error})]}),t&&(0,a.jsx)(i.kCb,{alignContent:"center",h:"32px",visibility:r?"visible":"hidden",children:(0,a.jsx)(i.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},19812:function(e,s,t){t.d(s,{t:function(){return l}});var a=t(14047),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:h}=(0,r.LH)({onlyUnlinkedDatasets:!0}),m=(0,n.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[h]),{errorAlert:x,successAlert:g}=(0,a.V)();return{dropdownOptions:[...p,...m],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?x(l.failed[0].message):n&&g("Dataset successfully updated!")}}}},72774:function(e,s,t){t.d(s,{Z:function(){return r}});var a=t(24246),i=t(77181),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, the system 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){t.d(s,{U:function(){return a}});let a=e=>{var s;let t=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:t,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:"",cookies:null===(s=e.cookies)||void 0===s?void 0:s.map(e=>({name:e.name,domain:e.domain,path:e.path}))}}},84450:function(e,s,t){t.d(s,{Z:function(){return sK}});var a,i,n=t(24246),r=t(84720),l=t(77181),o=t(79894),d=t.n(o),c=t(86677),u=t.n(c),p=t(27378),h=t(16134),m=t(25980),x=t(45938),g=t(16220),y=t(77830),f=t(46628),_=t(26089),b=t(19904),v=t(16394),j=t(20682),k=t(41337);let w=e=>{let{connectionConfig:s}=e,t=(0,h.C)(j.pw),{data:a}=(0,j.$I)(t),i=(0,p.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,p.useState)(),l=(0,p.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,p.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,p.useMemo)(()=>{var e;return(null===(e=i.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,i]);return(0,p.useMemo)(()=>{let e=i.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&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var C=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:r,onChange:o,selectedValue:d}=e,c=(0,p.useRef)(null),[u,h]=(0,p.useState)(!1),[m,x]=(0,p.useState)(""),g=()=>{h(!1)},y=null===(s=[...r].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,p.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,p.useMemo)(()=>(0,v.Ds)(f,100),[f]),b=(0,p.useMemo)(()=>[...r].filter(e=>e[0].toLowerCase().includes(m.toLowerCase())),[r,m]);return(0,n.jsxs)(l.v2r,{isLazy:!0,onClose:g,onOpen:()=>{h(!0)},strategy:"fixed",matchWidth:!0,children:[(0,n.jsx)(l.j2t,{"aria-label":null!=y?y:i,as:l.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,n.jsx)(l.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,n.jsx)(l.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,n.jsxs)(l.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,n.jsx)(l.xuv,{px:"8px",mt:2,children:(0,n.jsxs)(l.BZy,{size:"sm",children:[(0,n.jsx)(l.Z8_,{pointerEvents:"none",children:(0,n.jsx)(l.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,n.jsx)(l.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,n.jsx)(l.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,n.jsx)(l.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,n.jsx)(l.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,n.jsx)(l.ua7,{"aria-label":t.toolTip,hasArrow:!0,label:t.toolTip,placement:"auto-start",openDelay:500,shouldWrapChildren:!0,children:(0,n.jsxs)(l.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>o(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,n.jsx)(k.Z,{data:t.value}),(0,n.jsx)(l.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},S=t(14047),D=t(1315),T=t(62656),A=t(84306),I=t(14207),E=t(59301),q=(0,l.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"}),R=t(19812),z=e=>{let{status:s}=e;return(0,n.jsxs)(n.Fragment,{children:["success"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"}),"error"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-error-msg",children:"Test failed: please check your connection info"})]})},F=t(8627),L=t(32885),O=t(65450),W=t(34090),Z=t(55484),P=t(97181),N=t(57072),U=t(39864),V=t(27259);let M=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,n.jsxs)(l.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(l.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(l.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 B=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:r}=(0,N.MO)(),o=(0,h.C)(U.qb),{errorAlert:d}=(0,S.V)();return r?null:(0,n.jsx)(W.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:Z.Ry({fields:Z.IX().of(Z.Ry().shape({pii_field:Z.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:Z.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:Z.IX(Z.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(W.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(W.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(V.Z,{autoFocus:0===t,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(V.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(P.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.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,n.jsx)(M,{isSubmitting:t,onCancelClick:i})]})}})})})})},H=e=>{let{connectionConfig:s}=e,t=(0,p.useRef)(!1),{successAlert:a}=(0,S.V)(),{handleError:i}=(0,S.H)(),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)([]),{isOpen:u,onOpen:h,onClose:m}=(0,l.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[b]=(0,I._d)(),v=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{o(!1)}};(0,p.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let j=(0,n.jsx)(l.wpx,{disabled:!s||r,loading:r,onClick:h,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(l.ua7,{label:"Save an Integration first to customize the DSR",placement:"top",shouldWrapChildren:!0,children:j}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:m,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{minWidth:"775px",children:[(0,n.jsx)(l.xBx,{children:"Customize DSR"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.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."}),(g||y)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),t.current&&!y?(0,n.jsx)(B,{data:d,isSubmitting:r,onSaveClick:v,onCancel:m}):null]})})]})]})]})},K=t(98784),Y=t.n(K),G=t(73183),$=e=>{let{options:s}=e,[t,{error:a},i]=(0,W.U$)("dataset"),{setValue:r}=i;return(0,n.jsxs)(l.NIc,{display:"flex",children:[(0,n.jsx)(l.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"100%",children:[(0,n.jsx)(l.xuv,{w:"full",children:(0,n.jsx)(l.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>r(e),mode:"multiple",className:"w-full"})}),(0,n.jsx)(l.J1D,{children:a})]}),(0,n.jsx)(l.ua7,{"aria-label":"Select datasets to associate with this integration",hasArrow:!0,label:"Select datasets to associate with this integration",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})},J=t(95492),Q=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&r()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Delete integration"}),(0,n.jsx)(l.wpx,{"aria-label":"Delete integration",icon:(0,n.jsx)(J.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Delete integration"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsx)(l.Kqy,{direction:"column",spacing:"15px",children:(0,n.jsx)(l.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,n.jsxs)(l.mzw,{children:[(0,n.jsx)(l.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},X=t(99792);let ee=(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},es=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===X.Z.SAAS&&(t+="_api"),t},et="#/definitions/FidesDatasetReference",ea=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:r,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:h,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,m.hz)(),w=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===et&&(s.includes(".")?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},C=(e,s)=>(0,n.jsx)(l.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:s}),S=e=>{var s;if((null===(s=e.allOf)||void 0===s?void 0:s[0].$ref)===et)return"Enter dataset.collection.field"},D=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},A=(e,s)=>(0,n.jsx)(W.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===s.type)&&(e=>{var t;return w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form:r}=t,o=r.errors.secrets&&r.errors.secrets[e],d=!!r.touched.secrets&&r.touched.secrets[e],c="boolean"===s.type,u="integer"===s.type;return(0,n.jsxs)(l.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,n.jsx)(l.IIB,{...i,type:s.sensitive?"password":"text",placeholder:S(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,n.jsx)(l.WPr,{value:!!i.value,onChange:e=>r.setFieldValue(i.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,n.jsxs)(l.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{r.setFieldValue(i.name,e)},value:null!==(a=i.value)&&void 0!==a?a:0,min:0,size:"sm",children:[(0,n.jsx)(l.zuI,{...i,autoComplete:"off"}),(0,n.jsxs)(l.FiK,{children:[(0,n.jsx)(l.WQu,{}),(0,n.jsx)(l.Y_d,{})]})]}),(0,n.jsx)(l.J1D,{children:o})]}),(0,n.jsx)(l.ua7,{"aria-label":s.description,hasArrow:!0,label:s.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",visibility:s.description?"visible":"hidden",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},"secrets.".concat(e)),E=e=>{let t=Y().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===et){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},q=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(E(e))},R=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(h.key))},z=(null==h?void 0:h.disabled)||!1;return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==h?void 0:h.key){var a,i;return e.name=null!==(i=h.name)&&void 0!==i?i:"",e.description=h.description,e.instance_key=h.connection_type===T.Rj.SAAS?null===(a=h.saas_config)||void 0===a?void 0:a.fides_key:h.key,e.enabled_actions=(h.enabled_actions||[]).map(e=>e.toString()),e.secrets=h.secrets?Y().cloneDeep(h.secrets):{},e.dataset=x,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===et){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return Y().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),ee(e,s)})(),onSubmit:(e,s)=>{r(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let r=!e.dirty&&(null==h?void 0:h.authorized);return(0,n.jsx)(W.l0,{noValidate:!0,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)("div",{className:"flex flex-row",children:[h?(0,n.jsx)(G.Z,{connection_key:null==h?void 0:h.key,disabled:z,connection_type:null==h?void 0:h.connection_type,access_type:null==h?void 0:h.access,name:null!==(t=null==h?void 0:h.name)&&void 0!==t?t:h.key,isSwitch:!0}):null,h?(0,n.jsx)(Q,{onDelete:f,deleteResult:_}):null]}),!!(null==h?void 0:h.key)&&(0,n.jsx)(W.gN,{id:"instance_key",name:"instance_key",children:s=>{let{field:t}=s;return(0,n.jsxs)(l.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==h?void 0:h.key),placeholder:"A unique identifier for your new ".concat(p.human_readable," integration"),size:"sm"}),(0,n.jsx)(l.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(l.ua7,{"aria-label":"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.",hasArrow:!0,label:"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.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),p.type!==T.Zi.MANUAL&&s?Object.entries(s.properties).map(e=>{let[s,t]=e;return"advanced_settings"===s?null:A(s,t)}):null,k&&(0,n.jsx)(W.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:a}=s;return(0,n.jsxs)(l.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:a.touched.enabled_actions&&a.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.WPr,{...t,placeholder:"Select...",mode:"multiple",options:p.supported_actions.map(e=>({label:Y().upperFirst(e),value:e})),onChange:e=>{a.setFieldValue(t.name,e)},disabled:1===p.supported_actions.length,className:"w-full"}),(0,n.jsx)(l.J1D,{children:e.errors.enabled_actions})]}),(0,n.jsx)(l.ua7,{"aria-label":"The request types that are supported for this integration.",hasArrow:!0,label:"The request types that are supported for this integration.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),T.Zi.DATABASE===p.type&&!y&&(0,n.jsx)($,{options:g}),(0,n.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||r?(0,n.jsx)(l.wpx,{disabled:!(null==h?void 0:h.key)||a||_.isLoading,loading:v||j,onClick:()=>R(e),"data-testid":"test-connection-button",children:u}):null,k&&T.Zi.DATABASE===p.type&&!Y().isEmpty(x)&&(0,n.jsx)(l.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!r?(0,n.jsx)(l.wpx,{loading:i,onClick:()=>q(e.values,e),children:"Authorize integration"}):null,p.type===T.Zi.MANUAL?(0,n.jsx)(H,{connectionConfig:h}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},ei=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:es(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()},en=async(e,s,t,a,i)=>{var n;let r=a?a.key:es(t,s),l={access:T.uv.WRITE,connection_type:s.type===T.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},er=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()},el=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,A.V)(),{handleError:l}=(0,S.H)(),o=(0,h.T)(),[d,c]=(0,p.useState)(!1),[u,x]=(0,p.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=(0,R.t)({connectionConfig:i}),[_]=(0,I.NG)(),[b]=(0,L.IB)(),[v]=(0,I.rO)(),[j]=(0,O.Zh)(),[k]=(0,O.qd)(),[w]=(0,L.kg)(),[C,D]=(0,O._w)(),{plus:E}=(0,m.hz)(),q=(0,p.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),z=(0,h.C)(O.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===T.Zi.SAAS&&n)i=(await ei(e,s,a,t,E?b:_)).connection;else{let n=await en(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await er(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await ei(e,s,a,t,_)).connection:await er(e,s,t,q,j);let r=await v(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{x(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,O.db)({...z,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:D}},eo=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[r,o]=(0,p.useState)(),d=(0,l.pmc)(),c=t.type===T.Zi.MANUAL,{data:h}=(0,j.n3)(t.identifier,{skip:c}),{isSubmitting:m,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:b,handleDelete:v,deleteDatastoreConnectionResult:k}=el({secretsSchema:h,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return h||t.type===T.Zi.MANUAL?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,n.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,n.jsx)("div",{style:{marginTop:"12px"},children:(0,n.jsxs)(E.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,n.jsx)(q,{})]})})]}),(0,n.jsx)(ea,{secretsSchema:h,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:m,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s;o(e);let t=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...f.MA,status:t,description:(0,n.jsx)(z,{status:t})})},onTestDatasetsClick:()=>{u().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:_,initialDatasets:b,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:k}),a?(0,n.jsxs)(l.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[r&&r.data&&void 0!==r.fulfilledTimeStamp?(0,n.jsx)(F.s,{succeeded:"succeeded"===r.data.test_status,timestamp:r.fulfilledTimeStamp}):(0,n.jsx)(F.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,n.jsx)(l.LZC,{})]}):null]}):null};var ed=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),[o,d]=(0,p.useState)(null),{successAlert:c}=(0,S.V)(),[u,{isLoading:m}]=(0,D.qd)(),x=(0,h.C)(j.pw),{data:g}=(0,j.$I)(x),y=(0,p.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,S.H)(),_=()=>{m||(o&&d(null),r())},b=async()=>{try{if(o){var e;let s={...o,instance_key:o.connection_type===T.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},a=y.find(e=>(null==o?void 0:o.saas_config)&&e.identifier===(null==o?void 0:o.saas_config.type)||e.identifier===(null==o?void 0:o.connection_type));(await en(s,a,t,o,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),r()}}catch(e){f(e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{onClick:i,children:"Link integration"}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Unlinked Integrations"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(l.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,n.jsx)(l.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,n.jsxs)(l.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==o?void 0:o.key)===e.key?"gray.100":"unset",color:(null==o?void 0:o.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},children:[(0,n.jsx)(k.Z,{data:e}),(0,n.jsx)(l.xvT,{children:e.name})]},e.key))})]})}),(0,n.jsxs)(l.mzw,{className:"flex gap-4",children:[(0,n.jsx)(l.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:b,loading:m,disabled:!o||m,className:"w-1/2",children:"Link integration"})]})]})]})]})},ec=t(44553),eu=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:r}=w({connectionConfig:s}),o=(0,h.C)(I.dR),{data:d}=(0,I.AZ)({...o,orphaned_from_system:!0}),[c,u]=(0,p.useState)([]);(0,p.useEffect)(()=>{d&&u(d.items)},[d]);let m=(0,l.qY0)();return(0,n.jsxs)(l.xuv,{id:"con-wrapper",px:6,children:[(0,n.jsxs)(l.kCb,{py:5,children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",lg:"row"},children:[(0,n.jsx)(C,{list:a,label:"Integration type",selectedValue:i,onChange:r,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,n.jsx)(ed,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(b.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(l.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:m.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,n.jsx)(ec.Z,{isOpen:m.isOpen,onClose:m.onClose})]}),(null==i?void 0:i.type)&&[T.Zi.DATABASE,T.Zi.DATA_CATALOG,T.Zi.SAAS,T.Zi.MANUAL,T.Zi.EMAIL].includes(i.type)?(0,n.jsx)(eo,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},ep=t(71922),eh=t(31883);let em=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:r,name:o}=s,d="".concat(r,"-notice_id"),[c,,u]=(0,W.U$)(d),{setValue:p}=u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{flexGrow:1,children:[i&&(0,n.jsx)(l.LqM,{}),(0,n.jsx)(l.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:o})]}),(0,n.jsx)(l.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"})]})},ex=e=>{let{connectionKey:s,...t}=e,a=(0,l.pmc)(),{data:i,isLoading:r}=(0,L.EQ)(s),[o,{isLoading:d}]=(0,L.Am)(),c=(0,h.C)(ep.Zp),u=(0,h.C)(ep.G1),{data:m,isLoading:x}=(0,ep.J6)({page:c,size:u}),[g,y]=(0,p.useState)(),[_,b]=(0,p.useState)([]),v=(0,p.useMemo)(()=>null==g?void 0:g.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},{}),[g]),j=e=>{let s=e.notice_id;if(s){let e=null==m?void 0:m.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 _.filter(e=>s.includes(e.value))}}return _},k=async()=>{let e=await o({connectionKey:s,consentableItems:g});(0,eh.D4)(e)?a((0,f.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,p.useEffect)(()=>{i&&y(i)},[i]),(0,p.useEffect)(()=>{m&&b(m.items.map(e=>({label:e.name,value:e.id})))},[m]),r||x)return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.OdW,{height:"35px"})});if(!g||!g.length||!m)return null;let w=(e,s)=>{y(g.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,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,n.jsxs)(l.Qdk,{border:"none",children:[(0,n.jsxs)(l.KFZ,{children:[(0,n.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,n.jsx)(l.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,n.jsx)(l.XEm,{})]}),(0,n.jsxs)(l.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,n.jsx)(l.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,n.jsx)(W.J9,{initialValues:v||{},onSubmit:k,children:(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(l.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(em,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(em,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,n.jsx)(l.Ugi,{justifyContent:"flex-end",mt:3,children:(0,n.jsx)(l.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var eg=t(57865),ey=t(3124),ef=t.n(ey),e_=(0,l.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"}),eb=(0,l.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 ev=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"})}},ej=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ek=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ej(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}!((Y().isNil(l)||Y().isEmpty(l))&&(Y().isNil(o)||Y().isEmpty(o)))&&(Y().isEqual(l,o)||(Y().isNil(l)||Y().isEmpty(l)?a.push(r):Y().isNil(o)||Y().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},ew=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,r=[],l=[],o=[];t.custom_fields||a.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ek(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ek(t,a);let d=[];if(r.length>0&&d.push(["added ",(0,n.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,n.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,n.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,n.jsxs)(n.Fragment,{children:[d.map((e,s)=>(0,n.jsxs)(p.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:h,formattedDate:m}=ev(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",m," at ",h]})},eC=(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}},eS=(e,s)=>{if(Y().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)}}},eD=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}}},eT=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}}},eA=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}]}}},eI=(0,p.createContext)(null),eE=()=>(0,p.useContext)(eI);var eq=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eI.Provider,{value:i,children:s})},eR=t(62165),ez=t(30320),eF=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eE(),i=p.Children.toArray(t).filter(e=>{if(p.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=Y().get(null==a?void 0:a.before,s),i=Y().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&Y().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&Y().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,n.jsx)(l.Kqy,{marginTop:"0px !important",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s})}),(0,n.jsx)(l.Kqy,{children:i})]})})},eL=t(40324),eO=t(91613),eW=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eE(),[d]=(0,W.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,p.useRef)(null),[h,m]=(0,p.useState)(null),[x,g]=(0,p.useState)([]),[y,f]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=Y().get(null==r?void 0:r.before,i.name)||[],s=Y().get(null==r?void 0:r.after,i.name)||[];f(!Y().isEqual(e,s)),g(e.length>s.length?e:s)},[r,i.name]),(0,p.useEffect)(()=>{u.current&&m(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===o?{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,n.jsx)(l.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eL.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eO.Z,{label:a}):null]}),(0,n.jsx)(l.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(h,"px")},children:(h?c.value:x).map((e,s)=>(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===o&&y&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eZ=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eE(),[d]=(0,W.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,p.useRef)(null),[h,m]=(0,p.useState)(null),[x,g]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=Y().get(null==r?void 0:r.before,i.name)||"",s=Y().get(null==r?void 0:r.after,i.name)||"";g(!Y().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,m(u.current.offsetHeight),u.current.textContent=c.value)},[r,i.name,c.value]);let y={};return x&&(y="before"===o?{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,n.jsx)(l.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eL.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eO.Z,{label:a}):null]}),(0,n.jsx)(l.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(h,"px")},children:c.value}),"before"===o&&x&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,ez.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),r=t===T.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(s).sort();return(0,n.jsx)(eF,{heading:"Custom fields",children:l.map(e=>i(e)?(0,n.jsx)(eW,{label:e,name:"".concat(r,".").concat(e)},e):(0,n.jsx)(eZ,{label:e,name:"".concat(r,".").concat(e)},e))})},eN=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:r}=eE(),[o]=(0,W.U$)(a),d={...o,value:o.value},[c,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{u(Y().get(null==i?void 0:i.before,a.name)!==Y().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let h={};return c&&(h="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,n.jsx)(l.NIc,{style:h,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",minHeight:"46px",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eL.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),t?(0,n.jsx)(eO.Z,{label:t}):null]}),void 0!==d.value&&(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===r&&c&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eU=e=>{let{initialValues:s}=e,t=(0,eR.hz)();return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,n.jsx)(W.l0,{children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsxs)(eF,{heading:"System details",children:[t.dictionaryService?(0,n.jsx)(eZ,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,n.jsx)(eZ,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eZ,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(eZ,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eW,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,n.jsx)(eF,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,n.jsxs)(eF,{heading:"Data processing properties",children:[(0,n.jsx)(eN,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,n.jsx)(eN,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,n.jsx)(eZ,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,n.jsx)(eN,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,n.jsx)(eW,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,n.jsx)(eN,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,n.jsx)(eW,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,n.jsx)(eN,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,n.jsx)(eZ,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,n.jsxs)(eF,{heading:"Administrative properties",children:[(0,n.jsx)(eZ,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,n.jsx)(eZ,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,n.jsx)(eZ,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,n.jsx)(eZ,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,n.jsx)(eZ,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,n.jsx)(eW,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,n.jsx)(eZ,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,n.jsx)(eZ,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,n.jsx)(eZ,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,n.jsx)(eP,{customFields:s.custom_fields,resourceType:T.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(eF,{heading:"Data use",children:[(0,n.jsx)(eZ,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,n.jsx)(eZ,{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,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,n.jsx)(eF,{heading:"Features",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,n.jsx)(eF,{heading:"Dataset reference",children:(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,n.jsxs)(eF,{heading:"Special category data",children:[(0,n.jsx)(eN,{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,n.jsx)(eZ,{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,n.jsxs)(eF,{heading:"Third parties",children:[(0,n.jsx)(eN,{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,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,n.jsx)(eW,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,n.jsx)(eP,{customFields:s.privacy_declarations[0].custom_fields,resourceType:T.P6.PRIVACY_DECLARATION})]},t)),(0,n.jsxs)(eF,{heading:"Data flow",children:[(0,n.jsx)(eW,{name:"ingress",label:"Sources"}),(0,n.jsx)(eW,{name:"egress",label:"Destinations"})]})]})})})};let eV=(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 eM=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,n.jsxs)(l.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsxs)(l.xBx,{backgroundColor:ef().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,n.jsxs)(l.X6q,{size:"xs",children:[(0,n.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,n.jsx)(n.Fragment,{children:eV(s.before,s.after).map((e,s)=>(0,n.jsx)(l.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.olH,{})]})]}),(0,n.jsx)(l.fef,{paddingTop:0,paddingBottom:6,children:(0,n.jsxs)(l.kCb,{justifyContent:"space-between",children:[(0,n.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,n.jsx)(eq,{selectedHistory:s,formType:"before",children:(0,n.jsx)(eU,{initialValues:null==s?void 0:s.before})})}),(0,n.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,n.jsx)(eq,{selectedHistory:s,formType:"after",children:(0,n.jsx)(eU,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eB=e=>{let{system:s}=e,[t,a]=(0,p.useState)(1),{data:i}=(0,L.Xc)({system_key:s.fides_key,page:t,size:10}),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(null),u=(0,h.C)(L.o),{data:m=[]}=(0,O.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eA(e=eT(e=eC(e=eS(e=eD(e),u),m)))),o(!0)},{formattedTime:y,formattedDate:f}=ev(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.iA_,{ml:"24px",children:[(0,n.jsx)(l.hrZ,{children:(0,n.jsx)(l.Tr,{children:(0,n.jsxs)(l.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ef().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=ew(e);return t?(0,n.jsx)(l.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,n.jsx)(l.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,n.jsxs)(l.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,n.jsxs)(l.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,n.jsx)(l.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,n.jsx)(eb,{})}),(0,n.jsx)(l.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(e_,{})})]}),(0,n.jsx)(eM,{selectedHistory:d,isOpen:r,onClose:()=>{o(!1),c(null)}})]})},eH=t(52368),eK=t(3765),eY=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,n.jsx)(l.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,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,n.jsx)(l.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,n.jsx)(l.Ugi,{mt:4,children:(0,n.jsx)(l.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eG=t(58452);let e$=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:r,onOpen:o,onClose:d}=(0,l.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,n.jsx)(l.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,n.jsx)(l.xvT,{children:t||s.data_use})}),(0,n.jsx)(l.LZC,{}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,n.jsx)(l.pJl,{})}),(0,n.jsx)(eG.Z,{isOpen:r,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,n.jsxs)(l.xvT,{children:["You are about to delete the data use declaration"," ",(0,n.jsx)(l.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,n.jsx)(l.izJ,{})]})},eJ=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,n.jsx)(l.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,n.jsxs)(l.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s}),(0,n.jsx)(l.LZC,{}),a||null]}),(0,n.jsx)(l.Kqy,{spacing:0,children:t}),(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},eQ=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:r,allDataUses:o}=e,d=e=>{let s=o.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)(eg.gU);return(0,n.jsx)(eJ,{heading:s,footerButton:c?null:(0,n.jsx)(l.wpx,{onClick:a,size:"small",icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,n.jsx)(e$,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:r},e.id))})};var eX=t(95346),e0=t(54748),e1=t(28325),e2=t(30234);let e4=Z.Ry().shape({data_categories:Z.IX(Z.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:Z.Z_().required().label("Data use")}),e5={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:{},cookies:[],id:""},e6=e=>{var s;let t=e.cookies?e.cookies.map(e=>({name:e,path:"/"})):void 0;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,cookies:t}},e7=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,cookies:r,values:o,includeCustomFields:d,privacyDeclarationId:c,lockedForGVL:u}=e,h=!!c,{legalBasisOptions:m}=(0,e0.Z)(),{specialCategoryLegalBasisOptions:x}=(0,e1.Z)(),g=(0,p.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsxs)(e2.Z,{heading:"Data use declaration",children:[(0,n.jsx)(eL.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:h||u,variant:"stacked"}),(0,n.jsx)(P.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:h||u}),(0,n.jsx)(P.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:u,layout:"stacked"}),(0,n.jsx)(P.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",disabled:u,layout:"stacked"}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(P.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:u}),(0,n.jsx)(l.UO1,{in:"Legitimate interests"===o.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eL.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:u})})})]}),(0,n.jsx)(l.xuv,{mt:5,pl:4,children:(0,n.jsx)(eL.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:u})}),(0,n.jsx)(eL.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:u})]}),(0,n.jsx)(e2.Z,{heading:"Features",children:(0,n.jsx)(P.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:u,mode:"tags"})}),(0,n.jsx)(e2.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.d,{name:"dataset_references",label:"Dataset references",options:g,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:u})}),(0,n.jsx)(e2.Z,{heading:"Special category data",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eL.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",isDisabled:u}),(0,n.jsx)(l.UO1,{in:o.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:x,isRequired:o.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:u})})})]})}),(0,n.jsx)(e2.Z,{heading:"Third parties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eL.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",isDisabled:u}),(0,n.jsx)(l.UO1,{in:o.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsxs)(l.Kqy,{mt:4,spacing:4,children:[(0,n.jsx)(eL.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:u}),(0,n.jsx)(P.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",disabled:u})]})})]})}),(0,n.jsx)(e2.Z,{heading:"Cookies",children:(0,n.jsx)(P.d,{name:"cookies",label:"Cookies",options:r&&r.length?r.map(e=>({label:e.name,value:e.name})):[],mode:"tags",tooltip:"Which cookies are placed on consumer domains for this purpose?",layout:"stacked",disabled:u})}),d?(0,n.jsx)(eX.uc,{resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:c}):null]})},e8=(e,s)=>{if(e){let t=e.cookies&&e.cookies.length>0?e.cookies.map(e=>e.name):void 0;return{...e,customFieldValues:s||{},cookies:t}}return e5},e3=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,eX.mZ)({resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e6(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,p.useMemo)(()=>e8(t,i),[t,i])}},e9=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,r=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e3({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,h.C)(eg.gU);return(0,n.jsx)(W.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e4,children:e=>{let{dirty:s,values:a}=e;return(0,n.jsxs)(W.l0,{"data-testid":"declaration-form",children:[(0,n.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsx)(e7,{values:a,lockedForGVL:c,privacyDeclarationId:r,...i}),(0,n.jsxs)(l.kCb,{w:"100%",children:[(0,n.jsx)(l.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},se=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:r="privacy-declaration-modal",children:o}=e;return(0,n.jsxs)(l.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":r,children:[(0,n.jsx)(l.xBx,{p:0,children:(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"sm",children:a})})}),(0,n.jsx)(l.fef,{pb:4,children:o})]})]})};var ss=e=>{let{system:s,addButtonProps:t,includeCustomFields:a,includeCookies:i,...r}=e,{isOpen:o,onClose:d,onOpen:c}=(0,l.qY0)(),[u,h]=(0,p.useState)(void 0),{createDataUse:m,updateDataUse:x,deleteDataUse:g}=(0,eK.Z)(s),y=[...s.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],f=s.cookies?s.cookies.filter(e=>0===y.filter(s=>s&&s.name===e.name).length):void 0,_=()=>{d(),h(void 0)},b=()=>{c(),h(void 0)},v=async e=>(_(),u)?x(u,e):m(e);return(0,p.useEffect)(()=>{d()},[d,s.fides_key]),(0,n.jsxs)(l.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,n.jsx)(eY,{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:b}):(0,n.jsx)(eQ,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:b,handleEdit:e=>{c(),h(e)},handleDelete:g,allDataUses:r.allDataUses}),f&&f.length>0?(0,n.jsx)(eJ,{heading:"Unassigned cookies",children:f.map(e=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(l.xuv,{px:6,py:4,children:(0,n.jsx)(l.xvT,{children:e.name})}),(0,n.jsx)(l.izJ,{})]},e.name))}):null,(0,n.jsx)(se,{isOpen:o,onClose:_,heading:"Configure data use",children:(0,n.jsx)(e9,{initialValues:u,onSubmit:v,onCancel:_,includeCustomFields:a,...r})})]})},st=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eH.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),r=a.allDataUses.filter(e=>e.active),o=a.allDataSubjects.filter(e=>e.active),c={...a,allDataCategories:i,allDataUses:r,allDataSubject:o,cookies:s.cookies};return(0,n.jsxs)(l.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,n.jsxs)(l.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,n.jsx)(l.rUS,{as:d(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,n.jsx)(l.$jN,{}):(0,n.jsx)(ss,{system:s,includeCustomFields:!0,includeCookies:!0,...c})]})},sa=t(812),si=t(93237),sn=t(69525),sr=t(33335);let sl={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:""},so=(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}},sd=e=>{let s=e.fides_key?e.fides_key:(0,sr.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,cookies:e.cookies,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};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};var sc=t(36345);let su=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sp=[{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"}],sh=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sm=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,n.jsxs)(l.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sx=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,O.K3)(),o=(0,h.T)(),d=(0,eX.mZ)({resourceType:T.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eH.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,p.useMemo)(()=>t?so(t,d.customFieldValues):sl,[t,d.customFieldValues]),[m]=(0,O.in)(),g=(0,p.useMemo)(()=>Z.Ry().shape({name:Z.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await m({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.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:Z.Z_().min(1).url().nullable()}),[m,u.name]),y=(0,eR.hz)(),[f,_]=(0,O.f7)(),[b,v]=(0,O.qQ)();(0,L.Rd)(void 0,{skip:!y.dictionaryService});let[j]=(0,L.qz)(),k=(0,h.C)(L.o),w=(0,h.C)(eg.gU),C=(0,p.useMemo)(()=>!!(t&&(null==r?void 0:r.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,r]),S=(0,p.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),D=(0,l.pmc)(),A=async(e,t)=>{let a,i;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await j({vendor_id:e.vendor_id});s.isError?(0,sa.fn)(s.error)&&404===s.error.status||D({status:"error",description:(0,sa.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.")}):s.data&&s.data.items.length>0&&(a=s.data.items.map(e=>{var s;return{...(0,sn.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let n=sd({...e,privacy_declarations:null!=a?a:e.privacy_declarations});i=C?await b(n):await f(n),await d.upsertCustomFields(e),(0,sa.D4)(i)?D({status:"error",description:(0,sa.e$)(i.error,"An unexpected error occurred while ".concat(C?"editing":"creating"," the system. Please try again."))}):(D.closeAll(),t.resetForm({values:e}),s(i.data),o((0,eg.b3)("initial")))},I=e=>{if(y.dictionaryService){if(!e){o((0,eg.b3)("hiding")),o((0,eg.gQ)(!1));return}o((0,eg.b3)("showing")),y.tcf&&(0,sa.cj)(e)===sa.c6.GVL?o((0,eg.gQ)(!0)):o((0,eg.gQ)(!1))}},E=v.isLoading||_.isLoading||d.isLoading;return(0,n.jsx)(W.J9,{initialValues:u,enableReinitialize:!0,onSubmit:A,validationSchema:g,children:e=>{let{dirty:s,values:r,isValid:o}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,n.jsxs)(l.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,n.jsx)(sm,{system:t}):null,(0,n.jsx)(l.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,n.jsx)(sm,{system:t}):null,(0,n.jsxs)(e2.Z,{heading:"System details",children:[y.dictionaryService?(0,n.jsx)(sc.Z,{label:"System name",options:k,onVendorSelected:I,isCreate:!t,lockedForGVL:w}):(0,n.jsx)(eL.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,n.jsx)(eL.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,n.jsx)(si.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,n.jsx)(P.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,n.jsx)(e2.Z,{heading:"Dataset reference",children:(0,n.jsx)(P.d,{name:"dataset_references",label:"Dataset references",options:S,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:w})}),(0,n.jsx)(e2.Z,{heading:"Data processing properties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(l.xuv,{mb:4,children:(0,n.jsx)(si.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:w})}),(0,n.jsx)(l.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!r.processes_personal_data||w}),(0,n.jsx)(l.UO1,{in:r.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eL.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:r.exempt_from_privacy_regulations,disabled:w})})})]})}),(0,n.jsx)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,n.jsxs)(l.Kqy,{spacing:4,mt:4,children:[(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:w}),(0,n.jsx)(l.UO1,{in:r.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:su,tooltip:"What is the legal basis under which profiling is performed?",disabled:w,isRequired:r.uses_profiling})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(si.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:w}),(0,n.jsx)(l.UO1,{in:r.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sp,tooltip:"What is the legal basis under which the data is transferred?",isRequired:r.does_international_transfers,disabled:w})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eL.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:w}),(0,n.jsx)(l.UO1,{in:r.requires_data_protection_assessments,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eL.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:w,isRequired:r.requires_data_protection_assessments})})})]})]})})]})}),(0,n.jsxs)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,n.jsxs)(e2.Z,{heading:"Cookie properties",children:[(0,n.jsx)(si.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:w}),(0,n.jsx)(si.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:w}),(0,n.jsx)(si.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:w}),(0,n.jsx)(si.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:w})]}),(0,n.jsxs)(e2.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eL.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,n.jsx)(si.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:w}),(0,n.jsx)(si.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:w}),(0,n.jsx)(si.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:w}),(0,n.jsx)(eL.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(P.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sh,tooltip:"What is the role of the business with regard to data processing?",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(si.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:w}),(0,n.jsx)(eL.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(si.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?",disabled:w}),(0,n.jsx)(si.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:w}),(0,n.jsx)(si.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})]}),r.fides_key?(0,n.jsx)(eX.uc,{resourceType:T.P6.SYSTEM,resourceFidesKey:r.fides_key}):null]})]}),(0,n.jsx)(l.xuv,{mt:6,children:(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:E||!s||!o,loading:E,"data-testid":"save-btn",children:"Save"})}),i]})}})},sg=t(59003),sy=t(92222),sf=t(14481),s_=t(57454);let{useGetSystemAssetsQuery:sb,useAddSystemAssetMutation:sv,useUpdateSystemAssetsMutation:sj,useDeleteSystemAssetsMutation:sk}=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,v.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]})})});var sw=t(90111),sC=t(8133),sS=t(78238),sD=t(70682),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[r,o,{setValue:d,setTouched:c}]=(0,W.U$)(s),u=!!(o.touched&&o.error);return(0,n.jsx)(l.NIc,{isInvalid:u,isRequired:!0,children:(0,n.jsxs)(l.jqI,{vertical:!0,children:[(0,n.jsxs)(l.jqI,{align:"center",children:[t&&(0,n.jsx)(eL.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(eO.Z,{label:i})]}),(0,n.jsx)(sD.Z,{...r,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,n.jsx)(eL.Bc,{isInvalid:u,message:o.error,fieldName:s})]})})};(a=i||(i={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sA=Z.Ry().shape({name:Z.Z_().required("Enter a name for this asset"),domain:Z.Z_().required("Enter a valid domain for this asset"),asset_type:Z.Z_().required("Select an asset type"),data_uses:Z.IX().min(1,"Select at least one category of consent"),base_url:Z.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sE=e=>{var s;let{isOpen:t,onClose:a,systemKey:r,asset:o,...d}=e,c=!o,[u,{isLoading:p}]=sv(),[h,{isLoading:m}]=sj(),x=(0,l.pmc)(),g=async e=>{let s=await u({systemKey:r,asset:e});if((0,sa.D4)(s)){let e=(0,sa.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");x((0,f.Vo)(e))}else x((0,f.t5)("Asset added successfully")),a()},y=async e=>{var s,t,i;let n=null!==(t=null==o?void 0:null===(s=o.data_uses)||void 0===s?void 0:s.filter(e=>!(0,sS.Z)(e)))&&void 0!==t?t:[],l={...e,data_uses:[...null!==(i=e.data_uses)&&void 0!==i?i:[],...n]},d=await h({systemKey:r,assets:[l]});if((0,sa.D4)(d)){let e=(0,sa.e$)(d.error,"An unexpected error occurred while saving this asset. Please try again.");x((0,f.Vo)(e))}else x((0,f.t5)("Asset updated successfully")),a()},_=o?{...o,data_uses:null==o?void 0:null===(s=o.data_uses)||void 0===s?void 0:s.filter(e=>(0,sS.Z)(e))}:sI;return(0,n.jsx)(sC.Z,{title:c?"Add asset":"Edit asset",onClose:a,isOpen:t,...d,children:(0,n.jsx)(W.J9,{initialValues:_,onSubmit:e=>{c?g(e):y(e)},validationSchema:sA,children:e=>{let{values:s,isValid:t,dirty:r}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(l.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sw.Z,{children:(0,n.jsx)(l.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,n.jsxs)(l.jqI,{vertical:!0,gap:20,children:[(0,n.jsx)(eL.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!c}),(0,n.jsx)(P.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sa.MM)(i),layout:"stacked",disabled:!c}),(0,n.jsx)(sT,{name:"data_uses",label:"Categories of consent",layout:"stacked"}),(0,n.jsx)(eL.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!c}),(0,n.jsx)(eL.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,n.jsx)(l.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,n.jsx)(eL.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,n.jsxs)(l.jqI,{justify:"space-between",children:[(0,n.jsx)(l.wpx,{onClick:a,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:p||m,disabled:!t||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sq=t(8411),sR=t(72625),sz=t(29850),sF=t(77685),sL=e=>{let{systemKey:s,systemName:t,asset:a}=e,[i,r]=(0,p.useState)(!1),[o,d]=(0,p.useState)(),[c,u]=(0,p.useState)(!1),[h,{isLoading:m}]=sj(),{successAlert:x,errorAlert:g}=(0,S.V)(),y=(0,l.qY0)(),{asset_type:f,name:_}=a,b=(0,p.useCallback)(e=>{e.preventDefault(),u(!0)},[]),v=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,eh.D4)(l)?g((0,sa.e$)(l.error)):x(n?"".concat(i," has been added to your system inventory and the ").concat(f,' "').concat(_,'" has been assigned to that system.'):"".concat(f," ").concat(_," has been assigned to ").concat(i)),r(!1),d(void 0)},j=e=>{d(e),y.onOpen()};return(0,n.jsxs)(n.Fragment,{children:[!i&&(0,n.jsxs)(l.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,n.jsx)(l.PJP.I8b,{})]}),!!i&&(0,n.jsx)(sz.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)=>j({newSystemKey:e,newSystemName:s.label}),loading:m}),c&&(0,n.jsx)(sF.i,{isOpen:!0,onClose:()=>u(!1),onSuccessfulSubmit:(e,s)=>j({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,n.jsx)(l.cVQ,{isOpen:y.isOpen,onClose:y.onClose,onConfirm:()=>{v(o)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==o?void 0:o.newSystemName,"?"),isCentered:!0})]})},sO=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sk(),o=(0,l.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,l.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,eh.D4)(e)?o((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing this asset. Please try again"))):o((0,f.t5)("Asset removed successfully"))};return(0,n.jsxs)(l.jqI,{className:"gap-1",children:[(0,n.jsx)(l.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,n.jsx)(l.wpx,{size:"small",onClick:u,loading:r,"data-testid":"remove-btn",children:"Remove"}),(0,n.jsx)(l.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 consent automation.",isCentered:!0})]})},sW=t(34929),sZ=t(26183),sP=e=>{var s,t;let{asset:a,systemId:i}=e,{getDataUseDisplayName:r}=(0,sW.Z)(),[o]=sj(),{errorAlert:d,successAlert:c}=(0,A.V)(),[u,h]=(0,p.useState)(!1),m=async e=>{let s=[...a.data_uses||[],e],t=await o({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,eh.D4)(t)?d((0,sa.e$)(t.error)):c("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 o({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,eh.D4)(n)?d((0,sa.e$)(n.error)):c("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(e=>(0,sS.Z)(e)).map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return(0,n.jsxs)(sZ.Z,{children:[!u&&(0,n.jsxs)(n.Fragment,{children:[g.map(e=>(0,n.jsx)(l.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,n.jsx)(l.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),u&&(0,n.jsx)(l.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,n.jsx)(sD.Z,{selectedTaxonomies:a.data_uses||[],onSelect:m,onBlur:()=>h(!1),open:!0})})]})},sN=e=>{let{systemKey:s,systemName:t,onEditClick:a}=e,i=(0,sy.Cl)();return[i.display({id:"select",cell:e=>{let{row:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,n.jsx)(sR.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),i.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(sf.G3,{value:e.getValue()}),header:"Asset"}),i.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(sf.G3,{value:e.getValue()}),header:"Type"}),i.display({id:"system",cell:e=>(0,n.jsx)(sL,{systemKey:s,systemName:t,asset:e.row.original}),header:"System"}),i.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sP,{asset:e.row.original,systemId:s}),header:"Categories of consent",size:200}),i.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sR.mb,{values:e.getValue().map(e=>({label:sq.Z8[e],key:e}))}),header:"Locations",size:300}),i.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(sf.G3,{value:e.getValue()}),header:"Domain"}),i.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sR.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sR.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),i.display({id:"actions",cell:e=>{let{row:t}=e;return(0,n.jsx)(sO,{asset:t.original,systemKey:s,onEditClick:()=>a(t.original)})},header:"Actions"})]},sU=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:h,endRange:m,pageIndex:x,setTotalPages:g,resetPageIndexToDefault:y}=(0,sf.oi)(),[_,b]=(0,p.useState)(""),[v,j]=(0,p.useState)(void 0),[k,w]=(0,p.useState)({}),[C]=sk(),S=(0,l.pmc)(),{data:D,isLoading:T,isFetching:A}=sb({fides_key:t.fides_key,search:_,page:x,size:i}),{isOpen:I,onClose:E,onOpen:q}=(0,l.qY0)(),{isOpen:R,onClose:z,onOpen:F}=(0,l.qY0)();(0,p.useEffect)(()=>{y()},[_,y]),(0,p.useEffect)(()=>{g(null==D?void 0:D.pages)},[D,g]);let L=sN({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{j(e),q()}}),O=(0,sg.b7)({getCoreRowModel:(0,sy.sC)(),columns:L,manualPagination:!0,data:(null==D?void 0:D.items)||[],columnResizeMode:"onChange",onRowSelectionChange:w,state:{rowSelection:k}}),W=O.getSelectedRowModel().rows.map(e=>e.original.id),Z=async()=>{let e=await C({systemKey:t.fides_key,asset_ids:W});(0,eh.D4)(e)?S((0,f.Vo)((0,sa.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(O.resetRowSelection(),S((0,f.t5)("Assets removed successfully"))),z()};return t?T?(0,n.jsx)(sf.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.xvT,{fontSize:"sm",mb:4,children:"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,n.jsxs)(sf.Q$,{children:[(0,n.jsx)(s_.M,{value:_,onChange:b}),(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:q,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:I,onClose:()=>{j(void 0),E()},systemKey:t.fides_key,asset:v}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.ZNm,{}),iconPosition:"end",onClick:F,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:R,onClose:z,onConfirm:Z,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]}),(0,n.jsx)(sf.ZK,{tableInstance:O,emptyTableNotice:(0,n.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(sf.s8,{totalRows:(null==D?void 0:D.total)||0,pageSizes:a,setPageSize:r,onPreviousPageClick:o,isPreviousPageDisabled:d||A,onNextPageClick:c,isNextPageDisabled:u||A,startRange:h,endRange:m})]}):null};let sV={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},ASSETS:{index:4,hash:"#assets"},HISTORY:{index:5,hash:"#history"}},sM=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sV).find(e=>e.hash===s)},sB=e=>Object.values(sV).find(s=>s.index===e),sH=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,n.jsxs)(l.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,n.jsx)(_.Z,{onClick:s,children:"view it now"})," and come back to finish this setup when you’re ready. Or you can progress to"," ",(0,n.jsx)(_.Z,{onClick:t,children:"adding your privacy declarations in the next tab"}),"."]})]})};var sK=e=>{var s,t;let{isCreate:a}=e,i=(0,c.useRouter)(),[o,u]=(0,p.useState)((()=>{var e,s;let t=i.asPath.split("#")[1];return t&&null!==(s=null===(e=sM(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sV.INFORMATION.index})()),[_,b]=(0,p.useState)(!1),{systemOrDatamapRoute:v}=(0,g.V)(),j=(0,l.pmc)(),k=(0,h.T)(),w=(0,h.C)(O.NC),[C,S]=(0,p.useState)(void 0),{plus:D}=(0,m.hz)(),{flags:{dataDiscoveryAndDetection:T,webMonitor:A}}=(0,m.Vb)(),{plus:I}=(0,m.hz)(),{data:E}=(0,O.rn)(null==w?void 0:w.fides_key,{skip:!w});(0,p.useEffect)(()=>{k((0,O.db)(E))},[E,k]),(0,p.useEffect)(()=>{w&&S(w.processes_personal_data)},[w]);let q=(0,p.useCallback)(e=>{void 0===w&&b(!0),k((0,O.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sH,{onViewDatamap:()=>{i.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[w,k,i,v,j]);(0,p.useEffect)(()=>(a&&(k((0,O.db)(void 0)),k((0,eg.b3)("initial")),k((0,eg.gQ)(!1))),()=>{k((0,O.db)(void 0))}),[k,a]);let{attemptAction:R}=(0,x.oI)(),z=(0,p.useCallback)(e=>{R().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?j((0,f.t5)("Integration successfully authorized.")):j((0,f.Vo)("Failed to authorize integration."))),u(e),i.isReady){let s=sB(e);if(s){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[R,i,j]);(0,p.useEffect)(()=>{let{status:e}=i.query;e&&z(sV.INTEGRATIONS.index)},[i.query,z]);let F=[{label:"Information",content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{px:6,mb:9,children:[(0,n.jsx)(x.eB,{}),(0,n.jsx)(sx,{onSuccess:q,system:w})]}),_?(0,n.jsx)(l.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,n.jsxs)(l.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,n.jsx)(l.rUS,{as:d(),href:v,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",content:w?(0,n.jsx)(l.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,n.jsx)(st,{system:w})}):null,isDisabled:!w||!C},{label:"Data flow",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsxs)(l.xuv,{px:6,paddingBottom:2,children:[(0,n.jsx)(l.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,n.jsx)(l.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,n.jsx)(r.q,{system:w,isSystemTab:!0})]}):null,isDisabled:!w},{label:"Integrations",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:2,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,children:I&&T?(0,n.jsxs)(n.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,n.jsx)(l.rUS,{href:y.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,n.jsx)(eu,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(ex,{m:6,connectionKey:null===(t=w.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!w}];return D&&A&&F.push({label:"Assets",content:w?(0,n.jsx)(sU,{system:w}):null,isDisabled:!w}),D&&F.push({label:"History",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:6,children:(0,n.jsx)(l.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,n.jsx)(eB,{system:w})]}):null,isDisabled:!w}),{tabData:F,tabIndex:o,onTabChange:z}}},54748:function(e,s,t){var a=t(27378),i=t(62656);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){var a=t(27378),i=t(62656);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([[401],{97181:function(e,a,n){n.d(a,{d:function(){return d}});var l=n(24246),t=n(77181),i=n(34090),s=n(27378),r=n(91613),o=n(40324);let d=e=>{let{name:a,label:n,labelProps:d,tooltip:c,isRequired:u,layout:v="inline",...h}=e,[m,x,{setValue:g}]=(0,i.U$)(a),j=!!(x.touched&&x.error),[p,f]=(0,s.useState)("");m.value||"tags"!==h.mode&&"multiple"!==h.mode||(m.value=[]),"tags"===h.mode&&"string"==typeof m.value&&(m.value=[m.value]);let b="tags"===h.mode?(e,a)=>e?e.value!==p||m.value.includes(p)?h.optionRender?h.optionRender(e,a):e.label:'Create "'.concat(p,'"'):void 0:h.optionRender||void 0,C=e=>{f(e),h.onSearch&&h.onSearch(e)},y=(e,a)=>{g(e),h.onChange&&h.onChange(e,a)};return"inline"===v?(0,l.jsx)(t.NIc,{isInvalid:j,isRequired:u,children:(0,l.jsxs)(t.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,l.jsx)(o.__,{htmlFor:h.id||a,...d,children:n}):null,(0,l.jsxs)(t.jqI,{align:"center",children:[(0,l.jsxs)(t.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(t.WPr,{...m,id:h.id||a,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:b,onSearch:"tags"===h.mode?C:void 0,onChange:y,value:m.value||void 0,status:j?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:j,message:x.error,fieldName:m.name})]}),c?(0,l.jsx)(r.Z,{label:c}):null]})]})}):(0,l.jsx)(t.NIc,{isInvalid:j,isRequired:u,children:(0,l.jsxs)(t.gCW,{alignItems:"start",children:[(0,l.jsxs)(t.jqI,{align:"center",children:[n?(0,l.jsx)(o.__,{htmlFor:h.id||a,fontSize:"xs",my:0,mr:1,...d,children:n}):null,c?(0,l.jsx)(r.Z,{label:c}):null]}),(0,l.jsx)(t.WPr,{...m,id:h.id||a,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:b,onSearch:"tags"===h.mode?C:void 0,onChange:y,value:m.value||void 0,status:j?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:j,message:x.error,fieldName:m.name})]})})}},8133:function(e,a,n){var l=n(24246),t=n(77181);a.Z=e=>{let{title:a,children:n,isOpen:i,onClose:s,...r}=e;return(0,l.jsxs)(t.u_l,{isOpen:i,onClose:s,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...r,children:[(0,l.jsx)(t.ZAr,{}),(0,l.jsxs)(t.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,l.jsx)(t.xBx,{p:0,children:(0,l.jsx)(t.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,l.jsx)(t.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(t.fef,{pb:4,overflow:"auto",children:n})]})]})}},33335:function(e,a,n){n.d(a,{E:function(){return l}});let l=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},36345:function(e,a,n){n.d(a,{Z:function(){return g}});var l=n(24246),t=n(77181),i=n(34090),s=n(27378),r=n(16134),o=n(40324);let d=(0,t.IUT)({displayName:"CompassIcon",viewBox:"0 0 512 512",path:(0,l.jsx)("path",{fill:"currentColor",d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})});var c=n(91613),u=n(57865);let{Text:v}=t.AntTypography,h=e=>{let{searchText:a,suggestion:n,...t}=e;return a&&n?(0,l.jsxs)(v,{"aria-hidden":!0,style:{pointerEvents:"none",position:"absolute",zIndex:10,top:"var(--ant-line-width)",bottom:"var(--ant-line-width)",left:"var(--ant-padding-sm)",lineHeight:"calc(var(--ant-control-height) - var(--ant-line-width))"},...t,children:[(0,l.jsx)(v,{className:"text-transparent",children:a}),(0,l.jsx)(v,{type:"secondary",children:n.substring(a.length)})]}):null},m="Create new system",x=e=>{let{active:a,disabled:n,onRefreshSuggestions:i}=e,s={bg:a?"complimentary.500":"gray.100"};return(0,l.jsxs)(t.gCW,{children:[(0,l.jsx)(t.LZC,{minHeight:"18px"}),(0,l.jsxs)(t.v2r,{children:[(0,l.jsx)(t.j2t,{as:t.hU,size:"sm",isDisabled:n,icon:(0,l.jsx)(d,{color:a?"white":"gray.700",boxSize:4}),"aria-label":"Update information from Compass","data-testid":"refresh-suggestions-btn",_hover:{_disabled:s},...s}),(0,l.jsx)(t.qyq,{children:(0,l.jsx)(t.sNh,{onClick:i,children:(0,l.jsx)(t.xvT,{fontSize:"xs",lineHeight:4,children:"Reset to Compass defaults"})})})]})]})};var g=e=>{var a,n;let{label:d,isCreate:v,lockedForGVL:g,options:j,isLoading:p,onVendorSelected:f}=e,b=(0,r.C)(u.bN),[C,y,{setValue:_}]=(0,i.U$)("name"),w=!!(y.touched&&y.error),I={...C,value:null!==(a=C.value)&&void 0!==a?a:""},{touched:N,values:z,setTouched:S,setFieldValue:R,validateForm:k}=(0,i.u6)(),[q,E]=(0,s.useState)(!0),Z=null!==(n=j.find(e=>e.value===I.value))&&void 0!==n?n:{label:I.value,value:I.value,description:""},W=(e,a)=>!!(null==a?void 0:a.label.toLowerCase().startsWith(e.toLowerCase())),[B,U]=(0,s.useState)(""),A=(0,s.useMemo)(()=>j.filter(e=>W(B,e)),[j,B]),F=(0,s.useMemo)(()=>{let e=j;return v&&B&&(e=[...j,{label:"".concat(m,' "').concat(B,'"...'),value:B}]),e},[v,j,B]),L=!!B&&A.length>0,T=g&&!v;(0,s.useEffect)(()=>{E(!I.value&&!z.vendor_id)},[I.value,z.vendor_id,E]),(0,s.useEffect)(()=>{k()},[q,k]);let M=async()=>{U(""),R("vendor_id",void 0),await _(""),S({...N,vendor_id:!1,name:!1}),f(void 0)},P=async e=>{if(e){let a=j.some(a=>a.value===e.value)?e.value:void 0;R("vendor_id",a),await _(e.label.startsWith(m)?e.value:e.label),S({...N,vendor_id:!0,name:!0}),f(a)}},D=async e=>{I.onBlur(e),B&&await _(B),S({...N,name:!0})},H=async e=>{A.length>0&&B!==A[0].label?(e.preventDefault(),U(A[0].label),R("vendor_id",A[0].value),await _(A[0].label),f(A[0].value)):(R("vendor_id",void 0),await _(B)),S({...N,name:!0})},O=(0,l.jsx)(t.NIc,{isInvalid:w,isRequired:!0,width:"100%",children:(0,l.jsxs)(t.gCW,{alignItems:"start",position:"relative",width:"100%",children:[(0,l.jsxs)(t.Ugi,{spacing:1,children:[(0,l.jsx)(o.__,{htmlFor:"vendorName",fontSize:"xs",my:0,mr:1,children:d}),(0,l.jsx)(c.Z,{label:"Enter the system name"})]}),(0,l.jsxs)(t.xuv,{width:"100%",className:"relative",children:[(0,l.jsx)(t.WPr,{id:"vendorName",labelInValue:!0,autoFocus:!0,allowClear:!0,options:F,loading:p,filterOption:(e,a)=>W(e,a)||!!(null==a?void 0:a.label.startsWith(m)),optionFilterProp:"label",value:Z,placeholder:"Enter system name...",disabled:T,onChange:P,onSearch:U,onClear:M,onBlur:D,onInputKeyDown:e=>{B&&"Tab"===e.key&&H(e)},status:w?"error":void 0,"data-testid":"vendor-name-select"}),(0,l.jsx)(h,{searchText:B,suggestion:A.length?A[0].label:""})]}),(0,l.jsx)(o.Bc,{isInvalid:w,message:y.error,fieldName:"name"})]})});return(0,l.jsxs)(t.Ugi,{alignItems:"flex-start",width:"full",children:[q?O:(0,l.jsx)(o.j0,{autoFocus:!0,id:"name",name:"name",label:"System name",tooltip:"Enter the system name",variant:"stacked",disabled:T,isRequired:!0,inputRightElement:T?null:(0,l.jsx)(t.PZ7,{onClick:M,size:"sm","data-testid":"clear-btn"})}),(0,l.jsx)(x,{active:!!z.vendor_id||L,disabled:!z.vendor_id||"showing"===b,onRefreshSuggestions:()=>f(z.vendor_id)})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4060],{58754:function(e,t,n){var r=n(24246),i=n(77181),l=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:o=!0,children:s,rightContent:a,style:d,...u}=e;return(0,r.jsxs)("div",{...u,style:o?{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,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.X6q,{className:n||s?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!n&&(0,r.jsx)(l.m,{className:s?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,t,n){n.d(t,{Tg:function(){return o}});var r=n(24246),i=n(16134),l=n(31793);let o=e=>(0,i.C)(l.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return o(t)?(0,r.jsx)(r.Fragment,{children:n}):null}},97181:function(e,t,n){n.d(t,{d:function(){return d}});var r=n(24246),i=n(77181),l=n(34090),o=n(27378),s=n(91613),a=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",...x}=e,[h,m,{setValue:f}]=(0,l.U$)(t),g=!!(m.touched&&m.error),[y,j]=(0,o.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let v="tags"===x.mode?(e,t)=>e?e.value!==y||h.value.includes(y)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:x.optionRender||void 0,b=e=>{j(e),x.onSearch&&x.onSearch(e)},C=(e,t)=>{f(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,r.jsx)(i.NIc,{isInvalid:g,isRequired:c,children:(0,r.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,r.jsx)(a.__,{htmlFor:x.id||t,...d,children:n}):null,(0,r.jsxs)(i.jqI,{align:"center",children:[(0,r.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(i.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:v,onSearch:"tags"===x.mode?b:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),(0,r.jsx)(a.Bc,{isInvalid:g,message:m.error,fieldName:h.name})]}),u?(0,r.jsx)(s.Z,{label:u}):null]})]})}):(0,r.jsx)(i.NIc,{isInvalid:g,isRequired:c,children:(0,r.jsxs)(i.gCW,{alignItems:"start",children:[(0,r.jsxs)(i.jqI,{align:"center",children:[n?(0,r.jsx)(a.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,u?(0,r.jsx)(s.Z,{label:u}):null]}),(0,r.jsx)(i.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:v,onSearch:"tags"===x.mode?b:void 0,onChange:C,value:h.value||void 0,status:g?"error":void 0}),(0,r.jsx)(a.Bc,{isInvalid:g,message:m.error,fieldName:h.name})]})})}},10342:function(e,t,n){var r=n(24246),i=n(77181),l=n(91613);t.Z=e=>{let{title:t,tooltip:n,children:o,...s}=e;return(0,r.jsxs)(i.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...s,children:[(0,r.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,r.jsx)(i.xvT,{as:"span",mx:1,children:(0,r.jsx)(l.Z,{label:n})}):void 0]}),(0,r.jsx)(i.Kqy,{p:6,spacing:6,children:o})]})}},58452:function(e,t,n){var r=n(24246),i=n(77181);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:l,onCancel:o,title:s,message:a,cancelButtonText:d,continueButtonText:u,isLoading:c,returnFocusOnClose:p,isCentered:x,testId:h="confirmation-modal",icon:m}=e;return(0,r.jsxs)(i.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==p||p,isCentered:x,children:[(0,r.jsx)(i.ZAr,{}),(0,r.jsxs)(i.hzk,{textAlign:"center",p:6,"data-testid":h,children:[m?(0,r.jsx)(i.M5Y,{mb:2,children:m}):null,s?(0,r.jsx)(i.xBx,{fontWeight:"medium",pb:0,children:s}):null,a?(0,r.jsx)(i.fef,{children:a}):null,(0,r.jsx)(i.mzw,{children:(0,r.jsxs)(i.MIq,{columns:2,width:"100%",children:[(0,r.jsx)(i.wpx,{onClick:()=>{o&&o(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:c,children:d||"Cancel"}),(0,r.jsx)(i.wpx,{type:"primary",size:"large",onClick:l,"data-testid":"continue-btn",loading:c,children:u||"Continue"})]})})]})]})}},70788:function(e,t,n){n.d(t,{m:function(){return d}});var r=n(24246),i=n(77181),l=n(79894),o=n.n(l),s=n(27378);let{Text:a}=i.AntTypography,d=e=>{let{items:t,...n}=e,l=(0,s.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,r.jsx)(a,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:s.title})),d)?s.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,r.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,r.jsx)(i.zrq,{items:l,...n})}},3642:function(e,t,n){var r=n(24246),i=n(77181),l=n(86677),o=n.n(l),s=n(27378),a=n(812),d=n(58452),u=n(77830),c=n(19904),p=n(46628),x=n(98795),h=n(62656);t.Z=e=>{let{property:t,triggerComponent:n}=e,l=(0,i.pmc)(),m=(0,i.qY0)(),[f]=(0,x.YW)(),g=t.experiences.length>0,y=async()=>{m.onClose();let e=await f(t.id);if((0,a.D4)(e)){l((0,p.Vo)((0,a.e$)(e.error)));return}o().push("".concat(u.ru)),l((0,p.t5)("Property ".concat(t.name," deleted successfully")))};return(0,r.jsxs)(c.ZP,{scopes:[h.Sh.PROPERTY_DELETE],children:[(0,r.jsx)(i.ua7,{label:"All of the experiences on this property must be unlinked before the property can be deleted.",placement:"right",isDisabled:!g,children:(0,r.jsx)("span",{children:s.cloneElement(n,{onClick:e=>{e.stopPropagation(),g||m.onOpen()},disabled:g})})}),(0,r.jsx)(d.Z,{isOpen:m.isOpen,onClose:m.onClose,onConfirm:y,title:"Delete ".concat(t.name),message:(0,r.jsxs)(i.xvT,{color:"gray.500",children:["You are about to delete property ",t.name,". This action is not reversible and will result in ",t.name," no longer being available for your data governance. Are you sure you want to proceed?"]}),continueButtonText:"Ok",isCentered:!0,icon:(0,r.jsx)(i.aNP,{})})]})}},18880:function(e,t,n){var r=n(24246),i=n(77181),l=n(34090),o=n(86677),s=n(27378),a=n(16134),d=n(10342),u=n(40324),c=n(812),p=n(77830),x=n(51472),h=n(94315),m=n(62656),f=n(97181),g=n(3642);let y=()=>{var e;let t=(0,a.C)(h.Zp),n=(0,a.C)(h.G1);(0,h.cq)({page:t,size:n});let i=(0,a.C)(h.w4),{values:o,setFieldValue:s}=(0,l.u6)();return(0,r.jsx)(d.Z,{title:"Experiences",children:(0,r.jsx)(x.Z,{addButtonLabel:"Add experience",idField:"id",nameField:"name",allItems:i.map(e=>({id:e.id,name:e.name})),values:null!==(e=o.experiences)&&void 0!==e?e:[],setValues:e=>s("experiences",e),draggable:!0,baseTestId:"experience"})})};t.Z=e=>{let{property:t,handleSubmit:n}=e,a=(0,o.useRouter)(),x=()=>{a.push(p.ru)},h=(0,s.useMemo)(()=>t||{name:"",type:m.uS.WEBSITE,experiences:[],messaging_templates:[],paths:[]},[t]);return(0,r.jsx)(l.J9,{enableReinitialize:!0,initialValues:h,onSubmit:n,children:e=>{let{dirty:n,isValid:o,isSubmitting:s}=e;return(0,r.jsxs)(l.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsxs)(d.Z,{title:"Property details",children:[(0,r.jsx)(u.j0,{isRequired:!0,label:"Property name",name:"name",tooltip:"Unique name to identify this property",variant:"stacked"}),(0,r.jsx)(f.d,{isRequired:!0,label:"Type",name:"type",options:(0,c.MM)(m.uS),layout:"stacked"})]})}),(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsx)(y,{})}),t&&(0,r.jsx)(i.xuv,{py:3,children:(0,r.jsx)(d.Z,{title:"Advanced settings",children:(0,r.jsx)(u.Io,{label:"Property ID",name:"id",tooltip:"Automatically generated unique ID for this property, used for developer configurations",variant:"stacked",readOnly:!0})})}),(0,r.jsxs)(i.kCb,{justifyContent:"space-between",width:"100%",paddingTop:2,children:[t&&(0,r.jsx)(g.Z,{property:t,triggerComponent:(0,r.jsx)(i.wpx,{"data-testid":"delete-property-button",loading:!1,className:"mr-3",children:"Delete"})}),(0,r.jsxs)(i.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:[(0,r.jsx)(i.wpx,{onClick:x,loading:!1,className:"mr-3",children:"Cancel"}),(0,r.jsx)(i.wpx,{htmlType:"submit",type:"primary",disabled:s||!n||!o,loading:s,children:"Save"})]})]})]})}})}},31883:function(e,t,n){n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},11055:function(e,t,n){n.d(t,{M:function(){return c}});var r=n(24246),i=n(29427),l=n(27378),o=n(40976),s=n(18397),a=n(42308),d=n(25431),u=n(39556);let c=(0,l.forwardRef)(function({children:e,as:t="ul",axis:n="y",onReorder:c,values:h,...m},f){let g=(0,a.h)(()=>s.E[t]),y=[],j=(0,l.useRef)(!1);return(0,i.k)(!!h,"Reorder.Group must be provided a values prop"),(0,l.useEffect)(()=>{j.current=!1}),(0,r.jsx)(g,{...m,ref:f,ignoreStrict:!0,children:(0,r.jsx)(o.Y.Provider,{value:{axis:n,registerItem:(e,t)=>{let r=y.findIndex(t=>e===t.value);-1!==r?y[r].layout=t[n]:y.push({value:e,layout:t[n]}),y.sort(x)},updateOrder:(e,t,n)=>{if(j.current)return;let r=function(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(-1===i)return e;let l=r>0?1:-1,o=e[i+l];if(!o)return e;let s=e[i],a=o.layout,c=(0,u.t)(a.min,a.max,.5);return 1===l&&s.layout.max+n>c||-1===l&&s.layout.min+n<c?(0,d.uo)(e,i,i+l):e}(y,e,t,n);y!==r&&(j.current=!0,c(r.map(p).filter(e=>-1!==h.indexOf(e))))}},children:e})})});function p(e){return e.value}function x(e,t){return e.layout.min-t.layout.min}},7078:function(e,t,n){n.d(t,{e:function(){return b}});var r=n(24246),i=n(29427),l=n(27378),o=n(40976),s=n(18397),a=n(42308),d=n(69222),u=n(67412);function c(e){let t=(0,a.h)(()=>(0,d.BX)(e)),{isStatic:n}=(0,l.useContext)(u._);if(n){let[,n]=(0,l.useState)(e);(0,l.useEffect)(()=>t.on("change",n),[])}return t}var p=n(13998);let x=e=>e&&"object"==typeof e&&e.mix,h=e=>x(e)?e.mix:void 0;var m=n(64306),f=n(95984);function g(e,t){let n=c(t()),r=()=>n.set(t());return r(),(0,m.L)(()=>{let t=()=>f.Wi.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,f.Pn)(r)}}),n}function y(e,t){let n=(0,a.h)(()=>[]);return g(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}var j=n(3522);function v(e,t=0){return(0,j.i)(e)?e:c(t)}let b=(0,l.forwardRef)(function({children:e,style:t={},value:n,as:u="li",onDrag:c,layout:x=!0,...m},f){let j=(0,a.h)(()=>s.E[u]),b=(0,l.useContext)(o.Y),C={x:v(t.x),y:v(t.y)},w=function(e,t,n,r){if("function"==typeof e)return function(e){d.S1.current=[],e();let t=g(d.S1.current,e);return d.S1.current=void 0,t}(e);let i="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],l=e[2+n],o=e[3+n],s=(0,p.s)(i,l,{mixer:h(l[0]),...o});return t?s(r):s}(t,void 0,void 0);return Array.isArray(e)?y(e,i):y([e],([e])=>i(e))}([C.x,C.y],([e,t])=>e||t?1:"unset");(0,i.k)(!!b,"Reorder.Item must be a child of Reorder.Group");let{axis:k,registerItem:R,updateOrder:S}=b;return(0,r.jsx)(j,{drag:k,...m,dragSnapToOrigin:!0,style:{...t,x:C.x,y:C.y,zIndex:w},layout:x,onDrag:(e,t)=>{let{velocity:r}=t;r[k]&&S(n,C[k].get(),r[k]),c&&c(e,t)},onLayoutMeasure:e=>R(n,e),ref:f,ignoreStrict:!0,children:e})})},40976:function(e,t,n){n.d(t,{Y:function(){return r}});let r=(0,n(27378).createContext)(null)},47397:function(e,t,n){n.d(t,{o:function(){return o}});var r=n(42308);class i{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 l=()=>new i;function o(){return(0,r.h)(l)}},76649:function(e,t,n){n.d(t,{Ln:function(){return r}});let r=(e,t)=>l(e,t),i=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class o{static narrow(e){return new o(t=>r(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof o?e.NF:e instanceof Function?e:t=>r(e,t);return new o(e=>t(e)&&n(e))}}new o(e=>!0)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4481],{86780:function(e,t,n){var l=n(24246),o=n(77181);t.Z=e=>{let{search:t,onChange:n,withIcon:i,onClear:r,placeholder:s,...a}=e;return(0,l.jsxs)(o.vyj.Compact,{className:"w-96","data-testid":"search-bar",children:[(0,l.jsx)(o.uFc,{autoComplete:"off",value:t,onChange:e=>n(e.target.value),placeholder:s||"Search...",prefix:i?(0,l.jsx)(o.PTu,{boxSize:4}):void 0,...a}),r?(0,l.jsx)(o.wpx,{onClick:r,children:"Clear"}):null]})}},812:function(e,t,n){n.d(t,{D4:function(){return i.D4},MM:function(){return g},Ot:function(){return c},c6:function(){return o},cj:function(){return x},e$:function(){return s},fn:function(){return a},iC:function(){return h},nU:function(){return u},tB:function(){return d}});var l,o,i=n(19043);let r="An unexpected error occurred. Please try again.",s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,i.Bw)(e)){if((0,i.hE)(e.data))return e.data.detail;if((0,i.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,i.Dy)(e.data)||404===e.status&&(0,i.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,i.oK)(e))return{status:e.originalStatus,message:e.data};if((0,i.Bw)(e)){let{status:n}=e;return{status:n,message:s(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(l=o||(o={})).GVL="gvl",l.AC="gacp",l.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},x=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},71795:function(e,t,n){n.d(t,{_:function(){return o}});var l=n(27378);function o(e,t){let[n,o]=(0,l.useState)(()=>{if(!e)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return[n,t=>{try{let l=t instanceof Function?t(n):t;o(l),e&&window.localStorage.setItem(e,JSON.stringify(l))}catch(e){console.error(e)}}]}},58452:function(e,t,n){var l=n(24246),o=n(77181);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:i,onCancel:r,title:s,message:a,cancelButtonText:c,continueButtonText:d,isLoading:u,returnFocusOnClose:g,isCentered:h,testId:x="confirmation-modal",icon:m}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==g||g,isCentered:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"center",p:6,"data-testid":x,children:[m?(0,l.jsx)(o.M5Y,{mb:2,children:m}):null,s?(0,l.jsx)(o.xBx,{fontWeight:"medium",pb:0,children:s}):null,a?(0,l.jsx)(o.fef,{children:a}):null,(0,l.jsx)(o.mzw,{children:(0,l.jsxs)(o.MIq,{columns:2,width:"100%",children:[(0,l.jsx)(o.wpx,{onClick:()=>{r&&r(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:c||"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",size:"large",onClick:i,"data-testid":"continue-btn",loading:u,children:d||"Continue"})]})})]})]})}},42904:function(e,t,n){n.d(t,{W3:function(){return r},bX:function(){return s},oi:function(){return a},s8:function(){return c}});var l=n(24246),o=n(77181),i=n(27378);let r=[25,50,100],s=e=>{let t=e.getFilteredRowModel().rows.length,{pageIndex:n}=e.getState().pagination,{pageSize:l}=e.getState().pagination,o=e.previousPage,i=!e.getCanPreviousPage(),r=e.nextPage,s=!e.getCanNextPage(),{setPageSize:a}=e;return{totalRows:t,onPreviousPageClick:o,isPreviousPageDisabled:i,onNextPageClick:r,isNextPageDisabled:s,setPageSize:a,startRange:n*l==0?1:n*l,endRange:n*l+l}},a=()=>{let e,t;let[n,l]=(0,i.useState)(r[0]),[o,s]=(0,i.useState)(1),[a,c]=(0,i.useState)(1),d=(0,i.useCallback)(()=>{s(e=>e-1)},[s]),u=(0,i.useMemo)(()=>1===o,[o]),g=(0,i.useCallback)(()=>{s(e=>e+1)},[s]),h=(0,i.useMemo)(()=>{let e=!a,t=!!a&&o===a;return e||t},[o,a]);if(a){let l=(o-1)*n;e=l+1,t=l+n}else e=0,t=0;let x=(0,i.useCallback)(()=>{s(1)},[]);return{onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:g,isNextPageDisabled:h,pageSize:n,setPageSize:e=>{l(e),x()},PAGE_SIZES:r,startRange:e,endRange:t,pageIndex:o,resetPageIndexToDefault:x,setTotalPages:c}},c=e=>{let{pageSizes:t,totalRows:n,onPreviousPageClick:i,isPreviousPageDisabled:r,onNextPageClick:s,isNextPageDisabled:a,setPageSize:c,startRange:d,endRange:u}=e;return(0,l.jsxs)(o.Ugi,{ml:1,mt:3,mb:1,children:[(0,l.jsxs)(o.v2r,{children:[(0,l.jsx)(o.j2t,{as:o.wpx,size:"small","data-testid":"pagination-btn",children:(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"semibold",userSelect:"none",style:{fontVariantNumeric:"tabular-nums"},children:[d.toLocaleString("en"),"-",u<=n?u.toLocaleString("en"):n.toLocaleString("en")," ","of ",n.toLocaleString("en")]})}),(0,l.jsx)(o.qyq,{minWidth:"0",children:t.map(e=>(0,l.jsxs)(o.sNh,{onClick:()=>{c(e)},"data-testid":"pageSize-".concat(e),fontSize:"xs",children:[e," per view"]},e))})]}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.wyc,{}),size:"small","aria-label":"previous page",onClick:i,disabled:r}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.XCv,{}),size:"small","aria-label":"next page",onClick:s,disabled:a})]})}},72625:function(e,t,n){n.d(t,{A4:function(){return f},CI:function(){return v},Cy:function(){return m},G3:function(){return x},Hm:function(){return y},Rr:function(){return S},S1:function(){return k},WP:function(){return w},k:function(){return C},mb:function(){return j},tc:function(){return b}});var l=n(24246),o=n(7195),i=n(77181),r=n(34090),s=n(3819),a=n.n(s),c=n(27378),d=n(812),u=n(58452),g=n(46628),h=n(16394);let x=e=>{var t,n;let{value:o,cellProps:r,...s}=e,c=!!(null==r?void 0:null===(t=r.cell.column.columnDef.meta)||void 0===t?void 0:t.showHeaderMenu)&&!!(null==r?void 0:null===(n=r.cellState)||void 0===n?void 0:n.isExpanded);return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,py:1.5,fontWeight:"normal",textOverflow:"ellipsis",overflow:c?void 0:"hidden",whiteSpace:c?"normal":void 0,title:c&&o?void 0:null==o?void 0:o.toString(),...s,children:a()(o)?o.toString():o})},m=e=>{let{time:t}=e;if(!t)return(0,l.jsx)(x,{value:"N/A"});let n=(0,o.B)(new Date(t),new Date,{addSuffix:!0}),r=(0,h.p6)(new Date(t));return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",children:(0,l.jsx)(i.esZ,{title:r,children:(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,h.G8)(n)})})})},p=e=>{let{children:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",mr:2,overflow:"auto",...n,children:t})},f=e=>{let{value:t,suffix:n,...o}=e;return(0,l.jsx)(p,{children:(0,l.jsxs)(i.j8w,{...o,children:[t,n]})})},v=e=>{let{count:t,singSuffix:n,plSuffix:o,...r}=e,s=null;return s=1===t?(0,l.jsxs)(i.j8w,{...r,children:[t,n?" ".concat(n):null]}):(0,l.jsxs)(i.j8w,{...r,children:[t,o?" ".concat(o):null]}),(0,l.jsx)(p,{children:s})},j=e=>{let{values:t,cellProps:n,...o}=e,{isExpanded:r,isWrapped:s,version:a}=(null==n?void 0:n.cellState)||{},[d,u]=(0,c.useState)(!r),[g,h]=(0,c.useState)(!!s),[x,m]=(0,c.useState)(r?t:null==t?void 0:t.slice(0,2));return(0,c.useEffect)(()=>{u(!r)},[r,a]),(0,c.useEffect)(()=>{h(!!s)},[s]),(0,c.useEffect)(()=>{(null==t?void 0:t.length)&&m(d?t.slice(0,2):t)},[d,t]),(0,c.useMemo)(()=>(null==x?void 0:x.length)?(0,l.jsxs)(i.kCb,{alignItems:d?"center":"flex-start",flexDirection:d||g?"row":"column",flexWrap:g?"wrap":"nowrap",gap:1.5,pt:2,pb:2,overflowX:"auto",onClick:e=>{d||(e.stopPropagation(),u(!0))},cursor:d?void 0:"pointer",children:[x.map(e=>(0,l.jsx)(i.j8w,{color:"white","data-testid":e.key,...o,children:e.label},e.key)),d&&t&&t.length>2&&(0,l.jsxs)(i.wpx,{type:"link",size:"small",onClick:()=>u(!1),className:"text-xs font-normal",children:["+",t.length-2," more"]})]}):null,[x,d,g,t,o])},b=e=>{let{values:t,valueSuffix:n,cellProps:o}=e,{isExpanded:r,version:s}=(null==o?void 0:o.cellState)||{},[a,d]=(0,c.useState)(!r);return(0,c.useEffect)(()=>{d(!r)},[r,s]),(0,c.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",textOverflow:"ellipsis",overflow:"hidden",children:t[0]}):(0,l.jsxs)(i.kCb,{flexDirection:"row",alignItems:"center",gap:1,pt:2,pb:2,onClick:e=>{a||(e.stopPropagation(),d(!0))},cursor:a?void 0:"pointer",children:[a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"normal",children:[t.length," ",n]}),(0,l.jsx)(i.wpx,{type:"link",size:"small",onClick:()=>d(!1),className:"text-xs font-normal",children:"View"})]}),!a&&(0,l.jsx)(i.aVo,{overflow:"hidden",children:t.map(e=>(0,l.jsx)(i.HCh,{fontSize:"xs",lineHeight:4,listStyleType:"none",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e},e))})]}):null,[a,t,n])},w=e=>{let{value:t,suffix:n,cellState:o,ignoreZero:r,tagProps:s}=e,a=null;return t?(a=Array.isArray(t)?1===t.length?(0,l.jsx)(i.j8w,{...s,children:t}):(null==o?void 0:o.isExpanded)&&t.length>0?t.map((e,t)=>(0,l.jsx)(i.j8w,{...s,children:e},(null==e?void 0:e.toString())||t)):(0,l.jsxs)(i.j8w,{...s,children:[t.length,n?" ".concat(n):null]}):(0,l.jsx)(i.j8w,{...s,children:t}),(0,l.jsx)(i.kCb,{alignItems:"center",height:"100%",gap:2,overflowX:"hidden",children:a})):r?null:(0,l.jsxs)(i.j8w,{...s,children:["0",n?" ".concat(n):""]})},C=e=>{let{dataTestId:t,...n}=e;return(0,l.jsx)(i.kCb,{alignItems:"center",justifyContent:"center",onClick:e=>e.stopPropagation(),children:(0,l.jsx)(i.XZJ,{"data-testid":t||void 0,...n})})},S=e=>{let{value:t,...n}=e;return(0,l.jsx)(i.xvT,{fontSize:"xs",lineHeight:9,fontWeight:"medium",flex:1,...n,children:t})},y=e=>{let{value:t,defaultValue:n,isEditing:o,...s}=e,a=s.column.columnDef.id||"",[c]=(0,r.U$)(a),{submitForm:d}=(0,r.u6)();return o?(0,l.jsx)(i.uFc,{...c,maxLength:80,placeholder:n,"aria-label":"Edit column name",size:"small","data-testid":"column-".concat(a,"-input"),onPressEnter:d}):(0,l.jsx)(S,{value:t,...s})},k=e=>{let{enabled:t,onToggle:n,title:o,message:r,isDisabled:s,...a}=e,c=(0,i.qY0)(),h=(0,i.pmc)(),x=async e=>{let{enable:t}=e,l=await n(t);(0,d.D4)(l)&&h((0,g.Vo)((0,d.e$)(l.error)))},m=async e=>{e?await x({enable:!0}):c.onOpen()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.rAg,{checked:t,onChange:m,disabled:s,"data-testid":"toggle-switch",...a}),(0,l.jsx)(u.Z,{isOpen:c.isOpen,onClose:c.onClose,onConfirm:()=>{x({enable:!1}),c.onClose()},title:o,message:(0,l.jsx)(i.xvT,{color:"gray.500",children:r}),continueButtonText:"Confirm",isCentered:!0,icon:(0,l.jsx)(i.aNP,{color:"orange.100"})})]})}},14481:function(e,t,n){n.d(t,{A4:function(){return l.A4},CI:function(){return l.CI},F1:function(){return p},G3:function(){return l.G3},Rr:function(){return l.Rr},vr:function(){return R},ZK:function(){return W},HO:function(){return D},WP:function(){return l.WP},k:function(){return l.k},W3:function(){return A.W3},s8:function(){return A.s8},AA:function(){return _},Q$:function(){return H},I4:function(){return P},bX:function(){return A.bX},oi:function(){return A.oi}});var l=n(72625),o=n(24246),i=n(77181),r=n(27378),s=n(43862),a=n(65201),c=n(75383),d=n(52202);let u="DraggableColumnListItem",g=e=>{let{id:t,index:n,moveColumn:l,setColumnVisible:o}=e,i=(0,r.useRef)(null),[{handlerId:s},a]=(0,c.L)({accept:u,collect:e=>({handlerId:e.getHandlerId()}),hover(e,t){var o;if(!i.current)return;let r=e.index;if(r===n)return;let s=null===(o=i.current)||void 0===o?void 0:o.getBoundingClientRect(),a=(s.bottom-s.top)/2,c=t.getClientOffset().y-s.top;r<n&&c<a||r>n&&c>a||(l(r,n),Object.assign(e,{index:n}))}}),[{isDragging:g},h,x]=(0,d.c)({type:u,item:()=>({id:t,index:n}),collect:e=>({isDragging:!!e.isDragging()})});return h(a(i)),{isDragging:g,ref:i,handlerId:s,preview:x,handleColumnVisibleToggle:e=>{o(n,e)}}},h=e=>{let{id:t,index:n,isVisible:l,moveColumn:r,setColumnVisible:s,text:a}=e,{ref:c,isDragging:d,handlerId:u,preview:h,handleColumnVisibleToggle:x}=g({index:n,id:t,moveColumn:r,setColumnVisible:s});return(0,o.jsxs)(i.HCh,{alignItems:"center",display:"flex",minWidth:0,ref:e=>{h(e)},"data-handler-id":u,opacity:d?.2:1,"data-testid":"column-list-item-".concat(t),children:[(0,o.jsx)(i.xuv,{ref:c,cursor:d?"grabbing":"grab","data-testid":"column-dragger-".concat(t),children:(0,o.jsx)(i.DE2,{as:i.zGR,color:"gray.300",flexShrink:0,height:"20px",width:"20px",_hover:{color:"gray.700"}})}),(0,o.jsxs)(i.NIc,{alignItems:"center",display:"flex",minWidth:0,title:a,children:[(0,o.jsx)(i.lXp,{color:"gray.700",fontSize:"normal",fontWeight:400,htmlFor:"".concat(t),mb:"0",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexGrow:1,children:a}),(0,o.jsx)(i.rAg,{id:"".concat(t),checked:l,onChange:x})]})]})},x=e=>{let{columns:t}=e,[n,l]=(0,r.useState)(null!=t?t:[]);return(0,r.useEffect)(()=>{l((null==t?void 0:t.map(e=>({...e})))||[])},[t]),{columns:n,moveColumn:(0,r.useCallback)((e,t)=>{l(n=>(0,a.ZP)(n,n=>{let l=n[e];n.splice(e,1),n.splice(t,0,l)}))},[]),setColumnVisible:(0,r.useCallback)((e,t)=>{l(n=>(0,a.ZP)(n,n=>{n[e]&&(n[e].isVisible=t)}))},[])}},m=e=>{let{columns:t,columnEditor:n}=e;return(0,o.jsx)(i.aVo,{spacing:4,children:t.map((e,t)=>(0,o.jsx)(h,{id:e.id,index:t,isVisible:e.isVisible,moveColumn:n.moveColumn,setColumnVisible:n.setColumnVisible,text:e.displayText},e.id))})},p=e=>{let{isOpen:t,onClose:n,headerText:l,tableInstance:a,columnNameMap:c,prefixColumns:d,savedCustomReportId:u,onColumnOrderChange:g,onColumnVisibilityChange:h}=e,p=x({columns:(0,r.useMemo)(()=>a.getAllColumns().filter(e=>!d.includes(e.id)).map(e=>{var t;return{id:e.id,displayText:(0,s.AH)({columnNameMap:c,columnId:e.id}),isVisible:null!==(t=a.getState().columnVisibility[e.id])&&void 0!==t?t:e.getIsVisible()}}).sort((e,t)=>{let{columnOrder:n}=a.getState(),l=n.indexOf(e.id),o=n.indexOf(t.id);return -1===l&&-1===o?0:-1===l?1:-1===o?-1:l-o}),[u,c])}),f=(0,r.useCallback)(()=>{let e=[...d,...p.columns.map(e=>e.id)],t=p.columns.reduce((e,t)=>(e[t.id]=t.isVisible,e),{});g(e),h(t),n()},[n,d,p.columns,g,h]);return(0,o.jsxs)(i.u_l,{isOpen:t,onClose:n,isCentered:!0,size:"2xl",children:[(0,o.jsx)(i.ZAr,{}),(0,o.jsxs)(i.hzk,{children:[(0,o.jsx)(i.xBx,{pb:0,children:l}),(0,o.jsx)(i.olH,{"data-testid":"column-settings-close-button"}),(0,o.jsxs)(i.fef,{children:[(0,o.jsx)(i.xvT,{fontSize:"sm",color:"gray.500",mb:2,children:"You can toggle columns on and off to hide or show them in the table. Additionally, you can drag columns up or down to change the order"}),(0,o.jsxs)(i.mQc,{colorScheme:"complimentary",children:[(0,o.jsx)(i.tdY,{children:(0,o.jsx)(i.OK9,{color:"complimentary.500",children:"Columns"})}),(0,o.jsx)(i.nPR,{children:(0,o.jsx)(i.x45,{p:0,pt:4,maxHeight:"270px",overflowY:"scroll",children:(0,o.jsx)(m,{columns:p.columns,columnEditor:p})})})]})]}),(0,o.jsx)(i.mzw,{children:(0,o.jsxs)(i.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,o.jsx)(i.wpx,{onClick:n,className:"mr-3 grow",children:"Cancel"}),(0,o.jsx)(i.wpx,{onClick:f,type:"primary",className:"grow","data-testid":"save-button",children:"Save"})]})})]})]})};var f=n(59003),v=n(71795),j=n(14048);let b=e=>{var t,n,l,r,a,c,d,u;let g,{cell:h,onRowClick:x,cellState:m}=e,p=h.getContext().table.getState().grouping.length>0,v=p?h.getContext().table.getState().grouping[0]:void 0,j=h.column.id===v,b=!1,w=!1,C=!1,S=h.getContext().table.getRowModel().rows.filter(e=>!e.id.includes(":")),y=S[0].id===h.row.id,k=S[S.length-1].id===h.row.id;if(h.getValue()&&j){let e=h.getContext().table.getRow("".concat(h.column.id,":").concat(h.getValue()));C=1===e.subRows.length,b=e.subRows[0].id===h.row.id,w=e.subRows[e.subRows.length-1].id===h.row.id}let z=(!j||b)&&!!(null===(t=h.column.columnDef.meta)||void 0===t?void 0:t.onCellClick);return(null===(n=h.column.columnDef.meta)||void 0===n?void 0:n.disableRowClick)||!x?z&&(g=()=>{var e,t;null===(t=h.column.columnDef.meta)||void 0===t||null===(e=t.onCellClick)||void 0===e||e.call(t,h.row.original)}):g=e=>{x(h.row.original,e)},(0,o.jsx)(i.Td,{width:(null===(l=h.column.columnDef.meta)||void 0===l?void 0:l.width)?h.column.columnDef.meta.width:"unset",overflow:(null===(r=h.column.columnDef.meta)||void 0===r?void 0:r.overflow)?null===(a=h.column.columnDef.meta)||void 0===a?void 0:a.overflow:"auto",borderBottomWidth:k||j?"0px":"1px",borderBottomColor:"gray.200",borderRightWidth:"1px",borderRightColor:"gray.200",sx:{article:{borderTopWidth:"2x",borderTopColor:"red"},...(0,s.J9)("select"===h.column.id||(null===(c=h.column.columnDef.meta)||void 0===c?void 0:c.noPadding)),maxWidth:"calc(var(--col-".concat(h.column.id,"-size) * 1px)"),minWidth:"calc(var(--col-".concat(h.column.id,"-size) * 1px)"),"&:hover":{backgroundColor:z?"gray.50":void 0,cursor:z?"pointer":void 0}},_hover:!x||(null===(d=h.column.columnDef.meta)||void 0===d?void 0:d.disableRowClick)?void 0:{cursor:"pointer"},_first:{borderBottomWidth:(p||k)&&(!w||y||k)&&(!b||!C||k)?"0px":"1px"},_last:{borderRightWidth:0},height:"inherit",onClick:g,"data-testid":"row-".concat(h.row.id,"-col-").concat(h.column.id),...null===(u=h.column.columnDef.meta)||void 0===u?void 0:u.cellProps,children:!h.getIsPlaceholder()||b?(0,f.ie)(h.column.columnDef.cell,{...h.getContext(),cellState:m}):null})},w=e=>{let{row:t,renderRowTooltipLabel:n,onRowClick:l,expandedColumns:r,wrappedColumns:a}=e;if(t.getIsGrouped())return null;let c=(0,o.jsx)(i.Tr,{height:"36px",_hover:l?{backgroundColor:"gray.50"}:void 0,"data-testid":"row-".concat(t.id),backgroundColor:t.getCanSelect()?void 0:"gray.50",children:t.getVisibleCells().map(e=>{let t=(0,s.tt)(e.column.id,r),n={isExpanded:!!t&&t>0,isWrapped:!!a.find(t=>t===e.column.id),version:t};return(0,o.jsx)(b,{cell:e,onRowClick:l,cellState:n},e.id)})},t.id);return n?(0,o.jsx)(i.ua7,{label:n?n(t):void 0,hasArrow:!0,placement:"top",children:c}):c},C={asc:{icon:(0,o.jsx)(i.Hf3,{}),title:"Sort ascending"},desc:{icon:(0,o.jsx)(i.veu,{}),title:"Sort descending"}},S={height:i.rSc.space[9],width:"100%",textAlign:"start","&:focus-visible":{backgroundColor:"gray.100"},"&:focus":{outline:"none"}},y=e=>{var t,n,l,r,a,c,d,u,g;let{header:h,onGroupAll:x,onExpandAll:m,onWrapToggle:p,isExpandAll:v,isWrapped:b,enableSorting:w}=e,{meta:y}=h.column.columnDef;return(null==y?void 0:y.showHeaderMenu)?(0,o.jsxs)(i.v2r,{placement:"bottom-end",closeOnSelect:!y.showHeaderMenuWrapOption,children:[(0,o.jsx)(i.j2t,{as:i.zxk,rightIcon:(0,o.jsxs)(i.Ugi,{children:[null===(t=C[h.column.getIsSorted()])||void 0===t?void 0:t.icon,(0,o.jsx)(i.nXP,{transform:"rotate(90deg)"})]}),title:"Column options",variant:"ghost",size:"sm",sx:{...(0,s.J9)("select"===h.column.id),...S},"data-testid":"".concat(h.id,"-header-menu"),children:(0,f.ie)(h.column.columnDef.header,h.getContext())}),(0,o.jsx)(i.h_i,{children:(0,o.jsxs)(i.qyq,{fontSize:"xs",minW:"0",w:"158px","data-testid":"".concat(h.id,"-header-menu-list"),children:[(0,o.jsxs)(i.sNh,{gap:2,color:v?"complimentary.500":void 0,onClick:()=>m(h.id),children:[(0,o.jsx)(j.oq,{})," Expand all"]}),(0,o.jsxs)(i.sNh,{gap:2,color:v?void 0:"complimentary.500",onClick:()=>x(h.id),children:[(0,o.jsx)(j.Kc,{})," Collapse all"]}),w&&h.column.getCanSort()&&(0,o.jsxs)(i.sNh,{gap:2,onClick:h.column.getToggleSortingHandler(),children:[null!==(u=null===(n=C[h.column.getNextSortingOrder()])||void 0===n?void 0:n.icon)&&void 0!==u?u:(0,o.jsx)(i.Dbz,{}),null!==(g=null===(l=C[h.column.getNextSortingOrder()])||void 0===l?void 0:l.title)&&void 0!==g?g:"Clear sort"]}),y.showHeaderMenuWrapOption&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.RaW,{}),(0,o.jsx)(i.xuv,{px:3,children:(0,o.jsx)(i.XZJ,{size:"sm",isChecked:b,onChange:()=>p(h.id,!b),colorScheme:"complimentary",children:(0,o.jsx)(i.xvT,{fontSize:"xs",children:"Wrap results"})})})]})]})})]}):w&&h.column.getCanSort()?(0,o.jsx)(i.zxk,{"data-testid":"".concat(h.id,"-header-sort"),onClick:h.column.getToggleSortingHandler(),rightIcon:null===(a=C[h.column.getIsSorted()])||void 0===a?void 0:a.icon,title:null!==(d=null===(c=C[h.column.getNextSortingOrder()])||void 0===c?void 0:c.title)&&void 0!==d?d:"Clear sort",variant:"ghost",size:"sm",sx:{...(0,s.J9)("select"===h.column.id),...S},children:(0,f.ie)(h.column.columnDef.header,h.getContext())}):(0,o.jsx)(i.xuv,{"data-testid":"".concat(h.id,"-header"),sx:{...(0,s.J9)("select"===h.column.id)},fontSize:"xs",lineHeight:9,fontWeight:"medium",style:null===(r=h.column.columnDef.meta)||void 0===r?void 0:r.headerProps,children:(0,f.ie)(h.column.columnDef.header,h.getContext())})},k=e=>{var t;let{tableInstance:n,rowActionBar:l,onRowClick:r,getRowIsClickable:s,renderRowTooltipLabel:a,expandedColumns:c,wrappedColumns:d,emptyTableNotice:u}=e,g=e=>s?s(e)?r:void 0:r;return(0,o.jsxs)(i.p3B,{"data-testid":"fidesTable-body",children:[l,n.getRowModel().rows.map(e=>(0,o.jsx)(w,{row:e,onRowClick:g(e.original),renderRowTooltipLabel:a,expandedColumns:c,wrappedColumns:d},e.id)),0===n.getRowModel().rows.length&&!(null===(t=n.getState())||void 0===t?void 0:t.globalFilter)&&u&&(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:100,children:u})})]})},z=r.memo(k,(e,t)=>e.tableInstance.options.data===t.tableInstance.options.data),W=e=>{let{tableInstance:t,rowActionBar:n,footer:l,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,emptyTableNotice:u,overflow:g="auto",onSort:h,enableSorting:x=!!h,columnExpandStorageKey:m,columnWrapStorageKey:p}=e,[f,j]=(0,r.useState)(1),[b,w]=(0,v._)(m,[]),[C,S]=(0,v._)(p,[]),W=e=>{w([...b.filter(t=>t.split(s.mb)[0]!==e),"".concat(e).concat(s.mb).concat(f)]),j(f+1)},R=e=>{w([...b.filter(t=>t.split(s.mb)[0]!==e),"".concat(e).concat(s.mb).concat(-1*f)]),j(f+1)},I=(e,t)=>{S(t?[...C,e]:C.filter(t=>t!==e))},T=(0,r.useMemo)(()=>{let e=t.getFlatHeaders(),n={};for(let i=0;i<e.length;i+=1){var l,o;let r=e[i],s=!!(null===(l=t.getState().columnSizing)||void 0===l?void 0:l[r.id]),a="auto"===(null===(o=r.column.columnDef.meta)||void 0===o?void 0:o.width);!s&&a?setTimeout(()=>{var e;let l=null===(e=document.getElementById("column-".concat(r.id)))||void 0===e?void 0:e.offsetWidth;l&&(t.setColumnSizing(e=>({...e,[r.id]:l})),n["--header-".concat(r.id,"-size")]=l,n["--col-".concat(r.column.id,"-size")]=l)}):(n["--header-".concat(r.id,"-size")]=r.getSize(),n["--col-".concat(r.column.id,"-size")]=r.column.getSize())}return n},[t.getState().columnSizingInfo]);return(0,r.useEffect)(()=>{h&&h(t.getState().sorting[0])},[t.getState().sorting]),(0,o.jsx)(i.xJi,{"data-testid":"fidesTable",overflowY:g,overflowX:g,borderColor:"gray.200",borderBottomWidth:"1px",borderRightWidth:"1px",borderLeftWidth:"1px",children:(0,o.jsxs)(i.iA_,{variant:"unstyled",style:{borderCollapse:"separate",borderSpacing:0,...T,minWidth:"100%"},children:[(0,o.jsx)(i.hrZ,{position:"sticky",top:"0",height:"36px",zIndex:10,backgroundColor:"gray.50",children:t.getHeaderGroups().map(e=>(0,o.jsx)(i.Tr,{height:"inherit",children:e.headers.map(e=>{var t;let n=(0,s.tt)(e.id,b);return(0,o.jsxs)(i.Th,{borderColor:"gray.200",borderTopWidth:"1px",borderBottomWidth:"1px",borderRightWidth:"1px",_last:{borderRightWidth:0},colSpan:e.colSpan,"data-testid":"column-".concat(e.id),id:"column-".concat(e.id),sx:{padding:0,width:"calc(var(--header-".concat(e.id,"-size) * 1px)"),overflowX:"auto"},textTransform:"unset",position:"relative",_hover:{"& .resizer":{opacity:1}},...null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.cellProps,children:[(0,o.jsx)(y,{header:e,onGroupAll:R,onExpandAll:W,onWrapToggle:I,isExpandAll:!!n&&n>0,isWrapped:!!C.find(t=>e.id===t),enableSorting:x}),e.column.getCanResize()?(0,o.jsx)(i.xuv,{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),position:"absolute",height:"100%",top:"0",right:"0",width:"5px",cursor:"col-resize",userSelect:"none",className:"resizer",opacity:0,backgroundColor:e.column.getIsResizing()?"complimentary.500":"gray.200"}):null]},e.id)})},e.id))}),t.getState().columnSizingInfo.isResizingColumn?(0,o.jsx)(z,{tableInstance:t,rowActionBar:n,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:C,emptyTableNotice:u}):(0,o.jsx)(k,{tableInstance:t,rowActionBar:n,onRowClick:a,getRowIsClickable:c,renderRowTooltipLabel:d,expandedColumns:b,wrappedColumns:C,emptyTableNotice:u}),l]})})},R=e=>{let{totalColumns:t,children:n}=e;return(0,o.jsx)(i.$RU,{backgroundColor:"gray.50",children:(0,o.jsx)(i.Tr,{children:(0,o.jsx)(i.Td,{colSpan:t,px:4,py:2,borderTop:"1px solid",borderColor:"gray.200",children:n})})})};var I=n(86780),T=n(16394);let D=e=>{let{globalFilter:t,setGlobalFilter:n,placeholder:l,testid:s="global-text-filter"}=e,[a,c]=(0,r.useState)(t),d=(0,r.useMemo)(()=>(0,T.Ds)(n,200),[n]),u=(0,r.useCallback)(()=>{c(void 0),n(void 0)},[c,n]);return(0,r.useEffect)(()=>{a||u()},[a,u]),(0,o.jsx)(i.xuv,{maxWidth:"424px",width:"100%",children:(0,o.jsx)(I.Z,{onChange:e=>{c(e),d(e)},onClear:u,search:a||"",placeholder:l,"data-testid":s})})};var A=n(42904),N=n(3124),O=n.n(N);let _=e=>{let{tableInstance:t,selectedRows:n,isOpen:l}=e;return l?(0,o.jsx)(i.Tr,{position:"sticky",zIndex:"10",top:"36px",backgroundColor:"neutral.100",height:"36px",p:0,boxShadow:"0px 4px 6px -1px rgba(0, 0, 0, 0.05)",children:(0,o.jsx)(i.Td,{borderWidth:"1px",borderColor:"gray.200",height:"inherit",pl:4,pr:2,py:0,colSpan:t.getAllColumns().length,bgColor:O().FIDESUI_FULL_WHITE,children:(0,o.jsxs)(i.Ugi,{children:[(0,o.jsxs)(i.xvT,{"data-testid":"selected-row-count",fontSize:"xs",children:[n.toLocaleString("en")," row(s) selected."]}),t.getIsAllRowsSelected()?null:(0,o.jsxs)(i.wpx,{"data-testid":"select-all-rows-btn",onClick:()=>{t.toggleAllRowsSelected()},type:"link",size:"small",className:"text-xs font-normal text-black underline",children:["Select all ",t.getFilteredRowModel().rows.length," rows."]})]})})}):null},H=e=>{let{children:t,...n}=e;return(0,o.jsx)(i.Ugi,{justifyContent:"space-between",alignItems:"center",p:2,borderWidth:"1px",borderBottomWidth:"0px",borderColor:"gray.200",zIndex:11,...n,children:t})},P=e=>{let{rowHeight:t,numRows:n}=e,l=[];for(let e=0;e<n;e+=1)l.push((0,o.jsx)(i.OdW,{height:"".concat(t,"px")},e));return(0,o.jsx)(i.Kqy,{children:l})}},43862:function(e,t,n){n.d(t,{AH:function(){return c},J9:function(){return s},mb:function(){return r},tt:function(){return a}});var l=n(77181),o=n(98784),i=n.n(o);let r="::",s=e=>e?{padding:"0px"}:{paddingLeft:l.rSc.space[3],paddingRight:"calc(".concat(l.rSc.space[3]," - 5px)"),paddingTop:"0px",paddingBottom:"0px",borderRadius:"0px"},a=(e,t)=>{let n=t.find(t=>t.startsWith(e));return n?parseInt(n.split(r)[1],10):void 0},c=e=>{let{columnId:t,columnNameMap:n}=e;if(!t)return"";let l=t.replace(/^(system_|privacy_declaration_)/,""),o=i().upperFirst(l.replaceAll("_"," "));return(null==n?void 0:n[t])||o}},46628:function(e,t,n){n.d(t,{MA:function(){return s},Vo:function(){return c},t5:function(){return a}});var l=n(24246),o=n(77181);let i=e=>{let{children:t,title:n="Success"}=e;return(0,l.jsxs)(o.xvT,{"data-testid":"toast-success-msg",children:[(0,l.jsxs)("strong",{children:[n,":"]})," ",t]})},r=e=>{let{children:t}=e;return(0,l.jsxs)(o.xvT,{"data-testid":"toast-error-msg",children:[(0,l.jsx)("strong",{children:"Error:"})," ",t]})},s={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},a=(e,t)=>{let n=(0,l.jsx)(i,{title:t,children:e});return{...s,description:n}},c=e=>{let t=(0,l.jsx)(r,{children:e});return{...s,description:t,status:"error"}}},19043:function(e,t,n){n.d(t,{Bw:function(){return r},D4:function(){return o},Dy:function(){return a},XD:function(){return c},cz:function(){return d},hE:function(){return s},oK:function(){return i}});var l=n(76649);let o=e=>"error"in e,i=e=>(0,l.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,l.Ln)({status:"number",data:{}},e),s=e=>(0,l.Ln)({detail:"string"},e),a=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,l.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,l.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)}}]);