ethyca-fides 2.58.2b2__py2.py3-none-any.whl → 2.58.2b5__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. {ethyca_fides-2.58.2b2.dist-info → ethyca_fides-2.58.2b5.dist-info}/METADATA +20 -11
  2. {ethyca_fides-2.58.2b2.dist-info → ethyca_fides-2.58.2b5.dist-info}/RECORD +118 -115
  3. {ethyca_fides-2.58.2b2.dist-info → ethyca_fides-2.58.2b5.dist-info}/WHEEL +1 -1
  4. {ethyca_fides-2.58.2b2.dist-info → ethyca_fides-2.58.2b5.dist-info}/entry_points.txt +0 -1
  5. fides/_version.py +3 -3
  6. fides/api/alembic/migrations/versions/9288f729cac4_add_tcf_configuration_fk_to_experience_.py +62 -0
  7. fides/api/alembic/migrations/versions/99c603c1b8f9_add_password_login_enabled_and_totp_secret_to_fidesuser.py +45 -0
  8. fides/api/api/v1/endpoints/user_endpoints.py +8 -12
  9. fides/api/models/detection_discovery.py +31 -0
  10. fides/api/models/fides_user.py +26 -9
  11. fides/api/models/fides_user_invite.py +2 -0
  12. fides/api/models/privacy_experience.py +26 -0
  13. fides/api/models/tcf_publisher_restrictions.py +209 -48
  14. fides/api/schemas/user.py +5 -1
  15. fides/api/service/deps.py +9 -0
  16. fides/api/util/collection_util.py +48 -9
  17. fides/cli/commands/pull.py +77 -13
  18. fides/core/api.py +2 -1
  19. fides/core/pull.py +38 -7
  20. fides/service/user/__init__.py +0 -0
  21. fides/service/user/user_service.py +140 -0
  22. fides/ui-build/static/admin/404.html +1 -1
  23. fides/ui-build/static/admin/_next/static/{F-2Pz9ByzGwcvQtVLstwR → _o6WH0hDzNEhnUJyvLex7}/_buildManifest.js +1 -1
  24. fides/ui-build/static/admin/_next/static/chunks/1376-87058e04584cff20.js +1 -0
  25. fides/ui-build/static/admin/_next/static/chunks/4121-4d5273d7a354994d.js +1 -0
  26. fides/ui-build/static/admin/_next/static/chunks/{4450-6a8aa0d7358ac26f.js → 4450-9c3086ccb55c66aa.js} +1 -1
  27. fides/ui-build/static/admin/_next/static/chunks/6315-24a0483ee1cab6cc.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/{9046-8a5fdd335a76d224.js → 9046-a69fa8f99c414570.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-4a5be35cd8f832c0.js → _app-0c1548ca3b158123.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-17d1525551d8904f.js +1 -0
  31. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-7d2cb947eee11262.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-9ef6b422ae7bc2a8.js → [id]-b75ab4ee677f118d.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-26407674949bcbc4.js +1 -0
  34. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-28d4bdf060ec8cb2.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-208e49ef43361d6f.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff1985f72d50ef47.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5a0b10ec955097d4.js +1 -0
  38. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-f8bca2e322ddf252.js → new-082c3156175f9267.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-af83245e9373a064.js +1 -0
  40. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  41. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  42. fides/ui-build/static/admin/add-systems.html +1 -1
  43. fides/ui-build/static/admin/ant-poc.html +1 -1
  44. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  45. fides/ui-build/static/admin/consent/configure.html +1 -1
  46. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  47. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  48. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  49. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  50. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  51. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  52. fides/ui-build/static/admin/consent/properties.html +1 -1
  53. fides/ui-build/static/admin/consent/reporting.html +1 -1
  54. fides/ui-build/static/admin/consent.html +1 -1
  55. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  56. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  57. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  58. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  59. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  60. fides/ui-build/static/admin/data-catalog.html +1 -1
  61. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  62. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  63. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  64. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  65. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  66. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  67. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  68. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  69. fides/ui-build/static/admin/datamap.html +1 -1
  70. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  71. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  72. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  73. fides/ui-build/static/admin/dataset/new.html +1 -1
  74. fides/ui-build/static/admin/dataset.html +1 -1
  75. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  76. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  77. fides/ui-build/static/admin/datastore-connection.html +1 -1
  78. fides/ui-build/static/admin/index.html +1 -1
  79. fides/ui-build/static/admin/integrations/[id].html +1 -1
  80. fides/ui-build/static/admin/integrations.html +1 -1
  81. fides/ui-build/static/admin/lib/fides-tcf.js +1 -1
  82. fides/ui-build/static/admin/login/[provider].html +1 -1
  83. fides/ui-build/static/admin/login.html +1 -1
  84. fides/ui-build/static/admin/messaging/[id].html +1 -1
  85. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  86. fides/ui-build/static/admin/messaging.html +1 -1
  87. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  88. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  89. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  90. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  91. fides/ui-build/static/admin/privacy-requests.html +1 -1
  92. fides/ui-build/static/admin/properties/[id].html +1 -1
  93. fides/ui-build/static/admin/properties/add-property.html +1 -1
  94. fides/ui-build/static/admin/properties.html +1 -1
  95. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  96. fides/ui-build/static/admin/settings/about.html +1 -1
  97. fides/ui-build/static/admin/settings/consent.html +1 -1
  98. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  99. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  100. fides/ui-build/static/admin/settings/domains.html +1 -1
  101. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  102. fides/ui-build/static/admin/settings/locations.html +1 -1
  103. fides/ui-build/static/admin/settings/organization.html +1 -1
  104. fides/ui-build/static/admin/settings/regulations.html +1 -1
  105. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  106. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  107. fides/ui-build/static/admin/systems.html +1 -1
  108. fides/ui-build/static/admin/taxonomy.html +1 -1
  109. fides/ui-build/static/admin/user-management/new.html +1 -1
  110. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  111. fides/ui-build/static/admin/user-management.html +1 -1
  112. fides/api/service/user/fides_user_service.py +0 -128
  113. fides/ui-build/static/admin/_next/static/chunks/1150-2642cd9cdc8a52f6.js +0 -1
  114. fides/ui-build/static/admin/_next/static/chunks/1376-03e7f50e708b7589.js +0 -1
  115. fides/ui-build/static/admin/_next/static/chunks/6315-1adb10a8b98b4a13.js +0 -1
  116. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-719949074f10bd6e.js +0 -1
  117. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-4892603e743cd6ab.js +0 -1
  118. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +0 -1
  119. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-5e2687ab5ab10275.js +0 -1
  120. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-2914aade73dcaecc.js +0 -1
  121. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-3ac1e5d3de5dd4a7.js +0 -1
  122. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +0 -1
  123. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-c0378fd1a26a71da.js +0 -1
  124. {ethyca_fides-2.58.2b2.dist-info → ethyca_fides-2.58.2b5.dist-info/licenses}/LICENSE +0 -0
  125. {ethyca_fides-2.58.2b2.dist-info → ethyca_fides-2.58.2b5.dist-info}/top_level.txt +0 -0
  126. /fides/ui-build/static/admin/_next/static/{F-2Pz9ByzGwcvQtVLstwR → _o6WH0hDzNEhnUJyvLex7}/_ssgManifest.js +0 -0
  127. /fides/ui-build/static/admin/_next/static/chunks/{1817-f82105a9608bba1a.js → 1817-48e1c9d3504e18f0.js} +0 -0
  128. /fides/ui-build/static/admin/_next/static/chunks/{6954-baa1d873abfe8b77.js → 6954-ec5276bb464d42b2.js} +0 -0
  129. /fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-b0f801d66e79a31a.js → privacy-requests-fd81714d811db7b3.js} +0 -0
  130. /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-3ca3c687e72d1364.js → user-management-a1db56f1cbfba373.js} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8443],{74833:function(t,e,n){var i=n(56127),r=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(r,""):t}},56127:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},66726:function(t,e,n){var i=n(11611),r=n(82846),s=n(91936),o=Math.max,a=Math.min;t.exports=function(t,e,n){var u,l,c,d,p,g,f=0,m=!1,v=!1,y=!0;if("function"!=typeof t)throw TypeError("Expected a function");function h(e){var n=u,i=l;return u=l=void 0,f=e,d=t.apply(i,n)}function x(t){var n=t-g,i=t-f;return void 0===g||n>=e||n<0||v&&i>=c}function j(){var t,n,i,s=r();if(x(s))return _(s);p=setTimeout(j,(t=s-g,n=s-f,i=e-t,v?a(i,c-n):i))}function _(t){return(p=void 0,y&&u)?h(t):(u=l=void 0,d)}function b(){var t,n=r(),i=x(n);if(u=arguments,l=this,g=n,i){if(void 0===p)return f=t=g,p=setTimeout(j,e),m?h(t):d;if(v)return clearTimeout(p),p=setTimeout(j,e),h(g)}return void 0===p&&(p=setTimeout(j,e)),d}return e=s(e)||0,i(n)&&(m=!!n.leading,c=(v="maxWait"in n)?o(s(n.maxWait)||0,e):c,y="trailing"in n?!!n.trailing:y),b.cancel=function(){void 0!==p&&clearTimeout(p),f=0,u=g=l=p=void 0},b.flush=function(){return void 0===p?d:_(r())},b}},11611:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},55193:function(t,e,n){var i=n(99736),r=n(92360);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==i(t)}},82846:function(t,e,n){var i=n(77400);t.exports=function(){return i.Date.now()}},91936:function(t,e,n){var i=n(74833),r=n(11611),s=n(55193),o=0/0,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(s(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=u.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):a.test(t)?o:+t}},40741:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center",function(){return n(51500)}])},77213:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var i=n(24246),r=n(77181),s=n(88038),o=n.n(s),a=n(86677);n(27378);var u=n(25980),l=n(90867),c=n(77830),d=()=>{let t=(0,a.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{t.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=t=>{let{children:e,title:n,padded:s=!0,mainProps:c}=t,p=(0,u.hz)(),g=(0,a.useRouter)(),f="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,m=!(p.flags.privacyRequestsConfiguration&&f),{data:v}=(0,l.JE)(void 0,{skip:m}),{data:y}=(0,l.PW)(void 0,{skip:m}),h=p.flags.privacyRequestsConfiguration&&(!v||!y)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[h?(0,i.jsx)(d,{}):null,e]})]})}},58754:function(t,e,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);e.Z=t=>{let{heading:e,breadcrumbItems:n,isSticky:o=!0,children:a,rightContent:u,style:l,...c}=t;return(0,i.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof e?(0,i.jsx)(r.X6q,{className:n||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:e}):e,u&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:u})]}),!!n&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},70788:function(t,e,n){"use strict";n.d(e,{m:function(){return l}});var i=n(24246),r=n(77181),s=n(79894),o=n.n(s),a=n(27378);let{Text:u}=r.AntTypography,l=t=>{let{items:e,...n}=t,s=(0,a.useMemo)(()=>null==e?void 0:e.map((t,n)=>{let s=n===e.length-1,a={...t},l=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(u,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),l)?a.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[e]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(t,e,n){"use strict";n.d(e,{D2:function(){return p},L:function(){return a},U7:function(){return l},Yh:function(){return f},ak:function(){return u},iR:function(){return v},km:function(){return o},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:t=>({getConfigurationSettings:t.query({query:t=>{let{api_set:e}=t;return{url:"/config",method:"GET",params:{api_set:e}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PUT",body:t}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PATCH",body:t}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:o,usePatchConfigurationSettingsMutation:a}=r,u=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{var i,r,s;let{data:o}=e,{data:a}=n;return{configSet:{cors_origins:(null==a?void 0:null===(i=a.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(r=a.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==o?void 0:null===(s=o.security)||void 0===s?void 0:s.cors_origins)||[]}}}),l=()=>(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0})],(t,e)=>{let{data:n}=e;return n}),c={enabled:!1,cmp_api_required:!1},d=(t,e,n,i)=>{let r=n&&n[t],s=i&&i[t];return r&&s?{...i[t],...n[t]}:s?i[t]:r?{...n[t]}:e},p=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return d("gpp",c,i,r)}),g={tcf_publisher_country_code:null},f=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return d("plus_consent_settings",g,i,r)}),m={allow_username_password_login:!1},v=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return d("plus_security_settings",m,i,r)})},57454:function(t,e,n){"use strict";n.d(e,{M:function(){return u}});var i=n(24246),r=n(66726),s=n.n(r),o=n(27378),a=n(86780);let u=t=>{let{value:e,onChange:n}=t,[r,u]=(0,o.useState)(e),l=s()(n,500),c=(0,o.useCallback)(t=>{u(t),l(t)},[]);return(0,i.jsx)(a.Z,{search:r,onChange:c,onClear:()=>{u(""),n("")}})}},37059:function(t,e,n){"use strict";n.d(e,{Ak:function(){return g},EY:function(){return c},Ud:function(){return s},Vr:function(){return f},WJ:function(){return a},nP:function(){return l},nS:function(){return d},rs:function(){return u},sX:function(){return p},wi:function(){return o}});var i=n(78780),r=n(16394);let{useGetAggregateMonitorResultsQuery:s,useGetDiscoveredSystemAggregateQuery:o,useGetDiscoveredAssetsQuery:a,useAddMonitorResultSystemsMutation:u,useIgnoreMonitorResultSystemsMutation:l,useAddMonitorResultAssetsMutation:c,useIgnoreMonitorResultAssetsMutation:d,useUpdateAssetsSystemMutation:p,useUpdateAssetsDataUseMutation:g,useUpdateAssetsMutation:f}=i.u.injectEndpoints({endpoints:t=>({getAggregateMonitorResults:t.query({query:t=>{let{page:e=1,size:n=20,search:i}=t;return{url:"/plus/discovery-monitor/aggregate-results",params:{page:e,size:n,search:i,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredSystemAggregate:t.query({query:t=>{let{key:e,page:n=1,size:i=20,search:r}=t;return{url:"/plus/discovery-monitor/system-aggregate-results",params:{monitor_config_id:e,page:n,size:i,search:r,diff_status:"addition"}}},providesTags:["Discovery Monitor Results"]}),getDiscoveredAssets:t.query({query:t=>{let{key:e,system:n,page:i=1,size:r=20,search:s,diff_status:o}=t;return{url:"/plus/discovery-monitor/".concat(e,"/results"),params:{resolved_system_id:n,page:i,size:r,search:s,diff_status:o,sort_by:"urn"}}},providesTags:()=>["Discovery Monitor Results"]}),addMonitorResultSystems:t.mutation({query:t=>{let{monitor_config_key:e,resolved_system_ids:n}=t,i=(0,r.du)(n,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(e,"/promote?").concat(i)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultSystems:t.mutation({query:t=>{let{monitor_config_key:e,resolved_system_ids:n}=t,i=(0,r.du)(n,"resolved_system_ids");return{method:"POST",url:"/plus/discovery-monitor/".concat(e,"/mute?").concat(i)}},invalidatesTags:["Discovery Monitor Results"]}),addMonitorResultAssets:t.mutation({query:t=>{var e;let n=new URLSearchParams;return null===(e=t.urnList)||void 0===e||e.forEach(t=>n.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/promote?".concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),ignoreMonitorResultAssets:t.mutation({query:t=>{var e;let n=new URLSearchParams;return null===(e=t.urnList)||void 0===e||e.forEach(t=>n.append("staged_resource_urns",t)),{method:"POST",url:"/plus/discovery-monitor/mute?".concat(n)}},invalidatesTags:["Discovery Monitor Results"]}),updateAssetsSystem:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.urnList.map(e=>({urn:e,user_assigned_system_key:t.systemKey}))}),invalidatesTags:["Discovery Monitor Results","System Assets"]}),updateAssetsDataUse:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.urnList.map(e=>({urn:e,user_assigned_data_uses:t.dataUses}))}),invalidatesTags:["Discovery Monitor Results"]}),updateAssets:t.mutation({query:t=>({method:"PATCH",url:"/plus/discovery-monitor/".concat(t.monitorId,"/results"),body:t.assets}),invalidatesTags:["Discovery Monitor Results"]})})})},51500:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return _}});var i=n(24246),r=n(77181),s=n(79894),o=n.n(s),a=n(27378),u=n(77213),l=n(77830),c=n(58754),d=n(14481),p=n(7426),g=n(37059);let f=t=>{let{isConfigLoading:e}=t;return(0,i.jsx)(u.Z,{title:"Action center",mainProps:{className:"h-full"},children:(0,i.jsx)(r.jqI,{justify:"center",align:"center",className:"h-full",children:e?(0,i.jsx)(r.$jN,{color:"primary.900"}):(0,i.jsx)(r.DUx,{message:"Coming soon...",description:"Action center is currently disabled.",type:"info",showIcon:!0})})})},m=()=>(0,i.jsx)(r.oj8,{image:r.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up! Set up an integration monitor to track your infrastructure in greater detail.",children:(0,i.jsx)(o(),{href:l.KH,passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(r.wpx,{type:"primary",children:"Visit integrations"})})});var v=n(7195),y=n(16394);let{Text:h}=r.AntTypography,x=t=>{let{monitorSummary:e,showSkeleton:n,...s}=t,[u,c]=(0,a.useState)(void 0),{name:d,property:p,total_updates:g,updates:f,last_monitored:m,warning:x,secrets:j,key:_}=e,b=Object.entries(f).map(t=>"".concat(t[1]," ").concat(t[0],"s")).join(", "),C=m?(0,y.p6)(new Date(m)):void 0,S=m?(0,v.B)(new Date(m),new Date,{addSuffix:!0}):void 0;return(0,a.useEffect)(()=>{p&&c((0,y.tl)(p,60)),(null==j?void 0:j.url)&&c((0,y.tl)((0,y.ge)(j.url),60))},[p,null==j?void 0:j.url]),(0,i.jsx)(r.krs.Item,{"data-testid":"monitor-result-".concat(_),...s,children:(0,i.jsx)(r.N_L,{avatar:!0,title:!1,loading:n,active:!0,children:(0,i.jsxs)(r.bue,{gutter:12,className:"w-full",children:[(0,i.jsx)(r.JGx,{span:18,className:"align-middle",children:(0,i.jsx)(r.krs.Item.Meta,{avatar:(0,i.jsx)(r.t3Z,{src:u,size:30,icon:(0,i.jsx)(r.PJP.huD,{}),style:{backgroundColor:"transparent",color:"var(--ant-color-text)"}}),title:(0,i.jsxs)(o(),{href:"".concat(l.vi,"/").concat(_),className:"whitespace-nowrap",children:["".concat(g," assets detected").concat(p?" on ".concat(p):""),!!x&&(0,i.jsx)(r.esZ,{title:"string"==typeof x?x:void 0,children:(0,i.jsx)(r.PJP.OdJ,{className:"ml-1 inline-block align-middle",style:{color:"var(--fidesui-error)"}})})]}),description:"".concat(b," detected.")})}),(0,i.jsx)(r.JGx,{span:4,className:"flex items-center justify-end",children:(0,i.jsx)(h,{ellipsis:{tooltip:d},children:d})}),(0,i.jsx)(r.JGx,{span:2,className:"flex items-center justify-end",children:!!S&&(0,i.jsx)(r.esZ,{title:C,children:(0,i.jsx)(h,{"data-testid":"monitor-date",ellipsis:{tooltip:C},children:S})})})]})})})};var j=n(57454),_=()=>{var t;let e=(0,r.pmc)(),{PAGE_SIZES:n,pageSize:s,setPageSize:v,onPreviousPageClick:y,isPreviousPageDisabled:h,onNextPageClick:_,isNextPageDisabled:b,startRange:C,endRange:S,pageIndex:T,setTotalPages:w,resetPageIndexToDefault:P}=(0,d.oi)(),[k,R]=(0,a.useState)(""),{data:q,isLoading:N}=(0,p.tB)({api_set:!1}),A=!!(null==q?void 0:null===(t=q.detection_discovery)||void 0===t?void 0:t.website_monitor_enabled);(0,a.useEffect)(()=>{P()},[k,P]);let{data:E,isError:M,isLoading:D,isFetching:I}=(0,g.Ud)({page:T,size:s,search:k},{skip:N||!A});(0,a.useEffect)(()=>{M&&e&&A&&e({title:"Error fetching data",description:"Please try again later",status:"error"})},[M,e,A]),(0,a.useEffect)(()=>{E&&w(E.total||1)},[E,w]);let L=(null==E?void 0:E.items)||[],z=I?Array.from({length:s},(t,e)=>({key:e.toString(),updates:[],last_monitored:null})):[],O=(0,a.useCallback)(t=>[(0,i.jsx)(o(),{href:"".concat(l.vi,"/").concat(t),passHref:!0,legacyBehavior:!0,children:(0,i.jsx)(r.wpx,{type:"link",className:"p-0","data-testid":"review-button-".concat(t),children:"Review"})},"review")],[]);return A?(0,i.jsxs)(u.Z,{title:"Action center",children:[(0,i.jsx)(c.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity"}]}),(0,i.jsx)(r.jqI,{className:"justify-between py-6",children:(0,i.jsx)(j.M,{value:k,onChange:R})}),(0,i.jsx)(r.krs,{loading:D,dataSource:L||z,locale:{emptyText:(0,i.jsx)(m,{})},renderItem:t=>!!t&&(0,i.jsx)(x,{showSkeleton:I,monitorSummary:t,actions:O(t.key)},t.key)}),!!L&&!!(null==E?void 0:E.total)&&E.total>s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.htM,{className:"mb-6 mt-0"}),(0,i.jsx)(d.s8,{totalRows:(null==E?void 0:E.total)||0,pageSizes:n,setPageSize:v,onPreviousPageClick:y,isPreviousPageDisabled:h||I,onNextPageClick:_,isNextPageDisabled:b||I,startRange:C,endRange:S})]})]}):(0,i.jsx)(f,{isConfigLoading:N})}}},function(t){t.O(0,[8033,6060,4481,2888,9774,179],function(){return t(t.s=40741)}),_N_E=t.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7477],{45550:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/activity",function(){return a(3680)}])},91761:function(e,s,a){"use strict";var t=a(24246),i=a(77181),r=a(812),n=a(14047),o=a(7940),l=a(98559),c=a(28120),d=a(79494),u=a(70675);s.Z=e=>{let{resource:s}=e,[a,{isLoading:g}]=(0,u.v8)(),[x,{isLoading:I}]=(0,u.cM)(),[j,{isLoading:h}]=(0,u.vi)(),C=I||h||g,{diff_status:f,child_diff_statuses:A,top_level_field_name:L}=s,{successAlert:_,errorAlert:m}=(0,n.V)(),T=f===c.LL.CLASSIFICATION_ADDITION||f===c.LL.CLASSIFICATION_UPDATE,S=A&&(A[c.LL.CLASSIFICATION_ADDITION]||A[c.LL.CLASSIFICATION_UPDATE]),v=(T||S)&&!L,D=T||S,N=(0,o.G)(s)!==c.D$.FIELD,p=v&&D&&N,y=async()=>{let e=await x({staged_resource_urn:s.urn});(0,r.D4)(e)?m((0,r.e$)(e.error),"Failed to promote resource"):_('These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".',"Table changes confirmed")},w=async()=>{let e=await j({staged_resource_urn:s.urn});(0,r.D4)(e)?m((0,r.e$)(e.error),"Failed to mute resource"):_("Ignored changes will not be added to a Fides dataset.","".concat(s.name||"Changes"," ignored"))},R=async()=>{let e=await a({staged_resource_urn:s.urn,monitor_config_id:s.monitor_config_id,start_classification:!0,classify_monitored_resources:!0});(0,r.D4)(e)?m((0,r.e$)(e.error),"Failed to reclassify resource"):_("Reclassification of ".concat((0,l.Z)(s)||"the resource"," has begun. The results may take some time to appear in the “Data discovery“ tab."),"Reclassification started")};return(0,t.jsxs)(i.Ugi,{gap:2,children:[v&&(0,t.jsx)(d.Z,{title:"Confirm",icon:(0,t.jsx)(i.nQG,{}),onClick:y,disabled:C,loading:I}),D&&(0,t.jsx)(d.Z,{title:"Ignore",icon:(0,t.jsx)(i.tpL,{}),onClick:w,disabled:C,loading:h}),N&&!p&&(0,t.jsx)(d.Z,{title:"Reclassify",icon:(0,t.jsx)(i.nyI,{}),onClick:R,disabled:C,loading:g}),p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.LZC,{}),(0,t.jsxs)(i.v2r,{children:[(0,t.jsx)(i.j2t,{as:i.wpx,size:"small",type:"text",icon:(0,t.jsx)(i.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"actions-overflow-btn"}),(0,t.jsx)(i.qyq,{children:(0,t.jsx)(i.sNh,{onClick:R,icon:(0,t.jsx)(i.nyI,{}),"data-testid":"action-reclassify",children:"Reclassify"})})]})]})]})}},3680:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return F}});var t,i,r=a(24246),n=a(27378),o=a(35287),l=a(58754),c=a(47182),d=a(92222),u=a(59003),g=a(77181),x=a(14481),I=a(72625),j=a(70675),h=a(38347),C=a(87667),f=a(50169),A=a(80285),L=a(57454);(t=i||(i={})).DATASET="Dataset",t.CLASSIFICATION="Classification";var _=a(74241),m=a(28278),T=a(20449),S=e=>(0,T.Z)(e)===m.E.CLASSIFICATION?i.CLASSIFICATION:i.DATASET,v=a(54409),D=a(91761);let N={items:[],total:0,page:1,size:50,pages:1},p=()=>(0,r.jsx)(g.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:(0,r.jsxs)(g.gCW,{children:[(0,r.jsx)(g.xvT,{fontSize:"md",fontWeight:"600",children:"No activity found"}),(0,r.jsx)(g.xvT,{fontSize:"sm",children:"You're up to date!"})]})}),y=(0,d.Cl)();var w=e=>{let{onRowClick:s,statusFilters:a,childsStatusFilters:t}=e,[o,l]=(0,n.useState)(""),{PAGE_SIZES:c,pageSize:m,setPageSize:T,onPreviousPageClick:w,isPreviousPageDisabled:R,onNextPageClick:F,isNextPageDisabled:O,startRange:b,endRange:E,pageIndex:Z,setTotalPages:P}=(0,x.oi)(),{isFetching:k,isLoading:M,data:V}=(0,j.z8)({diff_status:a,child_diff_status:t,page:Z,size:m,search:o}),{items:z,total:U,pages:G}=(0,n.useMemo)(()=>null!=V?V:N,[V]);(0,n.useEffect)(()=>{P(G)},[G,P]);let W=(0,n.useMemo)(()=>[y.accessor(e=>e.name,{id:"name",cell:e=>(0,r.jsx)(C.Z,{result:e.row.original}),header:e=>(0,r.jsx)(x.Rr,{value:"Name",...e})}),y.accessor(e=>e.urn,{id:"project",cell:e=>(0,r.jsx)(x.G3,{value:(0,_.Z)(e.getValue())}),header:e=>(0,r.jsx)(x.Rr,{value:"Project",...e})}),y.display({id:"status",cell:e=>(0,r.jsx)(f.Z,{result:e.row.original}),header:e=>(0,r.jsx)(x.Rr,{value:"Status",...e})}),y.accessor(e=>e.system,{id:"system",cell:e=>(0,r.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(x.Rr,{value:"System",...e})}),y.accessor(e=>e.monitor_config_id,{id:"monitor",cell:e=>(0,r.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,r.jsx)(x.Rr,{value:"Detected by",...e})}),y.accessor(e=>e.updated_at,{id:"time",cell:e=>(0,r.jsx)(I.Cy,{time:e.getValue()}),header:e=>(0,r.jsx)(x.Rr,{value:"When",...e})}),y.accessor(e=>e,{id:"action",cell:e=>S(e.getValue())===i.DATASET?(0,r.jsx)(v.Z,{resource:e.getValue()}):(0,r.jsx)(D.Z,{resource:e.getValue()}),header:e=>(0,r.jsx)(x.Rr,{value:"Action",...e})})],[]),$=(0,u.b7)({getCoreRowModel:(0,d.sC)(),getGroupedRowModel:(0,d.qe)(),getExpandedRowModel:(0,d.rV)(),getRowId:A.Z,columns:W,manualPagination:!0,data:z,columnResizeMode:"onChange"});return M?(0,r.jsx)(x.I4,{rowHeight:36,numRows:36}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.Q$,{children:(0,r.jsxs)(g.kCb,{gap:6,align:"center",children:[(0,r.jsx)(g.xuv,{flexShrink:0,children:(0,r.jsx)(L.M,{value:o,onChange:l})}),(0,r.jsx)(h.Z,{})]})}),(0,r.jsx)(x.ZK,{tableInstance:$,onRowClick:s,emptyTableNotice:(0,r.jsx)(p,{})}),(0,r.jsx)(x.s8,{totalRows:U||0,pageSizes:c,setPageSize:T,onPreviousPageClick:w,isPreviousPageDisabled:R||k,onNextPageClick:F,isNextPageDisabled:O||k,startRange:b,endRange:E})]})},R=a(28120),F=()=>{let{navigateToDetectionResults:e,navigateToDiscoveryResults:s}=(0,c.Z)();return(0,r.jsxs)(o.Z,{title:"Data discovery",children:[(0,r.jsx)(l.Z,{heading:"All activity"}),(0,r.jsx)(w,{onRowClick:a=>{if(S(a)===i.DATASET){e({resourceUrn:a.urn});return}s({resourceUrn:a.urn})},statusFilters:[R.LL.ADDITION,R.LL.REMOVAL,R.LL.CLASSIFICATION_ADDITION,R.LL.CLASSIFICATION_UPDATE],childsStatusFilters:[R.LL.ADDITION,R.LL.REMOVAL,R.LL.CLASSIFICATION_ADDITION,R.LL.CLASSIFICATION_UPDATE]})]})}}},function(e){e.O(0,[8033,6060,4481,9999,6315,2888,9774,179],function(){return e(e.s=45550)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,a,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return i(20495)}])},67991:function(e,a,i){"use strict";i.d(a,{Od:function(){return l},QZ:function(){return t}});var n=i(27378);let t=e=>{let{items:a,selected:i,onChange:n}=e,t=a.every(e=>i.includes(e.id))&&!!a.length;return{allSelected:t,someSelected:a.some(e=>i.includes(e.id))&&!!a.length,handleToggleAll:()=>{t?n([]):n(a.map(e=>e.id))},handleToggleSelection:e=>{i.includes(e)?n(i.filter(a=>a!==e)):n([...i,e])}}},l=e=>{let{initialSelected:a,initialExcluded:i,initialAllSelected:t,itemCount:l}=e,[o,r]=(0,n.useState)(a),[s,d]=(0,n.useState)(i),[c,u]=(0,n.useState)(t||o.length===l),_=!!o.length||!!s.length;return{selected:o,excluded:s,allSelected:c,someSelected:_,handleToggleAll:()=>{c?(d([]),s.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(s.includes(e)?s.filter(a=>a!==e):[...s,e]);else{let a=o.includes(e)?o.filter(a=>a!==e):[...o,e];r(a),a.length===l&&u(!0)}}}}},90111:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{children:a,...i}=e;return(0,n.jsx)(t.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...i,children:a})}},8411:function(e,a,i){"use strict";i.d(a,{NA:function(){return l},Z8:function(){return t}});var n=i(28120);let t={[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",[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]:"San Diego",[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]:"Vermon",[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"},l=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},79494:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{title:a,icon:i,type:l,...o}=e;return(0,n.jsx)(t.wpx,{size:"small",type:l,"data-testid":"action-".concat(a),icon:i,iconPosition:"start",...o,children:a})}},60325:function(e,a,i){"use strict";i.d(a,{DD:function(){return r},Go:function(){return s},TK:function(){return t},Uv:function(){return c},k1:function(){return l},y3:function(){return u}});var n=i(28120);let t=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==a?a:[]},l=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected))&&void 0!==a?a:[]},o=[{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:o,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},s=(e,a)=>{let i=a.find(a=>a.id===e.language);return i?i.name:e.language},d=e=>{var a,i,n,t,l,o,r,s,d;let{language:c,is_default:u,accept_button_label:_,reject_button_label:F}=e;return{language:c,is_default:u,accept_button_label:_,reject_button_label:F,title:e.title,description:e.description,acknowledge_button_label:null!==(a=e.acknowledge_button_label)&&void 0!==a?a:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(t=e.purpose_header)&&void 0!==t?t:void 0,privacy_policy_link_label:null!==(l=e.privacy_policy_link_label)&&void 0!==l?l:void 0,privacy_policy_url:null!==(o=e.privacy_policy_url)&&void 0!==o?o:void 0,privacy_preferences_link_label:null!==(r=e.privacy_preferences_link_label)&&void 0!==r?r:void 0,save_button_label:null!==(s=e.save_button_label)&&void 0!==s?s:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:a,updated_at:i,privacy_notices:n,origin:t,id:l,...o}=e;return{...o,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},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}}},20495:function(e,a,i){"use strict";i.r(a),i.d(a,{default:function(){return eu}});var n=i(24246),t=i(77181),l=i(86677),o=i(7617),r=i(77213),s=i(77830),d=i(58754),c=i(94725),u=i(45216),_=i(7621),F=i(92222),m=i(59003),g=i(27378),p=i(18225);let b=(0,t.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,n.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 h=i(8411),x=i(14481),y=i(72625),v=i(70675),S=i(812),C=e=>{let{defaultSuccessMsg:a,defaultErrorMsg:i}=e,n=(0,t.pmc)();return{toastResult:e=>{(0,S.D4)(e)?n({status:"error",description:(0,S.e$)(e.error,i)}):n({status:"success",description:a})}}},f=i(8133),j=i(46628),k=i(67991),M=i(91613);let A=(0,F.Cl)();var N=e=>{let{items:a,totalItemCount:i,selected:l,excluded:o,allSelected:r,someSelected:s,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:_}=e,b=a.map(e=>({id:e,isSelected:l.includes(e),isExcluded:o.includes(e)})),h=(0,g.useMemo)(()=>[A.display({id:"select",cell:e=>{let{row:a}=e;return(0,n.jsx)(x.k,{isChecked:a.original.isSelected||r&&!a.original.isExcluded,onChange:()=>c(a.original.id),dataTestId:"".concat(a.original.id,"-checkbox")})},header:()=>(0,n.jsx)(x.k,{isChecked:r,isIndeterminate:s,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),A.accessor(e=>e.id,{id:"id",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})})],[c,u,r,s]),y=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getRowId:e=>e.id,manualPagination:!0,data:b,columns:h,columnResizeMode:"onChange"});return(0,n.jsx)(t.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,n.jsx)(x.ZK,{tableInstance:y,onRowClick:e=>c(e.id),footer:!!_&&(0,n.jsx)(x.vr,{totalColumns:2,children:(0,n.jsx)(t.kCb,{justify:"center",children:d?(0,n.jsx)(p.Z,{size:"xs"}):(0,n.jsxs)(t.kCb,{align:"center",children:[(0,n.jsxs)(t.xvT,{fontSize:"xs",mr:4,children:["Showing ",a.length," of ",i]}),(0,n.jsx)(t.wpx,{onClick:_,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let T={items:[],total:1,page:1,size:50,pages:0};var w=(e,a)=>{let[i,n]=(0,g.useState)(2),{data:t,isLoading:l}=(0,v.oN)({page:1,size:25,connection_config_key:e}),o=(0,g.useRef)(l),{items:r,total:s}=null!=t?t:T,d=!!(null==t?void 0:t.pages)&&i>t.pages,[c,u]=(0,g.useState)(r);(0,g.useEffect)(()=>{o.current=l,u(r)},[l,r]),(0,g.useEffect)(()=>{let e=setTimeout(()=>{o.current&&a&&a()},5e3);return()=>clearTimeout(e)},[]);let[_,{isLoading:F,isFetching:m}]=(0,v.j3)(),p=F||m||l,b=async()=>{var a,t;if(d)return;let l=await _({connection_config_key:e,size:25,page:i+1});l.isError||(n(i+1),u([...c,...null!==(t=null===(a=l.data)||void 0===a?void 0:a.items)&&void 0!==t?t:[]]))};return{databases:c,totalDatabases:s,fetchMore:b,initialIsLoading:l,isLoading:p,reachedEnd:d}},E=e=>{var a;let{monitor:i,isEditing:l,isSubmitting:o,integrationKey:r,onSubmit:s,onClose:d}=e,c=(0,t.pmc)(),{databases:u,totalDatabases:_,fetchMore:F,reachedEnd:m,isLoading:g,initialIsLoading:b}=w(r,()=>{s({...i,databases:[]}),c({...j.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()}),h=null!==(a=null==i?void 0:i.databases)&&void 0!==a?a:[],{selected:x,excluded:y,allSelected:v,someSelected:S,handleToggleItemSelected:C,handleToggleAll:f}=(0,k.Od)({initialSelected:h,initialExcluded:[],initialAllSelected:l&&!h.length,itemCount:_}),A=!v&&0===x.length;return b?(0,n.jsx)(p.Z,{my:12}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.kCb,{p:4,direction:"column",children:[(0,n.jsxs)(t.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,n.jsx)(t.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,n.jsx)(M.Z,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,n.jsx)(N,{items:u,totalItemCount:_,selected:x,excluded:y,allSelected:v,someSelected:S,moreLoading:g,handleToggleSelection:C,handleToggleAll:f,onMoreClick:m?void 0:F})]}),(0,n.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:d,children:"Cancel"}),(0,n.jsx)(t.ua7,{label:"Select one or more projects to save",isDisabled:!A,children:(0,n.jsx)(t.wpx,{onClick:()=>{s({...i,excluded_databases:y,databases:v?[]:x})},loading:o,type:"primary","data-testid":"save-btn",disabled:A,children:"Save"})})]})]})},U=i(19508),R=i(96063),I=i(34090),L=i(55484),q=i(97181),D=i(40324),O=i(28120),B=e=>{var a,i;let{monitor:o,integrationOption:r,isSubmitting:s,databasesAvailable:d,onClose:c,onAdvance:u,onSubmit:_}=e,F=!!o,{query:m}=(0,l.useRouter)(),g=Array.isArray(m.id)?m.id[0]:m.id,p=L.Ry().shape({name:L.Z_().required().label("Name"),execution_frequency:L.Z_().nullable().label("Execution frequency"),execution_start_date:L.hT().nullable().label("Execution start date")}),b=(null==o?void 0:o.execution_start_date)?(0,U.D)(o.execution_start_date):Date.now(),h={name:null!==(a=null==o?void 0:o.name)&&void 0!==a?a:"",execution_start_date:(0,R.WU)(b,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(i=null==o?void 0:o.execution_frequency)&&void 0!==i?i:O.hV.MONTHLY},x=(0,S.MM)(O.hV);return(0,n.jsx)(I.J9,{initialValues:h,enableReinitialize:!0,onSubmit:e=>{let a=e.execution_frequency!==O.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:O.hV.NOT_SCHEDULED,execution_start_date:void 0},i=F?{...o,...a,name:e.name}:{...a,name:e.name,connection_config_key:g,classify_params:{num_samples:25,num_threads:1}};r.identifier===O.Rj.DYNAMODB&&(i.datasource_params={single_dataset:!1}),d?u(i):_(i)},validationSchema:p,children:e=>{let{values:a,isValid:i,resetForm:l}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,n.jsx)(D.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(q.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:x,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(D.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===O.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{l(),c()},children:"Cancel"}),(0,n.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:!i,loading:s,"data-testid":"next-btn",children:d?"Next":"Save"})]})]})})}})},G=i(90111),P=i(3968),H=i(64781),V=i(60325);let Z=L.Ry().shape({name:L.Z_().required().label("Name"),execution_frequency:L.Z_().nullable().label("Execution frequency"),execution_start_date:L.hT().nullable().label("Execution start date"),datasource_params:L.Ry().shape({locations:L.IX().label("Locations"),exclude_domains:L.IX().label("Exclude domains"),sitemap_url:L.Z_().nullable().url().label("Sitemap URL")})});var K=e=>{var a,i,o;let{monitor:r,url:s,onClose:d,onSubmit:c}=e,{query:u}=(0,l.useRouter)(),_=Array.isArray(u.id)?u.id[0]:u.id,F=(null==r?void 0:r.execution_start_date)?(0,U.D)(r.execution_start_date):Date.now(),{data:m,isLoading:g}=(0,H.gT)(),p=[...(0,V.TK)(null!==(a=null==m?void 0:m.locations)&&void 0!==a?a:[]),...(0,V.TK)(null!==(i=null==m?void 0:m.location_groups)&&void 0!==i?i:[])].map(e=>({value:e,label:h.Z8[e]})),b={name:(null==r?void 0:r.name)||"",execution_frequency:(null==r?void 0:r.execution_frequency)||O.hV.MONTHLY,execution_start_date:(0,R.WU)(F,"yyyy-MM-dd'T'HH:mm"),url:s,connection_config_key:_,datasource_params:null!==(o=null==r?void 0:r.datasource_params)&&void 0!==o?o:{locations:[]}},x=async e=>{let a=e.execution_frequency!==O.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:O.hV.NOT_SCHEDULED,execution_start_date:void 0};c({...r,...e,...a,key:(null==r?void 0:r.key)||(0,P.E)(e.name),classify_params:(null==r?void 0:r.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:_})};return(0,n.jsxs)(t.jqI,{vertical:!0,className:"pt-4",children:[(0,n.jsx)(G.Z,{children:(0,n.jsx)(t.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,n.jsx)(I.J9,{initialValues:b,enableReinitialize:!0,onSubmit:x,validationSchema:Z,children:e=>{let{values:a,resetForm:i}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.jqI,{vertical:!0,gap:"middle",children:[(0,n.jsx)(D.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(D.j0,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",variant:"stacked"}),(0,n.jsx)(q.d,{mode:"tags",name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",options:[],open:!1,layout:"stacked"}),(0,n.jsx)(D.j0,{name:"url",id:"url",label:"URL",isRequired:!0,disabled:!0,variant:"stacked"}),(0,n.jsx)(q.d,{mode:"multiple",isRequired:!0,name:"datasource_params.locations",id:"locations",label:"Locations",loading:g,options:p,optionFilterProp:"label",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.",layout:"stacked"}),(0,n.jsx)(q.d,{name:"execution_frequency",id:"execution_frequency",options:(0,S.MM)(O.hV),label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(D.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===O.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."}),(0,n.jsxs)(t.jqI,{className:"mt-2 justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{i(),d()},children:"Cancel"}),(0,n.jsx)(t.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",children:"Save"})]})]})})}})]})},z=i(31883),W=e=>{let{isOpen:a,onClose:i,formStep:l,onAdvance:o,monitor:r,isEditing:s,integration:d,integrationOption:c}=e,[u,{isLoading:_}]=(0,v.Fy)(),{data:F}=(0,v.oN)({page:1,size:25,connection_config_key:d.key}),m=!!F&&!!F.total,g=(0,t.pmc)(),{toastResult:b}=C({defaultSuccessMsg:"Monitor ".concat(s?"updated":"created"," successfully"),defaultErrorMsg:"A problem occurred while ".concat(s?"updating":"creating"," this monitor")}),h=async e=>{let a;let n=setTimeout(()=>{a||(g({...j.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."}),i())},5e3);(a=await u(e))&&(clearTimeout(n),b(a),(0,z.D4)(a)||i())};return c.identifier===O.Rj.WEBSITE?(0,n.jsx)(f.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:a,onClose:i,children:(0,n.jsx)(K,{monitor:r,url:d.secrets.url,onClose:i,onSubmit:h})}):(0,n.jsxs)(f.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:a,onClose:i,children:[0===l&&(0,n.jsx)(B,{monitor:r,onClose:i,onAdvance:o,onSubmit:h,isSubmitting:_,databasesAvailable:m,integrationOption:c}),1===l&&(r?(0,n.jsx)(E,{monitor:r,isEditing:s,isSubmitting:_,onSubmit:h,onClose:i,integrationKey:d.key}):(0,n.jsx)(p.Z,{}))]})},Y=i(58452),J=i(79494),Q=e=>{let{monitorId:a,onEditClick:i}=e,[l]=(0,v.Sb)(),{toastResult:o}=C({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[r,{isLoading:s}]=(0,v.V9)(),{toastResult:d}=C({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:"Monitor execution successfully started"}),c=async()=>{o(await l({monitor_config_id:a}))},{isOpen:u,onOpen:_,onClose:F}=(0,t.qY0)(),m=async()=>{d(await r({monitor_config_id:a}))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y.Z,{isOpen:u,onClose:F,onConfirm:c,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(t.ua7,{label:"Edit",children:(0,n.jsx)(t.wpx,{onClick:i,size:"small",icon:(0,n.jsx)(t.dY8,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,n.jsx)(t.ua7,{label:"Delete",children:(0,n.jsx)(t.wpx,{onClick:_,size:"small",icon:(0,n.jsx)(t.pJl,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,n.jsx)(J.Z,{onClick:m,title:"Scan",loading:s})]})]})};let X=e=>{let{row:a,getValue:i}=e,[t]=(0,v.Fy)(),l=async e=>t({...a.original,enabled:e}),o=i();return(0,n.jsx)(y.S1,{enabled:o,onToggle:l,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},$={items:[],total:0,page:1,size:50,pages:0},ee=(0,F.Cl)(),ea=e=>{let{onAddClick:a}=e;return(0,n.jsx)(t.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,n.jsxs)(t.gCW,{children:[(0,n.jsx)(t.xvT,{fontSize:"md",fontWeight:"600",children:"No monitors"}),(0,n.jsx)(t.xvT,{fontSize:"sm",children:'You have not configured any data discovery monitors. Click "Add monitor" to configure data discovery now.'}),(0,n.jsx)(t.wpx,{onClick:a,type:"primary",children:"Add monitor"})]})})};var ei=e=>{let{integration:a,integrationOption:i}=e,{PAGE_SIZES:l,pageSize:o,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:_,endRange:S,pageIndex:C,setTotalPages:f}=(0,x.oi)(),{isLoading:j,isFetching:k,data:M}=(0,v.Fu)({page:C,size:o,connection_config_key:a.key}),A=(0,t.qY0)(),[N,T]=(0,g.useState)(void 0),[w,E]=(0,g.useState)(!1),[U,R]=(0,g.useState)(0),I=e=>{T(e),E(!0),A.onOpen()},L=null!=M?M:$,{items:q,total:D,pages:B}=(0,g.useMemo)(()=>L,[L]);(0,g.useEffect)(()=>{f(B)},[B,f]);let G=(0,g.useMemo)(()=>{let e=ee.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Name",...e})}),t=ee.accessor(e=>e.databases,{id:"projects",cell:e=>{var a;return(null===(a=e.getValue())||void 0===a?void 0:a.length)===0?(0,n.jsx)(x.G3,{value:"All projects"}):(0,n.jsx)(x.WP,{suffix:"Projects",value:e.getValue(),...e,cellState:{isExpanded:!0}})},header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})}),l=ee.accessor(()=>{let e=a.secrets;return null==e?void 0:e.url},{id:"source_url",cell:e=>{var a;return(0,n.jsx)(x.G3,{value:null!==(a=e.getValue())&&void 0!==a?a:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Source URL",...e})}),o=ee.accessor(e=>e.execution_frequency,{id:"frequency",cell:e=>{var a;return(0,n.jsx)(x.G3,{value:null!==(a=e.getValue())&&void 0!==a?a:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Scan frequency",...e})}),r=ee.accessor(e=>e.last_monitored,{id:"last_monitored",cell:e=>(0,n.jsx)(y.Cy,{time:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Last scan",...e})}),s=ee.accessor(e=>{var a;let i=e.datasource_params;return(null==i?void 0:null===(a=i.locations)||void 0===a?void 0:a.map(e=>h.Z8[e]).join(", "))||"No regions selected"},{id:"regions",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Regions",...e})}),d=ee.accessor(e=>e.enabled,{id:"status",cell:X,header:e=>(0,n.jsx)(x.Rr,{value:"Status",...e}),size:0,meta:{disableRowClick:!0}}),c=ee.display({id:"action",cell:e=>(0,n.jsx)(Q,{onEditClick:()=>I(e.row.original),monitorId:e.row.original.key}),header:"Actions",meta:{disableRowClick:!0}});return(null==i?void 0:i.identifier)===O.Rj.WEBSITE?[e,l,o,s,r,d,c]:[e,t,o,r,d,c]},[]),P=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getGroupedRowModel:(0,F.qe)(),getExpandedRowModel:(0,F.rV)(),getRowId:e=>e.name,manualPagination:!0,data:q,columns:G,columnResizeMode:"onChange"});return j?(0,n.jsx)(p.Z,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.xvT,{maxW:"720px",mb:6,fontSize:"sm","data-testid":"monitor-description",children:(null==i?void 0:i.identifier)===O.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.":"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."}),(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(t.LZC,{}),(0,n.jsx)(t.wpx,{onClick:A.onOpen,icon:(0,n.jsx)(b,{}),iconPosition:"end","data-testid":"add-monitor-btn",children:"Add monitor"}),(0,n.jsx)(W,{isOpen:A.isOpen,onClose:()=>{T(void 0),E(!1),R(0),A.onClose()},formStep:U,onAdvance:e=>{T(e),R(1)},monitor:N,isEditing:w,integration:a,integrationOption:i})]}),(0,n.jsx)(x.ZK,{tableInstance:P,onRowClick:I,emptyTableNotice:(0,n.jsx)(ea,{onAddClick:A.onOpen})}),(0,n.jsx)(x.s8,{totalRows:D||0,pageSizes:l,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d||k,onNextPageClick:c,isNextPageDisabled:u||k,startRange:_,endRange:S})]})},en=i(41966),et=i(32885),el=e=>{let{integration:a}=e,{data:i}=(0,c.Eg)(a.key),{data:l}=(0,en.LH)({minimal:!0,connection_type:O.Rj.BIGQUERY}),[o,{isLoading:r}]=(0,et.Qd)(),s=(0,t.pmc)(),d=async()=>{try{var e,n,t,r,d;let c=null!==(t=null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.map(e=>e.fides_key))&&void 0!==t?t:[],u=null!==(r=null==l?void 0:l.map(e=>e.fides_key))&&void 0!==r?r:[],_=c.length>0?c:u,F=await o({connectionKey:a.key,datasetIds:_}),m=null!==(d=null===(n=F.data)||void 0===n?void 0:n.succeeded.length)&&void 0!==d?d:0,g="Fides has begun syncing with DataHub. There ".concat(1===m?"is":"are"," ").concat(m," dataset").concat(1===m?"":"s"," queued for syncing.");s((0,j.t5)(g))}catch(e){s({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,n.jsxs)(t.gCW,{spacing:6,align:"stretch",children:[(0,n.jsxs)(t.gCW,{spacing:4,align:"stretch",children:[(0,n.jsx)(t.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,n.jsxs)(t.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, view our docs ",(0,n.jsx)(t.rUS,{href:"https://ethyca.com/docs/user-guides/integrations/saas-integrations/datahub",isExternal:!0,color:"blue.500",textDecoration:"underline",children:"here"}),"."]})]}),(0,n.jsx)(t.zxk,{colorScheme:"primary",onClick:d,"data-testid":"sync-button",width:"fit-content",isLoading:r,loadingText:"Syncing datasets...",children:"Sync Datasets"})]})},eo=i(15987),er=i(64176),es=e=>{let{isOpen:a,onClose:i,connection:t}=e,l=(0,er.Z)(t.connection_type);return(0,n.jsx)(f.Z,{title:"Manage integration secret",isOpen:a,onClose:i,children:(0,n.jsx)(eo.Z,{connection:t,connectionOption:l,onCancel:i})})},ed=i(41553),ec=i(75595),eu=()=>{var e,a;let{query:i}=(0,l.useRouter)(),F=Array.isArray(i.id)?i.id[0]:i.id,{data:m,isLoading:g}=(0,c.jA)(null!=F?F:""),p=(0,er.Z)(null==m?void 0:m.connection_type),{testConnection:b,isLoading:h,testData:x}=(0,u.Z)(m),{onOpen:y,isOpen:v,onClose:S}=(0,t.qY0)(),{overview:C,instructions:f}=(0,_.ZP)(null==m?void 0:m.connection_type),j=(0,l.useRouter)();m&&!_.jq.includes(m.connection_type)&&j.push(s.KH);let k=[{label:"Connection",content:(0,n.jsxs)(t.xuv,{maxW:"720px",children:[(0,n.jsxs)(t.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,n.jsx)(t.kCb,{flexDirection:"column",children:(0,n.jsx)(ed.Z,{testData:x})}),(0,n.jsx)(t.LZC,{}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)(t.wpx,{onClick:b,loading:h,"data-testid":"test-connection-btn",children:"Test connection"}),(0,n.jsx)(t.wpx,{onClick:y,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,n.jsx)(es,{isOpen:v,onClose:S,connection:m}),C,f]})}];return(null==m?void 0:m.connection_type)===O.Rj.DATAHUB?k.push({label:"Data sync",content:(0,n.jsx)(el,{integration:m})}):k.push({label:"Data discovery",content:(0,n.jsx)(ei,{integration:m,integrationOption:p})}),(0,n.jsx)(r.Z,{title:"Integrations",children:(0,n.jsxs)(d.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:s.KH},{title:null!==(a=null!==(e=null==m?void 0:m.name)&&void 0!==e?e:null==m?void 0:m.key)&&void 0!==a?a:""}],children:[(0,n.jsx)(ec.Z,{integration:m,showDeleteButton:!0}),g?(0,n.jsx)(t.$jN,{}):!!m&&(0,n.jsx)(o.Z,{data:k,isLazy:!0})]})})}}},function(e){e.O(0,[8033,6060,2858,2866,9278,9255,4481,5973,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,a,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return i(20495)}])},67991:function(e,a,i){"use strict";i.d(a,{Od:function(){return l},QZ:function(){return t}});var n=i(27378);let t=e=>{let{items:a,selected:i,onChange:n}=e,t=a.every(e=>i.includes(e.id))&&!!a.length;return{allSelected:t,someSelected:a.some(e=>i.includes(e.id))&&!!a.length,handleToggleAll:()=>{t?n([]):n(a.map(e=>e.id))},handleToggleSelection:e=>{i.includes(e)?n(i.filter(a=>a!==e)):n([...i,e])}}},l=e=>{let{initialSelected:a,initialExcluded:i,initialAllSelected:t,itemCount:l}=e,[o,r]=(0,n.useState)(a),[s,d]=(0,n.useState)(i),[c,u]=(0,n.useState)(t||o.length===l),_=!!o.length||!!s.length;return{selected:o,excluded:s,allSelected:c,someSelected:_,handleToggleAll:()=>{c?(d([]),s.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(s.includes(e)?s.filter(a=>a!==e):[...s,e]);else{let a=o.includes(e)?o.filter(a=>a!==e):[...o,e];r(a),a.length===l&&u(!0)}}}}},90111:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{children:a,...i}=e;return(0,n.jsx)(t.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...i,children:a})}},8411:function(e,a,i){"use strict";i.d(a,{NA:function(){return l},Z8:function(){return t}});var n=i(28120);let t={[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",[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]:"San Diego",[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]:"Vermon",[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"},l=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},79494:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{title:a,icon:i,type:l,...o}=e;return(0,n.jsx)(t.wpx,{size:"small",type:l,"data-testid":"action-".concat(a),icon:i,iconPosition:"start",...o,children:a})}},60325:function(e,a,i){"use strict";i.d(a,{DD:function(){return r},Go:function(){return s},TK:function(){return t},Uv:function(){return c},k1:function(){return l},y3:function(){return u}});var n=i(28120);let t=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==a?a:[]},l=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected))&&void 0!==a?a:[]},o=[{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:o,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},s=(e,a)=>{let i=a.find(a=>a.id===e.language);return i?i.name:e.language},d=e=>{var a,i,n,t,l,o,r,s,d;let{language:c,is_default:u,accept_button_label:_,reject_button_label:F}=e;return{language:c,is_default:u,accept_button_label:_,reject_button_label:F,title:e.title,description:e.description,acknowledge_button_label:null!==(a=e.acknowledge_button_label)&&void 0!==a?a:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(t=e.purpose_header)&&void 0!==t?t:void 0,privacy_policy_link_label:null!==(l=e.privacy_policy_link_label)&&void 0!==l?l:void 0,privacy_policy_url:null!==(o=e.privacy_policy_url)&&void 0!==o?o:void 0,privacy_preferences_link_label:null!==(r=e.privacy_preferences_link_label)&&void 0!==r?r:void 0,save_button_label:null!==(s=e.save_button_label)&&void 0!==s?s:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:a,updated_at:i,privacy_notices:n,origin:t,id:l,...o}=e;return{...o,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},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}}},20495:function(e,a,i){"use strict";i.r(a),i.d(a,{default:function(){return eu}});var n=i(24246),t=i(77181),l=i(86677),o=i(7617),r=i(77213),s=i(77830),d=i(58754),c=i(94725),u=i(45216),_=i(7621),F=i(92222),m=i(59003),g=i(27378),p=i(18225);let b=(0,t.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,n.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 h=i(8411),x=i(14481),y=i(72625),v=i(70675),S=i(812),C=e=>{let{defaultSuccessMsg:a,defaultErrorMsg:i}=e,n=(0,t.pmc)();return{toastResult:e=>{(0,S.D4)(e)?n({status:"error",description:(0,S.e$)(e.error,i)}):n({status:"success",description:a})}}},f=i(8133),j=i(46628),k=i(67991),A=i(91613);let M=(0,F.Cl)();var T=e=>{let{items:a,totalItemCount:i,selected:l,excluded:o,allSelected:r,someSelected:s,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:_}=e,b=a.map(e=>({id:e,isSelected:l.includes(e),isExcluded:o.includes(e)})),h=(0,g.useMemo)(()=>[M.display({id:"select",cell:e=>{let{row:a}=e;return(0,n.jsx)(x.k,{isChecked:a.original.isSelected||r&&!a.original.isExcluded,onChange:()=>c(a.original.id),dataTestId:"".concat(a.original.id,"-checkbox")})},header:()=>(0,n.jsx)(x.k,{isChecked:r,isIndeterminate:s,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),M.accessor(e=>e.id,{id:"id",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})})],[c,u,r,s]),y=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getRowId:e=>e.id,manualPagination:!0,data:b,columns:h,columnResizeMode:"onChange"});return(0,n.jsx)(t.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,n.jsx)(x.ZK,{tableInstance:y,onRowClick:e=>c(e.id),footer:!!_&&(0,n.jsx)(x.vr,{totalColumns:2,children:(0,n.jsx)(t.kCb,{justify:"center",children:d?(0,n.jsx)(p.Z,{size:"xs"}):(0,n.jsxs)(t.kCb,{align:"center",children:[(0,n.jsxs)(t.xvT,{fontSize:"xs",mr:4,children:["Showing ",a.length," of ",i]}),(0,n.jsx)(t.wpx,{onClick:_,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let N={items:[],total:1,page:1,size:50,pages:0};var w=(e,a)=>{let[i,n]=(0,g.useState)(2),{data:t,isLoading:l}=(0,v.oN)({page:1,size:25,connection_config_key:e}),o=(0,g.useRef)(l),{items:r,total:s}=null!=t?t:N,d=!!(null==t?void 0:t.pages)&&i>t.pages,[c,u]=(0,g.useState)(r);(0,g.useEffect)(()=>{o.current=l,u(r)},[l,r]),(0,g.useEffect)(()=>{let e=setTimeout(()=>{o.current&&a&&a()},5e3);return()=>clearTimeout(e)},[]);let[_,{isLoading:F,isFetching:m}]=(0,v.j3)(),p=F||m||l,b=async()=>{var a,t;if(d)return;let l=await _({connection_config_key:e,size:25,page:i+1});l.isError||(n(i+1),u([...c,...null!==(t=null===(a=l.data)||void 0===a?void 0:a.items)&&void 0!==t?t:[]]))};return{databases:c,totalDatabases:s,fetchMore:b,initialIsLoading:l,isLoading:p,reachedEnd:d}},E=e=>{var a;let{monitor:i,isEditing:l,isSubmitting:o,integrationKey:r,onSubmit:s,onClose:d}=e,c=(0,t.pmc)(),{databases:u,totalDatabases:_,fetchMore:F,reachedEnd:m,isLoading:g,initialIsLoading:b}=w(r,()=>{s({...i,databases:[]}),c({...j.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()}),h=null!==(a=null==i?void 0:i.databases)&&void 0!==a?a:[],{selected:x,excluded:y,allSelected:v,someSelected:S,handleToggleItemSelected:C,handleToggleAll:f}=(0,k.Od)({initialSelected:h,initialExcluded:[],initialAllSelected:l&&!h.length,itemCount:_}),M=!v&&0===x.length;return b?(0,n.jsx)(p.Z,{my:12}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.kCb,{p:4,direction:"column",children:[(0,n.jsxs)(t.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,n.jsx)(t.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,n.jsx)(A.Z,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,n.jsx)(T,{items:u,totalItemCount:_,selected:x,excluded:y,allSelected:v,someSelected:S,moreLoading:g,handleToggleSelection:C,handleToggleAll:f,onMoreClick:m?void 0:F})]}),(0,n.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:d,children:"Cancel"}),(0,n.jsx)(t.ua7,{label:"Select one or more projects to save",isDisabled:!M,children:(0,n.jsx)(t.wpx,{onClick:()=>{s({...i,excluded_databases:y,databases:v?[]:x})},loading:o,type:"primary","data-testid":"save-btn",disabled:M,children:"Save"})})]})]})},U=i(19508),R=i(96063),I=i(34090),L=i(55484),D=i(97181),q=i(40324),O=i(28120),B=e=>{var a,i;let{monitor:o,integrationOption:r,isSubmitting:s,databasesAvailable:d,onClose:c,onAdvance:u,onSubmit:_}=e,F=!!o,{query:m}=(0,l.useRouter)(),g=Array.isArray(m.id)?m.id[0]:m.id,p=L.Ry().shape({name:L.Z_().required().label("Name"),execution_frequency:L.Z_().nullable().label("Execution frequency"),execution_start_date:L.hT().nullable().label("Execution start date")}),b=(null==o?void 0:o.execution_start_date)?(0,U.D)(o.execution_start_date):Date.now(),h={name:null!==(a=null==o?void 0:o.name)&&void 0!==a?a:"",execution_start_date:(0,R.WU)(b,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(i=null==o?void 0:o.execution_frequency)&&void 0!==i?i:O.hV.MONTHLY},x=(0,S.MM)(O.hV);return(0,n.jsx)(I.J9,{initialValues:h,enableReinitialize:!0,onSubmit:e=>{let a=e.execution_frequency!==O.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:O.hV.NOT_SCHEDULED,execution_start_date:void 0},i=F?{...o,...a,name:e.name}:{...a,name:e.name,connection_config_key:g,classify_params:{num_samples:25,num_threads:1}};r.identifier===O.Rj.DYNAMODB&&(i.datasource_params={single_dataset:!1}),d?u(i):_(i)},validationSchema:p,children:e=>{let{values:a,isValid:i,resetForm:l}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,n.jsx)(q.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(D.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:x,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(q.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===O.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{l(),c()},children:"Cancel"}),(0,n.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:!i,loading:s,"data-testid":"next-btn",children:d?"Next":"Save"})]})]})})}})},G=i(90111),P=i(3968),V=i(64781),H=i(60325);let Z=L.Ry().shape({name:L.Z_().required().label("Name"),execution_frequency:L.Z_().nullable().label("Execution frequency"),execution_start_date:L.hT().nullable().label("Execution start date"),datasource_params:L.Ry().shape({locations:L.IX().label("Locations"),exclude_domains:L.IX().label("Exclude domains"),sitemap_url:L.Z_().nullable().url().label("Sitemap URL")})});var K=e=>{var a,i,o;let{monitor:r,url:s,onClose:d,onSubmit:c}=e,{query:u}=(0,l.useRouter)(),_=Array.isArray(u.id)?u.id[0]:u.id,F=(null==r?void 0:r.execution_start_date)?(0,U.D)(r.execution_start_date):Date.now(),{data:m,isLoading:g}=(0,V.gT)(),p=[...(0,H.TK)(null!==(a=null==m?void 0:m.locations)&&void 0!==a?a:[]),...(0,H.TK)(null!==(i=null==m?void 0:m.location_groups)&&void 0!==i?i:[])].map(e=>({value:e,label:h.Z8[e]})),b={name:(null==r?void 0:r.name)||"",execution_frequency:(null==r?void 0:r.execution_frequency)||O.hV.NOT_SCHEDULED,execution_start_date:(0,R.WU)(F,"yyyy-MM-dd'T'HH:mm"),url:s,connection_config_key:_,datasource_params:null!==(o=null==r?void 0:r.datasource_params)&&void 0!==o?o:{locations:[]}},x=async e=>{let a=e.execution_frequency!==O.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:O.hV.NOT_SCHEDULED,execution_start_date:void 0};c({...r,...e,...a,key:(null==r?void 0:r.key)||(0,P.E)(e.name),classify_params:(null==r?void 0:r.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:_})},y=(0,S.MM)(O.hV).filter(e=>[O.hV.MONTHLY,O.hV.QUARTERLY,O.hV.YEARLY,O.hV.NOT_SCHEDULED].includes(e.value));return(0,n.jsxs)(t.jqI,{vertical:!0,className:"pt-4",children:[(0,n.jsx)(G.Z,{children:(0,n.jsx)(t.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,n.jsx)(I.J9,{initialValues:b,enableReinitialize:!0,onSubmit:x,validationSchema:Z,children:e=>{let{values:a,resetForm:i}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.jqI,{vertical:!0,gap:"middle",children:[(0,n.jsx)(q.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(q.j0,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",variant:"stacked"}),(0,n.jsx)(D.d,{mode:"tags",name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",options:[],open:!1,layout:"stacked"}),(0,n.jsx)(q.j0,{name:"url",id:"url",label:"URL",isRequired:!0,disabled:!0,variant:"stacked"}),(0,n.jsx)(D.d,{mode:"multiple",isRequired:!0,name:"datasource_params.locations",id:"locations",label:"Locations",loading:g,options:p,optionFilterProp:"label",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.",layout:"stacked"}),(0,n.jsx)(D.d,{name:"execution_frequency",id:"execution_frequency",options:y,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(q.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===O.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."}),(0,n.jsxs)(t.jqI,{className:"mt-2 justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{i(),d()},children:"Cancel"}),(0,n.jsx)(t.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",children:"Save"})]})]})})}})]})},z=i(31883),W=e=>{let{isOpen:a,onClose:i,formStep:l,onAdvance:o,monitor:r,isEditing:s,integration:d,integrationOption:c}=e,[u,{isLoading:_}]=(0,v.Fy)(),{data:F}=(0,v.oN)({page:1,size:25,connection_config_key:d.key}),m=!!F&&!!F.total,g=(0,t.pmc)(),{toastResult:b}=C({defaultSuccessMsg:"Monitor ".concat(s?"updated":"created"," successfully"),defaultErrorMsg:"A problem occurred while ".concat(s?"updating":"creating"," this monitor")}),h=async e=>{let a;let n=setTimeout(()=>{a||(g({...j.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."}),i())},5e3);(a=await u(e))&&(clearTimeout(n),b(a),(0,z.D4)(a)||i())};return c.identifier===O.Rj.WEBSITE?(0,n.jsx)(f.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:a,onClose:i,children:(0,n.jsx)(K,{monitor:r,url:d.secrets.url,onClose:i,onSubmit:h})}):(0,n.jsxs)(f.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:a,onClose:i,children:[0===l&&(0,n.jsx)(B,{monitor:r,onClose:i,onAdvance:o,onSubmit:h,isSubmitting:_,databasesAvailable:m,integrationOption:c}),1===l&&(r?(0,n.jsx)(E,{monitor:r,isEditing:s,isSubmitting:_,onSubmit:h,onClose:i,integrationKey:d.key}):(0,n.jsx)(p.Z,{}))]})},Y=i(58452),J=i(79494),Q=e=>{let{monitorId:a,onEditClick:i}=e,[l]=(0,v.Sb)(),{toastResult:o}=C({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[r,{isLoading:s}]=(0,v.V9)(),{toastResult:d}=C({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:"Monitor execution successfully started"}),c=async()=>{o(await l({monitor_config_id:a}))},{isOpen:u,onOpen:_,onClose:F}=(0,t.qY0)(),m=async()=>{d(await r({monitor_config_id:a}))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y.Z,{isOpen:u,onClose:F,onConfirm:c,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(t.ua7,{label:"Edit",children:(0,n.jsx)(t.wpx,{onClick:i,size:"small",icon:(0,n.jsx)(t.dY8,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,n.jsx)(t.ua7,{label:"Delete",children:(0,n.jsx)(t.wpx,{onClick:_,size:"small",icon:(0,n.jsx)(t.pJl,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,n.jsx)(J.Z,{onClick:m,title:"Scan",loading:s})]})]})};let X=e=>{let{row:a,getValue:i}=e,[t]=(0,v.Fy)(),l=async e=>t({...a.original,enabled:e}),o=i();return(0,n.jsx)(y.S1,{enabled:o,onToggle:l,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},$={items:[],total:0,page:1,size:50,pages:0},ee=(0,F.Cl)(),ea=e=>{let{onAddClick:a}=e;return(0,n.jsx)(t.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,n.jsxs)(t.gCW,{children:[(0,n.jsx)(t.xvT,{fontSize:"md",fontWeight:"600",children:"No monitors"}),(0,n.jsx)(t.xvT,{fontSize:"sm",children:'You have not configured any data discovery monitors. Click "Add monitor" to configure data discovery now.'}),(0,n.jsx)(t.wpx,{onClick:a,type:"primary",children:"Add monitor"})]})})};var ei=e=>{let{integration:a,integrationOption:i}=e,{PAGE_SIZES:l,pageSize:o,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:_,endRange:S,pageIndex:C,setTotalPages:f}=(0,x.oi)(),{isLoading:j,isFetching:k,data:A}=(0,v.Fu)({page:C,size:o,connection_config_key:a.key}),M=(0,t.qY0)(),[T,N]=(0,g.useState)(void 0),[w,E]=(0,g.useState)(!1),[U,R]=(0,g.useState)(0),I=e=>{N(e),E(!0),M.onOpen()},L=null!=A?A:$,{items:D,total:q,pages:B}=(0,g.useMemo)(()=>L,[L]);(0,g.useEffect)(()=>{f(B)},[B,f]);let G=(0,g.useMemo)(()=>{let e=ee.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Name",...e})}),t=ee.accessor(e=>e.databases,{id:"projects",cell:e=>{var a;return(null===(a=e.getValue())||void 0===a?void 0:a.length)===0?(0,n.jsx)(x.G3,{value:"All projects"}):(0,n.jsx)(x.WP,{suffix:"Projects",value:e.getValue(),...e,cellState:{isExpanded:!0}})},header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})}),l=ee.accessor(()=>{let e=a.secrets;return null==e?void 0:e.url},{id:"source_url",cell:e=>{var a;return(0,n.jsx)(x.G3,{value:null!==(a=e.getValue())&&void 0!==a?a:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Source URL",...e})}),o=ee.accessor(e=>e.execution_frequency,{id:"frequency",cell:e=>{var a;return(0,n.jsx)(x.G3,{value:null!==(a=e.getValue())&&void 0!==a?a:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Scan frequency",...e})}),r=ee.accessor(e=>e.last_monitored,{id:"last_monitored",cell:e=>(0,n.jsx)(y.Cy,{time:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Last scan",...e})}),s=ee.accessor(e=>{var a;let i=e.datasource_params;return(null==i?void 0:null===(a=i.locations)||void 0===a?void 0:a.map(e=>h.Z8[e]).join(", "))||"No regions selected"},{id:"regions",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Regions",...e})}),d=ee.accessor(e=>e.enabled,{id:"status",cell:X,header:e=>(0,n.jsx)(x.Rr,{value:"Status",...e}),size:0,meta:{disableRowClick:!0}}),c=ee.display({id:"action",cell:e=>(0,n.jsx)(Q,{onEditClick:()=>I(e.row.original),monitorId:e.row.original.key}),header:"Actions",meta:{disableRowClick:!0}});return(null==i?void 0:i.identifier)===O.Rj.WEBSITE?[e,l,o,s,r,d,c]:[e,t,o,r,d,c]},[]),P=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getGroupedRowModel:(0,F.qe)(),getExpandedRowModel:(0,F.rV)(),getRowId:e=>e.name,manualPagination:!0,data:D,columns:G,columnResizeMode:"onChange"});return j?(0,n.jsx)(p.Z,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.xvT,{maxW:"720px",mb:6,fontSize:"sm","data-testid":"monitor-description",children:(null==i?void 0:i.identifier)===O.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.":"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."}),(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(t.LZC,{}),(0,n.jsx)(t.wpx,{onClick:M.onOpen,icon:(0,n.jsx)(b,{}),iconPosition:"end","data-testid":"add-monitor-btn",children:"Add monitor"}),(0,n.jsx)(W,{isOpen:M.isOpen,onClose:()=>{N(void 0),E(!1),R(0),M.onClose()},formStep:U,onAdvance:e=>{N(e),R(1)},monitor:T,isEditing:w,integration:a,integrationOption:i})]}),(0,n.jsx)(x.ZK,{tableInstance:P,onRowClick:I,emptyTableNotice:(0,n.jsx)(ea,{onAddClick:M.onOpen})}),(0,n.jsx)(x.s8,{totalRows:q||0,pageSizes:l,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d||k,onNextPageClick:c,isNextPageDisabled:u||k,startRange:_,endRange:S})]})},en=i(41966),et=i(32885),el=e=>{let{integration:a}=e,{data:i}=(0,c.Eg)(a.key),{data:l}=(0,en.LH)({minimal:!0,connection_type:O.Rj.BIGQUERY}),[o,{isLoading:r}]=(0,et.Qd)(),s=(0,t.pmc)(),d=async()=>{try{var e,n,t,r,d;let c=null!==(t=null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.map(e=>e.fides_key))&&void 0!==t?t:[],u=null!==(r=null==l?void 0:l.map(e=>e.fides_key))&&void 0!==r?r:[],_=c.length>0?c:u,F=await o({connectionKey:a.key,datasetIds:_}),m=null!==(d=null===(n=F.data)||void 0===n?void 0:n.succeeded.length)&&void 0!==d?d:0,g="Fides has begun syncing with DataHub. There ".concat(1===m?"is":"are"," ").concat(m," dataset").concat(1===m?"":"s"," queued for syncing.");s((0,j.t5)(g))}catch(e){s({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,n.jsxs)(t.gCW,{spacing:6,align:"stretch",children:[(0,n.jsxs)(t.gCW,{spacing:4,align:"stretch",children:[(0,n.jsx)(t.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,n.jsxs)(t.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, view our docs ",(0,n.jsx)(t.rUS,{href:"https://ethyca.com/docs/user-guides/integrations/saas-integrations/datahub",isExternal:!0,color:"blue.500",textDecoration:"underline",children:"here"}),"."]})]}),(0,n.jsx)(t.zxk,{colorScheme:"primary",onClick:d,"data-testid":"sync-button",width:"fit-content",isLoading:r,loadingText:"Syncing datasets...",children:"Sync Datasets"})]})},eo=i(15987),er=i(64176),es=e=>{let{isOpen:a,onClose:i,connection:t}=e,l=(0,er.Z)(t.connection_type);return(0,n.jsx)(f.Z,{title:"Manage integration secret",isOpen:a,onClose:i,children:(0,n.jsx)(eo.Z,{connection:t,connectionOption:l,onCancel:i})})},ed=i(41553),ec=i(75595),eu=()=>{var e,a;let{query:i}=(0,l.useRouter)(),F=Array.isArray(i.id)?i.id[0]:i.id,{data:m,isLoading:g}=(0,c.jA)(null!=F?F:""),p=(0,er.Z)(null==m?void 0:m.connection_type),{testConnection:b,isLoading:h,testData:x}=(0,u.Z)(m),{onOpen:y,isOpen:v,onClose:S}=(0,t.qY0)(),{overview:C,instructions:f}=(0,_.ZP)(null==m?void 0:m.connection_type),j=(0,l.useRouter)();m&&!_.jq.includes(m.connection_type)&&j.push(s.KH);let k=[{label:"Connection",content:(0,n.jsxs)(t.xuv,{maxW:"720px",children:[(0,n.jsxs)(t.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,n.jsx)(t.kCb,{flexDirection:"column",children:(0,n.jsx)(ed.Z,{testData:x})}),(0,n.jsx)(t.LZC,{}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)(t.wpx,{onClick:b,loading:h,"data-testid":"test-connection-btn",children:"Test connection"}),(0,n.jsx)(t.wpx,{onClick:y,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,n.jsx)(es,{isOpen:v,onClose:S,connection:m}),C,f]})}];return(null==m?void 0:m.connection_type)===O.Rj.DATAHUB?k.push({label:"Data sync",content:(0,n.jsx)(el,{integration:m})}):k.push({label:"Data discovery",content:(0,n.jsx)(ei,{integration:m,integrationOption:p})}),(0,n.jsx)(r.Z,{title:"Integrations",children:(0,n.jsxs)(d.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:s.KH},{title:null!==(a=null!==(e=null==m?void 0:m.name)&&void 0!==e?e:null==m?void 0:m.key)&&void 0!==a?a:""}],children:[(0,n.jsx)(ec.Z,{integration:m,showDeleteButton:!0}),g?(0,n.jsx)(t.$jN,{}):!!m&&(0,n.jsx)(o.Z,{data:k,isLazy:!0})]})})}}},function(e){e.O(0,[8033,6060,2858,2866,9278,9255,4481,5973,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2815],{79349:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},52033:function(e,t,n){var i=n(26194),r=n(26789)(i);e.exports=r},23545:function(e,t,n){var i=n(97141),r=n(72889);e.exports=function e(t,n,s,a,o){var l=-1,c=t.length;for(s||(s=r),o||(o=[]);++l<c;){var u=t[l];n>0&&s(u)?n>1?e(u,n-1,s,a,o):i(o,u):a||(o[o.length]=u)}return o}},49819:function(e,t,n){var i=n(18911)();e.exports=i},26194:function(e,t,n){var i=n(49819),r=n(50098);e.exports=function(e,t){return e&&i(e,t,r)}},67375:function(e,t,n){var i=n(52033),r=n(80068);e.exports=function(e,t){var n=-1,s=r(e)?Array(e.length):[];return i(e,function(e,i,r){s[++n]=t(e,i,r)}),s}},98497:function(e,t,n){var i=n(66070),r=n(79867),s=n(89278),a=n(67375),o=n(73303),l=n(39334),c=n(96348),u=n(31137),d=n(19785);e.exports=function(e,t,n){t=t.length?i(t,function(e){return d(e)?function(t){return r(t,1===e.length?e[0]:e)}:e}):[u];var p=-1;return t=i(t,l(s)),o(a(e,function(e,n,r){return{criteria:i(t,function(t){return t(e)}),index:++p,value:e}}),function(e,t){return c(e,t,n)})}},1197:function(e,t,n){var i=n(31137),r=n(11871),s=n(63132);e.exports=function(e,t){return s(r(e,t,i),e+"")}},54459:function(e,t,n){var i=n(551),r=n(42630),s=n(31137),a=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:s;e.exports=a},73303:function(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},17845:function(e,t,n){var i=n(55193);e.exports=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,s=e==e,a=i(e),o=void 0!==t,l=null===t,c=t==t,u=i(t);if(!l&&!u&&!a&&e>t||a&&o&&c&&!l&&!u||r&&o&&c||!n&&c||!s)return 1;if(!r&&!a&&!u&&e<t||u&&n&&s&&!r&&!a||l&&n&&s||!o&&s||!c)return -1}return 0}},96348:function(e,t,n){var i=n(17845);e.exports=function(e,t,n){for(var r=-1,s=e.criteria,a=t.criteria,o=s.length,l=n.length;++r<o;){var c=i(s[r],a[r]);if(c){if(r>=l)return c;return c*("desc"==n[r]?-1:1)}}return e.index-t.index}},26789:function(e,t,n){var i=n(80068);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var s=n.length,a=t?s:-1,o=Object(n);(t?a--:++a<s)&&!1!==r(o[a],a,o););return n}}},18911:function(e){e.exports=function(e){return function(t,n,i){for(var r=-1,s=Object(t),a=i(t),o=a.length;o--;){var l=a[e?o:++r];if(!1===n(s[l],l,s))break}return t}}},42630:function(e,t,n){var i=n(81822),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},72889:function(e,t,n){var i=n(96539),r=n(2900),s=n(19785),a=i?i.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||r(e)||!!(a&&e&&e[a])}},57535:function(e,t,n){var i=n(85638),r=n(80068),s=n(42383),a=n(11611);e.exports=function(e,t,n){if(!a(n))return!1;var o=typeof t;return("number"==o?!!(r(n)&&s(t,n.length)):"string"==o&&t in n)&&i(n[t],e)}},11871:function(e,t,n){var i=n(79349),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,o=r(s.length-t,0),l=Array(o);++a<o;)l[a]=s[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=s[a];return c[t]=n(l),i(e,this,c)}}},63132:function(e,t,n){var i=n(54459),r=n(49591)(i);e.exports=r},49591:function(e){var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),s=16-(r-i);if(i=r,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},551:function(e){e.exports=function(e){return function(){return e}}},95099:function(e,t,n){var i=n(23545),r=n(98497),s=n(1197),a=n(57535),o=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,i(t,1),[])});e.exports=o},24081:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/messaging",function(){return n(18504)}])},35287:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(88038),a=n.n(s);n(27378),t.Z=e=>{let{children:t,title:n,mainProps:s}=e;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},87361:function(e,t,n){"use strict";var i=n(24246),r=n(77181);t.Z=e=>{let{title:t,text:n,onClose:s}=e;return(0,i.jsxs)(r.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[s&&(0,i.jsx)(r.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:s}),(0,i.jsx)(r.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(r.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(r.X6q,{fontSize:"md",children:t}),(0,i.jsx)(r.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:n})]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...u}=e;return(0,i.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var i=n(24246),r=n(77181),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,c=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),c)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return p},L:function(){return o},U7:function(){return c},Yh:function(){return f},ak:function(){return l},iR:function(){return x},km:function(){return a},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:o}=r,l=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,s;let{data:a}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origins)||[]}}}),c=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),u={enabled:!1,cmp_api_required:!1},d=(e,t,n,i)=>{let r=n&&n[e],s=i&&i[e];return r&&s?{...i[e],...n[e]}:s?i[e]:r?{...n[e]}:t},p=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("gpp",u,i,r)}),g={tcf_publisher_country_code:null},f=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("plus_consent_settings",g,i,r)}),m={allow_username_password_login:!1},x=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("plus_security_settings",m,i,r)})},67810:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}}),(i=r||(r={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",i.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",i.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",i.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",i.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",i.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var i,r,s={[r.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[r.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[r.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[r.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[r.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[r.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},5058:function(e,t,n){"use strict";n.d(t,{Vw:function(){return s},ms:function(){return i},pS:function(){return r},vm:function(){return a}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:r,useCreateMessagingTemplateByTypeMutation:s,usePatchMessagingTemplateByIdMutation:a}=n(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},18504:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var i=n(24246),r=n(92222),s=n(59003),a=n(77181),o=n(95099),l=n.n(o),c=n(86677),u=n(27378),d=n(35287),p=n(71795),g=n(87361),f=n(77830),m=n(58754),x=n(91613),h=n(14481),v=n(42904),_=n(7426),y=n(67810),j=e=>{let{isOpen:t,onClose:n,onAccept:r}=e,[s,o]=(0,u.useState)(void 0),l=Object.keys(y.Z).map(e=>({value:e,label:y.Z[e]}));return(0,i.jsxs)(a.u_l,{isOpen:t,onClose:n,size:"2xl",isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{"data-testid":"add-messaging-template-modal",children:[(0,i.jsx)(a.xBx,{borderBottomWidth:1,fontWeight:"bold",children:"Select message template"}),(0,i.jsxs)(a.fef,{children:[(0,i.jsx)(a.xvT,{color:"gray.700",fontWeight:"medium",fontSize:"sm",marginBottom:3,marginTop:1,children:"Add a new email message by selecting a template below and clicking accept."}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"medium",marginBottom:2,children:"Choose template:"}),(0,i.jsx)(a.xuv,{"data-testid":"template-type-selector",children:(0,i.jsx)(a.WPr,{options:l,onChange:e=>{o(e)},className:"w-full"})})]}),(0,i.jsx)(a.mzw,{justifyContent:"flex-start",children:(0,i.jsxs)("div",{className:"flex w-full gap-4",children:[(0,i.jsx)(a.wpx,{onClick:n,"data-testid":"cancel-btn",className:"grow",children:"Cancel"}),(0,i.jsx)(a.wpx,{onClick:()=>r(s),type:"primary","data-testid":"confirm-btn",disabled:!s,className:"grow",children:"Next"})]})})]})]})},b=n(5058),C=n(812),E=n(46628),T=n(31883),S=()=>{let e=(0,a.pmc)(),[t]=(0,b.vm)();return{toggleIsTemplateEnabled:(0,u.useCallback)(async n=>{let{isEnabled:i,templateId:r}=n,s=await t({templateId:r,template:{is_enabled:i}});if((0,T.D4)(s)){e((0,E.Vo)((0,C.e$)(s.error)));return}e((0,E.t5)("Messaging template ".concat(i?"enabled":"disabled")))},[t,e])}},w=n(64826);let P=(0,r.Cl)(),R={items:[],total:0,page:1,size:50,pages:1},I=()=>(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(a.xvT,{fontSize:"sm",children:["Add new email templates with the ",'"Add message +"'," button.",(0,i.jsx)("br",{})]})]})}),k=()=>{let{isLoading:e,data:t}=(0,w.gz)({page:1,size:100}),n=null==t?void 0:t.items.filter(e=>!e.messaging_templates||0===e.messaging_templates.length),r=!!(!e&&(null==n?void 0:n.length)),s="missing-messages-notice-".concat(null==n?void 0:n.map(e=>e.id).join("-")),[o,l]=(0,p._)("notices.dismissedMessageNoticeId",""),c=s===o;return r&&!c?(0,i.jsx)(a.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(g.Z,{title:"Not all properties have messages configured.",text:(0,i.jsxs)(a.xvT,{as:"span",children:["You have properties that do not have messages configured. Users who submit privacy requests for these properties may not receive the necessary emails regarding their requests."," ",(0,i.jsx)(a.xuv,{as:"span",children:(0,i.jsx)(x.Z,{label:null==n?void 0:n.map(e=>e.name).join(", ")})})]}),onClose:()=>{l(s)}})}):null},A=()=>{let{data:e}=(0,_.tB)({api_set:!1});return(null==e?void 0:e.notifications.enable_property_specific_messaging)?null:(0,i.jsx)(a.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(g.Z,{title:"Basic messaging enabled",text:(0,i.jsxs)(a.xvT,{as:"span",children:["In basic messaging mode, you can edit the content of your messages from this screen. Please note that in basic messaging, the “Enable” toggle does not apply. Fides also supports property specific messaging mode. Read our"," ",(0,i.jsx)(a.rUS,{href:"https://fid.es/property-specific-messaging",target:"_blank",rel:"nofollow",textDecoration:"underline",children:"docs"})," ","for more information about property specific mode or contact"," ",(0,i.jsx)(a.rUS,{href:"mailto:support@ethyca.com",textDecoration:"underline",children:"Ethyca support"})," ","to enable this mode on your Fides instance."]})})})};var N=()=>{let e=(0,c.useRouter)(),{toggleIsTemplateEnabled:t}=S(),{PAGE_SIZES:n,pageSize:o,setPageSize:p,onPreviousPageClick:g,isPreviousPageDisabled:x,onNextPageClick:_,isNextPageDisabled:C,startRange:E,endRange:T,pageIndex:w,setTotalPages:N}=(0,h.oi)(),{data:q,isLoading:M,isFetching:z}=(0,b.ms)({page:w,size:o}),{items:V,total:U,pages:O}=(0,u.useMemo)(()=>null!=q?q:R,[q]);(0,u.useEffect)(()=>{N(O)},[O,N]);let[B,W]=(0,u.useState)(!1),Y=(0,u.useMemo)(()=>[P.accessor(e=>e.type,{id:"message",cell:e=>(0,i.jsx)(h.G3,{value:y.Z[e.getValue()]}),header:e=>(0,i.jsx)(h.Rr,{value:"Message",...e}),size:150}),P.accessor(e=>(e.properties||[]).map(e=>e.name),{id:"properties",cell:e=>(0,i.jsx)(h.WP,{suffix:"properties",value:e.getValue(),...e}),header:e=>(0,i.jsx)(h.Rr,{value:"Properties",...e}),meta:{showHeaderMenu:!0},size:250}),P.accessor(e=>e.is_enabled,{id:"is_enabled",cell:e=>(0,i.jsx)(a.kCb,{align:"center",justifyContent:"flex-start",w:"full",h:"full",children:(0,i.jsx)(a.rAg,{checked:e.getValue(),onChange:n=>{t({isEnabled:n,templateId:e.row.original.id})}})}),header:e=>(0,i.jsx)(h.Rr,{value:"Enable",...e}),size:200,meta:{disableRowClick:!0}})],[t]),D=(0,u.useMemo)(()=>l()(V,"id"),[V]),Z=(0,s.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),columns:Y,data:D,columnResizeMode:"onChange"});return(0,i.jsxs)(d.Z,{title:"Messaging",children:[(0,i.jsx)(m.Z,{heading:"Messaging"}),(0,i.jsx)(A,{}),(0,i.jsx)(k,{}),(0,i.jsx)(h.Q$,{children:(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,marginLeft:"auto",children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-message-btn",onClick:()=>W(!0),children:"Add message +"})})}),M?(0,i.jsx)(h.I4,{rowHeight:36,numRows:15}):(0,i.jsx)(h.ZK,{tableInstance:Z,onRowClick:t=>{e.push({pathname:f.ax,query:{id:t.id}})},emptyTableNotice:(0,i.jsx)(I,{})}),(0,i.jsx)(v.s8,{totalRows:U||0,pageSizes:n,setPageSize:p,onPreviousPageClick:g,isPreviousPageDisabled:x||z,onNextPageClick:_,isNextPageDisabled:C||z,startRange:E,endRange:T}),(0,i.jsx)(j,{isOpen:B,onClose:()=>W(!1),onAccept:t=>{e.push({pathname:f.sM,query:{templateType:t}})}})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=n(19043)}},function(e){e.O(0,[8033,6060,2858,2866,9278,4481,2888,9774,179],function(){return e(e.s=24081)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(61463)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(77181),r=i(88038),a=i.n(r),l=i(86677);i(27378);var o=i(25980),u=i(90867),c=i(77830),d=()=>{let e=(0,l.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(c.fz)},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."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,m=(0,o.hz)(),p=(0,l.useRouter)(),g="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,f=!(m.flags.privacyRequestsConfiguration&&g),{data:h}=(0,u.JE)(void 0,{skip:f}),{data:x}=(0,u.PW)(void 0,{skip:f}),y=m.flags.privacyRequestsConfiguration&&(!h||!x)&&g;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(77181),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:l,rightContent:o,style:u,...c}=e;return(0,n.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.X6q,{className:i||l?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return u},c6:function(){return s},cj:function(){return g},e$:function(){return l},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return c}});var n,s,r=i(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:l(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(77181);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,i,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return u}});var n=i(24246),s=i(77181),r=i(79894),a=i.n(r),l=i(27378);let{Text:o}=s.AntTypography,u=e=>{let{items:t,...i}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,l={...e},u=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:l.title})),u)?l.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,n.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},7426:function(e,t,i){"use strict";i.d(t,{D2:function(){return m},L:function(){return l},U7:function(){return u},Yh:function(){return g},ak:function(){return o},iR:function(){return h},km:function(){return a},tB:function(){return r}});var n=i(3228);let s=i(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:r,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:l}=s,o=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{var n,s,r;let{data:a}=t,{data:l}=i;return{configSet:{cors_origins:(null==l?void 0:null===(n=l.security)||void 0===n?void 0:n.cors_origins)||[],cors_origin_regex:null==l?void 0:null===(s=l.security)||void 0===s?void 0:s.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(r=a.security)||void 0===r?void 0:r.cors_origins)||[]}}}),u=()=>(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:i}=t;return i}),c={enabled:!1,cmp_api_required:!1},d=(e,t,i,n)=>{let s=i&&i[e],r=n&&n[e];return s&&r?{...n[e],...i[e]}:r?n[e]:s?{...i[e]}:t},m=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("gpp",c,n,s)}),p={tcf_publisher_country_code:null},g=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("plus_consent_settings",p,n,s)}),f={allow_username_password_login:!1},h=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("plus_security_settings",f,n,s)})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return a},qX:function(){return l},rE:function(){return r}});var n=i(28120);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),a=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),l={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},61463:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(77181),r=i(27378),a=i(812),l=i(14047),o=i(77213),u=i(77830),c=i(58754),d=i(7426),m=i(71784),p=i(90867),g=i(34090),f=i(40324),h=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,l.V)(),{handleError:r}=(0,l.H)(),[o]=(0,p.SU)(),u=t.service_type===m.qX.twilio_email||t.service_type===m.qX.mailgun,c=t.service_type===m.qX.twilio_text,d=async e=>{if(u){let t=await o({email:e.email});(0,a.D4)(t)?r(t.error):i("Test message successfully sent.")}if(c){let t=await o({phone_number:e.phone});(0,a.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{email:"",phone:""},onSubmit:d,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(g.l0,{children:[u?(0,n.jsx)(f.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,c?(0,n.jsx)(f.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},x=()=>{var e;let{successAlert:t}=(0,l.V)(),[i,o]=(0,r.useState)(""),{handleError:u}=(0,l.H)(),{data:c}=(0,p.S3)({type:m.qX.mailgun}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let i=await d({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,a.D4)(i)?u(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let i=await x({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,a.D4)(i)?u(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},j={domain:null!==(e=null==c?void 0:c.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(f.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(f.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(h,{messagingDetails:c||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,l.V)(),{handleError:u}=(0,l.H)(),{data:c}=(0,p.S3)({type:m.qX.twilio_email}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let t=await d({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,a.D4)(t)?u(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},v=async e=>{let t=await x({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,a.D4)(t)?u(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},j={email:null!==(e=null==c?void 0:c.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(f.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(f.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(h,{messagingDetails:c||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,l.V)(),{handleError:t}=(0,l.H)(),[i,o]=(0,r.useState)(""),{data:u}=(0,p.S3)({type:"twilio_text"}),[c]=(0,p.iI)(),d=async i=>{let n=await c({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:m.qX.twilio_text});(0,a.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:d,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(f.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(f.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(f.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(f.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(h,{messagingDetails:u||{service_type:m.qX.twilio_text}}):null]})},j=()=>{let{successAlert:e}=(0,l.V)(),{handleError:t}=(0,l.H)(),[i,g]=(0,r.useState)(""),[f]=(0,p.h9)(),[h]=(0,d.L)(),{data:j}=(0,p.JE)();(0,r.useEffect)(()=>{j&&g(null==j?void 0:j.service_type)},[j]);let _=async i=>{let{value:n}=i.target,s=await h({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,a.D4)(s))t(s.error);else if(n!==m.qX.twilio_text)g(n);else{let i=await f({service_type:m.qX.twilio_text});(0,a.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),g(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Configure requests",href:u.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.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,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:_,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,n.jsx)(s.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,n.jsx)(s.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),i===m.qX.mailgun?(0,n.jsx)(x,{}):null,i===m.qX.twilio_email?(0,n.jsx)(y,{}):null,i===m.qX.twilio_text?(0,n.jsx)(v,{}):null]})]})},_=()=>(0,n.jsx)(j,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return a},D4:function(){return s},Dy:function(){return o},XD:function(){return u},cz:function(){return c},hE:function(){return l},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class a{static narrow(e){return new a(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof a?e.NF:e instanceof Function?e:t=>n(e,t);return new a(e=>t(e)&&i(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return n(49755)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(24246),s=n(77181),r=n(88038),a=n.n(r),o=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,o.useRouter)();return(0,i.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,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.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:t,title:n,padded:r=!0,mainProps:c}=e,g=(0,l.hz)(),p=(0,o.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,u.JE)(void 0,{skip:m}),{data:v}=(0,u.PW)(void 0,{skip:m}),x=g.flags.privacyRequestsConfiguration&&(!h||!v)&&f;return(0,i.jsxs)(s.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(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",...c,children:[x?(0,i.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),s=n(77181),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:u,...c}=e;return(0,i.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,i.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(s.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(r.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var i=n(24246),s=n(77181),r=n(34090),a=n(27378),o=n(91613),l=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:g="inline",...p}=e,[f,m,{setValue:h}]=(0,r.U$)(t),v=!!(m.touched&&m.error),[x,y]=(0,a.useState)("");f.value||"tags"!==p.mode&&"multiple"!==p.mode||(f.value=[]),"tags"===p.mode&&"string"==typeof f.value&&(f.value=[f.value]);let j="tags"===p.mode?(e,t)=>e?e.value!==x||f.value.includes(x)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(x,'"'):void 0:p.optionRender||void 0,_=e=>{y(e),p.onSearch&&p.onSearch(e)},b=(e,t)=>{h(e),p.onChange&&p.onChange(e,t)};return"inline"===g?(0,i.jsx)(s.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(s.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,...u,children:n}):null,(0,i.jsxs)(s.jqI,{align:"center",children:[(0,i.jsxs)(s.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(s.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]}),c?(0,i.jsx)(o.Z,{label:c}):null]})]})}):(0,i.jsx)(s.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(s.gCW,{alignItems:"start",children:[(0,i.jsxs)(s.jqI,{align:"center",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,c?(0,i.jsx)(o.Z,{label:c}):null]}),(0,i.jsx)(s.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return r.D4},MM:function(){return g},Ot:function(){return u},c6:function(){return s},cj:function(){return f},e$:function(){return o},fn:function(){return l},iC:function(){return p},nU:function(){return d},tB:function(){return c}});var i,s,r=n(19043);let a="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=s||(s={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return r},V:function(){return i.V}});var i=n(84306),s=n(812);let r=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?n=t.data.detail:(0,s.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var i=n(24246),s=n(77181);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,i.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(s.zMQ,{}),(0,i.jsxs)(s.xuv,{children:[n&&(0,i.jsx)(s.CdC,{children:n}),(0,i.jsx)(s.XaZ,{children:t})]}),(0,i.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,i.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(s.zMQ,{}),(0,i.jsxs)(s.xuv,{children:[n&&(0,i.jsx)(s.CdC,{children:n}),(0,i.jsx)(s.XaZ,{children:t})]}),(0,i.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var i=n(24246),s=n(77181),r=n(79894),a=n.n(r),o=n(27378);let{Text:l}=s.AntTypography,u=e=>{let{items:t,...n}=e,r=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,o={...e},u=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:o.title})),u)?o.title=(0,i.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(s.zrq,{items:r,...n})}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return g},L:function(){return o},U7:function(){return u},Yh:function(){return f},ak:function(){return l},iR:function(){return h},km:function(){return a},tB:function(){return r}});var i=n(3228);let s=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:r,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:o}=s,l=(0,i.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,s,r;let{data:a}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(s=o.security)||void 0===s?void 0:s.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(r=a.security)||void 0===r?void 0:r.cors_origins)||[]}}}),u=()=>(0,i.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),c={enabled:!1,cmp_api_required:!1},d=(e,t,n,i)=>{let s=n&&n[e],r=i&&i[e];return s&&r?{...i[e],...n[e]}:r?i[e]:s?{...n[e]}:t},g=(0,i.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:s}=n;return d("gpp",c,i,s)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:s}=n;return d("plus_consent_settings",p,i,s)}),m={allow_username_password_login:!1},h=(0,i.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:s}=n;return d("plus_security_settings",m,i,s)})},71784:function(e,t,n){"use strict";n.d(t,{DE:function(){return l},I3:function(){return s},kN:function(){return a},qX:function(){return o},rE:function(){return r}});var i=n(28120);let s=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In Progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,n]=e;return{label:n,value:t}}),r=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),a=[...r].map(e=>{let[t,n]=e;return{label:n,value:t}}),o={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},l={local:"local",s3:"s3"}},49755:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return y}});var i=n(24246),s=n(77181),r=n(27378),a=n(812),o=n(14047),l=n(77213),u=n(77830),c=n(58754),d=n(7426),g=n(71784),p=n(90867),f=n(34090),m=n(97181),h=n(40324),v=e=>{var t,n,l,u,c;let{storageDetails:d}=e,[v,x]=(0,r.useState)(""),[y]=(0,p.gC)(),[j]=(0,p.cf)(),{handleError:_}=(0,o.H)(),{successAlert:b}=(0,o.V)(),C={type:g.DE.s3,auth_method:null!==(l=null==d?void 0:null===(t=d.details)||void 0===t?void 0:t.auth_method)&&void 0!==l?l:"",bucket:null!==(u=null==d?void 0:null===(n=d.details)||void 0===n?void 0:n.bucket)&&void 0!==u?u:"",format:null!==(c=null==d?void 0:d.format)&&void 0!==c?c:""},S=async e=>{let t=await y({type:g.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(x(e.auth_method),b("S3 storage credentials successfully updated."))},w=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:g.DE.s3});(0,a.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,i.jsx)(s.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:C,onSubmit:S,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(m.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,i.jsx)(m.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,i.jsx)(h.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,i.jsx)(s.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(s.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.izJ,{mt:5}),(0,i.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,i.jsx)(s.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:w,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(h.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,i.jsx)(h.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,i.jsxs)(s.xuv,{mt:10,children:[(0,i.jsx)(s.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},x=()=>{let{successAlert:e}=(0,o.V)(),{handleError:t}=(0,o.H)(),[n,f]=(0,r.useState)(""),{data:m}=(0,p.PW)(),{data:h}=(0,p.Au)({type:n}),[x,{isLoading:y}]=(0,p.gC)(),[j]=(0,d.L)();(0,r.useEffect)(()=>{m&&f(m.type)},[m]);let _=async n=>{let{value:i}=n.target;if(i===g.DE.local){let n=await x({type:i,details:{},format:"json"});(0,a.D4)(n)?t(n.error):e("Configured storage details successfully.")}let s=await j({storage:{active_default_storage_type:i}});(0,a.D4)(s)?t(s.error):f(i)};return(0,i.jsxs)(l.Z,{title:"Configure Privacy Requests - Storage",children:[(0,i.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Configure requests",href:u.fz},{title:"Storage"}]}),(0,i.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,i.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,i.jsx)(s.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,i.jsxs)(s.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,i.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"Local"})," ","and"," ",(0,i.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","storage methods."]}),(0,i.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,i.jsx)(s.y02.Group,{disabled:y,onChange:_,value:n,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,i.jsxs)(s.jqI,{children:[(0,i.jsx)(s.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,i.jsx)(s.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3")]})}),"s3"===n&&h?(0,i.jsx)(v,{storageDetails:h}):null]})]})},y=()=>(0,i.jsx)(x,{})},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return s},Dy:function(){return l},XD:function(){return u},cz:function(){return c},hE:function(){return o},oK:function(){return r}});var i=n(76649);let s=e=>"error"in e,r=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),l=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>r(n,t[e]));class a{static narrow(e){return new a(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>i(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53611:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return n(23922)}])},59301:function(e,t,n){"use strict";var i=n(24246),r=n(77181);t.Z=e=>(0,i.jsx)(r.rUS,{isExternal:!0,color:"complimentary.500",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(24246),r=n(77181),l=n(88038),s=n.n(l),o=n(86677);n(27378);var a=n(25980),d=n(90867),c=n(77830),u=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:l=!0,mainProps:c}=e,p=(0,a.hz)(),g=(0,o.useRouter)(),_="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,h=!(p.flags.privacyRequestsConfiguration&&_),{data:b}=(0,d.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),f=p.flags.privacyRequestsConfiguration&&(!b||!v)&&_;return(0,i.jsxs)(r.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)(r.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[f?(0,i.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),l=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:s=!0,children:o,rightContent:a,style:d,...c}=e;return(0,i.jsxs)("div",{...c,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,a&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!n&&(0,i.jsx)(l.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return l.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return _},e$:function(){return o},fn:function(){return a},iC:function(){return g},nU:function(){return u},tB:function(){return c}});var i,r,l=n(19043);let s="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:s};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let g={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},_=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var i=n(24246),r=n(77181),l=n(79894),s=n.n(l),o=n(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:t,...n}=e,l=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(a,{style:{color:"inherit",maxWidth:l?void 0:400},ellipsis:!l,children:o.title})),d)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:l,...n})}},6675:function(e,t,n){"use strict";n.d(t,{ZS:function(){return o},a4:function(){return l}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:l}=r,s={purposes:{},special_purposes:{}},o=(0,i.P1)(r.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||s})},46628:function(e,t,n){"use strict";n.d(t,{MA:function(){return o},Vo:function(){return d},t5:function(){return a}});var i=n(24246),r=n(77181);let l=e=>{let{children:t,title:n="Success"}=e;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,i.jsxs)("strong",{children:[n,":"]})," ",t]})},s=e=>{let{children:t}=e;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,i.jsx)("strong",{children:"Error:"})," ",t]})},o={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},a=(e,t)=>{let n=(0,i.jsx)(l,{title:t,children:e});return{...o,description:n}},d=e=>{let t=(0,i.jsx)(s,{children:e});return{...o,description:t,status:"error"}}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return p},L:function(){return o},U7:function(){return d},Yh:function(){return _},ak:function(){return a},iR:function(){return b},km:function(){return s},tB:function(){return l}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:l,usePutConfigurationSettingsMutation:s,usePatchConfigurationSettingsMutation:o}=r,a=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,l;let{data:s}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==s?void 0:null===(l=s.security)||void 0===l?void 0:l.cors_origins)||[]}}}),d=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),c={enabled:!1,cmp_api_required:!1},u=(e,t,n,i)=>{let r=n&&n[e],l=i&&i[e];return r&&l?{...i[e],...n[e]}:l?i[e]:r?{...n[e]}:t},p=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return u("gpp",c,i,r)}),g={tcf_publisher_country_code:null},_=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return u("plus_consent_settings",g,i,r)}),h={allow_username_password_login:!1},b=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return u("plus_security_settings",h,i,r)})},60325:function(e,t,n){"use strict";n.d(t,{DD:function(){return o},Go:function(){return a},TK:function(){return r},Uv:function(){return c},k1:function(){return l},y3:function(){return u}});var i=n(28120);let r=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:i.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:i.Of.OPT_IN_OPT_OUT,regions:[],translations:s,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},a=(e,t)=>{let n=t.find(t=>t.id===e.language);return n?n.name:e.language},d=e=>{var t,n,i,r,l,s,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!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(n=e.banner_title)&&void 0!==n?n:void 0,banner_description:null!==(i=e.banner_description)&&void 0!==i?i:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r: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!==(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:t,updated_at:n,privacy_notices:i,origin:r,id:l,...s}=e;return{...s,privacy_notice_ids:i?i.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===i.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===i.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===i.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===i.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}}},23922:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var i=n(24246),r=n(77181),l=n(34090),s=n(27378),o=n(16134),a=n(59301),d=n(25980),c=n(812),u=n(77213),p=n(58754),g=n(6675),_=n(91613),h=n(46628),b=n(7426),v=e=>{let{name:t,enabled:n}=e;return(0,i.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,i.jsxs)(r.xvT,{children:[t," status"," ",n?(0,i.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,i.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,i.jsxs)(r.xvT,{children:["To ",n?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,i.jsx)(a.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},f=n(40324),m=e=>{var t,n;let{label:s,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,l.U$)(c),g={...u,value:null!==(t=u.value)&&void 0!==t?t:""},h=!!(p.touched&&p.error),b=d?o[0]:void 0,v=null!==(n=o.find(e=>e.value===g.value))&&void 0!==n?n:b,m=e=>{g.onChange(c.name)(e.target.value)};return"stacked"===a?(0,i.jsxs)(r.NIc,{isInvalid:h,children:[(0,i.jsxs)(r.jqI,{className:"w-fit",children:[s?(0,i.jsx)(f.__,{children:s}):null,(0,i.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(g.name),children:(0,i.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:t,label:n,tooltip:l}=e;return(0,i.jsx)(r.y02,{value:t,"data-testid":"option-".concat(t),children:(0,i.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:n}),l?(0,i.jsx)(_.Z,{label:l}):null]})},t)})})})]}),(0,i.jsx)(f.Bc,{isInvalid:h,message:p.error,fieldName:g.name})]}):(0,i.jsxs)(r.NIc,{isInvalid:h,children:[(0,i.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,i.jsx)(f.__,{children:s}),(0,i.jsx)(r.y02.Group,{onChange:m,value:null==v?void 0:v.value,"data-testid":"input-".concat(g.name),children:(0,i.jsx)(r.jqI,{children:o.map(e=>(0,i.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,i.jsx)(f.Bc,{isInvalid:h,message:p.error,fieldName:g.name})]})},x=n(28120),y=e=>{let{title:t,children:n,...l}=e;return(0,i.jsxs)(r.xuv,{backgroundColor:"gray.50",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...l,children:[(0,i.jsx)(r.xvT,{fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),n]})};let j=e=>{let{title:t,children:n}=e;return(0,i.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,i.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),n]})};var C=()=>{let{tcf:e}=(0,d.hz)(),t=!!(0,o.C)(b.D2).enabled,{values:n,setFieldValue:s}=(0,l.u6)(),a=!!n.gpp.us_approach;return(0,i.jsx)(y,{title:"Global Privacy Platform",children:(0,i.jsxs)(r.Kqy,{spacing:6,children:[(0,i.jsx)(v,{name:"GPP",enabled:t}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j,{title:"GPP U.S.",children:(0,i.jsx)(m,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:x.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:x.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:x.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."}]})}),a?(0,i.jsxs)(j,{title:"MSPA",children:[(0,i.jsx)(f.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||(s("gpp.mspa_service_provider_mode",!1),s("gpp.mspa_opt_out_option_mode",!1))}}),(0,i.jsx)(f.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:!!n.gpp.mspa_opt_out_option_mode||!n.gpp.mspa_covered_transactions}),(0,i.jsx)(f.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:!!n.gpp.mspa_service_provider_mode||!n.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.izJ,{color:"gray.200"}),(0,i.jsxs)(j,{title:"GPP Europe",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,i.jsx)(f.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]})})},w=n(64781),S=n(60325),T=()=>{var e,t;let{tcf:n}=(0,d.hz)(),{values:s,setFieldValue:o}=(0,l.u6)(),{data:a,isLoading:c}=(0,w.gT)(),u=[...(0,S.k1)(null!==(e=null==a?void 0:a.locations)&&void 0!==e?e:[]),...(0,S.k1)(null!==(t=null==a?void 0:a.location_groups)&&void 0!==t?t:[])].sort((e,t)=>e.name<t.name?-1:1);return n?(0,i.jsxs)(y,{title:"Publisher Settings",children:[(0,i.jsx)(r.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,i.jsx)("label",{htmlFor:"publisher_country_code",className:"mb-1 block",children:(0,i.jsx)(r.AntTypography.Text,{className:"font-semibold",children:"Publisher country"})}),(0,i.jsx)(r.WPr,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:c,allowClear:!0,options:null==u?void 0:u.map(e=>({value:e.id,label:e.name})),showSearch:!0,optionFilterProp:"label",placeholder:"Select a country",value:s.tcfPublisherSettings.publisher_country_code,onChange:e=>o("tcfPublisherSettings.publisher_country_code",e),className:"w-80"})]}):null};let k=e=>{let{children:t,purpose:n,endCol:l}=e;return(0,i.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:l?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(n)?null:(0,i.jsx)(r.xuv,{children:t})})};var P=()=>{let{values:e,setFieldValue:t}=(0,l.u6)(),{purposes:n}=(0,o.C)(g.ZS);return(0,i.jsx)(l.F2,{name:"purposeOverrides",render:()=>(0,i.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,i.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,i.jsx)(r.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,i.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,i.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,i.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,i.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,i.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,i.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((l,s)=>(0,i.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",children:[(0,i.jsxs)(r.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 ",l.purpose,": ",n[l.purpose].name]}),(0,i.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,i.jsx)(r.xuv,{children:(0,i.jsx)(f.w8,{name:"purposeOverrides[".concat(s,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(s,"].is_consent"),!1),t("purposeOverrides[".concat(s,"].is_legitimate_interest"),!1))}})})}),(0,i.jsx)(k,{purpose:l.purpose,children:(0,i.jsx)(f.w8,{isDisabled:!e.purposeOverrides[s].is_included||e.purposeOverrides[s].is_legitimate_interest,name:"purposeOverrides[".concat(s,"].is_consent")})}),(0,i.jsx)(k,{purpose:l.purpose,endCol:!0,children:(0,i.jsx)(f.w8,{isDisabled:!e.purposeOverrides[s].is_included||e.purposeOverrides[s].is_consent,name:"purposeOverrides[".concat(s,"].is_legitimate_interest")})})]},l.purpose))]})})},q=n(32885),N=()=>{let{isLoading:e}=(0,q.x8)(),{tcf:t}=(0,d.hz)(),{data:n,isLoading:f}=(0,q.n3)(void 0,{skip:e||!t}),[m]=(0,q.M7)(),{data:j,isLoading:w}=(0,b.tB)({api_set:!0}),{data:S,isLoading:k}=(0,b.tB)({api_set:!1}),[N,{isLoading:A}]=(0,b.L)(),E=(0,o.C)(b.D2),I=(0,o.C)(b.Yh),F=(0,s.useMemo)(()=>j&&(null==j?void 0:j.consent)&&"override_vendor_purposes"in j.consent?j.consent.override_vendor_purposes:!!S&&null!=S&&!!S.consent&&"override_vendor_purposes"in S.consent&&S.consent.override_vendor_purposes,[j,S]),{isLoading:L}=(0,g.a4)(),O=(0,r.pmc)(),z=async e=>{var t;let n=e=>{if(O.closeAll(),(0,c.D4)(e)){let t=(0,c.e$)(e.error,"An unexpected error occurred while saving. Please try again.");O((0,h.Vo)(t))}else O((0,h.t5)("Settings saved successfully"))},i=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=x.I$.CONSENT),e.is_legitimate_interest&&(t=x.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(F){let e=await m(i);if((0,c.D4)(e)){n(e);return}}let{enabled:r,...l}=e.gpp;n(await N({gpp:l,plus_consent_settings:{tcf_publisher_country_code:null!==(t=e.tcfPublisherSettings.publisher_country_code)&&void 0!==t?t:null}}))},W=async e=>{let t=await N({consent:{override_vendor_purposes:e}});e&&await m(n.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(e=>{if(O.closeAll(),(0,c.D4)(e)){let t=(0,c.e$)(e.error,"An unexpected error occurred while saving vendor override settings. Please try again.");O((0,h.Vo)(t))}})(t)},D=(0,s.useMemo)(()=>({purposeOverrides:n?n.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===x.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===x.I$.LEGITIMATE_INTERESTS})):[],gpp:E,tcfPublisherSettings:{publisher_country_code:I.tcf_publisher_country_code}}),[n,E,I]);return(0,i.jsx)(u.Z,{title:"Consent Configuration",children:e||L||f||w||k?(0,i.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,i.jsx)(p.Z,{heading:"Consent settings"}),(0,i.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,i.jsx)(y,{title:"Transparency & Consent Framework settings",children:(0,i.jsx)(v,{name:"TCF",enabled:t})}),(0,i.jsxs)(y,{title:"Vendor overrides",children:[t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.xvT,{mb:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:"Configure overrides for TCF related purposes."}),(0,i.jsxs)(r.kCb,{alignItems:"center",marginBottom:2,children:[(0,i.jsx)(r.rAg,{size:"small",checked:F,onChange:W,disabled:A}),(0,i.jsx)(r.xvT,{px:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:"Override vendor purposes"}),(0,i.jsx)(_.Z,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]}),(0,i.jsx)(r.xvT,{mb:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:F?"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites.":null})]}):null,F&&t?(0,i.jsxs)(r.xvT,{fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:["To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."," ",(0,i.jsxs)(a.Z,{href:"https://fid.es/tcf-overrides",children:["Read the guide on vendor overrides here."," "]})]}):null]})]}),(0,i.jsx)(l.J9,{initialValues:D,enableReinitialize:!0,onSubmit:z,children:e=>{let{dirty:t,isValid:n,isSubmitting:s}=e;return(0,i.jsx)(l.l0,{children:(0,i.jsxs)(r.Kqy,{spacing:6,children:[F?(0,i.jsx)(P,{}):null,(0,i.jsx)(T,{}),(0,i.jsx)(C,{}),(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!t||!n,loading:s,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s},D4:function(){return r},Dy:function(){return a},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return l}});var i=n(76649);let r=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,s=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),a=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>l(e,t),r=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class s{static narrow(e){return new s(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof s?e.NF:e instanceof Function?e:t=>i(e,t);return new s(e=>t(e)&&n(e))}}new s(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53611)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9252],{98648:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domains",function(){return n(76974)}])},59301:function(t,e,n){"use strict";var i=n(24246),r=n(77181);e.Z=t=>(0,i.jsx)(r.rUS,{isExternal:!0,color:"complimentary.500",...t})},77213:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i=n(24246),r=n(77181),s=n(88038),o=n.n(s),a=n(86677);n(27378);var c=n(25980),l=n(90867),d=n(77830),u=()=>{let t=(0,a.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{t.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},g=t=>{let{children:e,title:n,padded:s=!0,mainProps:d}=t,g=(0,c.hz)(),p=(0,a.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,l.JE)(void 0,{skip:m}),{data:x}=(0,l.PW)(void 0,{skip:m}),v=g.flags.privacyRequestsConfiguration&&(!h||!x)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[v?(0,i.jsx)(u,{}):null,e]})]})}},58754:function(t,e,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);e.Z=t=>{let{heading:e,breadcrumbItems:n,isSticky:o=!0,children:a,rightContent:c,style:l,...d}=t;return(0,i.jsxs)("div",{...d,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...l}:{paddingBottom:"24px",...l},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof e?(0,i.jsx)(r.X6q,{className:n||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:e}):e,c&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!n&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},10342:function(t,e,n){"use strict";var i=n(24246),r=n(77181),s=n(91613);e.Z=t=>{let{title:e,tooltip:n,children:o,...a}=t;return(0,i.jsxs)(r.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...a,children:[(0,i.jsxs)(r.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[e,n?(0,i.jsx)(r.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.Z,{label:n})}):void 0]}),(0,i.jsx)(r.Kqy,{p:6,spacing:6,children:o})]})}},812:function(t,e,n){"use strict";n.d(e,{D4:function(){return s.D4},MM:function(){return g},Ot:function(){return l},c6:function(){return r},cj:function(){return f},e$:function(){return a},fn:function(){return c},iC:function(){return p},nU:function(){return u},tB:function(){return d}});var i,r,s=n(19043);let o="An unexpected error occurred. Please try again.",a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,s.Bw)(t)){if((0,s.hE)(t.data))return t.data.detail;if((0,s.cz)(t.data)){var n;let e=null===(n=t.data.detail)||void 0===n?void 0:n[0];return"".concat(null==e?void 0:e.msg,": ").concat(null==e?void 0:e.loc)}if(409===t.status&&(0,s.Dy)(t.data)||404===t.status&&(0,s.XD)(t.data))return"".concat(t.data.detail.error," (").concat(t.data.detail.fides_key,")")}return e};function c(t){return"object"==typeof t&&null!=t&&"status"in t}function l(t){return"object"==typeof t&&null!=t&&"data"in t&&"string"==typeof t.data.detail}function d(t){return"object"==typeof t&&null!=t&&"data"in t&&Array.isArray(t.data.detail)}let u=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:o};if((0,s.oK)(t))return{status:t.originalStatus,message:t.data};if((0,s.Bw)(t)){let{status:n}=t;return{status:n,message:a(t,e.message)}}return e},g=t=>Object.entries(t).map(t=>({value:t[1],label:t[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=t=>{let e=t.split(".")[0];return"gacp"===e?"gacp":"gvl"===e?"gvl":"compass"}},70788:function(t,e,n){"use strict";n.d(e,{m:function(){return l}});var i=n(24246),r=n(77181),s=n(79894),o=n.n(s),a=n(27378);let{Text:c}=r.AntTypography,l=t=>{let{items:e,...n}=t,s=(0,a.useMemo)(()=>null==e?void 0:e.map((t,n)=>{let s=n===e.length-1,a={...t},l=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(c,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),l)?a.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[e]);return(0,i.jsx)(r.zrq,{items:s,...n})}},46628:function(t,e,n){"use strict";n.d(e,{MA:function(){return a},Vo:function(){return l},t5:function(){return c}});var i=n(24246),r=n(77181);let s=t=>{let{children:e,title:n="Success"}=t;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-success-msg",children:[(0,i.jsxs)("strong",{children:[n,":"]})," ",e]})},o=t=>{let{children:e}=t;return(0,i.jsxs)(r.xvT,{"data-testid":"toast-error-msg",children:[(0,i.jsx)("strong",{children:"Error:"})," ",e]})},a={variant:"subtle",position:"top",description:"",duration:5e3,status:"success",isClosable:!0},c=(t,e)=>{let n=(0,i.jsx)(s,{title:e,children:t});return{...a,description:n}},l=t=>{let e=(0,i.jsx)(o,{children:t});return{...a,description:e,status:"error"}}},7426:function(t,e,n){"use strict";n.d(e,{D2:function(){return g},L:function(){return a},U7:function(){return l},Yh:function(){return f},ak:function(){return c},iR:function(){return h},km:function(){return o},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:t=>({getConfigurationSettings:t.query({query:t=>{let{api_set:e}=t;return{url:"/config",method:"GET",params:{api_set:e}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PUT",body:t}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PATCH",body:t}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:o,usePatchConfigurationSettingsMutation:a}=r,c=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{var i,r,s;let{data:o}=e,{data:a}=n;return{configSet:{cors_origins:(null==a?void 0:null===(i=a.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(r=a.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==o?void 0:null===(s=o.security)||void 0===s?void 0:s.cors_origins)||[]}}}),l=()=>(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0})],(t,e)=>{let{data:n}=e;return n}),d={enabled:!1,cmp_api_required:!1},u=(t,e,n,i)=>{let r=n&&n[t],s=i&&i[t];return r&&s?{...i[t],...n[t]}:s?i[t]:r?{...n[t]}:e},g=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("gpp",d,i,r)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("plus_consent_settings",p,i,r)}),m={allow_username_password_login:!1},h=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("plus_security_settings",m,i,r)})},76974:function(t,e,n){"use strict";n.r(e);var i=n(24246),r=n(77181),s=n(34090),o=n(55484),a=n(16134),c=n(59301),l=n(10342),d=n(40324),u=n(812),g=n(77213),p=n(58754),f=n(46628),m=n(7426);e.default=()=>{var t;let{isLoading:e}=(0,m.tB)({api_set:!0}),{isLoading:n}=(0,m.tB)({api_set:!1}),h=(0,a.C)(m.ak),x=h.apiSet,v=h.configSet,y=!!((null===(t=v.cors_origins)||void 0===t?void 0:t.length)||v.cors_origin_regex),j=(0,a.C)((0,m.U7)()),[b,{isLoading:_}]=(0,m.km)(),C=(0,r.pmc)(),w=t=>{if(!t||!(t.startsWith("https://")||t.startsWith("http://")))return!1;try{new URL(t)}catch(t){return!1}return!0},S=t=>!!t&&!t.includes("*"),k=t=>{if(!t)return!1;try{let e=new URL(t);return"/"===e.pathname&&!t.endsWith("/")}catch(t){return!1}},N=o.Ry().shape({cors_origins:o.IX().nullable().of(o.Z_().required().trim().test("is-valid-url",t=>{let{label:e}=t;return"".concat(e," must be a valid URL (e.g. https://example.com)")},t=>w(t)).test("has-no-wildcard",t=>{let{label:e}=t;return"".concat(e," cannot contain a wildcard (e.g. https://*.example.com)")},t=>S(t)).test("has-no-path",t=>{let{label:e}=t;return"".concat(e," cannot contain a path (e.g. https://example.com/path)")},t=>k(t)).label("Domain"))}),A=async(t,e)=>{let n=t.cors_origins&&t.cors_origins.length>0?t.cors_origins:void 0,i={...j,security:{cors_origins:n}};(n=>{if(C.closeAll(),(0,u.D4)(n)){let t=(0,u.e$)(n.error,"An unexpected error occurred while saving domains. Please try again.");C((0,f.Vo)(t))}else C((0,f.t5)("Domains saved successfully")),e.resetForm({values:t})})(await b(i))};return(0,i.jsx)(g.Z,{title:"Domains",children:(0,i.jsxs)(r.xuv,{"data-testid":"management-domains",children:[(0,i.jsx)(p.Z,{heading:"Domains"}),(0,i.jsxs)(r.xuv,{maxW:"600px",children:[(0,i.jsxs)(r.xvT,{fontSize:"sm",pb:6,children:["For Fides to work on your website(s), each of your domains must be listed below. You can add and remove domains at any time up to the quantity included in your license. For more information on managing domains"," ",(0,i.jsx)(c.Z,{href:"https://fid.es/domain-configuration",children:"read here"}),"."]}),(0,i.jsx)(l.Z,{"data-testid":"api-set-domains-form",title:"Organization domains",tooltip:"Fides uses these domains to enforce cross-origin resource sharing (CORS), a browser-based security standard. Each domain must be a valid URL (e.g. https://example.com) without any wildcards '*' or paths '/blog'",children:e||_?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsx)(s.J9,{initialValues:x,enableReinitialize:!0,onSubmit:A,validationSchema:N,validateOnChange:!0,children:t=>{let{dirty:e,values:n,isValid:o}=t;return(0,i.jsxs)(s.l0,{children:[(0,i.jsx)(s.F2,{name:"cors_origins",render:t=>(0,i.jsxs)(r.kCb,{flexDir:"column",children:[n.cors_origins.map((e,n)=>(0,i.jsxs)(r.kCb,{flexDir:"row",my:3,children:[(0,i.jsx)(d.j0,{variant:"stacked",name:"cors_origins[".concat(n,"]"),placeholder:"https://subdomain.example.com:9090"}),(0,i.jsx)(r.wpx,{"aria-label":"delete-domain",className:"z-[2] ml-4",icon:(0,i.jsx)(r.pJl,{}),onClick:()=>{t.remove(n)}})]},n)),(0,i.jsx)(r.kCb,{justifyContent:"center",mt:3,children:(0,i.jsx)(r.wpx,{"aria-label":"add-domain",className:"w-full",onClick:()=>{t.push("")},children:"Add domain"})})]})}),(0,i.jsx)(r.xuv,{mt:6,children:(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:_||!e||!o,loading:_,"data-testid":"save-btn",children:"Save"})})]})}})})]}),(0,i.jsx)(r.xuv,{maxW:"600px",marginY:3,children:(0,i.jsx)(l.Z,{"data-testid":"config-set-domains-form",title:"Advanced settings",tooltip:"These domains are configured by an administrator with access to Fides security settings and can support more advanced options such as wildcards and regex.",children:n?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsxs)(r.kCb,{flexDir:"column",children:[v.cors_origins.map((t,e)=>(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origins[".concat(e,"]"),marginY:3,value:t,isDisabled:!0,isPassword:!1},e)),v.cors_origin_regex?(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origin_regex",marginY:3,value:v.cors_origin_regex,isDisabled:!0,isPassword:!1},"cors_origin_regex"):void 0,y?void 0:(0,i.jsx)(r.xvT,{fontSize:"xs",color:"gray.500",children:"No advanced domain settings configured."})]})})})]})})}},19043:function(t,e,n){"use strict";n.d(e,{Bw:function(){return o},D4:function(){return r},Dy:function(){return c},XD:function(){return l},cz:function(){return d},hE:function(){return a},oK:function(){return s}});var i=n(76649);let r=t=>"error"in t,s=t=>(0,i.Ln)({status:"string"},t)&&"PARSING_ERROR"===t.status,o=t=>(0,i.Ln)({status:"number",data:{}},t),a=t=>(0,i.Ln)({detail:"string"},t),c=t=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},t),l=t=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},t),d=t=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},t)},76649:function(t,e,n){"use strict";n.d(e,{Ln:function(){return i}});let i=(t,e)=>s(t,e),r=Symbol("SOME"),s=(t,e)=>"string"==typeof t?t===typeof e:Array.isArray(t)?r in t?t.some(t=>s(t,e)):!!Array.isArray(e)&&(0===t.length||e.every(e=>t.some(t=>s(t,e)))):"object"==typeof e&&null!==e&&Object.entries(t).every(([t,n])=>s(n,e[t]));class o{static narrow(t){return new o(e=>i(t,e))}constructor(t){this.NF=void 0,this.NF=t}satisfied(t){return this.NF(t)}build(t){return t}and(t){let e=this.NF,n=t instanceof o?t.NF:t instanceof Function?t:e=>i(t,e);return new o(t=>e(t)&&n(t))}}new o(t=>!0)}},function(t){t.O(0,[2888,9774,179],function(){return t(t.s=98648)}),_N_E=t.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6355],{52923:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/new",function(){return n(57292)}])},57292:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return h}});var t=n(24246),r=n(27378),u=n(16394),i=n(86677),a=n(41150),c=n(16134),o=n(812),d=n(77830),l=n(58754),f=n(65497),w=()=>{let e=(0,i.useRouter)(),[s]=(0,f.ny)(),n=(0,c.T)();(0,r.useEffect)(()=>{n((0,f.Vv)(void 0))},[n]);let w=async n=>{let t=n.password?(0,u.JJ)(n.password):void 0,r=await s({...n,password:t});return(0,o.D4)(r)||e.push("".concat(d.e3,"/profile/").concat(r.data.id)),r};return(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:d.e3},{title:"New User"}]}),(0,t.jsx)(a.Z,{onSubmit:w})]})},_=n(77213),h=()=>(0,t.jsx)(_.Z,{title:"Users - New User",children:(0,t.jsx)(w,{})})}},function(e){e.O(0,[5480,1150,2888,9774,179],function(){return e(e.s=52923)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6355],{52923:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/new",function(){return n(57292)}])},57292:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return h}});var t=n(24246),r=n(27378),u=n(16394),i=n(86677),a=n(44121),c=n(16134),o=n(812),d=n(77830),l=n(58754),f=n(65497),w=()=>{let e=(0,i.useRouter)(),[s]=(0,f.ny)(),n=(0,c.T)();(0,r.useEffect)(()=>{n((0,f.Vv)(void 0))},[n]);let w=async n=>{let t=n.password?(0,u.JJ)(n.password):void 0,r=await s({...n,password:t});return(0,o.D4)(r)||e.push("".concat(d.e3,"/profile/").concat(r.data.id)),r};return(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:d.e3},{title:"New User"}]}),(0,t.jsx)(a.Z,{onSubmit:w})]})},_=n(77213),h=()=>(0,t.jsx)(_.Z,{title:"Users - New User",children:(0,t.jsx)(w,{})})}},function(e){e.O(0,[5480,4121,2888,9774,179],function(){return e(e.s=52923)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{16967:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user-management/profile/[id]",function(){return r(69404)}])},69404:function(e,s,r){"use strict";r.r(s),r.d(s,{default:function(){return E}});var i=r(24246),n=r(77181),t=r(86677),a=r(27378),u=r(16125),d=r(44121),l=r(91317),o=r(19904),c=r(28120),_=r(77830),f=r(58754),m=r(65497);let h=e=>{var s,r,i,n;let t=(0,u.v9)(l.dy),[a]=(0,m.Gl)(),d={username:null!==(s=e.username)&&void 0!==s?s:"",email_address:null!==(r=e.email_address)&&void 0!==r?r:"",first_name:null!==(i=e.first_name)&&void 0!==i?i:"",last_name:null!==(n=e.last_name)&&void 0!==n?n:"",password:"",id:e.id,password_login_enabled:!!e.password_login_enabled},_=async s=>a({...e,...s}),f=!!t&&t.id===e.id,h=(0,o.Tg)([c.Sh.USER_UPDATE]);return{handleSubmit:_,isOwnProfile:f,canUpdateUser:!!f||h,initialValues:d}};var j=e=>{let{user:s}=e,{handleSubmit:r,canUpdateUser:n,initialValues:t}=h(s);return(0,i.jsxs)("div",{children:[(0,i.jsx)(f.Z,{heading:"Users",breadcrumbItems:[{title:"All users",href:_.e3},{title:t.username}]}),(0,i.jsx)(d.Z,{onSubmit:r,initialValues:t,canEditNames:n})]})},p=r(16134),y=r(77213),E=()=>{let e=(0,t.useRouter)(),s=(0,p.T)(),r="";r=e.query.id?Array.isArray(e.query.id)?e.query.id[0]:e.query.id:"";let{data:u,isLoading:d}=(0,m.Fk)(r),_=(0,p.C)(l.dy),f=!!_&&!!u&&_.id===u.id,h=(0,o.Tg)([c.Sh.USER_UPDATE])||f;return(0,a.useEffect)(()=>{u&&s((0,m.Vv)(u.id))},[s,u,h]),(0,a.useEffect)(()=>{u&&!h&&e.push("/")},[e,h,u]),(0,i.jsxs)(y.Z,{title:"Users - Edit a user",children:[d&&(0,i.jsx)(n.jqI,{justify:"center",align:"center",className:"h-full",children:(0,i.jsx)(n.$jN,{color:"primary.900"})}),!d&&!u&&(0,i.jsx)(n.jqI,{justify:"center",children:(0,i.jsx)(n.DUx,{message:"Could not find user with this profile ID.",type:"warning",showIcon:!0})}),!!u&&(0,i.jsx)(j,{user:u})]})}}},function(e){e.O(0,[5480,4121,2888,9774,179],function(){return e(e.s=16967)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/cf2744a40308fc4a.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cf2744a40308fc4a.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d2d4e9a6923e6730.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d2d4e9a6923e6730.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-2c7ccac5843c4d8e.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-090643377c8254e6.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a5be35cd8f832c0.js" defer=""></script><script src="/_next/static/chunks/c78d26b1-88a3e1bacb2a03c2.js" defer=""></script><script src="/_next/static/chunks/6060-cb1ab5be7067bf7b.js" defer=""></script><script src="/_next/static/chunks/2858-0b44609b6be7850b.js" defer=""></script><script src="/_next/static/chunks/2866-a73888c17a195cbe.js" defer=""></script><script src="/_next/static/chunks/9278-9b1b5970f0702668.js" defer=""></script><script src="/_next/static/chunks/5277-e8a036319456127f.js" defer=""></script><script src="/_next/static/chunks/4481-275aa9f4c10bce53.js" defer=""></script><script src="/_next/static/chunks/7980-72f745bff9fabcc9.js" defer=""></script><script src="/_next/static/chunks/355-8a77c9a1cd027f2e.js" defer=""></script><script src="/_next/static/chunks/8499-43606100edf42fdf.js" defer=""></script><script src="/_next/static/chunks/146-0ae2d30ec71fce09.js" defer=""></script><script src="/_next/static/chunks/3938-6a1c07d06a80cf4c.js" defer=""></script><script src="/_next/static/chunks/4450-6a8aa0d7358ac26f.js" defer=""></script><script src="/_next/static/chunks/pages/add-systems/manual-9f9500c639362aa6.js" defer=""></script><script src="/_next/static/F-2Pz9ByzGwcvQtVLstwR/_buildManifest.js" defer=""></script><script src="/_next/static/F-2Pz9ByzGwcvQtVLstwR/_ssgManifest.js" defer=""></script><style>.data-ant-cssinjs-cache-path{content:"";}</style></head><body><div id="__next"><div style="height:100%;display:flex"></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/add-systems/manual","query":{},"buildId":"F-2Pz9ByzGwcvQtVLstwR","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/cf2744a40308fc4a.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cf2744a40308fc4a.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d2d4e9a6923e6730.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d2d4e9a6923e6730.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-2c7ccac5843c4d8e.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-090643377c8254e6.js" defer=""></script><script src="/_next/static/chunks/pages/_app-0c1548ca3b158123.js" defer=""></script><script src="/_next/static/chunks/c78d26b1-88a3e1bacb2a03c2.js" defer=""></script><script src="/_next/static/chunks/6060-cb1ab5be7067bf7b.js" defer=""></script><script src="/_next/static/chunks/2858-0b44609b6be7850b.js" defer=""></script><script src="/_next/static/chunks/2866-a73888c17a195cbe.js" defer=""></script><script src="/_next/static/chunks/9278-9b1b5970f0702668.js" defer=""></script><script src="/_next/static/chunks/5277-e8a036319456127f.js" defer=""></script><script src="/_next/static/chunks/4481-275aa9f4c10bce53.js" defer=""></script><script src="/_next/static/chunks/7980-72f745bff9fabcc9.js" defer=""></script><script src="/_next/static/chunks/355-8a77c9a1cd027f2e.js" defer=""></script><script src="/_next/static/chunks/8499-43606100edf42fdf.js" defer=""></script><script src="/_next/static/chunks/146-0ae2d30ec71fce09.js" defer=""></script><script src="/_next/static/chunks/3938-6a1c07d06a80cf4c.js" defer=""></script><script src="/_next/static/chunks/4450-9c3086ccb55c66aa.js" defer=""></script><script src="/_next/static/chunks/pages/add-systems/manual-9f9500c639362aa6.js" defer=""></script><script src="/_next/static/_o6WH0hDzNEhnUJyvLex7/_buildManifest.js" defer=""></script><script src="/_next/static/_o6WH0hDzNEhnUJyvLex7/_ssgManifest.js" defer=""></script><style>.data-ant-cssinjs-cache-path{content:"";}</style></head><body><div id="__next"><div style="height:100%;display:flex"></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/add-systems/manual","query":{},"buildId":"_o6WH0hDzNEhnUJyvLex7","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>