ethyca-fides 2.71.1b1__py2.py3-none-any.whl → 2.71.1rc1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (194) hide show
  1. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.71.1rc1.dist-info}/METADATA +2 -2
  2. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.71.1rc1.dist-info}/RECORD +170 -159
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/4bfbeff34611_add_polling_status.py +68 -0
  5. fides/api/alembic/migrations/versions/7db29f9cd77b_create_new_sub_request_table.py +95 -0
  6. fides/api/alembic/migrations/versions/b97e92b038d2_add_digest_execution_model.py +117 -0
  7. fides/api/api/v1/endpoints/generic_overrides.py +3 -9
  8. fides/api/common_exceptions.py +4 -0
  9. fides/api/main.py +2 -2
  10. fides/api/models/attachment.py +1 -0
  11. fides/api/models/digest/__init__.py +2 -0
  12. fides/api/models/digest/digest_config.py +10 -1
  13. fides/api/models/digest/digest_execution.py +132 -0
  14. fides/api/models/event_audit.py +8 -0
  15. fides/api/models/privacy_notice.py +0 -8
  16. fides/api/models/privacy_request/request_task.py +98 -1
  17. fides/api/models/worker_task.py +8 -0
  18. fides/api/schemas/saas/async_polling_configuration.py +81 -0
  19. fides/api/schemas/saas/saas_config.py +10 -3
  20. fides/api/schemas/saas/strategy_configuration.py +0 -12
  21. fides/api/service/async_dsr/handlers/__init__.py +0 -0
  22. fides/api/service/async_dsr/handlers/polling_attachment_handler.py +155 -0
  23. fides/api/service/async_dsr/handlers/polling_request_handler.py +88 -0
  24. fides/api/service/async_dsr/handlers/polling_response_handler.py +261 -0
  25. fides/api/service/async_dsr/handlers/polling_sub_request_handler.py +123 -0
  26. fides/api/service/async_dsr/strategies/__init__.py +0 -0
  27. fides/api/service/async_dsr/strategies/async_dsr_strategy.py +52 -0
  28. fides/api/service/async_dsr/strategies/async_dsr_strategy_callback.py +199 -0
  29. fides/api/service/async_dsr/strategies/async_dsr_strategy_factory.py +72 -0
  30. fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py +678 -0
  31. fides/api/service/async_dsr/utils.py +130 -0
  32. fides/api/service/connectors/fides/fides_client.py +63 -1
  33. fides/api/service/connectors/query_configs/saas_query_config.py +4 -5
  34. fides/api/service/connectors/saas_connector.py +77 -69
  35. fides/api/service/privacy_request/attachment_handling.py +9 -2
  36. fides/api/service/privacy_request/request_runner_service.py +9 -83
  37. fides/api/service/privacy_request/request_service.py +47 -74
  38. fides/api/service/saas_request/saas_request_override_factory.py +66 -1
  39. fides/api/task/execute_request_tasks.py +5 -2
  40. fides/api/task/filter_results.py +35 -2
  41. fides/api/task/graph_task.py +34 -2
  42. fides/config/execution_settings.py +7 -3
  43. fides/service/dataset/dataset_service.py +0 -39
  44. fides/service/privacy_request/privacy_request_service.py +48 -103
  45. fides/ui-build/static/admin/404.html +1 -1
  46. fides/ui-build/static/admin/_next/static/{_IxwgneyQjdSaZFEF3Tqu → AfNel282iPq07N-lE1Vzx}/_buildManifest.js +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/155-c1ae010c664e2245.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/{3585-f728d32fda6f1ac1.js → 3585-efd5d41f08e180c4.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/3855-12ee1dfbbe47fd28.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/409-c1256ecda1b15db6.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/4558-de5ced790b3380dc.js +1 -0
  52. fides/ui-build/static/admin/_next/static/chunks/4608-a9941d0c236ebca1.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/{4718-3a412bdb90add82f.js → 4718-6585c97c26647e65.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/502-d3ecae97b67befbd.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/{7045-14e955890f1147e4.js → 7045-f15044a4d4525946.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-c1c2f757b1f3da12.js → _app-a7c02dd2ff07f9e1.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-58920afe2b67f952.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-ae4909cad9b67822.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-29c1fb777bd464e0.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-2635ef588bf06145.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-15616bea02397ef4.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-ea198c4a7869f402.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-f682b1def859931e.js +1 -0
  64. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-febf156d2977f3ac.js +1 -0
  65. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-648d775d0fce49dc.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-5edfec10a945ca43.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-97221067330c0c27.js → privacy-requests-8cbdfd08e0fa88fb.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/systems-0f1d833282f09684.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-a8cfa7de4948b374.js +1 -0
  70. fides/ui-build/static/admin/_next/static/css/{295d729ea1b11885.css → 64fac6fb884435c2.css} +1 -1
  71. fides/ui-build/static/admin/_next/static/css/f38242c11f7fea64.css +1 -0
  72. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  73. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  74. fides/ui-build/static/admin/add-systems.html +1 -1
  75. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  76. fides/ui-build/static/admin/consent/configure.html +1 -1
  77. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  78. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  79. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  80. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  81. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  82. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  83. fides/ui-build/static/admin/consent/properties.html +1 -1
  84. fides/ui-build/static/admin/consent/reporting.html +1 -1
  85. fides/ui-build/static/admin/consent.html +1 -1
  86. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  87. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  88. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  89. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  90. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  91. fides/ui-build/static/admin/data-catalog.html +1 -1
  92. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  93. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  94. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  95. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  96. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  97. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  98. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  99. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  100. fides/ui-build/static/admin/datamap.html +1 -1
  101. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  102. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  103. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  104. fides/ui-build/static/admin/dataset/new.html +1 -1
  105. fides/ui-build/static/admin/dataset.html +1 -1
  106. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  107. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  108. fides/ui-build/static/admin/datastore-connection.html +1 -1
  109. fides/ui-build/static/admin/index.html +1 -1
  110. fides/ui-build/static/admin/integrations/[id].html +1 -1
  111. fides/ui-build/static/admin/integrations.html +1 -1
  112. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  113. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  114. fides/ui-build/static/admin/lib/fides.js +2 -2
  115. fides/ui-build/static/admin/login/[provider].html +1 -1
  116. fides/ui-build/static/admin/login.html +1 -1
  117. fides/ui-build/static/admin/messaging/[id].html +1 -1
  118. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  119. fides/ui-build/static/admin/messaging.html +1 -1
  120. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  121. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  122. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  123. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  124. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  125. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  126. fides/ui-build/static/admin/poc/forms.html +1 -1
  127. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  128. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  129. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  130. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  131. fides/ui-build/static/admin/privacy-requests.html +1 -1
  132. fides/ui-build/static/admin/properties/[id].html +1 -1
  133. fides/ui-build/static/admin/properties/add-property.html +1 -1
  134. fides/ui-build/static/admin/properties.html +1 -1
  135. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  136. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  137. fides/ui-build/static/admin/settings/about.html +1 -1
  138. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  139. fides/ui-build/static/admin/settings/consent.html +1 -1
  140. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  141. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  142. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  143. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  144. fides/ui-build/static/admin/settings/domains.html +1 -1
  145. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  146. fides/ui-build/static/admin/settings/locations.html +1 -1
  147. fides/ui-build/static/admin/settings/messaging-providers/[key].html +1 -1
  148. fides/ui-build/static/admin/settings/messaging-providers/new.html +1 -1
  149. fides/ui-build/static/admin/settings/messaging-providers.html +1 -1
  150. fides/ui-build/static/admin/settings/organization.html +1 -1
  151. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  152. fides/ui-build/static/admin/settings/regulations.html +1 -1
  153. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  154. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  155. fides/ui-build/static/admin/systems.html +1 -1
  156. fides/ui-build/static/admin/taxonomy.html +1 -1
  157. fides/ui-build/static/admin/user-management/new.html +1 -1
  158. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  159. fides/ui-build/static/admin/user-management.html +1 -1
  160. fides/api/service/async_dsr/async_dsr_service.py +0 -195
  161. fides/api/service/async_dsr/async_dsr_strategy.py +0 -5
  162. fides/api/service/async_dsr/async_dsr_strategy_callback.py +0 -16
  163. fides/api/service/async_dsr/async_dsr_strategy_factory.py +0 -63
  164. fides/api/service/async_dsr/async_dsr_strategy_polling.py +0 -94
  165. fides/ui-build/static/admin/_next/static/chunks/155-b4337d0826d5addc.js +0 -1
  166. fides/ui-build/static/admin/_next/static/chunks/3855-ed226b8a8050bd40.js +0 -1
  167. fides/ui-build/static/admin/_next/static/chunks/409-5c3d31163028339f.js +0 -1
  168. fides/ui-build/static/admin/_next/static/chunks/4558-8305aee48def1dcd.js +0 -1
  169. fides/ui-build/static/admin/_next/static/chunks/4608-0c6ef78e30a51f84.js +0 -1
  170. fides/ui-build/static/admin/_next/static/chunks/502-0d9f4ac29ef34a1c.js +0 -1
  171. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-19214babd1f219e3.js +0 -1
  172. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-c1a3caf3c286bf5d.js +0 -1
  173. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-5b57f9132426fe52.js +0 -1
  174. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-a28cc0e23bbe4fc8.js +0 -1
  175. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-7d22222608ec3aac.js +0 -1
  176. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-d514cd4ec62e3b03.js +0 -1
  177. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-331544e9b85c4ac2.js +0 -1
  178. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-7dac2302f573f5ee.js +0 -1
  179. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-479890582973deaf.js +0 -1
  180. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-2fcd95c41e578d57.js +0 -1
  181. fides/ui-build/static/admin/_next/static/chunks/pages/systems-6c91bdea40875227.js +0 -1
  182. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-3059aba38adefa56.js +0 -1
  183. fides/ui-build/static/admin/_next/static/css/073713cd1eddda79.css +0 -1
  184. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.71.1rc1.dist-info}/WHEEL +0 -0
  185. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.71.1rc1.dist-info}/entry_points.txt +0 -0
  186. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.71.1rc1.dist-info}/licenses/LICENSE +0 -0
  187. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.71.1rc1.dist-info}/top_level.txt +0 -0
  188. /fides/ui-build/static/admin/_next/static/{_IxwgneyQjdSaZFEF3Tqu → AfNel282iPq07N-lE1Vzx}/_ssgManifest.js +0 -0
  189. /fides/ui-build/static/admin/_next/static/chunks/{6882-dbe0a25dcf1a8ee0.js → 6882-10296485ec326e6b.js} +0 -0
  190. /fides/ui-build/static/admin/_next/static/chunks/{7079-50571e9f3269d74d.js → 7079-bbc7b856802a4834.js} +0 -0
  191. /fides/ui-build/static/admin/_next/static/chunks/{9046-b6616ba7b59d947e.js → 9046-2a332fe338535c84.js} +0 -0
  192. /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-b7326c51d88cc2cc.js → data-catalog-56fd0f3e465e52b6.js} +0 -0
  193. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-0abd30eada811b5b.js → [...subfieldNames]-d4031e438c363fff.js} +0 -0
  194. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-007965429368d9a3.js → [collectionName]-9463af37079762d0.js} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5023],{74245:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/add-systems",function(){return n(5923)}])},69e3:function(e,t,n){"use strict";var s=n(24246),i=n(96306),r=n(91507),a=n.n(r);t.Z=e=>{let{color:t,description:n,title:r,icon:l}=e;return(0,s.jsx)(i.xuv,{borderLeft:"9px solid ".concat(t),borderRadius:"6px",className:a().container,children:(0,s.jsxs)(i.V4A,{className:a().card,"data-testid":"tile-".concat(r),children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[l,(0,s.jsx)(i.AntTypography.Title,{level:3,children:r})]}),(0,s.jsx)(i.AntTypography.Text,{children:n})]})})}},77867:function(e,t,n){"use strict";var s=n(24246),i=n(96306);t.Z=e=>{let{connected:t,...n}=e,r="red.500";return null==t?r="gray.300":t&&(r="green.500"),(0,s.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:r,...n})}},59301:function(e,t,n){"use strict";var s=n(24246);let{Link:i}=n(96306).AntTypography;t.Z=e=>(0,s.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var s=n(24246),i=n(96306),r=n(88038),a=n.n(r),l=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(42478),u=n(77830),h=()=>{let e=(0,l.useRouter)();return(0,s.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,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:n,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),g=(0,l.useRouter)(),x="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,p=!(m.flags.messagingConfiguration&&x),{data:y}=(0,d.JE)(void 0,{skip:p}),{data:f}=(0,c.PW)(void 0,{skip:p}),j=m.flags.messagingConfiguration&&(!y||!f)&&x;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[j?(0,s.jsx)(h,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var s=n(24246),i=n(96306),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:o,style:c,...d}=e;return(0,s.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,s.jsx)(r.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var s=n(24246),i=n(96306),r=n(34090),a=n(27378),l=n(46238),o=n(40324);let c=e=>{let{name:t,label:n,labelProps:c,tooltip:d,isRequired:u,layout:h="inline",helperText:m,...g}=e,[x,p,{setValue:y}]=(0,r.U$)(t),f=!!(p.touched&&p.error),[j,v]=(0,a.useState)("");x.value||"tags"!==g.mode&&"multiple"!==g.mode||(x.value=[]),"tags"===g.mode&&"string"==typeof x.value&&(x.value=[x.value]);let b="tags"===g.mode?(e,t)=>e?e.value!==j||x.value.includes(j)?g.optionRender?g.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:g.optionRender||void 0,C=e=>{v(e),g.onSearch&&g.onSearch(e)},w=(e,t)=>{y(e),g.onChange&&g.onChange(e,t)};return"inline"===h?(0,s.jsx)(i.NIc,{isInvalid:f,isRequired:u,children:(0,s.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,s.jsx)(o.__,{htmlFor:g.id||t,...c,children:n}):null,(0,s.jsxs)(i.jqI,{align:"center",children:[(0,s.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(i.WPr,{...x,id:g.id||t,"data-testid":"controlled-select-".concat(x.name),...g,optionRender:b,onSearch:"tags"===g.mode?C:void 0,onChange:w,value:x.value||void 0,status:f?"error":void 0}),m&&(0,s.jsx)(i.Q6r,{children:m}),(0,s.jsx)(o.Bc,{isInvalid:f,message:p.error,fieldName:x.name})]}),(0,s.jsx)(l.b,{label:d,className:f?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(i.NIc,{isInvalid:f,isRequired:u,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.jqI,{align:"center",children:[n?(0,s.jsx)(o.__,{htmlFor:g.id||t,fontSize:"xs",my:0,mr:1,...c,children:n}):null,(0,s.jsx)(l.b,{label:d})]}),(0,s.jsx)(i.WPr,{...x,id:g.id||t,"data-testid":"controlled-select-".concat(x.name),...g,optionRender:b,onSearch:"tags"===g.mode?C:void 0,onChange:w,value:x.value||void 0,status:f?"error":void 0}),m&&(0,s.jsx)(i.Q6r,{style:{marginTop:0},children:m}),(0,s.jsx)(o.Bc,{isInvalid:f,message:p.error,fieldName:x.name})]})})}},17245:function(e,t,n){"use strict";n.d(t,{HK:function(){return a},VY:function(){return i.V},pI:function(){return d},h0:function(){return s.h},Rx:function(){return m},rK:function(){return x}});var s=n(36866),i=n(84306),r=n(812);let a=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?n=t.data.detail:(0,r.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}};var l=n(27378),o=n(20682),c=n(21910);let d=e=>{let{data:t}=(0,o.$I)({}),n=(0,l.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,l.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===c.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=n.find(t=>{var n;return t.identifier===(null===(n=e.saas_config)||void 0===n?void 0:n.type)});if(t)return t}return e},[e,n])};var u=n(40431);let h=()=>({search:u.Oi.withDefault("")}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:n}=e,s=(0,l.useMemo)(()=>h(),[]),[i,r]=(0,u.XI)(s,{history:"push"}),a=(0,l.useMemo)(()=>({searchQuery:i.search||t||void 0}),[i,t]),o=(0,l.useCallback)(e=>{r({search:e||null})},[r]),c=(0,l.useCallback)(()=>{r({search:null})},[r]);return(0,l.useEffect)(()=>{n&&n(a)},[a,n]),{...a,updateSearch:o,resetSearch:c,searchProps:{value:a.searchQuery||"",onChange:o,onClear:()=>o("")}}},g=e=>({sortKey:e?(0,u.jx)([...e]):u.Oi.withDefault(""),sortOrder:(0,u.km)(["ascend","descend"])}),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:n,onSortingChange:s,validColumns:i}=e,r=(0,l.useMemo)(()=>g(i),[i]),[a,o]=(0,u.XI)(r,{history:"push"}),c=(0,l.useMemo)(()=>{var e;return{sortKey:a.sortKey||t,sortOrder:null!==(e=a.sortOrder)&&void 0!==e?e:n}},[a,t,n]),d=(0,l.useCallback)((e,t)=>{o({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[o]),h=(0,l.useCallback)(()=>{o({sortKey:null,sortOrder:null})},[o]);return(0,l.useEffect)(()=>{s&&s(c)},[c,s]),{...c,updateSorting:d,resetSorting:h,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:c.sortOrder,sortedInfo:c.sortKey?{field:c.sortKey,order:c.sortOrder}:void 0}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(24246),i=n(96306);let r=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},16220:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(25980),i=n(77830);let r=()=>({systemOrDatamapRoute:(0,s.hz)().plus?i.oG:i.So})},57899:function(e,t,n){"use strict";var s=n(24246),i=n(96306),r=n(27378);t.Z=e=>{let{handleConfirm:t,isOpen:n,onClose:a,title:l,message:o,confirmButtonText:c="Continue",cancelButtonText:d="Cancel"}=e,u=(0,r.useRef)(null);return(0,s.jsx)(i.aRR,{isOpen:n,leastDestructiveRef:u,onClose:a,children:(0,s.jsx)(i.dhV,{children:(0,s.jsxs)(i._Tf,{alignItems:"center",textAlign:"center",children:[(0,s.jsx)(i.aNP,{marginTop:3}),(0,s.jsx)(i.fYl,{fontSize:"lg",fontWeight:"bold",children:l}),(0,s.jsx)(i.iPF,{pt:0,children:o}),(0,s.jsxs)(i.xoY,{children:[(0,s.jsx)(i.wpx,{ref:u,onClick:a,size:"large",children:d}),(0,s.jsx)(i.wpx,{onClick:()=>t(),type:"primary",size:"large",className:"ml-3","data-testid":"warning-modal-confirm-btn",children:c})]})]})})})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var s=n(24246),i=n(96306),r=n(79894),a=n.n(r),l=n(27378);let{Text:o}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:l.title})),c)?l.title=(0,s.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},36866:function(e,t,n){"use strict";n.d(t,{h:function(){return c}});var s=n(40431),i=n(27378),r=n(55484);let a=(0,s.jo)({parse(e){let t=parseInt(e,10);try{return r.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var l=n(32735);let o=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:a.withDefault(l.Ej),size:n.pageSizeOptions?(0,s.bJ)(n.pageSizeOptions).withDefault(null!==(e=n.pageSize)&&void 0!==e?e:l.L8):a.withDefault(null!==(t=n.pageSize)&&void 0!==t?t:l.L8)}},c=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:r=l.L8,pageSizeOptions:a,showSizeChanger:c=!0}=n,d=null!=a?a:l.VZ,u=(0,i.useMemo)(()=>o({pageSize:r,pageSizeOptions:a}),[r,a]),[h,m]=(0,s.XI)(u,{history:"push"}),g={pageIndex:null!==(e=h.page)&&void 0!==e?e:l.Ej,pageSize:null!==(t=h.size)&&void 0!==t?t:r};return{...g,updatePageIndex:e=>{m({page:e})},updatePageSize:e=>{m({page:e!==g.pageSize?l.Ej:g.pageIndex,size:e})},resetPagination:()=>{m({page:l.Ej,size:r})},nextPage:()=>{m(e=>{let{page:t,size:n}=e;return{page:t+1,size:n}})},previousPage:()=>{m(e=>{let{page:t,size:n}=e;return{page:t-1,size:n}})},pageSizeOptions:d,showSizeChanger:c}}},42478:function(e,t,n){"use strict";n.d(t,{FU:function(){return c},JE:function(){return i},Ki:function(){return u},SU:function(){return h},W:function(){return m},h9:function(){return r},jc:function(){return s},qt:function(){return o},sn:function(){return d}});let{useGetEmailInviteStatusQuery:s,useGetActiveMessagingProviderQuery:i,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:c,useUpdateMessagingConfigurationByKeyMutation:d,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:h,useDeleteMessagingConfigurationByKeyMutation:m}=n(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,n,s)=>{let i=await s({url:"messaging/default/active"});return i.error&&404===i.error.status?{data:null}:i},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},5923:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eu}});var s=n(24246),i=n(27378),r=n(16134),a=n(77213),l=n(58754),o=n(15677),c=n(96306),d=n(3124),u=n.n(d),h=n(86677),m=n(25980),g=n(14048),x=n(58452);let p=e=>{let{onCancel:t,onConfirm:n,isOpen:i,onClose:r}=e;return(0,s.jsx)(x.Z,{isOpen:i,onClose:r,onCancel:t,isCentered:!0,title:"Upgrade to choose vendors",message:"To choose vendors and have system information auto-populated using Fides Compass, you will need to upgrade Fides. Meanwhile, you can manually add individual systems using the button below.",cancelButtonText:"Add vendors manually",continueButtonText:"Upgrade",onConfirm:n})};var y=n(77830),f=n(21910),j=n(69e3),v=n(77867),b=n(32885),C=e=>{var t;let{onClick:n}=e,{plus:i,dataFlowScanning:a}=(0,m.hz)(),l=(0,r.C)(b.bw),o=null!==(t=null==l?void 0:l.cluster_health)&&void 0!==t?t:"unknown",d=o===f.wW.HEALTHY;if(!i)return null;let h=null;return a?d||(h="Your cluster appears not to be healthy. Its status is ".concat(o,".")):h="The data flow scanner is not enabled, please check your configuration.",(0,s.jsxs)(c.xuv,{position:"relative",children:[(0,s.jsx)(c.esZ,{title:h,popupVisible:!!h,children:(0,s.jsx)("button",{disabled:!a||!d,type:"button","aria-label":"Data flow scan",className:"text-left",onClick:n,children:(0,s.jsx)(j.Z,{title:"Data flow scan",color:u().FIDESUI_NECTAR,description:"Automatically discover new systems in your Kubernetes infrastructure",icon:(0,s.jsx)(g.pt,{boxSize:6}),"data-testid":"data-flow-scan-btn"})})}),a?(0,s.jsx)(v.Z,{connected:d,title:d?"Cluster is connected and healthy":"Cluster is ".concat(o),position:"absolute",right:-1,top:-1,"data-testid":"cluster-health-indicator"}):null]})},w=n(38764);let S=e=>{let{children:t}=e;return(0,s.jsx)(c.X6q,{as:"h4",size:"xs",fontWeight:"semibold",color:"gray.600",textTransform:"uppercase",mb:4,children:t})};var k=()=>{let e=(0,r.T)(),t=(0,h.useRouter)(),{isOpen:n,onClose:i,onOpen:a}=(0,c.qY0)(),{dictionaryService:l}=(0,m.hz)();return(0,s.jsxs)(c.Kqy,{spacing:9,"data-testid":"add-systems",children:[(0,s.jsxs)(c.Kqy,{spacing:6,maxWidth:"600px",children:[(0,s.jsx)(c.X6q,{as:"h3",size:"md",fontWeight:"semibold",children:"Fides helps you map your systems to manage your privacy"}),(0,s.jsx)(c.xvT,{children:"In Fides, systems describe any services that store or process data for your organization, including third-party APIs, web applications, databases, and data warehouses."}),(0,s.jsx)(c.xvT,{children:"Fides can automatically discover new systems in your AWS infrastructure or Okta accounts. For services not covered by the automated scanners or analog processes, you may also manually add new systems to your map."})]}),(0,s.jsx)(p,{isOpen:n,onConfirm:()=>{window.open("https://fid.es/upgrade-compass")},onCancel:()=>{t.push(y.N5)},onClose:i}),(0,s.jsxs)(c.xuv,{"data-testid":"manual-options",children:[(0,s.jsx)(S,{children:"Manually add systems"}),(0,s.jsxs)(c.MIq,{columns:{base:1,md:2,xl:3},spacing:"4",children:[(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Add a system",onClick:()=>{e((0,o.CQ)(w.D.MANUAL)),t.push(y.N5)},"data-testid":"manual-btn",children:(0,s.jsx)(j.Z,{title:"Add a system",color:u().FIDESUI_SANDSTONE,icon:(0,s.jsx)(g.P$,{boxSize:6}),description:"Manually add a system for services not covered by automated scanners"})}),(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Add multiple systems",onClick:()=>{l?(e((0,o.CQ)(w.D.MANUAL)),t.push(y.bJ)):a()},"data-testid":"multiple-btn",children:(0,s.jsx)(j.Z,{title:"Add multiple systems",color:u().FIDESUI_OLIVE,icon:(0,s.jsx)(g.P$,{boxSize:6}),description:"Choose vendors and automatically populate system details"})})]})]}),(0,s.jsxs)(c.xuv,{"data-testid":"automated-options",children:[(0,s.jsx)(S,{children:"Automated infrastructure scanning"}),(0,s.jsxs)(c.MIq,{columns:{base:1,md:2,xl:3},spacing:"4",children:[(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Scan your infrastructure (AWS)",onClick:()=>{e((0,o.CQ)(f.GC.AWS)),e((0,o.sz)())},"data-testid":"aws-btn",children:(0,s.jsx)(j.Z,{title:"Scan your infrastructure (AWS)",color:u().FIDESUI_TERRACOTTA,description:"Automatically discover new systems in your AWS infrastructure",icon:(0,s.jsx)(g.bj,{boxSize:6})})}),(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Scan your Sign On Provider (Okta)",onClick:()=>{e((0,o.CQ)(f.GC.OKTA)),e((0,o.sz)())},"data-testid":"okta-btn",children:(0,s.jsx)(j.Z,{title:"Scan your Sign On Provider (Okta)",color:u().FIDESUI_MINOS,description:"Automatically discover new systems in your Okta infrastructure",icon:(0,s.jsx)(g.tb,{boxSize:6})})}),(0,s.jsx)(C,{onClick:()=>{e((0,o.sz)()),e((0,o.CQ)(w.D.DATA_FLOW))}})]})]})]})},T=n(34090),_=n(55484),A=n(40324),z=n(812),q=n(17245),I=n(97181),O=n(70788),D=n(28416);let N=e=>"system_type"in e,{useGenerateMutation:M}=n(78780).u.injectEndpoints({endpoints:e=>({generate:e.mutation({query:e=>({url:"generate",method:"POST",body:e})})})});var K=n(59301);let E=e=>{let{message:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.izJ,{}),(0,s.jsx)(c.W20,{maxH:"50vh",overflow:"auto",children:(0,s.jsx)(c.xvT,{as:"pre","data-testid":"error-log",children:t})}),(0,s.jsx)(c.izJ,{})]})};var Z=e=>{let{error:t,scanType:n=""}=e;return(0,s.jsxs)(c.Kqy,{"data-testid":"scanner-error",spacing:"4",children:[(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.j8w,{color:"error",children:"Error"}),(0,s.jsx)(c.X6q,{color:"red.500",size:"lg",children:"Failed to Scan"})]}),403===t.status&&n===f.GC.AWS?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"permission-msg",children:"Fides was unable to scan AWS. It appears that the credentials were valid to login but they did not have adequate permission to complete the scan."}),(0,s.jsxs)(c.xvT,{children:["To fix this issue, double check that you have granted"," ",(0,s.jsx)(K.Z,{href:D.zu,children:"the required permissions"})," ","to these credentials as part of your IAM policy. If you need more help in configuring IAM policies, you can read about them"," ",(0,s.jsx)(K.Z,{href:"https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_access-management.html",children:"here"}),"."]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"generic-msg",children:"Fides was unable to scan your infrastructure. Please ensure your credentials are accurate and inspect the error log below for more details."}),(0,s.jsx)(E,{message:t.message}),(0,s.jsxs)(c.xvT,{children:["If this error does not clarify why scanning failed, please"," ",(0,s.jsx)(K.Z,{href:D.we,children:"create a new issue"}),"."]})]})]})},R=n(57899);let F=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"Warning, you are about to cancel the scan!"}),(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"If you cancel scanning, the scanner will stop and no systems will be returned."}),(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"Are you sure you want to cancel?"})]});var W=e=>{let{title:t,onClose:n}=e,{isOpen:i,onOpen:r,onClose:a}=(0,c.qY0)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Kqy,{spacing:8,"data-testid":"scanner-loading",children:[(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.xvT,{alignItems:"center",as:"b",color:"gray.900",display:"flex",fontSize:"xl",children:t}),(0,s.jsx)(c.PZ7,{"data-testid":"close-scan-in-progress",display:"inline-block",onClick:r})]}),(0,s.jsx)(c.Kqy,{alignItems:"center",children:(0,s.jsx)(c.$jN,{thickness:"4px",speed:"0.65s",emptyColor:"gray.200",color:"green.300",size:"xl"})})]}),(0,s.jsx)(R.Z,{isOpen:i,onClose:a,handleConfirm:n,title:"Cancel Scan!",message:F,confirmButtonText:"Yes, Cancel",cancelButtonText:"No, Continue Scanning"})]})};let P={aws_access_key_id:"",aws_secret_access_key:"",aws_session_token:"",region_name:""},U=_.Ry().shape({aws_access_key_id:_.Z_().required().trim().matches(/^\w+$/,"Cannot contain spaces or special characters").label("Access Key ID"),aws_secret_access_key:_.Z_().required().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Secret"),aws_session_token:_.Z_().optional().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Session Token (for temporary credentials)"),region_name:_.Z_().required().label("Default Region")});var B=()=>{let e=(0,r.C)(o.De),t=(0,r.T)(),{successAlert:n}=(0,q.VY)(),[a,l]=(0,i.useState)(),d=e=>{let s=(null!=e?e:[]).filter(N);t((0,o.un)(s)),t((0,o.sz)()),n("Your scan was successfully completed, with ".concat(s.length," new systems detected!"),"Scan Successfully Completed",{isClosable:!0})},u=e=>{l((0,z.nU)(e,{status:500,message:"Our system encountered a problem while connecting to AWS."}))},h=()=>{t((0,o.sz)(2))},[m,{isLoading:g}]=M(),x=async t=>{l(void 0);let n=await m({organization_key:e,generate:{config:t,target:f.GC.AWS,type:f.j.SYSTEMS}});(0,z.D4)(n)?u(n.error):d(n.data.generate_results)};return(0,s.jsx)(T.J9,{initialValues:P,validationSchema:U,onSubmit:x,children:e=>{let{isValid:t,isSubmitting:n,dirty:i}=e;return(0,s.jsx)(T.l0,{"data-testid":"authenticate-aws-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[n?(0,s.jsx)(W,{title:"System scanning in progress",onClose:h}):null,a?(0,s.jsx)(Z,{error:a,scanType:"aws"}):null,n||a?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(O.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),h()}},{title:"Authenticate AWS Scanner"}]}),(0,s.jsx)(c.xvT,{children:"To use the scanner to inventory systems in AWS, you must first authenticate to your AWS cloud by providing the following information:"})]}),(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(A.j0,{name:"aws_access_key_id",label:"Access Key ID",tooltip:"The Access Key ID created by the cloud hosting provider.",isRequired:!0}),(0,s.jsx)(A.j0,{type:"password",name:"aws_secret_access_key",label:"Secret",tooltip:"The secret associated with the Access Key ID used for authentication.",isRequired:!0}),(0,s.jsx)(A.j0,{type:"password",name:"aws_session_token",label:"Session Token",tooltip:"The session token when using temporary credentials."}),(0,s.jsx)(I.d,{name:"region_name",label:"AWS Region",tooltip:"The geographic region of the cloud hosting provider you would like to scan.",options:D.xO,isRequired:!0,placeholder:"Select a region"})]})]}),n?null:(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:h,children:"Cancel"}),(0,s.jsx)(c.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:g,"data-testid":"submit-btn",children:"Save and continue"})]})]})})}})};let X={orgUrl:"",token:""},L=_.Ry().shape({orgUrl:_.Z_().required().trim().url().label("URL"),token:_.Z_().required().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Token")});var Y=()=>{let e=(0,r.C)(o.De),t=(0,r.T)(),{successAlert:n}=(0,q.VY)(),[a,l]=(0,i.useState)(),d=e=>{let s=(null!=e?e:[]).filter(N);t((0,o.un)(s)),t((0,o.sz)()),n("Your scan was successfully completed, with ".concat(s.length," new systems detected!"),"Scan Successfully Completed",{isClosable:!0})},u=e=>{l((0,z.nU)(e,{status:500,message:"Our system encountered a problem while connecting to Okta."}))},h=()=>{t((0,o.sz)(2))},[m,{isLoading:g}]=M(),x=async t=>{l(void 0);let n=await m({organization_key:e,generate:{config:t,target:f.GC.OKTA,type:f.j.SYSTEMS}});(0,z.D4)(n)?u(n.error):d(n.data.generate_results)};return(0,s.jsx)(T.J9,{initialValues:X,validationSchema:L,onSubmit:x,children:e=>{let{isValid:t,isSubmitting:n,dirty:i}=e;return(0,s.jsx)(T.l0,{"data-testid":"authenticate-okta-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[n?(0,s.jsx)(W,{title:"System scanning in progress",onClose:h}):null,a?(0,s.jsx)(Z,{error:a}):null,n||a?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(O.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),h()}},{title:"Authenticate Okta Scanner"}]}),(0,s.jsx)(c.xvT,{children:"To use the scanner to inventory systems in Okta, you must first authenticate to your Okta account by providing the following information:"})]}),(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(A.j0,{name:"orgUrl",label:"Domain",tooltip:"The URL for your organization's account on Okta"}),(0,s.jsx)(A.j0,{name:"token",label:"Okta token",type:"password",tooltip:"The token generated by Okta for your account."})]})]}),n?null:(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:h,children:"Cancel"}),(0,s.jsx)(c.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:g,"data-testid":"submit-btn",children:"Save and continue"})]})]})})}})},V=n(46628),J=n(31883),Q=()=>{let e=(0,r.T)(),t=(0,c.pmc)(),[n]=(0,b.J9)(),[a,{data:l}]=(0,b.KW)(),[d,u]=(0,i.useState)(),[h,m]=(0,i.useState)(!1),g=e=>{u((0,z.nU)(e,{status:500,message:"Our system encountered a problem while scanning your infrastructure."}))};(0,i.useEffect)(()=>{(async()=>{let{error:e}=await n();m(!(e&&(0,J.Bw)(e)&&404===e.status));let t=await a({classify:!0});(0,z.D4)(t)&&g(t.error)})()},[a,n]),(0,i.useEffect)(()=>{(async()=>{if(l){let{data:s}=await n(),i=h?(null==s?void 0:s.added_systems)||[]:l.systems;t((0,V.t5)("Your scan was successfully completed, with ".concat(i.length," new systems detected!"))),e((0,o.un)(i)),e((0,o.sz)())}})()},[l,t,e,h,n]);let x=()=>{e((0,o.sz)(2))};return d?(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(Z,{error:d}),(0,s.jsx)(c.xuv,{children:(0,s.jsx)(c.wpx,{onClick:x,"data-testid":"cancel-btn",children:"Cancel"})})]}):(0,s.jsx)(W,{title:"Infrastructure scanning in progress",onClose:x})},$=()=>{let e=(0,r.C)(o.Ll);return(0,s.jsxs)(c.xuv,{w:"40%",children:[e===f.GC.AWS?(0,s.jsx)(B,{}):null,e===f.GC.OKTA?(0,s.jsx)(Y,{}):null,e===w.D.DATA_FLOW?(0,s.jsx)(Q,{}):null]})},G=n(83265),H=n(46238);let ee=()=>{var e,t;let n=(0,r.T)(),s=e=>{n((0,o.nD)(e)),n((0,o.sz)())},[a]=(0,G.vz)(),[l]=(0,G.$f)(),{data:d,isLoading:u}=(0,G.GQ)(G.Av),[h,m]=(0,i.useState)(!1);(0,i.useEffect)(()=>{!u&&!h&&(null==d?void 0:d.name)&&(null==d?void 0:d.description)&&n((0,o.sz)())},[u,d,n,h]);let g=(0,c.pmc)();return(0,T.TA)({initialValues:{name:null!==(e=null==d?void 0:d.name)&&void 0!==e?e:"",description:null!==(t=null==d?void 0:d.description)&&void 0!==t?t:""},onSubmit:async e=>{var t,n,i;m(!0);let r={name:null!==(t=e.name)&&void 0!==t?t:null==d?void 0:d.name,description:null!==(n=e.description)&&void 0!==n?n:null==d?void 0:d.description,fides_key:null!==(i=null==d?void 0:d.fides_key)&&void 0!==i?i:G.Av,organization_fides_key:G.Av};if(d){let e=await l(r);if((0,z.D4)(e)){g({status:"error",description:(0,z.e$)(e.error)});return}g.closeAll(),s(r)}else{let e=await a(r);if((0,z.D4)(e)){g({status:"error",description:(0,z.e$)(e.error)});return}g.closeAll(),s(r)}},enableReinitialize:!0,validate:e=>{let t={};return e.name||(t.name="Organization name is required"),e.description||(t.description="Organization description is required"),t}})};var et=()=>{let{errors:e,handleBlur:t,handleChange:n,handleSubmit:i,touched:r,values:a,isSubmitting:l}=ee();return(0,s.jsx)(c.m$N.form,{onSubmit:i,w:"40%","data-testid":"organization-info-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[(0,s.jsx)(c.X6q,{as:"h3",size:"lg",children:"Create your Organization"}),(0,s.jsx)("div",{children:"Provide your organization information. This information is used to configure your organization in Fides for data map reporting purposes."}),(0,s.jsx)(c.Kqy,{children:(0,s.jsxs)(c.NIc,{children:[(0,s.jsxs)(c.Kqy,{direction:"row",mb:5,justifyContent:"flex-end",children:[(0,s.jsx)(c.lXp,{w:"100%",children:"Organization name"}),(0,s.jsx)(c.IIB,{type:"text",id:"name",name:"name",focusBorderColor:"gray.700",onChange:n,onBlur:t,value:a.name,isInvalid:r.name&&!!e.name,minW:"65%",w:"65%","data-testid":"input-name"}),(0,s.jsx)(H.b,{label:"The legal name of your organization"})]}),(0,s.jsxs)(c.Kqy,{direction:"row",justifyContent:"flex-end",children:[(0,s.jsx)(c.lXp,{w:"100%",children:"Description"}),(0,s.jsx)(c.IIB,{type:"text",id:"description",name:"description",focusBorderColor:"gray.700",onChange:n,onBlur:t,value:a.description,isInvalid:r.description&&!!e.description,minW:"65%",w:"65%","data-testid":"input-description"}),(0,s.jsx)(H.b,{label:'An explanation of the type of organization and primary activity. For example "Acme Inc. is an e-commerce company that sells scarves."'})]})]})}),(0,s.jsx)(c.wpx,{type:"primary",htmlType:"submit",disabled:!a.name||!a.description,loading:l,"data-testid":"submit-btn",children:"Save and continue"})]})})},en=e=>{let{allColumns:t,selectedColumns:n,onChange:r}=e,a=(0,i.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.name,!!n.find(e=>e.name===t.name))),e},[t,n]),l=()=>{a.forEach((e,t)=>a.set(t,!1)),r([])},o=e=>{var n;let s=null!==(n=a.get(e.name))&&void 0!==n&&n;a.set(e.name,!s),r(t.filter(e=>a.get(e.name)))};return(0,s.jsx)(c.v2r,{children:e=>{let{onClose:i}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.j2t,{as:c.wpx,icon:(0,s.jsx)(c.mCO,{}),fontWeight:"normal","data-testid":"column-dropdown",children:"Columns"}),(0,s.jsx)(c.qyq,{children:(0,s.jsxs)(c.xuv,{px:2,children:[(0,s.jsxs)(c.xuv,{display:"flex",justifyContent:"space-between",mb:2,children:[(0,s.jsx)(c.wpx,{size:"small",onClick:l,"data-testid":"column-clear-btn",children:"Clear"}),(0,s.jsx)(c.wpx,{type:"primary",size:"small",onClick:i,"data-testid":"column-done-btn",children:"Done"})]}),(0,s.jsx)(c.cOn,{colorScheme:"complimentary",children:(0,s.jsx)(c.Kqy,{children:t.map(e=>{let t=n.filter(t=>t.name===e.name).length>0;return(0,s.jsx)(c.XZJ,{id:e.name,_hover:{bg:"gray.100"},isChecked:t,onChange:()=>o(e),"data-testid":"checkbox-".concat(e.name),children:e.name},e.name)})})})]})})]})}})},es=n(16220);let ei=(e,t)=>t.split(".").reduce((e,t)=>e?e[t]:void 0,e),er=e=>{let{system:t,attribute:n}=e;if("name"===n)return(0,s.jsx)("label",{htmlFor:"checkbox-".concat(t.fides_key),children:t.name});if("fidesctl_meta.resource_id"===n){var i,r;return(0,s.jsx)(c.xuv,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",title:(null===(i=t.fidesctl_meta)||void 0===i?void 0:i.resource_id)||"",children:null===(r=t.fidesctl_meta)||void 0===r?void 0:r.resource_id})}return(0,s.jsx)(s.Fragment,{children:ei(t,n)})},ea=e=>{let{allSystems:t,checked:n,onChange:i,columns:r,tableHeadProps:a}=e,l=e=>{n.indexOf(e)>=0?i(n.filter(t=>t.fides_key!==e.fides_key)):i([...n,e])},o=t.length===n.length;return 0===r.length?(0,s.jsx)(c.xvT,{children:"No columns selected to display"}):(0,s.jsxs)(c.iA_,{size:"sm",sx:{tableLayout:"fixed"},children:[(0,s.jsx)(c.hrZ,{...a,children:(0,s.jsxs)(c.Tr,{children:[(0,s.jsx)(c.Th,{width:"15px",children:(0,s.jsx)(c.XZJ,{colorScheme:"complimentary",title:"Select All",isChecked:o,onChange:e=>{e.target.checked?i(t):i([])},"data-testid":"select-all"})}),r.map(e=>(0,s.jsx)(c.Th,{children:e.name},e.attribute))]})}),(0,s.jsx)(c.p3B,{children:t.map(e=>(0,s.jsxs)(c.Tr,{children:[(0,s.jsx)(c.Td,{children:(0,s.jsx)(c.XZJ,{colorScheme:"complimentary",value:e.fides_key,isChecked:n.indexOf(e)>=0,onChange:()=>l(e),"data-testid":"checkbox-".concat(e.fides_key)})}),r.map(t=>(0,s.jsx)(c.Td,{children:(0,s.jsx)(er,{system:e,attribute:t.attribute})},t.attribute))]},e.fides_key))})]})};var el=n(1315);let eo=[{name:"Name",attribute:"name"},{name:"System type",attribute:"system_type"},{name:"Resource ID",attribute:"fidesctl_meta.resource_id"}];var ec=()=>{let e=(0,r.C)(o.j4),t=(0,r.T)(),n=(0,h.useRouter)(),{systemOrDatamapRoute:a}=(0,es.V)(),{isOpen:l,onOpen:d,onClose:u}=(0,c.qY0)(),[m]=(0,el.dB)(),[g,x]=(0,i.useState)(e),[p,y]=(0,i.useState)(eo),{handleError:f}=(0,q.HK)(),j=e=>{n.push(e).then(()=>{t((0,o.mc)())})},v=async()=>{let e=await m(g);return(0,z.D4)(e)?f(e.error):j(a)},b=()=>{t((0,o.sz)(2))},C=(0,s.jsxs)(c.xvT,{color:"gray.500",mb:3,children:["You’re registering ",g.length," of ",e.length," systems available. Do you want to continue with registration or cancel and register all systems now?"]});return(0,s.jsxs)(c.xuv,{maxW:"full",children:[(0,s.jsxs)(c.Kqy,{spacing:10,"data-testid":"scan-results",children:[(0,s.jsx)(O.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),b()}},{title:"Authenticate"},{title:"Scan results"}]}),0===e.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"no-results",children:"No results were found for your infrastructure scan."}),(0,s.jsx)(c.Ugi,{children:(0,s.jsx)(c.wpx,{onClick:b,"data-testid":"back-btn",children:"Back"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(c.xvT,{children:"Below are the results of your infrastructure scan. To continue, select the systems you would like registered in your data map and reports."}),(0,s.jsx)(c.xuv,{display:"flex",justifyContent:"end",children:(0,s.jsx)(en,{allColumns:eo,selectedColumns:p,onChange:y})})]}),(0,s.jsx)(ea,{allSystems:e,checked:g,onChange:x,columns:p}),(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:b,children:"Back"}),(0,s.jsx)(c.wpx,{onClick:()=>{e.length>g.length?d():v()},type:"primary",disabled:0===g.length,"data-testid":"register-btn",children:"Register selected systems"})]})]})]}),(0,s.jsx)(R.Z,{title:"Warning",message:C,handleConfirm:v,isOpen:l,onClose:u})]})},ed=()=>{let e=(0,r.C)(o.xx);return(0,s.jsx)(c.Kqy,{direction:["column","row"],bg:"white",children:(0,s.jsxs)(c.xuv,{display:"flex",justifyContent:"flex-start",w:"100%",children:[1===e?(0,s.jsx)(et,{}):null,2===e?(0,s.jsx)(k,{}):null,3===e?(0,s.jsx)($,{}):null,4===e?(0,s.jsx)(c.xuv,{pr:10,children:(0,s.jsx)(ec,{})}):null]})})},eu=()=>{let e=(0,r.T)();return(0,i.useEffect)(()=>{e((0,o.sz)(2))},[e]),(0,s.jsxs)(a.Z,{title:"Add systems",children:[(0,s.jsx)(l.Z,{heading:"Add systems"}),(0,s.jsx)(ed,{})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=n(19043)},91507:function(e){e.exports={container:"CalloutNavCard_container__DXPJb",card:"CalloutNavCard_card__q_XX6"}}},function(e){e.O(0,[431,2888,9774,179],function(){return e(e.s=74245)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3422],{15806:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/consent/reporting",function(){return n(45113)}])},35287:function(e,a,n){"use strict";var r=n(24246),t=n(96306),i=n(88038),s=n.n(i);n(27378),a.Z=e=>{let{children:a,title:n,mainProps:i}=e;return(0,r.jsxs)(t.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,r.jsxs)(s(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsx)(t.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:a})]})}},58754:function(e,a,n){"use strict";var r=n(24246),t=n(96306),i=n(70788);a.Z=e=>{let{heading:a,breadcrumbItems:n,isSticky:s=!0,children:o,rightContent:l,style:d,...c}=e;return(0,r.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,r.jsxs)(t.jqI,{justify:"space-between",children:["string"==typeof a?(0,r.jsx)(t.lQT,{className:n||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:a}):a,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,r.jsx)(i.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},17245:function(e,a,n){"use strict";n.d(a,{HK:function(){return s},VY:function(){return t.V},pI:function(){return c},h0:function(){return r.h},Rx:function(){return F},rK:function(){return h}});var r=n(36866),t=n(84306),i=n(812);let s=()=>{let{errorAlert:e}=(0,t.V)();return{handleError:a=>{let n="An unexpected error occurred. Please try again.";(0,i.Ot)(a)?n=a.data.detail:(0,i.tB)(a)&&(n=a.data.detail[0].msg),e(n)}}};var o=n(27378),l=n(20682),d=n(21910);let c=e=>{let{data:a}=(0,l.$I)({}),n=(0,o.useMemo)(()=>(null==a?void 0:a.items)||[],[a]);return(0,o.useMemo)(()=>{var a;if(!e)return"";if(e.connection_type===d.Rj.SAAS&&(null===(a=e.saas_config)||void 0===a?void 0:a.type)){let a=n.find(a=>{var n;return a.identifier===(null===(n=e.saas_config)||void 0===n?void 0:n.type)});if(a)return a}return e},[e,n])};var _=n(40431);let u=()=>({search:_.Oi.withDefault("")}),F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:a,onSearchChange:n}=e,r=(0,o.useMemo)(()=>u(),[]),[t,i]=(0,_.XI)(r,{history:"push"}),s=(0,o.useMemo)(()=>({searchQuery:t.search||a||void 0}),[t,a]),l=(0,o.useCallback)(e=>{i({search:e||null})},[i]),d=(0,o.useCallback)(()=>{i({search:null})},[i]);return(0,o.useEffect)(()=>{n&&n(s)},[s,n]),{...s,updateSearch:l,resetSearch:d,searchProps:{value:s.searchQuery||"",onChange:l,onClear:()=>l("")}}},p=e=>({sortKey:e?(0,_.jx)([...e]):_.Oi.withDefault(""),sortOrder:(0,_.km)(["ascend","descend"])}),h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:a,defaultSortOrder:n,onSortingChange:r,validColumns:t}=e,i=(0,o.useMemo)(()=>p(t),[t]),[s,l]=(0,_.XI)(i,{history:"push"}),d=(0,o.useMemo)(()=>{var e;return{sortKey:s.sortKey||a,sortOrder:null!==(e=s.sortOrder)&&void 0!==e?e:n}},[s,a,n]),c=(0,o.useCallback)((e,a)=>{l({sortKey:e?String(e):null,sortOrder:null!=a?a:null})},[l]),u=(0,o.useCallback)(()=>{l({sortKey:null,sortOrder:null})},[l]);return(0,o.useEffect)(()=>{r&&r(d)},[d,r]),{...d,updateSorting:c,resetSorting:u,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:d.sortOrder,sortedInfo:d.sortKey?{field:d.sortKey,order:d.sortOrder}:void 0}}}},84306:function(e,a,n){"use strict";n.d(a,{V:function(){return i}});var r=n(24246),t=n(96306);let i=()=>{let e=(0,t.pmc)();return{errorAlert:(a,n,i)=>{let s={...i,position:(null==i?void 0:i.position)||"top",render:e=>{let{onClose:i}=e;return(0,r.jsxs)(t.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(t.zMQ,{}),(0,r.jsxs)(t.xuv,{children:[n&&(0,r.jsx)(t.CdC,{children:n}),(0,r.jsx)(t.XaZ,{children:a})]}),(0,r.jsx)(t.PZ7,{onClick:i,position:"relative",right:0,size:"sm",top:-1})]})}};(null==i?void 0:i.id)&&e.isActive(i.id)?e.update(i.id,s):e(s)},successAlert:(a,n,i)=>{let s={...i,position:(null==i?void 0:i.position)||"top",render:e=>{let{onClose:i}=e;return(0,r.jsxs)(t.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(t.zMQ,{}),(0,r.jsxs)(t.xuv,{children:[n&&(0,r.jsx)(t.CdC,{children:n}),(0,r.jsx)(t.XaZ,{children:a})]}),(0,r.jsx)(t.PZ7,{onClick:i,position:"relative",right:0,size:"sm",top:-1})]})}};(null==i?void 0:i.id)&&e.isActive(i.id)?e.update(i.id,s):e(s)}}}},70788:function(e,a,n){"use strict";n.d(a,{m:function(){return d}});var r=n(24246),t=n(96306),i=n(79894),s=n.n(i),o=n(27378);let{Text:l}=t.AntTypography,d=e=>{let{items:a,...n}=e,i=(0,o.useMemo)(()=>null==a?void 0:a.map((e,n)=>{let i=n===a.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:i?void 0:400},ellipsis:!i,id:i?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,r.jsx)(t.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,r.jsx)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[a]);return(0,r.jsx)(t.zrq,{items:i,...n})}},36866:function(e,a,n){"use strict";n.d(a,{h:function(){return d}});var r=n(40431),t=n(27378),i=n(55484);let s=(0,r.jo)({parse(e){let a=parseInt(e,10);try{return i.Rx().integer().positive().validateSync(a),a}catch(e){return null}},serialize:e=>e.toString()});var o=n(32735);let l=function(){var e,a;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:s.withDefault(o.Ej),size:n.pageSizeOptions?(0,r.bJ)(n.pageSizeOptions).withDefault(null!==(e=n.pageSize)&&void 0!==e?e:o.L8):s.withDefault(null!==(a=n.pageSize)&&void 0!==a?a:o.L8)}},d=function(){var e,a;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:i=o.L8,pageSizeOptions:s,showSizeChanger:d=!0}=n,c=null!=s?s:o.VZ,_=(0,t.useMemo)(()=>l({pageSize:i,pageSizeOptions:s}),[i,s]),[u,F]=(0,r.XI)(_,{history:"push"}),p={pageIndex:null!==(e=u.page)&&void 0!==e?e:o.Ej,pageSize:null!==(a=u.size)&&void 0!==a?a:i};return{...p,updatePageIndex:e=>{F({page:e})},updatePageSize:e=>{F({page:e!==p.pageSize?o.Ej:p.pageIndex,size:e})},resetPagination:()=>{F({page:o.Ej,size:i})},nextPage:()=>{F(e=>{let{page:a,size:n}=e;return{page:a+1,size:n}})},previousPage:()=>{F(e=>{let{page:a,size:n}=e;return{page:a-1,size:n}})},pageSizeOptions:c,showSizeChanger:d}}},8411:function(e,a,n){"use strict";n.d(a,{NA:function(){return i},Z8:function(){return t}});var r=n(21910);let t={[r._F.ER]:"Eritrea",[r._F.DJ]:"Djibouti",[r._F.MR]:"Mauritania",[r._F.NA]:"Namibia",[r._F.GH]:"Ghana",[r._F.SS]:"South Sudan",[r._F.SC]:"Seychelles",[r._F.IO]:"British Indian Ocean Territory",[r._F.GQ]:"Equatorial Guinea",[r._F.AO]:"Angola",[r._F.CG]:"Republic of the Congo",[r._F.BW]:"Botswana",[r._F.BI]:"Burundi",[r._F.DZ]:"Algeria",[r._F.TD]:"Chad",[r._F.NG]:"Nigeria",[r._F.TZ]:"Tanzania",[r._F.EH]:"Western Sahara",[r._F.SN]:"Senegal",[r._F.LR]:"Liberia",[r._F.ZA]:"South Africa",[r._F.CV]:"Cape Verde",[r._F.GM]:"Gambia",[r._F.SD]:"Sudan",[r._F.KM]:"Comoros",[r._F.SZ]:"Eswatini",[r._F.UG]:"Uganda",[r._F.MG]:"Madagascar",[r._F.RW]:"Rwanda",[r._F.CD]:"DR Congo",[r._F.CM]:"Cameroon",[r._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[r._F.TG]:"Togo",[r._F.MU]:"Mauritius",[r._F.NE]:"Niger",[r._F.BJ]:"Benin",[r._F.EG]:"Egypt",[r._F.LS]:"Lesotho",[r._F.ET]:"Ethiopia",[r._F.MA]:"Morocco",[r._F.YT]:"Mayotte",[r._F.BF]:"Burkina Faso",[r._F.RE]:"R\xe9union",[r._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[r._F.CF]:"Central African Republic",[r._F.MZ]:"Mozambique",[r._F.MW]:"Malawi",[r._F.ML]:"Mali",[r._F.ZM]:"Zambia",[r._F.LY]:"Libya",[r._F.GW]:"Guinea-Bissau",[r._F.SO]:"Somalia",[r._F.KE]:"Kenya",[r._F.GN]:"Guinea",[r._F.ZW]:"Zimbabwe",[r._F.TN]:"Tunisia",[r._F.SL]:"Sierra Leone",[r._F.GA]:"Gabon",[r._F.CI]:"Ivory Coast",[r._F.JO]:"Jordan",[r._F.PK]:"Pakistan",[r._F.KP]:"North Korea",[r._F.MO]:"Macau",[r._F.AM]:"Armenia",[r._F.SY]:"Syria",[r._F.TJ]:"Tajikistan",[r._F.SA]:"Saudi Arabia",[r._F.KR]:"South Korea",[r._F.NP]:"Nepal",[r._F.PH]:"Philippines",[r._F.IQ]:"Iraq",[r._F.LB]:"Lebanon",[r._F.MN]:"Mongolia",[r._F.PS]:"Palestine",[r._F.YE]:"Yemen",[r._F.JP]:"Japan",[r._F.KZ]:"Kazakhstan",[r._F.LK]:"Sri Lanka",[r._F.MM]:"Myanmar",[r._F.KG]:"Kyrgyzstan",[r._F.CN]:"China",[r._F.AF]:"Afghanistan",[r._F.OM]:"Oman",[r._F.IN]:"India",[r._F.LA]:"Laos",[r._F.UZ]:"Uzbekistan",[r._F.MV]:"Maldives",[r._F.ID]:"Indonesia",[r._F.VN]:"Vietnam",[r._F.MY]:"Malaysia",[r._F.TW]:"Taiwan",[r._F.KH]:"Cambodia",[r._F.AE]:"United Arab Emirates",[r._F.HK]:"Hong Kong",[r._F.GE]:"Georgia (Country)",[r._F.BD]:"Bangladesh",[r._F.KW]:"Kuwait",[r._F.TM]:"Turkmenistan",[r._F.QA]:"Qatar",[r._F.BH]:"Bahrain",[r._F.BN]:"Brunei",[r._F.TH]:"Thailand",[r._F.BT]:"Bhutan",[r._F.SG]:"Singapore",[r._F.IL]:"Israel",[r._F.AZ]:"Azerbaijan",[r._F.TL]:"Timor-Leste",[r._F.IR]:"Iran",[r._F.TR]:"Turkey",[r._F.MK]:"North Macedonia",[r._F.IE]:"Ireland",[r._F.DK]:"Denmark",[r._F.SK]:"Slovakia",[r._F.MD]:"Moldova",[r._F.AX]:"\xc5land Islands",[r._F.PL]:"Poland",[r._F.BA]:"Bosnia and Herzegovina",[r._F.SM]:"San Marino",[r._F.CZ]:"Czechia",[r._F.EE]:"Estonia",[r._F.XK]:"Kosovo",[r._F.FO]:"Faroe Islands",[r._F.SJ]:"Svalbard and Jan Mayen",[r._F.GG]:"Guernsey",[r._F.FR]:"France",[r._F.NL]:"Netherlands",[r._F.FI]:"Finland",[r._F.PT]:"Portugal",[r._F.DE]:"Germany",[r._F.MT]:"Malta",[r._F.JE]:"Jersey",[r._F.IS]:"Iceland",[r._F.ES]:"Spain",[r._F.GI]:"Gibraltar",[r._F.NO]:"Norway",[r._F.CY]:"Cyprus",[r._F.RS]:"Serbia",[r._F.LT]:"Lithuania",[r._F.MC]:"Monaco",[r._F.LU]:"Luxembourg",[r._F.UA]:"Ukraine",[r._F.IM]:"Isle of Man",[r._F.RO]:"Romania",[r._F.BE]:"Belgium",[r._F.SE]:"Sweden",[r._F.ME]:"Montenegro",[r._F.LV]:"Latvia",[r._F.VA]:"Vatican City",[r._F.AT]:"Austria",[r._F.AL]:"Albania",[r._F.LI]:"Liechtenstein",[r._F.GR]:"Greece",[r._F.IT]:"Italy",[r._F.AD]:"Andorra",[r._F.GB]:"United Kingdom",[r._F.RU]:"Russia",[r._F.SI]:"Slovenia",[r._F.BY]:"Belarus",[r._F.CH]:"Switzerland",[r._F.HU]:"Hungary",[r._F.BG]:"Bulgaria",[r._F.HR]:"Croatia",[r._F.TC]:"Turks and Caicos Islands",[r._F.CW]:"Cura\xe7ao",[r._F.GP]:"Guadeloupe",[r._F.UM]:"United States Minor Outlying Islands",[r._F.GT]:"Guatemala",[r._F.PM]:"Saint Pierre and Miquelon",[r._F.BQ]:"Caribbean Netherlands",[r._F.GL]:"Greenland",[r._F.SX]:"Sint Maarten",[r._F.PA]:"Panama",[r._F.AW]:"Aruba",[r._F.MQ]:"Martinique",[r._F.AG]:"Antigua and Barbuda",[r._F.BM]:"Bermuda",[r._F.CU]:"Cuba",[r._F.GD]:"Grenada",[r._F.NI]:"Nicaragua",[r._F.LC]:"Saint Lucia",[r._F.KN]:"Saint Kitts and Nevis",[r._F.DO]:"Dominican Republic",[r._F.VC]:"Saint Vincent and the Grenadines",[r._F.BZ]:"Belize",[r._F.HT]:"Haiti",[r._F.JM]:"Jamaica",[r._F.BS]:"Bahamas",[r._F.MX]:"Mexico",[r._F.MF]:"Saint Martin",[r._F.SV]:"El Salvador",[r._F.BL]:"Saint Barth\xe9lemy",[r._F.AI]:"Anguilla",[r._F.MS]:"Montserrat",[r._F.VG]:"British Virgin Islands",[r._F.BB]:"Barbados",[r._F.HN]:"Honduras",[r._F.KY]:"Cayman Islands",[r._F.DM]:"Dominica",[r._F.TT]:"Trinidad and Tobago",[r._F.CR]:"Costa Rica",[r._F.SR]:"Suriname",[r._F.CX]:"Christmas Island",[r._F.WS]:"Samoa",[r._F.PF]:"French Polynesia",[r._F.AS]:"American Samoa",[r._F.NC]:"New Caledonia",[r._F.TK]:"Tokelau",[r._F.PW]:"Palau",[r._F.KI]:"Kiribati",[r._F.VU]:"Vanuatu",[r._F.PN]:"Pitcairn Islands",[r._F.CK]:"Cook Islands",[r._F.FJ]:"Fiji",[r._F.PG]:"Papua New Guinea",[r._F.MP]:"Northern Mariana Islands",[r._F.NU]:"Niue",[r._F.TV]:"Tuvalu",[r._F.NF]:"Norfolk Island",[r._F.TO]:"Tonga",[r._F.FM]:"Micronesia",[r._F.SB]:"Solomon Islands",[r._F.NR]:"Nauru",[r._F.WF]:"Wallis and Futuna",[r._F.GU]:"Guam",[r._F.AU]:"Australia",[r._F.NZ]:"New Zealand",[r._F.MH]:"Marshall Islands",[r._F.CC]:"Cocos (Keeling) Islands",[r._F.VE]:"Venezuela",[r._F.PY]:"Paraguay",[r._F.BR]:"Brazil",[r._F.CO]:"Colombia",[r._F.PE]:"Peru",[r._F.CL]:"Chile",[r._F.UY]:"Uruguay",[r._F.AR]:"Argentina",[r._F.GY]:"Guyana",[r._F.BO]:"Bolivia",[r._F.GF]:"French Guiana",[r._F.EC]:"Ecuador",[r._F.FK]:"Falkland Islands",[r._F.US_AL]:"Alabama",[r._F.US_AK]:"Alaska",[r._F.US_AZ]:"Arizona",[r._F.US_AR]:"Arkansas",[r._F.US_CA]:"California",[r._F.US_CO]:"Colorado",[r._F.US_CT]:"Connecticut",[r._F.US_DE]:"Delaware",[r._F.US_DC]:"District of Columbia (DC)",[r._F.US_FL]:"Florida",[r._F.US_GA]:"Georgia",[r._F.US_HI]:"Hawaii",[r._F.US_ID]:"Idaho",[r._F.US_IL]:"Illinois",[r._F.US_IN]:"Indiana",[r._F.US_IA]:"Iowa",[r._F.US_KS]:"Kansas",[r._F.US_KY]:"Kentucky",[r._F.US_LA]:"Louisiana",[r._F.US_ME]:"Maine",[r._F.US_MD]:"Maryland",[r._F.US_MA]:"Massachusetts",[r._F.US_MI]:"Michigan",[r._F.US_MN]:"Minnesota",[r._F.US_MS]:"Mississippi",[r._F.US_MO]:"Missouri",[r._F.US_MT]:"Montana",[r._F.US_NE]:"Nebraska",[r._F.US_NV]:"Nevada",[r._F.US_NH]:"New Hampshire",[r._F.US_NJ]:"New Jersey",[r._F.US_NM]:"New Mexico",[r._F.US_NY]:"New York",[r._F.US_NC]:"North Carolina",[r._F.US_ND]:"North Dakota",[r._F.US_OH]:"Ohio",[r._F.US_OK]:"Oklahoma",[r._F.US_OR]:"Oregon",[r._F.US_PA]:"Pennsylvania",[r._F.US_PR]:"Puerto Rico",[r._F.US_RI]:"Rhode Island",[r._F.US_SC]:"South Carolina",[r._F.US_SD]:"South Dakota",[r._F.US_TN]:"Tennessee",[r._F.US_TX]:"Texas",[r._F.US_UT]:"Utah",[r._F.US_VA]:"Virginia",[r._F.US_VI]:"United States Virgin Islands",[r._F.US_VT]:"Vermont",[r._F.US_WA]:"Washington",[r._F.US_WV]:"West Virginia",[r._F.US_WI]:"Wisconsin",[r._F.US_WY]:"Wyoming",[r._F.CA_AB]:"Alberta",[r._F.CA_BC]:"British Columbia",[r._F.CA_MB]:"Manitoba",[r._F.CA_NB]:"New Brunswick",[r._F.CA_NL]:"Newfoundland and Labrador",[r._F.CA_NS]:"Nova Scotia",[r._F.CA_ON]:"Ontario",[r._F.CA_PE]:"Prince Edward Island",[r._F.CA_QC]:"Quebec",[r._F.CA_SK]:"Saskatchewan",[r._F.CA_NT]:"Northwest Territories",[r._F.CA_NU]:"Nunavut",[r._F.CA_YT]:"Yukon",[r._F.CA]:"Canada",[r._F.US]:"United States",[r._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[r._F.CARIBBEAN]:"Caribbean",[r._F.EEA]:"European Economic Area (EEA)",[r._F.NON_EEA]:"Non European Economic Area",[r._F.GLOBAL]:"Global"},i=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},45113:function(e,a,n){"use strict";n.r(a),n.d(a,{default:function(){return V}});var r=n(24246),t=n(59003),i=n(92222),s=n(27693),o=n.n(s),l=n(96306),d=n(27378),c=n(35287),_=n(17245),u=n(58754);let F=e=>{let{disableNext:a,pagination:n}=e;return(0,r.jsxs)(l.jqI,{gap:"middle",align:"center",justify:"right",children:[(0,r.jsx)(l.wpx,{onClick:n.previousPage,disabled:1===n.pageIndex,icon:(0,r.jsx)(l.PJP.s$$,{"aria-hidden":!0}),"aria-label":"Previous"}),(0,r.jsx)("span",{"aria-label":"Page ".concat(n.pageIndex),children:n.pageIndex}),(0,r.jsx)(l.wpx,{onClick:n.nextPage,disabled:a,icon:(0,r.jsx)(l.PJP._Qn,{"aria-hidden":!0}),"aria-label":"Next"}),(0,r.jsx)(l.WPr,{className:"w-auto",value:n.pageSize,onChange:n.updatePageSize,options:n.pageSizeOptions.map(e=>({label:e,value:e})),labelRender:e=>{let{value:a}=e;return(0,r.jsxs)("span",{children:[a," / page"]})}})]})};var p=n(47935),h=n(46628),g=n(78780);let m=e=>{var a,n;return null==e?void 0:null===(n=e.startOf("day"))||void 0===n?void 0:null===(a=n.utc())||void 0===a?void 0:a.toISOString()},x=e=>{var a,n;return null==e?void 0:null===(n=e.endOf("day"))||void 0===n?void 0:null===(a=n.utc())||void 0===a?void 0:a.toISOString()},{useLazyDownloadReportQuery:S,useGetAllHistoricalPrivacyPreferencesQuery:v,useLazyGetCurrentPrivacyPreferencesQuery:C}=g.u.injectEndpoints({endpoints:e=>({getCurrentPrivacyPreferences:e.query({query:e=>{let{search:a}=e;return{url:"current-privacy-preferences",params:{email:a,phone_number:a,fides_user_device_id:a,external_id:a}}},providesTags:["Current Privacy Preferences"]}),downloadReport:e.query({query:e=>{let{startDate:a,endDate:n}=e;return{url:"plus/consent_reporting",params:{created_gt:m(a),created_lt:x(n),download_csv:"true"},responseHandler:"content-type"}},providesTags:["Consent Reporting Export"]}),getAllHistoricalPrivacyPreferences:e.query({query:e=>{let{page:a,size:n,startDate:r,endDate:t,includeTotal:i=!0}=e;return{url:"historical-privacy-preferences",params:{page:a,size:n,request_timestamp_gt:m(r),request_timestamp_lt:x(t),include_total:i}}},providesTags:["Consent Reporting"]})})});var j=n(90104),f=n.n(j),y=n(812),b=n(21910);let A={[b.pq.OPT_IN]:"Opt in",[b.pq.OPT_OUT]:"Opt out",[b.pq.ACKNOWLEDGE]:"Acknowledge",[b.pq.TCF]:"TCF"},I={[b.pq.OPT_IN]:"success",[b.pq.OPT_OUT]:"error",[b.pq.ACKNOWLEDGE]:"default",[b.pq.TCF]:"sandstone"},M={[b.jP.ACCEPT]:"Accept",[b.jP.BUTTON]:"Button",[b.jP.DISMISS]:"Dismiss",[b.jP.GPC]:"GPC",[b.jP.REJECT]:"Reject",[b.jP.SAVE]:"Save",[b.jP.SCRIPT]:"Script",[b.jP.INDIVIDUAL_NOTICE]:"Individual Notice",[b.jP.ACKNOWLEDGE]:"Acknowledge"},N={[b.Tz.API]:"API",[b.Tz.BANNER_AND_MODAL]:"Banner and Modal",[b.Tz.MODAL]:"Modal",[b.Tz.OVERLAY]:"Overlay",[b.Tz.PRIVACY_CENTER]:"Privacy Center",[b.Tz.TCF_OVERLAY]:"TCF Overlay"},P=(0,i.Cl)();var T=()=>(0,d.useMemo)(()=>[P.accessor(e=>e.notice_name,{id:"notice_name",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Privacy notice",...e}),enableSorting:!1}),P.accessor(e=>e.notice_key,{id:"notice_key",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Notice Key",...e}),enableSorting:!1}),P.accessor(e=>e.preference,{id:"preference",cell:e=>{let{getValue:a}=e,n=a(),t=n&&A[n]||n,i=n&&I[n]||"";return(0,r.jsx)(p.A4,{color:i,value:t})},header:e=>(0,r.jsx)(p.Rr,{value:"Preference",...e}),enableSorting:!1,size:100}),P.accessor(e=>e.privacy_notice_history_id,{id:"privacy_notice_history_id",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Privacy Notice History Id",...e}),enableSorting:!1})],[]),E=n(47003),w=n.n(E);let R=(0,i.Cl)();var U=()=>{let e=(0,d.useCallback)(e=>{let a=[];if(e){let{preferences:n,...r}=e;w()(r,(e,n)=>{e&&e.forEach(e=>{a.push({key:n,id:e.id,preference:e.preference})})})}return a},[]),a=(0,d.useCallback)(e=>e.filter(e=>!(e.key.startsWith("system_")||e.key.startsWith("vendor_"))),[]);return{tcfColumns:(0,d.useMemo)(()=>[R.accessor(e=>e.key,{id:"key",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Type",...e}),enableSorting:!1}),R.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"ID",...e}),enableSorting:!1}),R.accessor(e=>e.preference,{id:"preference",cell:e=>{let{getValue:a}=e,n=a(),t=n&&A[n]||n,i=n&&I[n]||"";return(0,r.jsx)(p.A4,{color:i,value:t})},header:e=>(0,r.jsx)(p.Rr,{value:"Preference",...e}),enableSorting:!1,size:100})],[]),mapTcfPreferencesToRowColumns:e,filterTcfConsentPreferences:a}},k=e=>{let{isOpen:a,onClose:n}=e,[s,o]=(0,d.useState)(!1),[c,_]=(0,d.useState)(),[u]=C(),F=(0,l.pmc)();(0,d.useEffect)(()=>{a||(_(void 0),o(!1))},[a]);let h=async e=>{o(!0);let{data:a,isError:n,error:r}=await u({search:e}),t=r&&"status"in r&&(null==r?void 0:r.status);n&&404!==t?F({status:"error",description:(0,y.e$)(r,"A problem occurred while looking up the preferences.")}):_(a||null),o(!1)},g=T(),m=(null==c?void 0:c.preferences)||[],x=!f()(m),S=(0,t.b7)({getCoreRowModel:(0,i.sC)(),data:m,columns:g,getRowId:e=>"".concat(e.privacy_notice_history_id),manualPagination:!0}),{tcfColumns:v,mapTcfPreferencesToRowColumns:j,filterTcfConsentPreferences:b}=U(),A=b(j(c)),I=!f()(A),M=(0,t.b7)({getCoreRowModel:(0,i.sC)(),data:A,columns:v,getRowId:e=>"".concat(e.key,"-").concat(e.id),manualPagination:!0});return(0,r.jsxs)(l.u_l,{id:"consent-lookup-modal",isOpen:a,onClose:n,size:"6xl",returnFocusOnClose:!1,isCentered:!0,children:[(0,r.jsx)(l.ZAr,{}),(0,r.jsxs)(l.hzk,{children:[(0,r.jsx)(l.olH,{}),(0,r.jsx)(l.xBx,{pb:2,children:"Consent preference lookup"}),(0,r.jsxs)(l.fef,{children:[(0,r.jsx)(l.AntTypography.Paragraph,{children:"Use this search to look up an individual's latest consent record. You can search by phone number, email, external ID or device ID to retrieve the most recent consent preference associated with that exact identifier."}),(0,r.jsxs)(l.AntTypography.Paragraph,{children:[(0,r.jsx)("strong",{children:"Note:"})," This is an exact match search—partial entries or similar results will not be returned. This lookup retrieves only the most recent consent preference, not the full consent history."]}),(0,r.jsx)(l.PPS,{layout:"vertical",className:"w-1/2",children:(0,r.jsx)(l.PPS.Item,{label:"Subject search",className:"mb-4 mt-6",children:(0,r.jsx)(l.uFc.Search,{"data-testid":"subject-search-input",placeholder:"Enter email, phone number, external ID or device ID",enterButton:"Search",onSearch:h,loading:s})})}),(0,r.jsxs)("div",{className:"mb-4",children:[(!I||x)&&(0,r.jsx)(p.ZK,{tableInstance:S,emptyTableNotice:(0,r.jsx)(l.oj8,{description:void 0===c?"Search for an email, phone number, or device ID.":"No results found.",image:l.oj8.PRESENTED_IMAGE_SIMPLE,imageStyle:{marginBottom:15}})}),I&&(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(p.ZK,{tableInstance:M})})]})]})]})]})},O=()=>{let e=(0,l.pmc)(),[a,{isFetching:n}]=S();return{downloadReport:async n=>{let{startDate:r,endDate:t}=n,i=await a({startDate:r,endDate:t});if(i.isError)e({status:"error",description:(0,y.e$)(i.error,"A problem occurred while generating your consent report. Please try again.")});else{let e=document.createElement("a"),a=new Blob([i.data],{type:"text/csv"}),n=window.URL.createObjectURL(a);e.href=n,e.download="consent-reports.csv",e.click(),window.URL.revokeObjectURL(n)}},isDownloadingReport:n}},G=e=>{let{isOpen:a,onClose:n,startDate:t,endDate:i}=e,{downloadReport:s,isDownloadingReport:o}=O(),d=async()=>{await s({startDate:t,endDate:i}),n()};return(0,r.jsxs)(l.u_l,{id:"consent-report-download-modal",isOpen:a,onClose:n,size:"xl",returnFocusOnClose:!1,isCentered:!0,children:[(0,r.jsx)(l.ZAr,{}),(0,r.jsxs)(l.hzk,{children:[(0,r.jsx)(l.olH,{}),(0,r.jsx)(l.xBx,{pb:2,children:"Download consent report"}),(0,r.jsxs)(l.fef,{children:[(0,r.jsx)(l.AntTypography.Paragraph,{children:"The downloaded CSV may differ from the UI in Fides, including column order and naming."}),(0,r.jsx)(l.AntTypography.Paragraph,{children:'For large datasets, file generation may take a few minutes after selecting "Download".'}),(0,r.jsx)(l.jqI,{justify:"flex-end",children:(0,r.jsx)(l.wpx,{loading:o,onClick:d,"data-testid":"download-report-btn",type:"primary",className:"mb-2",children:"Download"})})]})]})]})},B=e=>{let{isOpen:a,onClose:n,tcfPreferences:s}=e,{tcfColumns:o,mapTcfPreferencesToRowColumns:d,filterTcfConsentPreferences:c}=U(),_=c(d(s)),u=(0,t.b7)({getCoreRowModel:(0,i.sC)(),data:_||[],columns:o,getRowId:e=>"".concat(e.key,"-").concat(e.id),manualPagination:!0});return(0,r.jsxs)(l.u_l,{id:"consent-lookup-modal",isOpen:a,onClose:n,size:"4xl",returnFocusOnClose:!1,isCentered:!0,children:[(0,r.jsx)(l.ZAr,{}),(0,r.jsxs)(l.hzk,{"data-testid":"consent-tcf-detail-modal",children:[(0,r.jsx)(l.olH,{}),(0,r.jsx)(l.xBx,{pb:2,children:"TCF Consent Details"}),(0,r.jsx)(l.fef,{children:(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p.ZK,{tableInstance:u,emptyTableNotice:(0,r.jsx)(l.oj8,{description:" No data found",image:l.oj8.PRESENTED_IMAGE_SIMPLE,imageStyle:{marginBottom:15}})})})})]})]})},D=n(8411),L=n(72625);let K=(0,i.Cl)();var z=e=>{let{onTcfDetailViewClick:a}=e;return(0,d.useMemo)(()=>[K.accessor(e=>e.fides_user_device_id,{id:"fides_user_device_id",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"User device ID",...e}),enableSorting:!1}),K.accessor(e=>e.user_geography,{id:"user_geography",cell:e=>{let{getValue:a}=e,n=a(),t=n&&(0,l.QCN)(n),i=n&&D.Z8[n]||n,s=t?(0,l.c1K)({isoEntry:t}):i;return(0,r.jsx)(p.G3,{value:s})},header:e=>(0,r.jsx)(p.Rr,{value:"User geography",...e}),enableSorting:!1}),K.accessor(e=>e.preference,{id:"preference",cell:e=>{let{getValue:n,row:t}=e,i=n(),s=i&&A[i]||i,o=i&&I[i]||"";return"tcf"===i&&t.original.tcf_preferences?(0,r.jsx)(l.j8w,{color:o,closeIcon:(0,r.jsx)(l.PJP.daM,{}),closeButtonLabel:"View details",onClose:()=>a(t.original.tcf_preferences),children:s}):(0,r.jsx)(p.A4,{color:o,value:s})},header:e=>(0,r.jsx)(p.Rr,{value:"Preference",...e}),enableSorting:!1,size:100}),K.accessor(e=>e.notice_name,{id:"notice_name",cell:e=>{let{getValue:a}=e,n=a(),t="tcf"===n?n.toUpperCase():n;return(0,r.jsx)(p.G3,{value:t})},header:e=>(0,r.jsx)(p.Rr,{value:"Privacy notice",...e}),enableSorting:!1}),K.accessor(e=>e.method,{id:"method",cell:e=>{let{getValue:a}=e,n=a(),t=n&&M[n]||n;return(0,r.jsx)(p.G3,{value:t})},header:e=>(0,r.jsx)(p.Rr,{value:"Method",...e}),enableSorting:!1,size:100}),K.accessor(e=>e.request_origin,{id:"request_origin",cell:e=>{let{getValue:a}=e,n=a(),t=n&&N[n]||n;return(0,r.jsx)(p.G3,{value:t})},header:e=>(0,r.jsx)(p.Rr,{value:"Request origin",...e}),enableSorting:!1,size:120}),K.accessor(e=>e.request_timestamp,{id:"request_timestamp",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(L.Cy,{time:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Request timestamp",...e}),size:120}),K.accessor(e=>e.url_recorded,{id:"url_recorded",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Recorded URL",...e})}),K.accessor(e=>e.external_id,{id:"external_id",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"External ID",...e}),enableSorting:!1}),K.accessor(e=>e.email,{id:"email",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:(0,r.jsx)(l.AntTypography.Link,{href:"mailto:".concat(a()),children:a()})})},header:e=>(0,r.jsx)(p.Rr,{value:"Email",...e}),enableSorting:!1}),K.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:a}=e;return(0,r.jsx)(p.G3,{value:a()})},header:e=>(0,r.jsx)(p.Rr,{value:"Preference ID",...e}),enableSorting:!1})],[a])},V=()=>{var e,a;let n=(0,_.h0)(),{pageIndex:s,pageSize:g,updatePageIndex:m}=n,x=(0,d.useMemo)(()=>o()(),[]),[S,C]=(0,d.useState)(null),[j,f]=(0,d.useState)(null),[y,b]=(0,d.useState)(!1),[A,I]=(0,d.useState)(!1),[M,N]=(0,d.useState)(!1),[P,T]=(0,d.useState)(),E=(0,l.pmc)(),{data:w,isLoading:R,isFetching:U,refetch:O}=v({page:s,size:g,startDate:S,endDate:j,includeTotal:!1}),{items:D}=(0,d.useMemo)(()=>w||{items:[],total:0,pages:0},[w]),L=z({onTcfDetailViewClick:e=>{N(!0),T(e)}}),K=(0,t.b7)({getCoreRowModel:(0,i.sC)(),data:D,columns:L,getRowId:e=>"".concat(e.id),manualPagination:!0}),V=async()=>{m(1),await O(),E((0,h.t5)("Consent report refreshed successfully.","Report Refreshed"))};return(0,r.jsxs)(c.Z,{title:"Consent reporting",children:[(0,r.jsx)(u.Z,{heading:"Consent reporting",rightContent:(0,r.jsx)(l.wpx,{type:"primary",onClick:V,loading:U,children:"Refresh"})}),(0,r.jsx)("div",{"data-testid":"consent-reporting",className:"overflow-auto",children:(0,r.jsxs)(l.jqI,{vertical:!0,gap:"middle",children:[R?(0,r.jsx)("div",{className:"border p-2",children:(0,r.jsx)(p.I4,{rowHeight:26,numRows:10})}):(0,r.jsxs)("div",{children:[(0,r.jsxs)(p.Q$,{children:[(0,r.jsx)(l.gwi,{placeholder:["From","To"],maxDate:x,"data-testid":"input-date-range",onChange:e=>{C(e&&e[0]),f(e&&e[1])}}),(0,r.jsxs)(l.jqI,{gap:12,children:[(0,r.jsx)(l.wpx,{icon:(0,r.jsx)(l.PJP.UWx,{}),"data-testid":"download-btn",onClick:()=>I(!0),"aria-label":"Download Consent Report"}),(0,r.jsx)(l.S0p,{menu:{items:[{key:"1",label:(0,r.jsx)("span",{"data-testid":"consent-preference-lookup-btn",children:"Consent preference lookup"}),onClick:()=>b(!0)}]},overlayStyle:{width:"220px"},trigger:["click"],children:(0,r.jsx)(l.wpx,{icon:(0,r.jsx)(l.PJP.r43,{}),"data-testid":"consent-reporting-dropdown-btn"})})]})]}),(0,r.jsx)(p.ZK,{tableInstance:K,emptyTableNotice:(0,r.jsx)(l.oj8,{description:"No results.",image:l.oj8.PRESENTED_IMAGE_SIMPLE,styles:{image:{marginBottom:15}}})})]}),(0,r.jsx)(F,{disableNext:(null!==(a=null==w?void 0:null===(e=w.items)||void 0===e?void 0:e.length)&&void 0!==a?a:0)<g,pagination:n})]})}),(0,r.jsx)(k,{isOpen:y,onClose:()=>b(!1)}),(0,r.jsx)(G,{isOpen:A,onClose:()=>I(!1),startDate:S,endDate:j}),(0,r.jsx)(B,{isOpen:M,onClose:()=>{N(!1),T(void 0)},tcfPreferences:P})]})}}},function(e){e.O(0,[431,2150,2888,9774,179],function(){return e(e.s=15806)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4154],{58095:function(e,t,s){var n=s(8817);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},21796:function(e){e.exports=function(e,t,s){for(var n=-1,a=null==e?0:e.length;++n<a;)if(s(t,e[n]))return!0;return!1}},8817:function(e,t,s){var n=s(95372),a=s(1129),l=s(58263);e.exports=function(e,t,s){return t==t?l(e,t,s):n(e,a,s)}},1129:function(e){e.exports=function(e){return e!=e}},92198:function(e,t,s){var n=s(52485),a=s(58095),l=s(21796),o=s(65581),i=s(47111),r=s(43735);e.exports=function(e,t,s){var d=-1,c=a,u=e.length,m=!0,g=[],p=g;if(s)m=!1,c=l;else if(u>=200){var y=t?null:i(e);if(y)return r(y);m=!1,c=o,p=new n}else p=t?[]:g;e:for(;++d<u;){var v=e[d],h=t?t(v):v;if(v=s||0!==v?v:0,m&&h==h){for(var f=p.length;f--;)if(p[f]===h)continue e;t&&p.push(h),g.push(v)}else c(p,h,s)||(p!==g&&p.push(h),g.push(v))}return g}},47111:function(e,t,s){var n=s(46151),a=s(50344),l=s(43735),o=n&&1/l(new n([,-0]))[1]==1/0?function(e){return new n(e)}:a;e.exports=o},58263:function(e){e.exports=function(e,t,s){for(var n=s-1,a=e.length;++n<a;)if(e[n]===t)return n;return -1}},50344:function(e){e.exports=function(){}},83766:function(e,t,s){var n=s(92198);e.exports=function(e){return e&&e.length?n(e):[]}},25654:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center/[monitorId]/[systemId]",function(){return s(74473)}])},79283:function(e,t,s){"use strict";s.d(t,{l:function(){return r}});var n=s(24246),a=s(96306),l=s(72707),o=s.n(l);let i=e=>{let{data:{formattedTitle:t,description:s,name:l,primaryName:o}}=e;return(0,n.jsxs)(a.jqI,{gap:12,title:"".concat(t," - ").concat(s),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:o||l}),o&&": ".concat(l)]}),(0,n.jsx)("em",{children:s})]})},r=e=>{let{options:t,...s}=e,l=null==t?void 0:t.map(e=>({...e,className:o().option,formattedTitle:[e.primaryName,e.name].filter(e=>e).join(": ")}));return(0,n.jsx)(a.WPr,{options:l,filterOption:(e,t)=>(null==t?void 0:t.formattedTitle.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:t.value.toLowerCase().includes(e.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:i,styles:{popup:{root:{minWidth:"500px"}}},className:"w-full p-0","data-testid":"taxonomy-select",...s})}},45938:function(e,t,s){"use strict";s.d(t,{Gt:function(){return m},eB:function(){return g},oI:function(){return u}});var n=s(24246),a=s(34090),l=s(27378),o=s(16134),i=s(38602),r=s(58452);let d=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,o.T)(),t=(0,o.C)(i.DB),s=(0,l.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),n=(0,l.useCallback)(()=>{e((0,i.Mr)()),c.current&&(c.current(!0),s())},[e,s]),a=(0,l.useCallback)(()=>{e((0,i.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,l.useCallback)(()=>t?(e((0,i.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:n,onClose:a}},m=e=>{let{id:t,name:s}=e,{dirty:n}=(0,a.u6)(),r=(0,o.T)();return(0,l.useEffect)(()=>(r((0,i.Zu)({id:t,name:s})),()=>{r((0,i.dz)({id:t}))}),[r,t,s]),(0,l.useEffect)(()=>{r((0,i.$p)({id:t,isDirty:n}))},[n,r,t]),null},g=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,o.C)(i.uv);return(0,n.jsx)(r.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},74473:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return en}});var n=s(24246),a=s(86677),l=s(27378),o=s(35287),i=s(77830),r=s(58754),d=s(96306),c=s(25415),u=s(21910),m=s(30952),g=s(8133),p=s(79283),y=s(34929),v=s(78238),h=e=>{let{selectedTaxonomies:t,...s}=e,{getDataUseDisplayNameProps:a,getDataUses:l}=(0,y.Z)(),o=l().filter(e=>e.active&&v.g.includes(e.fides_key)).map(e=>{let{name:t,primaryName:s}=a(e.fides_key);return{value:e.fides_key,name:t,primaryName:s,description:e.description||""}});return(0,n.jsx)(p.l,{options:o,...s})};let{Text:f}=d.AntTypography;var x=e=>{let{onSave:t,isSaving:s,onClose:a,...o}=e,[i,r]=(0,l.useState)([]),c=()=>{r([]),a()};return(0,n.jsxs)(g.Z,{title:"Add consent category",...o,onClose:c,children:[(0,n.jsxs)(d.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)(f,{children:"Assign consent categories to selected assets. This configures the system for consent management. Consent categories apply to both individual assets and the system."}),(0,n.jsx)(h,{mode:"tags",selectedTaxonomies:i,onSelect:(e,t)=>r([...i,t.value]),variant:"outlined"})]}),(0,n.jsxs)(d.jqI,{justify:"space-between",children:[(0,n.jsx)(d.wpx,{htmlType:"reset",onClick:c,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(d.wpx,{htmlType:"submit",type:"primary",disabled:!i.length,loading:s,onClick:()=>{t(i),c()},"data-testid":"save-btn",children:"Save"})]})]})},j=s(29850),_=s(77685);let{Text:b}=d.AntTypography,C=e=>{let{onSave:t,isSaving:s,...a}=e,[o,i]=(0,l.useState)(),[r,c]=(0,l.useState)(!1),u=(0,l.useCallback)(e=>{e.preventDefault(),c(!0)},[]),m=()=>{c(!1)},p=()=>{i(void 0),a.onClose()};return(0,n.jsxs)(g.Z,{title:"Assign system",...a,onClose:p,children:[(0,n.jsxs)(d.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)(b,{children:"Assign a system to the selected assets. If no system exists, select 'Add new system' to create one."}),(0,n.jsx)(j.R,{placeholder:"Search or select...",onSelect:(e,t)=>{i(t)},onAddSystem:u,value:o})]})," ",(0,n.jsxs)(d.jqI,{justify:"space-between",children:[(0,n.jsx)(d.wpx,{htmlType:"reset",onClick:p,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(d.wpx,{htmlType:"submit",type:"primary",disabled:!o,loading:s,onClick:()=>{t(o),p()},"data-testid":"save-btn",children:"Save"})]}),r&&(0,n.jsx)(_.i,{isOpen:!0,onClose:m,onSuccessfulSubmit:(e,t)=>{m(),i({label:t,value:e})},toastOnSuccess:!0})]})};var w=s(8411),k=s(32735),S=s(8125),E=s(37059),A=s(98145);let{Link:T}=d.AntTypography,N=e=>{let{stagedResource:t,status:s}=e,a=(0,S.o)({pagination:{defaultPageSize:10,pageSizeOptions:[10,...k.VZ]}}),{pageIndex:o,pageSize:i}=a,{data:r,isFetching:c,isError:u}=(0,E.mi)({stagedResourceUrn:t.urn,status:s,page:o,size:i}),{items:m,total:g}=(0,l.useMemo)(()=>r||{items:[],total:0,pages:0,filterOptions:{assigned_users:[],systems:[]}},[r]),p=(0,l.useMemo)(()=>({enableSelection:!1,getRowKey:e=>"".concat(e.location,"-").concat(e.page),isLoading:c,dataSource:m,totalRows:null!=g?g:0}),[c,m,g]),y=(0,S.V)(a,p);return{columns:(0,l.useMemo)(()=>[{title:"Location",dataIndex:A.EI.LOCATION,key:A.EI.LOCATION,render:e=>{var t;let s=(0,d.QCN)(e);return s?(0,d.c1K)({isoEntry:s,showFlag:!0}):null!==(t=null===w.Z8||void 0===w.Z8?void 0:w.Z8[e])&&void 0!==t?t:e}},{title:"Page",dataIndex:A.EI.PAGE,key:A.EI.PAGE,render:e=>(0,n.jsx)(T,{href:e,target:"_blank",rel:"noopener noreferrer",children:e})}],[]),data:r,isLoading:c,isError:u,totalRows:g,tableProps:y.tableProps,hasData:m.length>0}},{Paragraph:I,Text:O}=d.AntTypography,D=e=>{var t,s,a;let{isOpen:l,stagedResource:o,status:i,onCancel:r,onDownload:c}=e,{columns:u,tableProps:m,isError:g}=N({stagedResource:o,status:i});return(0,n.jsx)(d.$zI,{title:"Consent discovery",width:768,open:l,onCancel:r,footer:[(0,n.jsx)(d.wpx,{onClick:r,children:"Cancel"},"cancel"),!!c&&(0,n.jsx)(d.wpx,{type:"primary",onClick:c,children:"Download"},"download")],"data-testid":"consent-breakdown-modal",children:(0,n.jsxs)(d.jqI,{vertical:!0,className:"gap-6","data-testid":"consent-breakdown-modal-content",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(I,{children:"View all instances where this asset was detected without consent, organized by location and page. Use this to investigate potential compliance issues."}),(0,n.jsxs)(I,{children:[(0,n.jsx)(O,{strong:!0,children:"Asset name:"})," ",null!==(t=o.name)&&void 0!==t?t:(0,n.jsx)(O,{italic:!0,children:"Unknown"}),","," ",(0,n.jsx)(O,{strong:!0,children:"System:"})," ",null!==(s=o.system)&&void 0!==s?s:(0,n.jsx)(O,{italic:!0,children:"Unassigned"}),","," ",(0,n.jsx)(O,{strong:!0,children:"Domain:"})," ",null!==(a=o.domain)&&void 0!==a?a:(0,n.jsx)(O,{italic:!0,children:"Unknown"})]})]}),g?(0,n.jsx)(d.DUx,{type:"error",message:"Error fetching data",description:"Please try again later.",showIcon:!0}):(0,n.jsx)(d.V5H,{...m,columns:u,"data-testid":"consent-breakdown-modal-table"})]})})};var L=s(83766),R=s.n(L),P=s(62165),G=s(812),U=s(26070),V=s(3110),Z=s(46628),M=s(16394),z=s(54762),K=s(9320),$=s(88708);let q=e=>{let{asset:t,onTabChange:s,showComplianceIssueDetails:l,showWarningForConsentIssues:o}=e,[r,{isLoading:c}]=(0,E.EY)(),[m,{isLoading:g}]=(0,E.nS)(),[p,{isLoading:y}]=(0,E.Tj)(),v=(0,d.pmc)(),h=(0,a.useRouter)(),f=c||g||y,{urn:x,name:j,resource_type:_,diff_status:b,system_key:C,user_assigned_system_key:w,consent_aggregated:k}=t,S=!!k&&A.LM.includes(k),T=async()=>{let e=await r({urnList:[x]});if((0,G.D4)(e))v((0,Z.Vo)((0,G.e$)(e.error)));else{let e=w||C,t="".concat(i.So,"/configure/").concat(e,"#assets");v((0,Z.t5)((0,K._)("".concat(_,' "').concat(j,'" has been added to the system inventory.'),e?()=>h.push(t):void 0)))}},N=async()=>{let e=await m({urnList:[x]});(0,G.D4)(e)?v((0,Z.Vo)((0,G.e$)(e.error))):v((0,Z.t5)((0,K._)("".concat(_,' "').concat(j,'" has been ignored and will not appear in future scans.'),async()=>{await s($.A.IGNORED)})))},I=async()=>{let e=await p({urnList:[x]});(0,G.D4)(e)?v((0,Z.Vo)((0,G.e$)(e.error))):v((0,Z.t5)("".concat(_,' "').concat(j,'" is no longer ignored and will appear in future scans.')))};return(0,n.jsxs)(d.vyj,{children:[b!==u.LL.MUTED&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.esZ,{title:t.system?void 0:"This asset requires a system before you can add it to the inventory.",children:(0,n.jsx)(d.wpx,{"data-testid":"add-btn",size:"small",onClick:T,disabled:!t.system||f,loading:c,children:"Add"})}),(0,n.jsx)(d.wpx,{"data-testid":"ignore-btn",size:"small",onClick:N,disabled:f,loading:g,children:"Ignore"}),S&&o&&(0,n.jsx)(d.wpx,{"data-testid":"view-compliance-details-btn",size:"small",onClick:()=>{null==l||l(t,null!=k?k:u.lg.UNKNOWN)},disabled:f,loading:y,icon:(0,n.jsx)(d.PJP.OdJ,{style:{color:"var(--fidesui-error)",width:14}}),title:"View compliance issue","aria-label":"View compliance issue"})]}),b===u.LL.MUTED&&(0,n.jsx)(d.wpx,{"data-testid":"restore-btn",size:"small",onClick:I,disabled:f,loading:y,children:"Restore"})]})};var B=s(17245),W=s(18992),Y=s.n(W),F=s(2525),J=s(31883),Q=e=>{var t,s,a;let{asset:o,readonly:i,columnState:r}=e,[c,u]=(0,l.useState)(!1),[m]=(0,E.Ak)(),{successAlert:g,errorAlert:p}=(0,B.VY)(),{getDataUseDisplayName:f}=(0,y.Z)(),x=(null===(t=o.user_assigned_data_uses)||void 0===t?void 0:t.length)?o.user_assigned_data_uses:(null===(s=o.data_uses)||void 0===s?void 0:s.length)?o.data_uses:[],j=async e=>{let t=await m({monitorId:o.monitor_config_id,urnList:[o.urn],dataUses:[...x,e]});(0,J.D4)(t)?p((0,G.e$)(t.error)):g("Consent category added to ".concat(o.resource_type,' "').concat(o.name,'" .'),"Confirmed"),u(!1)},_=async e=>{let t=await m({monitorId:o.monitor_config_id,urnList:[o.urn],dataUses:x.filter(t=>t!==e)});(0,J.D4)(t)?p((0,G.e$)(t.error)):g("Consent category removed from ".concat(o.resource_type,' "').concat(o.name,'".'),"Confirmed")},b=(null===(a=o.user_assigned_data_uses)||void 0===a?void 0:a.length)?o.user_assigned_data_uses:o.data_uses,C=null==b?void 0:b.filter(e=>(0,v.Z)(e));return i?(0,n.jsx)(F.Q,{values:null==C?void 0:C.map(e=>({label:f(e),key:e})),columnState:r}):(0,n.jsxs)(n.Fragment,{children:[!c&&(0,n.jsxs)(d.vyj,{align:"start",children:[(0,n.jsx)(d.j8w,{onClick:()=>u(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"}),(0,n.jsx)(F.Q,{values:null==C?void 0:C.map(e=>({label:f(e),key:e})),columnState:r,tagProps:{closable:!0,closeButtonLabel:"Remove data use"},onTagClose:_})]}),c&&(0,n.jsx)("div",{className:Y().cellBleed,style:{backgroundColor:"var(--fides-color-white)"},children:(0,n.jsx)(h,{selectedTaxonomies:C||[],onSelect:j,onBlur:()=>u(!1),open:!0})})]})};let X=e=>{let{consentAggregated:t,stagedResource:s}=e,a=A.LM.includes(t);if(!(a||t===u.lg.UNKNOWN))return null;let l=!!s.data_uses&&s.data_uses.length>0,o=A.Vq[t];return t!==u.lg.UNKNOWN||l||(o="Add a category of consent to this asset to find consent information."),(0,n.jsx)(d.esZ,{title:o,children:(0,n.jsx)(d.j8w,{color:a?"error":void 0,"data-testid":"status-badge_".concat(t.replace(/_/g,"-")),children:A.X1[t]})})};var H=s(70675);let ee=e=>{let{aggregateSystem:t,monitorConfigId:s,readonly:a}=e,{resource_type:o,name:i,urn:r,system:c,user_assigned_system_key:u,system_key:m}=t,[g,p]=(0,l.useState)(!1),[y,v]=(0,l.useState)(!1),[h,{isLoading:f}]=(0,H.NA)(),{successAlert:x,errorAlert:b}=(0,B.VY)(),C=(0,l.useCallback)(e=>{e.preventDefault(),v(!0)},[]),w=async(e,t,n)=>{let a=await h({staged_resource_urn:r,monitor_config_id:s,user_assigned_system_key:e});(0,G.D4)(a)?b((0,G.e$)(a.error)):x(n?"".concat(t," has been added to your system inventory and the ").concat(o,' "').concat(i,'" has been assigned to that system.'):"".concat(o,' "').concat(i,'" has been assigned to ').concat(t,"."),"Confirmed"),p(!1)};return a?c?(0,n.jsx)(d.j8w,{"data-testid":"system-badge",color:"white",children:c}):null:(0,n.jsxs)(n.Fragment,{children:[!g&&(c?(0,n.jsxs)(d.j8w,{onClick:()=>p(!0),"data-testid":"system-badge",children:[c,(0,n.jsx)(d.PJP.I8b,{})]}):(0,n.jsx)(d.j8w,{onClick:()=>p(!0),"data-testid":"add-system-btn",addable:!0})),!!g&&(0,n.jsx)("div",{className:Y().cellBleed,children:(0,n.jsx)(j.R,{variant:"borderless",autoFocus:!0,defaultOpen:!0,defaultValue:u||m,onBlur:e=>{var t;(null===(t=e.relatedTarget)||void 0===t?void 0:t.getAttribute("id"))!=="add-new-system"&&p(!1)},onAddSystem:C,onSelect:(e,t)=>w(e,t.label),loading:f})}),y&&(0,n.jsx)(_.i,{isOpen:!0,onClose:()=>{v(!1)},onSuccessfulSubmit:(e,t)=>w(e,t,!0)})]})},et=e=>{let{monitorId:t,systemId:s,onSystemName:o,onShowComplianceIssueDetails:r}=e,c=(0,a.useRouter)(),m=(0,d.pmc)(),[g,p]=(0,l.useState)(s),[y,h]=(0,l.useState)(),[f,x]=(0,l.useState)(!1),[j,_]=(0,l.useState)(!1),[b,C]=(0,l.useState)(!1),[k,T]=(0,l.useState)(0),[N,I]=(0,l.useState)(0),[O,D]=(0,l.useState)(0),{flags:L}=(0,P.hz)(),{assetConsentStatusLabels:B}=L,{filterTabs:W,activeTab:Y,onTabChange:F,activeParams:J,actionsDisabled:H}=(0,$.Z)(s),et=(0,S.o)({sorting:{validColumns:Object.values(A.r6)}}),{columnFilters:es,pageIndex:en,pageSize:ea,resetState:el,sortKey:eo,sortOrder:ei,searchQuery:er,updateSearch:ed,updateFilters:ec,updateSorting:eu,updatePageIndex:em,updatePageSize:eg}=et,{data:ep,isLoading:ey,isFetching:ev}=(0,E.WJ)({key:t,page:en,size:ea,search:er,sort_by:eo?[eo]:[A.r6.CONSENT_AGGREGATED,"urn"],sort_asc:"descend"!==ei,...J,...es}),[eh,{isLoading:ef}]=(0,E.EY)(),[ex,{isLoading:ej}]=(0,E.nS)(),[e_,{isLoading:eb}]=(0,E.rs)(),[eC,{isLoading:ew}]=(0,E.sX)(),[ek,{isLoading:eS}]=(0,E.Vr)(),[eE,{isLoading:eA}]=(0,E.Tj)(),eT=ef||ej||eb||ew||eA||eS,eN=eT||s===i.Kl,{data:eI}=(0,E.ut)({monitor_config_id:t,resolved_system_id:s,diff_status:null==J?void 0:J.diff_status,search:er,...es}),eO=(0,l.useMemo)(()=>({enableSelection:Y!==$.A.ADDED,getRowKey:e=>e.urn,isLoading:ey,isFetching:ev,dataSource:(null==ep?void 0:ep.items)||[],totalRows:(null==ep?void 0:ep.total)||0,customTableProps:{locale:{emptyText:(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:"All caught up!"})})}}}),[Y,ey,ev,null==ep?void 0:ep.items,null==ep?void 0:ep.total]),eD=(0,S.V)(et,eO),eL=(0,l.useMemo)(()=>{var e;let t=[{title:"Asset",dataIndex:A.r6.NAME,key:A.r6.NAME,sorter:!0,sortOrder:eo===A.r6.NAME?ei:null,render:e=>(0,n.jsx)(d.lKn,{ellipsis:{tooltip:!0},style:{maxWidth:300},children:e}),fixed:"left"},{title:"Type",dataIndex:A.r6.RESOURCE_TYPE,key:A.r6.RESOURCE_TYPE,sorter:!0,sortOrder:eo===A.r6.RESOURCE_TYPE?ei:null,filters:(0,M.nZ)(null==eI?void 0:eI.resource_type),filteredValue:(null==es?void 0:es.resource_type)||null},{title:"System",dataIndex:A.r6.SYSTEM,key:A.r6.SYSTEM,render:(e,t)=>!!t.monitor_config_id&&(0,n.jsx)(ee,{aggregateSystem:t,monitorConfigId:t.monitor_config_id,readonly:H||Y===$.A.IGNORED})},{title:"Categories of consent",key:A.r6.DATA_USES,menu:{items:V.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?(C(!0),D(e=>e+1)):"collapse-all"===e.key&&(C(!1),D(e=>e+1))}},filters:(0,M.nZ)(null==eI?void 0:null===(e=eI.data_uses)||void 0===e?void 0:e.filter(e=>(0,v.Z)(e))),filteredValue:(null==es?void 0:es.data_uses)||null,render:(e,t)=>(0,n.jsx)(Q,{asset:t,readonly:H||Y===$.A.IGNORED,columnState:{isExpanded:b,version:O}})},{title:"Locations",dataIndex:A.r6.LOCATIONS,key:A.r6.LOCATIONS,menu:{items:V.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?(x(!0),T(e=>e+1)):"collapse-all"===e.key&&(x(!1),T(e=>e+1))}},filters:(0,M.nZ)(null==eI?void 0:eI.locations,e=>{var t;let s=(0,d.QCN)(e);return s?(0,d.c1K)({isoEntry:s}):null!==(t=w.Z8[e])&&void 0!==t?t:e}),filteredValue:(null==es?void 0:es.locations)||null,render:e=>{var t;return(0,n.jsx)(U.Q,{values:null!==(t=null==e?void 0:e.map(e=>{var t;let s=(0,d.QCN)(e);return{label:s?(0,d.c1K)({isoEntry:s}):null!==(t=w.Z8[e])&&void 0!==t?t:e,key:e}}))&&void 0!==t?t:[],columnState:{isExpanded:f,version:k}})}},{title:"Domain",dataIndex:A.r6.DOMAIN,key:A.r6.DOMAIN},{title:"Detected on",dataIndex:A.r6.PAGE,menu:{items:V.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?(_(!0),I(e=>e+1)):"collapse-all"===e.key&&(_(!1),I(e=>e+1))}},key:A.r6.PAGE,render:e=>(0,n.jsx)(U.v,{values:e,valueSuffix:"pages",columnState:{isExpanded:j,version:N}})}];return B&&t.push({title:()=>(0,n.jsxs)(d.vyj,{children:[(0,n.jsx)("div",{children:"Compliance"}),y===u.lg.WITHOUT_CONSENT&&(0,n.jsx)(z.l,{consentStatus:{status:u.pF.ALERT,message:"One or more assets were detected without consent"}})]}),dataIndex:A.r6.CONSENT_AGGREGATED,key:A.r6.CONSENT_AGGREGATED,sorter:!0,sortOrder:eo===A.r6.CONSENT_AGGREGATED?ei:null,filters:(0,M.nZ)(null==eI?void 0:eI[A.r6.CONSENT_AGGREGATED],e=>{var t;return null!==(t=A.X1[e])&&void 0!==t?t:e}),filteredValue:(null==es?void 0:es[A.r6.CONSENT_AGGREGATED])||null,render:(e,t)=>(0,n.jsx)(X,{consentAggregated:null!=e?e:u.lg.UNKNOWN,stagedResource:t})}),H||t.push({title:"Actions",key:A.r6.ACTIONS,fixed:"right",render:(e,t)=>(0,n.jsx)(q,{asset:t,onTabChange:F,showComplianceIssueDetails:r,showWarningForConsentIssues:B})}),t},[eo,ei,eI,es,B,H,Y,b,f,j,O,k,N,y,r,F]);(0,l.useEffect)(()=>{if(ep){var e;let t=(null===(e=ep.items[0])||void 0===e?void 0:e.system)||g||s||"";p(t),null==o||o(t)}},[ep,s,o,g]),(0,l.useEffect)(()=>{if((null==ep?void 0:ep.items)&&!y){var e;h(null===(e=ep.items.find(e=>e.consent_aggregated===u.lg.WITHOUT_CONSENT))||void 0===e?void 0:e.consent_aggregated)}},[ep,y]);let{selectedKeys:eR,selectedRows:eP,resetSelections:eG}=eD,eU=(0,l.useCallback)(async()=>{var e,t;let s=await eh({urnList:eR}),n=(null===(e=eP[0])||void 0===e?void 0:e.user_assigned_system_key)||(null===(t=eP[0])||void 0===t?void 0:t.system_key),a=eP.every(e=>(e.user_assigned_system_key||e.system_key)===n)?n:void 0;(0,G.D4)(s)?m((0,Z.Vo)((0,G.e$)(s.error))):(m((0,Z.t5)((0,K._)("".concat(eR.length," assets from ").concat(g," have been added to the system inventory."),a?()=>c.push("".concat(i.So,"/configure/").concat(a,"#assets")):()=>c.push(i.So)))),eG())},[eh,eR,eP,g,m,c,eG]),eV=(0,l.useCallback)(async e=>{if("string"==typeof(null==e?void 0:e.value)){let s=await eC({monitorId:t,urnList:eR,systemKey:e.value});(0,G.D4)(s)?m((0,Z.Vo)((0,G.e$)(s.error))):m((0,Z.t5)("".concat(eR.length," assets have been assigned to ").concat(e.label,"."),"Confirmed"))}},[eC,t,eR,m]),eZ=(0,l.useCallback)(async e=>{if(!eP.length)return;let s=eP.map(t=>{let s=R()([...t.user_assigned_data_uses||t.data_uses||[],...e]);return{urn:t.urn,user_assigned_data_uses:s}}),n=await ek({monitorId:t,assets:s});(0,G.D4)(n)?m((0,Z.Vo)((0,G.e$)(n.error))):m((0,Z.t5)("Consent categories added to ".concat(eR.length," assets").concat(g?" from ".concat(g):"","."),"Confirmed"))},[eP,ek,t,eR,g,m]),eM=(0,l.useCallback)(async()=>{let e=await ex({urnList:eR});(0,G.D4)(e)?m((0,Z.Vo)((0,G.e$)(e.error))):(m((0,Z.t5)(g===i.Kl?"".concat(eR.length," uncategorized assets have been ignored and will not appear in future scans."):"".concat(eR.length," assets from ").concat(g," have been ignored and will not appear in future scans."),"Confirmed")),eG())},[ex,eR,g,m,eG]),ez=(0,l.useCallback)(async()=>{let e=await eE({urnList:eR});(0,G.D4)(e)?m((0,Z.Vo)((0,G.e$)(e.error))):(m((0,Z.t5)("".concat(eR.length," assets have been restored and will appear in future scans."),"Confirmed")),eG())},[eE,eR,m,eG]),eK=(0,l.useCallback)(async()=>{let e=(null==ep?void 0:ep.items.length)||0,n=await e_({monitor_config_key:t,resolved_system_ids:[s]});(0,G.D4)(n)?m((0,Z.Vo)((0,G.e$)(n.error))):(c.push("".concat(i.vi,"/").concat(t)),m((0,Z.t5)("".concat(e," assets from ").concat(g," have been added to the system inventory."),"Confirmed")),eG())},[null==ep?void 0:ep.items.length,e_,t,s,c,m,g,eG]),e$=(0,l.useCallback)(async e=>{await F(e),el(),eG()},[F,el,eG]);return{columns:eL,data:ep,isLoading:ey,isFetching:ev,tableState:et,searchQuery:er,updateSearch:ed,updateFilters:ec,updateSorting:eu,updatePageIndex:em,updatePageSize:eg,resetState:el,tableProps:eD.tableProps,selectionProps:eD.selectionProps,filterTabs:W,activeTab:Y,handleTabChange:e$,activeParams:J,actionsDisabled:H,selectedRows:eP,selectedUrns:eR,hasSelectedRows:eD.hasSelectedRows,resetSelections:eG,systemName:g,firstItemConsentStatus:y,handleBulkAdd:eU,handleBulkAssignSystem:eV,handleBulkAddDataUse:eZ,handleBulkIgnore:eM,handleBulkRestore:ez,handleAddAll:eK,anyBulkActionIsLoading:eT,isAddingResults:ef,isIgnoringResults:ej,isAddingAllResults:eb,isBulkUpdatingSystem:ew,isBulkAddingDataUses:eS,isRestoringResults:eA,disableAddAll:eN}},es=e=>{var t;let{monitorId:s,systemId:a,onSystemName:o}=e,[i,r]=(0,l.useState)(!1),[g,p]=(0,l.useState)(!1),[y,v]=(0,l.useState)(null),{columns:h,searchQuery:f,updateSearch:j,resetState:_,tableProps:b,selectionProps:w,filterTabs:k,activeTab:S,handleTabChange:E,activeParams:A,actionsDisabled:T,selectedUrns:N,hasSelectedRows:I,resetSelections:O,handleBulkAdd:L,handleBulkAssignSystem:R,handleBulkAddDataUse:P,handleBulkIgnore:G,handleBulkRestore:U,handleAddAll:V,anyBulkActionIsLoading:Z,isAddingAllResults:M,isBulkUpdatingSystem:z,isBulkAddingDataUses:K,disableAddAll:$}=et({monitorId:s,systemId:a,onSystemName:o,onShowComplianceIssueDetails:(e,t)=>{v({stagedResource:e,status:t})}}),q=async e=>{await R(e),r(!1)},B=async e=>{await P(e),p(!1)};return s&&a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Niu,{"aria-label":"Asset state filter",mode:"horizontal",items:k.map(e=>({key:e.hash,label:e.label})),selectedKeys:[S],onClick:async e=>{await E(e.key)},className:"mb-4","data-testid":"asset-state-filter"}),(0,n.jsxs)(d.jqI,{justify:"space-between",align:"center",className:"mb-4",children:[(0,n.jsx)(m.f,{value:f,onChange:j,placeholder:"Search by asset name..."}),(0,n.jsxs)(d.vyj,{size:"large",children:[I&&(0,n.jsx)(c.a,{count:N.length}),(0,n.jsxs)(d.vyj,{size:"small",children:[(0,n.jsx)(d.wpx,{onClick:()=>{_(),O()},"data-testid":"clear-filters",children:"Clear filters"}),(0,n.jsx)(d.S0p,{overlayClassName:"bulk-actions-menu-dropdown",menu:{items:[...(null==A?void 0:null===(t=A.diff_status)||void 0===t?void 0:t.includes(u.LL.MUTED))?[{key:"restore",label:"Restore",onClick:U}]:[{key:"add",label:"Add",onClick:L},{key:"add-data-use",label:"Add consent category",onClick:()=>p(!0)},{key:"assign-system",label:"Assign system",onClick:()=>r(!0)},{type:"divider"},{key:"ignore",label:"Ignore",onClick:G}]]},trigger:["click"],children:(0,n.jsx)(d.wpx,{icon:(0,n.jsx)(d.PJP._ME,{}),iconPosition:"end",loading:Z,"data-testid":"bulk-actions-menu",disabled:!I||Z||T,type:"primary",children:"Actions"})}),(0,n.jsx)(d.esZ,{title:$?"These assets require a system before you can add them to the inventory.":void 0,children:(0,n.jsx)(d.wpx,{onClick:V,disabled:$,loading:M,type:"primary",icon:(0,n.jsx)(d.PJP.MCw,{}),iconPosition:"end","data-testid":"add-all",children:"Add all"})})]})]})]}),(0,n.jsx)(d.V5H,{...b,columns:h,rowSelection:w,locale:{emptyText:(0,n.jsx)(d.oj8,{image:d.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up!"})},"aria-labelledby":"breadcrumb-current-page"}),(0,n.jsx)(C,{isOpen:i,onClose:()=>{r(!1)},onSave:q,isSaving:z}),(0,n.jsx)(x,{isOpen:g,onClose:()=>{p(!1)},onSave:B,isSaving:K}),y&&(0,n.jsx)(D,{isOpen:!!y,stagedResource:y.stagedResource,status:y.status,onCancel:()=>{v(null)}})]}):null};var en=()=>{let e=(0,a.useRouter)(),t=decodeURIComponent(e.query.monitorId),s=decodeURIComponent(e.query.systemId),[d,c]=(0,l.useState)(s===i.Kl?"Uncategorized assets":s);return(0,n.jsxs)(o.Z,{title:"Action center - Discovered assets",children:[(0,n.jsx)(r.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity",href:i.vi},{title:t,href:"".concat(i.vi,"/").concat(t)},{title:s===i.Kl?"Uncategorized assets":d}]}),(0,n.jsx)(es,{monitorId:t,systemId:s,onSystemName:c})]})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=s(19043)},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}},18992:function(e){e.exports={cellBleed:"Cells_cellBleed__dik43"}}},function(e){e.O(0,[8765,431,9278,5163,7045,401,3585,7725,7929,2888,9774,179],function(){return e(e.s=25654)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7477],{74833:function(e,t,i){var r=i(56127),n=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(n,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,i){var r=i(99736),n=i(92360);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==r(e)}},91936:function(e,t,i){var r=i(74833),n=i(11611),s=i(55193),a=0/0,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return a;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=l.test(e);return i||c.test(e)?d(e.slice(2),i?2:8):o.test(e)?a:+e}},45550:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/activity",function(){return i(3680)}])},58754:function(e,t,i){"use strict";var r=i(24246),n=i(96306),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:o,rightContent:l,style:c,...d}=e;return(0,r.jsxs)("div",{...d,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(n.lQT,{className:i||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,r.jsx)(s.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},17245:function(e,t,i){"use strict";i.d(t,{HK:function(){return a},VY:function(){return n.V},pI:function(){return d},h0:function(){return r.h},Rx:function(){return f},rK:function(){return h}});var r=i(36866),n=i(84306),s=i(812);let a=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}};var o=i(27378),l=i(20682),c=i(21910);let d=e=>{let{data:t}=(0,l.$I)({}),i=(0,o.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,o.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===c.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=i.find(t=>{var i;return t.identifier===(null===(i=e.saas_config)||void 0===i?void 0:i.type)});if(t)return t}return e},[e,i])};var u=i(40431);let g=()=>({search:u.Oi.withDefault("")}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:i}=e,r=(0,o.useMemo)(()=>g(),[]),[n,s]=(0,u.XI)(r,{history:"push"}),a=(0,o.useMemo)(()=>({searchQuery:n.search||t||void 0}),[n,t]),l=(0,o.useCallback)(e=>{s({search:e||null})},[s]),c=(0,o.useCallback)(()=>{s({search:null})},[s]);return(0,o.useEffect)(()=>{i&&i(a)},[a,i]),{...a,updateSearch:l,resetSearch:c,searchProps:{value:a.searchQuery||"",onChange:l,onClear:()=>l("")}}},p=e=>({sortKey:e?(0,u.jx)([...e]):u.Oi.withDefault(""),sortOrder:(0,u.km)(["ascend","descend"])}),h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:i,onSortingChange:r,validColumns:n}=e,s=(0,o.useMemo)(()=>p(n),[n]),[a,l]=(0,u.XI)(s,{history:"push"}),c=(0,o.useMemo)(()=>{var e;return{sortKey:a.sortKey||t,sortOrder:null!==(e=a.sortOrder)&&void 0!==e?e:i}},[a,t,i]),d=(0,o.useCallback)((e,t)=>{l({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[l]),g=(0,o.useCallback)(()=>{l({sortKey:null,sortOrder:null})},[l]);return(0,o.useEffect)(()=>{r&&r(c)},[c,r]),{...c,updateSorting:d,resetSorting:g,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:c.sortOrder,sortedInfo:c.sortKey?{field:c.sortKey,order:c.sortOrder}:void 0}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return s}});var r=i(24246),n=i(96306);let s=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,i,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,r.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(n.zMQ,{}),(0,r.jsxs)(n.xuv,{children:[i&&(0,r.jsx)(n.CdC,{children:i}),(0,r.jsx)(n.XaZ,{children:t})]}),(0,r.jsx)(n.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var r=i(24246),n=i(96306),s=i(79894),a=i.n(s),o=i(27378);let{Text:l}=n.AntTypography,c=e=>{let{items:t,...i}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:o.title})),c)?o.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,r.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,r.jsx)(n.zrq,{items:s,...i})}},36866:function(e,t,i){"use strict";i.d(t,{h:function(){return c}});var r=i(40431),n=i(27378),s=i(55484);let a=(0,r.jo)({parse(e){let t=parseInt(e,10);try{return s.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var o=i(32735);let l=function(){var e,t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:a.withDefault(o.Ej),size:i.pageSizeOptions?(0,r.bJ)(i.pageSizeOptions).withDefault(null!==(e=i.pageSize)&&void 0!==e?e:o.L8):a.withDefault(null!==(t=i.pageSize)&&void 0!==t?t:o.L8)}},c=function(){var e,t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:s=o.L8,pageSizeOptions:a,showSizeChanger:c=!0}=i,d=null!=a?a:o.VZ,u=(0,n.useMemo)(()=>l({pageSize:s,pageSizeOptions:a}),[s,a]),[g,f]=(0,r.XI)(u,{history:"push"}),p={pageIndex:null!==(e=g.page)&&void 0!==e?e:o.Ej,pageSize:null!==(t=g.size)&&void 0!==t?t:s};return{...p,updatePageIndex:e=>{f({page:e})},updatePageSize:e=>{f({page:e!==p.pageSize?o.Ej:p.pageIndex,size:e})},resetPagination:()=>{f({page:o.Ej,size:s})},nextPage:()=>{f(e=>{let{page:t,size:i}=e;return{page:t+1,size:i}})},previousPage:()=>{f(e=>{let{page:t,size:i}=e;return{page:t-1,size:i}})},pageSizeOptions:d,showSizeChanger:c}}},54409:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var r=i(24246),n=i(96306),s=i(812),a=i(17245),o=i(21910),l=i(31883);let c=(0,n.IUT)({displayName:"MonitorOffIcon",viewBox:"0 0 12 12",path:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.47125 1H5.85H6.15H6.51188L6.58875 1.36914L7.52062 5.83268L6.42408 4.98635L6.03375 3.11719L5.8038 4.50761L4.99323 3.882L5.40562 1.38867L5.47125 1ZM4.80795 5.0022L4.67675 5.79545L5.48735 6.42109L5.61854 5.62783L4.80795 5.0022ZM6.73856 6.49227L6.96125 7.55866L8.42407 8.6877L8.69498 8.00228L7.94864 7.42624L7.88625 7.58398L7.83501 7.33853L6.73856 6.49227ZM8.33138 6.45844L9.07755 7.03434L9.30188 6.4668H11.55H12V5.5293H11.55H9H8.69812L8.58375 5.82031L8.33138 6.45844ZM7.27551 9.06443L7.35399 9.125H7.28813L7.27551 9.06443ZM4.49147 6.91566L5.30209 7.54131L4.79437 10.6113L4.72875 11H4.35H4.05H3.69563L3.61313 10.6406L2.64563 6.46875H0.45H0V5.53125H0.45H2.69777L3.49646 6.1477L4.15125 8.97266L4.49147 6.91566Z",fill:"currentColor"}),(0,r.jsx)("g",{clipPath:"url(#clip0_341_3102)",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6755 10.4168L0.164222 2.304L0.775218 1.51237L11.2865 9.62517L10.6755 10.4168Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_341_3102",children:(0,r.jsx)("rect",{width:"11.5",height:"9",fill:"white",transform:"translate(0 1.5)"})})})]})}),d=(0,n.IUT)({displayName:"MonitorOnIcon",viewBox:"0 0 12 10",path:(0,r.jsx)("path",{d:"M5.47125 0H5.85H6.15H6.51188L6.58875 0.369141L7.88625 6.58398L8.58375 4.82031L8.69812 4.5293H9H11.55H12V5.4668H11.55H9.30188L8.36625 7.83398L8.25188 8.125H7.95H7.65H7.28813L7.21125 7.75586L6.03375 2.11719L4.79437 9.61133L4.72875 10H4.35H4.05H3.69563L3.61313 9.64062L2.64563 5.46875H0.45H0V4.53125H0.45H3H3.35438L3.43688 4.89062L4.15125 7.97266L5.40562 0.388672L5.47125 0Z",fill:"currentColor"})});var u=i(79494),g=i(70675),f=i(7940),p=e=>{let{resource:t,ignoreChildActions:i=!1}=e,p=(0,f.G)(t),[h,{isLoading:L}]=(0,g.v8)(),[x,{isLoading:m}]=(0,g.vi)(),[v,{isLoading:j}]=(0,g.Tl)(),{successAlert:I,errorAlert:C}=(0,a.VY)(),_=async()=>{let e=await h({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id});(0,l.D4)(e)?C((0,s.e$)(e.error,"Failed to confirm resource")):I("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},y=async()=>{let e=await v({staged_resource_urn:t.urn});(0,l.D4)(e)?C((0,s.e$)(e.error),"Failed to un-mute resource"):I("".concat(t.name||"The resource"," has been un-muted and is now being monitored."))},A=async()=>{let e=await h({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,unmute_children:!0,classify_monitored_resources:!0});(0,l.D4)(e)?C((0,s.e$)(e.error),"Failed to un-mute resource"):I("Data discovery has started. The results may take some time to appear in the “Data discovery“ tab.","".concat(t.name||"The resource"," is now being monitored."))},D=async()=>{let e=await x({staged_resource_urn:t.urn});(0,l.D4)(e)?C((0,s.e$)(e.error),"Failed to mute resource"):I("Ignored data will not be monitored for changes or added to Fides datasets.","".concat(t.name||"Resource"," ignored"))},S=L||m||j,{diff_status:T,child_diff_statuses:b}=t,O=p===o.D$.SCHEMA,w=p===o.D$.FIELD,N=b&&(b[o.LL.CLASSIFICATION_ADDITION]||b[o.LL.CLASSIFICATION_UPDATE]),M=O&&void 0===T||!w&&T===o.LL.ADDITION||N,H=T!==o.LL.MUTED,Z=T===o.LL.MUTED&&!w,E=T===o.LL.MUTED&&w,R=b&&(b[o.LL.ADDITION]||b[o.LL.REMOVAL]),k=T===o.LL.MONITORED&&!i&&R&&!N;return(0,r.jsxs)(n.Ugi,{children:[(M||k)&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:_,disabled:S,loading:L}),E&&(0,r.jsx)(u.Z,{title:"Un-Mute",icon:(0,r.jsx)(d,{}),onClick:y,disabled:S,loading:L}),Z&&(0,r.jsx)(u.Z,{title:"Monitor",icon:(0,r.jsx)(d,{}),onClick:A,disabled:S,loading:L}),H&&(0,r.jsx)(u.Z,{title:"Ignore",icon:(0,r.jsx)(c,{}),onClick:D,disabled:S,loading:m})]})}},91761:function(e,t,i){"use strict";var r=i(24246),n=i(96306),s=i(812),a=i(17245),o=i(7940),l=i(98559),c=i(21910),d=i(79494),u=i(70675);t.Z=e=>{let{resource:t}=e,[i,{isLoading:g}]=(0,u.v8)(),[f,{isLoading:p}]=(0,u.cM)(),[h,{isLoading:L}]=(0,u.vi)(),x=p||L||g,{diff_status:m,child_diff_statuses:v,top_level_field_name:j}=t,{successAlert:I,errorAlert:C}=(0,a.VY)(),_=m===c.LL.CLASSIFICATION_ADDITION||m===c.LL.CLASSIFICATION_UPDATE,y=v&&(v[c.LL.CLASSIFICATION_ADDITION]||v[c.LL.CLASSIFICATION_UPDATE]),A=(_||y)&&!j,D=_||y,S=(0,o.G)(t)!==c.D$.FIELD,T=A&&D&&S,b=async()=>{let e=await f({staged_resource_urn:t.urn});(0,s.D4)(e)?C((0,s.e$)(e.error),"Failed to promote resource"):I('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},O=async()=>{let e=await h({staged_resource_urn:t.urn});(0,s.D4)(e)?C((0,s.e$)(e.error),"Failed to mute resource"):I("Ignored changes will not be added to a Fides dataset.","".concat(t.name||"Changes"," ignored"))},w=async()=>{let e=await i({staged_resource_urn:t.urn,monitor_config_id:t.monitor_config_id,start_classification:!0,diff_statuses_to_classify:[c.LL.CLASSIFICATION_ADDITION,c.LL.CLASSIFICATION_UPDATE,c.LL.CLASSIFYING,c.LL.CLASSIFICATION_QUEUED]});(0,s.D4)(e)?C((0,s.e$)(e.error),"Failed to reclassify resource"):I("Reclassification of ".concat((0,l.Z)(t)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,r.jsxs)(n.Ugi,{gap:2,children:[A&&(0,r.jsx)(d.Z,{title:"Confirm",icon:(0,r.jsx)(n.nQG,{}),onClick:b,disabled:x,loading:p}),D&&(0,r.jsx)(d.Z,{title:"Ignore",icon:(0,r.jsx)(n.tpL,{}),onClick:O,disabled:x,loading:L}),S&&!T&&(0,r.jsx)(d.Z,{title:"Reclassify",icon:(0,r.jsx)(n.nyI,{}),onClick:w,disabled:x,loading:g}),T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.LZC,{}),(0,r.jsxs)(n.v2r,{children:[(0,r.jsx)(n.j2t,{as:n.wpx,size:"small",type:"text",icon:(0,r.jsx)(n.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,r.jsx)(n.qyq,{children:(0,r.jsx)(n.sNh,{onClick:w,icon:(0,r.jsx)(n.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}},3680:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return N}});var r,n,s=i(24246),a=i(27378),o=i(35287),l=i(58754),c=i(47182),d=i(92222),u=i(59003),g=i(96306),f=i(47935),p=i(72625),h=i(70675),L=i(38347),x=i(87667),m=i(50169),v=i(80285),j=i(30952);(r=n||(n={})).DATASET="Dataset",r.CLASSIFICATION="Classification";var I=i(74241),C=i(28278),_=i(20449),y=e=>(0,_.Z)(e)===C.E.CLASSIFICATION?n.CLASSIFICATION:n.DATASET,A=i(54409),D=i(91761);let S={items:[],total:0,page:1,size:50,pages:1},T=()=>(0,s.jsx)(g.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,s.jsxs)(g.gCW,{children:[(0,s.jsx)(g.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,s.jsx)(g.xvT,{fontSize:"sm",children:"You're up to date!"})]})}),b=(0,d.Cl)();var O=e=>{let{onRowClick:t,statusFilters:i,childsStatusFilters:r}=e,[o,l]=(0,a.useState)(""),{PAGE_SIZES:c,pageSize:C,setPageSize:_,onPreviousPageClick:O,isPreviousPageDisabled:w,onNextPageClick:N,isNextPageDisabled:M,startRange:H,endRange:Z,pageIndex:E,setTotalPages:R}=(0,f.oi)(),{isFetching:k,isLoading:F,data:z}=(0,h.z8)({diff_status:i,child_diff_status:r,page:E,size:C,search:o}),{items:P,total:V,pages:U}=(0,a.useMemo)(()=>null!=z?z:S,[z]);(0,a.useEffect)(()=>{R(U)},[U,R]);let $=(0,a.useMemo)(()=>[b.accessor(e=>e.name,{id:"name",cell:e=>(0,s.jsx)(x.Z,{result:e.row.original}),header:e=>(0,s.jsx)(f.Rr,{value:"Name",...e})}),b.accessor(e=>e.urn,{id:"project",cell:e=>(0,s.jsx)(f.G3,{value:(0,I.Z)(e.getValue())}),header:e=>(0,s.jsx)(f.Rr,{value:"Project",...e})}),b.display({id:"status",cell:e=>(0,s.jsx)(m.Z,{result:e.row.original}),header:e=>(0,s.jsx)(f.Rr,{value:"Status",...e})}),b.accessor(e=>e.system,{id:"system",cell:e=>(0,s.jsx)(f.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(f.Rr,{value:"System",...e})}),b.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,s.jsx)(f.G3,{value:e.getValue()}),header:e=>(0,s.jsx)(f.Rr,{value:"Detected by",...e})}),b.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,s.jsx)(p.Cy,{time:e.getValue()}),header:e=>(0,s.jsx)(f.Rr,{value:"When",...e})}),b.accessor(e=>e,{id:"action",cell:e=>y(e.getValue())===n.DATASET?(0,s.jsx)(A.Z,{resource:e.getValue()}):(0,s.jsx)(D.Z,{resource:e.getValue()}),header:e=>(0,s.jsx)(f.Rr,{value:"Action",...e})})],[]),K=(0,u.b7)({getCoreRowModel:(0,d.sC)(),getGroupedRowModel:(0,d.qe)(),getExpandedRowModel:(0,d.rV)(),getRowId:v.Z,columns:$,manualPagination:!0,data:P,columnResizeMode:"onChange"});return F?(0,s.jsx)(f.I4,{rowHeight:36,numRows:36}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Q$,{children:(0,s.jsxs)(g.kCb,{gap:6,align:"center",children:[(0,s.jsx)(g.xuv,{flexShrink:0,children:(0,s.jsx)(j.f,{value:o,onChange:l})}),(0,s.jsx)(L.a,{})]})}),(0,s.jsx)(f.ZK,{tableInstance:K,onRowClick:t,emptyTableNotice:(0,s.jsx)(T,{})}),(0,s.jsx)(f.s8,{totalRows:V||0,pageSizes:c,setPageSize:_,onPreviousPageClick:O,isPreviousPageDisabled:w||k,onNextPageClick:N,isNextPageDisabled:M||k,startRange:H,endRange:Z})]})},w=i(21910),N=()=>{let{navigateToDetectionResults:e,navigateToDiscoveryResults:t}=(0,c.Z)();return(0,s.jsxs)(o.Z,{title:"Data discovery",children:[(0,s.jsx)(l.Z,{heading:"All activity"}),(0,s.jsx)(O,{onRowClick:i=>{if(y(i)===n.DATASET){e({resourceUrn:i.urn});return}t({resourceUrn:i.urn})},statusFilters:[w.LL.ADDITION,w.LL.REMOVAL,w.LL.CLASSIFICATION_ADDITION,w.LL.CLASSIFICATION_UPDATE],childsStatusFilters:[w.LL.ADDITION,w.LL.REMOVAL,w.LL.CLASSIFICATION_ADDITION,w.LL.CLASSIFICATION_UPDATE]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=i(19043)}},function(e){e.O(0,[431,8002,2888,9774,179],function(){return e(e.s=45550)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9738],{53910:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datamap",function(){return n(18839)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var i=n(24246),r=n(96306),s=n(88038),l=n.n(s),a=n(86677);n(27378);var o=n(25980),d=n(90867),u=n(42478),c=n(77830),g=()=>{let e=(0,a.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.AD)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},x=e=>{let{children:t,title:n,padded:s=!0,mainProps:c}=e,x=(0,o.hz)(),h=(0,a.useRouter)(),m="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,p=!(x.flags.messagingConfiguration&&m),{data:f}=(0,u.JE)(void 0,{skip:p}),{data:v}=(0,d.PW)(void 0,{skip:p}),j=x.flags.messagingConfiguration&&(!f||!v)&&m;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(l(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[j?(0,i.jsx)(g,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(96306),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:l=!0,children:a,rightContent:o,style:d,...u}=e;return(0,i.jsxs)("div",{...u,style:l?{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,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.lQT,{className:n||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return d}});var i=n(24246),r=n(96306),s=n(34090),l=n(27378),a=n(46238),o=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:u,isRequired:c,layout:g="inline",helperText:x,...h}=e,[m,p,{setValue:f}]=(0,s.U$)(t),v=!!(p.touched&&p.error),[j,y]=(0,l.useState)("");m.value||"tags"!==h.mode&&"multiple"!==h.mode||(m.value=[]),"tags"===h.mode&&"string"==typeof m.value&&(m.value=[m.value]);let C="tags"===h.mode?(e,t)=>e?e.value!==j||m.value.includes(j)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:h.optionRender||void 0,b=e=>{y(e),h.onSearch&&h.onSearch(e)},w=(e,t)=>{f(e),h.onChange&&h.onChange(e,t)};return"inline"===g?(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:c,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(o.__,{htmlFor:h.id||t,...d,children:n}):null,(0,i.jsxs)(r.jqI,{align:"center",children:[(0,i.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(r.WPr,{...m,id:h.id||t,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:C,onSearch:"tags"===h.mode?b:void 0,onChange:w,value:m.value||void 0,status:v?"error":void 0}),x&&(0,i.jsx)(r.Q6r,{children:x}),(0,i.jsx)(o.Bc,{isInvalid:v,message:p.error,fieldName:m.name})]}),(0,i.jsx)(a.b,{label:u,className:v?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:c,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(o.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,(0,i.jsx)(a.b,{label:u})]}),(0,i.jsx)(r.WPr,{...m,id:h.id||t,"data-testid":"controlled-select-".concat(m.name),...h,optionRender:C,onSearch:"tags"===h.mode?b:void 0,onChange:w,value:m.value||void 0,status:v?"error":void 0}),x&&(0,i.jsx)(r.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(o.Bc,{isInvalid:v,message:p.error,fieldName:m.name})]})})}},17245:function(e,t,n){"use strict";n.d(t,{HK:function(){return l},VY:function(){return r.V},pI:function(){return u},h0:function(){return i.h},Rx:function(){return x},rK:function(){return m}});var i=n(36866),r=n(84306),s=n(812);let l=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?n=t.data.detail:(0,s.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}};var a=n(27378),o=n(20682),d=n(21910);let u=e=>{let{data:t}=(0,o.$I)({}),n=(0,a.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,a.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===d.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=n.find(t=>{var n;return t.identifier===(null===(n=e.saas_config)||void 0===n?void 0:n.type)});if(t)return t}return e},[e,n])};var c=n(40431);let g=()=>({search:c.Oi.withDefault("")}),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:n}=e,i=(0,a.useMemo)(()=>g(),[]),[r,s]=(0,c.XI)(i,{history:"push"}),l=(0,a.useMemo)(()=>({searchQuery:r.search||t||void 0}),[r,t]),o=(0,a.useCallback)(e=>{s({search:e||null})},[s]),d=(0,a.useCallback)(()=>{s({search:null})},[s]);return(0,a.useEffect)(()=>{n&&n(l)},[l,n]),{...l,updateSearch:o,resetSearch:d,searchProps:{value:l.searchQuery||"",onChange:o,onClear:()=>o("")}}},h=e=>({sortKey:e?(0,c.jx)([...e]):c.Oi.withDefault(""),sortOrder:(0,c.km)(["ascend","descend"])}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:n,onSortingChange:i,validColumns:r}=e,s=(0,a.useMemo)(()=>h(r),[r]),[l,o]=(0,c.XI)(s,{history:"push"}),d=(0,a.useMemo)(()=>{var e;return{sortKey:l.sortKey||t,sortOrder:null!==(e=l.sortOrder)&&void 0!==e?e:n}},[l,t,n]),u=(0,a.useCallback)((e,t)=>{o({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[o]),g=(0,a.useCallback)(()=>{o({sortKey:null,sortOrder:null})},[o]);return(0,a.useEffect)(()=>{i&&i(d)},[d,i]),{...d,updateSorting:u,resetSorting:g,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:d.sortOrder,sortedInfo:d.sortKey?{field:d.sortKey,order:d.sortOrder}:void 0}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var i=n(24246),r=n(96306);let s=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,s)=>{let l={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,l):e(l)},successAlert:(t,n,s)=>{let l={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,l):e(l)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var i=n(24246),r=n(96306),s=n(79894),l=n.n(s),a=n(27378);let{Text:o}=r.AntTypography,d=e=>{let{items:t,...n}=e,s=(0,a.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:a.title})),d)?a.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},36866:function(e,t,n){"use strict";n.d(t,{h:function(){return d}});var i=n(40431),r=n(27378),s=n(55484);let l=(0,i.jo)({parse(e){let t=parseInt(e,10);try{return s.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var a=n(32735);let o=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:l.withDefault(a.Ej),size:n.pageSizeOptions?(0,i.bJ)(n.pageSizeOptions).withDefault(null!==(e=n.pageSize)&&void 0!==e?e:a.L8):l.withDefault(null!==(t=n.pageSize)&&void 0!==t?t:a.L8)}},d=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:s=a.L8,pageSizeOptions:l,showSizeChanger:d=!0}=n,u=null!=l?l:a.VZ,c=(0,r.useMemo)(()=>o({pageSize:s,pageSizeOptions:l}),[s,l]),[g,x]=(0,i.XI)(c,{history:"push"}),h={pageIndex:null!==(e=g.page)&&void 0!==e?e:a.Ej,pageSize:null!==(t=g.size)&&void 0!==t?t:s};return{...h,updatePageIndex:e=>{x({page:e})},updatePageSize:e=>{x({page:e!==h.pageSize?a.Ej:h.pageIndex,size:e})},resetPagination:()=>{x({page:a.Ej,size:s})},nextPage:()=>{x(e=>{let{page:t,size:n}=e;return{page:t+1,size:n}})},previousPage:()=>{x(e=>{let{page:t,size:n}=e;return{page:t-1,size:n}})},pageSizeOptions:u,showSizeChanger:d}}},99811:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var i=n(27378);class r{updateTableInstance(e){this.tableInstance=e}constructor(e=null){this.tableInstance=e,this.updateTableInstance=this.updateTableInstance.bind(this)}}let s=i.createContext(new r);t.Z=s},42478:function(e,t,n){"use strict";n.d(t,{FU:function(){return d},JE:function(){return r},Ki:function(){return c},SU:function(){return g},W:function(){return x},h9:function(){return s},jc:function(){return i},qt:function(){return o},sn:function(){return u}});let{useGetEmailInviteStatusQuery:i,useGetActiveMessagingProviderQuery:r,useCreateMessagingConfigurationMutation:s,useCreateMessagingConfigurationSecretsMutation:l,useGetMessagingConfigurationDetailsQuery:a,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:u,useUpdateMessagingConfigurationSecretsByKeyMutation:c,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:x}=n(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,n,i)=>{let r=await i({url:"messaging/default/active"});return r.error&&404===r.error.status?{data:null}:r},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},18839:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return W}});var i=n(24246),r=n(27378),s=n(45938),l=n(77213),a=n(58754),o=n(96306),d=n(65218),u=n.n(d),c=n(16134),g=n(35258),x=n(92222),h=n(59003),m=n(30002),p=n(28079),f=n(49600),v=n(99811);let j=e=>{var t;let{column:n}=e,{tableInstance:i}=(0,r.useContext)(v.Z),s=r.useMemo(()=>Array.from(n.getFacetedUniqueValues().keys()),[n]),l=r.useMemo(()=>{let e={};return s.forEach(t=>{e[t]=!1}),e},[s]);return{filterValue:null!==(t=n.getFilterValue())&&void 0!==t?t:l,clearFilterOptions:()=>{let e={};s.forEach(t=>{e[t]=!1}),n.setFilterValue(e)},toggleFilterOption:(e,t)=>{var r;let s={...null!==(r=n.getFilterValue())&&void 0!==r?r:l,[e]:t};Object.values(s).every(e=>!e)?null==i||i.setColumnFilters(null==i?void 0:i.getState().columnFilters.filter(e=>e.id!==n.id)):n.setFilterValue(s)},options:s,header:n.columnDef.header}};var y=n(57072);let C=(0,x.Cl)(),b={multifield:(e,t,n)=>n[e.original[t]]},w=()=>{let e=(0,c.T)(),{updateTableInstance:t}=(0,r.useContext)(v.Z),n=(0,c.C)(f.eo),{data:i,isLoading:s}=(0,f.Ex)({organizationName:"default_organization"});(0,y.MO)(),(0,p.fd)(),(0,m.te)();let l=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(i){let{columns:t,rows:n}=i;e((0,f.dd)(t)),l.current||(l.current=!0,0===n.length?e((0,f.ym)(!0)):e((0,f.ym)(!1)))}},[i,e]);let a=(0,r.useMemo)(()=>i?i.rows:[],[i]),o=(0,r.useMemo)(()=>(n||[]).map(e=>{let{text:t,value:n}=e;return C.accessor(e=>e[n],{id:n,header:t,cell:e=>{let{getValue:t}=e,n=t();return Array.isArray(n)?n.join(", "):n},filterFn:b.multifield})}),[n]),d=(0,h.b7)({columns:o,data:a,filterFns:b,getCoreRowModel:(0,x.sC)(),getFilteredRowModel:(0,x.vL)(),getFacetedRowModel:(0,x.o6)(),getFacetedUniqueValues:(0,x.JG)(),manualPagination:!0,columnResizeMode:"onChange"});return(0,r.useEffect)(()=>t(d),[d,t]),{...d,isLoading:s}};var S=n(83766),k=n.n(S),M=n(25980),I=n(46238),T=n(47935),F=n(22968);let q=e=>{var t,n,r;let{option:s,columnId:l,filterValue:a,toggleFilterOption:d}=e,u=(0,c.C)(y.L5),g=l===F.Ux&&null!==(n=null===(t=u.get(s))||void 0===t?void 0:t.name)&&void 0!==n?n:s;return(0,i.jsx)(o.XZJ,{value:s,width:"193px",height:"20px",mb:"25px",isChecked:null!==(r=a[s])&&void 0!==r&&r,onChange:e=>{let{target:t}=e;d(s,t.checked)},_focusWithin:{bg:"gray.100"},colorScheme:"complimentary",children:(0,i.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,height:"20px",width:"170px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:g})},s)};var z=e=>{let{column:t}=e,{filterValue:n,toggleFilterOption:s,options:l}=j({column:t}),[a,d]=(0,r.useState)(!1),u=a?l:l.slice(0,15),c=l.length>15;return(0,i.jsx)(o.UQy,{width:"100%",allowToggle:!0,children:(0,i.jsxs)(o.Qdk,{border:"0px",children:[(0,i.jsx)(o.X6q,{height:"56px",children:(0,i.jsxs)(o.KFZ,{height:"100%",children:[(0,i.jsx)(o.xuv,{flex:"1",alignItems:"center",justifyContent:"center",textAlign:"left",children:t.columnDef.header}),(0,i.jsx)(o.XEm,{})]})}),(0,i.jsxs)(o.Hk3,{children:[(0,i.jsx)(o.MIq,{columns:3,children:u.map(e=>(0,i.jsx)(q,{columnId:t.id,option:e,filterValue:n,toggleFilterOption:s},e))}),!a&&c?(0,i.jsx)(o.wpx,{type:"text",onClick:()=>{d(!0)},children:"View more"}):null,a&&c?(0,i.jsx)(o.wpx,{type:"text",onClick:()=>{d(!1)},children:"View less"}):null]})]})},t.id)};let O=e=>{let{heading:t,children:n}=e;return(0,i.jsxs)(o.xuv,{padding:"24px 8px 8px 24px",children:[(0,i.jsx)(o.X6q,{size:"md",lineHeight:6,fontWeight:"bold",mb:2,children:t}),n]})};var P=e=>{let t,{isOpen:n,onClose:s}=e,{tableInstance:l}=(0,r.useContext)(v.Z),a=null==l?void 0:l.getHeaderGroups(),d=(e,t)=>e.filter(e=>e.id===t).map(e=>(0,i.jsx)(z,{column:e.column},t)),u=(0,r.useMemo)(()=>(null==a?void 0:a[0].headers)||[],[a]);return(0,i.jsxs)(o.u_l,{isOpen:n,onClose:s,isCentered:!0,size:"2xl",children:[(0,i.jsx)(o.ZAr,{}),(0,i.jsxs)(o.hzk,{children:[(0,i.jsx)(o.xBx,{children:"Filters"}),(0,i.jsx)(o.olH,{}),(0,i.jsx)(o.izJ,{}),(0,i.jsx)(o.fef,{maxH:"85vh",padding:"0px",overflowX:"auto",children:(t=[F.vy,F.Ux,F.OL],u.some(e=>t.indexOf(e.id)>-1))?(0,i.jsxs)(O,{heading:"Privacy attributes",children:[d(u,F.vy),d(u,F.Ux),d(u,F.OL)]}):null}),(0,i.jsx)(o.mzw,{children:(0,i.jsxs)(o.xuv,{display:"flex",justifyContent:"space-between",width:"100%",children:[(0,i.jsx)(o.wpx,{onClick:()=>{null==l||l.resetColumnFilters()},className:"mr-3 grow",children:"Reset Filters"}),(0,i.jsx)(o.wpx,{onClick:s,type:"primary",className:"grow",children:"Done"})]})})]})]})};let E=()=>{let{isOpen:e,onOpen:t,onClose:n}=(0,o.qY0)();return{isFilterModalOpen:e,onFilterModalOpen:t,onFilterModalClose:n}};var R=()=>{let{isFilterModalOpen:e,onFilterModalOpen:t,onFilterModalClose:n}=E(),{tableInstance:s}=(0,r.useContext)(v.Z),{systemsCount:l,dictionaryService:a}=(0,M.hz)(),d=null==s?void 0:s.getRowModel(),u=(0,r.useMemo)(()=>{let e=(null==d?void 0:d.rows)||[];return k()(null==e?void 0:e.map(e=>e.original["system.fides_key"]))},[d]);if(!s)return null;let c=u.length,g=s.getState().columnFilters.length;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.kCb,{justifyContent:"flex-end",flexDirection:"row",alignItems:"center",flexWrap:"wrap",rowGap:4,columnGap:4,children:[(0,i.jsx)(o.kCb,{flexGrow:1,children:(0,i.jsx)(T.HO,{globalFilter:s.getState().globalFilter,setGlobalFilter:s.setGlobalFilter})}),(0,i.jsxs)(o.kCb,{children:[l>0?(0,i.jsxs)(o.kCb,{alignItems:"center",borderRadius:"md",gap:1,marginRight:4,children:[(0,i.jsxs)(o.xvT,{fontSize:"xs",children:[c," of ",l," systems displayed"]}),a?(0,i.jsx)(I.b,{label:"Note that Global Vendor List (GVL) and Additional Consent (AC) systems are not currently included in these reports"}):null]}):null,(0,i.jsxs)(o.wpx,{"aria-label":"Open Filter Settings",onClick:t,children:["Filter",g>0?(0,i.jsx)(o.j8w,{className:"ml-2",children:g}):null]})]})]}),(0,i.jsx)(P,{isOpen:e,onClose:n})]})},_=n(38943),N=n(77830),Z=()=>(0,i.jsx)(o.M5Y,{flex:1,"data-testid":"get-started-modal",backgroundColor:"gray.100",children:(0,i.jsx)(o.xuv,{backgroundColor:"white",p:10,borderRadius:"6px",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",maxWidth:{base:"80%",lg:"60%",xl:"50%"},maxHeight:"90%",textAlign:"center",children:(0,i.jsxs)(o.Kqy,{spacing:4,children:[(0,i.jsx)(o.xvT,{color:"gray.700",fontWeight:"600",children:"Privacy engineering can seem like an endlessly complex confluence of legal and data engineering terminology—fear not—Fides is here to simplify this."}),(0,i.jsx)(o.xvT,{children:"Start by scanning your infrastructure. The scanner will connect to your infrastructure to automatically scan and create a list of all systems available and then classify each system containing PII."}),(0,i.jsx)(o.xvT,{children:"Let's get started!"}),(0,i.jsx)(o.xuv,{children:(0,i.jsx)(o.wpx,{href:N.xo,role:"link",type:"primary",className:"w-fit","data-testid":"add-systems-btn",children:"Add Systems"})})]})})});let A=u()(()=>Promise.all([n.e(105),n.e(1096),n.e(8765),n.e(9278),n.e(699),n.e(6148),n.e(5619),n.e(4259),n.e(1975)]).then(n.bind(n,34849)),{loadableGenerated:{webpack:()=>[34849]},ssr:!1,loading:()=>(0,i.jsx)(o.M5Y,{width:"100%",flex:"1",children:(0,i.jsx)(o.$jN,{})})}),K=()=>{let e=(0,c.C)(_.Xt),{attemptAction:t}=(0,s.oI)(),[n,i]=(0,r.useState)(),l=(0,r.useCallback)(e=>{t().then(t=>{t&&i(e)})},[t,i]),a=(0,r.useCallback)(()=>{t().then(e=>{e&&n&&i(void 0)})},[t,n]);return{isGettingStarted:e,selectedSystemId:n,setSelectedSystemId:l,resetSelectedSystemId:a}};var V=()=>{let{isGettingStarted:e,setSelectedSystemId:t,selectedSystemId:n,resetSelectedSystemId:r}=K(),{isLoading:s}=w();return s?(0,i.jsx)(o.M5Y,{width:"100%",flex:"1",children:(0,i.jsx)(o.$jN,{})}):e?(0,i.jsx)(Z,{}):(0,i.jsxs)(o.kCb,{direction:"column",height:"100%",children:[(0,i.jsx)(o.xuv,{marginBottom:3,marginRight:10,children:(0,i.jsx)(R,{})}),(0,i.jsxs)(o.kCb,{position:"relative",flex:1,direction:"row",overflow:"auto",borderWidth:"1px",borderStyle:"solid",borderColor:"gray.200",children:[(0,i.jsx)(o.xuv,{flex:1,minWidth:"50%",maxWidth:"100%",children:(0,i.jsx)(A,{setSelectedSystemId:t,selectedSystemId:n})}),(0,i.jsx)(g.Z,{selectedSystemId:n,resetSelectedSystemId:r})]})]})},W=()=>{let e=(0,r.useMemo)(()=>new v.m,[]);return(0,i.jsxs)(l.Z,{title:"Data lineage",mainProps:{padding:"24px 0 0 40px"},children:[(0,i.jsx)(a.Z,{style:{paddingLeft:0},heading:"Data lineage"}),(0,i.jsxs)(v.Z.Provider,{value:e,children:[(0,i.jsx)(V,{}),(0,i.jsx)(s.eB,{})]})]})}}},function(e){e.O(0,[431,5163,255,7218,504,2888,9774,179],function(){return e(e.s=53910)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8538],{73846:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/new",function(){return a(17294)}])},17245:function(e,t,a){"use strict";a.d(t,{HK:function(){return l},VY:function(){return n.V},pI:function(){return d},h0:function(){return r.h},Rx:function(){return h},rK:function(){return y}});var r=a(36866),n=a(84306),s=a(812);let l=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let a="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?a=t.data.detail:(0,s.tB)(t)&&(a=t.data.detail[0].msg),e(a)}}};var i=a(27378),o=a(20682),u=a(21910);let d=e=>{let{data:t}=(0,o.$I)({}),a=(0,i.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,i.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===u.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=a.find(t=>{var a;return t.identifier===(null===(a=e.saas_config)||void 0===a?void 0:a.type)});if(t)return t}return e},[e,a])};var c=a(40431);let f=()=>({search:c.Oi.withDefault("")}),h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:a}=e,r=(0,i.useMemo)(()=>f(),[]),[n,s]=(0,c.XI)(r,{history:"push"}),l=(0,i.useMemo)(()=>({searchQuery:n.search||t||void 0}),[n,t]),o=(0,i.useCallback)(e=>{s({search:e||null})},[s]),u=(0,i.useCallback)(()=>{s({search:null})},[s]);return(0,i.useEffect)(()=>{a&&a(l)},[l,a]),{...l,updateSearch:o,resetSearch:u,searchProps:{value:l.searchQuery||"",onChange:o,onClear:()=>o("")}}},p=e=>({sortKey:e?(0,c.jx)([...e]):c.Oi.withDefault(""),sortOrder:(0,c.km)(["ascend","descend"])}),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:a,onSortingChange:r,validColumns:n}=e,s=(0,i.useMemo)(()=>p(n),[n]),[l,o]=(0,c.XI)(s,{history:"push"}),u=(0,i.useMemo)(()=>{var e;return{sortKey:l.sortKey||t,sortOrder:null!==(e=l.sortOrder)&&void 0!==e?e:a}},[l,t,a]),d=(0,i.useCallback)((e,t)=>{o({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[o]),f=(0,i.useCallback)(()=>{o({sortKey:null,sortOrder:null})},[o]);return(0,i.useEffect)(()=>{r&&r(u)},[u,r]),{...u,updateSorting:d,resetSorting:f,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:u.sortOrder,sortedInfo:u.sortKey?{field:u.sortKey,order:u.sortOrder}:void 0}}}},36866:function(e,t,a){"use strict";a.d(t,{h:function(){return u}});var r=a(40431),n=a(27378),s=a(55484);let l=(0,r.jo)({parse(e){let t=parseInt(e,10);try{return s.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var i=a(32735);let o=function(){var e,t;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:l.withDefault(i.Ej),size:a.pageSizeOptions?(0,r.bJ)(a.pageSizeOptions).withDefault(null!==(e=a.pageSize)&&void 0!==e?e:i.L8):l.withDefault(null!==(t=a.pageSize)&&void 0!==t?t:i.L8)}},u=function(){var e,t;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:s=i.L8,pageSizeOptions:l,showSizeChanger:u=!0}=a,d=null!=l?l:i.VZ,c=(0,n.useMemo)(()=>o({pageSize:s,pageSizeOptions:l}),[s,l]),[f,h]=(0,r.XI)(c,{history:"push"}),p={pageIndex:null!==(e=f.page)&&void 0!==e?e:i.Ej,pageSize:null!==(t=f.size)&&void 0!==t?t:s};return{...p,updatePageIndex:e=>{h({page:e})},updatePageSize:e=>{h({page:e!==p.pageSize?i.Ej:p.pageIndex,size:e})},resetPagination:()=>{h({page:i.Ej,size:s})},nextPage:()=>{h(e=>{let{page:t,size:a}=e;return{page:t+1,size:a}})},previousPage:()=>{h(e=>{let{page:t,size:a}=e;return{page:t-1,size:a}})},pageSizeOptions:d,showSizeChanger:u}}},17294:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return z}});var r=a(24246),n=a(96306),s=a(27378),l=a(77213),i=a(77830),o=a(58754),u=a(34090),d=a(86677),c=a(16125),f=a(55484),h=a(25980),p=a(40324),y=a(812),m=a(58452),g=a(46628),b=a(83265),_=a(32885),v=a(21910),x=a(20386);let j=e=>!("system_type"in e),w={url:"",classify:!1,classifyConfirmed:!1},C=f.Ry().shape({url:f.Z_().required().label("Database URL"),classify:f.O7(),classifyConfirmed:f.O7().when(["url","classify"],{is:(e,t)=>e&&t,then:()=>f.O7().equals([!0])})});var O=()=>{let[e,{isLoading:t}]=(0,x.pR)(),[a,{isLoading:s}]=(0,x.IR)(),[l,{isLoading:o}]=(0,_.Du)(),f=t||s||o,O=(0,n.pmc)(),S=(0,d.useRouter)(),k=(0,h.hz)(),D=(0,c.I0)(),E=async t=>{var a;let r=await e({organization_key:b.Av,generate:{config:{connection_string:t.url},target:v.GC.DB,type:v.j.DATASETS}});if((0,y.D4)(r))return{error:(0,y.e$)(r.error)};let n=(null!==(a=r.data.generate_results)&&void 0!==a?a:[]).filter(j);return n&&n.length>0?{datasets:n}:{error:"Unable to generate a dataset with this connection."}},P=async e=>{let t=await a(e);return(0,y.D4)(t)?{error:(0,y.e$)(t.error)}:{dataset:t.data}},z=async e=>{let{values:t,datasets:a}=e,r=await l({dataset_schemas:a.map(e=>{let{name:t,fides_key:a}=e;return{fides_key:a,name:t}}),schema_config:{organization_key:b.Av,generate:{config:{connection_string:t.url},target:v.GC.DB,type:v.j.DATASETS}}});return(0,y.D4)(r)?{error:(0,y.e$)(r.error)}:{classifyInstances:r.data.classify_instances}},A=async e=>{var t;let a=await E(e);if("error"in a){O((0,g.Vo)(a.error));return}let r=await Promise.all(a.datasets.map(e=>P(e))),n=null!==(t=r.find(e=>"error"in e))&&void 0!==t?t:r[0];if("error"in n){O((0,g.Vo)(n.error));return}if(!e.classify){O((0,g.t5)("Generated ".concat(n.dataset.name," dataset"))),S.push({pathname:i.o5,query:{datasetId:n.dataset.fides_key}});return}let s=await z({values:e,datasets:a.datasets});if("error"in s){O((0,g.Vo)(s.error));return}O((0,g.t5)("Generate and classify are now in progress")),D((0,x.Zl)(n.dataset.fides_key)),S.push("/dataset")};return(0,r.jsx)(u.J9,{initialValues:{...w,classify:k.plus},validationSchema:C,onSubmit:A,validateOnChange:!1,validateOnBlur:!1,children:e=>{let{isSubmitting:t,errors:a,values:s,submitForm:l,resetForm:i,setFieldValue:o}=e;return(0,r.jsxs)(u.l0,{children:[(0,r.jsxs)(n.gCW,{spacing:8,align:"left",children:[(0,r.jsx)(n.xvT,{size:"sm",color:"gray.700",children:"Connect to a database using the connection URL. You may have received this URL from a colleague or your Ethyca developer support engineer."}),(0,r.jsx)(n.xuv,{children:(0,r.jsx)(p.j0,{name:"url",label:"Database URL"})}),k.plus?(0,r.jsx)(p.w8,{name:"classify",label:"Classify dataset",tooltip:"Use Fides Classify to suggest labels based on your data."}):null,(0,r.jsx)(n.xuv,{children:(0,r.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:t||f,disabled:t||f,"data-testid":"create-dataset-btn",children:"Generate dataset"})})]}),(0,r.jsx)(m.Z,{title:"Generate and classify this dataset",message:"You have chosen to generate and classify this dataset. This process may take several minutes. In the meantime you can continue using Fides. You will receive a notification when the process is complete.",isOpen:void 0!==a.classifyConfirmed,onClose:()=>{i({values:{...s,classifyConfirmed:!1}})},onConfirm:()=>{o("classifyConfirmed",!0),setTimeout(()=>{l()},0)}})]})}})},S=a(66527),k=a(17245),D=a(41207),E=a(39715),P=()=>{let[e]=(0,x.IR)(),[t,a]=(0,s.useState)(!0),[l,o]=(0,s.useState)(!1),[u,c]=(0,s.useState)(!1),f=(0,s.useRef)(null),h=(0,d.useRouter)(),p=(0,n.pmc)(),{errorAlert:m}=(0,k.VY)(),[b,_]=(0,s.useState)(void 0),v=e=>{S.ZP.load(e,{json:!0}),_(void 0)},j=async t=>{let a;return"object"==typeof t&&null!=t&&"dataset"in t&&Array.isArray(t.dataset)?[a]=t.dataset:Array.isArray(t)?[a]=t:a=t,e(a)},w=e=>{p((0,g.t5)("Successfully loaded new dataset YAML")),(0,x.Zl)(e.fides_key),h.push({pathname:i.o5,query:{datasetId:e.fides_key}})},C=async()=>{o(!0);let e=f.current.getValue(),t=S.ZP.load(e,{json:!0}),a=await j(t);(0,y.D4)(a)?p((0,g.Vo)((0,y.e$)(a.error))):"data"in a&&w(a.data),o(!1)};return(0,r.jsxs)(n.kCb,{gap:"97px",children:[(0,r.jsxs)(n.xuv,{w:"75%",children:[(0,r.jsx)(n.xuv,{color:"gray.700",fontSize:"14px",mb:4,children:"Get started creating your first dataset by pasting your dataset yaml below! You may have received this yaml from a colleague or your Ethyca developer support engineer."}),(0,r.jsxs)(n.gCW,{align:"stretch",children:[(0,r.jsx)(n.izJ,{color:"gray.100"}),(0,r.jsx)(D.M,{defaultLanguage:"yaml",height:"calc(100vh - 515px)",onChange:e=>{try{c(!0),v(e),a(!!(!e||""===e.trim()))}catch(e){(0,D.F)(e)?_(e):m("Could not parse the supplied YAML")}},onMount:e=>{f.current=e,f.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0}},theme:"light"}),(0,r.jsx)(n.izJ,{color:"gray.100"}),(0,r.jsx)(n.wpx,{type:"primary",disabled:t||!!b||l,loading:l,onClick:C,htmlType:"submit",className:"mt-6 w-fit",children:"Create dataset"})]})]}),(0,r.jsx)(n.xuv,{children:u&&(t||b)&&(0,r.jsx)(E.Z,{isEmptyState:t,yamlError:b})})]})},z=()=>{let[e,t]=(0,s.useState)(null);return(0,r.jsxs)(l.Z,{title:"Create New Dataset",children:[(0,r.jsx)(o.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets",href:i.$m},{title:"Create new"}]}),(0,r.jsxs)(n.Kqy,{spacing:8,children:[(0,r.jsxs)(n.xuv,{children:[(0,r.jsx)(n.wpx,{onClick:()=>t("yaml"),"data-testid":"upload-yaml-btn",className:"mr-2",children:"Upload a Dataset YAML"}),(0,r.jsx)(n.wpx,{onClick:()=>t("database"),ghost:"database"===e,className:"mr-2","data-testid":"connect-db-btn",children:"Connect to a database"})]}),"database"===e&&(0,r.jsx)(n.xuv,{w:{base:"100%",lg:"50%"},children:(0,r.jsx)(O,{})}),"yaml"===e&&(0,r.jsx)(n.xuv,{w:{base:"100%"},children:(0,r.jsx)(P,{})})]})]})}},76737:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{default:function(){return i},noSSR:function(){return l}});let r=a(51538);a(24246),a(27378);let n=r._(a(21887));function s(e){return{default:(null==e?void 0:e.default)||e}}function l(e,t){return delete t.webpack,delete t.modules,e(t)}function i(e,t){let a=n.default,r={loading:e=>{let{error:t,isLoading:a,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e});let i=(r={...r,...t}).loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?a({...r,loader:()=>null!=i?i().then(s):Promise.resolve(s(()=>null))}):(delete r.webpack,delete r.modules,l(a,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return r}});let r=a(51538)._(a(27378)).default.createContext(null)},21887:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let r=a(51538)._(a(27378)),n=a(28438),s=[],l=[],i=!1;function o(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}class u{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function d(e){return function(e,t){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),s=null;function o(){if(!s){let t=new u(e,a);s={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return s.promise()}if(!i){let e=a.webpack?a.webpack():a.modules;e&&l.push(t=>{for(let a of e)if(t.includes(a))return o()})}function d(e,t){!function(){o();let e=r.default.useContext(n.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let l=r.default.useSyncExternalStore(s.subscribe,s.getCurrentValue,s.getCurrentValue);return r.default.useImperativeHandle(t,()=>({retry:s.retry}),[]),r.default.useMemo(()=>{var t;return l.loading||l.error?r.default.createElement(a.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:s.retry}):l.loaded?r.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return d.preload=()=>o(),d.displayName="LoadableComponent",r.default.forwardRef(d)}(o,e)}function c(e,t){let a=[];for(;e.length;){let r=e.pop();a.push(r(t))}return Promise.all(a).then(()=>{if(e.length)return c(e,t)})}d.preloadAll=()=>new Promise((e,t)=>{c(s).then(e,t)}),d.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let a=()=>(i=!0,t());c(l,e).then(a,a)})),window.__NEXT_PRELOADREADY=d.preloadReady;let f=d},65218:function(e,t,a){e.exports=a(76737)}},function(e){e.O(0,[431,6527,5574,2888,9774,179],function(){return e(e.s=73846)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[710],{66726:function(e,t,n){var i=n(11611),r=n(82846),a=n(91936),o=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,g,p,f=0,m=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function x(t){var n=l,i=u;return l=u=void 0,f=t,d=e.apply(i,n)}function y(e){var n=e-p,i=e-f;return void 0===p||n>=t||n<0||h&&i>=c}function j(){var e,n,i,a=r();if(y(a))return C(a);g=setTimeout(j,(e=a-p,n=a-f,i=t-e,h?s(i,c-n):i))}function C(e){return(g=void 0,v&&l)?x(e):(l=u=void 0,d)}function w(){var e,n=r(),i=y(n);if(l=arguments,u=this,p=n,i){if(void 0===g)return f=e=p,g=setTimeout(j,t),m?x(e):d;if(h)return clearTimeout(g),g=setTimeout(j,t),x(p)}return void 0===g&&(g=setTimeout(j,t)),d}return t=a(t)||0,i(n)&&(m=!!n.leading,c=(h="maxWait"in n)?o(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),w.cancel=function(){void 0!==g&&clearTimeout(g),f=0,l=p=u=g=void 0},w.flush=function(){return void 0===g?d:C(r())},w}},82846:function(e,t,n){var i=n(77400);e.exports=function(){return i.Date.now()}},9387:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations",function(){return n(31912)}])},30952:function(e,t,n){"use strict";n.d(t,{f:function(){return l}});var i=n(24246),r=n(66726),a=n.n(r),o=n(27378),s=n(26917);let l=e=>{let{value:t,onChange:n,placeholder:r,...l}=e,[u,c]=(0,o.useState)(t);(0,o.useEffect)(()=>{c(t||"")},[t]);let d=a()(n,500),g=(0,o.useCallback)(e=>{c(e),d(e)},[]);return(0,i.jsx)(s.Z,{value:u,onChange:g,onClear:()=>{c(""),n("")},placeholder:r,...l})}},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(24246),r=n(96306),a=n(88038),o=n.n(a),s=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(42478),d=n(77830),g=()=>{let e=(0,s.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(d.AD)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:a=!0,mainProps:d}=e,p=(0,l.hz)(),f=(0,s.useRouter)(),m="/privacy-requests"===f.pathname||"/datastore-connection"===f.pathname,h=!(p.flags.messagingConfiguration&&m),{data:v}=(0,c.JE)(void 0,{skip:h}),{data:x}=(0,u.PW)(void 0,{skip:h}),y=p.flags.messagingConfiguration&&(!v||!x)&&m;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,i.jsx)(g,{}):null,t]})]})}},17245:function(e,t,n){"use strict";n.d(t,{HK:function(){return o},VY:function(){return r.V},pI:function(){return c},h0:function(){return i.h},Rx:function(){return p},rK:function(){return m}});var i=n(36866),r=n(84306),a=n(812);let o=()=>{let{errorAlert:e}=(0,r.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?n=t.data.detail:(0,a.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}};var s=n(27378),l=n(20682),u=n(21910);let c=e=>{let{data:t}=(0,l.$I)({}),n=(0,s.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,s.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===u.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=n.find(t=>{var n;return t.identifier===(null===(n=e.saas_config)||void 0===n?void 0:n.type)});if(t)return t}return e},[e,n])};var d=n(40431);let g=()=>({search:d.Oi.withDefault("")}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:n}=e,i=(0,s.useMemo)(()=>g(),[]),[r,a]=(0,d.XI)(i,{history:"push"}),o=(0,s.useMemo)(()=>({searchQuery:r.search||t||void 0}),[r,t]),l=(0,s.useCallback)(e=>{a({search:e||null})},[a]),u=(0,s.useCallback)(()=>{a({search:null})},[a]);return(0,s.useEffect)(()=>{n&&n(o)},[o,n]),{...o,updateSearch:l,resetSearch:u,searchProps:{value:o.searchQuery||"",onChange:l,onClear:()=>l("")}}},f=e=>({sortKey:e?(0,d.jx)([...e]):d.Oi.withDefault(""),sortOrder:(0,d.km)(["ascend","descend"])}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:n,onSortingChange:i,validColumns:r}=e,a=(0,s.useMemo)(()=>f(r),[r]),[o,l]=(0,d.XI)(a,{history:"push"}),u=(0,s.useMemo)(()=>{var e;return{sortKey:o.sortKey||t,sortOrder:null!==(e=o.sortOrder)&&void 0!==e?e:n}},[o,t,n]),c=(0,s.useCallback)((e,t)=>{l({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[l]),g=(0,s.useCallback)(()=>{l({sortKey:null,sortOrder:null})},[l]);return(0,s.useEffect)(()=>{i&&i(u)},[u,i]),{...u,updateSorting:c,resetSorting:g,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:u.sortOrder,sortedInfo:u.sortKey?{field:u.sortKey,order:u.sortOrder}:void 0}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var i=n(24246),r=n(96306);let a=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,a)=>{let o={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,o):e(o)},successAlert:(t,n,a)=>{let o={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,o):e(o)}}}},36866:function(e,t,n){"use strict";n.d(t,{h:function(){return u}});var i=n(40431),r=n(27378),a=n(55484);let o=(0,i.jo)({parse(e){let t=parseInt(e,10);try{return a.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var s=n(32735);let l=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:o.withDefault(s.Ej),size:n.pageSizeOptions?(0,i.bJ)(n.pageSizeOptions).withDefault(null!==(e=n.pageSize)&&void 0!==e?e:s.L8):o.withDefault(null!==(t=n.pageSize)&&void 0!==t?t:s.L8)}},u=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:a=s.L8,pageSizeOptions:o,showSizeChanger:u=!0}=n,c=null!=o?o:s.VZ,d=(0,r.useMemo)(()=>l({pageSize:a,pageSizeOptions:o}),[a,o]),[g,p]=(0,i.XI)(d,{history:"push"}),f={pageIndex:null!==(e=g.page)&&void 0!==e?e:s.Ej,pageSize:null!==(t=g.size)&&void 0!==t?t:a};return{...f,updatePageIndex:e=>{p({page:e})},updatePageSize:e=>{p({page:e!==f.pageSize?s.Ej:f.pageIndex,size:e})},resetPagination:()=>{p({page:s.Ej,size:a})},nextPage:()=>{p(e=>{let{page:t,size:n}=e;return{page:t+1,size:n}})},previousPage:()=>{p(e=>{let{page:t,size:n}=e;return{page:t-1,size:n}})},pageSizeOptions:c,showSizeChanger:u}}},42478:function(e,t,n){"use strict";n.d(t,{FU:function(){return u},JE:function(){return r},Ki:function(){return d},SU:function(){return g},W:function(){return p},h9:function(){return a},jc:function(){return i},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:i,useGetActiveMessagingProviderQuery:r,useCreateMessagingConfigurationMutation:a,useCreateMessagingConfigurationSecretsMutation:o,useGetMessagingConfigurationDetailsQuery:s,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:p}=n(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,n,i)=>{let r=await i({url:"messaging/default/active"});return r.error&&404===r.error.status?{data:null}:r},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},31912:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var i,r,a=n(24246),o=n(96306),s=n(86677),l=n(27378),u=n(30952),c=n(25980),d=n(18225),g=n(17245),p=n(77213),f=n(77830),m=n(58754),h=n(16394),v=n(20682),x=n(41337),y=n(14207),j=n(8133),C=n(38187),w=n(21365),b=n(75595),k=e=>{let{integrationType:t,onConfigure:n}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Z,{integration:null==t?void 0:t.placeholder,integrationTypeInfo:t,onConfigureClick:n}),null==t?void 0:t.overview]})},S=e=>{let t=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let n=n=>{!t.current||t.current.contains(n.target)||n.target.closest('button, [role="button"], a, input, select, textarea')||e()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e]),t},T=n(35030),_=e=>{var t;let{integration:n,integrationTypeInfo:i,selected:r=!1,onClick:s,onDetailsClick:l,onUnfocus:u}=e,c=(0,g.pI)(n),d=i||(0,C.ZP)(null==n?void 0:n.connection_type,null==n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type),p=S(()=>{r&&u&&u()});return(0,a.jsxs)(o.xuv,{ref:p,borderWidth:1,borderColor:r?"black":"gray.200",backgroundColor:r?"gray.50":"transparent",boxShadow:r?"md":"none",borderRadius:"lg",overflow:"hidden",padding:"12px",cursor:"pointer",onClick:s,"data-testid":"integration-info-".concat(null==n?void 0:n.key),children:[(0,a.jsx)(o.kCb,{justifyContent:"space-between",alignItems:"flex-start",width:"100%",children:(0,a.jsxs)(o.kCb,{flexGrow:1,width:"100%",children:[(0,a.jsx)(x.Z,{data:null!=c?c:"",boxSize:"40px",className:"shrink-0"}),(0,a.jsxs)(o.kCb,{direction:"column",flexGrow:1,flexShrink:1,marginLeft:"12px",marginRight:"12px",width:0,children:[(0,a.jsx)(o.AntTypography.Text,{strong:!0,style:{color:"var(--chakra-colors-gray-700)",fontSize:"14px"},ellipsis:{tooltip:(null==n?void 0:n.name)||"(No name)"},children:(null==n?void 0:n.name)||"(No name)"}),(0,a.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",mt:1,children:(0,T.qS)(d.category)})]}),l&&(0,a.jsx)(o.wpx,{size:"small",onClick:e=>{e.stopPropagation(),l()},type:"default",className:"shrink-0 px-2 py-1 text-xs","data-testid":"details-btn-".concat(null==n?void 0:n.key),children:"Details"})]})}),(0,a.jsxs)(o.Eq9,{marginTop:"12px",spacing:1,children:[d.tags.slice(0,3).map(e=>(0,a.jsx)(o.j8w,{children:e},e)),d.tags.length>3&&(0,a.jsxs)(o.j8w,{color:"corinth",children:["+",d.tags.length-3]})]})]})},I=n(21910),M=n(28946),A=e=>{let{selectedIntegration:t,onSelectIntegration:n,onDetailClick:i}=e,[r,s]=(0,l.useState)(""),[u,g]=(0,l.useState)("ALL"),[p,f]=(0,l.useState)(!1),{flags:{oktaMonitor:m,newIntegrationManagement:h}}=(0,c.Vb)(),{data:x}=(0,v.$I)({}),y=(0,l.useMemo)(()=>(null==x?void 0:x.items)||[],[x]),j=(0,l.useMemo)(()=>{let e=C.FO;h||(e=e.filter(e=>e.placeholder.connection_type!==I.Rj.SAAS));let t=new Set(e.filter(e=>e.placeholder.connection_type===I.Rj.SAAS).map(e=>{var t;return null===(t=e.placeholder.saas_config)||void 0===t?void 0:t.type}));return[...e,...h?y.filter(e=>"saas"===e.type&&!t.has(e.identifier)).map(e=>(0,C.ZP)(I.Rj.SAAS,e.identifier,y)):[]]},[y,h]),w=(0,l.useMemo)(()=>{let e=["ALL",...Object.values(M.k).filter(e=>e!==M.k.IDENTITY_PROVIDER||m)];return h?e:e.filter(e=>"ALL"===e?j.length>0:j.some(t=>t.category===e))},[m,h,j]),b=(0,l.useMemo)(()=>{let e=j;if("ALL"!==u&&(e=e.filter(e=>e.category===u)),r.trim()){let t=r.toLowerCase();e=e.filter(e=>(e.placeholder.name||"").toLowerCase().includes(t))}return(e=e.filter(e=>!!m||"okta"!==e.placeholder.connection_type)).sort((e,t)=>{let n=e.placeholder.name||"",i=t.placeholder.name||"";return n.localeCompare(i)})},[r,u,m,j]),k=w.map(e=>"ALL"===e?{label:"All",value:e}:{label:(0,T.qS)(e),value:e}).sort((e,t)=>"All"===e.label?-1:"All"===t.label?1:e.label.localeCompare(t.label));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 mt-3 flex items-center justify-between gap-4",children:[(0,a.jsx)(o.uFc,{placeholder:"Search by name...",value:r,onChange:e=>s(e.target.value),className:"w-64",allowClear:!0}),(0,a.jsx)(o.WPr,{value:u,onChange:e=>{f(!0),g(e),setTimeout(()=>f(!1),100)},options:k,className:"w-48",placeholder:"Select category","data-testid":"category-filter-select"})]}),p?(0,a.jsx)(d.Z,{}):(0,a.jsx)("div",{className:"grid grid-cols-3 gap-6",children:b.map(e=>(0,a.jsx)("div",{children:(0,a.jsx)(_,{integration:e.placeholder,integrationTypeInfo:e,selected:(null==t?void 0:t.placeholder.key)===e.placeholder.key,onClick:()=>{n((null==t?void 0:t.placeholder.key)===e.placeholder.key?void 0:e)},onDetailsClick:()=>i(e),onUnfocus:()=>n(void 0)})},e.placeholder.key))})]})},E=n(64176);(i=r||(r={})).LIST_VIEW="list-view",i.DETAIL="detail",i.FORM="form";var z=e=>{var t,n,i;let{isOpen:r,onClose:s}=e,[u,c]=(0,l.useState)("list-view"),[d,g]=(0,l.useState)(null),[p,f]=(0,l.useState)(),[m,h]=(0,l.useState)(null),v=(0,E.Z)(null==p?void 0:p.placeholder.connection_type,null==p?void 0:null===(n=p.placeholder)||void 0===n?void 0:null===(t=n.saas_config)||void 0===t?void 0:t.type),{description:x}=(0,C.ZP)(null==p?void 0:p.placeholder.connection_type,null==p?void 0:null===(i=p.placeholder.saas_config)||void 0===i?void 0:i.type),y=()=>{c("list-view"),g(null),f(void 0),h(null),s()},b=()=>{g("detail"),c("form")},S=p&&"list-view"!==u?"".concat(p.placeholder.name," Integration"):"Add integration",T="list-view"===u?(0,a.jsxs)("div",{className:"flex w-full justify-between",children:[(0,a.jsx)(o.wpx,{onClick:y,children:"Cancel"}),(0,a.jsx)(o.wpx,{type:"primary",onClick:()=>{"list-view"===u&&p&&(g("list-view"),c("form"))},disabled:!p,children:"Next"})]}):"detail"===u?(0,a.jsxs)("div",{className:"flex w-full justify-between",children:[(0,a.jsx)(o.wpx,{onClick:()=>c("list-view"),children:"Back"}),(0,a.jsx)(o.wpx,{onClick:b,type:"primary","data-testid":"configure-modal-btn",children:"Next"})]}):"form"===u?(0,a.jsxs)("div",{className:"flex w-full justify-between",children:[(0,a.jsx)(o.wpx,{onClick:()=>{d&&(c(d),g(null))},children:"Back"}),(0,a.jsx)(o.wpx,{type:"primary",onClick:()=>{m&&m.submitForm&&m.submitForm()},disabled:!m||!m.isValid||!m.dirty,loading:null==m?void 0:m.loading,"data-testid":"save-btn",children:"Save"})]}):null;return(0,a.jsxs)(j.Z,{isOpen:r,onClose:y,title:S,scrollBehavior:"inside",showCloseButton:!0,modalContentProps:{height:"700px",maxWidth:"1010px"},footer:T,children:["list-view"===u&&(0,a.jsx)(A,{selectedIntegration:p,onSelectIntegration:e=>{f(e)},onDetailClick:e=>{c("detail"),f(e)}}),"detail"===u&&(0,a.jsx)(k,{integrationType:p,onConfigure:b}),"form"===u&&(0,a.jsx)(w.Z,{connectionOption:v,onClose:y,description:x,onFormStateChange:h})]})},P=n(40774);let N=e=>{let{integration:t}=e,n=(0,g.pI)(t);return(0,a.jsx)(x.Z,{data:n,boxSize:"20px"})};var Z=()=>{let[e,t]=(0,l.useState)(1),[n,i]=(0,l.useState)(50),[r,g]=(0,l.useState)(""),x=(0,s.useRouter)(),{flags:{newIntegrationManagement:j}}=(0,c.Vb)(),w=(0,l.useCallback)(r=>{(null==r?void 0:r.current)!==e&&t(r.current),(null==r?void 0:r.pageSize)&&r.pageSize!==n&&i(r.pageSize)},[e,n]),{data:b}=(0,v.$I)({}),k=(0,l.useMemo)(()=>(null==b?void 0:b.items)||[],[b]),S=(0,l.useMemo)(()=>j?C.jq:C.jq.filter(e=>e!==I.Rj.SAAS),[j]),{data:T,isLoading:_}=(0,y.AZ)({connection_type:S,size:n,page:e,search:r.trim()||void 0}),{items:M}=null!=T?T:{},{onOpen:A,isOpen:E,onClose:Z}=(0,o.qY0)(),q=(0,l.useMemo)(()=>{var e;return null!==(e=null==M?void 0:M.map(e=>{var t;return{...e,integrationTypeInfo:(0,C.ZP)(e.connection_type,null===(t=e.saas_config)||void 0===t?void 0:t.type,k)}}))&&void 0!==e?e:[]},[M,k]),O=e=>{x.push("".concat(f.KH,"/").concat(e.key))},L=[{title:"Name",dataIndex:"name",key:"name",width:250,render:(e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(N,{integration:t}),(0,a.jsx)(o.AntTypography.Text,{ellipsis:{tooltip:e||"(No name)"},className:"font-semibold",children:e||"(No name)"})]})},{title:"Type",dataIndex:"connection_type",key:"connection_type",width:150,render:(e,t)=>{var n;return(0,C.ZP)(e,null===(n=t.saas_config)||void 0===n?void 0:n.type,k).placeholder.name||e}},{title:"Capabilities",dataIndex:["integrationTypeInfo","tags"],key:"capabilities",width:300,render:e=>(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.map(e=>(0,a.jsx)(o.j8w,{children:e},e))})},{title:"Connection Status",key:"connection_status",width:150,render:(e,t)=>{let{status:n,color:i}=null===t.last_test_timestamp||void 0===t.last_test_timestamp?{status:"Untested",color:"default"}:!0===t.last_test_succeeded?{status:"Healthy",color:"success"}:!1===t.last_test_succeeded?{status:"Failed",color:"error"}:{status:"Untested",color:"default"},r=t.last_test_timestamp?"Last connection: ".concat((0,h.p6)(t.last_test_timestamp)):"The connection has not been tested";return(0,a.jsx)(o.esZ,{title:r,children:(0,a.jsx)(o.j8w,{color:i,children:n})})}},{title:"Actions",key:"actions",width:100,render:(e,t)=>(0,a.jsx)(o.wpx,{onClick:()=>O(t),"data-testid":"manage-btn-".concat(t.key),size:"small",children:"Manage"})}],R={current:e,pageSize:n,total:q.length,showQuickJumper:!1,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," integrations"),pageSizeOptions:["10","25","50","100"]},K={emptyText:r.trim()?"No integrations match your search":(0,a.jsx)("div",{"data-testid":"empty-state",children:'You have not configured any integrations. Click "Add Integration" to connect and configure systems now.'})};return(0,a.jsxs)(p.Z,{title:"Integrations",children:[(0,a.jsx)(m.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations"}],rightContent:(0,a.jsx)(o.wpx,{onClick:A,"data-testid":"add-integration-btn",type:"primary",children:"Add integration"})}),(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-4",children:[(0,a.jsx)(u.f,{placeholder:"Search by name...",value:r,onChange:e=>{g(e),t(1)},className:"max-w-sm"}),(0,a.jsx)(P.Z,{})]}),_?(0,a.jsx)(d.Z,{}):(0,a.jsx)(o.V5H,{columns:L,dataSource:q,rowKey:"key",pagination:R,loading:_,size:"small",locale:K,bordered:!0,onRow:e=>({onClick:()=>O(e),"data-testid":"integration-info-".concat(e.key)}),rowClassName:"cursor-pointer",onChange:w,"data-testid":"integrations-table"}),(0,a.jsx)(z,{isOpen:E,onClose:Z})]})}}},function(e){e.O(0,[8765,431,9278,5163,699,3662,1316,155,2888,9774,179],function(){return e(e.s=9387)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return i(50107)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),s=i(96306),l=i(88038),a=i.n(l),r=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(42478),u=i(77830),m=()=>{let e=(0,r.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:l=!0,mainProps:u}=e,p=(0,o.hz)(),h=(0,r.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.messagingConfiguration&&x),{data:v}=(0,d.JE)(void 0,{skip:g}),{data:j}=(0,c.PW)(void 0,{skip:g}),y=p.flags.messagingConfiguration&&(!v||!j)&&x;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(m,{}):null,t]})]})}},50107:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eH}});var n,s,l,a,r=i(24246),o=i(96306),c=i(86677),d=i(77213),u=i(77830),m=i(58754),p=i(99716),h=i(27378),x=i(21910),g=i(19904);(n=l||(l={})).IN_PROCESSING="in_processing",n.PENDING="pending",n.COMPLETE="complete",n.ERROR="error",n.PAUSED="paused",n.AWAITING_PROCESSING="awaiting_processing",n.RETRYING="retrying",n.SKIPPED="skipped",n.POLLING="polling";let v={in_processing:"In processing",pending:"Pending",complete:"Complete",error:"Error",paused:"Paused",awaiting_processing:"Awaiting input",retrying:"Retrying",skipped:"Skipped",polling:"Awaiting polling"},j={error:"error",skipped:"warning",awaiting_processing:"minos",in_processing:void 0,pending:void 0,complete:void 0,paused:void 0,retrying:void 0,polling:"warning"};(s=a||(a={})).REQUEST_UPDATE="Request update",s.INTERNAL_COMMENT="Internal comment",s.MANUAL_TASK="Manual task";let y={"Request update":"sandstone","Internal comment":"marble","Manual task":"nectar"};var f=i(90005),_=i.n(f),b=i(16394),T=i(38450),w=i.n(T);let E=e=>{let{attachments:t}=e;if(!t.length)return null;if(1===t.length){let e=t[0];return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.AntTypography.Text,{ellipsis:{tooltip:!0},className:"!max-w-[200px]",children:e.file_name})]})})}let i=(0,r.jsx)("ul",{className:"list-disc pl-4",children:t.map(e=>(0,r.jsx)("li",{children:e.file_name},e.id))});return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.esZ,{title:i,children:(0,r.jsxs)(o.AntTypography.Text,{ellipsis:!0,className:"!max-w-[200px]",children:[t.length," attachments"]})})]})})};var A=e=>{let{item:t}=e,{author:i,title:n,date:s,type:l,onClick:c,isError:d,isAwaitingInput:u,isPolling:m,description:p,attachments:h,showViewLog:x}=t,g=(0,b.p6)(s),v=!!c,j=h&&h.length>0,f=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:w().header,children:[(0,r.jsxs)("span",{className:w().author,"data-testid":"activity-timeline-author",children:[i,":"]}),n&&(0,r.jsxs)(o.AntTypography.Text,{className:_()(w().title,{[w()["title--error"]]:d,[w()["title--awaiting-input"]]:u,[w()["title--polling"]]:m}),ellipsis:{tooltip:!0},"data-testid":"activity-timeline-title",children:[n,d&&" failed"]}),(0,r.jsx)("div",{className:"hidden xl:block",children:(0,r.jsx)(o.AntTypography.Text,{className:w().timestamp,"data-testid":"activity-timeline-timestamp",children:g})}),(0,r.jsx)("div",{className:"xl:hidden",children:(0,r.jsx)(o.esZ,{title:g,children:(0,r.jsx)(o.PJP.qpU,{"data-testid":"activity-timeline-timestamp-icon"})})}),(0,r.jsx)(o.j8w,{className:w().type,color:y[l],"data-testid":"activity-timeline-type",children:l}),x&&(0,r.jsx)("span",{className:w().viewLogs,"data-testid":"activity-timeline-view-logs",children:"View Log"})]}),(p||j)&&(0,r.jsxs)("div",{className:"mt-2 flex justify-between pl-2.5 align-top",children:[(0,r.jsx)(o.AntTypography.Paragraph,{className:"!mb-0 whitespace-pre-wrap","data-testid":"activity-timeline-description",children:p||""}),j&&(0,r.jsx)(E,{attachments:h})]})]}),T={className:_()(w().itemButton,{[w()["itemButton--error"]]:d,[w()["itemButton--awaiting-input"]]:u,[w()["itemButton--polling"]]:m,[w()["itemButton--clickable"]]:v,[w()["itemButton--comment"]]:l===a.INTERNAL_COMMENT,[w()["itemButton--manual-task"]]:l===a.MANUAL_TASK}),"data-testid":"activity-timeline-item"};return v?(0,r.jsx)("button",{type:"button",onClick:c,...T,children:f}):(0,r.jsx)("div",{...T,children:f})},R=i(25980),k=i(54427),C=i(78780);let{useGetCommentsQuery:q,useCreateCommentMutation:S,useGetCommentDetailsQuery:N,useLazyGetCommentDetailsQuery:P}=C.u.injectEndpoints({endpoints:e=>({getComments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:n}=e;return{url:"plus/privacy-request/".concat(t,"/comment"),method:"GET",params:{page:i,size:n}}},providesTags:["Privacy Request Comments"]}),createComment:e.mutation({query:e=>{let{privacy_request_id:t,comment_text:i,comment_type:n}=e,s=new FormData;return s.append("comment_text",i),s.append("comment_type",n),{url:"plus/privacy-request/".concat(t,"/comment"),method:"POST",body:s,formData:!0}},invalidatesTags:["Privacy Request Comments","Request"]}),getCommentDetails:e.query({query:e=>{let{privacy_request_id:t,comment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/comment/").concat(i),method:"GET"}}})})}),{reducer:I}=(0,k.oM)({name:"privacyRequestComments",initialState:{},reducers:{}}),O=e=>{let{plus:t}=(0,R.hz)(),{data:i,isLoading:n,error:s}=q({privacy_request_id:e,size:100},{skip:!t});return(0,h.useEffect)(()=>{s&&o.Pg3.error("Failed to fetch the request comments")},[s]),{commentItems:(null==i?void 0:i.items)?i.items.map(e=>({author:e.user_first_name&&e.user_last_name?"".concat(e.user_first_name," ").concat(e.user_last_name):e.username||"Unknown",date:new Date(e.created_at),type:a.INTERNAL_COMMENT,showViewLog:!1,description:e.comment_text,isError:!1,isSkipped:!1,isAwaitingInput:!1,isPolling:!1,id:"comment-".concat(e.id)})):[],isLoading:n}},D=(e,t)=>{if(0===e.length)return!1;let i=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!i[0].collection_name)return i[0].status===t;let n={};return i.forEach(e=>{e.collection_name&&!n[e.collection_name]&&(n[e.collection_name]=e)}),Object.values(n).some(e=>e.status===t)},M=e=>D(e,l.ERROR),U=e=>D(e,l.SKIPPED),L=e=>D(e,l.AWAITING_PROCESSING),z=e=>D(e,l.POLLING),W=e=>{let t=!e;return{eventItems:e?Object.entries(e).map(e=>{let[t,i]=e,n=M(i),s=U(i),l=L(i),r=z(i);return{author:"Fides",title:t,date:new Date(i[0].updated_at),type:a.REQUEST_UPDATE,showViewLog:n||s||l||r,onClick:()=>{},isError:n,isSkipped:s,isAwaitingInput:l,isPolling:r,id:"request-".concat(t)}}):[],isLoading:t}};var B=i(91317),F=i(45116);let G=e=>{let{plus:t}=(0,R.hz)(),{data:i,isLoading:n,error:s}=(0,F.Ym)({page:1,size:100,privacyRequestId:e,status:void 0,includeFullSubmissionDetails:!0},{skip:!t});return(0,h.useEffect)(()=>{s&&o.Pg3.error("Failed to fetch manual tasks")},[s]),{manualTaskItems:i?i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).map(e=>{var t,i;let n=e.submission_user?(0,b.gJ)(e.submission_user):"Unknown User";(0,B.PN)(null===(t=e.submission_user)||void 0===t?void 0:t.id)&&(n=(null===(i=e.submission_user)||void 0===i?void 0:i.id)||"Unknown User");let s=e.status===x.OS.SKIPPED,l="Task ".concat(s?"skipped":"completed"," - ").concat(e.name),r=e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment_text:void 0,o=e.attachments||[];return{author:n,title:l,date:new Date(e.updated_at),type:a.MANUAL_TASK,showViewLog:!1,description:r,isError:!1,isSkipped:s,isAwaitingInput:!1,isPolling:!1,id:"manual-task-".concat(e.manual_field_id),attachments:o}}):[],taskCommentIds:(0,h.useMemo)(()=>{let e=new Set;return(null==i?void 0:i.items)&&i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).forEach(t=>{var i;null===(i=t.comments)||void 0===i||i.forEach(t=>{e.add(t.id)})}),e},[i]),isLoading:n}};var Z=i(88340),J=e=>{let{errorMessage:t,status:i=l.ERROR}=e;return(0,r.jsxs)(o.xuv,{height:"100%",id:"outer",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[(0,r.jsx)(o.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,r.jsx)(o.j8w,{color:j[i],children:v[i]}),(0,r.jsx)(o.xuv,{padding:"0px",marginBottom:"3px",children:(0,r.jsx)(Z.Z,{copyText:t})})]}),(0,r.jsx)(o.izJ,{marginTop:"4px",marginBottom:"6px"}),(0,r.jsx)(o.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,r.jsx)(o.xvT,{children:t})})]})},K=i(3124),H=i.n(K);let Y=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}},V=e=>{if(e.status!==l.COMPLETE||!e.collection_name)return"-";let t=(e.message||"").match(/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i);return t?parseInt(t[1],10).toLocaleString():"-"},Q=(e,t)=>{let i=e.filter(e=>e.action_type===t&&e.status===l.COMPLETE&&e.collection_name).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()),n={};i.forEach(e=>{let t=e.collection_name||"unknown";n[t]||(n[t]=e)});let s=0,a=!1,r=/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i;return Object.values(n).forEach(e=>{if(e.message){let t=e.message.match(r);if(t){a=!0;let e=parseInt(t[1],10);s+=e}}}),a?s:null},$=(e,t,i)=>{if("finished"===e.status&&!e.collection_name&&i){let e=Q(t,i);return null!==e?e.toLocaleString():"-"}return V(e)};var X=e=>{var t,i,n;let{eventLogs:s,allEventLogs:a,onDetailPanel:c,privacyRequest:d}=e,u=(null==s?void 0:s.some(e=>e.collection_name))||(null==s?void 0:s.some(e=>"finished"===e.status&&!e.collection_name))||!1,m=null==s?void 0:s.every(e=>"finished"===e.status&&!e.collection_name),p=null==d?void 0:null===(n=d.policy)||void 0===n?void 0:null===(i=n.rules)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.action_type,h=e=>e?Y(e):p?Y(p):"-",x=null==s?void 0:s.map(e=>(0,r.jsxs)(o.Tr,{backgroundColor:e.status===l.ERROR||e.status===l.SKIPPED&&e.message||e.status===l.AWAITING_PROCESSING||e.status===l.POLLING?H().FIDESUI_NEUTRAL_50:"unset",onClick:()=>{(e.status===l.ERROR||e.status===l.SKIPPED&&e.message||e.status===l.AWAITING_PROCESSING||e.status===l.POLLING)&&c(e.message,e.status)},style:{cursor:e.message?"pointer":"unset"},_hover:{backgroundColor:H().FIDESUI_NEUTRAL_50},children:[(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,b.p6)(e.updated_at)})}),(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:h(e.action_type)})}),(0,r.jsx)(o.Td,{children:v[e.status]?(0,r.jsx)(o.j8w,{color:j[e.status],children:v[e.status]}):(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),u&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:$(e,a||s,p)})}),u&&!m&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"finished"===e.status?"Request completed":e.collection_name})})]},e.updated_at));return(0,r.jsx)(o.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,r.jsx)(o.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,r.jsxs)(o.iA_,{size:"sm",id:"table",position:"relative",children:[(0,r.jsx)(o.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",zIndex:10,children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),u&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Records"})}),u&&!m&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,r.jsx)(o.p3B,{id:"tableBody",children:x})]})})})},ee=e=>{let{isOpen:t,onClose:i,currentLogs:n,allEventLogs:s,isViewingError:a,errorMessage:c,currentStatus:d=l.ERROR,onCloseErrorPanel:u,onOpenErrorPanel:m,privacyRequest:p}=e;return(0,r.jsxs)(o.dys,{isOpen:t,placement:"right",onClose:i,size:"full",autoFocus:!1,"data-testid":"log-drawer",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{style:{width:"50%"},"data-testid":"log-drawer",children:[(0,r.jsx)(o.OXI,{style:{paddingBottom:"0px"},children:(0,r.jsxs)(o.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[a&&(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:u}),(0,r.jsx)(o.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:a?"Event detail":"Event log"})]}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:i,"data-testid":"log-drawer-close"})]})}),(0,r.jsxs)(o.Ng0,{id:"drawerBody",overflow:"hidden",children:[n&&!a?(0,r.jsx)(X,{eventLogs:n,allEventLogs:s,onDetailPanel:m,privacyRequest:p}):null,a?(0,r.jsx)(J,{errorMessage:c,status:d}):null]})]})]})},et=e=>{let{subjectRequest:t}=e,{isOpen:i,onOpen:n,onClose:s}=(0,o.qY0)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(""),[p,x]=(0,h.useState)(!1),[g,v]=(0,h.useState)(""),[j,y]=(0,h.useState)(l.ERROR),{results:f,id:_}=t,{commentItems:b,isLoading:T}=O(_),{eventItems:E,isLoading:R}=W(f),{manualTaskItems:k,taskCommentIds:C,isLoading:q}=G(_);(0,h.useEffect)(()=>{u&&f&&f[u]&&d(f[u])},[f,u]);let S=()=>{x(!1)},N=(0,h.useCallback)((e,t)=>{m(e),d(t),n()},[n]),P=(0,h.useMemo)(()=>f?Object.values(f).flat():[],[f]),I=(0,h.useMemo)(()=>b.filter(e=>{let t=e.id.replace("comment-","");return!C.has(t)}),[b,C]),D=(0,h.useMemo)(()=>{let e=E.map(e=>{if("Request update"===e.type&&e.title&&f){let t=e.title;if(f[t])return{...e,onClick:()=>N(t,f[t])}}return e});return[{author:"Fides",title:"Access request received",date:new Date(t.created_at),type:a.REQUEST_UPDATE,showViewLog:!1,isError:!1,isSkipped:!1,isAwaitingInput:!1,isPolling:!1,id:"initial-request"},...e,...I,...k].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())},[E,I,k,f,N,t.created_at]);return(0,r.jsxs)(o.xuv,{width:"100%",children:[(0,r.jsx)(o.krs,{className:"!border-none",bordered:!1,split:!1,"data-testid":"activity-timeline-list",children:(0,r.jsx)("ul",{className:"!list-none",children:T||R||q?(0,r.jsx)("div",{className:w().itemButton,"data-testid":"timeline-skeleton",children:(0,r.jsx)(o.N_L,{paragraph:{rows:2},active:!0})}):D.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(A,{item:e})},e.id))})}),(0,r.jsx)(ee,{isOpen:i,onClose:()=>{p&&S(),m(""),s()},currentLogs:c,allEventLogs:P,isViewingError:p,errorMessage:g,currentStatus:j,onOpenErrorPanel:(e,t)=>{v(e),t&&y(t),x(!0)},onCloseErrorPanel:S,privacyRequest:t})]})},ei=i(66187);let en=e=>{let{privacyRequestId:t,onCancel:i}=e,[n,s]=(0,h.useState)(""),l=(0,h.useRef)(null),[a,{isLoading:c}]=S();(0,h.useEffect)(()=>{l.current&&l.current.focus()},[]);let d=async()=>{if(n.trim())try{await a({privacy_request_id:t,comment_text:n,comment_type:ei.i.NOTE}).unwrap(),s(""),i()}catch(e){console.error("Failed to add comment:",e),o.Pg3.error({content:"Failed to add comment",duration:5})}},u=[{key:"internal",label:"Internal comment",children:(0,r.jsx)(o.uFc.TextArea,{ref:l,value:n,onChange:e=>s(e.target.value),rows:3,className:"mb-3 h-[150px] w-full !resize-none","data-testid":"comment-input"})}];return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.A5g,{items:u}),(0,r.jsxs)(o.jqI,{justify:"flex-end",className:"gap-2",children:[(0,r.jsx)(o.wpx,{onClick:i,"data-testid":"cancel-comment-button",children:"Cancel"}),(0,r.jsx)(o.wpx,{onClick:d,loading:c,disabled:!n.trim(),type:"primary",htmlType:"button","data-testid":"submit-comment-button",children:"Save"})]})]})};var es=e=>{let{subjectRequest:t}=e,[i,n]=(0,h.useState)(!1);return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(et,{subjectRequest:t}),i?(0,r.jsx)(en,{privacyRequestId:t.id,onCancel:()=>n(!1)}):(0,r.jsx)(g.ZP,{scopes:[x.Sh.COMMENT_CREATE],children:(0,r.jsx)(o.jqI,{justify:"flex-start",className:"mt-2",children:(0,r.jsxs)(o.wpx,{type:"default",onClick:()=>n(!0),className:"flex items-center","data-testid":"add-comment-button",children:["Add comment ",(0,r.jsx)("span",{className:"ml-1",children:"+"})]})})})]})},el=i(14207),ea=i(46238),er=i(72281),eo=i(17245),ec=i(90867),ed=i(16134);let eu=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var em=e=>{let{rules:t}=e,i=eu(t).map(e=>(0,b.kC)(e)).map(e=>e);return(0,r.jsx)(o.AntTypography.Text,{children:i.join(" - ")})},ep=i(34090),eh=i(55484),ex=e=>{let{connectorName:t,data:i,isSubmitting:n=!1,onSaveClick:s}=e,{isOpen:l,onOpen:a,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:a,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:a,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(ep.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:eh.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:l,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(ep.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map((e,t)=>{let[i]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(ep.gN,{id:i,name:i,children:e=>{let{field:n}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:i,w:"50%",children:i}),(0,r.jsx)(o.IIB,{...n,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(i),ref:0===t?d:void 0,size:"sm"})]})}})},i)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:n,htmlType:"submit",children:"Save"})]})})]})]})})]})},eg=e=>{let{connectorName:t,data:i,isSubmitting:n=!1,onSaveClick:s}=e,{isOpen:l,onOpen:a,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:a,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:a,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(ep.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:eh.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:l,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(ep.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map(e=>{let[t]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(ep.gN,{id:t,name:t,children:e=>{let{field:i}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,r.jsx)(o.XZJ,{...i,isChecked:!!i.value,onChange:i.onChange,name:t,id:t})]})}})},t)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:n,htmlType:"submit",children:"Save"})]})})]})]})})]})};let ev=(e,t,i)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:ex,uploadMutation:t,getUploadedWebhookDataEndpoint:ec.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:eg,uploadMutation:i,getUploadedWebhookDataEndpoint:ec.$I.endpoints.getUploadedManualErasureWebhookData}:null;var ej=e=>{let{subjectRequest:t,onComplete:i}=e,n=(0,ed.T)(),{errorAlert:s,successAlert:l}=(0,eo.VY)(),{handleError:a}=(0,eo.HK)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(!1),[p,g]=(0,h.useState)(!1),{data:v,isFetching:j,isLoading:y,isSuccess:f}=(0,el.W6)(),[_]=(0,ec.w3)(),b=eu(t.policy.rules),[T]=(0,ec.nL)(),[w]=(0,ec.UR)(),{ProcessingDetailComponent:E,uploadMutation:A,getUploadedWebhookDataEndpoint:R}=ev(b,T,w),k=async()=>{try{m(!0),await _(t.id).unwrap(),l("Manual request has been received. Request now processing."),i()}catch(e){a(e)}finally{m(!1)}},C=async e=>{try{g(!0),await A(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[i,n]=e;t.fields[i]=n||""});let i=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(i),l("Manual input successfully saved!")}catch(e){a(e)}finally{g(!1)}};return((0,h.useEffect)(()=>(f&&v.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],i=null==v?void 0:v.map(e=>e.connection_config.key);null==i||i.every(i=>e.push(n(R.initiate({connection_key:i,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,i)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let i={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,n]=e;i.fields[t]=n||""}),t.push(i)}else s("An error occurred while loading manual input data for ".concat(v[i].connection_config.name))}),d(t)})})(),()=>{}),[v,c.length,n,s,f,t.id,R]),b.includes(x.Us.ACCESS)||b.includes(x.Us.ERASURE))?(0,r.jsxs)(o.gCW,{align:"stretch",spacing:8,children:[(0,r.jsx)(o.xuv,{children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,r.jsxs)(o.xuv,{children:[(j||y)&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),f&&v?(0,r.jsx)(o.xJi,{children:(0,r.jsxs)(o.iA_,{size:"sm",variant:"unstyled",children:[(0,r.jsx)(o.hrZ,{children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,r.jsx)(o.Th,{})]})}),(0,r.jsxs)(o.p3B,{children:[v.length>0&&v.map(e=>(0,r.jsxs)(o.Tr,{display:"block",children:[(0,r.jsx)(o.Td,{pl:"0",children:e.connection_config.key}),(0,r.jsx)(o.Td,{children:c.length>0?(0,r.jsx)(E,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:p,onSaveClick:C}):null})]},e.id)),0===v.length&&(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Td,{colSpan:3,pl:"0",children:(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,r.jsx)(o.$RU,{children:(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Th,{pl:"0px",children:(0,r.jsx)(o.wpx,{type:"primary",loading:u,onClick:k,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},ey=e=>{let{subjectRequest:t,onComplete:i}=e,n=(0,c.useRouter)(),{data:s}=(0,el.AZ)({}),l=(0,h.useMemo)(()=>{var e;return(null==s?void 0:null===(e=s.items)||void 0===e?void 0:e.filter(e=>e.connection_type===x.Rj.MANUAL_TASK))||[]},[s]),{data:a}=(0,el.W6)(),d=(a||[]).length>0,{data:m}=(0,F.Ym)({page:1,size:100,privacyRequestId:t.id}),p=(null==m?void 0:m.items)||[],g=p.length,v=p.filter(e=>e.status===x.OS.NEW).length,j=l.length>0,y=p.length>0,f=j||y;return f||d?(0,r.jsxs)(o.Kqy,{spacing:6,children:[f&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{marginBottom:12},children:"Manual tasks"}),(0,r.jsxs)(o.Kqy,{spacing:2,children:[(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:g})," task",1!==g?"s":""," ","linked to this privacy request"]}),(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:v})," pending task",1!==v?"s":""]}),g>0&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.wpx,{type:"primary",onClick:()=>{n.push({pathname:u.Jw,query:{privacy_request_id:t.id,tab:er.G.MANUAL_TASK}})},children:"View all tasks for this request →"})})]})]}),d&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsxs)(o.kCb,{alignItems:"center",style:{marginBottom:12},children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{margin:0,marginRight:8},children:"Manual steps (legacy)"}),(0,r.jsx)(ea.b,{label:"This is the legacy manual steps feature. The new manual tasks feature provides more advanced capabilities and better user experience."})]}),(0,r.jsx)(ej,{subjectRequest:t,onComplete:i||(()=>{})})]})]}):(0,r.jsx)(o.xuv,{p:4,children:(0,r.jsx)(o.AntTypography.Text,{type:"secondary",children:"No manual tasks or legacy manual steps configured for this request."})})},ef=i(59969);let e_={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"minos",label:"Requires Input"},requires_manual_finalization:{color:"minos",label:"Requires Finalization"}};var eb=e=>{let{status:t}=e;return(0,r.jsx)(o.j8w,{color:e_[t].color,className:"justify-center","data-testid":"request-status-badge",children:e_[t].label})},eT=i(18225),ew=i(812),eE=i(7842);let{useGetAttachmentsQuery:eA,useUploadAttachmentMutation:eR,useGetAttachmentDetailsQuery:ek,useLazyGetAttachmentDetailsQuery:eC}=C.u.injectEndpoints({endpoints:e=>({getAttachments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:n}=e;return{url:"plus/privacy-request/".concat(t,"/attachment"),method:"GET",params:{page:i,size:n}}},providesTags:["Privacy Request Attachments"]}),uploadAttachment:e.mutation({query:e=>{let{privacy_request_id:t,attachment_type:i,attachment_file:n}=e,s=new FormData;return s.append("attachment_type",i),s.append("attachment_file",n),{url:"plus/privacy-request/".concat(t,"/attachment"),method:"POST",body:s,params:{}}},invalidatesTags:["Privacy Request Attachments"]}),getAttachmentDetails:e.query({query:e=>{let{privacy_request_id:t,attachment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/attachment/").concat(i),method:"GET"}}})})}),{reducer:eq}=(0,k.oM)({name:"privacyRequestAttachments",initialState:{},reducers:{}}),eS=e=>{var t;let{file:i}=e,[n,s]=(0,h.useState)(!1),[l]=eC(),a=async()=>{var e,t,n;if((null===(e=i.customData)||void 0===e?void 0:e.attachment_id)&&(null===(t=i.customData)||void 0===t?void 0:t.privacy_request_id)){s(!0);try{let e=await l({privacy_request_id:i.customData.privacy_request_id,attachment_id:i.customData.attachment_id}),t=null===(n=e.data)||void 0===n?void 0:n.retrieved_attachment_url,s=null==t?void 0:t.startsWith("http");t&&s?window.open(t,"_blank"):t&&!s?o.Pg3.info("Download is not available when using local storage methods."):o.Pg3.error("No download URL available for ".concat(i.name))}catch(e){o.Pg3.error("Failed to fetch attachment download URL")}finally{s(!1)}}},c=(null===(t=i.customData)||void 0===t?void 0:t.attachment_type)===x.sf.INCLUDE_WITH_ACCESS_PACKAGE;return(0,r.jsxs)(o.jqI,{align:"center",gap:8,children:[(0,r.jsx)(o.PJP.PgN,{className:"shrink-0"}),(0,r.jsx)(o.lKn,{ellipsis:{tooltip:i.name},className:"grow",children:i.name}),c&&(0,r.jsx)(o.esZ,{title:"This attachment will be included in the access package.",children:(0,r.jsx)(o.PJP.wvC,{className:"shrink-0",title:"User icon"})}),(0,r.jsx)(o.wpx,{type:"text",icon:(0,r.jsx)(o.PJP.UWx,{}),onClick:a,loading:n,className:"shrink-0"})]})},eN=(e,t)=>(0,r.jsx)(eS,{file:t});var eP=e=>{let{subjectRequest:t}=e,[i,n]=(0,h.useState)(!1),s=(0,g.Tg)([x.Sh.ATTACHMENT_READ]),l=(0,g.Tg)([x.Sh.ATTACHMENT_CREATE]),[a]=eR(),{data:c,isLoading:d,error:u}=(0,ec.PW)(),{data:m,isLoading:p}=eA({privacy_request_id:t.id}),{refetch:v}=eA({privacy_request_id:t.id}),j=(null==m?void 0:m.items.map(e=>({uid:e.id,name:e.file_name,status:"done",customData:{attachment_id:e.id,privacy_request_id:t.id,attachment_type:e.attachment_type}})))||[],y=(0,h.useCallback)(()=>(0,r.jsx)(o.PJP.PgN,{}),[]);if(!s)return null;let f=l&&(null==c?void 0:c.key),_=[".pdf",".doc",".docx",".xls",".xlsx",".txt",".csv",".jpg",".jpeg",".png",".zip"];return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.lQT,{level:3,children:"Attachments"})}),d||p?(0,r.jsx)(eT.Z,{size:"md",alignment:"start"}):(0,r.jsx)(o.pMK,{name:"attachment_file",fileList:j,iconRender:y,showUploadList:{showRemoveIcon:!1,showDownloadIcon:!1},itemRender:eN,accept:_.join(","),customRequest:async e=>{let{file:i,onSuccess:s,onError:l}=e,r=i.name;try{n(!0),await a({privacy_request_id:t.id,attachment_file:i,attachment_type:eE.s.INTERNAL_USE_ONLY}).unwrap(),o.Pg3.success("".concat(r," file uploaded successfully")),v(),null==s||s(i)}catch(e){o.Pg3.error("".concat(r," file upload failed.")),null==l||l(e)}finally{n(!1)}},disabled:!f,children:l&&(0,r.jsx)(o.esZ,{title:u&&"Add attachment not available: ".concat((0,ew.e$)(u)),placement:"top",children:(0,r.jsxs)(o.jqI,{align:"center",gap:12,className:"mb-4",children:[(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.mm_,{}),iconPosition:"end",disabled:!f||i,loading:i,children:i?"Uploading":"Add"}),(0,r.jsx)(ea.b,{label:"Uploaded attachments are for internal use and won't be send as part of the request package.\n Accepted filetypes: ".concat(_.join(", ")),placement:"top"})]})})})]})})},eI=i(15709),eO=i.n(eI),eD=e=>{let{label:t,children:i}=e;return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(eO().label),children:(0,r.jsxs)(o.AntTypography.Text,{children:[t,":"]})}),(0,r.jsx)("div",{className:"min-w-0 shrink grow ".concat(eO().value),"data-testid":"request-detail-value-".concat(t),children:i})]})},eM=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:i}=t;return(0,r.jsx)("div",{className:"flex flex-col gap-2",children:i&&Object.keys(i).length>0&&Object.entries(i).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,i]=e;return(0,r.jsx)(eD,{label:i.label,children:(0,r.jsx)(o.AntTypography.Text,{children:Array.isArray(i.value)?i.value.join(", "):i.value})},t)})})},eU=e=>{var t,i;let{subjectRequest:n}=e,{plus:s}=(0,R.hz)(),{id:l,status:a,policy:c,identity:d,identity_verified_at:u}=n;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.AntTypography.Title,{level:2,children:"Request details"})}),(0,r.jsxs)(o.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,r.jsx)(eD,{label:"Status",children:(0,r.jsx)(eb,{status:a})}),(0,r.jsx)(eD,{label:"Time remaining",children:(0,r.jsx)(ef.Z,{daysLeft:n.days_left,includeText:!0,status:n.status})}),(0,r.jsx)(eD,{label:"Request type",children:(0,r.jsx)(em,{rules:c.rules})}),(0,r.jsx)(eD,{label:"Source",children:s&&(0,r.jsx)(o.AntTypography.Text,{children:n.source||"-"})}),n.submitted_by&&(0,r.jsx)(eD,{label:"Created by",children:(0,r.jsx)(o.AntTypography.Text,{children:(null===(t=n.submitter)||void 0===t?void 0:t.username)||"-"})}),(0,r.jsx)(eD,{label:"Reviewed by",children:(0,r.jsx)(o.AntTypography.Text,{children:(null===(i=n.reviewer)||void 0===i?void 0:i.username)||"-"})}),Object.entries(d).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:i="",label:n}]=e,s="".concat(i).concat(u?"":" (Unverified)");return(0,r.jsx)(eD,{label:"Subject ".concat(n.toLocaleLowerCase()),children:(0,r.jsx)(o.esZ,{title:s,trigger:"click",children:(0,r.jsx)(o.AntTypography.Text,{ellipsis:!0,children:s})})},t)}),(0,r.jsx)(eM,{subjectRequest:n})]}),(0,r.jsxs)(o.PPS,{layout:"vertical",children:[(0,r.jsx)(o.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,r.jsx)(o.jqI,{gap:1,children:(0,r.jsxs)(o.vyj.Compact,{style:{width:"100%"},children:[(0,r.jsx)(o.uFc,{readOnly:!0,value:l,"data-testid":"request-detail-value-id"}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(Z.Z,{copyText:l})})]})})}),(0,r.jsx)(o.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,r.jsx)(o.uFc,{readOnly:!0,value:n.policy.key,"data-testid":"request-detail-value-policy"})})]}),(0,r.jsx)(eP,{subjectRequest:n})]})};let eL=[x.q2.COMPLETE,x.q2.CANCELED,x.q2.DENIED,x.q2.ERROR];var ez=e=>{var t;let{data:i}=e,n=(0,h.useMemo)(()=>({id:i.id,verbose:!0}),[i.id]),{data:s}=(0,p.QA)(n,{pollingInterval:eL.includes(i.status)?0:2e3,skip:!i.id}),l=null!==(t=null==s?void 0:s.items[0])&&void 0!==t?t:i,a=l.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)("activity"),u=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,r.jsx)(es,{subjectRequest:l})},{key:"manual-tasks",label:"Manual tasks",children:(0,r.jsx)(ey,{subjectRequest:l,onComplete:()=>d("activity")}),disabled:!a}],[a,l]);return(0,r.jsxs)("div",{className:"flex gap-8",children:[(0,r.jsx)("div",{className:"w-0 grow",children:(0,r.jsx)(o.A5g,{items:u,activeKey:c,onChange:d})}),(0,r.jsx)("div",{className:"w-1/3 2xl:w-[432px]","data-testid":"privacy-request-details",children:(0,r.jsx)(eU,{subjectRequest:l})})]})},eW=i(57526),eB=i(66548),eF=i(45489),eG=e=>{let{privacyRequest:t,action:i}=e,{handleApproveRequest:n,handleDenyRequest:s}=(0,eF.Z)({subjectRequest:t}),l=t.status===x.q2.PENDING,a=(0,o.qY0)(),r=async e=>{let{reason:t}=e,l=o.Pg3.loading({content:"approve"===i?"Approving request...":"Denying request..."});"deny"===i&&await s(t),"approve"===i&&await n(),l()};return{showAction:l,closeModal:a.onClose,performAction:r,openConfirmationModal:a.onOpen,isModalOpen:a.isOpen}},eZ=e=>{var t,i,n;let{privacyRequest:s}=e,l=null===(i=(0,R.hz)())||void 0===i?void 0:null===(t=i.flags)||void 0===t?void 0:t.downloadAccessRequestResults,a=s.status===x.q2.COMPLETE,r=eu(s.policy.rules).includes(x.Us.ACCESS),o=(0,g.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:m}=(0,ec.br)({privacy_request_id:s.id},{skip:!a}),p=null!==(n=null==c?void 0:c.access_result_urls[0])&&void 0!==n?n:"",h=!!p&&"your local fides_uploads folder"!==p,v=null;return u?v=(0,ew.e$)(m,"Unable to resolve download URL"):h||(v="Requests stored locally cannot be downloaded"),{showDownloadResults:l&&o&&r&&a,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:v,isLoading:d,isDisabled:!h}},eJ=e=>{let{privacyRequest:t}=e,{errorAlert:i,successAlert:n}=(0,eo.VY)(),s=t.status===x.q2.ERROR,[l]=(0,ec.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=o.Pg3.loading("Reprocessing privacy request...",0),s=await l(t);"error"in s?i((0,ew.e$)(s.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):n("Privacy request is now being reprocessed."),e()},showReprocess:s}},eK=e=>{let{privacyRequest:t}=e,{showDownloadResults:i,downloadResults:n,infoTooltip:s,isDisabled:l}=eZ({privacyRequest:t}),{isModalOpen:a,closeModal:c,performAction:d,openConfirmationModal:u,showAction:m}=eG({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:v,openConfirmationModal:j,showAction:y}=eG({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:f,showReprocess:_}=eJ({privacyRequest:t}),{handleFinalizeRequest:b,finalizeRequestResult:T}=(0,eF.Z)({subjectRequest:t}),w=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,r.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!m}),e.push({key:"deny",label:(0,r.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:j,disabled:!y}),e.push({key:"reprocess",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:f,disabled:!_}),t.status===x.q2.REQUIRES_MANUAL_FINALIZATION&&e.push({key:"finalize",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-finalize",children:"Finalize"}),onClick:b,disabled:T.isLoading}),i&&e.push({key:"download",label:(0,r.jsx)(o.esZ,{title:l?s:null,placement:"bottom",children:(0,r.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:n,disabled:l}),e},[i,n,s,l,m,y,u,j,_,f,t.status,b,T.isLoading]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.S0p,{menu:{items:w},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!w.length,size:"large",children:"Actions"})}),(0,r.jsx)(eW.Z,{isOpen:a,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,r.jsx)(eB.Z,{isOpen:p,onClose:g,onDenyRequest:e=>v({reason:e})})]})},eH=()=>{let e=(0,c.useRouter)().query.id,{data:t,isLoading:i}=(0,p.QA)({id:e,verbose:!0},{skip:!e}),n=(null==t?void 0:t.items[0])||null;return(0,r.jsxs)(d.Z,{title:"Privacy Request - ".concat(e),children:[(0,r.jsx)(m.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Request details"}],rightContent:!!n&&(0,r.jsx)(eK,{privacyRequest:n})}),i&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),!i&&!n&&(0,r.jsx)(o.xvT,{children:"404 no privacy request found"}),!i&&n&&(0,r.jsx)(ez,{data:n})]})}},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},38450:function(e){e.exports={container:"ActivityTimelineEntry_container__tCva0","container--open":"ActivityTimelineEntry_container--open__1d9mA",itemButton:"ActivityTimelineEntry_itemButton__MlmWS","itemButton--error":"ActivityTimelineEntry_itemButton--error__UizD2","itemButton--comment":"ActivityTimelineEntry_itemButton--comment__g98SH","itemButton--awaiting-input":"ActivityTimelineEntry_itemButton--awaiting-input__6lB5t","itemButton--polling":"ActivityTimelineEntry_itemButton--polling__jzolP",header:"ActivityTimelineEntry_header__GYibj",title:"ActivityTimelineEntry_title__rm_g0","title--error":"ActivityTimelineEntry_title--error__fOi0s","title--awaiting-input":"ActivityTimelineEntry_title--awaiting-input__3sPAo","title--polling":"ActivityTimelineEntry_title--polling__g_Hgn",timestamp:"ActivityTimelineEntry_timestamp__uMEMT",viewLogs:"ActivityTimelineEntry_viewLogs___T4jN",logs:"ActivityTimelineEntry_logs__T7R0J","logs--open":"ActivityTimelineEntry_logs--open__o_9Io"}}},function(e){e.O(0,[431,4558,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);