ethyca-fides 2.73.0rc0__py2.py3-none-any.whl → 2.73.0rc2__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 (175) hide show
  1. {ethyca_fides-2.73.0rc0.dist-info → ethyca_fides-2.73.0rc2.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.73.0rc0.dist-info → ethyca_fides-2.73.0rc2.dist-info}/RECORD +147 -147
  3. fides/_version.py +3 -3
  4. fides/ui-build/static/admin/404.html +1 -1
  5. fides/ui-build/static/admin/_next/static/aeq7PUAfiyulK8p1SGjUz/_buildManifest.js +1 -0
  6. fides/ui-build/static/admin/_next/static/chunks/{1438-62df8751f76235e7.js → 1437-9dd64c20d38667df.js} +1 -1
  7. fides/ui-build/static/admin/_next/static/chunks/155-1c80b19f58f44a0c.js +1 -0
  8. fides/ui-build/static/admin/_next/static/chunks/{2397-b9c1b4a7f11e862d.js → 2397-16820a09e8ebfe33.js} +1 -1
  9. fides/ui-build/static/admin/_next/static/chunks/{3700-940e5630ee5efe10.js → 3700-a2903cd95b8a27cb.js} +1 -1
  10. fides/ui-build/static/admin/_next/static/chunks/4817-d0cc100f259b3c2e.js +1 -0
  11. fides/ui-build/static/admin/_next/static/chunks/5279-8637d735471ec7f1.js +1 -0
  12. fides/ui-build/static/admin/_next/static/chunks/6277-ec0e3fa4e4614098.js +1 -0
  13. fides/ui-build/static/admin/_next/static/chunks/6315-79a1506e01f2f92b.js +1 -0
  14. fides/ui-build/static/admin/_next/static/chunks/7059-3f2641e3130b4ef8.js +1 -0
  15. fides/ui-build/static/admin/_next/static/chunks/{8373-d6c02a17fb0b118e.js → 8373-24379b7d98e6922e.js} +1 -1
  16. fides/ui-build/static/admin/_next/static/chunks/9046-6428eac9f38b3886.js +1 -0
  17. fides/ui-build/static/admin/_next/static/chunks/9330-540a113903cb3c28.js +1 -0
  18. fides/ui-build/static/admin/_next/static/chunks/9682-a3b2fb1a2df1c948.js +1 -0
  19. fides/ui-build/static/admin/_next/static/chunks/9965-6906ffdaef0f0d69.js +1 -0
  20. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-b9dbc9ac030f0490.js → manual-a5865f42aafbe1f8.js} +1 -1
  21. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-53f6037b25dd5ccb.js → [id]-0dd17c74a6cc17ff.js} +1 -1
  22. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-e74cb5ea87f15b40.js → new-a5e738a234dadc7e.js} +1 -1
  23. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-b40fa30ca73e50c2.js → [id]-84ba8b9947b9af0a.js} +1 -1
  24. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-7197fadcd57b623d.js → new-f03d1d0df4661a33.js} +1 -1
  25. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-5a553b4bdbf85aa9.js +1 -0
  26. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-5d133ec635cd716c.js +1 -0
  27. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-cb56d56b9d918682.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-ccb66ba6d1ad93fc.js +1 -0
  29. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-9d8efe43b69a285d.js +1 -0
  30. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-ecb2d925d75dfe1e.js +1 -0
  31. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/{[monitorId]-fb69b66faffc8f4a.js → [monitorId]-e46e017a3919f94e.js} +1 -1
  32. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-71cf0b06b3d5a326.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]-cc6b359fb4968bf0.js +1 -0
  34. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-46b2cdceea3993c8.js → action-center-cbff5db86e6951c4.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-7dded115499a4a4a.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-27227f5c402b3a92.js → [resourceUrn]-2df143c1e1f79040.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-1fe30896a5df2b9a.js → detection-e37c800313e2a422.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-e17f809058842014.js → [resourceUrn]-7022ca5fa834b633.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-2f73cff60a628e42.js → discovery-6178e22397f20f92.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-3b7f47985452e01d.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-b0da32fe3564c129.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-83f78354fa34bffe.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-33ce744d07982c0f.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-39b5142099ed8705.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-64c638ea33bb3ff9.js +1 -0
  46. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-70820c4199cb11cb.js → [id]-9e815520adb3e580.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/pages/systems-d8ce572ad07ed28c.js +1 -0
  48. fides/ui-build/static/admin/_next/static/css/919f947a862d28cd.css +1 -0
  49. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  50. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  51. fides/ui-build/static/admin/add-systems.html +1 -1
  52. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  53. fides/ui-build/static/admin/consent/configure.html +1 -1
  54. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  55. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  56. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  57. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  58. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  59. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  60. fides/ui-build/static/admin/consent/properties.html +1 -1
  61. fides/ui-build/static/admin/consent/reporting.html +1 -1
  62. fides/ui-build/static/admin/consent.html +1 -1
  63. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  64. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  65. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  66. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  67. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  68. fides/ui-build/static/admin/data-catalog.html +1 -1
  69. fides/ui-build/static/admin/data-discovery/action-center/datastore/[monitorId].html +1 -1
  70. fides/ui-build/static/admin/data-discovery/action-center/datastore.html +1 -1
  71. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId]/[systemId].html +1 -1
  72. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId].html +1 -1
  73. fides/ui-build/static/admin/data-discovery/action-center/website.html +1 -1
  74. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  75. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  76. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  77. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  78. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  79. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  80. fides/ui-build/static/admin/datamap.html +1 -1
  81. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  82. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  83. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  84. fides/ui-build/static/admin/dataset/new.html +1 -1
  85. fides/ui-build/static/admin/dataset.html +1 -1
  86. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  87. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  88. fides/ui-build/static/admin/datastore-connection.html +1 -1
  89. fides/ui-build/static/admin/index.html +1 -1
  90. fides/ui-build/static/admin/integrations/[id].html +1 -1
  91. fides/ui-build/static/admin/integrations.html +1 -1
  92. fides/ui-build/static/admin/login/[provider].html +1 -1
  93. fides/ui-build/static/admin/login.html +1 -1
  94. fides/ui-build/static/admin/new-privacy-requests.html +1 -1
  95. fides/ui-build/static/admin/notifications/digests/[id].html +1 -1
  96. fides/ui-build/static/admin/notifications/digests/new.html +1 -1
  97. fides/ui-build/static/admin/notifications/digests.html +1 -1
  98. fides/ui-build/static/admin/notifications/providers/[key].html +1 -1
  99. fides/ui-build/static/admin/notifications/providers/new.html +1 -1
  100. fides/ui-build/static/admin/notifications/providers.html +1 -1
  101. fides/ui-build/static/admin/notifications/templates/[id].html +1 -1
  102. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -1
  103. fides/ui-build/static/admin/notifications/templates.html +1 -1
  104. fides/ui-build/static/admin/notifications.html +1 -1
  105. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  106. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  107. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  108. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  109. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  110. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  111. fides/ui-build/static/admin/poc/forms.html +1 -1
  112. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  113. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  114. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  115. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  116. fides/ui-build/static/admin/privacy-requests.html +1 -1
  117. fides/ui-build/static/admin/properties/[id].html +1 -1
  118. fides/ui-build/static/admin/properties/add-property.html +1 -1
  119. fides/ui-build/static/admin/properties.html +1 -1
  120. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  121. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  122. fides/ui-build/static/admin/settings/about.html +1 -1
  123. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  124. fides/ui-build/static/admin/settings/consent.html +1 -1
  125. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  126. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  127. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  128. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  129. fides/ui-build/static/admin/settings/domains.html +1 -1
  130. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  131. fides/ui-build/static/admin/settings/locations.html +1 -1
  132. fides/ui-build/static/admin/settings/organization.html +1 -1
  133. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  134. fides/ui-build/static/admin/settings/regulations.html +1 -1
  135. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  136. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  137. fides/ui-build/static/admin/systems.html +1 -1
  138. fides/ui-build/static/admin/taxonomy.html +1 -1
  139. fides/ui-build/static/admin/user-management/new.html +1 -1
  140. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  141. fides/ui-build/static/admin/user-management.html +1 -1
  142. fides/ui-build/static/admin/_next/static/Y4fC3QVMk1ujcOb92jMd8/_buildManifest.js +0 -1
  143. fides/ui-build/static/admin/_next/static/chunks/3080-218ac9199ab43f37.js +0 -1
  144. fides/ui-build/static/admin/_next/static/chunks/3729-a1aaa30987ee9f28.js +0 -1
  145. fides/ui-build/static/admin/_next/static/chunks/3872-25c16c5a21152b31.js +0 -1
  146. fides/ui-build/static/admin/_next/static/chunks/4322-2b986cc150c42771.js +0 -1
  147. fides/ui-build/static/admin/_next/static/chunks/5327-282ef735516d3b89.js +0 -1
  148. fides/ui-build/static/admin/_next/static/chunks/6084-023f8c6e65faeb9c.js +0 -1
  149. fides/ui-build/static/admin/_next/static/chunks/6882-ec4429aef277a3a4.js +0 -1
  150. fides/ui-build/static/admin/_next/static/chunks/7170-4ac982fffdba3a55.js +0 -1
  151. fides/ui-build/static/admin/_next/static/chunks/8563-fe06e1fa6d795938.js +0 -1
  152. fides/ui-build/static/admin/_next/static/chunks/8853-28242f6079441663.js +0 -1
  153. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-30cecb4656886008.js +0 -1
  154. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-89f202662b70059a.js +0 -1
  155. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-6c19b6be18db5972.js +0 -1
  156. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-aac70cc10a651e80.js +0 -1
  157. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-14dd38964617db2b.js +0 -1
  158. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-8e1d671ff51386ff.js +0 -1
  159. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-2978a8aa990ec3a9.js +0 -1
  160. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]-968e1c27b0970d67.js +0 -1
  161. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-4c18f83478bf5db2.js +0 -1
  162. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d26992b1651b74ae.js +0 -1
  163. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-401b0b6b9d447d00.js +0 -1
  164. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-e71a1d0f7633a968.js +0 -1
  165. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-479401ebaf1160ab.js +0 -1
  166. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-38b4b0d710d162bc.js +0 -1
  167. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-4171abc37fe1475c.js +0 -1
  168. fides/ui-build/static/admin/_next/static/chunks/pages/systems-753ee6b9bb80a657.js +0 -1
  169. fides/ui-build/static/admin/_next/static/css/8317e07483c73e4f.css +0 -1
  170. {ethyca_fides-2.73.0rc0.dist-info → ethyca_fides-2.73.0rc2.dist-info}/WHEEL +0 -0
  171. {ethyca_fides-2.73.0rc0.dist-info → ethyca_fides-2.73.0rc2.dist-info}/entry_points.txt +0 -0
  172. {ethyca_fides-2.73.0rc0.dist-info → ethyca_fides-2.73.0rc2.dist-info}/licenses/LICENSE +0 -0
  173. {ethyca_fides-2.73.0rc0.dist-info → ethyca_fides-2.73.0rc2.dist-info}/top_level.txt +0 -0
  174. /fides/ui-build/static/admin/_next/static/{Y4fC3QVMk1ujcOb92jMd8 → aeq7PUAfiyulK8p1SGjUz}/_ssgManifest.js +0 -0
  175. /fides/ui-build/static/admin/_next/static/chunks/pages/{_app-6f721c56270cb96e.js → _app-5fd4e06224960492.js} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return a(83656)}])},67991:function(e,t,a){"use strict";a.d(t,{Od:function(){return l},QZ:function(){return i}});var n=a(27378);let i=e=>{let{items:t,selected:a,onChange:n}=e,i=t.every(e=>a.includes(e.id))&&!!t.length;return{allSelected:i,someSelected:t.some(e=>a.includes(e.id))&&!!t.length,handleToggleAll:()=>{i?n([]):n(t.map(e=>e.id))},handleToggleSelection:e=>{a.includes(e)?n(a.filter(t=>t!==e)):n([...a,e])}}},l=e=>{let{initialSelected:t,initialExcluded:a,initialAllSelected:i,itemCount:l}=e,[s,r]=(0,n.useState)(t),[o,d]=(0,n.useState)(a),[c,u]=(0,n.useState)(i||s.length===l),_=!!s.length||!!o.length;return{selected:s,excluded:o,allSelected:c,someSelected:_,handleToggleAll:()=>{c?(d([]),o.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(o.includes(e)?o.filter(t=>t!==e):[...o,e]);else{let t=s.includes(e)?s.filter(t=>t!==e):[...s,e];r(t),t.length===l&&u(!0)}}}}},90111:function(e,t,a){"use strict";var n=a(24246),i=a(87949);t.Z=e=>{let{children:t,...a}=e;return(0,n.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...a,children:t})}},8411:function(e,t,a){"use strict";a.d(t,{NA:function(){return l},Z8:function(){return i}});var n=a(65735);let i={[n._F.ER]:"Eritrea",[n._F.DJ]:"Djibouti",[n._F.MR]:"Mauritania",[n._F.NA]:"Namibia",[n._F.GH]:"Ghana",[n._F.SS]:"South Sudan",[n._F.SC]:"Seychelles",[n._F.IO]:"British Indian Ocean Territory",[n._F.GQ]:"Equatorial Guinea",[n._F.AO]:"Angola",[n._F.CG]:"Republic of the Congo",[n._F.BW]:"Botswana",[n._F.BI]:"Burundi",[n._F.DZ]:"Algeria",[n._F.TD]:"Chad",[n._F.NG]:"Nigeria",[n._F.TZ]:"Tanzania",[n._F.EH]:"Western Sahara",[n._F.SN]:"Senegal",[n._F.LR]:"Liberia",[n._F.ZA]:"South Africa",[n._F.CV]:"Cape Verde",[n._F.GM]:"Gambia",[n._F.SD]:"Sudan",[n._F.KM]:"Comoros",[n._F.SZ]:"Eswatini",[n._F.UG]:"Uganda",[n._F.MG]:"Madagascar",[n._F.RW]:"Rwanda",[n._F.CD]:"DR Congo",[n._F.CM]:"Cameroon",[n._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[n._F.TG]:"Togo",[n._F.MU]:"Mauritius",[n._F.NE]:"Niger",[n._F.BJ]:"Benin",[n._F.EG]:"Egypt",[n._F.LS]:"Lesotho",[n._F.ET]:"Ethiopia",[n._F.MA]:"Morocco",[n._F.YT]:"Mayotte",[n._F.BF]:"Burkina Faso",[n._F.RE]:"R\xe9union",[n._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[n._F.CF]:"Central African Republic",[n._F.MZ]:"Mozambique",[n._F.MW]:"Malawi",[n._F.ML]:"Mali",[n._F.ZM]:"Zambia",[n._F.LY]:"Libya",[n._F.GW]:"Guinea-Bissau",[n._F.SO]:"Somalia",[n._F.KE]:"Kenya",[n._F.GN]:"Guinea",[n._F.ZW]:"Zimbabwe",[n._F.TN]:"Tunisia",[n._F.SL]:"Sierra Leone",[n._F.GA]:"Gabon",[n._F.CI]:"Ivory Coast",[n._F.JO]:"Jordan",[n._F.PK]:"Pakistan",[n._F.KP]:"North Korea",[n._F.MO]:"Macau",[n._F.AM]:"Armenia",[n._F.SY]:"Syria",[n._F.TJ]:"Tajikistan",[n._F.SA]:"Saudi Arabia",[n._F.KR]:"South Korea",[n._F.NP]:"Nepal",[n._F.PH]:"Philippines",[n._F.IQ]:"Iraq",[n._F.LB]:"Lebanon",[n._F.MN]:"Mongolia",[n._F.PS]:"Palestine",[n._F.YE]:"Yemen",[n._F.JP]:"Japan",[n._F.KZ]:"Kazakhstan",[n._F.LK]:"Sri Lanka",[n._F.MM]:"Myanmar",[n._F.KG]:"Kyrgyzstan",[n._F.CN]:"China",[n._F.AF]:"Afghanistan",[n._F.OM]:"Oman",[n._F.IN]:"India",[n._F.LA]:"Laos",[n._F.UZ]:"Uzbekistan",[n._F.MV]:"Maldives",[n._F.ID]:"Indonesia",[n._F.VN]:"Vietnam",[n._F.MY]:"Malaysia",[n._F.TW]:"Taiwan",[n._F.KH]:"Cambodia",[n._F.AE]:"United Arab Emirates",[n._F.HK]:"Hong Kong",[n._F.GE]:"Georgia (Country)",[n._F.BD]:"Bangladesh",[n._F.KW]:"Kuwait",[n._F.TM]:"Turkmenistan",[n._F.QA]:"Qatar",[n._F.BH]:"Bahrain",[n._F.BN]:"Brunei",[n._F.TH]:"Thailand",[n._F.BT]:"Bhutan",[n._F.SG]:"Singapore",[n._F.IL]:"Israel",[n._F.AZ]:"Azerbaijan",[n._F.TL]:"Timor-Leste",[n._F.IR]:"Iran",[n._F.TR]:"Turkey",[n._F.MK]:"North Macedonia",[n._F.IE]:"Ireland",[n._F.DK]:"Denmark",[n._F.SK]:"Slovakia",[n._F.MD]:"Moldova",[n._F.AX]:"\xc5land Islands",[n._F.PL]:"Poland",[n._F.BA]:"Bosnia and Herzegovina",[n._F.SM]:"San Marino",[n._F.CZ]:"Czechia",[n._F.EE]:"Estonia",[n._F.XK]:"Kosovo",[n._F.FO]:"Faroe Islands",[n._F.SJ]:"Svalbard and Jan Mayen",[n._F.GG]:"Guernsey",[n._F.FR]:"France",[n._F.NL]:"Netherlands",[n._F.FI]:"Finland",[n._F.PT]:"Portugal",[n._F.DE]:"Germany",[n._F.MT]:"Malta",[n._F.JE]:"Jersey",[n._F.IS]:"Iceland",[n._F.ES]:"Spain",[n._F.GI]:"Gibraltar",[n._F.NO]:"Norway",[n._F.CY]:"Cyprus",[n._F.RS]:"Serbia",[n._F.LT]:"Lithuania",[n._F.MC]:"Monaco",[n._F.LU]:"Luxembourg",[n._F.UA]:"Ukraine",[n._F.IM]:"Isle of Man",[n._F.RO]:"Romania",[n._F.BE]:"Belgium",[n._F.SE]:"Sweden",[n._F.ME]:"Montenegro",[n._F.LV]:"Latvia",[n._F.VA]:"Vatican City",[n._F.AT]:"Austria",[n._F.AL]:"Albania",[n._F.LI]:"Liechtenstein",[n._F.GR]:"Greece",[n._F.IT]:"Italy",[n._F.AD]:"Andorra",[n._F.GB]:"United Kingdom",[n._F.RU]:"Russia",[n._F.SI]:"Slovenia",[n._F.BY]:"Belarus",[n._F.CH]:"Switzerland",[n._F.HU]:"Hungary",[n._F.BG]:"Bulgaria",[n._F.HR]:"Croatia",[n._F.TC]:"Turks and Caicos Islands",[n._F.CW]:"Cura\xe7ao",[n._F.GP]:"Guadeloupe",[n._F.UM]:"United States Minor Outlying Islands",[n._F.GT]:"Guatemala",[n._F.PM]:"Saint Pierre and Miquelon",[n._F.BQ]:"Caribbean Netherlands",[n._F.GL]:"Greenland",[n._F.SX]:"Sint Maarten",[n._F.PA]:"Panama",[n._F.AW]:"Aruba",[n._F.MQ]:"Martinique",[n._F.AG]:"Antigua and Barbuda",[n._F.BM]:"Bermuda",[n._F.CU]:"Cuba",[n._F.GD]:"Grenada",[n._F.NI]:"Nicaragua",[n._F.LC]:"Saint Lucia",[n._F.KN]:"Saint Kitts and Nevis",[n._F.DO]:"Dominican Republic",[n._F.VC]:"Saint Vincent and the Grenadines",[n._F.BZ]:"Belize",[n._F.HT]:"Haiti",[n._F.JM]:"Jamaica",[n._F.BS]:"Bahamas",[n._F.MX]:"Mexico",[n._F.MF]:"Saint Martin",[n._F.SV]:"El Salvador",[n._F.BL]:"Saint Barth\xe9lemy",[n._F.AI]:"Anguilla",[n._F.MS]:"Montserrat",[n._F.VG]:"British Virgin Islands",[n._F.BB]:"Barbados",[n._F.HN]:"Honduras",[n._F.KY]:"Cayman Islands",[n._F.DM]:"Dominica",[n._F.TT]:"Trinidad and Tobago",[n._F.CR]:"Costa Rica",[n._F.SR]:"Suriname",[n._F.CX]:"Christmas Island",[n._F.WS]:"Samoa",[n._F.PF]:"French Polynesia",[n._F.AS]:"American Samoa",[n._F.NC]:"New Caledonia",[n._F.TK]:"Tokelau",[n._F.PW]:"Palau",[n._F.KI]:"Kiribati",[n._F.VU]:"Vanuatu",[n._F.PN]:"Pitcairn Islands",[n._F.CK]:"Cook Islands",[n._F.FJ]:"Fiji",[n._F.PG]:"Papua New Guinea",[n._F.MP]:"Northern Mariana Islands",[n._F.NU]:"Niue",[n._F.TV]:"Tuvalu",[n._F.NF]:"Norfolk Island",[n._F.TO]:"Tonga",[n._F.FM]:"Micronesia",[n._F.SB]:"Solomon Islands",[n._F.NR]:"Nauru",[n._F.WF]:"Wallis and Futuna",[n._F.GU]:"Guam",[n._F.AU]:"Australia",[n._F.NZ]:"New Zealand",[n._F.MH]:"Marshall Islands",[n._F.CC]:"Cocos (Keeling) Islands",[n._F.VE]:"Venezuela",[n._F.PY]:"Paraguay",[n._F.BR]:"Brazil",[n._F.CO]:"Colombia",[n._F.PE]:"Peru",[n._F.CL]:"Chile",[n._F.UY]:"Uruguay",[n._F.AR]:"Argentina",[n._F.GY]:"Guyana",[n._F.BO]:"Bolivia",[n._F.GF]:"French Guiana",[n._F.EC]:"Ecuador",[n._F.FK]:"Falkland Islands",[n._F.US_AL]:"Alabama",[n._F.US_AK]:"Alaska",[n._F.US_AZ]:"Arizona",[n._F.US_AR]:"Arkansas",[n._F.US_CA]:"California",[n._F.US_CO]:"Colorado",[n._F.US_CT]:"Connecticut",[n._F.US_DE]:"Delaware",[n._F.US_DC]:"District of Columbia (DC)",[n._F.US_FL]:"Florida",[n._F.US_GA]:"Georgia",[n._F.US_HI]:"Hawaii",[n._F.US_ID]:"Idaho",[n._F.US_IL]:"Illinois",[n._F.US_IN]:"Indiana",[n._F.US_IA]:"Iowa",[n._F.US_KS]:"Kansas",[n._F.US_KY]:"Kentucky",[n._F.US_LA]:"Louisiana",[n._F.US_ME]:"Maine",[n._F.US_MD]:"Maryland",[n._F.US_MA]:"Massachusetts",[n._F.US_MI]:"Michigan",[n._F.US_MN]:"Minnesota",[n._F.US_MS]:"Mississippi",[n._F.US_MO]:"Missouri",[n._F.US_MT]:"Montana",[n._F.US_NE]:"Nebraska",[n._F.US_NV]:"Nevada",[n._F.US_NH]:"New Hampshire",[n._F.US_NJ]:"New Jersey",[n._F.US_NM]:"New Mexico",[n._F.US_NY]:"New York",[n._F.US_NC]:"North Carolina",[n._F.US_ND]:"North Dakota",[n._F.US_OH]:"Ohio",[n._F.US_OK]:"Oklahoma",[n._F.US_OR]:"Oregon",[n._F.US_PA]:"Pennsylvania",[n._F.US_PR]:"Puerto Rico",[n._F.US_RI]:"Rhode Island",[n._F.US_SC]:"South Carolina",[n._F.US_SD]:"South Dakota",[n._F.US_TN]:"Tennessee",[n._F.US_TX]:"Texas",[n._F.US_UT]:"Utah",[n._F.US_VA]:"Virginia",[n._F.US_VI]:"United States Virgin Islands",[n._F.US_VT]:"Vermont",[n._F.US_WA]:"Washington",[n._F.US_WV]:"West Virginia",[n._F.US_WI]:"Wisconsin",[n._F.US_WY]:"Wyoming",[n._F.CA_AB]:"Alberta",[n._F.CA_BC]:"British Columbia",[n._F.CA_MB]:"Manitoba",[n._F.CA_NB]:"New Brunswick",[n._F.CA_NL]:"Newfoundland and Labrador",[n._F.CA_NS]:"Nova Scotia",[n._F.CA_ON]:"Ontario",[n._F.CA_PE]:"Prince Edward Island",[n._F.CA_QC]:"Quebec",[n._F.CA_SK]:"Saskatchewan",[n._F.CA_NT]:"Northwest Territories",[n._F.CA_NU]:"Nunavut",[n._F.CA_YT]:"Yukon",[n._F.CA]:"Canada",[n._F.US]:"United States",[n._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[n._F.CARIBBEAN]:"Caribbean",[n._F.EEA]:"European Economic Area (EEA)",[n._F.NON_EEA]:"Non European Economic Area",[n._F.GLOBAL]:"Global"},l=new Map(Object.entries(i));Object.entries(i).map(e=>({value:e[0],label:e[1]}))},14908:function(e,t,a){"use strict";var n=a(86677),i=a(27378);let l=e=>e.startsWith("#")?e.slice(1):e;t.Z=e=>{let{tabKeys:t,initialTab:a}=e,s=(0,n.useRouter)(),r=s.asPath.split("#")[1]||t[0],[o,d]=(0,i.useState)(r);return(0,i.useEffect)(()=>{a&&t.includes(a)&&d(a)},[a,t,s.isReady]),{activeTab:o,onTabChange:(0,i.useCallback)(async e=>{if(!t.includes(e)){await s.replace({pathname:s.pathname,query:s.query,hash:void 0}),d(t[0]);return}s.isReady&&(await s.replace({pathname:s.pathname,query:s.query,hash:l(e)},void 0,{shallow:!0}),d(e))},[s,t]),setActiveTab:d}}},79494:function(e,t,a){"use strict";var n=a(24246),i=a(87949);t.Z=e=>{let{title:t,icon:a,type:l,...s}=e;return(0,n.jsx)(i.wpx,{size:"small",type:l,"data-testid":"action-".concat(t),icon:a,iconPosition:"start",...s,children:t})}},60325:function(e,t,a){"use strict";a.d(t,{DD:function(){return r},Go:function(){return o},TK:function(){return i},Uv:function(){return c},k1:function(){return l},y3:function(){return u}});var n=a(65735);let i=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==t?t:[]},l=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected))&&void 0!==t?t:[]},s=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],r={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:s,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0,cookie_deletion_based_on_host_domain:!0,allow_vendor_asset_disclosure:!1,asset_disclosure_include_types:[]},o=(e,t)=>{let a=t.find(t=>t.id===e.language);return a?a.name:e.language},d=e=>{var t,a,n,i,l,s,r,o,d;let{language:c,is_default:u,accept_button_label:_,reject_button_label:m}=e;return{language:c,is_default:u,accept_button_label:_,reject_button_label:m,title:e.title,description:e.description,acknowledge_button_label:null!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(a=e.banner_title)&&void 0!==a?a:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(i=e.purpose_header)&&void 0!==i?i:void 0,privacy_policy_link_label:null!==(l=e.privacy_policy_link_label)&&void 0!==l?l:void 0,privacy_policy_url:null!==(s=e.privacy_policy_url)&&void 0!==s?s:void 0,privacy_preferences_link_label:null!==(r=e.privacy_preferences_link_label)&&void 0!==r?r:void 0,save_button_label:null!==(o=e.save_button_label)&&void 0!==o?o:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:t,updated_at:a,privacy_notices:i,origin:l,id:s,...r}=e,o={...r,privacy_notice_ids:i?i.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]};return(o.component===n.re.BANNER_AND_MODAL||o.component===n.re.MODAL)&&o.allow_vendor_asset_disclosure&&(!o.asset_disclosure_include_types||0===o.asset_disclosure_include_types.length)&&(o.allow_vendor_asset_disclosure=!1),o},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},83656:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return tP}});var n,i,l=a(24246),s=a(87949),r=a(86677),o=a(77213),d=a(77830),c=a(58754),u=a(14908),_=a(20682),m=a(94725),p=a(45216),h=a(38187),y=a(27378);let x=(0,s.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,l.jsx)("path",{d:"M1.33333 2.21875C1.15 2.21875 1 2.37344 1 2.5625V5.65625H3.66667C3.84167 5.65625 4.00417 5.75078 4.09583 5.90762L4.62708 6.8207L5.88542 4.22324C5.96667 4.05566 6.13125 3.94609 6.3125 3.93965C6.49375 3.9332 6.66667 4.02773 6.76042 4.18887L7.61458 5.65625H8.83333C9.11042 5.65625 9.33333 5.88613 9.33333 6.17188C9.33333 6.45762 9.11042 6.6875 8.83333 6.6875H7.33333C7.15833 6.6875 6.99583 6.59297 6.90417 6.43613L6.37292 5.52305L5.11458 8.12051C5.03333 8.28809 4.86875 8.39766 4.6875 8.4041C4.50625 8.41055 4.33333 8.31602 4.23958 8.15488L3.38542 6.6875H1V9.4375C1 9.62656 1.15 9.78125 1.33333 9.78125H10.6667C10.85 9.78125 11 9.62656 11 9.4375V2.5625C11 2.37344 10.85 2.21875 10.6667 2.21875H1.33333ZM0 2.5625C0 1.8041 0.597917 1.1875 1.33333 1.1875H10.6667C11.4021 1.1875 12 1.8041 12 2.5625V9.4375C12 10.1959 11.4021 10.8125 10.6667 10.8125H1.33333C0.597917 10.8125 0 10.1959 0 9.4375V2.5625Z",fill:"currentColor"})});var g=a(18225),f=a(812),v=a(17245),b=a(8133),F=a(46628),j=a(70675),S=a(67991),C=a(46238),k=a(92222),T=a(59003),E=a(47935);let N=(0,k.Cl)();var A=e=>{let{items:t,totalItemCount:a,selected:n,excluded:i,allSelected:r,someSelected:o,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:_}=e,m=t.map(e=>({id:e,isSelected:n.includes(e),isExcluded:i.includes(e)})),p=(0,y.useMemo)(()=>[N.display({id:"select",cell:e=>{let{row:t}=e;return(0,l.jsx)(E.k,{isChecked:t.original.isSelected||r&&!t.original.isExcluded,onChange:()=>c(t.original.id),dataTestId:"".concat(t.original.id,"-checkbox")})},header:()=>(0,l.jsx)(E.k,{isChecked:r,isIndeterminate:o,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),N.accessor(e=>e.id,{id:"id",cell:e=>(0,l.jsx)(E.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(E.Rr,{value:"Scope",...e})})],[c,u,r,o]),h=(0,T.b7)({getCoreRowModel:(0,k.sC)(),getRowId:e=>e.id,manualPagination:!0,data:m,columns:p,columnResizeMode:"onChange"});return(0,l.jsx)(s.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,l.jsx)(E.ZK,{tableInstance:h,onRowClick:e=>c(e.id),footer:!!_&&(0,l.jsx)(E.vr,{totalColumns:2,children:(0,l.jsx)(s.kCb,{justify:"center",children:d?(0,l.jsx)(g.Z,{size:"xs"}):(0,l.jsxs)(s.kCb,{align:"center",children:[(0,l.jsxs)(s.xvT,{fontSize:"xs",mr:4,children:["Showing ",t.length," of ",a]}),(0,l.jsx)(s.wpx,{onClick:_,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let w={items:[],total:1,page:1,size:50,pages:0};var I=(e,t)=>{let[a,n]=(0,y.useState)(2),{data:i,isLoading:l}=(0,j.oN)({page:1,size:25,connection_config_key:e}),s=(0,y.useRef)(l),{items:r,total:o}=null!=i?i:w,d=!!(null==i?void 0:i.pages)&&a>i.pages,[c,u]=(0,y.useState)(r);(0,y.useEffect)(()=>{s.current=l,u(r)},[l,r]),(0,y.useEffect)(()=>{let e=setTimeout(()=>{s.current&&t&&t()},5e3);return()=>clearTimeout(e)},[]);let[_,{isLoading:m,isFetching:p}]=(0,j.j3)(),h=m||p||l,x=async()=>{var t,i;if(d)return;let l=await _({connection_config_key:e,size:25,page:a+1});l.isError||(n(a+1),u([...c,...null!==(i=null===(t=l.data)||void 0===t?void 0:t.items)&&void 0!==i?i:[]]))};return{databases:c,totalDatabases:o,fetchMore:x,initialIsLoading:l,isLoading:h,reachedEnd:d}},q=e=>{var t;let{monitor:a,isEditing:n,isSubmitting:i,integrationKey:r,onSubmit:o,onClose:d}=e,c=(0,s.pmc)(),{databases:u,totalDatabases:_,fetchMore:m,reachedEnd:p,isLoading:h,initialIsLoading:y}=I(r,()=>{o({...a,databases:[]}),c({...F.MA,status:"info",description:"Loading resources is taking longer than expected. The monitor has been saved and is tracking all available resources. You can return later to limit its scope if needed"}),d()}),x=null!==(t=null==a?void 0:a.databases)&&void 0!==t?t:[],{selected:f,excluded:v,allSelected:b,someSelected:j,handleToggleItemSelected:k,handleToggleAll:T}=(0,S.Od)({initialSelected:x,initialExcluded:[],initialAllSelected:n&&!x.length,itemCount:_}),E=!b&&0===f.length;return y?(0,l.jsx)(g.Z,{my:12}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.kCb,{p:4,direction:"column",children:[(0,l.jsxs)(s.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,l.jsx)(s.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,l.jsx)(C.b,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,l.jsx)(A,{items:u,totalItemCount:_,selected:f,excluded:v,allSelected:b,someSelected:j,moreLoading:h,handleToggleSelection:k,handleToggleAll:T,onMoreClick:p?void 0:m})]}),(0,l.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,l.jsx)(s.wpx,{onClick:d,children:"Cancel"}),(0,l.jsx)(s.esZ,{title:E?"Select one or more projects to save":void 0,children:(0,l.jsx)(s.wpx,{onClick:()=>{o({...a,excluded_databases:v,databases:b?[]:f})},loading:i,type:"primary","data-testid":"save-btn",disabled:E,children:"Save"})})]})]})},M=a(64892),P=a(6680),D=a(54743);function U(e,t){let a,n;let i=()=>(0,P.L)(t?.in,NaN),l=t?.additionalDigits??2,s=function(e){let t;let a={},n=e.split(L.dateTimeDelimiter);if(n.length>2)return a;if(/:/.test(n[0])?t=n[0]:(a.date=n[0],t=n[1],L.timeZoneDelimiter.test(a.date)&&(a.date=e.split(L.timeZoneDelimiter)[0],t=e.substr(a.date.length,e.length))),t){let e=L.timezone.exec(t);e?(a.time=t.replace(e[1],""),a.timezone=e[1]):a.time=t}return a}(e);if(s.date){let e=function(e,t){let a=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(a);if(!n)return{year:NaN,restDateString:""};let i=n[1]?parseInt(n[1]):null,l=n[2]?parseInt(n[2]):null;return{year:null===l?i:100*l,restDateString:e.slice((n[1]||n[2]).length)}}(s.date,l);a=function(e,t){if(null===t)return new Date(NaN);let a=e.match(O);if(!a)return new Date(NaN);let n=!!a[4],i=V(a[1]),l=V(a[2])-1,s=V(a[3]),r=V(a[4]),o=V(a[5])-1;if(n)return r>=1&&r<=53&&o>=0&&o<=6?function(e,t,a){let n=new Date(0);n.setUTCFullYear(e,0,4);let i=n.getUTCDay()||7;return n.setUTCDate(n.getUTCDate()+((t-1)*7+a+1-i)),n}(t,r,o):new Date(NaN);{let e=new Date(0);return l>=0&&l<=11&&s>=1&&s<=(H[l]||(Z(t)?29:28))&&i>=1&&i<=(Z(t)?366:365)?(e.setUTCFullYear(t,l,Math.max(i,s)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return i();let r=+a,o=0;if(s.time&&isNaN(o=function(e){let t=e.match(R);if(!t)return NaN;let a=K(t[1]),n=K(t[2]),i=K(t[3]);return(24===a?0===n&&0===i:i>=0&&i<60&&n>=0&&n<60&&a>=0&&a<25)?a*M.vh+n*M.yJ+1e3*i:NaN}(s.time)))return i();if(s.timezone){if(isNaN(n=function(e){if("Z"===e)return 0;let t=e.match(B);if(!t)return 0;let a="+"===t[1]?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return i>=0&&i<=59?a*(n*M.vh+i*M.yJ):NaN}(s.timezone)))return i()}else{let e=new Date(r+o),a=(0,D.Q)(0,t?.in);return a.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),a.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),a}return(0,D.Q)(r+o+n,t?.in)}let L={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},O=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,R=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,B=/^([+-])(\d{2})(?::?(\d{2}))?$/;function V(e){return e?parseInt(e):1}function K(e){return e&&parseFloat(e.replace(",","."))||0}let H=[31,null,31,30,31,30,31,31,30,31,30,31];function Z(e){return e%400==0||e%4==0&&e%100!=0}var G=a(96063),z=a(34090),W=a(55484),Y=a(62165),J=a(97181),X=a(40324),Q=a(11013);let $=e=>{let{layout:t="stacked",...a}=e,{data:n}=(0,Q.eV)({page:1,size:100}),i=null==n?void 0:n.items.map(e=>({label:e.name,value:e.id}));return(0,l.jsx)(J.d,{tooltip:"If a shared monitor config is selected, the monitor will use the shared config to classify resources",options:i,label:"Shared monitor config",layout:t,...a})};var ee=a(65735);let et=[{value:ee.o$.BASE,label:"Base"},{value:ee.o$.FULL,label:"Full"}],ea={num_samples:25,num_threads:1},en=(e,t,a)=>{let n=e?{...null==t?void 0:t.classify_params}:ea;return a.use_llm_classifier?{...n,context_classifier:"llm",...a.llm_model_override&&{llm_model_override:a.llm_model_override},...a.prompt_template&&{prompt_template:a.prompt_template},content_classification_enabled:!1}:{...n,context_classifier:void 0,llm_model_override:void 0,prompt_template:void 0,content_classification_enabled:void 0}};var ei=e=>{var t,a,n,i,o,d,c,u,_,m;let{monitor:p,integrationOption:h,isSubmitting:y,databasesAvailable:x,onClose:g,onAdvance:v,onSubmit:b}=e,F=!!p,{flags:j}=(0,Y.hz)(),S=!!j.alphaFullActionCenter,C=(0,r.useRouter)(),k=Array.isArray(C.query.id)?C.query.id[0]:C.query.id,T=W.Ry().shape({name:W.Z_().required().label("Name"),execution_frequency:W.Z_().nullable().label("Execution frequency"),execution_start_date:W.hT().nullable().label("Execution start date")}),E=(null==p?void 0:p.execution_start_date)?U(p.execution_start_date):Date.now(),N=(null==p?void 0:null===(t=p.classify_params)||void 0===t?void 0:t.context_classifier)==="llm",A={name:null!==(o=null==p?void 0:p.name)&&void 0!==o?o:"",shared_config_id:null!==(d=null==p?void 0:p.shared_config_id)&&void 0!==d?d:void 0,execution_start_date:(0,G.WU)(E,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(c=null==p?void 0:p.execution_frequency)&&void 0!==c?c:ee.hV.MONTHLY,use_llm_classifier:N,llm_model_override:N&&null!==(u=null==p?void 0:null===(a=p.classify_params)||void 0===a?void 0:a.llm_model_override)&&void 0!==u?u:void 0,prompt_template:N&&null!==(_=null==p?void 0:null===(n=p.classify_params)||void 0===n?void 0:n.prompt_template)&&void 0!==_?_:void 0,content_classification_enabled:N?void 0:null!==(m=null==p?void 0:null===(i=p.classify_params)||void 0===i?void 0:i.content_classification_enabled)&&void 0!==m?m:void 0},w=(0,f.MM)(ee.hV);return(0,l.jsx)(z.J9,{initialValues:A,enableReinitialize:!0,onSubmit:e=>{let t=e.execution_frequency!==ee.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:ee.hV.NOT_SCHEDULED,execution_start_date:void 0},a=en(F,p,e),n=F?{...p,...t,name:e.name,shared_config_id:e.shared_config_id,classify_params:a}:{...t,name:e.name,shared_config_id:e.shared_config_id,connection_config_key:k,classify_params:a};h.identifier===ee.Rj.DYNAMODB&&(n.datasource_params={single_dataset:!1}),x?v(n):b(n)},validationSchema:T,children:e=>{let{values:t,isValid:a,resetForm:n}=e;return(0,l.jsx)(z.l0,{children:(0,l.jsxs)(s.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,l.jsx)(X.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,l.jsx)(J.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:w,label:"Automatic execution frequency",layout:"stacked"}),(0,l.jsx)($,{name:"shared_config_id",id:"shared_config_id"}),(0,l.jsx)(X.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:t.execution_frequency===ee.hV.NOT_SCHEDULED,id:"execution_start_date"}),S&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(X.w8,{name:"use_llm_classifier",id:"use_llm_classifier",label:"Use LLM Classifier",variant:"stacked"}),t.use_llm_classifier&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(X.j0,{name:"llm_model_override",id:"llm_model_override",label:"Model Override",variant:"stacked",tooltip:"Optionally specify a custom model to use for LLM classification"}),(0,l.jsx)(J.d,{name:"prompt_template",id:"prompt_template",label:"Prompt Template",options:et,layout:"stacked",tooltip:"Select the prompt template to use for LLM classification"})]})]}),(0,l.jsxs)("div",{className:"flex w-full justify-between",children:[(0,l.jsx)(s.wpx,{onClick:()=>{n(),g()},children:"Cancel"}),(0,l.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:!a,loading:y,"data-testid":"next-btn",children:x?"Next":"Save"})]})]})})}})},el=a(27693),es=a.n(el);let er=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e;return(0,l.jsx)(s.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,l.jsx)(s.cv2,{id:null!=c?c:d,name:d,"data-testid":"input-".concat(d),style:{width:"100%",...u.style},...u})})},eo=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e;return(0,l.jsx)(s.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,l.jsx)(s.AOh,{id:null!=c?c:d,"data-testid":"controlled-select-".concat(d),...u})})},ed=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e,[_,m]=(0,y.useState)(""),p="tags"===u.mode?(e,t)=>{var a;return e?e.value!==_||(null===(a=u.value)||void 0===a?void 0:a.includes(_))?u.optionRender?u.optionRender(e,t):e.label:'Create "'.concat(_,'"'):void 0}:u.optionRender||void 0;return(0,l.jsx)(s.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,l.jsx)(s.WPr,{id:null!=c?c:d,"data-testid":"controlled-select-".concat(d),...u,optionRender:p,onSearch:"tags"===u.mode?e=>{m(e),u.onSearch&&u.onSearch(e)}:void 0})})},ec=e=>{let{error:t,touched:a,required:n,tooltip:i,label:r,extra:o,name:d,id:c,...u}=e;return(0,l.jsx)(s.PPS.Item,{validateStatus:a&&t?"error":void 0,help:a&&t,hasFeedback:a&&!!t,required:n,tooltip:i,label:r,extra:o,htmlFor:null!=c?c:d,children:(0,l.jsx)(s.AntInput,{id:c||d,name:d,"data-testid":"input-".concat(d),allowClear:!0,...u})})};var eu=a(90111),e_=a(8411),em=a(64781),ep=a(60325);let eh=e=>{let{data:t}=(0,Q.eV)({page:1,size:100}),a=null==t?void 0:t.items.map(e=>({label:e.name,value:e.id}));return(0,l.jsx)(ed,{tooltip:"If a shared monitor config is selected, the monitor will use the shared config to classify resources",options:a,label:"Shared monitor config",...e})},ey=W.Ry().shape({name:W.Z_().required().label("Name"),execution_frequency:W.Z_().nullable().label("Execution frequency"),execution_start_date:W.hT().nullable().label("Execution start date"),datasource_params:W.Ry().shape({locations:W.IX().label("Locations"),exclude_domains:W.IX().label("Exclude domains"),sitemap_url:W.Z_().nullable().url().label("Sitemap URL")})});var ex=e=>{var t,a,n,i,o,d,c;let{monitor:u,url:_,onClose:m,onSubmit:p}=e,[h,x]=(0,y.useState)(!1),g=(0,r.useRouter)(),v=Array.isArray(g.query.id)?g.query.id[0]:g.query.id,b=(null==u?void 0:u.execution_start_date)?U(u.execution_start_date):Date.now(),{data:F,isLoading:j}=(0,em.gT)(),S=[...(0,ep.TK)(null!==(i=null==F?void 0:F.locations)&&void 0!==i?i:[]),...(0,ep.TK)(null!==(o=null==F?void 0:F.location_groups)&&void 0!==o?o:[])].map(e=>({value:e,label:e_.Z8[e]})),C={name:(null==u?void 0:u.name)||"",shared_config_id:null!==(d=null==u?void 0:u.shared_config_id)&&void 0!==d?d:void 0,execution_frequency:(null==u?void 0:u.execution_frequency)||ee.hV.NOT_SCHEDULED,execution_start_date:(0,G.WU)(b,"yyyy-MM-dd'T'HH:mm"),url:_,connection_config_key:v,datasource_params:null!==(c=null==u?void 0:u.datasource_params)&&void 0!==c?c:{locations:[],exclude_domains:[]}},k=async e=>{x(!0);let t=e.execution_frequency!==ee.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:ee.hV.NOT_SCHEDULED,execution_start_date:void 0};p({...u,...e,...t,key:null==u?void 0:u.key,classify_params:(null==u?void 0:u.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:v})},{values:T,resetForm:E,handleSubmit:N,errors:A,touched:w,...I}=(0,z.TA)({initialValues:C,onSubmit:k,validationSchema:ey}),q=(0,f.MM)(ee.hV).filter(e=>[ee.hV.MONTHLY,ee.hV.QUARTERLY,ee.hV.YEARLY,ee.hV.NOT_SCHEDULED].includes(e.value));return(0,l.jsxs)(s.jqI,{vertical:!0,className:"pt-4",children:[(0,l.jsx)(eu.Z,{children:(0,l.jsx)(s.xvT,{fontSize:"sm",children:"This monitor allows you to simulate and verify user consent actions, such as 'accept,' 'reject,' or 'opt-out,' on consent experiences. For each detected activity, the monitor will record whether it occurred before or after the configured user actions, ensuring compliance with user consent choices."})}),(0,l.jsxs)(s.PPS,{onFinish:N,layout:"vertical",children:[(0,l.jsx)(ec,{name:"name",id:"name",label:"Name",required:!0,error:A.name,touched:w.name,onChange:I.handleChange,onBlur:I.handleBlur,value:T.name}),(0,l.jsx)(ec,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",error:(0,z.u9)(A,"datasource_params.sitemap_url"),touched:(0,z.u9)(w,"datasource_params.sitemap_url"),onChange:I.handleChange,onBlur:I.handleBlur,value:(null===(t=T.datasource_params)||void 0===t?void 0:t.sitemap_url)||""}),(0,l.jsx)(ed,{name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",mode:"tags",options:[],suffixIcon:null,open:!1,error:(0,z.u9)(A,"datasource_params.exclude_domains"),touched:(0,z.u9)(w,"datasource_params.exclude_domains"),onChange:e=>I.setFieldValue("datasource_params.exclude_domains",e),onBlur:I.handleBlur,value:(null===(a=T.datasource_params)||void 0===a?void 0:a.exclude_domains)||[]}),(0,l.jsx)(ec,{name:"url",id:"url",label:"URL",required:!0,disabled:!0,error:A.url,touched:w.url,onChange:I.handleChange,onBlur:I.handleBlur,value:T.url||""}),(0,l.jsx)(eo,{id:"locations",name:"datasource_params.locations",label:"Locations",loading:j,options:(0,s.Ky_)(S.map(e=>e.value)),tooltip:"Specify the region(s) to include in the scan. The monitor will scan the same URL across these locations to identify tracking technologies, such as cookies served by ad tech vendors.",mode:"multiple",error:(0,z.u9)(A,"datasource_params.locations"),touched:(0,z.u9)(w,"datasource_params.locations"),onChange:e=>I.setFieldValue("datasource_params.locations",e),onBlur:I.handleBlur,value:null===(n=T.datasource_params)||void 0===n?void 0:n.locations}),(0,l.jsx)(eh,{name:"shared_config_id",id:"shared_config_id",error:A.shared_config_id,touched:w.shared_config_id,onChange:e=>I.setFieldValue("shared_config_id",e),onBlur:I.handleBlur,value:T.shared_config_id}),(0,l.jsx)(ed,{name:"execution_frequency",id:"execution_frequency",options:q,label:"Automatic execution frequency",error:A.execution_frequency,touched:w.execution_frequency,onChange:e=>I.setFieldValue("execution_frequency",e),onBlur:I.handleBlur,value:T.execution_frequency}),(0,l.jsx)(er,{name:"execution_start_date",label:"Automatic execution start time",disabled:T.execution_frequency===ee.hV.NOT_SCHEDULED,id:"execution_start_date",tooltip:"Set the start time for the scan. For optimal performance and minimal disruption, schedule scans during periods of low traffic.",error:A.execution_start_date,touched:w.execution_start_date,onChange:e=>e&&I.setFieldValue("execution_start_date",e.toISOString()),onBlur:I.handleBlur,value:es()(T.execution_start_date)}),(0,l.jsxs)(s.jqI,{gap:"small",className:"mt-2",justify:"stretch",children:[(0,l.jsx)(s.wpx,{onClick:()=>{E(),m()},block:!0,children:"Cancel"}),(0,l.jsx)(s.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",block:!0,loading:h,children:"Save"})]})]})]})},eg=a(31883),ef=e=>{let{isOpen:t,onClose:a,formStep:n,onAdvance:i,monitor:r,isEditing:o,integration:d,integrationOption:c,isWebsiteMonitor:u}=e,[_,{isLoading:m}]=(0,j.Fy)(),{data:p}=(0,j.oN)({page:1,size:25,connection_config_key:d.key}),h=!!p&&!!p.total,y=(0,s.pmc)(),{successAlert:x,errorAlert:S}=(0,v.VY)(),C=async e=>{let t;let n=setTimeout(()=>{t||(y({...F.MA,status:"info",description:"Saving this monitor is taking longer than expected. Fides will continue processing it in the background, and you can check back later to view the updates."}),a())},5e3);if(t=await _(e)){if(clearTimeout(n),(0,eg.D4)(t)){S((0,f.e$)(t.error),"Error creating monitor");return}if(o){x("Monitor updated successfully"),a();return}if(u){x(e.execution_frequency===ee.hV.NOT_SCHEDULED?'Your monitor has been created with no schedule. Select "Scan" in the table below to begin scanning your website.':"Your monitor has been created and is now scanning your website. Once the monitor is finished scanning, results can be found in the action center."),a();return}x("Monitor created successfully"),a()}};return u?(0,l.jsx)(b.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:t,onClose:a,children:(0,l.jsx)(ex,{monitor:r,url:d.secrets.url,onClose:a,onSubmit:C})}):(0,l.jsxs)(b.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:t,onClose:a,children:[0===n&&(0,l.jsx)(ei,{monitor:r,onClose:a,onAdvance:i,onSubmit:C,isSubmitting:m,databasesAvailable:h,integrationOption:c}),1===n&&(r?(0,l.jsx)(q,{monitor:r,isEditing:o,isSubmitting:m,onSubmit:C,onClose:a,integrationKey:d.key}):(0,l.jsx)(g.Z,{}))]})},ev=a(8125),eb=e=>{let{defaultSuccessMsg:t,defaultErrorMsg:a}=e,{successAlert:n,errorAlert:i}=(0,v.VY)();return{toastResult:e=>{(0,f.D4)(e)?i((0,f.e$)(e.error,a)):n(t)}}},eF=a(58452),ej=a(79494),eS=e=>{let{monitorId:t,isWebsiteMonitor:a,onEditClick:n}=e,{isOpen:i,onOpen:r,onClose:o}=(0,s.qY0)(),[d,{isLoading:c}]=(0,j.Sb)(),{toastResult:u}=eb({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[_,{isLoading:m}]=(0,j.V9)(),{toastResult:p}=eb({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:a?"Scanning your website now. Once the monitor is finished, results can be found in the action center.":"Monitor execution successfully started"});if(!t)return null;let h=async()=>{u(await d({monitor_config_id:t}))},y=async()=>{p(await _({monitor_config_id:t}))};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eF.Z,{isOpen:i,onClose:o,onConfirm:h,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0,isLoading:c}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(s.esZ,{title:"Edit",children:(0,l.jsx)(s.wpx,{onClick:n,size:"small",icon:(0,l.jsx)(s.PJP.I8b,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,l.jsx)(s.esZ,{title:"Delete",children:(0,l.jsx)(s.wpx,{onClick:r,size:"small",icon:(0,l.jsx)(s.PJP.ZNm,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,l.jsx)(ej.Z,{onClick:y,title:"Scan",loading:m})]})]})},eC=a(51980),ek=a(16394),eT=e=>{var t,a;let{monitor:n}=e,i=null===(t=n.execution_records)||void 0===t?void 0:t[0],{isOpen:r,onOpen:o,onClose:d}=(0,s.qY0)(),c=n.last_monitored?new Date(n.last_monitored):null,u=c?(0,ek.p6)(c):"N/A",_=c?(0,eC.B)(c,new Date,{addSuffix:!0}):"N/A";return i?i.status===ee.L2.IN_PROGRESS?c?(0,l.jsx)(s.esZ,{title:"Last scan: ".concat(_),children:(0,l.jsx)(s.j8w,{color:"info",children:"Scanning"})}):(0,l.jsx)(s.j8w,{color:"info",children:"Scanning"}):i.status===ee.L2.COMPLETED?(0,l.jsx)(s.esZ,{title:u,children:(0,l.jsx)(s.j8w,{color:"success","data-testid":"tag-success",children:_})}):i.status===ee.L2.ERRORED?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.j8w,{color:"error",closeIcon:(0,l.jsx)(s.PJP.daM,{}),closeButtonLabel:"View details",onClose:o,"data-testid":"tag-error",children:"Incomplete"}),(0,l.jsxs)(s.dys,{isOpen:r,onClose:d,size:"md",children:[(0,l.jsx)(s.P1B,{}),(0,l.jsxs)(s.scA,{"data-testid":"error-log-drawer",children:[(0,l.jsx)(s.OXI,{children:"Failure log"}),(0,l.jsx)(s.cCv,{}),(0,l.jsxs)(s.Ng0,{children:[i.completed&&(0,l.jsx)(s.AntTypography.Paragraph,{type:"secondary",children:(0,ek.p6)(new Date(i.completed))}),null===(a=i.messages)||void 0===a?void 0:a.map((e,t)=>(0,l.jsxs)(y.Fragment,{children:[(0,l.jsx)(s.AntTypography.Paragraph,{"data-testid":"error-log-message",children:e}),t<i.messages.length-1&&(0,l.jsx)(s.izJ,{className:"mb-3"})]},t))]})]})]})]}):(0,l.jsx)(s.j8w,{children:"N/A"}):(0,l.jsx)(s.j8w,{children:"N/A"})};let{Text:eE}=s.AntTypography,eN=e=>{let{enabled:t,onToggle:a,title:n,message:i,isDisabled:r,...o}=e,d=(0,s.qY0)(),[c,u]=s.Pg3.useMessage(),_=async e=>{let{enable:t}=e,n=await a(t);(0,eg.D4)(n)&&c.error((0,f.e$)(n.error))},m=async e=>{e?await _({enable:!0}):d.onOpen()};return(0,l.jsxs)(l.Fragment,{children:[u,(0,l.jsx)(s.rAg,{checked:t,onChange:m,disabled:r,"data-testid":"toggle-switch",...o}),(0,l.jsx)(eF.Z,{isOpen:d.isOpen,onClose:d.onClose,onConfirm:()=>{_({enable:!1}),d.onClose()},title:n,message:(0,l.jsx)(eE,{children:i}),continueButtonText:"Confirm",isCentered:!0})]})},eA=e=>{let{record:t}=e,[a]=(0,j.Fy)(),n=async e=>a({...t,enabled:e}),{enabled:i}=t;return(0,l.jsx)(eN,{enabled:!!i,onToggle:n,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},{Text:ew}=s.AntTypography;(n=i||(i={})).NAME="name",n.PROJECTS="projects",n.SOURCE_URL="source_url",n.FREQUENCY="execution_frequency",n.MONITOR_STATUS="monitor_status",n.REGIONS="regions",n.STATUS="status",n.ACTION="action";let eI=e=>{var t,a,n;let{integration:i,isWebsiteMonitor:r,onEditMonitor:o}=e,d=(0,ev.o)(),{pageIndex:c,pageSize:u}=d,{isLoading:_,isFetching:m,data:p}=(0,j.Fu)({page:c,size:u,connection_config_key:i.key}),h=(0,y.useMemo)(()=>{var e,t;return{enableSelection:!1,getRowKey:e=>{var t;return null!==(t=e.key)&&void 0!==t?t:e.name},isLoading:_,isFetching:m,dataSource:null!==(e=null==p?void 0:p.items)&&void 0!==e?e:[],totalRows:null!==(t=null==p?void 0:p.total)&&void 0!==t?t:0}},[_,m,null==p?void 0:p.items,null==p?void 0:p.total]),x=(0,ev.V)(d,h);return{columns:(0,y.useMemo)(()=>{let e={title:"Name",dataIndex:"name",key:"name",render:e=>(0,l.jsx)(ew,{ellipsis:{tooltip:e},style:{maxWidth:150},children:e}),fixed:"left"},t={title:"Scan frequency",dataIndex:"execution_frequency",key:"execution_frequency",render:e=>null!=e?e:"Not scheduled"},a={title:"Scan status",key:"monitor_status",render:(e,t)=>(0,l.jsx)(eT,{monitor:t})},n={title:"Status",dataIndex:"status",key:"status",width:100,render:(e,t)=>(0,l.jsx)(eA,{record:t})},d={title:"Actions",key:"action",width:100,render:(e,t)=>(0,l.jsx)(eS,{onEditClick:()=>o(t),isWebsiteMonitor:r,monitorId:t.key}),fixed:"right"};return r?[e,{title:"Source URL",dataIndex:"source_url",key:"source_url",render:()=>{var e;let t=i.secrets;return(0,l.jsx)(ew,{ellipsis:{tooltip:null==t?void 0:t.url},style:{maxWidth:150},children:null!==(e=null==t?void 0:t.url)&&void 0!==e?e:"Not scheduled"})}},t,{title:"Regions",dataIndex:"regions",key:"regions",render:(e,t)=>{let a=t.datasource_params&&"locations"in t.datasource_params&&Array.isArray(t.datasource_params.locations)?t.datasource_params.locations:[];if(0===a.length)return"No regions selected";let n=a.map(e=>{let t=(0,s.QCN)(e);if(t)return(0,s.c1K)({isoEntry:t});let a=Object.entries(ee._F).find(t=>{let[,a]=t;return a===e});return a&&e_.Z8[a[1]]}).join(", ");return(0,l.jsx)(ew,{ellipsis:{tooltip:n},style:{maxWidth:150},children:n})}},a,n,d]:[e,{title:"Scope",dataIndex:"projects",key:"projects",render:(e,t)=>{var a;let n=null!==(a=t.databases)&&void 0!==a?a:[];return 0===n.length?"All projects":"".concat(n.length," ").concat(1===n.length?"Project":"Projects")}},t,a,n,d]},[i.secrets,r,o]),monitors:null!==(a=null==p?void 0:p.items)&&void 0!==a?a:[],isLoading:_,isFetching:m,totalRows:null!==(n=null==p?void 0:p.total)&&void 0!==n?n:0,tableProps:x.tableProps,hasData:!!(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)}};var eq=a(40774);let eM={[ee.Rj.WEBSITE]:"Configure your website monitor to identify active ad tech vendors and tracking technologies across your site. This monitor will analyze selected pages for vendor activity, compliance with privacy requirements, and data collection practices. Set your preferences below to customize the monitor frequency and scan locations.",[ee.Rj.OKTA]:"Configure your SSO provider monitor to detect and map systems within your infrastructure. This monitor will analyze connected systems to identify their activity and ensure accurate representation in your data map. Set your preferences below to customize the monitor&apos;s scan frequency and scope. To learn more about monitors, view our docs here."};var eP=e=>{var t,a;let{integration:n,integrationOption:i}=e,r=(null==i?void 0:i.identifier)===ee.Rj.WEBSITE,o=(null==i?void 0:i.type)===ee.Zi.SAAS,d=(0,s.qY0)(),[c,u]=(0,y.useState)(void 0),[_,m]=(0,y.useState)(!1),[p,h]=(0,y.useState)(0),{columns:g,tableProps:f,monitors:v,isLoading:b}=eI({integration:n,isWebsiteMonitor:r,onEditMonitor:e=>{u(e),m(!0),d.onOpen()}}),F=null!==(t=eM[null==i?void 0:i.identifier])&&void 0!==t?t:"A data discovery monitor observes configured systems for data model changes to proactively discover and classify data risks. Monitors can observe part or all of a project, dataset, table, or API for changes and each can be assigned to a different data steward.",{isDisabled:j,tooltip:S}=o&&v.length>0?{isDisabled:!0,tooltip:"API integrations only use a single monitor"}:n.name||(null===(a=n.saas_config)||void 0===a?void 0:a.type)!=="salesforce"?{isDisabled:!1,tooltip:null}:{isDisabled:!0,tooltip:"This is a legacy connection and cannot be used to create a monitor. Create a new Salesforce integration to use this feature."};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.AntTypography.Paragraph,{className:"mb-6 max-w-3xl","data-testid":"monitor-description",children:F}),(0,l.jsxs)(s.jqI,{justify:"space-between",className:"py-3",children:[(0,l.jsx)(eq.Z,{}),(0,l.jsx)(s.esZ,{title:S,children:(0,l.jsx)("span",{children:(0,l.jsx)(s.wpx,{onClick:d.onOpen,icon:(0,l.jsx)(x,{}),iconPosition:"end","data-testid":"add-monitor-btn",disabled:j,children:"Add monitor"})})})]}),(0,l.jsx)(s.V5H,{...f,loading:b,columns:g}),(0,l.jsx)(ef,{isOpen:d.isOpen,onClose:()=>{u(void 0),m(!1),h(0),d.onClose()},formStep:p,onAdvance:e=>{u(e),h(1)},monitor:c,isEditing:_,integration:n,integrationOption:i,isWebsiteMonitor:r})]})},eD=a(41966),eU=a(32885),eL=e=>{let{integration:t}=e,{data:a}=(0,m.Eg)(t.key),{data:n}=(0,eD.LH)({minimal:!0,connection_type:ee.Rj.BIGQUERY}),[i,{isLoading:r}]=(0,eU.Qd)(),o=(0,s.pmc)(),d=async()=>{try{var e,l,s,r,d;let c=null!==(s=null==a?void 0:null===(e=a.items)||void 0===e?void 0:e.map(e=>e.fides_key))&&void 0!==s?s:[],u=null!==(r=null==n?void 0:n.map(e=>e.fides_key))&&void 0!==r?r:[],_=c.length>0?c:u,m=await i({connectionKey:t.key,datasetIds:_}),p=null!==(d=null===(l=m.data)||void 0===l?void 0:l.succeeded.length)&&void 0!==d?d:0,h="Fides has begun syncing with DataHub. There ".concat(1===p?"is":"are"," ").concat(p," dataset").concat(1===p?"":"s"," queued for syncing.");o((0,F.t5)(h))}catch(e){o({title:"Error syncing datasets",description:"There was an error syncing your datasets with DataHub. Please try again.",status:"error",duration:5e3,isClosable:!0})}};return(0,l.jsxs)(s.gCW,{spacing:6,align:"stretch",children:[(0,l.jsxs)(s.gCW,{spacing:4,align:"stretch",children:[(0,l.jsx)(s.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-1",children:"If you're using DataHub for metadata management, select sync datasets to push data categories from Fides to your DataHub datasets."}),(0,l.jsxs)(s.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-2",children:["Fides assigns data categories to datasets based on your privacy taxonomy. With this integration, those categories can be added as glossary terms to matching datasets in DataHub-keeping your labeling consistent across systems. To learn more about our DataHub integration, ",(0,l.jsx)(s.rUS,{href:"https://ethyca.com/docs/user-guides/integrations/saas-integrations/datahub",isExternal:!0,color:"blue.500",textDecoration:"underline",children:"view our docs"}),"."]})]}),(0,l.jsx)(s.zxk,{colorScheme:"primary",onClick:d,"data-testid":"sync-button",width:"fit-content",isLoading:r,loadingText:"Syncing datasets...",children:"Sync Datasets"})]})},eO=a(78780),eR=a(52253);let{useGetManualTaskConfigQuery:eB,useAssignUsersToManualTaskMutation:eV,useUpdateDependencyConditionsMutation:eK}=eO.u.injectEndpoints({endpoints:e=>({getManualTaskConfig:e.query({query:e=>{let{connectionKey:t}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-task"),method:"GET"}},providesTags:()=>["Manual Tasks"]}),assignUsersToManualTask:e.mutation({query:e=>{let{connectionKey:t,userIds:a}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-task/assign-users"),method:"PUT",body:a}},invalidatesTags:()=>["Manual Tasks"]}),updateDependencyConditions:e.mutation({query:e=>{let{connectionKey:t,conditions:a}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-task/dependency-conditions"),method:"PUT",body:a}},invalidatesTags:()=>["Manual Tasks"]})})});var eH=a(20386);let eZ=(e,t,a)=>[e,t,a].join(":"),eG=e=>{let[t,a,n]=e.split(":");return{datasetKey:t,collectionName:a,fieldPath:n}},ez=function(e,t,a){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e.map(e=>{let i=n?"".concat(n).concat(".").concat(e.name):e.name,l=eZ(t,a,i),s=e.fields&&e.fields.length>0;return{key:l,title:e.name,fullTitle:"".concat(a).concat(":").concat(i),value:l,isLeaf:!s,selectable:!0,children:s?ez(e.fields,t,a,i):void 0}})},eW=e=>{let{value:t,onChange:a,disabled:n=!1,excludeSaasDataset:i=!0}=e,[r,o]=(0,y.useState)(),[d,c]=(0,y.useState)(),[u,_]=(0,y.useState)([]),{data:m,isLoading:p}=(0,eH.LH)({minimal:!0,exclude_saas_datasets:i}),{data:h}=(0,eH.oM)(r,{skip:!r}),x=(0,y.useMemo)(()=>{var e;return h&&r&&(null===(e=h.collections)||void 0===e?void 0:e.map(e=>({key:"".concat(r).concat(":").concat(e.name),title:e.name,fullTitle:e.name,value:"".concat(r).concat(":").concat(e.name),isLeaf:!1,selectable:!1,children:e.fields?ez(e.fields,r,e.name,""):void 0})))||[]},[h,r]);(0,y.useEffect)(()=>{_(x),r||c(void 0)},[x,r]),(0,y.useEffect)(()=>{if(t){let{datasetKey:e,collectionName:a,fieldPath:n}=eG(t);e&&(o(e),a&&n&&c(t))}else o(void 0),c(void 0)},[t]);let g=(0,y.useMemo)(()=>m?m.map(e=>({value:e.fides_key,label:e.name||e.fides_key})):[],[m]),f=(0,y.useCallback)(e=>{o(e),c(void 0),a&&a(void 0)},[a]),v=(0,y.useCallback)(e=>{c(e),a&&a(e)},[a]);return p||(null==m?void 0:m.length)!==0?(0,l.jsxs)(s.jqI,{gap:8,"data-testid":"dataset-reference-picker",children:[(0,l.jsx)(s.WPr,{value:r,onChange:f,options:g,placeholder:"Select a dataset","aria-label":"Select a dataset",disabled:n,loading:p,allowClear:!0,showSearch:!0,style:{width:"50%"},"data-testid":"dataset-select"}),(0,l.jsx)(s.wrJ,{value:d,onChange:v,treeData:u,placeholder:"Select a field","aria-label":"Select a field",disabled:n||!r,allowClear:!0,showSearch:!0,style:{width:"50%"},treeNodeFilterProp:"title",treeNodeLabelProp:"fullTitle","data-testid":"field-tree-select"})]}):(0,l.jsx)("div",{className:"flex flex-col items-center justify-center py-4 ",children:(0,l.jsx)(s.AntTypography.Text,{children:"No datasets available. Create a dataset to start using this feature"})})},{Text:eY,Title:eJ,Link:eX}=s.AntTypography,eQ=()=>(0,l.jsxs)("div",{className:"px-2 text-white",children:[(0,l.jsx)(eJ,{level:5,className:"mb-3",style:{color:"inherit"},children:"Operator Reference"}),(0,l.jsx)(eY,{strong:!0,className:"mb-2 block",style:{color:"inherit"},children:"All data types:"}),(0,l.jsxs)("ul",{className:"ml-2 space-y-1",children:[(0,l.jsx)("li",{children:"Equals: Exact match"}),(0,l.jsx)("li",{children:"Not equals: Does not exactly match"}),(0,l.jsxs)("li",{children:["Exists: Field can be reached"," ",(0,l.jsx)(eX,{href:"https://www.ethyca.com/docs/dev-docs/privacy-requests/execution#graph-building",target:"_blank",style:{color:"inherit",textDecoration:"underline"},children:"by the DAG"})," ","regardless of value"]}),(0,l.jsxs)("li",{children:["Does not exist: Field cannot be reached"," ",(0,l.jsx)(eX,{href:"https://www.ethyca.com/docs/dev-docs/privacy-requests/execution#graph-building",target:"_blank",style:{color:"inherit",textDecoration:"underline"},children:"by the DAG"})]})]}),(0,l.jsx)(eY,{strong:!0,className:"mb-2 mt-4 block",style:{color:"inherit"},children:"Strings/Text:"}),(0,l.jsxs)("ul",{className:"ml-2 space-y-1",children:[(0,l.jsx)("li",{children:"Starts with: Text begins with value"}),(0,l.jsx)("li",{children:"Contains: Text includes value anywhere"})]}),(0,l.jsx)(eY,{strong:!0,className:"mb-2 mt-4 block",style:{color:"inherit"},children:"Numbers:"}),(0,l.jsx)("ul",{className:"ml-2 space-y-1",children:(0,l.jsx)("li",{children:"Equals / Not equals / Greater than / Greater than or equal / Less than / Less than or equal"})}),(0,l.jsx)(eY,{strong:!0,className:"mb-2 mt-4 block",style:{color:"inherit"},children:"Array/List:"}),(0,l.jsxs)("ul",{className:"ml-2 space-y-1",children:[(0,l.jsx)("li",{children:"List contains: Value in list"}),(0,l.jsx)("li",{children:"Not in list: Value not in list"})]})]}),e$=(e,t)=>{if(e===ee.EF.EXISTS||e===ee.EF.NOT_EXISTS||!(null==t?void 0:t.trim()))return null;if("true"===t.toLowerCase())return!0;if("false"===t.toLowerCase())return!1;let a=Number(t);return Number.isNaN(a)?t:a};var e0=e=>{var t;let{onAdd:a,onCancel:n,editingCondition:i,isSubmitting:r=!1}=e,[o]=s.PPS.useForm(),d=[{label:"Equals",value:ee.EF.EQ},{label:"Not equals",value:ee.EF.NEQ},{label:"Greater than",value:ee.EF.GT},{label:"Greater than or equal",value:ee.EF.GTE},{label:"Less than",value:ee.EF.LT},{label:"Less than or equal",value:ee.EF.LTE},{label:"Exists",value:ee.EF.EXISTS},{label:"Does not exist",value:ee.EF.NOT_EXISTS},{label:"List contains",value:ee.EF.LIST_CONTAINS},{label:"Not in list",value:ee.EF.NOT_IN_LIST},{label:"Starts with",value:ee.EF.STARTS_WITH},{label:"Contains",value:ee.EF.CONTAINS}],c=i?{fieldAddress:i.field_address,operator:i.operator,value:(null===(t=i.value)||void 0===t?void 0:t.toString())||""}:{},u=(0,y.useCallback)(e=>{a({field_address:e.fieldAddress.trim(),operator:e.operator,value:e$(e.operator,e.value)})},[a]),_=(0,y.useCallback)(()=>{o.resetFields(),n()},[o,n]),m=s.PPS.useWatch("operator",o),p=m===ee.EF.EXISTS||m===ee.EF.NOT_EXISTS;return(0,y.useEffect)(()=>{p&&o.setFieldValue("value","")},[p,o]),(0,l.jsxs)(s.PPS,{form:o,onFinish:u,layout:"vertical",initialValues:c,children:[(0,l.jsx)(s.PPS.Item,{name:"fieldAddress",label:"Dataset Field",rules:[{required:!0,message:"Dataset field is required"}],tooltip:"Select a field from your datasets to use in the condition",validateTrigger:["onBlur","onSubmit"],children:(0,l.jsx)(eW,{})}),(0,l.jsx)(s.PPS.Item,{name:"operator",label:"Operator",tooltip:{placement:"right",title:(0,l.jsx)(eQ,{}),styles:{root:{maxWidth:"500px"}}},rules:[{required:!0,message:"Operator is required"}],children:(0,l.jsx)(s.WPr,{placeholder:"Select operator","aria-label":"Select operator",options:d,"data-testid":"operator-select"})}),(0,l.jsx)(s.PPS.Item,{name:"value",label:"Value",rules:[{required:!p,message:"Value is required for this operator"}],tooltip:p?"Value is not required for exists/not exists operators":"Enter the value to compare against. Can be text, number, or true/false",children:(0,l.jsx)(s.AntInput,{placeholder:p?"Not required":"Enter value (text, number, or true/false)",disabled:p,"data-testid":"value-input"})}),(0,l.jsx)(s.PPS.Item,{children:(0,l.jsxs)(s.kCb,{gap:2,justify:"flex-end",children:[(0,l.jsx)(s.wpx,{onClick:_,disabled:r,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(s.wpx,{type:"primary",htmlType:"submit",loading:r,"data-testid":"save-btn",children:i?"Update":"Add"})]})})]})},e1=e=>{let{isOpen:t,onClose:a,onConditionSaved:n,editingCondition:i}=e,{handleError:r}=(0,v.HK)(),[o,d]=(0,y.useState)(!1),c=!!i,u=async e=>{try{d(!0),await n(e),a()}catch(e){r(e)}finally{d(!1)}};return(0,l.jsxs)(s.u_l,{isCentered:!0,isOpen:t,size:"lg",onClose:a,"data-testid":"add-edit-condition-modal",children:[(0,l.jsx)(s.ZAr,{}),(0,l.jsxs)(s.hzk,{minWidth:"650px",children:[(0,l.jsx)(s.xBx,{children:c?"Edit condition":"Add condition"}),(0,l.jsx)(s.olH,{}),(0,l.jsx)(s.fef,{pb:6,children:(0,l.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(s.xuv,{color:"gray.700",fontSize:"14px",children:c?"Update the condition settings for task creation.":"Configure a new condition that must be met before a task is created. Select a field from your datasets to create the condition."}),(0,l.jsx)(e0,{onAdd:u,onCancel:()=>{a()},editingCondition:i,isSubmitting:o})]})})]})]})};let e3={[ee.EF.EQ]:"equals",[ee.EF.NEQ]:"not equals",[ee.EF.LT]:"less than",[ee.EF.LTE]:"less than or equal",[ee.EF.GT]:"greater than",[ee.EF.GTE]:"greater than or equal",[ee.EF.EXISTS]:"exists",[ee.EF.NOT_EXISTS]:"does not exist",[ee.EF.LIST_CONTAINS]:"list contains",[ee.EF.NOT_IN_LIST]:"not in list",[ee.EF.STARTS_WITH]:"starts with",[ee.EF.CONTAINS]:"contains",[ee.EF.LIST_INTERSECTS]:"list intersects",[ee.EF.LIST_SUBSET]:"list subset",[ee.EF.LIST_SUPERSET]:"list superset",[ee.EF.LIST_DISJOINT]:"list disjoint",[ee.EF.ENDS_WITH]:"ends with"},e2={[ee.PF.TEXT]:"Text",[ee.PF.CHECKBOX]:"Checkbox",[ee.PF.ATTACHMENT]:"Attachment"},e5={[ee.k6.ACCESS]:"Access",[ee.k6.ERASURE]:"Erasure"},e6=(e,t,a)=>(0,y.useCallback)(async n=>{let i=0===n.length?[]:[{logical_operator:ee.RP.AND,conditions:n}];await t({connectionKey:e,conditions:i}).unwrap(),await a()},[e,t,a]),{Paragraph:e4,Text:e8}=s.AntTypography;var e7=e=>{let{connectionKey:t}=e,[a,n]=(0,y.useState)([]),[i,r]=(0,y.useState)(!1),[o,d]=(0,y.useState)(null),[c,u]=(0,y.useState)(null),[_,m]=(0,y.useState)(null),{isOpen:p,onOpen:h,onClose:x}=(0,s.qY0)(),{data:g,isLoading:f,error:v,refetch:b}=eB({connectionKey:t},{skip:!t}),[F]=eK(),j=e6(t,F,b);(0,y.useEffect)(()=>{(null==g?void 0:g.dependency_conditions)&&g.dependency_conditions.length>0?n(g.dependency_conditions[0].conditions.filter(e=>"field_address"in e&&"operator"in e)):n([])},[g]);let S=(0,y.useCallback)(()=>{d(null),u(null),r(!0)},[]),C=(0,y.useCallback)((e,t)=>{d(t),u(e),r(!0)},[]),k=(0,y.useCallback)(()=>{r(!1),d(null),u(null)},[]),T=(0,y.useCallback)(async e=>{let t=[];n(t=null!==c?a.map((t,a)=>a===c?e:t):[...a,e]);try{await j(t),s.Pg3.success(null!==c?"Condition updated successfully!":"Condition added successfully!")}catch(e){throw n(a),e}},[c,a,j]),E=(0,y.useCallback)((e,t)=>{m({index:e,condition:t}),h()},[h]),N=(0,y.useCallback)(async()=>{if(_){let e=a.filter((e,t)=>t!==_.index);n(e);try{await j(e),s.Pg3.success("Condition deleted successfully!")}catch(e){s.Pg3.error("Failed to delete condition. Please try again."),n(a)}m(null)}x()},[_,a,j,x]);return f?(0,l.jsx)("div",{className:"py-4",children:(0,l.jsx)(e8,{className:"text-gray-500",children:"Loading conditions..."})}):v?(0,l.jsx)("div",{className:"py-4",children:(0,l.jsx)(e8,{className:"text-red-500",children:"Failed to load conditions. Please refresh the page and try again."})}):(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(s.AntTypography.Title,{level:5,children:"Conditional task creation"}),(0,l.jsx)(e4,{className:"mt-2 w-2/3 text-gray-600",children:"Configure conditions that must be met before a task is created. If no conditions are set, manual tasks will be created for every incoming privacy request of the corresponding type (access or erasure)."}),(0,l.jsx)(e4,{className:"mt-2 text-gray-600",children:(0,l.jsx)(e8,{strong:!0,children:"All conditions must be met for the task to be created."})})]}),(0,l.jsx)("div",{className:"mb-4 flex items-center justify-end gap-2",children:(0,l.jsx)(s.wpx,{type:"primary",onClick:S,"data-testid":"add-condition-btn",children:"Add condition"})}),(0,l.jsx)(s.krs,{dataSource:a,"data-testid":"conditions-list",locale:{emptyText:(0,l.jsx)("div",{className:"py-8 text-center",children:(0,l.jsx)(e8,{type:"secondary",children:"No conditions configured. Manual tasks will be created for all privacy requests."})})},renderItem:(e,t)=>(0,l.jsx)(s.krs.Item,{actions:[(0,l.jsx)(s.wpx,{type:"link",onClick:()=>C(t,e),"data-testid":"edit-condition-".concat(t,"-btn"),className:"px-1",children:"Edit"},"edit"),(0,l.jsx)(s.wpx,{type:"link",onClick:()=>E(t,e),"data-testid":"delete-condition-".concat(t,"-btn"),className:"px-1",children:"Delete"},"delete")],children:(0,l.jsx)(s.krs.Item.Meta,{title:(0,l.jsxs)(s.jqI,{gap:8,align:"center",className:"font-normal",children:[(0,l.jsx)("div",{className:"max-w-[300px]",children:(0,l.jsx)(s.esZ,{title:e.field_address,children:(0,l.jsx)(e8,{children:e.field_address.split(":").pop()})})}),(0,l.jsx)(s.j8w,{color:"sandstone",children:e3[e.operator]}),(0,l.jsx)("div",{className:"max-w-[300px]",children:null!==e.value&&void 0!==e.value&&(0,l.jsx)(e8,{ellipsis:{tooltip:String(e.value)},children:String(e.value)})})]})})},t),className:"mb-4"}),(0,l.jsx)(e1,{isOpen:i,onClose:k,onConditionSaved:T,editingCondition:o}),(0,l.jsx)(eF.Z,{isOpen:p,onClose:()=>{m(null),x()},onConfirm:N,title:"Delete condition","data-testid":"delete-condition-modal",message:(0,l.jsxs)(e8,{className:"text-gray-500",children:["Are you sure you want to delete the condition for “",null==_?void 0:_.condition.field_address,"”? This action cannot be undone."]}),continueButtonText:"Delete",isCentered:!0,icon:(0,l.jsx)(s.aNP,{})})]})},e9=e=>{let{selectedUsers:t,userOptions:a,onUserAssignmentChange:n}=e,i=(0,y.useMemo)(()=>[...a.filter(e=>t.includes(e.value)),...a.filter(e=>!t.includes(e.value))],[a,t]);return(0,l.jsx)("div",{children:(0,l.jsxs)(s.jqI,{align:"center",gap:"middle",children:[(0,l.jsx)(s.AntTypography.Text,{strong:!0,children:"Assign manual tasks to users:"}),(0,l.jsx)(s.WPr,{className:"flex-1",placeholder:"Select users to assign manual tasks to","aria-label":"Select users to assign manual tasks to",mode:"multiple",maxTagCount:"responsive",value:t,onChange:n,options:i,optionLabelProp:"displayName",tokenSeparators:[","],"data-testid":"assign-users-select",filterOption:(e,t)=>"string"==typeof(null==t?void 0:t.label)&&t.label.toLowerCase().includes(e.toLowerCase())||!1})]})})};let{useGetManualFieldsQuery:te,useGetManualFieldQuery:tt,useCreateManualFieldMutation:ta,useUpdateManualFieldMutation:tn,useDeleteManualFieldMutation:ti}=eO.u.injectEndpoints({endpoints:e=>({getManualFields:e.query({query:e=>{let{connectionKey:t,requestType:a}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-fields")+(a?"?request_type=".concat(a):""),method:"GET"}},providesTags:()=>["Manual Fields"]}),getManualField:e.query({query:e=>{let{connectionKey:t,manualFieldId:a}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-field/").concat(a),method:"GET"}},providesTags:e=>[{type:"Manual Fields",id:null==e?void 0:e.id}]}),createManualField:e.mutation({query:e=>{let{connectionKey:t,body:a}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-field"),method:"POST",body:a}},invalidatesTags:()=>["Manual Fields"]}),updateManualField:e.mutation({query:e=>{let{connectionKey:t,manualFieldId:a,body:n}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-field/").concat(a),method:"PUT",body:n}},invalidatesTags:()=>["Manual Fields"]}),deleteManualField:e.mutation({query:e=>{let{connectionKey:t,manualFieldId:a}=e;return{url:"".concat(eR.Iy,"/").concat(t,"/manual-field/").concat(a),method:"DELETE"}},invalidatesTags:()=>["Manual Fields"]})})});var tl=a(3124),ts=a.n(tl);let tr=e=>{let{text:t}=e;return(0,l.jsx)(s.esZ,{title:t,children:(0,l.jsx)(s.PJP.daM,{style:{color:ts().FIDESUI_NEUTRAL_500,marginLeft:4,cursor:"help"}})})};var to=e=>{let{isSubmitting:t,onSaveClick:a,onCancel:n,editingTask:i}=e,[r]=s.PPS.useForm(),o=!!i,d=[{label:e5[ee.k6.ACCESS],value:ee.k6.ACCESS},{label:e5[ee.k6.ERASURE],value:ee.k6.ERASURE}],c=s.PPS.useWatch("requestType",r),u=c===ee.k6.ACCESS?[{label:e2[ee.PF.TEXT],value:ee.PF.TEXT},{label:e2[ee.PF.ATTACHMENT],value:ee.PF.ATTACHMENT}]:c===ee.k6.ERASURE?[{label:e2[ee.PF.CHECKBOX],value:ee.PF.CHECKBOX}]:[],_=!c||c===ee.k6.ERASURE;(0,y.useEffect)(()=>{if(o&&i){var e;r.setFieldsValue({key:(null===(e=i.originalField)||void 0===e?void 0:e.key)||"",name:i.name,description:i.description,fieldType:i.fieldType,requestType:i.requestType})}else r.resetFields()},[r,o,i]);let m=async e=>{a(e)};return(0,l.jsxs)(s.PPS,{form:r,layout:"vertical",onFinish:m,onValuesChange:e=>{void 0!==e.requestType&&(e.requestType===ee.k6.ERASURE?r.setFieldsValue({fieldType:ee.PF.CHECKBOX}):e.requestType===ee.k6.ACCESS?r.getFieldValue("fieldType")===ee.PF.CHECKBOX&&r.setFieldsValue({fieldType:void 0}):(null===e.requestType||""===e.requestType)&&r.setFieldsValue({fieldType:void 0}))},disabled:t,children:[(0,l.jsx)(s.PPS.Item,{label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Task name",(0,l.jsx)(tr,{text:"A clear, descriptive name for this manual task. Example: Export user profile data"})]}),name:"name",rules:[{required:!0,message:"Please enter a task name"},{max:100,message:"Task name must be less than 100 characters"}],children:(0,l.jsx)(s.AntInput,{placeholder:"Enter task name","data-testid":"input-name"})}),(0,l.jsx)(s.PPS.Item,{label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Description",(0,l.jsx)(tr,{text:"Detailed instructions for completing this task. Example: Download and attach user's profile data from the customer portal"})]}),name:"description",rules:[{required:!0,message:"Please enter a description"},{max:200,message:"Description must be less than 200 characters"}],children:(0,l.jsx)(s.AntInput,{placeholder:"Enter task description","data-testid":"input-description"})}),!o&&(0,l.jsx)(s.PPS.Item,{label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Key",(0,l.jsx)(tr,{text:"Recommended: Unique identifier for this task that will appear in the DSR package sent to the data subject. If left empty, will be auto-generated from the task name. Example: user_data_export"})]}),name:"key",rules:[{max:50,message:"Key must be less than 50 characters"},{pattern:/^[a-z0-9_]*$/,message:"Key can only contain lowercase letters, numbers, and underscores"}],children:(0,l.jsx)(s.AntInput,{placeholder:"Recommended to specify (auto-generated if empty)","data-testid":"input-key"})}),o&&(0,l.jsx)(s.PPS.Item,{label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Key",(0,l.jsx)(tr,{text:"Unique identifier for this task that appears in the DSR package sent to the data subject."})]}),name:"key",children:(0,l.jsx)(s.AntInput,{disabled:!0,"data-testid":"input-key-disabled"})}),(0,l.jsx)(s.PPS.Item,{label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Request type",(0,l.jsx)(tr,{text:"Whether this task applies to access requests (providing data) or erasure requests (confirming deletion)"})]}),name:"requestType",rules:[{required:!0,message:"Please select a request type"}],children:(0,l.jsx)(s.WPr,{placeholder:"Select request type","aria-label":"Select request type",options:d,"data-testid":"select-request-type"})}),(0,l.jsx)(s.PPS.Item,{label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:["Field type",(0,l.jsx)(tr,{text:"Type of input required: Text (for written responses), Attachment (for file uploads), or Checkbox (for confirmation)"})]}),name:"fieldType",rules:[{required:!0,message:"Please select a field type"}],children:(0,l.jsx)(s.WPr,{placeholder:"Select field type","aria-label":"Select field type",options:u,disabled:_,"data-testid":"select-field-type"})}),(0,l.jsxs)(s.kCb,{justify:"flex-end",gap:2,children:[(0,l.jsx)(s.wpx,{onClick:n,disabled:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(s.wpx,{type:"primary",htmlType:"submit",loading:t,"data-testid":"save-btn",children:o?"Update task":"Add task"})]})]})},td=e=>{let{isOpen:t,onClose:a,integration:n,onTaskAdded:i,editingTask:r}=e,{successAlert:o}=(0,v.VY)(),{handleError:d}=(0,v.HK)(),[c,u]=(0,y.useState)(!1),[_]=ta(),[m]=tn(),p=!!r,h=async e=>{try{if(u(!0),p&&r){let t={label:e.name,help_text:e.description,field_type:e.fieldType,request_type:e.requestType};await m({connectionKey:n.key,manualFieldId:r.id,body:t}).unwrap(),o("Manual task updated successfully!")}else{let t={key:e.key||void 0,label:e.name,help_text:e.description,field_type:e.fieldType,request_type:e.requestType};await _({connectionKey:n.key,body:t}).unwrap(),o("Manual task added successfully!")}i(),a()}catch(e){d(e)}finally{u(!1)}};return(0,l.jsxs)(s.u_l,{isCentered:!0,isOpen:t,size:"lg",onClose:a,children:[(0,l.jsx)(s.ZAr,{}),(0,l.jsxs)(s.hzk,{minWidth:"775px","data-testid":"add-manual-task-modal",children:[(0,l.jsx)(s.xBx,{children:p?"Edit manual task":"Add manual task"}),(0,l.jsx)(s.olH,{}),(0,l.jsx)(s.fef,{pb:6,children:(0,l.jsxs)(s.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(s.xuv,{color:"gray.700",fontSize:"14px",children:p?"Update the manual task configuration for this integration.":"Configure a new manual task for this integration. Define the task name, description, and any specific parameters needed for execution."}),(0,l.jsx)(to,{isSubmitting:c,onSaveClick:h,onCancel:()=>{a()},editingTask:r})]})})]})]})};let tc=e=>{let{integration:t}=e,[a,n]=(0,y.useState)([]),{data:i,refetch:l}=te({connectionKey:t?t.key:""},{skip:!t}),[r]=ti();return(0,y.useEffect)(()=>{i&&n(i.map(e=>({id:e.id,name:e.label,description:e.help_text,fieldType:e.field_type,requestType:e.request_type,originalField:e})))},[i]),{manualTasks:a,deleteManualTask:(0,y.useCallback)(async e=>{try{await r({connectionKey:t.key,manualFieldId:e.id}).unwrap(),l()}catch(e){s.Pg3.error("Failed to delete manual task. Please try again.")}},[r,t.key,l]),refreshManualTasks:(0,y.useCallback)(()=>{l()},[l]),isLoading:!i}};var tu=e=>{let{integration:t}=e,{manualTasks:a,deleteManualTask:n,refreshManualTasks:i}=tc({integration:t}),[r,o]=(0,y.useState)(null),[d,c]=(0,y.useState)(null),[u,_]=(0,y.useState)(!1),[m,p]=(0,y.useState)(!1),h=(0,y.useCallback)(async()=>{d&&await n(d),c(null),p(!1)},[d,n]),x=e=>{o(e),_(!0)},g=e=>{c(e),p(!0)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.jqI,{align:"center",justify:"end",gap:"small",className:"mt-[-25px]",children:(0,l.jsx)(s.wpx,{type:"primary",onClick:()=>{o(null),_(!0)},"data-testid":"add-manual-task-list-btn",children:"Create manual task"})}),(0,l.jsx)(s.krs,{itemLayout:"horizontal",dataSource:a,locale:{emptyText:(0,l.jsx)("div",{className:"px-4 py-2 text-center",children:(0,l.jsxs)(s.AntTypography.Paragraph,{type:"secondary",children:["No manual tasks configured yet. ",(0,l.jsx)("br",{}),'Click "Create manual task" to get started.']})})},renderItem:e=>{let t=e5[e.requestType]||e.requestType;return(0,l.jsx)(s.krs.Item,{actions:[(0,l.jsx)(s.wpx,{type:"link",onClick:()=>x(e),"data-testid":"edit-list-btn",className:"px-1",children:"Edit"},"edit"),(0,l.jsx)(s.wpx,{type:"link",onClick:()=>g(e),"data-testid":"delete-list-btn",className:"px-1",children:"Delete"},"delete")],children:(0,l.jsx)(s.krs.Item.Meta,{title:"".concat(e.name," (").concat(t,")"),description:e.description})},e.id)}}),(0,l.jsx)(td,{isOpen:u,onClose:()=>{o(null),_(!1)},integration:t,onTaskAdded:i,editingTask:r}),(0,l.jsx)(eF.Z,{isOpen:m,onClose:()=>{c(null),p(!1)},onConfirm:h,title:"Delete manual task",message:(0,l.jsxs)("span",{className:"text-gray-500",children:['Are you sure you want to delete the manual task "',null==d?void 0:d.name,'"? This action cannot be undone.']}),continueButtonText:"Delete",isCentered:!0,icon:(0,l.jsx)(s.aNP,{})})]})},t_=a(79894),tm=a.n(t_);let{useCreateExternalUserMutation:tp}=eO.u.injectEndpoints({endpoints:e=>({createExternalUser:e.mutation({query:e=>({url:"plus/external-user",method:"POST",body:e}),invalidatesTags:["User"]})})}),{Paragraph:th}=s.AntTypography;var ty=e=>{let{isOpen:t,onClose:a,onUserCreated:n}=e,[i]=s.PPS.useForm(),[r,o]=(0,y.useState)(!1),[c]=tp(),u=(0,s.pmc)(),_=e=>e.split("@")[0].replace(/[^a-zA-Z0-9_]/g,"_"),m=async e=>{o(!0);try{let t=_(e.email_address),a=await c({username:t,email_address:e.email_address,first_name:e.first_name,last_name:e.last_name});if((0,f.D4)(a)){u((0,F.Vo)((0,f.e$)(a.error)));return}u((0,F.t5)("External respondent user created successfully. The user will receive a welcome email with access instructions.")),i.resetFields(),n()}catch(e){u((0,F.Vo)("Failed to create external user. Please try again."))}finally{o(!1)}},p=()=>{i.resetFields(),a()};return(0,l.jsxs)(s.$zI,{title:"Create external respondent user",open:t,onCancel:p,footer:null,width:500,"data-testid":"create-external-user-modal",children:[(0,l.jsxs)("div",{style:{marginBottom:16},children:[(0,l.jsx)(th,{type:"secondary",children:"Create an external respondent user who can be assigned manual DSR tasks. These users access a secure external task portal to complete assigned tasks without logging into the Fides admin interface."}),(0,l.jsxs)(th,{type:"secondary",children:["If you need to create an internal user that can log in to the Fides admin interface, please use the"," ",(0,l.jsx)(tm(),{href:d.e3,children:"Users page"})," instead."]})]}),(0,l.jsxs)(s.PPS,{form:i,layout:"vertical",onFinish:m,requiredMark:!1,children:[(0,l.jsx)(s.PPS.Item,{name:"email_address",label:"Email Address",rules:[{required:!0,message:"Email address is required"},{type:"email",message:"Please enter a valid email address"}],children:(0,l.jsx)(s.AntInput,{placeholder:"user@example.com","data-testid":"input-email_address"})}),(0,l.jsx)(s.PPS.Item,{name:"first_name",label:"First Name",rules:[{required:!0,message:"First name is required"}],children:(0,l.jsx)(s.AntInput,{"data-testid":"input-first_name"})}),(0,l.jsx)(s.PPS.Item,{name:"last_name",label:"Last Name",rules:[{required:!0,message:"Last name is required"}],children:(0,l.jsx)(s.AntInput,{"data-testid":"input-last_name"})}),(0,l.jsx)(s.PPS.Item,{style:{marginBottom:0,marginTop:24},children:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[(0,l.jsx)(s.wpx,{onClick:p,disabled:r,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(s.wpx,{type:"primary",htmlType:"submit",loading:r,"data-testid":"save-btn",children:"Create User"})]})})]})]})},tx=a(65497);let tg=e=>{var t;let{integration:a}=e,[n,i]=(0,y.useState)([]),[l,r]=(0,y.useState)(!1),{isOpen:o,onOpen:d,onClose:c}=(0,s.qY0)(),{data:u}=eB({connectionKey:a?a.key:""},{skip:!a}),{data:_,refetch:m}=(0,tx.wv)({page:1,size:100,username:""}),[p]=eV(),h=(null!==(t=null==_?void 0:_.items)&&void 0!==t?t:[]).map(e=>{let t=e.first_name&&e.last_name?"".concat(e.first_name||""," ").concat(e.last_name||""):null,a=t||e.email_address||e.username||"Unknown User";return{label:"".concat(t," (").concat(e.email_address||e.username,")").trim(),value:e.id,displayName:a}});(0,y.useEffect)(()=>{(null==u?void 0:u.assigned_users)&&i(u.assigned_users.map(e=>e.id).filter(e=>null!=e))},[u]);let x=(0,y.useCallback)(async e=>{r(!0);try{await p({connectionKey:a.key,userIds:null!=e?e:n}).unwrap(),s.Pg3.success("Assigned users have been updated")}catch(e){s.Pg3.error("Failed to assign users to manual task. Please try again.")}finally{r(!1)}},[p,a.key,n]);return{selectedUsers:n,userOptions:h,isSavingUsers:l,handleUserAssignmentChange:(0,y.useCallback)(e=>{i(e),x(e)},[x]),handleUserCreated:(0,y.useCallback)(()=>{m()},[m]),isCreateUserOpen:o,onCreateUserOpen:d,onCreateUserClose:c}};var tf=e=>{let{integration:t}=e,{selectedUsers:a,userOptions:n,handleUserAssignmentChange:i,handleUserCreated:r,isCreateUserOpen:o,onCreateUserOpen:d,onCreateUserClose:c}=tg({integration:t});return(0,l.jsx)("div",{children:(0,l.jsxs)(s.jqI,{vertical:!0,gap:"middle",children:[(0,l.jsx)(s.AntTypography.Paragraph,{className:"mt-2 w-2/3",children:"Configure manual tasks for this integration. Manual tasks allow you to define custom data collection or processing steps that require human intervention."}),(0,l.jsx)(tu,{integration:t}),(0,l.jsx)(s.htM,{className:"my-2"}),(0,l.jsx)(e9,{selectedUsers:a,userOptions:n,onUserAssignmentChange:i}),(0,l.jsx)(s.jqI,{justify:"start",children:(0,l.jsx)(s.wpx,{type:"default",onClick:d,"data-testid":"manage-secure-access-btn",children:"Create external user"})}),(0,l.jsx)(ty,{isOpen:o,onClose:c,onUserCreated:()=>{r(),c()}})]})})},tv=a(21365),tb=a(64176),tF=e=>{var t;let{isOpen:a,onClose:n,connection:i,description:r}=e,[o,d]=(0,y.useState)(null),c=(0,tb.Z)(i.connection_type,null==i?void 0:null===(t=i.saas_config)||void 0===t?void 0:t.type),u=(0,l.jsxs)("div",{className:"flex w-full justify-between",children:[(0,l.jsx)(s.wpx,{onClick:n,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(s.wpx,{type:"primary",onClick:()=>{o&&o.submitForm&&o.submitForm()},disabled:!o||!o.isValid||!o.dirty,loading:null==o?void 0:o.loading,"data-testid":"save-btn",children:"Save"})]});return(0,l.jsx)(b.Z,{title:"Manage ".concat(null==i?void 0:i.name," integration"),isOpen:a,onClose:n,footer:u,children:(0,l.jsx)(tv.Z,{connection:i,connectionOption:c,onClose:n,description:r,onFormStateChange:d})})},tj=a(41553);let tS=e=>{let{connection:t,enabledFeatures:a,integrationOption:n,testData:i,needsAuthorization:r,handleAuthorize:o,testConnection:d,testIsLoading:c,description:u,overview:_,instructions:m,supportsConnectionTest:p}=e,{onOpen:h,isOpen:x,onClose:g}=(0,s.qY0)();return(0,y.useMemo)(()=>{if(!a||!a.length)return[];let e=[];return(null==a?void 0:a.includes(ee.qb.WITHOUT_CONNECTION))?e.push({label:"Details",key:"details",children:(0,l.jsxs)(s.xuv,{children:[(0,l.jsx)(s.kCb,{children:(0,l.jsx)(s.wpx,{onClick:h,"data-testid":"manage-btn",children:"Edit integration"})}),(0,l.jsx)(tF,{isOpen:x,onClose:g,connection:t,description:u}),_,m]})}):e.push({label:"Connection",key:"connection",children:(0,l.jsxs)(s.xuv,{children:[p&&(0,l.jsxs)(s.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,l.jsx)(s.kCb,{flexDirection:"column",children:(0,l.jsx)(tj.Z,{testData:i,connectionOption:n})}),(0,l.jsx)(s.LZC,{}),(0,l.jsxs)("div",{className:"flex gap-4",children:[r&&(0,l.jsx)(s.wpx,{onClick:o,"data-testid":"authorize-integration-btn",children:"Authorize integration"}),!r&&(0,l.jsx)(s.wpx,{onClick:d,loading:c,"data-testid":"test-connection-btn",children:"Test connection"}),(0,l.jsx)(s.wpx,{onClick:h,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,l.jsx)(tF,{isOpen:x,onClose:g,connection:t,description:u}),_,m]})}),(null==a?void 0:a.includes(ee.qb.DATA_SYNC))&&e.push({label:"Data sync",key:"data-sync",children:(0,l.jsx)(eL,{integration:t})}),(null==a?void 0:a.includes(ee.qb.DATA_DISCOVERY))&&e.push({label:"Data discovery",key:"data-discovery",children:(0,l.jsx)(eP,{integration:t,integrationOption:n})}),(null==a?void 0:a.includes(ee.qb.TASKS))&&e.push({label:"Manual tasks",key:"manual-tasks",children:(0,l.jsx)(tf,{integration:t})}),(null==a?void 0:a.includes(ee.qb.CONDITIONS))&&e.push({label:"Conditions",key:"conditions",children:(0,l.jsx)(e7,{connectionKey:t.key})}),e},[t,a,n,i,r,o,d,c,h,x,g,u,_,m,p])};var tC=a(93633),tk=a(75595);let tT=e=>{let{connection:t,connectionOption:a}=e,{data:n}=te({connectionKey:t?t.key:""},{skip:!t});if((null==a?void 0:a.identifier)!==ee.Rj.MANUAL_TASK)return null;let i=n&&n.length>0;return{title:"Add a manual task",description:i?"Manual tasks have been configured":"Configure a manual task for this integration. ",state:i?"finish":"process"}},tE=e=>{let{connection:t,connectionOption:a}=e,{data:n}=eB({connectionKey:t?t.key:""},{skip:!t});if((null==a?void 0:a.identifier)!==ee.Rj.MANUAL_TASK)return null;let i=!!((null==n?void 0:n.assigned_users)&&n.assigned_users.length>0);return{title:"Assign the tasks to users",description:i?"Tasks have been assigned to users":"Assign the configured manual tasks to one or more users.",state:i?"finish":"process"}},tN=e=>{let{testData:t,connectionOption:a}=e;return(null==a?void 0:a.authorization_required)?{title:"Authorize integration",description:(0,l.jsx)("span",{children:(null==t?void 0:t.authorized)?"Integration authorized successfully":"Authorize access to your integration"}),state:(null==t?void 0:t.authorized)?"finish":"process"}:null},tA=()=>({title:"Create integration",description:"Integration created successfully",state:"finish"});var tw=a(87174);let tI=e=>{var t,a,n,i;let{enabledFeatures:l}=(0,h.ZP)(e.connection.connection_type,null===(t=e.connection.saas_config)||void 0===t?void 0:t.type),s=null==l?void 0:l.includes(tw.q.DATA_DISCOVERY),{data:r}=(0,j.Fu)({connection_config_key:null===(a=e.testData)||void 0===a?void 0:a.connectionKey,page:1,size:1},{skip:!(null===(n=e.testData)||void 0===n?void 0:n.connectionKey)||!s});if(!s)return null;let o=!!(null==r?void 0:null===(i=r.items)||void 0===i?void 0:i.length);return{title:"Create monitor",description:o?"Data monitor created successfully":"Use the Data discovery tab in this page to add a new monitor",state:o?"finish":"process"}},tq=e=>{let{connection:t}=e,a=!!(null==t?void 0:t.system_key);if((null==t?void 0:t.connection_type)===ee.Rj.WEBSITE)return null;let n=a?d.Dv.replace("[id]",t.system_key):d.So;return{title:"Link system",description:a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tm(),{href:n,passHref:!0,children:(0,l.jsx)(s.FKJ,{children:"System linked"})})," ","successfully"]}):(0,l.jsxs)(l.Fragment,{children:["Link this integration in the"," ",(0,l.jsx)(tm(),{href:n,passHref:!0,children:(0,l.jsx)(s.FKJ,{children:"system inventory"})}),'. Navigate to the appropriate system and within the integration tab select "Link integration".']}),state:a?"finish":"process"}},tM=e=>{let{testData:t,testIsLoading:a,connectionOption:n,connection:i}=e,r=tA(),o=tN({testData:t,testIsLoading:a,connection:i,connectionOption:n}),d=tI({testData:t,testIsLoading:a,connection:i,connectionOption:n}),c=tT({testData:t,testIsLoading:a,connection:i,connectionOption:n}),u=tE({testData:t,testIsLoading:a,connection:i,connectionOption:n}),_=tq({testData:t,testIsLoading:a,connection:i,connectionOption:n}),m=(0,y.useMemo)(()=>[r,o,d,c,u,_].filter(e=>null!==e),[r,o,d,c,u,_]),p=(0,y.useMemo)(()=>m.map(e=>({...e,icon:"finish"===e.state?(0,l.jsx)(s.PJP.WzW,{size:24}):void 0})),[m]);return(0,l.jsx)(s.V4A,{title:"Integration setup","data-testid":"integration-setup-card",children:(0,l.jsx)(s.XX8,{direction:"vertical",current:(()=>{let e=m.findIndex(e=>"finish"!==e.state);return -1===e&&m.length>0?m.length-1:e})(),status:(()=>{let e=m.findIndex(e=>"finish"!==e.state);return -1===e?"finish":m[e].state})(),items:p,size:"small"})})};var tP=()=>{var e,t,a,n;let i=(0,r.useRouter)(),y=i.query.id,{data:x,isLoading:g}=(0,m.jA)(y,{skip:!y}),{data:f}=(0,_.$I)({}),v=(null==f?void 0:f.items)||[],b=(0,tb.Z)(null==x?void 0:x.connection_type,null==x?void 0:null===(e=x.saas_config)||void 0===e?void 0:e.type),{testData:F,testConnection:j,isLoading:S}=(0,p.Z)(x),{handleAuthorize:C,needsAuthorization:k}=(0,tC.z)({connection:x,connectionOption:b,testData:F}),T=(0,h.ZP)(null==x?void 0:x.connection_type,null==x?void 0:null===(t=x.saas_config)||void 0===t?void 0:t.type,v),{overview:E,instructions:N,description:A,enabledFeatures:w}=T;x&&!h.jq.includes(x.connection_type)&&i.push(d.KH);let I=(null==x?void 0:x.connection_type)!==ee.Rj.MANUAL_TASK,q=tS({connection:x,enabledFeatures:w,integrationOption:b,testData:F,needsAuthorization:k,handleAuthorize:C,testConnection:j,testIsLoading:S,description:A,overview:E,instructions:N,supportsConnectionTest:I}),{activeTab:M,onTabChange:P}=(0,u.Z)({tabKeys:q.map(e=>e.key)});return(0,l.jsxs)(o.Z,{title:"Integrations",children:[(0,l.jsx)(c.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:d.KH},{title:null!==(n=null!==(a=null==x?void 0:x.name)&&void 0!==a?a:null==x?void 0:x.key)&&void 0!==n?n:""}]}),(0,l.jsxs)(s.bue,{wrap:!1,gutter:24,children:[(0,l.jsxs)(s.JGx,{flex:"1 1 auto",children:[(0,l.jsx)(tk.Z,{integration:x,integrationTypeInfo:T,showDeleteButton:!0}),g?(0,l.jsx)(s.$jN,{}):!!x&&(0,l.jsx)(s.A5g,{items:q,activeKey:M,onChange:P})]}),(0,l.jsx)(s.JGx,{flex:"0 0 350px",children:g?(0,l.jsx)(s.$jN,{}):!!x&&(0,l.jsx)(tM,{testData:F,testIsLoading:S,connectionOption:b,connection:x})})]})]})}}},function(e){e.O(0,[431,8765,9278,5163,699,3662,1316,7245,8563,3729,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[710],{66726:function(e,t,n){var i=n(11611),a=n(82846),o=n(91936),s=Math.max,r=Math.min;e.exports=function(e,t,n){var l,c,d,u,g,p,m=0,f=!1,h=!1,x=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var n=l,i=c;return l=c=void 0,m=t,u=e.apply(i,n)}function y(e){var n=e-p,i=e-m;return void 0===p||n>=t||n<0||h&&i>=d}function j(){var e,n,i,o=a();if(y(o))return C(o);g=setTimeout(j,(e=o-p,n=o-m,i=t-e,h?r(i,d-n):i))}function C(e){return(g=void 0,x&&l)?v(e):(l=c=void 0,u)}function b(){var e,n=a(),i=y(n);if(l=arguments,c=this,p=n,i){if(void 0===g)return m=e=p,g=setTimeout(j,t),f?v(e):u;if(h)return clearTimeout(g),g=setTimeout(j,t),v(p)}return void 0===g&&(g=setTimeout(j,t)),u}return t=o(t)||0,i(n)&&(f=!!n.leading,d=(h="maxWait"in n)?s(o(n.maxWait)||0,t):d,x="trailing"in n?!!n.trailing:x),b.cancel=function(){void 0!==g&&clearTimeout(g),m=0,l=p=c=g=void 0},b.flush=function(){return void 0===g?u:C(a())},b}},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),a=n(66726),o=n.n(a),s=n(27378),r=n(26917);let l=e=>{let{value:t,onChange:n,placeholder:a,...l}=e,[c,d]=(0,s.useState)(t);(0,s.useEffect)(()=>{d(t||"")},[t]);let u=o()(n,500),g=(0,s.useCallback)(e=>{d(e),u(e)},[]);return(0,i.jsx)(r.Z,{value:c,onChange:g,onClear:()=>{d(""),n("")},placeholder:a,...l})}},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(24246),a=n(87949),o=n(88038),s=n.n(o),r=n(86677);n(27378);var l=n(25980),c=n(90867),d=n(42478),u=n(77830),g=()=>{let e=(0,r.useRouter)();return(0,i.jsx)(a.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)(a.xuv,{children:[(0,i.jsxs)(a.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(a.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(a.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,i.jsxs)(a.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:o=!0,mainProps:u}=e,p=(0,l.hz)(),m=(0,r.useRouter)(),f="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,h=!(p.flags.messagingConfiguration&&f),{data:x}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,c.PW)(void 0,{skip:h}),y=p.flags.messagingConfiguration&&(!x||!v)&&f;return(0,i.jsxs)(a.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(s(),{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)(a.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,i.jsx)(g,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),a=n(87949),o=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:s=!0,children:r,rightContent:l,style:c,...d}=e;return(0,i.jsxs)("div",{...d,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",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(a.lQT,{className:n||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(o.m,{className:r?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),r]})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var i=n(24246),a=n(87949),o=n(79894),s=n.n(o),r=n(27378);let{Text:l}=a.AntTypography,c=e=>{let{items:t,...n}=e,o=(0,r.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let o=n===t.length-1,r={...e},c=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:o?void 0:400},ellipsis:!o,id:o?"breadcrumb-current-page":void 0,children:r.title})),c)?r.title=(0,i.jsx)(a.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,i.jsx)(s(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[t]);return(0,i.jsx)(a.zrq,{items:o,...n})}},42478:function(e,t,n){"use strict";n.d(t,{FU:function(){return c},JE:function(){return a},Ki:function(){return u},SU:function(){return g},W:function(){return p},h9:function(){return o},jc:function(){return i},qt:function(){return l},sn:function(){return d}});let{useGetEmailInviteStatusQuery:i,useGetActiveMessagingProviderQuery:a,useCreateMessagingConfigurationMutation:o,useCreateMessagingConfigurationSecretsMutation:s,useGetMessagingConfigurationDetailsQuery:r,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:c,useUpdateMessagingConfigurationByKeyMutation:d,useUpdateMessagingConfigurationSecretsByKeyMutation:u,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 a=await i({url:"messaging/default/active"});return a.error&&404===a.error.status?{data:null}:a},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 P}});var i,a,o=n(24246),s=n(87949),r=n(86677),l=n(27378),c=n(30952),d=n(25980),u=n(18225),g=n(17245),p=n(77213),m=n(77830),f=n(58754),h=n(16394),x=n(20682),v=n(41337),y=n(14207),j=n(8133),C=n(38187),b=n(21365),w=n(75595),k=e=>{let{integrationType:t,onConfigure:n}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.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:a=!1,onClick:r,onDetailsClick:l,onUnfocus:c}=e,d=(0,g.pI)(n),u=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(()=>{a&&c&&c()});return(0,o.jsxs)(s.xuv,{ref:p,borderWidth:1,borderColor:a?"black":"gray.200",backgroundColor:a?"gray.50":"transparent",boxShadow:a?"md":"none",borderRadius:"lg",overflow:"hidden",padding:"12px",cursor:"pointer",onClick:r,"data-testid":"integration-info-".concat(null==n?void 0:n.key),children:[(0,o.jsx)(s.kCb,{justifyContent:"space-between",alignItems:"flex-start",className:"w-full",children:(0,o.jsxs)(s.kCb,{flexGrow:1,width:"100%",children:[(0,o.jsx)(v.ZP,{data:d,size:40}),(0,o.jsxs)(s.kCb,{direction:"column",flexGrow:1,flexShrink:1,marginLeft:"12px",marginRight:"12px",width:0,children:[(0,o.jsx)(s.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,o.jsx)(s.xvT,{color:"gray.600",fontSize:"xs",mt:1,children:(0,T.qS)(u.category)})]}),l&&(0,o.jsx)(s.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,o.jsxs)(s.Eq9,{marginTop:"12px",spacing:1,children:[u.tags.slice(0,3).map(e=>(0,o.jsx)(s.j8w,{children:e},e)),u.tags.length>3&&(0,o.jsxs)(s.j8w,{color:"corinth",children:["+",u.tags.length-3]})]})]})},A=n(65735),N=n(28946),M=e=>{let{selectedIntegration:t,onSelectIntegration:n,onDetailClick:i}=e,[a,r]=(0,l.useState)(""),[c,g]=(0,l.useState)("ALL"),[p,m]=(0,l.useState)(!1),{flags:{oktaMonitor:f,newIntegrationManagement:h}}=(0,d.Vb)(),{data:v}=(0,x.$I)({}),y=(0,l.useMemo)(()=>(null==v?void 0:v.items)||[],[v]),j=(0,l.useMemo)(()=>{let e=C.FO;h||(e=e.filter(e=>e.placeholder.connection_type!==A.Rj.SAAS));let t=new Set(e.filter(e=>e.placeholder.connection_type===A.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)(A.Rj.SAAS,e.identifier,y)):[]]},[y,h]),b=(0,l.useMemo)(()=>{let e=["ALL",...Object.values(N.k).filter(e=>e!==N.k.IDENTITY_PROVIDER||f)];return h?e:e.filter(e=>"ALL"===e?j.length>0:j.some(t=>t.category===e))},[f,h,j]),w=(0,l.useMemo)(()=>{let e=j;if("ALL"!==c&&(e=e.filter(e=>e.category===c)),a.trim()){let t=a.toLowerCase();e=e.filter(e=>(e.placeholder.name||"").toLowerCase().includes(t))}return(e=e.filter(e=>!!f||"okta"!==e.placeholder.connection_type)).sort((e,t)=>{let n=e.placeholder.name||"",i=t.placeholder.name||"";return n.localeCompare(i)})},[a,c,f,j]),k=b.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,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"mb-4 mt-3 flex items-center justify-between gap-4",children:[(0,o.jsx)(s.AntInput,{placeholder:"Search by name...",value:a,onChange:e=>r(e.target.value),className:"w-64",allowClear:!0}),(0,o.jsx)(s.WPr,{value:c,onChange:e=>{m(!0),g(e),setTimeout(()=>m(!1),100)},options:k,className:"w-48",placeholder:"Select category","aria-label":"Select a category","data-testid":"category-filter-select"})]}),p?(0,o.jsx)(u.Z,{}):(0,o.jsx)("div",{className:"grid grid-cols-3 gap-6",children:w.map(e=>(0,o.jsx)("div",{children:(0,o.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))})]})},I=n(64176);(i=a||(a={})).LIST_VIEW="list-view",i.DETAIL="detail",i.FORM="form";var E=e=>{var t,n,i;let{isOpen:a,onClose:r}=e,[c,d]=(0,l.useState)("list-view"),[u,g]=(0,l.useState)(null),[p,m]=(0,l.useState)(),[f,h]=(0,l.useState)(null),x=(0,I.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:v}=(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=()=>{d("list-view"),g(null),m(void 0),h(null),r()},w=()=>{g("detail"),d("form")},S=p&&"list-view"!==c?"".concat(p.placeholder.name," Integration"):"Add integration",T="list-view"===c?(0,o.jsxs)("div",{className:"flex w-full justify-between",children:[(0,o.jsx)(s.wpx,{onClick:y,children:"Cancel"}),(0,o.jsx)(s.wpx,{type:"primary",onClick:()=>{"list-view"===c&&p&&(g("list-view"),d("form"))},disabled:!p,children:"Next"})]}):"detail"===c?(0,o.jsxs)("div",{className:"flex w-full justify-between",children:[(0,o.jsx)(s.wpx,{onClick:()=>d("list-view"),children:"Back"}),(0,o.jsx)(s.wpx,{onClick:w,type:"primary","data-testid":"configure-modal-btn",children:"Next"})]}):"form"===c?(0,o.jsxs)("div",{className:"flex w-full justify-between",children:[(0,o.jsx)(s.wpx,{onClick:()=>{u&&(d(u),g(null))},children:"Back"}),(0,o.jsx)(s.wpx,{type:"primary",onClick:()=>{f&&f.submitForm&&f.submitForm()},disabled:!f||!f.isValid||!f.dirty,loading:null==f?void 0:f.loading,"data-testid":"save-btn",children:"Save"})]}):null;return(0,o.jsxs)(j.Z,{isOpen:a,onClose:y,title:S,scrollBehavior:"inside",showCloseButton:!0,modalContentProps:{height:"700px",maxWidth:"1010px"},footer:T,children:["list-view"===c&&(0,o.jsx)(M,{selectedIntegration:p,onSelectIntegration:e=>{m(e)},onDetailClick:e=>{d("detail"),m(e)}}),"detail"===c&&(0,o.jsx)(k,{integrationType:p,onConfigure:w}),"form"===c&&(0,o.jsx)(b.Z,{connectionOption:x,onClose:y,description:v,onFormStateChange:h})]})},q=n(40774);let L=e=>{let{integration:t}=e,n=(0,g.pI)(t);return(0,o.jsx)(v.ZP,{data:n,size:20})};var P=()=>{let[e,t]=(0,l.useState)(1),[n,i]=(0,l.useState)(50),[a,g]=(0,l.useState)(""),v=(0,r.useRouter)(),{flags:{newIntegrationManagement:j}}=(0,d.Vb)(),b=(0,l.useCallback)(a=>{(null==a?void 0:a.current)!==e&&t(a.current),(null==a?void 0:a.pageSize)&&a.pageSize!==n&&i(a.pageSize)},[e,n]),{data:w}=(0,x.$I)({}),k=(0,l.useMemo)(()=>(null==w?void 0:w.items)||[],[w]),S=(0,l.useMemo)(()=>j?C.jq:C.jq.filter(e=>e!==A.Rj.SAAS),[j]),{data:T,isLoading:_}=(0,y.AZ)({connection_type:S,size:n,page:e,search:a.trim()||void 0}),{items:N}=null!=T?T:{},{onOpen:M,isOpen:I,onClose:P}=(0,s.qY0)(),Z=(0,l.useMemo)(()=>{var e;return null!==(e=null==N?void 0:N.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:[]},[N,k]),R=e=>{v.push("".concat(m.KH,"/").concat(e.key))},z=[{title:"Name",dataIndex:"name",key:"name",width:250,render:(e,t)=>(0,o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,o.jsx)(L,{integration:t}),(0,o.jsx)(s.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,o.jsx)("div",{className:"flex flex-wrap gap-1",children:e.map(e=>(0,o.jsx)(s.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:s.tAb.DEFAULT}:!0===t.last_test_succeeded?{status:"Healthy",color:s.tAb.SUCCESS}:!1===t.last_test_succeeded?{status:"Failed",color:s.tAb.ERROR}:{status:"Untested",color:s.tAb.DEFAULT},a=t.last_test_timestamp?"Last connection: ".concat((0,h.p6)(t.last_test_timestamp)):"The connection has not been tested";return(0,o.jsx)(s.esZ,{title:a,children:(0,o.jsx)(s.j8w,{color:i,children:n})})}},{title:"Actions",key:"actions",width:100,render:(e,t)=>(0,o.jsx)(s.wpx,{onClick:()=>R(t),"data-testid":"manage-btn-".concat(t.key),size:"small",children:"Manage"})}],F={current:e,pageSize:n,total:Z.length,showQuickJumper:!1,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," integrations"),pageSizeOptions:["10","25","50","100"]},O={emptyText:a.trim()?"No integrations match your search":(0,o.jsx)("div",{"data-testid":"empty-state",children:'You have not configured any integrations. Click "Add Integration" to connect and configure systems now.'})};return(0,o.jsxs)(p.Z,{title:"Integrations",children:[(0,o.jsx)(f.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations"}],rightContent:(0,o.jsx)(s.wpx,{onClick:M,"data-testid":"add-integration-btn",type:"primary",children:"Add integration"})}),(0,o.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-4",children:[(0,o.jsx)(c.f,{placeholder:"Search by name...",value:a,onChange:e=>{g(e),t(1)},className:"max-w-sm"}),(0,o.jsx)(q.Z,{})]}),_?(0,o.jsx)(u.Z,{}):(0,o.jsx)(s.V5H,{columns:z,dataSource:Z,rowKey:"key",pagination:F,loading:_,size:"small",locale:O,bordered:!0,onRow:e=>({onClick:()=>R(e),"data-testid":"integration-info-".concat(e.key)}),rowClassName:"cursor-pointer",onChange:b,"data-testid":"integrations-table"}),(0,o.jsx)(E,{isOpen:I,onClose:P})]})}}},function(e){e.O(0,[431,8765,9278,5163,699,3662,1316,7245,3729,2888,9774,179],function(){return e(e.s=9387)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1537],{30890:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications/providers",function(){return s(66605)}])},129:function(e,t,s){"use strict";var i=s(24246),n=s(87949),l=s(86677),a=s(16134),r=s(25980),o=s(77830),c=s(65735),d=s(31793);t.Z=()=>{let e=(0,l.useRouter)(),t=e.pathname,{plus:s}=(0,r.hz)(),u="providers";t.startsWith(o.AD)?u="providers":t.startsWith(o.Wi)?u="templates":t.startsWith(o.DN)&&(u="digests");let g=[{key:"templates",label:"Templates",requiresPlus:!0,scopes:[c.Sh.MESSAGING_TEMPLATE_UPDATE],path:o.Wi},{key:"digests",label:"Digests",requiresPlus:!0,scopes:[c.Sh.DIGEST_CONFIG_READ],path:o.DN},{key:"providers",label:"Providers",requiresPlus:!1,scopes:[c.Sh.MESSAGING_CREATE_OR_UPDATE],path:o.AD}];s||(g=g.filter(e=>!e.requiresPlus));let h=(0,a.C)(d.uu);g=g.filter(e=>e.scopes.some(e=>h.includes(e)));let p=t=>{let s=g.find(e=>e.key===t);s&&e.push(s.path)},m=g.map(e=>({label:e.label,key:e.key}));return(0,i.jsx)("div",{className:"mb-6",children:(0,i.jsx)(n.Niu,{mode:"horizontal",selectedKeys:[u],onClick:e=>{let{key:t}=e;return p(t)},items:m})})}},19904:function(e,t,s){"use strict";s.d(t,{Tg:function(){return a}});var i=s(24246),n=s(16134),l=s(31793);let a=e=>(0,n.C)(l.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:s}=e;return a(t)?(0,i.jsx)(i.Fragment,{children:s}):null}},17828:function(e,t,s){"use strict";var i=s(24246);s(27378),t.Z=()=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 74.375 85",width:"20",height:"20",fill:"#fff",fillRule:"evenodd",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("use",{xlinkHref:"#A",x:"2.188",y:"2.5"}),(0,i.jsx)("symbol",{id:"A",overflow:"visible",children:(0,i.jsxs)("g",{stroke:"none",children:[(0,i.jsx)("path",{d:"M16.558 12.75L0 38.591l16.558 25.841 13.227-3.324.654-44.869-13.881-3.489z",fill:"#876929"}),(0,i.jsx)("path",{d:"M35.049 59.786l-18.491 4.645V12.75l18.491 4.645v42.391z",fill:"#d9a741"}),(0,i.jsxs)("g",{fill:"#876929",children:[(0,i.jsx)("path",{d:"M32.849 21.614L35.05 80 70 62.867l-.01-43.615-8.914 1.448-28.228.913z"}),(0,i.jsx)("path",{d:"M46.184 33.149l10.906-.632 10.778-19.164L40.612 0 30.439 4.364l15.745 28.785z"})]}),(0,i.jsx)("path",{d:"M40.612 0l27.256 13.353-10.778 19.164L40.612 0z",fill:"#d9a741"}),(0,i.jsx)("path",{d:"M35.049 5.539L57.09 44.742l3.788 22.595L35.049 80l-10.46-5.131V9.64l10.45-4.101h.01z",fill:"#876929"}),(0,i.jsx)("path",{d:"M69.991 19.251L70 62.867 35.05 80V5.539l22.041 39.203 12.899-25.491z",fill:"#d9a741"})]})})]})},44907:function(e,t,s){"use strict";var i=s(24246);s(27378),t.Z=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",preserveAspectRatio:"xMidYMid",viewBox:"-0.5 0 257 257",children:(0,i.jsx)("path",{fill:"#C02428",d:"M128.418 80.526c-26.51 0-48.884 21.475-48.884 48.728a48.197 48.197 0 0014.187 34.579 48.532 48.532 0 0034.697 14.14c26.511 0 48.875-21.476 48.875-48.719 0-27.253-22.364-48.728-48.875-48.728zm-76.22 47.895c0-41.285 33.968-75.138 75.395-75.138 41.417 0 75.385 33.853 75.385 75.138 0 2.478 0 5.788-.825 8.266-.835 7.422 4.972 13.2 12.43 13.2 12.43 0 14.08-15.678 14.08-21.466 0-55.328-45.573-100.746-101.07-100.746-55.518 0-101.07 45.418-101.07 100.746 0 55.339 45.552 100.747 101.07 100.747 29.822 0 56.333-12.388 74.56-33.03l20.703 17.342c-22.364 26.43-57.158 42.952-94.448 42.952-34.097.105-66.827-13.35-90.932-37.384C13.37 195.016-.118 162.392 0 128.411 0 58.228 57.159.432 128.418.432 198.832.432 256 58.238 256 128.432c0 28.075-13.256 51.205-40.591 51.205-11.605 0-19.053-5.787-23.2-11.565-13.255 21.476-37.29 35.508-64.626 35.508-20.017.068-39.234-7.827-53.388-21.933a74.755 74.755 0 01-22.008-53.205l.01-.02zm76.21-22.297c12.43 0 22.374 9.91 22.374 22.297 0 12.388-9.944 22.298-22.364 22.298a22.322 22.322 0 01-15.848-6.504 22.169 22.169 0 01-6.526-15.794c0-12.387 9.944-22.297 22.374-22.297h-.01z"})})},5144:function(e,t,s){"use strict";var i=s(24246);t.Z=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",children:(0,i.jsx)("path",{fill:"#F12E45",d:"M128 0c70.656 0 128 57.344 128 128s-57.344 128-128 128S0 198.656 0 128 57.344 0 128 0zm0 33.792c-52.224 0-94.208 41.984-94.208 94.208S75.776 222.208 128 222.208s94.208-41.984 94.208-94.208S180.224 33.792 128 33.792zm31.744 99.328c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm-63.488 0c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm63.488-63.488c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm-63.488 0c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624z"})})},66605:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var i,n,l=s(24246),a=s(77213),r=s(129),o=s(58754),c=s(19904),d=s(87949),u=s(86677),g=s(77830),h=s(47935),p=s(812),m=s(17245),x=s(27378),f=s(8125),v=s(7426),j=s(65735),w=s(17828),_=s(44907),y=s(5144),b=s(42478),k=s(51980),S=s(16394),E=e=>{let{messagingConfig:t}=e,{last_test_succeeded:s,last_test_timestamp:i}=t;if(!i)return(0,l.jsx)(d.j8w,{children:"Verify configuration"});let n=new Date(i),a=(0,S.p6)(n),r=(0,k.B)(n,new Date,{addSuffix:!0});return(0,l.jsx)(d.esZ,{title:"Last verified: ".concat(a),children:(0,l.jsxs)(d.j8w,{color:s?"success":"error","data-testid":s?"test-success":"test-error",children:[s?"Succeeded":"Failed"," ",r]})})};(i=n||(n={})).NAME="name",i.VERIFICATION_STATUS="verification_status",i.ENABLED="enabled",i.ACTIONS="actions";let P=()=>{let e=(0,u.useRouter)(),{handleError:t}=(0,m.HK)(),[s,i]=(0,x.useState)(null),[a]=(0,v.L)(),[r]=(0,b.W)(),o=(0,c.Tg)([j.Sh.MESSAGING_CREATE_OR_UPDATE]),[h,k]=(0,x.useState)(!1),[S,P]=(0,x.useState)(null),C=(0,f.o)({pagination:{defaultPageSize:25,pageSizeOptions:[25,50,100]},sorting:{validColumns:Object.values(n),defaultSortKey:"name",defaultSortOrder:"ascend"}}),{data:z,isLoading:T}=(0,b.JE)(),{data:A,isLoading:M}=(0,b.qt)();(0,x.useEffect)(()=>{z?i(z.service_type):i(null)},[z]);let N=(0,x.useCallback)(async e=>{try{let s=await a({notifications:{notification_service_type:e}});(0,p.D4)(s)?t(s.error):(i(e),d.Pg3.success(e?"Updated active messaging config":"Disabled active messaging config"))}catch(e){t(e)}},[a,t,i]),D=(0,x.useCallback)(t=>{var s,i;let n=g.GE.replace("[key]",t.key);e.push({pathname:n,query:{last_test_succeeded:null!==(s=t.last_test_succeeded)&&void 0!==s?s:"",last_test_timestamp:null!==(i=t.last_test_timestamp)&&void 0!==i?i:""}})},[e]),R=(0,x.useCallback)((e,t)=>{P({key:e,name:t}),k(!0)},[]),L=(0,x.useCallback)(async()=>{if(S)try{let e=await r({key:S.key});(0,p.D4)(e)?t(e.error):d.Pg3.success("Messaging configuration successfully deleted")}catch(e){t(e)}finally{k(!1),P(null)}},[S,r,t]),I=(0,x.useCallback)(()=>{k(!1),P(null)},[]),Z=(0,x.useMemo)(()=>({enableSelection:!1,getRowKey:e=>e.key,isLoading:M||T,dataSource:(null==A?void 0:A.items)||[],totalRows:(null==A?void 0:A.total)||0,customTableProps:{size:"small",pagination:{hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["25","50","100"]}}}),[M,T,null==A?void 0:A.items,null==A?void 0:A.total]),O=(0,f.V)(C,Z),G=(0,x.useMemo)(()=>[{title:"Provider type",dataIndex:"name",key:"name",render:(e,t)=>(0,l.jsxs)(d.Ugi,{children:[(()=>{switch(t.service_type){case"mailgun":return(0,l.jsx)(_.Z,{});case"twilio_text":case"twilio_email":default:return(0,l.jsx)(y.Z,{});case"aws_ses":return(0,l.jsx)(w.Z,{})}})(),(0,l.jsx)(d.xvT,{children:e})]})},{title:"Verification status",key:"verification_status",render:(e,t)=>(0,l.jsx)(E,{messagingConfig:t})},{title:"Enabled",key:"enabled",width:100,render:(e,t)=>{let i=t.service_type===s,n=!!t.last_test_timestamp&&""!==t.last_test_timestamp&&!1===t.last_test_succeeded&&!i,a=(0,l.jsx)(d.rAg,{checked:i,disabled:n,onChange:e=>{e?N(t.service_type):N(null)}});return n?(0,l.jsx)(d.esZ,{title:"This provider cannot be enabled because its last test failed. Please fix the configuration and test again.",children:a}):a}},{title:"Actions",key:"actions",render:(e,t)=>(0,l.jsxs)(d.Ugi,{children:[o&&(0,l.jsx)(d.wpx,{onClick:e=>{e.stopPropagation(),D(t)},size:"small",icon:(0,l.jsx)(d.PJP.I8b,{}),title:"Edit","aria-label":"Edit messaging configuration","data-testid":"edit-messaging-config-btn"}),o&&(0,l.jsx)(d.wpx,{onClick:e=>{e.stopPropagation(),R(t.key,t.name)},size:"small",icon:(0,l.jsx)(d.PJP.ZNm,{}),title:"Delete","aria-label":"Delete messaging configuration","data-testid":"delete-messaging-config-btn"})]})}],[o,s,D,R,N]),W=(0,x.useMemo)(()=>(0,l.jsx)(d.$zI,{title:"Delete messaging configuration",open:h,onCancel:I,footer:[(0,l.jsx)(d.wpx,{onClick:I,children:"Cancel"},"cancel"),(0,l.jsx)(d.wpx,{type:"primary",danger:!0,onClick:L,children:"Delete"},"delete")],children:(0,l.jsxs)(d.vyj,{direction:"vertical",children:[(0,l.jsxs)(d.xvT,{children:['Are you sure you want to delete "',(0,l.jsx)("strong",{children:null==S?void 0:S.name}),'" messaging configuration?']}),(0,l.jsx)(d.xvT,{children:"This action cannot be undone."})]})}),[h,null==S?void 0:S.name,I,L]);return{columns:G,tableProps:O.tableProps,selectionProps:O.selectionProps,userCanUpdate:o,isLoading:M||T,deleteModal:W,handleEditConfiguration:D,handleDeleteConfiguration:R,setActiveServiceType:N}},C=()=>(0,l.jsx)(d.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,l.jsxs)(d.gCW,{children:[(0,l.jsx)(d.xvT,{fontSize:"md",fontWeight:"600",children:"No messaging providers found."}),(0,l.jsx)(d.xvT,{fontSize:"sm",children:'Click "Add a messaging provider" to add your first messaging provider to Fides.'})]})}),z=()=>{let{columns:e,tableProps:t,userCanUpdate:s,isLoading:i,deleteModal:n}=P(),a=(0,u.useRouter)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(d.xvT,{fontSize:"sm",mb:8,width:{base:"100%",lg:"70%"},children:["Fides requires a messaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,l.jsx)(d.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,l.jsxs)(d.kCb,{flex:1,direction:"column",overflow:"auto",children:[s&&(0,l.jsx)(d.vyj,{direction:"horizontal",style:{width:"100%",justifyContent:"flex-end",marginBottom:16},children:(0,l.jsx)(d.wpx,{onClick:()=>{a.push(g.Nu)},role:"link",type:"primary",icon:(0,l.jsx)(d.PJP.mm_,{}),iconPosition:"end","data-testid":"add-messaging-provider-btn",children:"Add a messaging provider"})}),i?(0,l.jsx)(h.I4,{rowHeight:36,numRows:5}):(0,l.jsx)(d.V5H,{...t,columns:e,locale:{emptyText:(0,l.jsx)(C,{})}})]}),n]})};var T=()=>(0,l.jsx)(a.Z,{title:"Notifications",children:(0,l.jsxs)(c.ZP,{scopes:[j.Sh.MESSAGING_CREATE_OR_UPDATE],children:[(0,l.jsx)(o.Z,{heading:"Notifications"}),(0,l.jsx)(r.Z,{}),(0,l.jsx)(z,{})]})})}},function(e){e.O(0,[431,7245,8563,2888,9774,179],function(){return e(e.s=30890)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{6446:function(e){e.exports=function(e,t,a,s){var r=-1,i=null==e?0:e.length;for(s&&i&&(a=e[++r]);++r<i;)a=t(a,e[r],r,e);return a}},67375:function(e,t,a){var s=a(52033),r=a(80068);e.exports=function(e,t){var a=-1,i=r(e)?Array(e.length):[];return s(e,function(e,s,r){i[++a]=t(e,s,r)}),i}},74833:function(e,t,a){var s=a(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(r,""):e}},56632:function(e,t,a){var s=a(89278),r=a(80068),i=a(50098);e.exports=function(e){return function(t,a,l){var n=Object(t);if(!r(t)){var o=s(a,3);t=i(t),a=function(e){return o(n[e],e,n)}}var c=e(t,a,l);return c>-1?n[o?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var a=e.length;a--&&t.test(e.charAt(a)););return a}},64925:function(e,t,a){var s=a(56632)(a(66259));e.exports=s},66259:function(e,t,a){var s=a(95372),r=a(89278),i=a(47991),l=Math.max;e.exports=function(e,t,a){var n=null==e?0:e.length;if(!n)return -1;var o=null==a?0:i(a);return o<0&&(o=l(n+o,0)),s(e,r(t,3),o)}},55807:function(e,t,a){var s=a(66070),r=a(89278),i=a(67375),l=a(19785);e.exports=function(e,t){return(l(e)?s:i)(e,r(t,3))}},82846:function(e,t,a){var s=a(77400);e.exports=function(){return s.Date.now()}},32526:function(e,t,a){var s=a(68267)(function(e,t,a){return e+(a?"_":"")+t.toLowerCase()});e.exports=s},94919:function(e,t,a){var s=a(91936),r=1/0;e.exports=function(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,a){var s=a(94919);e.exports=function(e){var t=s(e),a=t%1;return t==t?a?t-a:t:0}},91936:function(e,t,a){var s=a(74833),r=a(11611),i=a(55193),l=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return l;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||c.test(e)?d(e.slice(2),a?2:8):n.test(e)?l:+e}},86548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return a(27901)}])},624:function(e,t,a){"use strict";var s=a(24246),r=a(87949),i=a(27378);let l=e=>{let t=e.split("."),a=[];return t.forEach(e=>{let t=a.length>0?a[a.length-1]:null;t?a.push("".concat(t,".").concat(e)):a.push(e)}),a},n=(e,t)=>{let a=l(t).filter(e=>e!==t);return e.filter(e=>a.includes(e)).length>0},o=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,a)=>{let s=null!=a?a:[];return e.forEach(e=>{e.children&&c(e.children,t,s),o(e.value,t)&&s.push(e)}),s},d=e=>{let{node:t,isChecked:a,onChecked:i,isExpanded:l,onExpanded:n,isIndeterminate:o,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,s.jsxs)(r.xuv,{children:[(0,s.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>n(t),minHeight:8,children:[(0,s.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!o&&a,isIndeterminate:o,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,s.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":l?"collapse":"expand",icon:(0,s.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>n(t),className:l?"rotate-180":void 0}):null]}),d&&(0,s.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:a,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...a.map(e=>l(e)).reduce((e,t)=>e.concat(t),[]),...a.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[a,t]);let A=e=>{let s=[],r=[];p.indexOf(e.value)>=0?(s=p.filter(t=>!o(t,e.value)),r=a.filter(t=>!o(t,e.value))):(s=[...p,...c(t,e.value).map(e=>e.value)],r=[...a,e.value]),m(s),u(r)},g=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!o(t,e.value))):S([...E,e.value])},h=e=>{if(e.children){let r=p.indexOf(e.value)>=0,l=E.indexOf(e.value)>=0,o=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==o.length,_=n(a,e.value);return(0,s.jsx)(d,{node:e,isChecked:r,onChecked:A,isExpanded:l,onExpanded:g,isDisabled:_,isIndeterminate:u,children:l?e.children.map(e=>(0,s.jsx)(i.Fragment,{children:h(e)},e.value)):void 0})}return null};return(0,s.jsx)(r.xuv,{..._,children:t.map(e=>(0,s.jsx)(r.xuv,{children:h(e)},e.value))})}},35287:function(e,t,a){"use strict";var s=a(24246),r=a(87949),i=a(88038),l=a.n(i);a(27378),t.Z=e=>{let{children:t,title:a,fullHeight:i,fullWidth:n,mainProps:o}=e;return(0,s.jsxs)(r.kCb,{"data-testid":a,direction:"column",height:i?"100vh":"calc(100vh - 48px)",width:n?"100vw":"calc(100vw - 240px)",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",a]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...o,children:t})]})}},19904:function(e,t,a){"use strict";a.d(t,{Tg:function(){return l}});var s=a(24246),r=a(16134),i=a(31793);let l=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:a}=e;return l(t)?(0,s.jsx)(s.Fragment,{children:a}):null}},34929:function(e,t,a){"use strict";var s=a(24246),r=a(64925),i=a.n(r),l=a(27378),n=a(16134),o=a(30002),c=a(28079),d=a(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,n.C)(c.U3),{isLoading:a}=(0,d.MO)(),s=(0,n.C)(d.qb),{isLoading:r}=(0,o.te)();return{dataUses:t,dataSubjects:(0,n.C)(o.ZL),dataCategories:s,isLoading:e||a||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:a,isLoading:r}=u(),n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},o=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let r=t(n(e,a)),i=!!s.parent_key;return{name:s.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==s.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=o(e,t,a);return r?i?(0,s.jsxs)(l.Fragment,{children:[(0,s.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,s.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(a,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>o(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>o(e,_,2),getDataSubjects:()=>a,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:n,isLoading:r}}},2525:function(e,t,a){"use strict";a.d(t,{Q:function(){return n}});var s=a(24246),r=a(87949),i=a(27378),l=a(3110);let n=e=>{let{values:t,columnState:a,tagProps:n,onTagClose:o,onStateChange:c,...d}=e,{isExpanded:u,isWrapped:_,version:p}=a||{},[m,E]=(0,i.useState)(!u),[S,A]=(0,i.useState)(!!_),[g,h]=(0,i.useState)(u?t:null==t?void 0:t.slice(0,2));(0,i.useEffect)(()=>{E(!u)},[u,p]),(0,i.useEffect)(()=>{A(!!_)},[_]),(0,i.useEffect)(()=>{(null==t?void 0:t.length)?h(m?t.slice(0,2):t):h(t)},[m,t,c]),(0,i.useEffect)(()=>{(null==t?void 0:t.length)&&t.length<=2&&!m&&(E(!0),null==c||c(!1))},[t,c,m]);let f=(0,i.useCallback)(()=>{h(null==t?void 0:t.slice(0,2)),E(!0),null==c||c(!1)},[t,c]),T=(0,i.useCallback)(()=>{E(!1),null==c||c(!0)},[c]),x=(0,i.useCallback)(()=>{m?T():f()},[m,T,f]);return(0,i.useMemo)(()=>(null==g?void 0:g.length)?(0,s.jsxs)(r.jqI,{align:m?"center":"start",wrap:S?"wrap":"nowrap",vertical:!m,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...d.style},...d,children:[g.map(e=>(0,s.jsx)(r.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...n,...e.tagProps,children:(0,s.jsx)(r.lKn,{ellipsis:!!m&&{tooltip:!0},style:{color:"inherit",maxWidth:m?l.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),x()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:m?"+".concat(t.length-2," more"):l.T5})]}):(0,s.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[g,m,S,d,t,n,o,x])}},3110:function(e,t,a){"use strict";a.d(t,{DI:function(){return n},T5:function(){return i},TD:function(){return l}});var s=a(24246),r=a(87949);let i="show less",l=150,n=[{key:"expand-all",label:"Expand all",icon:(0,s.jsx)(r.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,s.jsx)(r.PJP.MVB,{})}]},26070:function(e,t,a){"use strict";a.d(t,{v:function(){return o},Q:function(){return c.Q}});var s=a(24246),r=a(87949),i=a(27378),l=a(3110);let{Text:n}=r.AntTypography,o=e=>{let{values:t,valueSuffix:a,columnState:o,containerProps:c}=e,{isExpanded:d,version:u}=o||{},[_,p]=(0,i.useState)(!d);(0,i.useEffect)(()=>{p(!d)},[d,u]);let m=(0,i.useCallback)(()=>{p(!0)},[]),E=(0,i.useCallback)(()=>{p(!1)},[]),S=(0,i.useCallback)(()=>{_?E():m()},[_,E,m]);return(0,i.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,s.jsx)(r.jqI,{...c,children:(0,s.jsx)(n,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]})}):(0,s.jsxs)(r.jqI,{align:_?"center":"flex-start",vertical:!_,gap:_?"small":"none","data-testid":"list-expandable-cell",...c,children:[_?(0,s.jsxs)(n,{ellipsis:!0,children:[t.length," ",a]}):(0,s.jsx)(r.krs,{dataSource:t,renderItem:e=>(0,s.jsx)("li",{children:e})}),(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),S()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:_?"view":l.T5})]}):null,[_,t,a,S,c])};var c=a(2525)},22583:function(e,t,a){"use strict";a.d(t,{j:function(){return i}});var s=a(87949),r=a(65735);let i={[r.Ej.TAXONOMY_WHITE]:s.tAb.DEFAULT,[r.Ej.TAXONOMY_RED]:s.tAb.ERROR,[r.Ej.TAXONOMY_ORANGE]:s.tAb.WARNING,[r.Ej.TAXONOMY_YELLOW]:s.tAb.CAUTION,[r.Ej.TAXONOMY_GREEN]:s.tAb.SUCCESS,[r.Ej.TAXONOMY_BLUE]:s.tAb.INFO,[r.Ej.TAXONOMY_PURPLE]:s.tAb.ALERT,[r.Ej.SANDSTONE]:s.tAb.SANDSTONE,[r.Ej.MINOS]:s.tAb.MINOS}},59001:function(e,t,a){"use strict";a.d(t,{Ch:function(){return o},Lo:function(){return l},_g:function(){return c},ac:function(){return i},aq:function(){return d}});var s,r,i,l,n=a(65735);let o="root";(s=i||(i={})).DATA_CATEGORY="data_category",s.DATA_USE="data_use",s.DATA_SUBJECT="data_subject",s.SYSTEM_GROUP="system_group",(r=l||(l={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects",r.SYSTEM_GROUPS="System groups";let c=e=>{switch(e){case"data_category":return"Data categories";case"data_use":return"Data uses";case"data_subject":return"Data subjects";case"system_group":return"System groups";default:return e}},d=e=>{switch(e){case"data_category":return{UPDATE:n.Sh.DATA_CATEGORY_UPDATE,CREATE:n.Sh.DATA_CATEGORY_CREATE,DELETE:n.Sh.DATA_CATEGORY_DELETE,READ:n.Sh.DATA_CATEGORY_READ};case"data_use":return{UPDATE:n.Sh.DATA_USE_UPDATE,CREATE:n.Sh.DATA_USE_CREATE,DELETE:n.Sh.DATA_USE_DELETE,READ:n.Sh.DATA_USE_READ};case"data_subject":return{UPDATE:n.Sh.DATA_SUBJECT_UPDATE,CREATE:n.Sh.DATA_SUBJECT_CREATE,DELETE:n.Sh.DATA_SUBJECT_DELETE,READ:n.Sh.DATA_SUBJECT_READ};case"system_group":return{UPDATE:n.Sh.SYSTEM_GROUP_UPDATE,CREATE:n.Sh.SYSTEM_GROUP_CREATE,DELETE:n.Sh.SYSTEM_GROUP_DELETE,READ:n.Sh.SYSTEM_GROUP_READ};default:return{UPDATE:n.Sh.TAXONOMY_UPDATE,CREATE:n.Sh.TAXONOMY_CREATE,DELETE:n.Sh.TAXONOMY_DELETE,READ:n.Sh.TAXONOMY_READ}}}},90673:function(e,t,a){"use strict";a.d(t,{Cd:function(){return i},Xl:function(){return l}});var s=a(65735),r=a(59001);let i=(e,t)=>{let a;if(null==t&&e.every(e=>void 0===e.parent_key))a=e;else{let s=null!=t?t:null;a=e.filter(e=>e.parent_key===s)}return a.map(t=>{var a,s;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(a=t.is_default)&&void 0!==a&&a,active:null!==(s=t.active)&&void 0!==s&&s}})},l=e=>{switch(e){case r.ac.DATA_CATEGORY:return s.P6.DATA_CATEGORY;case r.ac.DATA_SUBJECT:return s.P6.DATA_SUBJECT;case r.ac.DATA_USE:return s.P6.DATA_USE;default:return}}},27901:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eC}});var s,r,i,l,n=a(24246),o=a(27378),c=a(35287),d=a(58754),u=a(71795),_=a(65735);(s=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",s.COLUMN_NAMES="datamap-column-names",s.COLUMN_ORDER="datamap-column-order",s.COLUMN_SIZING="datamap-column-sizing",s.COLUMN_VISIBILITY="datamap-column-visibility",s.CUSTOM_REPORT_ID="datamap-custom-report-id",s.FILTERS="datamap-filters",s.GROUP_BY="datamap-group-by",s.SORTING_STATE="datamap-sorting-state",s.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=l||(l={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data",r.SYSTEM_GROUPS="system_groups",r.SYSTEM_GROUP="system_group_fides_key",r.SYSTEM_GROUP_DATA_USES="system_group_data_uses";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data",system_groups:"System groups",system_group_fides_key:"System group",system_group_data_uses:"Data uses"},m={[l.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[l.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,o.createContext)({}),A=e=>{let{children:t}=e,[a,s]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,l]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,A]=(0,u._)(i.COLUMN_ORDER,[]),[g,h]=(0,u._)(i.COLUMN_VISIBILITY,m),[f,T]=(0,u._)(i.COLUMN_SIZING,{}),[x,C]=(0,u._)(i.COLUMN_NAMES,{}),O=(0,o.useMemo)(()=>({savedCustomReportId:a,setSavedCustomReportId:s,groupBy:r,setGroupBy:l,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:A,columnVisibility:g,setColumnVisibility:h,columnSizing:f,setColumnSizing:T,columnNameMapOverrides:x,setColumnNameMapOverrides:C}),[a,s,r,l,c,d,p,A,g,h,f,T,x,C]);return(0,n.jsx)(S.Provider,{value:O,children:t})},g=()=>{let e=(0,o.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var h=a(59003),f=a(92222),T=a(47935),x=a(87949),C=a(34090),O=a(66726),v=a.n(O),R=a(16134),y=a(34929),j=a(14048),b=a(19904),D=a(16394),I=a(38943),N=a(35258),P=e=>{let{children:t,heading:a,onCancel:s,onConfirm:r,isLoading:i,cancelButtonText:l,continueButtonText:o,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,n.jsxs)(x.u_l,{closeOnOverlayClick:i,...d,children:[(0,n.jsx)(x.ZAr,{}),(0,n.jsxs)(x.hzk,{"data-testid":c,children:[a&&(0,n.jsx)(x.xBx,{children:a}),(0,n.jsx)(x.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,n.jsx)(x.fef,{children:t}),(0,n.jsxs)(x.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,n.jsx)(x.wpx,{onClick:()=>{s&&s(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:l||"Cancel"}),(0,n.jsx)(x.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:o||"Continue"})]})]})]})},M=a(22968),w=e=>{let[t,a]=(0,o.useState)(M.T2.csv),{onConfirm:s}=e;return(0,n.jsx)(P,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>s(t),"data-testid":"export-modal",children:(0,n.jsxs)(x.kCb,{direction:"column",gap:3,pb:3,children:[(0,n.jsx)(x.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,n.jsxs)(x.NIc,{children:[(0,n.jsx)(x.lXp,{htmlFor:"format",children:"Choose Format"}),(0,n.jsx)(x.WPr,{id:"format",value:t,onChange:a,"data-testid":"export-format-select",options:[{value:M.T2.csv,label:"CSV"},{value:M.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},U=a(624),L=a(30002),k=a(28079),G=a(5785),Y=a(90673);let F=e=>{let{label:t,children:a,...s}=e;return(0,n.jsxs)(x.Qdk,{...s,children:[(0,n.jsx)(x.X6q,{children:(0,n.jsxs)(x.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,n.jsx)(x.xuv,{flex:1,children:t}),(0,n.jsx)(x.XEm,{boxSize:7})]})}),(0,n.jsx)(x.Hk3,{children:a})]})},H=e=>{let{columnNameMap:t,selectedFilters:a,onFilterChange:s,onClose:r,...i}=e;(0,k.fd)(),(0,L.te)(),(0,G.MO)();let{dataUses:l,dataSubjects:c,dataCategories:d}=a,u=(0,R.C)(k.U3),_=(0,R.C)(L.ZL),p=(0,R.C)(G.qb),[m,E]=(0,o.useState)(l),[S,A]=(0,o.useState)(c),[g,h]=(0,o.useState)(d);(0,o.useEffect)(()=>{E(l)},[l]),(0,o.useEffect)(()=>{A(c)},[c]),(0,o.useEffect)(()=>{h(d)},[d]);let f=(0,o.useMemo)(()=>(0,Y.Cd)(u),[u]),T=(0,o.useMemo)(()=>(0,Y.Cd)(_),[_]),C=(0,o.useMemo)(()=>(0,Y.Cd)(p),[p]);return(0,n.jsx)(P,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),A([]),h([]),s({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{s({dataUses:m,dataSubjects:S,dataCategories:g}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,n.jsxs)(x.UQy,{allowToggle:!0,children:[(0,n.jsx)(F,{label:t.data_uses,children:(0,n.jsx)(U.ZP,{nodes:f,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,n.jsx)(F,{label:t.data_categories,children:(0,n.jsx)(U.ZP,{nodes:C,selected:g,onSelected:h,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,n.jsx)(F,{label:t.data_subjects,children:(0,n.jsx)(U.ZP,{nodes:T,selected:S,onSelected:A,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=a(32885),z=a(69353),B=a(812);let{useGetMinimalCustomReportsQuery:Z,useLazyGetCustomReportByIdQuery:W,usePostCustomReportMutation:q,useDeleteCustomReportMutation:X}=a(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:a=50,report_type:s=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(a,"&report_type=").concat(s);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,a)=>[{type:"Custom Reports",id:a}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var J=a(55484),K=a(40324);let Q="Report name",$=e=>{let{isOpen:t,handleClose:a,tableStateToSave:s,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:l}=e,c=(0,x.pmc)(),[d]=q(),u=(0,o.useMemo)(()=>J.Ry().shape({reportName:J.Z_().label(Q).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,a]=e;i[t]={label:a,enabled:!0}}),Object.entries(null!==(t=null==s?void 0:s.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,a]=e;i[t]||(i[t]={}),i[t].enabled=a});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:s}},r=await d(t);if((0,B.D4)(r))throw r.error;l(r.data),a()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,n.jsxs)(x.u_l,{size:"lg",isOpen:t,onClose:a,motionPreset:"none",children:[(0,n.jsx)(x.ZAr,{}),(0,n.jsxs)(x.hzk,{children:[(0,n.jsx)(x.xBx,{pb:0,children:"Create a report"}),(0,n.jsx)(C.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:a,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:a}=e;return(0,n.jsxs)(C.l0,{"data-testid":"custom-report-form",children:[(0,n.jsxs)(x.fef,{children:[(0,n.jsx)(x.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,n.jsx)(K.j0,{id:"reportName",name:"reportName",isRequired:!0,label:Q,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,n.jsxs)(x.mzw,{gap:2,children:[(0,n.jsx)(x.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,n.jsx)(x.wpx,{size:"small",disabled:!t||!a,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},ee="Report",et="Reports",ea=e=>{var t;let{reportType:a,savedReportId:s,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:l,onSavedReportDeleted:c}=e,d=(0,b.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,b.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,x.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=Z({report_type:a}),[S,A]=(0,o.useState)(),[g]=W(),[h]=X(),{isOpen:f,onOpen:T,onClose:O}=(0,x.qY0)(),{isOpen:v,onOpen:R,onClose:y}=(0,x.qY0)(),{isOpen:j,onOpen:D,onClose:I}=(0,x.qY0)(),[N,P]=(0,o.useState)(),[M,w]=(0,o.useState)(),[U,L]=(0,o.useState)(),[k,G]=(0,o.useState)(!1),{resetForm:Y}=(0,C.u6)(),F=(0,o.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===s))||void 0===e?void 0:e.name;return null!=t?t:et},[null==m?void 0:m.items,s]),H=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),V=e=>{A(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},z=async e=>{P(e);let{data:t,isError:a,error:s}=await g(e);if(a){let e=(0,B.e$)(s,"A problem occurred while fetching the ".concat(ee,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else w(t)},q=()=>{P(""),w(void 0),G(!1)},J=()=>{M?(G(!1),M.id!==s&&l(M,Y),O()):N?G(!0):(l(null,Y),O())},K=async e=>{e===(null==M?void 0:M.id)&&(q(),c()),h(e)};(0,o.useEffect)(()=>{m&&A(m.items)},[m]),(0,o.useEffect)(()=>{k&&(G(!1),J())},[M]),(0,o.useEffect)(()=>{s?z(s):q()},[s]),(0,o.useEffect)(()=>{U&&D()},[D,U]);let Q=!M&&!s||(null==M?void 0:M.id)===s,ea=(0,n.jsx)("div",{"data-testid":"custom-reports-popover",children:(0,n.jsx)(C.J9,{initialValues:{},onSubmit:J,onReset:q,children:(0,n.jsxs)(C.l0,{children:[(0,n.jsxs)("div",{className:"relative p-3",style:{borderBottom:"var(--ant-popover-title-border-bottom)"},children:[(0,n.jsx)(x.wpx,{size:"small",disabled:H,htmlType:"reset",className:"absolute left-3 top-3","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,n.jsx)(x.wpx,{type:"text",size:"small","aria-label":"Cancel",icon:(0,n.jsx)(x.PJP.x8P,{}),className:"absolute right-3 top-3",onClick:()=>{s?z(s):q(),O()},"data-testid":"custom-report-popover-cancel"}),(0,n.jsx)("div",{className:"text-center",style:{color:"var(--ant-color-text-heading)",fontWeight:"var(--ant-font-weight-strong)"},children:et}),(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(x.AntInput,{size:"small",placeholder:"Search...",onChange:e=>V(e.target.value)})})]}),(0,n.jsxs)("div",{className:"px-5 pb-1 pt-3",children:[H&&(0,n.jsx)(x.oj8,{image:(0,n.jsx)(x.wpx,{type:"primary",shape:"circle",size:"small","aria-label":"add ".concat(ee),icon:(0,n.jsx)(x.PJP.mm_,{}),onClick:R,"data-testid":"add-report-button"}),description:"No ".concat(et.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a ").concat(ee.toLowerCase()," for easy access later."),styles:{image:{height:"24px"}},"data-testid":"custom-reports-empty-state"}),!H&&(E?(0,n.jsx)(x.N_L,{active:!0,paragraph:{rows:3,width:"100%"},title:!1,className:"pt-2"}):(0,n.jsx)(x.y02.Group,{onChange:e=>z(e.target.value),value:N,style:{width:"100%"},children:(0,n.jsx)(x.vyj,{direction:"vertical",className:"w-full",size:"small",children:null==S?void 0:S.map(e=>(0,n.jsxs)(x.jqI,{justify:u?"space-between":"flex-start",align:"center",children:[(0,n.jsx)(x.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:e.name}),u&&(0,n.jsx)(x.wpx,{type:"text",size:"small",icon:(0,n.jsx)(x.PJP.ZNm,{}),onClick:()=>L(e),"data-testid":"delete-report-button","aria-label":"Delete"})]},e.id))})}))]}),(0,n.jsxs)(x.jqI,{className:"px-5 py-4",gap:"small",children:[d&&r&&(0,n.jsxs)(x.wpx,{size:"small",onClick:R,className:"flex-1 gap-1 pl-0","data-testid":"create-report-button",htmlType:"button",icon:(0,n.jsx)(x.PJP.mm_,{}),iconPosition:"start",children:["Create ",ee.toLowerCase()]}),(0,n.jsx)(x.wpx,{size:"small",type:"primary",loading:k,disabled:Q,className:"flex-1","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})]})})});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.bPF,{content:ea,trigger:"click",placement:"bottomRight",open:f,onOpenChange:e=>{e?T():J()},styles:{root:{width:"320px"}},zIndex:1400,children:(0,n.jsx)(x.wpx,{className:"max-w-40",icon:(0,n.jsx)(x.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",children:(0,n.jsx)(x.lKn,{ellipsis:!0,children:F})})}),(0,n.jsx)($,{isOpen:v,handleClose:()=>{y(),setTimeout(()=>{T()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>l(e,Y)}),(0,n.jsx)(x.cVQ,{isOpen:j,onClose:()=>{L(void 0),I()},onConfirm:()=>{U&&K(U.id),I()},title:"Delete ".concat(ee),message:(0,n.jsxs)(x.lKn,{children:["You are about to permanently delete the"," ",ee.toLowerCase()," named"," ",(0,n.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var es=a(19785),er=a.n(es),ei=a(55807),el=a.n(ei),en=a(32526),eo=a.n(en),ec=a(26070),ed=a(72625),eu=a(43862),e_=a(22583);let ep=(0,f.Cl)(),em=(e,t)=>({cell:e=>(0,n.jsx)(T.G3,{value:e.getValue()}),header:a=>{let s={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?s[t]=e[t]:e[t].label&&(s[t]=e[t].label||"")}),(0,n.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:a.column.id,columnNameMap:s}),defaultValue:p[a.column.id]||(0,eu.AH)({columnId:a.column.id}),isEditing:t,...a})}}),eE=(e,t)=>{var a;let s=(null==e?void 0:null===(a=e.items)||void 0===a?void 0:a.length)?Object.keys(e.items[0]):[],r=Object.values(l);return s.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let a=t.find(t=>e.includes(eo()(t.name)));return ep.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,n.jsx)(T.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,n.jsx)(T.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==a?void 0:a.field_type)==="string[]"}})})},eS=e=>{let{onSelectRow:t,getDataUseDisplayName:a,getDataCategoryDisplayName:s,getDataSubjectDisplayName:r,datamapReport:i,customFields:o,systemGroups:c=[],isRenaming:d=!1,groupBy:u}=e,p=eE(i,o),m=e=>{let t=c.find(t=>t.fides_key===e);return(null==t?void 0:t.label_color)?e_.j[t.label_color]:void 0},E=e=>{if(e&&0!==e.length&&1===e.length)return m(e[0])},S=[ep.accessor(e=>e.system_name,{enableGrouping:!0,id:l.SYSTEM_NAME,meta:{onCellClick:t}}),ep.accessor(e=>e.data_uses,{id:l.DATA_USE,cell:e=>{let t=e.getValue();return(0,n.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?el()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),ep.accessor(e=>e.data_categories,{id:l.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,n.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_subjects,{id:l.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,n.jsx)(T.WP,{suffix:"data subjects",ignoreZero:!0,value:er()(t)?el()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!d}}),ep.accessor(e=>e.legal_name,{id:l.LEGAL_NAME}),ep.accessor(e=>e.dpo,{id:l.DPO}),ep.accessor(e=>e.legal_basis_for_processing,{id:l.LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.administrating_department,{id:l.ADMINISTRATING_DEPARTMENT}),ep.accessor(e=>e.cookie_max_age_seconds,{id:l.COOKIE_MAX_AGE_SECONDS}),ep.accessor(e=>e.privacy_policy,{id:l.PRIVACY_POLICY}),ep.accessor(e=>e.legal_address,{id:l.LEGAL_ADDRESS}),ep.accessor(e=>e.cookie_refresh,{id:l.COOKIE_REFRESH}),ep.accessor(e=>e.data_security_practices,{id:l.DATA_SECURITY_PRACTICES}),ep.accessor(e=>e.data_shared_with_third_parties,{id:l.DATA_SHARED_WITH_THIRD_PARTIES}),ep.accessor(e=>e.processes_special_category_data,{id:l.PROCESSES_SPECIAL_CATEGORY_DATA}),ep.accessor(e=>e.data_stewards,{id:l.DATA_STEWARDS,cell:e=>(0,n.jsx)(T.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.declaration_name,{id:l.DECLARATION_NAME}),ep.accessor(e=>e.does_international_transfers,{id:l.DOES_INTERNATIONAL_TRANSFERS}),ep.accessor(e=>e.dpa_location,{id:l.DPA_LOCATION}),ep.accessor(e=>e.egress,{id:l.DESTINATIONS,cell:e=>(0,n.jsx)(T.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.exempt_from_privacy_regulations,{id:l.EXEMPT_FROM_PRIVACY_REGULATIONS}),ep.accessor(e=>e.features,{id:l.FEATURES,cell:e=>(0,n.jsx)(T.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.fides_key,{id:l.FIDES_KEY}),ep.accessor(e=>e.flexible_legal_basis_for_processing,{id:l.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.impact_assessment_location,{id:l.IMPACT_ASSESSMENT_LOCATION}),ep.accessor(e=>e.ingress,{id:l.SOURCES,cell:e=>(0,n.jsx)(T.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.joint_controller_info,{id:l.JOINT_CONTROLLER_INFO}),ep.accessor(e=>e.legal_basis_for_profiling,{id:l.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,n.jsx)(T.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legal_basis_for_transfers,{id:l.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,n.jsx)(T.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legitimate_interest_disclosure_url,{id:l.LEGITIMATE_INTEREST_DISCLOSURE_URL}),ep.accessor(e=>e.processes_personal_data,{id:l.PROCESSES_PERSONAL_DATA}),ep.accessor(e=>e.reason_for_exemption,{id:l.REASON_FOR_EXEMPTION}),ep.accessor(e=>e.requires_data_protection_assessments,{id:l.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),ep.accessor(e=>e.responsibility,{id:l.RESPONSIBILITY,cell:e=>(0,n.jsx)(T.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.retention_period,{id:l.RETENTION_PERIOD}),ep.accessor(e=>e.shared_categories,{id:l.SHARED_CATEGORIES,cell:e=>(0,n.jsx)(T.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.special_category_legal_basis,{id:l.SPECIAL_CATEGORY_LEGAL_BASIS}),ep.accessor(e=>e.third_parties,{id:l.THIRD_PARTIES}),ep.accessor(e=>e.system_undeclared_data_categories,{id:l.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,n.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_use_undeclared_data_categories,{id:l.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,n.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.cookies,{id:l.COOKIES,cell:e=>(0,n.jsx)(T.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.uses_cookies,{id:l.USES_COOKIES}),ep.accessor(e=>e.uses_non_cookie_access,{id:l.USES_NON_COOKIE_ACCESS}),ep.accessor(e=>e.uses_profiling,{id:l.USES_PROFILING}),ep.accessor(e=>e.system_groups,{id:l.SYSTEM_GROUPS,cell:e=>{let t=e.getValue();if(!t||Array.isArray(t)&&0===t.length)return null;let a=(Array.isArray(t)?t:[t]).map(e=>{let t=c.find(t=>t.fides_key===e);return{label:(null==t?void 0:t.name)||e,key:e,tagProps:{color:(null==t?void 0:t.label_color)?e_.j[t.label_color]:void 0,bordered:!1}}});return(0,n.jsx)(ec.Q,{values:a})},meta:{width:"auto"}}),...p],A=[];return u===_.fI.SYSTEM_GROUP&&A.push(ep.accessor(e=>e.system_group_fides_key,{id:l.SYSTEM_GROUP,cell:e=>{var t;let a=e.getValue();if(!a||Array.isArray(a)&&0===a.length)return null;let s=Array.isArray(a)?a.map(e=>{var t;return(null===(t=c.find(t=>t.fides_key===e))||void 0===t?void 0:t.name)||e}):[(null===(t=c.find(e=>e.fides_key===a))||void 0===t?void 0:t.name)||a],r=E(Array.isArray(a)?a:[a]);return(0,n.jsx)(T.WP,{suffix:"system group",ignoreZero:!0,value:s,tagProps:{color:null!=r?r:x.tAb.WHITE,bordered:!1},...e})},meta:{width:"auto",showHeaderMenu:!d}}),ep.accessor(e=>e.system_group_data_uses,{id:l.SYSTEM_GROUP_DATA_USES,cell:e=>{let t=e.getValue();return!t||Array.isArray(t)&&0===t.length?null:(0,n.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?el()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto",showHeaderMenu:!d}})),[...S,...A]},eA=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:a,setSavedCustomReportId:s,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:l}=(0,C.u6)();return(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{a({}),s(""),l({values:{}}),r(!1)},children:"Reset all"}),(0,n.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{l({values:t}),r(!1)},children:"Cancel"}),(0,n.jsx)(x.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},eg=e=>{switch(e){case _.fI.DATA_USE_SYSTEM:return[l.DATA_USE];case _.fI.SYSTEM_GROUP:return[l.SYSTEM_GROUP];default:return[l.SYSTEM_NAME]}},eh=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[l.SYSTEM_NAME,l.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[l.DATA_USE,l.SYSTEM_NAME]),_.fI.SYSTEM_GROUP===e&&(t=[l.SYSTEM_GROUP,l.SYSTEM_GROUP_DATA_USES,l.SYSTEM_NAME,l.DATA_USE]),t},ef=(e,t)=>{let a=eh(e),s=new Set(a);return[...a,...t.filter(e=>!s.has(e))]},eT={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,b.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{data:a}=(0,z.QD)(),{PAGE_SIZES:s,pageSize:r,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:S,isNextPageDisabled:A,startRange:O,endRange:P,pageIndex:M,setTotalPages:U,resetPageIndexToDefault:L}=(0,T.oi)(),k=(0,x.pmc)({id:"datamap-report-toast"}),{isOpen:G,onClose:Y,onOpen:F}=(0,x.qY0)(),{getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:W,isLoading:q}=(0,y.Z)(),[X,J]=(0,o.useState)(),{savedCustomReportId:K,setSavedCustomReportId:Q,groupBy:$,setGroupBy:ee,selectedFilters:et,setSelectedFilters:es,columnOrder:er,setColumnOrder:ei,columnVisibility:el,setColumnVisibility:en,columnSizing:eo,setColumnSizing:ec,columnNameMapOverrides:ed,setColumnNameMapOverrides:eu}=g(),[e_,ep]=(0,o.useState)(!1),eE=e=>{Q(""),ee(e),ep(!0),L()},[ex,eC]=(0,o.useState)(""),eO=(0,o.useCallback)(e=>{L(),eC(e)},[L,eC]),ev={pageIndex:M,pageSize:r,groupBy:$,search:ex,dataUses:(0,D.du)(et.dataUses,"data_uses"),dataSubjects:(0,D.du)(et.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(et.dataCategories,"data_categories")},{data:eR,isLoading:ey,isFetching:ej}=(0,I.tH)(ev),[eb,{isLoading:eD,isError:eI}]=(0,I.Eo)(),{data:eN,totalRows:eP}=(0,o.useMemo)(()=>{let e=eR||eT,t=e.items;return e_&&ep(!1),U(e.pages),{totalRows:e.total,data:t}},[eR]);(0,V.GH)();let eM=(0,R.C)(V.fN),[ew,eU]=(0,o.useState)(!1),eL=(0,o.useMemo)(()=>eR?eS({onSelectRow:e=>J(e.fides_key),getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:W,datamapReport:eR,customFields:eM,systemGroups:a,isRenaming:ew,groupBy:$}):[],[B,W,Z,eR,eM,a,ew,$]),{isOpen:ek,onOpen:eG,onClose:eY}=(0,x.qY0)(),{isOpen:eF,onOpen:eH,onClose:eV}=(0,x.qY0)(),ez=(0,h.b7)({getCoreRowModel:(0,f.sC)(),getGroupedRowModel:(0,f.qe)(),getExpandedRowModel:(0,f.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:eL,defaultColumn:em({...p,...ed},ew),data:eN,initialState:{expanded:!0,columnSizing:eo,columnOrder:er,columnVisibility:el,grouping:eg($)}});(0,o.useEffect)(()=>{$&&ez&&eR&&(0===ez.getState().columnOrder.length?ei(ef($,ez.getAllColumns().map(e=>e.id))):ei(ef($,ez.getState().columnOrder)))},[$,ez,eR]),(0,o.useEffect)(()=>{let e=eg($);eR&&ez.setGrouping(e)},[eR]);let eB=(0,o.useMemo)(()=>v()(ec,300),[ec]);(0,o.useEffect)(()=>{let e=ez.getState().columnSizing;e&&eB(e)},[ez.getState().columnSizing]);let eZ=()=>ed[l.SYSTEM_GROUP]||"System group",eW=(e,t)=>{if(e||K){if(!e){try{Q(""),en(m),ez.toggleAllColumnsVisible(!0),ez.setColumnVisibility(m),ei([]),ez.setColumnOrder([]),ee(_.fI.SYSTEM_DATA_USE),es(E),eu({}),t({values:{}})}catch(e){k({status:"error",description:"There was a problem resetting the report."})}return}try{var a,s,r,i;if(null===(a=e.config)||void 0===a?void 0:a.table_state){let{groupBy:t,filters:a,columnOrder:s}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,a]=e;i[t]=a.enabled||!1}),t&&ee(t),a&&es(a),s&&(ei(s),ez.setColumnOrder(s)),i&&(en(i),ez.setColumnVisibility(i))}if(null===(s=e.config)||void 0===s?void 0:s.column_map){let a={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,s]=e;s.label&&(a[t]=s.label)}),eu(a),t({values:a})}Q(e.id),k({status:"success",description:"Report applied successfully."})}catch(e){k({status:"error",description:"There was a problem applying report."})}}};return ey||t||q?(0,n.jsx)(T.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(x.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,n.jsx)(H,{columnNameMap:{...p,...ed},selectedFilters:et,isOpen:G,onClose:Y,onFilterChange:e=>{Q(""),es(e)}}),(0,n.jsx)(T.F1,{isOpen:ek,onClose:eY,headerText:"Columns",columnNameMap:{...p,...ed},prefixColumns:eh($),tableInstance:ez,savedCustomReportId:K,onColumnOrderChange:e=>{Q(""),ez.setColumnOrder(e),ei(e)},onColumnVisibilityChange:e=>{Q(""),ez.setColumnVisibility(e),en(e)}}),(0,n.jsx)(w,{isOpen:eF,onClose:eV,onConfirm:e=>{let t={};Object.entries(el).forEach(e=>{let[a,s]=e;t[a]={enabled:s}}),Object.entries(ed).forEach(e=>{let[a,s]=e;if(t[a])t[a].label=s;else{var r;t[a]={label:s,enabled:null===(r=el[a])||void 0===r||r}}}),eb({...ev,format:e,report_id:K,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:$,filters:et,columnOrder:er}}}}).then(()=>{eI||eV()})},isLoading:eD}),(0,n.jsx)(C.J9,{initialValues:ed,onSubmit:e=>{Q(""),eu(e),eU(!1)},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(T.Q$,{children:[(0,n.jsx)(T.HO,{globalFilter:ex,setGlobalFilter:eO,placeholder:"System name, Fides key, or ID"}),(0,n.jsxs)(x.kCb,{alignItems:"center",gap:2,children:[e&&(0,n.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:K,tableStateToSave:{groupBy:$,filters:et,columnOrder:er,columnVisibility:el},currentColumnMap:ed,onCustomReportSaved:(e,t)=>eW(e,t),onSavedReportDeleted:()=>{Q("")}}),(0,n.jsxs)(x.v2r,{children:[(0,n.jsxs)(x.j2t,{as:x.wpx,icon:(0,n.jsx)(x.v4q,{}),iconPosition:"end",loading:e_,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch($){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";case _.fI.SYSTEM_GROUP:{let e=eZ();return e.charAt(0).toLowerCase()+e.slice(1)}default:return"system"}})()]}),(0,n.jsxs)(x.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,n.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===$,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,n.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===$,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"}),(0,n.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_GROUP)},isChecked:_.fI.SYSTEM_GROUP===$,value:_.fI.SYSTEM_GROUP,"data-testid":"group-by-system-group",children:eZ()})]})]}),(0,n.jsx)(x.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:F,children:"Filter"}),(0,n.jsx)(x.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eH,icon:(0,n.jsx)(j.nM,{ml:"1.5px"})}),(0,n.jsxs)(x.v2r,{placement:"bottom-end",children:[(0,n.jsx)(x.j2t,{as:x.wpx,icon:(0,n.jsx)(x.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,n.jsxs)(x.qyq,{"data-testid":"more-menu-list",children:[(0,n.jsx)(x.sNh,{onClick:eG,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,n.jsx)(x.sNh,{onClick:()=>eU(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),ew&&(0,n.jsx)(eA,{columnNameMapOverrides:ed,setColumnNameMapOverrides:eu,setSavedCustomReportId:Q,setIsRenamingColumns:eU})]})]}),(0,n.jsx)(C.l0,{children:(0,n.jsx)(T.ZK,{tableInstance:ez,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,n.jsx)(T.s8,{totalRows:eP||0,pageSizes:s,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u||ej,onNextPageClick:S,isNextPageDisabled:A||ej,startRange:O,endRange:P}),(0,n.jsx)(N.Z,{selectedSystemId:X,resetSelectedSystemId:()=>J(void 0)})]})};var eC=()=>(0,n.jsxs)(c.Z,{title:"Datamap Report",children:[(0,n.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,n.jsx)(A,{children:(0,n.jsx)(ex,{})})]})}},function(e){e.O(0,[431,8765,9278,5163,9187,7245,9899,5258,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return t(96236)}])},59301:function(e,i,t){"use strict";var n=t(24246);let{Link:s}=t(87949).AntTypography;i.Z=e=>{let{children:i,...t}=e;return(0,n.jsx)(s,{target:"_blank",rel:"noopener noreferrer",...t,children:i})}},56358:function(e,i,t){"use strict";t.d(i,{q:function(){return s}});var n=t(24246);let s=(0,t(87949).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return g}});var n=t(24246),s=t(87949),r=t(88038),l=t.n(r),o=t(86677);t(27378);var a=t(25980),d=t(90867),c=t(42478),u=t(77830),p=()=>{let e=(0,o.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."," "]})]})})},g=e=>{let{children:i,title:t,padded:r=!0,mainProps:u}=e,g=(0,a.hz)(),h=(0,o.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,m=!(g.flags.messagingConfiguration&&x),{data:v}=(0,c.JE)(void 0,{skip:m}),{data:f}=(0,d.PW)(void 0,{skip:m}),b=g.flags.messagingConfiguration&&(!v||!f)&&x;return(0,n.jsxs)(s.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(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:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[b?(0,n.jsx)(p,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),s=t(87949),r=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:l=!0,children:o,rightContent:a,style:d,...c}=e;return(0,n.jsxs)("div",{...c,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,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof i?(0,n.jsx)(s.lQT,{className:t||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!t&&(0,n.jsx)(r.m,{className:o?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return l}});var n=t(24246),s=t(16134),r=t(31793);let l=e=>(0,s.C)(r.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return l(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},8133:function(e,i,t){"use strict";var n=t(24246),s=t(87949);i.Z=e=>{let{title:i,children:t,isOpen:r,onClose:l,modalContentProps:o,showCloseButton:a=!1,footer:d,...c}=e;return(0,n.jsxs)(s.u_l,{isOpen:r,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,n.jsx)(s.ZAr,{}),(0,n.jsxs)(s.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...o,children:[a&&(0,n.jsx)(s.olH,{}),(0,n.jsx)(s.xBx,{p:0,children:(0,n.jsx)(s.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(s.X6q,{as:"h3",size:"sm",children:i})})}),(0,n.jsx)(s.fef,{pb:4,overflow:"auto",children:t}),d&&(0,n.jsx)(s.mzw,{children:d})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),s=t(87949),r=t(79894),l=t.n(r),o=t(27378);let{Text:a}=s.AntTypography,d=e=>{let{items:i,...t}=e,r=(0,o.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let r=t===i.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,n.jsx)(s.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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[i]);return(0,n.jsx)(s.zrq,{items:r,...t})}},6675:function(e,i,t){"use strict";t.d(i,{ZS:function(){return o},a4:function(){return r}});var n=t(3228);let s=t(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:r}=s,l={purposes:{},special_purposes:{}},o=(0,n.P1)(s.endpoints.getPurposes.select(),e=>{let{data:i}=e;return i||l})},51263:function(e,i,t){"use strict";var n=t(24246),s=t(87949);i.Z=e=>{let{title:i,children:t,...r}=e;return(0,n.jsxs)(s.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(i),...r,children:[(0,n.jsx)(s.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:i}),t]})}},59512:function(e,i,t){"use strict";t.d(i,{Cu:function(){return o},Py:function(){return s},fj:function(){return l},uh:function(){return r}});var n=t(65735);let s=[1,3,4,5,6],r="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",l={[n.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[n.FF.REQUIRE_CONSENT]:"Require consent",[n.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},o={[n.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[n.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[n.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},42478:function(e,i,t){"use strict";t.d(i,{FU:function(){return d},JE:function(){return s},Ki:function(){return u},SU:function(){return p},W:function(){return g},h9:function(){return r},jc:function(){return n},qt:function(){return a},sn:function(){return c}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:l,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:a,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:p,useDeleteMessagingConfigurationByKeyMutation:g}=t(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,i,t,n)=>{let s=await n({url:"messaging/default/active"});return s.error&&404===s.error.status?{data:null}:s},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},60325:function(e,i,t){"use strict";t.d(i,{DD:function(){return o},Go:function(){return a},TK:function(){return s},Uv:function(){return c},k1:function(){return r},y3:function(){return u}});var n=t(65735);let s=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==i?i:[]},r=e=>{var i;return null!==(i=null==e?void 0:e.filter(e=>e.selected))&&void 0!==i?i:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],o={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:l,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0,cookie_deletion_based_on_host_domain:!0,allow_vendor_asset_disclosure:!1,asset_disclosure_include_types:[]},a=(e,i)=>{let t=i.find(i=>i.id===e.language);return t?t.name:e.language},d=e=>{var i,t,n,s,r,l,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:g}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:g,title:e.title,description:e.description,acknowledge_button_label:null!==(i=e.acknowledge_button_label)&&void 0!==i?i:void 0,banner_title:null!==(t=e.banner_title)&&void 0!==t?t:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(s=e.purpose_header)&&void 0!==s?s:void 0,privacy_policy_link_label:null!==(r=e.privacy_policy_link_label)&&void 0!==r?r:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(o=e.privacy_preferences_link_label)&&void 0!==o?o:void 0,save_button_label:null!==(a=e.save_button_label)&&void 0!==a?a:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:i,updated_at:t,privacy_notices:s,origin:r,id:l,...o}=e,a={...o,privacy_notice_ids:s?s.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]};return(a.component===n.re.BANNER_AND_MODAL||a.component===n.re.MODAL)&&a.allow_vendor_asset_disclosure&&(!a.asset_disclosure_include_types||0===a.asset_disclosure_include_types.length)&&(a.allow_vendor_asset_disclosure=!1),a},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},96236:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return Q}});var n=t(24246),s=t(87949),r=t(34090),l=t(27378),o=t(16134),a=t(25980),d=t(812),c=t(77213),u=t(58754),p=t(6675),g=t(46628),h=t(7426),x=t(40324);let m=e=>{let{children:i,purpose:t,endCol:r}=e;return(0,n.jsx)(s.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:r?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(t)?null:(0,n.jsx)(s.xuv,{children:i})})};var v=()=>{let{values:e,setFieldValue:i}=(0,r.u6)(),{purposes:t}=(0,o.C)(p.ZS);return(0,n.jsx)(r.F2,{name:"purposeOverrides",render:()=>(0,n.jsxs)(s.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,n.jsxs)(s.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,n.jsx)(s.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,n.jsx)(s.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,n.jsx)(s.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,n.jsx)(s.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,n.jsx)(s.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,n.jsx)(s.kCb,{flex:"1",alignItems:"center",children:(0,n.jsx)(s.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((r,l)=>(0,n.jsxs)(s.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,n.jsxs)(s.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",r.purpose,": ",t[r.purpose].name]}),(0,n.jsx)(s.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,n.jsx)(s.xuv,{children:(0,n.jsx)(x.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(i("purposeOverrides[".concat(l,"].is_consent"),!1),i("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(m,{purpose:r.purpose,children:(0,n.jsx)(x.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(m,{purpose:r.purpose,endCol:!0,children:(0,n.jsx)(x.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},r.purpose))]})})},f=t(59301),b=e=>{let{name:i,enabled:t}=e;return(0,n.jsxs)(s.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,n.jsxs)(s.xvT,{children:[i," status"," ",t?(0,n.jsx)(s.j8w,{color:"success",children:"Enabled"}):(0,n.jsx)(s.j8w,{color:"error",children:"Disabled"})]}),(0,n.jsxs)(s.xvT,{children:["To ",t?"disable":"enable"," ",i,", please contact your Fides administrator or"," ",(0,n.jsx)(f.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},_=t(46238),j=e=>{var i,t;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,r.U$)(c),g={...u,value:null!==(i=u.value)&&void 0!==i?i:""},h=!!(p.touched&&p.error),m=d?o[0]:void 0,v=null!==(t=o.find(e=>e.value===g.value))&&void 0!==t?t:m,f=e=>{g.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(s.NIc,{isInvalid:h,children:[(0,n.jsxs)(s.jqI,{className:"w-fit",children:[l?(0,n.jsx)(x.__,{children:l}):null,(0,n.jsx)(s.y02.Group,{onChange:f,value:null==v?void 0:v.value,"data-testid":"input-".concat(g.name),children:(0,n.jsx)(s.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:i,label:t,tooltip:r}=e;return(0,n.jsx)(s.y02,{value:i,"data-testid":"option-".concat(i),children:(0,n.jsxs)(s.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(s.xvT,{fontSize:"sm",fontWeight:"medium",children:t}),r?(0,n.jsx)(_.b,{label:r}):null]})},i)})})})]}),(0,n.jsx)(x.Bc,{isInvalid:h,message:p.error,fieldName:g.name})]}):(0,n.jsxs)(s.NIc,{isInvalid:h,children:[(0,n.jsxs)(s.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(x.__,{children:l}),(0,n.jsx)(s.y02.Group,{onChange:f,value:null==v?void 0:v.value,"data-testid":"input-".concat(g.name),children:(0,n.jsx)(s.jqI,{children:o.map(e=>(0,n.jsx)(s.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,n.jsx)(x.Bc,{isInvalid:h,message:p.error,fieldName:g.name})]})},y=t(65735),C=t(51263);let w=e=>{let{title:i,children:t}=e;return(0,n.jsxs)(s.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(i),children:[(0,n.jsx)(s.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:i}),t]})};var T=()=>{let{tcf:e}=(0,a.hz)(),i=!!(0,o.C)(h.D2).enabled,{values:t,setFieldValue:l}=(0,r.u6)(),d=!!t.gpp.us_approach;return(0,n.jsx)(C.Z,{title:"Global Privacy Platform",children:(0,n.jsxs)(s.Kqy,{spacing:6,children:[(0,n.jsx)(b,{name:"GPP",enabled:i}),i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{title:"GPP U.S.",children:(0,n.jsx)(j,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,n.jsxs)(w,{title:"MSPA",children:[(0,n.jsx)(x.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(l("gpp.mspa_service_provider_mode",!1),l("gpp.mspa_opt_out_option_mode",!1))}}),(0,n.jsx)(x.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!t.gpp.mspa_opt_out_option_mode||!t.gpp.mspa_covered_transactions}),(0,n.jsx)(x.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!t.gpp.mspa_service_provider_mode||!t.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{color:"gray.200"}),(0,n.jsxs)(w,{title:"GPP Europe",children:[(0,n.jsx)(s.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,n.jsx)(x.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=t(64781),k=t(60325),q=()=>{var e,i,t;let{tcf:l}=(0,a.hz)(),{values:o,setFieldValue:d}=(0,r.u6)(),{data:c,isLoading:u}=(0,S.gT)(),p=[...(0,k.k1)(null!==(i=null==c?void 0:c.locations)&&void 0!==i?i:[]),...(0,k.k1)(null!==(t=null==c?void 0:c.location_groups)&&void 0!==t?t:[])].sort((e,i)=>e.name<i.name?-1:1);return l?(0,n.jsxs)(C.Z,{title:"Publisher settings",children:[(0,n.jsx)(s.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,n.jsx)(s.PPS.Item,{label:"Publisher country",htmlFor:"publisher_country_code",children:(0,n.jsx)(s.AOh,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:u,allowClear:!0,options:(0,s.Ky_)(null==p?void 0:p.map(e=>e.id)),placeholder:"Select a country",value:null===(e=o.tcfPublisherSettings.publisher_country_code)||void 0===e?void 0:e.replace("_","-").toUpperCase(),onChange:e=>d("tcfPublisherSettings.publisher_country_code",null==e?void 0:e.toLowerCase()),className:"!w-80"})})]}):null},E=t(52955),I=t(71795),N=t(59512),P=t(55484),O=t(8133),L=t(31883);let F=P.Ry().shape({name:P.Z_().required().label("Name")}),R=e=>{let{isOpen:i,onClose:t,onSuccess:l}=e,o=(0,s.pmc)(),[a]=(0,E.LK)(),c=async e=>{let i=await a({name:e.name});(0,L.D4)(i)?o((0,g.Vo)((0,d.e$)(i.error))):(o((0,g.t5)("Successfully created TCF configuration")),null==l||l(i.data.id),t())};return(0,n.jsx)(O.Z,{title:"Create a new TCF configuration",isOpen:i,onClose:t,children:(0,n.jsx)(r.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:i,dirty:l}=e;return(0,n.jsx)(r.l0,{children:(0,n.jsxs)(s.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,n.jsx)(s.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,n.jsx)(x.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsxs)(s.vyj,{className:"w-full justify-end pt-6",children:[(0,n.jsx)(s.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(s.wpx,{type:"primary",htmlType:"submit",disabled:!i||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=t(79894),M=t.n(A);let z=e=>{let{width:i,style:t,borderLeft:r=!1,borderRight:l=!1,...o}=e;return(0,n.jsx)(s.jqI,{align:"center",className:"h-full px-4",...o,style:{borderLeft:r?"solid 1px":"none",borderRight:l?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:i,...t},role:"cell"})},D=e=>{let{width:i,style:t,borderLeft:r=!1,children:l,...o}=e;return(0,n.jsx)(s.jqI,{align:"center",role:"columnheader",className:"px-4",...o,style:{borderLeft:r?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:i,...t},children:l})},W=e=>{let{isHeader:i=!1,isLastRow:t=!1,style:r,...l}=e;return(0,n.jsx)(s.jqI,{role:i?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:i?"var(--fidesui-bg-default)":void 0,borderBottom:t?"none":"solid 1px",borderColor:"var(--ant-color-border)",...r}})},Z=e=>{let{config:i,isLoading:t,style:r,...l}=e,{purposes:a}=(0,o.C)(p.ZS);return(0,n.jsxs)(s.jqI,{vertical:!0,...l,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...r},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,n.jsxs)(W,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(D,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(D,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(_.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,n.jsxs)(D,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(_.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,r)=>(0,n.jsxs)(W,{isLastRow:r===Object.values(a).length-1,children:[(0,n.jsxs)(z,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(z,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:t?(0,n.jsx)(s.OdW,{height:"16px",width:"100%"}):(()=>{var t;let r=(null==i?void 0:null===(t=i.restriction_types_per_purpose)||void 0===t?void 0:t[e.id])||[];return 0===r.length?"none":1===r.length?(0,n.jsx)(s.xvT,{size:"sm",whiteSpace:"nowrap",children:N.fj[r[0]]}):(0,n.jsxs)(s.xvT,{children:[r.length," restrictions"]})})()}),(0,n.jsx)(z,{width:"100px",borderLeft:!0,children:N.Py.includes(e.id)?(0,n.jsx)(s.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,n.jsx)(s.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,n.jsx)(z,{width:"100px",borderLeft:!0,children:(0,n.jsx)(M(),{href:"/settings/consent/".concat(null==i?void 0:i.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(s.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var H=t(56358),V=t(19904);let U=()=>(0,n.jsxs)(s.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(s.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(s.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(s.OdW,{width:"100%",className:"h-4"})]}),B=e=>{let{searchResults:i,selectedConfigId:t,handleSelection:r,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(s.y02.Group,{onChange:e=>r(e.target.value),value:t,className:"flex flex-col gap-2",children:i.map(e=>(0,n.jsxs)(s.jqI,{className:l?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,n.jsx)(s.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,n.jsx)(s.xvT,{className:"text-sm",children:e.name})}),l&&(0,n.jsx)(s.wpx,{type:"text",size:"small","aria-label":"Delete",icon:(0,n.jsx)(H.q,{fontSize:16}),onClick:i=>{i.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},G=e=>{let i,{searchTerm:t,setSearchTerm:r,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:g,setConfigToDelete:h,isLoading:x,setDropdownOpen:m,configurations:v}=e,[f,b]=(0,l.useState)(a);return(0,l.useEffect)(()=>{b(a)},[a]),i=x?(0,n.jsx)(U,{}):0===o.length?(0,n.jsx)(s.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(B,{searchResults:o,selectedConfigId:f,handleSelection:e=>{b(e)},userCanDeleteConfigs:u,onDeleteOpen:g,setConfigToDelete:h}),(0,n.jsxs)(s.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,n.jsx)(s.wpx,{type:"text",size:"small","aria-label":"Close",icon:(0,n.jsx)(s.Two,{}),onClick:()=>m(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[v.length>10&&(0,n.jsx)(s.BZy,{size:"sm",children:(0,n.jsx)(s.AntInput,{className:"mb-4",placeholder:"Search...",onChange:e=>r(e.target.value),value:t})}),i,(0,n.jsxs)(s.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(s.wpx,{size:"small",onClick:()=>{p(),m(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(s.wpx,{size:"small",onClick:()=>d(f),className:"flex-1","data-testid":"apply-config-button",disabled:f===a,children:"Apply"})]})]})},K=e=>(0,n.jsx)(G,{...e}),$=e=>{var i;let{selectedConfigId:t,configurations:r,isLoading:o=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,V.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,V.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),g=(0,s.pmc)({id:"tcf-config-toast"}),[h]=(0,E.Cm)(),{isOpen:x,onOpen:m,onClose:v}=(0,s.qY0)(),{isOpen:f,onOpen:b,onClose:_}=(0,s.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),q=(0,l.useMemo)(()=>j?r.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):r,[r,j]),I=(0,l.useMemo)(()=>r.find(e=>e.id===t),[r,t]),N=null!==(i=null==I?void 0:I.name)&&void 0!==i?i:"Select Configuration",P=e=>{a(e),k(!1)},O=async e=>{try{await h(e).unwrap(),null==c||c(e),T(void 0),_(),g({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){g({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.S0p,{open:S,onOpenChange:k,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>K({searchTerm:j,setSearchTerm:C,searchResults:q,selectedConfigId:t,handleSelection:P,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:m,onDeleteOpen:b,setConfigToDelete:T,isLoading:o,setDropdownOpen:k,configurations:r}),children:(0,n.jsx)(s.wpx,{icon:(0,n.jsx)(s.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:N})}),(0,n.jsx)(R,{isOpen:x,onClose:v,onSuccess:e=>{a(e)}}),(0,n.jsx)(s.cVQ,{isOpen:f,onClose:()=>{T(void 0),_()},onConfirm:()=>{w&&O(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var Y=t(32885);let X=e=>{let{defaultChecked:i,onChange:t,...r}=e,o=(0,s.pmc)(),[a,c]=(0,l.useState)(i),[u,p]=(0,l.useState)(!1),{isLoading:x}=(0,Y.x8)(),[m,{isLoading:v}]=(0,h.L)(),[f]=(0,Y.M7)(),{data:b}=(0,Y.n3)(void 0,{skip:x}),j=async e=>{let i=await m({consent:{override_vendor_purposes:e}});e&&b&&await f(b.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(i=>{if(o.closeAll(),null==t||t(e),(0,L.D4)(i)){let e=(0,d.e$)(i.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==t||t(!1),o((0,g.Vo)(e))}})(i)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(s.xvT,{children:"Configure overrides for TCF related purposes."}),(0,n.jsxs)(s.vyj,{size:"small",children:[(0,n.jsx)(s.rAg,{size:"small",disabled:v,loading:v,...r,checked:a,defaultChecked:i,onClick:e=>{e?(c(e),j(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,n.jsx)(s.xvT,{children:"Override vendor purposes"}),(0,n.jsx)(_.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,n.jsx)(s.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),j(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},J=e=>{var i;let{isTCFOverrideEnabled:t}=e,[r,o]=(0,l.useState)(t),[a,d]=(0,l.useState)(!1),[c,u]=(0,I._)("selectedTCFConfigId",null),{data:p,isLoading:g}=(0,E.LS)({page:1,size:50},{skip:!t}),{data:h,isFetching:x}=(0,E.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,i;!g&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),g||!c||(null==p?void 0:null===(i=p.items)||void 0===i?void 0:i.length)||u(null)},[g,null==p?void 0:p.items,c,u]),(0,n.jsxs)(C.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,n.jsxs)(s.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,n.jsx)(X,{defaultChecked:r,onChange:e=>o(e)}),r&&(0,n.jsxs)(n.Fragment,{children:[g&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.OdW,{height:"20px"}),(0,n.jsx)(s.OdW,{height:"20px"}),(0,n.jsx)(s.OdW,{height:"32px",width:"200px"})]}),!g&&(null==p?void 0:null===(i=p.items)||void 0===i?void 0:i.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,n.jsxs)(s.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,n.jsx)(f.Z,{href:N.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)($,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,n.jsx)(f.Z,{href:N.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(s.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,n.jsx)(R,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),r&&c&&(0,n.jsx)(Z,{className:"mt-3",config:h,isLoading:x})]})};var Q=()=>{var e,i;let{isLoading:t}=(0,Y.x8)(),{tcf:x}=(0,a.hz)(),{data:m,isLoading:f}=(0,Y.n3)(void 0,{skip:t||!x}),[_,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,h.tB)({api_set:!0}),{data:k,isLoading:E}=(0,h.tB)({api_set:!1}),[I]=(0,h.L)(),N=(0,o.C)(h.D2),P=(0,o.C)(h.Yh),O=(0,l.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!k&&null!=k&&!!k.consent&&"override_vendor_purposes"in k.consent&&k.consent.override_vendor_purposes,[w,k]),{isLoading:L}=(0,p.a4)(),F=(0,s.pmc)(),R=async e=>{var i;let t=e=>{if(F.closeAll(),(0,d.D4)(e)){let i=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,g.Vo)(i))}else F((0,g.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let i;return e.is_consent&&(i=y.I$.CONSENT),e.is_legitimate_interest&&(i=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:i}})];if(O){let e=await _(n);if((0,d.D4)(e)){t(e);return}}let{enabled:s,...r}=e.gpp;t(await I({gpp:r,plus_consent_settings:{tcf_publisher_country_code:null!==(i=e.tcfPublisherSettings.publisher_country_code)&&void 0!==i?i:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:m?m.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:N,tcfPublisherSettings:{publisher_country_code:P.tcf_publisher_country_code}}),[m,N,P]),M=(0,l.useMemo)(()=>(null==m?void 0:m.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[m]),z=null===(i=(0,a.hz)())||void 0===i?void 0:null===(e=i.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:t||L||f||S||E?(0,n.jsx)(s.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,n.jsx)(s.$jN,{})}):(0,n.jsxs)(s.xuv,{"data-testid":"consent-configuration",children:[(0,n.jsx)(u.Z,{heading:"Consent settings"}),(0,n.jsxs)(s.Kqy,{spacing:3,mb:3,children:[(0,n.jsx)(C.Z,{title:"Transparency & Consent Framework settings",children:(0,n.jsx)(b,{name:"TCF",enabled:x})}),x&&!M&&z&&(0,n.jsx)(J,{isTCFOverrideEnabled:O})]}),(0,n.jsx)(r.J9,{initialValues:A,enableReinitialize:!0,onSubmit:R,children:e=>{let{dirty:i,isValid:t,isSubmitting:l}=e;return(0,n.jsx)(r.l0,{children:(0,n.jsxs)(s.Kqy,{spacing:6,children:[x&&(M||!z)&&(0,n.jsxs)(C.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,n.jsx)(X,{defaultChecked:O,disabled:j}),O&&(0,n.jsxs)(s.Kqy,{mt:2,spacing:2,children:[(0,n.jsx)(s.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,n.jsx)(s.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,n.jsx)(v,{})]})]}),(0,n.jsx)(q,{}),(0,n.jsx)(T,{}),(0,n.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},31883:function(e,i,t){"use strict";t.d(i,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=t(19043)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4065],{74833:function(e,t,n){var i=n(56127),a=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(a,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},66726:function(e,t,n){var i=n(11611),a=n(82846),r=n(91936),o=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,d,f,p,m=0,h=!1,v=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function T(t){var n=s,i=u;return s=u=void 0,m=t,d=e.apply(i,n)}function x(e){var n=e-p,i=e-m;return void 0===p||n>=t||n<0||v&&i>=c}function E(){var e,n,i,r=a();if(x(r))return S(r);f=setTimeout(E,(e=r-p,n=r-m,i=t-e,v?l(i,c-n):i))}function S(e){return(f=void 0,y&&s)?T(e):(s=u=void 0,d)}function _(){var e,n=a(),i=x(n);if(s=arguments,u=this,p=n,i){if(void 0===f)return m=e=p,f=setTimeout(E,t),h?T(e):d;if(v)return clearTimeout(f),f=setTimeout(E,t),T(p)}return void 0===f&&(f=setTimeout(E,t)),d}return t=r(t)||0,i(n)&&(h=!!n.leading,c=(v="maxWait"in n)?o(r(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,s=p=u=f=void 0},_.flush=function(){return void 0===f?d:S(a())},_}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},55193:function(e,t,n){var i=n(99736),a=n(92360);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==i(e)}},82846:function(e,t,n){var i=n(77400);e.exports=function(){return i.Date.now()}},91936:function(e,t,n){var i=n(74833),a=n(11611),r=n(55193),o=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return o;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):l.test(e)?o:+e}},1770:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/custom-fields",function(){return n(5810)}])},30952:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var i=n(24246),a=n(66726),r=n.n(a),o=n(27378),l=n(26917);let s=e=>{let{value:t,onChange:n,placeholder:a,...s}=e,[u,c]=(0,o.useState)(t);(0,o.useEffect)(()=>{c(t||"")},[t]);let d=r()(n,500),f=(0,o.useCallback)(e=>{c(e),d(e)},[]);return(0,i.jsx)(l.Z,{value:u,onChange:f,onClear:()=>{c(""),n("")},placeholder:a,...s})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return o}});var i=n(24246),a=n(16134),r=n(31793);let o=e=>(0,a.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return o(t)?(0,i.jsx)(i.Fragment,{children:n}):null}},8917:function(e,t,n){"use strict";n.d(t,{C7:function(){return l},P3:function(){return u},TY:function(){return s},Uv:function(){return a},uP:function(){return o}});var i,a,r=n(65735);let o=new Map([[r.P6.SYSTEM,"system:information"],[r.P6.DATA_USE,"taxonomy:data use"],[r.P6.DATA_CATEGORY,"taxonomy:data category"],[r.P6.DATA_SUBJECT,"taxonomy:data subject"],[r.P6.PRIVACY_DECLARATION,"system:data use"]]);(i=a||(a={})).SINGLE_SELECT="singleSelect",i.MULTIPLE_SELECT="multipleSelect",i.OPEN_TEXT="openText";let l=[{label:"taxonomy:".concat(r.P6.DATA_CATEGORY),value:r.P6.DATA_CATEGORY},{label:"taxonomy:".concat(r.P6.DATA_SUBJECT),value:r.P6.DATA_SUBJECT},{label:"taxonomy:".concat(r.P6.DATA_USE),value:r.P6.DATA_USE},{label:"".concat(r.P6.SYSTEM,":information"),value:r.P6.SYSTEM},{label:"system:data use",value:r.P6.PRIVACY_DECLARATION}],s=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open text",value:"openText"}],u={singleSelect:"Single-value select",multipleSelect:"Multi-value select",openText:"Open text"}},66236:function(e,t,n){"use strict";n.d(t,{S:function(){return o},_:function(){return r}});var i=n(8917),a=n(65735);let r=e=>e.field_type===a.AL.STRING_?i.Uv.MULTIPLE_SELECT:e.allow_list_id?i.Uv.SINGLE_SELECT:i.Uv.OPEN_TEXT,o=e=>i.P3[r(e)]},5810:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return S}});var i=n(24246),a=n(77213),r=n(87949),o=n(27378),l=n(58754),s=n(30952),u=n(86677),c=n(77830),d=n(19904),f=n(8125),p=n(8917),m=n(72625),h=n(32885),v=e=>{var t;let{field:n,isDisabled:a}=e,[r,{isLoading:o}]=(0,h.yM)(),l=async e=>r({...n,active:e});return(0,i.jsx)(m.S1,{enabled:null!==(t=n.active)&&void 0!==t&&t,onToggle:l,title:"Disable custom field",message:"Are you sure you want to disable this custom field?",isDisabled:a,"aria-label":n.active?"Disable custom field":"Enable custom field",loading:o})},y=n(66236),T=n(65735),x=()=>{let e=(0,f.o)({pagination:{defaultPageSize:25,pageSizeOptions:[10,25,50]},search:{defaultSearchQuery:""}}),t=(0,u.useRouter)(),{data:n,isLoading:a}=(0,h.GH)(),{tableProps:l}=(0,f.V)(e,{dataSource:n||[],totalRows:(null==n?void 0:n.length)||0,isLoading:a,customTableProps:{layout:"fixed",sticky:{offsetHeader:40}}}),s=(0,d.Tg)([T.Sh.CUSTOM_FIELD_UPDATE]);return{tableProps:l,columns:(0,o.useMemo)(()=>[{title:"Name",dataIndex:"name",key:"name",filteredValue:e.searchQuery?[e.searchQuery]:null,onFilter:(e,t)=>t.name.toLowerCase().includes(e.toString().toLowerCase())},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,i.jsx)(r.AntTypography.Text,{ellipsis:{tooltip:e},className:"w-96",children:e}),width:384},{title:"Type",dataIndex:"field_type",key:"field_type",render:(e,t)=>(0,y.S)(t)},{title:"Applies to",dataIndex:"resource_type",key:"resource_type",render:e=>p.uP.get(e)||e},{title:"Enabled",dataIndex:"active",key:"active",hidden:!s,render:(e,t)=>(0,i.jsx)(v,{field:t,isDisabled:!s}),width:96},{title:"Actions",key:"actions",render:(e,n)=>(0,i.jsx)(r.jqI,{gap:"middle",children:(0,i.jsx)(r.wpx,{size:"small",onClick:()=>t.push("".concat(c.WC,"/").concat(n.id)),"data-testid":"edit-btn",children:"Edit"})}),hidden:!s,width:96}],[t,s,e.searchQuery,s]),searchQuery:e.searchQuery,updateSearch:e.updateSearch,onAddClick:()=>t.push("".concat(c.WC,"/new"))}},E=()=>{let{tableProps:e,columns:t,searchQuery:n,updateSearch:a,onAddClick:o}=x();return(0,i.jsxs)(r.jqI,{vertical:!0,gap:"middle","data-testid":"custom-fields-management",children:[(0,i.jsxs)(r.jqI,{justify:"space-between",className:"sticky -top-6 z-10 bg-white py-4",children:[(0,i.jsx)(s.f,{value:n,onChange:a,placeholder:"Search custom fields..."}),(0,i.jsx)(r.wpx,{onClick:o,type:"primary","data-testid":"add-custom-field-btn",children:"Add custom field"})]}),(0,i.jsx)(r.V5H,{...e,columns:t,className:"-mt-4"})]})},S=()=>(0,i.jsxs)(a.Z,{title:"Custom fields",children:[(0,i.jsx)(l.Z,{heading:"Custom fields",isSticky:!1,className:"pb-0",children:(0,i.jsx)(r.AntTypography.Paragraph,{className:"max-w-screen-md",children:"Custom fields provide organizations with the capability to capture metrics that are unique to their specific needs, allowing them to create customized reports. These fields can be added to either systems or elements within a taxonomy, and once added, they become reportable fields that are visible on the data map."})}),(0,i.jsx)(E,{})]})}},function(e){e.O(0,[431,7245,8563,2888,9774,179],function(){return e(e.s=1770)}),_N_E=e.O()}]);