PageSourceSearch

https://data.projectdatasphere.org/static/js/admin.8dbcce05.chunk.js

js projectdatasphere.org collected 2026-10-04 00:24:31 UTC 210,563 bytes, 567 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[884],{590(e,s,a){a.d(s,{AdminPublicationsEdit:()=>A});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(7714),c=a(2025),m=a(4524),u=a(8365),h=a(8159),x=a(8064),j=a(687),p=a(213),g=a(7860),v=a(5678);const A=()=>{var e,s;const{publicationId:a}=(0,m.g)(),A=!a,N=(0,m.Zp)(),f=(0,l.useRef)(null),[y,b]=(0,l.useState)(),[w,S]=(0,l.useState)(""),[D,C]=(0,l.useState)(""),[T,I]=(0,l.useState)(""),[k,F]=(0,l.useState)(""),[q,R]=(0,l.useState)(""),[V,U]=(0,l.useState)(""),[P,E]=(0,l.useState)(""),[L,O]=(0,l.useState)(""),[z,$]=(0,l.useState)(""),[_,G]=(0,l.useState)(!1),[W,B]=(0,l.useState)(),M="https://data.projectdatasphere.org//api/admin/publications/"+a,{data:Y,loading:H,error:K}=(0,j.c)(M),{data:Z}=(0,j.c)("https://data.projectdatasphere.org//api/admin/publications/pdsUids");(0,l.useMemo)((()=>{var e,s,a,l,n,t,i,r;null!=Y&&(b(Y),S(null!==(e=Y.pdsUid)&&void 0!==e?e:""),C(null!==(s=Y.nctId)&&void 0!==s?s:""),I(null!==(a=Y.title)&&void 0!==a?a:""),F(null!==(l=Y.url)&&void 0!==l?l:""),R(null!==(n=Y.authors)&&void 0!==n?n:""),U(null!==(t=Y.journal)&&void 0!==t?t:""),E(null!==(i=Y.focusArea)&&void 0!==i?i:""),O((e=>{if(!e)return"";const s=new Date(e);return isNaN(s.getTime())?"":s.toISOString().substring(0,10)})(Y.publicationDate)),$(null!==(r=Y.relatedNCTIds)&&void 0!==r?r:""))}),[Y]);const Q=()=>{N(h.o+"admin/publications")},J=o.Ik().shape({pdsUid:o.Yj().required("Please select a PDS UID."),nctId:o.Yj().required("Please enter an NCT ID."),title:o.Yj().required("Please enter a title."),url:o.Yj().url("Please enter a valid URL.").required("Please enter a URL."),authors:o.Yj().required("Please enter the authors."),journal:o.Yj().required("Please enter the journal."),focusArea:o.Yj().required("Please enter the focus area."),publicationDate:o.Yj().required("Please select a publication date."),relatedNCTIds:o.Yj()}),X=()=>{const e=null!==Z&&void 0!==Z?Z:[],s=w&&!e.includes(w)?[w,...e]:e;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("option",{value:"",children:"-- Select PDS UID --"}),s.map((e=>(0,v.jsx)("option",{value:e,children:e},e)))]})},ee=()=>(0,v.jsx)(c.l1,{innerRef:f,enableReinitialize:!0,validationSchema:J,validateOnChange:!1,validateOnBlur:!1,initialValues:{pdsUid:w,nctId:D,title:T,url:k,authors:q,journal:V,focusArea:P,publicationDate:L,relatedNCTIds:z},onSubmit:e=>{(async e=>{const s="https://data.projectdatasphere.org//api/admin/publications";G(!0);const{data:l,error:n}=A?await(0,p.Yz)(s,e):await(0,p.r8)(s+"/"+a,e);if(null!=l)G(!1),N(h.o+"admin/publications");else if(n){var t,i;G(!1),B(null===n||void 0===n||null===(t=n.response)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.title)}})(JSON.stringify({id:a,donationId:null===y||void 0===y?void 0:y.donationId,pdsUid:e.pdsUid,nctId:e.nctId,title:e.title,url:e.url,authors:e.authors,journal:e.journal,focusArea:e.focusArea,publicationDate:e.publicationDate?new Date(e.publicationDate).toISOString():null,relatedNCTIds:e.relatedNCTIds}))},children:e=>{let{handleSubmit:s,handleChange:a,values:l,touched:t,errors:d}=e;return(0,v.jsxs)(i.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:[(0,v.jsx)(u.$8,{lg:12,children:(0,v.jsxs)(u.$8,{lg:8,children:[(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formPdsUid",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"PDS UID"}),(0,v.jsx)(i.A.Select,{size:"sm",name:"pdsUid",value:l.pdsUid,isValid:t.pdsUid&&!d.pdsUid,onChange:e=>{S(e.target.value),a(e)},children:X()}),(0,v.jsx)(c.Kw,{name:"pdsUid",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formNctId",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"NCT ID"}),(0,v.jsx)(i.A.Control,{size:"sm",name:"nctId",type:"text",value:l.nctId,isValid:t.nctId&&!d.nctId,onChange:e=>{C(e.target.value),a(e)}}),(0,v.jsx)(c.Kw,{name:"nctId",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formTitle",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Title"}),(0,v.jsx)(i.A.Control,{as:"textarea",rows:3,size:"sm",name:"title",value:l.title,isValid:t.title&&!d.title,onChange:e=>{I(e.target.value),a(e)}}),(0,v.jsx)(c.Kw,{name:"title",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formUrl",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"URL"}),(0,v.jsx)(i.A.Control,{size:"sm",name:"url",type:"text",value:l.url,isValid:t.url&&!d.url,onChange:e=>{F(e.target.value),a(e)}}),(0,v.jsx)(c.Kw,{name:"url",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formAuthors",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Authors"}),(0,v.jsx)(i.A.Control,{as:"textarea",rows:3,size:"sm",name:"authors",value:l.authors,isValid:t.authors&&!d.authors,onChange:e=>{R(e.target.value),a(e)}}),(0,v.jsx)(c.Kw,{name:"authors",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formJourn
1al",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Journal"}),(0,v.jsx)(i.A.Control,{size:"sm",name:"journal",type:"text",value:l.journal,isValid:t.journal&&!d.journal,onChange:e=>{U(e.target.value),a(e)}}),(0,v.jsx)(c.Kw,{name:"journal",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formFocusArea",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Focus Area"}),(0,v.jsx)(i.A.Control,{size:"sm",name:"focusArea",type:"text",value:l.focusArea,isValid:t.focusArea&&!d.focusArea,onChange:e=>{E(e.target.value),a(e)}}),(0,v.jsx)(c.Kw,{name:"focusArea",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formPublicationDate",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Publication Date"}),(0,v.jsx)(n.A,{lg:4,className:"p-0",children:(0,v.jsx)(i.A.Control,{size:"sm",type:"date",name:"publicationDate",value:l.publicationDate,isValid:t.publicationDate&&!d.publicationDate,onChange:e=>{O(e.target.value),a(e)}})}),(0,v.jsx)(c.Kw,{name:"publicationDate",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-5",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:10,controlId:"formRelatedNCTIds",children:[(0,v.jsx)(i.A.Label,{column:"sm",children:"Related NCT IDs"}),(0,v.jsx)(i.A.Control,{size:"sm",name:"relatedNCTIds",type:"text",value:l.relatedNCTIds,onChange:e=>{$(e.target.value),a(e)}}),(0,v.jsx)(i.A.Text,{muted:!0,children:"Comma-separated list of NCT IDs"}),(0,v.jsx)(c.Kw,{name:"relatedNCTIds",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})})]})}),(0,v.jsx)(x.T,{handleReset:Q,isSubmitting:_,submitButtonText:g.XD})]})}});return(0,v.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,v.jsx)(u.NE,{name:"content-page",children:(0,v.jsx)(u.ff,{name:"page-wrapper",children:(0,v.jsxs)(u.$8,{children:[(0,v.jsx)("h5",{children:A?"New Publication":"Edit Publication"}),null!=a&&(0,v.jsxs)(v.Fragment,{children:[H&&(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,v.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}),K&&(0,v.jsxs)(u.UQ,{children:["Error loading publication - ",null===K||void 0===K||null===(e=K.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),W&&(0,v.jsxs)(u.UQ,{children:["Error saving publication - ",W]}),Y&&ee()]}),null==a&&ee()]})})})})}},851(e,s,a){a.d(s,{AdminDSAUpload:()=>b});var l=a(8094),n=a(8365),t=a(1506),i=a(5197),r=a(9307),d=a(7102),o=a(292),c=a(4524),m=a(4091),u=a(2025),h=a(7860),x=a(7714),j=a(8159),p=a(5678);const g=(0,m.Ay)(i.A)`      
2  padding-bottom: 2%;
3`,v=e=>{let{submitButtonText:s,backButtonNavigate:a}=e;const l=(0,c.Zp)();return(0,p.jsx)(g,{children:(0,p.jsxs)(n.fI,{children:[(0,p.jsx)(n.oq,{variant:"secondary",className:"btn-submit",type:"button",onClick:()=>{l(j.o+a)},children:"Back"}),(0,p.jsx)(n.Tm,{children:(0,p.jsx)(n.WJ,{variant:"success",className:"btn-submit",type:"submit",children:s})})]})})};var A=a(9513),N=a(687),f=a(213);const y=(0,m.Ay)(n.m)`
4    margin-top: 2%;
5`,b=()=>{const e=(0,c.Zp)(),{uuid:s}=(0,c.g)(),[a,m]=(0,l.useState)(),[g,b]=(0,l.useState)(),{data:w,loading:S,error:D}=(0,N.c)("https://data.projectdatasphere.org//api/admin/donations/dsaRequest/"+s);(0,l.useMemo)((()=>{null!=w&&b(w)}),[w]);const C=x.Ik().shape({fileUploaded:x.gl().required("Please select a file")});return(0,p.jsx)(d.A,{className:"form-container",fluid:!0,children:(0,p.jsx)(n.NE,{name:"content-page",children:(0,p.jsxs)(n.ff,{name:"page-wrapper",children:[(0,p.jsxs)(r.A,{md:8,lg:9,name:"shareDataColumn",children:[(0,p.jsx)(y,{children:"Upload DSA file to approve"}),(0,p.jsx)(n.zN,{children:'Select the "Choose File" button. Upload a file. Select "Upload"'}),(0,p.jsxs)(n.$8,{children:[S&&(0,p.jsx)(o.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,p.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),D&&(0,p.jsx)(n.UQ,{children:a}),w&&(0,p.jsx)(u.l1,{validationSchema:C,onSubmit:async a=>{if(null!==a.fileUploaded){const t="https://data.projectdatasphere.org//api/admin/donations/dsaUpload/"+s;let i=new FormData;i.append("file",a.fileUploaded);const{data:r,error:d}=await(0,f.Ms)(t,i);if(r)e(j.o+"admin/request/dsa/NEW");else if(d){var l,n;m(null===(l=d.response)||void 0===l||null===(n=l.data)||void 0===n?void 0:n.detail)}}},initialValues:{fileUploaded:null},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,touched:a,errors:l,setFieldValue:d}=e;return(0,p.jsxs)(t.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:[(0,p.jsx)(n.$8,{lg:12,children:(0,p.jsx)(n.$8,{lg:8,children:(0,p.jsx)(i.A,{className:"mx-auto",children:(0,p.jsx)(i.A,{className:"mx-auto mb-3",children:(0,p.jsxs)(i.A,{className:"mb-3 ",children:[(0,p.jsxs)(t.A.Group,{as:r.A,lg:12,required:!0,className:"mb-3 ",children:[(0,p.jsx)(t.A.Label,{className:"required",column:"sm",children:(0,p.jsx)(n.z9,{type:"button",className:"btn btn-link bold-label required",children:"Choose Data Share Agreement File"})}),(0,p.jsx)(t.A.Control,{id:"fileUploaded ",type:"file",size:"sm",name:"fileUploaded",accept:".pdf,.doc,.docx",value:void 0,onChange:e=>{d("fileUploaded",e.currentTarget.files[0])},isValid:a.fileUploaded&&!l.fileUploaded})]}),(0,p.jsx)(t.A.Control.Feedback,{type:"invalid",children:"Please provide a subject."}),(0,p.jsx)(u.Kw,{name:"fileUploaded",render:e=>(0,p.jsx)("div",{className:"form-error-msg",children:e})})]})})})})}),(0,p.jsx)(v,{submitButtonText:h.oH,backButtonNavigate:"admin/request/dsa/NEW"})]})}})]})]}),(0,p.jsx)(r.A,{md:4,lg:3,children:(0,p.jsx)(A.n,{})})]})})})}},978(e,s,a){a.d(s,{AdminDatasetRequestAction:()=>N});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(7714),c=a(2025),m=a(8365),u=a(7860),h=a(4524),x=a(4515),j=a(8159),p=a(8819),g=a(687),v=a(213),A=a(5678);const N=()=>{var e,s;const a=(0,h.Zp)(),{uuid:N}=(0,h.g)(),[f,y]=(0,l.useState)(""),[b,w]=(0,l.useState)(""),[S,D]=(0,l.useState)(""),[C,T]=(0,l.useState)(""),[I,k]=(0,l.useState)(""),[F,q]=(0,l.useState)(!1),[R,V]=(0,l.useState)(!1),[U,P]=(0,l.useState)(0),[E,L]=(0,l.useState)(),[O,z]=(0,l.useState)("Comments "),[$,_]=(0,l.useState)(!1),G=(0,l.useRef)(null),[W,B]=(0,l.useState)(!1),[M,Y]=(0,l.useState)(),H="https://data.projectdatasphere.org//api/admin/donations/donationDispositions/"+N,{data:K,loading:Z,error:Q}=(0,g.c)(H);(0,l.useMemo)((()=>{null!=K&&L(K)}),[K]);const J=e=>e.map((e=>(0,A.jsx)("option",{value:e.value,children:e.label},e.id))),X=()=>{null!=G&&G.current&&(G.current.resetForm(),ee())},ee=()=>{V(!1),q(!1)},se=o.Ik().shape({actions:o.Yj().required("Please select an action."),rmiReason:o.Yj().when(["actions"],{is:e=>e===u.js,then:e=>e.required("Please select a reason for request more information")}),declinedReason:o.Yj().when(["actions"],{is:e=>e===u.zP,then:e=>e.required("Please select a reason for request more information")}),declinedOther:o.Yj().when(["declinedReason"],{is:e=>e===u.NZ,then:e=>e.required("Please enter a reason for declining.")}),comments:o.Yj().required("Please enter comments")}),ae=()=>{if(void 0!==E&&(null===E||void 0===E?void 0:E.length)>0)return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m.m,{className:"mb-2 ms-4",children:"Previous Dispositions"}),le(),ne()]})},le=()=>(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(m.TW,{className:"ms-4",children:[(0,A.jsx)(n.A,{lg:1,className:"grid-header grid-entry  ",children:"Status"}),(0,A.jsx)(n.A,{lg:2,className:"grid-header grid-entry  ",children:" User"}),(0,A.jsx)(n.A,{lg:1,className:"grid-header grid-entry ",children:"Date"}),(0,A.jsx)(n.A,{lg:4,className:"grid-header grid-entry ",children:" Reason"}),(0,A.jsx)(n.A,{lg:4,className:"grid-header grid-entry",children:"Comments"})]})}),ne=()=>(0,A.jsx)(A.Fragment,{children:null===E||void 0===E?void 0:E.map((e=>{var s,a;return(0,A.jsxs)(m.TW,{className:"ms-4",children:[(0,A.jsx)(n.A,{lg:1,className:" grid-entry  ",children:e.status}),(0,A.jsx)(n.A,{lg:2,className:" grid-entry  ",children:null===(s=e.user)||void 0===s||null===(a=s.userDetails)||void 0===a?void 0:a.email}),(0,A.jsx)(n.A,{lg:1,className:" grid-entry",children:new Date(e.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,A.jsxs)(n.A,{lg:3,className:" grid-entry ",children:[e.reason," "]}),(0,A.jsx)(n.A,{lg:4,className:" grid-entry",children:e.comments})]})}))}),te=()=>(0,A.jsx)(c.l1,{innerRef:G,enableReinitialize:!0,validationSchema:se,onSubmit:e=>{(async e=>{const s="https://data.projectdatasphere.org//api/admin/donations/requests/"+N;B(!0);const{data:l,error:n}=await(0,v.Yz)(s,e);if(null!==l)B(!1),a(j.o+"admin/request/datasets/PENDING");else if(n){var t;B(!1),Y(null===n||void 0===n||null===(t=n.response)||void 0===t?void 0:t.data.title)}})(JSON.stringify({actions:e.actions,rmiReason:e.rmiReason,declinedReason:e.declinedReason,declinedOther:e.declinedOther,comments:(0,p.a8)(e.comments)})).then((e=>{}))},initialValues:{actions:f,rmiReason:S,declinedReason:b,declinedOther:C,comments:I},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,touched:l,errors:t}=e;return(0,A.jsxs)(i.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:[(0,A.jsx)(m.$8,{lg:12,children:(0,A.jsxs)(m.$8,{lg:8,children:[(0,A.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,A.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formAction",children:[(0,A.jsx)(i.A.Label,{className:"required",column:"sm",children:"Actions "}),(0,A.jsx)(i.A.Select,{size:"sm",name:"actions",value:f,isValid:l.actions&&!t.actions,onChange:e=>{var s;y(e.target.value),s=e.target.value,k(s),s===u.js||s===u.zP?z("Comments (External to User)"):z("C
5omments (Internal Only)"),s===u.js?(q(!0),V(!1)):s===u.zP?(V(!0),q(!1)):(V(!1),q(!1)),a(e)},children:J(u.Di)}),(0,A.jsx)(i.A.Text,{className:"text-muted"}),(0,A.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action."}),(0,A.jsx)(c.Kw,{name:"actions",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})}),F&&(0,A.jsx)(r.A,{className:" justify-content-center mt-3 mb-3 mx-3",children:(0,A.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formAction",children:[(0,A.jsx)(i.A.Label,{className:"required",column:"sm",children:"RMI Reason "}),(0,A.jsx)(i.A.Select,{size:"sm",name:"rmiReason",value:S,isValid:l.rmiReason&&!t.rmiReason,onChange:e=>{D(e.target.value)},children:J(u.iA)}),(0,A.jsx)(i.A.Text,{className:"text-muted"}),(0,A.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,A.jsx)(c.Kw,{name:"actions",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})}),R&&(0,A.jsx)(r.A,{className:" justify-content-center mt-3 mb-3 mx-3",children:(0,A.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formAction",children:[(0,A.jsx)(i.A.Label,{className:"required",column:"sm",children:"Decline Reason "}),(0,A.jsx)(i.A.Select,{size:"sm",name:"declinedReason",value:b,isValid:l.declinedReason&&!t.declinedReason,onChange:e=>{w(e.target.value),e.target.value===u.NZ?_(!0):$&&_(!1),a(e)},children:J(u.zO)}),(0,A.jsx)(i.A.Text,{className:"text-muted"}),(0,A.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,A.jsx)(c.Kw,{name:"declinedReason",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})}),$&&(0,A.jsx)(r.A,{className:"justify-content-center mt-3 mb-3 mx-4",children:(0,A.jsxs)(i.A.Group,{as:n.A,className:"otherFieldGroup",lg:8,controlId:"formDeclinedOther",children:[(0,A.jsx)(i.A.Label,{className:"required",column:"sm",children:"Other Declined "}),(0,A.jsx)(i.A.Control,{size:"sm",required:!0,name:"declinedOther",type:"text",value:C,isValid:l.declinedOther&&!t.declinedOther,onChange:e=>{T(e.target.value)}}),(0,A.jsx)(i.A.Text,{className:"text-muted"}),(0,A.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please provide a reason for declining."}),(0,A.jsx)(c.Kw,{name:"declinedOther",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,A.jsx)(r.A,{className:"mt-3 mb-3 justify-content-center",children:(0,A.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formComments",children:[(0,A.jsxs)(m.AK,{children:[(0,A.jsxs)(i.A.Label,{className:"required",column:"sm",children:[O," "]}),(0,A.jsxs)("span",{children:[U," of ",1e3," characters"]})]}),(0,A.jsx)(i.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"comments",type:"text",value:I,isValid:l.comments&&!t.comments,onChange:e=>{k(e.target.value),P(e.target.value.length),a(e)}}),(0,A.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,A.jsx)(c.Kw,{name:"comments",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})})]})}),(0,A.jsx)(x.E,{handleReset:X,enableClear:!0,isSubmitting:W,submitButtonText:u.XD})]})}});return(0,A.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,A.jsx)(m.NE,{name:"content-page",children:(0,A.jsx)(m.ff,{name:"page-wrapper",children:(0,A.jsxs)(m.$8,{children:[Z&&(0,A.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,A.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),Q&&(0,A.jsxs)(m.UQ,{children:["Error - ",null===Q||void 0===Q||null===(e=Q.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),M&&(0,A.jsxs)(m.UQ,{children:["Error - ",M]}),K&&(0,A.jsxs)(A.Fragment,{children:[te(),ae()]})]})})})})}},1199(e,s,a){a.d(s,{AdminAnnouncement:()=>A});var l=a(8094),n=a(9307),t=a(5197),i=a(7102),r=a(292),d=a(4524),o=a(7860),c=a(8365),m=a(8159),u=a(3849),h=a(3841),x=a(213),j=a(5678);const p=e=>{let{announcementId:s,show:a,showHide:l,handleUpdate:n}=e;const t=async()=>{const e="https://data.projectdatasphere.org//api/admin/announcements/sendAll/"+s,{data:a,error:l}=await(0,x.gZ)(e);if(null!==a)await(async()=>{const e="https://data.projectdatasphere.org//api/admin/announcements/updateSentDate/"+s,{data:a,error:l}=await(0,x.Yz)(e,null);if(null!==a)n();else if(l){var t,i;console.log(null===(t=l.response)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.detail)}})();else if(l){var t,i;console.log(null===(t=l.response)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.detail)}};return(0,j.jsxs)(u.A,{show:a,children:[(0,j.jsx)(u.A.Header,{closeButton:!0,onClick:l,children:(0,j.jsx)(c.c7,{children:"Send Email"})}),(0,j.jsx)(u.A.Body,{children:"Are you sure you want to send this email to all PDS Users?"}),(0,j.jsxs)(u.A.Footer,{children:[(0,j.jsx)(h.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{t()},children:"Send"}),(0,j.jsx)(h.A,{variant:"secondary",onClick:l,children:"Cancel"})]})]})},g=e=>{let{announcementId:s,show:a,showHide:l}=e;return(0,j.jsxs)(u.A,{show:a,children:[(0,j.jsx)(u.A.Header,{closeButton:!0,onClick:l,children:(0,j.jsx)(c.c7,{children:"Send Email"})}),(0,j.jsx)(u.A.Body,{children:"Are you sure you want to send this email to  PDS Admins?"}),(0,j.jsxs)(u.A.Footer,{children:[(0,j.jsx)(h.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{(async()=>{const e="https://data.projectdatasphere.org//api/admin/announcements/sendTest/"+s,{data:a,error:n}=await(0,x.gZ)(e);null!==a?l():n&&console.log(n)})()},children:"Send"}),(0,j.jsx)(h.A,{variant:"secondary",onClick:l,children:"Cancel"})]})]})},v=e=>{let{announcementId:s,show:a,handleDelete:l,showHide:n}=e;return(0,j.jsxs)(u.A,{show:a,children:[(0,j.jsx)(u.A.Header,{closeButton:!0,onClick:n,children:(0,j.jsx)(c.c7,{children:"Delete Announcement"})}),(0,j.jsx)(u.A.Body,{children:"Are you sure that you want to delete this announcement?"}),(0,j.jsxs)(u.A.Footer,{children:[(0,j.jsx)(h.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{(async()=>{const e="https://data.projectdatasphere.org//api/admin/announcements/delete/"+s,{data:a,error:n}=await(0,x.gZ)(e);null!==a?l():n&&console.log(n)})()},children:"Yes"}),(0,j.jsx)(h.A,{variant:"secondary",onClick:n,children:"No"})]})]})},A=()=>{const[e,s]=(0,l.useState)([]),[a,u]=(0,l.useState)(-1),[h,A]=(0,l.useState)(!1),[N,f]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[w,S]=(0,l.useState)(!1),[D,C]=(0,l.useState)(),T=async()=>{S(!0);const{data:e,error:a}=await(0,x.gZ)("https://data.projectdatasphere.org//api/admin/announcements/allAnnouncements");if(null!==e)s(e);else if(a){var l,n;C(null===(l=a.response)||void 0===l||null===(n=l.data)||void 0===n?void 0:n.detail)}S(!1)},I=()=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(n.A,{className:"grid-header grid-entry space-4 ",children:"Subject"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-2",children:" Created By"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-2",children:"Created On"})]}),k=e=>{var s,a;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(n.A,{className:"grid-entry space-4 ",children:(0,j.jsx)(d.k2,{to:m.o+"admin/announcements/action/"+e.id,className:"linkstyle",children:e.subject})}),(0,j.jsxs)(n.A,{className:"grid-entry space-2",children:[" ",null===(s=e.user)||void 0===s||null===(a=s.userDetails)||void 0===a?void 0:a.email]}),(0,j.jsx)(n.A,{className:"grid-entry space-2",children:new Date(e.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})})]})},F=e=>{let s=e.filter((e=>null!=e.sent));return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c.I3,{className:"mb-1 mt-5",children:"Sent Announcements"}),null!=s&&s.length>0&&(0,j.jsxs)(c.TW,{className:"",children:[I(),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3",children:"Sent On"})]}),null===s||void 0===s?void 0:s.map((e=>(0,j.jsxs)(c.TW,{className:"",children:[k(e),(0,j.jsx)(n.A,{className:" grid-entry space-3",children:(0,j.jsx)(t.A,{className:"mt-0  ms-0",children:(0,j.jsx)(n.A,{className:"grid-entry space-3",children:new Date(e.sent).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})})})})]}))),(null===s||0===s.length)&&(0,j.jsx)(c.DV,{children:"No sent announcements"})]})};return(0,j.jsxs)(i.A,{className:"w-100 ",children:[(0,j.jsx)(p,{announcementId:a,show:h,showHide:()=>{A(!h)},handleUpdate:()=>{u(-1),A(!1),T()}}),(0,j.jsx)(g,{announcementId:a,show:N,showHide:()=>{f(!N)}}),(0,j.jsx)(v,{announcementId:a,show:y,showHide:()=>{b(!y)},handleDelete:()=>{u(-1),b(!1),T()}}),(0,j.jsx)(c.Kp,{className:"mt-3  ",children:(0,j.jsx)(n.A,{className:"mt-2",md:8,lg:5,children:(0,j.jsx)(c.NB,{to:m.o+"admin/announcements/action",children:"Create New Email Message"})})}),(0,j.jsxs)(j.Fragment,{children:[w&&(0,j.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,j.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),D&&(0,j.jsx)(c.UQ,{children:D}),e&&(e=>{let s=e.filter((e=>null==e.sent));return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c.I3,{className:"mb-1",children:"Unsent Announcements"}),null!=s&&s.length>0&&(0,j.jsxs)(c.TW,{className:"",children:[I(),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3",children:(0,j.jsxs)(t.A,{className:"mt-0  ms-0",children:[(0,j.jsx)(n.A,{className:"grid-header grid-entry ",children:" Send"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry",children:"Send Test"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry",children:"Delete"})]})})]}),null===s||void 0===s?void 0:s.map((e=>(0,j.jsxs)(c.TW,{className:"",children:[k(e),(0,j.jsx)(n.A,{className:" grid-entry space-3",children:(0,j.jsxs)(t.A,{className:"mt-0  ms-0",children:[(0,j.jsx)(n.A,{className:" grid-entry",children:(0,j.jsx)("img",{className:"mx-auto pe-2",src:o.WL+"icon-all-testEmail.png",title:"Send",onClick:()=>{var s;s=e.id,u(s),A(!0)},alt:"Send"})}),(0,j.jsx)(n.A,{className:" grid-entry",children:(0,j.jsx)("img",{className:"mx-auto pe-2",src:o.WL+"icon-all-testEmail.png",title:"Send Test",onClick:()=>{var s;s=e.id,u(s),f(!0)},alt:"Send"})}),(0,j.jsx)(n.A,{className:" grid-entry",children:(0,j.jsx)("img",{className:"mx-auto pe-2",src:o.WL+"delete.png",title:"Delete",onClick:()=>{var s;s=e.id,u(s),b(!0)},alt:"Delete"})})]})})]}))),(null===s||0===s.length)&&(0,j.jsx)(c.DV,{children:"No unsent announcements"}),F(e)]})})(e)]})]})}},1415(e,s,a){a.d(s,{AdminSiteMessageAction:()=>A});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(8365),c=a(7860),m=a(4524),u=a(8159),h=a(8819),x=a(8064),j=a(7272),p=a(687),g=a(213),v=a(5678);const A=()=>{var e;const{siteMessageId:s}=(0,m.g)(),[a,A]=(0,l.useState)(!1),[N,f]=(0,l.useState)(),[y,b]=(0,l.useState)(""),[w,S]=(0,l.useState)(""),[D,C]=(0,l.useState)(""),T=(0,m.Zp)(),I=(0,l.useRef)(null),[k,F]=(0,l.useState)(!1),[q,R]=(0,l.useState)(),V="https://data.projectdatasphere.org//api/admin/siteMessages/find/"+s,{data:U,loading:P,error:E}=(0,p.c)(V);(0,l.useEffect)((()=>{A(!0)}),[]);(0,l.useMemo)((()=>{null!==U&&(e=>{null!==e&&(b(e.message),f(e),S(new Date(e.startDate).toISOString().substring(0,10)),C(new Date(e.endDate).toISOString().substring(0,10)))})(U)}),[U]);const L=()=>{T(u.o+"admin/siteMessages/ACTIVE")},O=async e=>{F(!0);const{data:s,error:a}=await(0,g.Yz)("https://data.projectdatasphere.org//api/admin/siteMessages/addOrEditSiteMessage",e);if(null!==s)F(!1),T(u.o+"admin/siteMessages/ACTIVE");else if(a){var l;F(!1),R(null===a||void 0===a||null===(l=a.response)||void 0===l?void 0:l.data.title)}},z=()=>(0,v.jsxs)(i.A,{className:"form-layout",onSubmit:e=>(async e=>{var a,l;e.preventDefault(),null!=s?await O(JSON.stringify({id:s,startDate:w,endDate:D,message:(0,h.a8)(null===I||void 0===I||null===(a=I.current)||void 0===a?void 0:a.getData())})):await O(JSON.stringify({startDate:w,endDate:D,message:(0,h.a8)(null===I||void 0===I||null===(l=I.current)||void 0===l?void 0:l.getData())}))})(e),noValidate:!0,children:[(0,v.jsx)(o.$8,{className:"mx-auto",lg:12,children:(0,v.jsxs)(o.$8,{className:"me-5 ",lg:8,children:[(0,v.jsx)(r.A,{className:" mt-3 mb-3 w-100",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:6,controlId:"formAction",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Start Date "}),(0,v.jsx)(i.A.Control,{type:"date",name:"startDate",value:w,onChange:e=>{S(e.target.value)}})]})}),(0,v.jsx)(r.A,{className:" mt-3 mb-3 w-100",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:6,controlId:"formAction",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"End Date "}),(0,v.jsx)(i.A.Control,{type:"date",name:"endDate",value:D,onChange:e=>{C(e.target.value)}})]})}),(0,v.jsx)(r.A,{className:"mt-3 mb-5 ",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formMessage",children:[(0,v.jsx)(o.AK,{children:(0,v.jsx)(i.A.Label,{className:"",column:"sm",children:"Message "})}),(0,v.jsx)(j.b,{reference:I,editorLoaded:a,disabled:!1,name:"message",value:y})]})})]})}),(0,v.jsx)(x.T,{handleReset:L,isSubmitting:k,submitButtonText:c.XD})]});return(0,v.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,v.jsx)(o.NE,{name:"content-page",children:(0,v.jsx)(o.ff,{name:"page-wrapper",children:(0,v.jsxs)(o.$8,{children:[null!=s&&(0,v.jsxs)(v.Fragment,{children:[P&&(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,v.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}),E&&(0,v.jsxs)(o.UQ,{children:["Error - ",null===(e=E.response)||void 0===e?void 0:e.data.detail]}),q&&(0,v.jsxs)(o.UQ,{children:["Error - ",q]}),N&&z()]}),null==s&&z()]})})})})}},1552(e,s,a){a.d(s,{AdminAdditionalResource:()=>j});var l=a(8094),n=a(9307),t=a(7102),i=a(5197),r=a(292),d=a(4524),o=a(7860),c=a(8365),m=a(9994),u=a(8159),h=a(687),x=a(5678);const j=()=>{var e;const{resourceType:s}=(0,d.g)(),[a,j]=(0,l.useState)([]),p="https://data.projectdatasphere.org//api/admin/additionalResources/getAdditionalResources/"+s,{data:g,loading:v,error:A}=(0,h.c)(p);(0,l.useMemo)((()=>{null!=g&&j(g)}),[g]);return(0,x.jsxs)(t.A,{className:"w-100 ",children:[(0,x.jsx)(i.A,{className:"mt-3 "}),(0,x.jsx)(m.B,{countsList:o.pV,requestType:s,countsUrl:"/api/admin/dashboard/counts/additionalResource"}),(0,x.jsx)(c.Kp,{className:"mt-3  ",children:(0,x.jsx)(n.A,{className:"mt-2",md:8,lg:5,children:(0,x.jsx)(c.NB,{to:u.o+"admin/additionalResources/action",children:"Create New Resource Item"})})}),v&&(0,x.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,x.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),A&&(0,x.jsx)(c.UQ,{children:null===(e=A.response)||void 0===e?void 0:e.data.detail}),a&&(a.length?(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(n.A,{className:"mb-3",children:[(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(c.TW,{className:"mt-3",children:[(0,x.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Label"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry space-4 ",children:"Description"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry  space-2",children:"Edit"})]})}),(0,x.jsx)(x.Fragment,{children:null===a||void 0===a?void 0:a.map((e=>(0,x.jsxs)(c.TW,{className:"mb-3",children:[(0,x.jsx)(n.A,{className:"grid-entry space-3",children:(0,x.jsx)(d.N_,{to:e.url,target:"_blank",children:e.title})}),(0,x.jsx)(n.A,{className:"grid-entry space-4",children:e.description}),(0,x.jsx)(n.A,{className:"grid-entry space-2",children:(0,x.jsx)(d.k2,{to:u.o+"admin/additionalResources/action/"+e.id,className:"linkstyle ",children:"Edit"})})]})))})]})}):(0,x.jsxs)(c.DV,{children:["No ",null===s||void 0===s?void 0:s.toLocaleLowerCase()," resource items at this time"]}))]})}},1767(e,s,a){a.d(s,{AdminTickets:()=>b});var l=a(8094),n=a(9307),t=a(1506),i=a(5197),r=a(292),d=a(7102),o=a(4524),c=a(7860),m=a(8365),u=a(3849),h=a(3841),x=a(5678);const j=e=>{let{show:s,showHide:a}=e;return(0,x.jsxs)(u.A,{show:s,children:[(0,x.jsx)(u.A.Header,{closeButton:!0,onClick:a,children:(0,x.jsx)(m.c7,{children:"Error"})}),(0,x.jsx)(u.A.Body,{children:(0,x.jsx)(m.Cf,{children:"Could not retrieve user information."})}),(0,x.jsx)(u.A.Footer,{children:(0,x.jsx)(h.A,{variant:"primary",onClick:a,children:"Ok"})})]})};var p=a(8159),g=a(5363),v=a(213);const A=e=>{let{ticketUuid:s,fullName:a}=e;const[n,t]=(0,l.useState)(""),[i,r]=(0,l.useState)(!1),c=()=>{r(!i)},u=async e=>{const s="https://data.projectdatasphere.org//api/admi
5n/tickets/convert/"+e,{data:l,error:n}=await(0,v.gZ)(s);var i,r;null!==l?(t(null===l||void 0===l||null===(i=l.user)||void 0===i?void 0:i.uuid),h(e,null===l||void 0===l||null===(r=l.user)||void 0===r?void 0:r.uuid,a)):n&&c()},h=(e,s,a)=>s?(0,x.jsxs)(m.KI,{className:"",children:[(0,x.jsx)(g.d,{userUuid:s}),(0,x.jsx)(o.N_,{to:p.o+"admin/userInfo/uuid/"+s,className:"linkstyle",children:a})]}):(0,x.jsxs)(o.N_,{to:"",className:"convert",onClick:()=>u(e),children:[a,"(convert)"]});return(0,x.jsxs)(d.A,{className:"ps-0",children:[(0,x.jsx)(j,{show:i,showHide:c}),h(s,n,a)]})};var N=a(9994),f=a(8819),y=a(2025);const b=()=>{const{requestType:e}=(0,o.g)(),s=(0,l.useRef)(null),[a,u]=(0,l.useState)(""),[h,j]=(0,l.useState)([]),[b,w]=(0,l.useState)(!1),[S,D]=(0,l.useState)(),[C,T]=(0,l.useState)(!1),[I,k]=(0,l.useState)("DESC"),F="https://data.projectdatasphere.org//api/admin/tickets/"+e,q="https://data.projectdatasphere.org//api/admin/tickets/search/"+a,[R,V]=(0,l.useState)(F+"/"+I),[U,P]=(0,l.useState)(1),[E,L]=(0,l.useState)(!0),[O,z]=(0,l.useState)(!1),$=(0,l.useRef)(null);(0,l.useMemo)((()=>{null!==a&&a.trim().length>0?(V(q),T(!0)):V(F+"/"+I),P(1),L(!0),j([])}),[a]),(0,l.useMemo)((()=>{(async()=>{w(!0);const{data:s,error:a}=await(0,v.gZ)(R);if(null!==s)j(s),e===c.V&&s.length<25?L(!1):e===c.V&&(L(!0),P(1));else if(a){var l,n;D(null===(l=a.response)||void 0===l||null===(n=l.data)||void 0===n?void 0:n.detail)}w(!1)})()}),[R]);const _=(0,l.useCallback)((async()=>{if(O||!E||e!==c.V||a.trim().length>0)return;z(!0);const s="https://data.projectdatasphere.org//api/admin/tickets/"+e+"/"+I+"/page/"+U,{data:l,error:n}=await(0,v.gZ)(s);if(null!==l)0===l.length?L(!1):(j((e=>[...e,...l])),P((e=>e+1)),l.length<25&&L(!1));else if(n){var t,i;D(null===(t=n.response)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.detail)}z(!1)}),[O,E,U,e,I,a]);(0,l.useEffect)((()=>{if(e!==c.V)return;const s=$.current;if(!s)return;const a=new IntersectionObserver((e=>{e[0].isIntersecting&&E&&!b&&!O&&_()}),{threshold:.1});return a.observe(s),()=>a.disconnect()}),[E,b,O,_,e]);const G=e=>{let s;e.preventDefault(),I===c.ER?(k(c.kg),s=c.kg):(k(c.ER),s=c.ER),P(1),L(!0),j([]),V(F+"/"+s)},W=e=>{var s,a,l;const n=(null===(s=e.contactUs)||void 0===s?void 0:s.first)+" "+(null===(a=e.contactUs)||void 0===a?void 0:a.last);var t,i;return null!=(null===(l=e.user)||void 0===l?void 0:l.id)?(0,x.jsxs)(m.KI,{className:"",children:[(0,x.jsx)(g.d,{userUuid:null===(t=e.user)||void 0===t?void 0:t.uuid}),(0,x.jsx)(o.k2,{to:p.o+"admin/userInfo/"+(null===(i=e.user)||void 0===i?void 0:i.uuid),className:"linkstyle",children:n})]}):(0,x.jsx)(A,{ticketUuid:e.uuid,fullName:n})},B=e=>{var s,a;if(null!=e.techSupportEvents)return null===(s=e.techSupportEvents[0].user)||void 0===s||null===(a=s.userDetails)||void 0===a?void 0:a.email},M=e=>{if(null!=e.techSupportEvents){let s=e.techSupportEvents[0].event,a=c.Pz.find((e=>e.value===s));if(void 0!==a)return null===a||void 0===a?void 0:a.label}},Y=e=>C&&a.length>0?"Search Results - "+a:e===c.vP?"Open Tickets":e===c.V?"Closed Tickets":"",H=e=>e===c.vP?"No open tickets at this time":e===c.V?"No closed tickets at this time":e===c.mS?"No tickets in progress at this time":"",K=()=>(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(m.TW,{className:"",children:[(0,x.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:"Name"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:"Email"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:"Subject"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:"Status"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:(0,x.jsx)(o.N_,{to:"",className:"convert",onClick:e=>G(e),children:"Request Date"})})]})}),Z=()=>(0,x.jsx)(x.Fragment,{children:null===h||void 0===h?void 0:h.map((s=>(0,x.jsxs)(m.TW,{className:"",children:[(0,x.jsx)(n.A,{className:"grid-entry space-2",children:W(s)}),(0,x.jsx)(n.A,{className:"grid-entry space-2",children:s.contactUs.email}),(0,x.jsx)(n.A,{className:"grid-entry",children:(0,f.z5)(s)}),(0,x.jsx)(n.A,{className:"grid-entry",children:(0,x.jsx)(m.Op,{to:p.o+"admin/tickets/processTicket/"+s.uuid+"/"+e,children:M(s)})}),(0,x.jsx)(n.A,{className:"grid-entry",children:new Date(s.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})})]},s.uuid)))}),Q=()=>(0,x.jsx)(y.l1,{innerRef:s,onSubmit:()=>{console.log("submitted")},initialValues:{searchParam:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s}=e;return(0,x.jsx)(t.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:(0,x.jsx)(m.$8,{lg:3,children:(0,x.jsxs)(t.A.Group,{as:n.A,className:"w-100 pe-0 ps-1  ",controlId:"",children:[(0,x.jsx)(t.A.Label,{className:"",column:"sm",children:"Search Tickets by Email"}),(0,x.jsx)(t.A.Control,{type:"search",placeholder:"",className:"search-box border-search","aria-label":"Search",onChange:e=>{return s=e,void(null!==a?u(s.target.value):(T(!1),u("")));var s}})]})})})}});return(0,x.jsxs)(d.A,{className:"w-100 ",children:[(0,x.jsx)(i.A,{className:"mt-3 "}),(0,x.jsx)(N.B,{countsList:c.QR,requestType:e,countsUrl:"/api/admin/dashboard/counts/tickets"}),b&&(0,x.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,x.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),S&&(0,x.jsx)("p",{children:"Error"}),h&&(e===c.mS?(null===h||void 0===h?void 0:h.length)>0?(0,x.jsxs)(x.Fragment,{children:[Q(),(0,x.jsx)(i.A,{children:(0,x.jsx)(m.nN,{className:"mt-3",children:Y(e)})}),(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(m.TW,{className:"",children:[(0,x.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:"Name"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:"Email"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:"Subject"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:"Status"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:"Status Date"}),(0,x.jsx)(n.A,{className:"grid-header grid-entry ",children:(0,x.jsx)(o.N_,{to:"",className:"convert",onClick:e=>G(e),children:"Request Date"})})]})}),(0,x.jsx)(x.Fragment,{children:null===h||void 0===h?void 0:h.map((s=>(0,x.jsxs)(m.TW,{className:"",children:[(0,x.jsx)(n.A,{className:"grid-entry space-2",children:W(s)}),(0,x.jsx)(n.A,{className:"grid-entry space-2",children:s.contactUs.email}),(0,x.jsx)(n.A,{className:"grid-entry",children:(0,f.z5)(s)}),(0,x.jsx)(n.A,{className:"grid-entry",children:(0,x.jsx)(m.Op,{to:p.o+"admin/tickets/processTicket/"+s.uuid+"/"+e,children:M(s)})}),(0,x.jsx)(n.A,{className:"grid-entry",children:B(s)}),(0,x.jsx)(n.A,{className:"grid-entry",children:(0,f.pt)(s)}),(0,x.jsx)(n.A,{className:"grid-entry",children:new Date(s.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})})]},s.uuid)))})]}):(0,x.jsxs)(x.Fragment,{children:[Q(),(0,x.jsx)(m.DV,{children:H(e)})]}):e===c.vP?null!==h&&(null===h||void 0===h?void 0:h.length)>0?(0,x.jsxs)(x.Fragment,{children:[Q(),(0,x.jsx)(i.A,{children:(0,x.jsx)(m.nN,{className:"mt-3",children:Y(e)})}),K(),Z()]}):(0,x.jsxs)(x.Fragment,{children:[Q(),(0,x.jsx)(m.DV,{children:H(e)})]}):e===c.V?null!==h&&(null===h||void 0===h?void 0:h.length)>0?(0,x.jsxs)(x.Fragment,{children:[Q(),(0,x.jsx)(i.A,{children:(0,x.jsx)(m.nN,{className:"mt-3",children:Y(e)})}),K(),Z(),(0,x.jsx)("div",{ref:$}),O&&(0,x.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,x.jsx)("span",{className:"visually-hidden",children:"Loading more..."})}),!E&&h.length>0&&0===a.trim().length&&(0,x.jsx)(i.A,{className:"justify-content-center mt-2",children:(0,x.jsx)(n.A,{className:"text-center text-muted",children:"All tickets loaded"})})]}):(0,x.jsxs)(x.Fragment,{children:[Q(),(0,x.jsx)(m.DV,{children:H(e)})]}):void 0)]})}},1844(e,s,a){a.d(s,{AdminUserRequests:()=>V});var l=a(8094),n=a(9307),t=a(5197),i=a(292),r=a(1506),d=a(7102),o=a(4524),c=a(2025),m=a(7860),u=a(8365),h=a(9994),x=a(8159),j=a(4091),p=a(5326),g=a(5678);const v=(0,j.Ay)(n.A)`
6    font-size: ${p.$N.px13};
7    color: ${p.lm.dark_grey_blue};
8    padding: .1% 0;
9`,A=(0,j.Ay)(v)`
10    overflow-wrap: break-word;
11`,N=(0,j.Ay)(v)`
12    font-weight: bold;
13`,f=(0,j.Ay)(n.A)`
14    border: 1px solid ${p.lm.cerulean};
15    width: 85%;
16`,y=(0,j.Ay)(u.Op)`
17    padding-right: 2px;
18`,b=j.Ay.img`
19    margin-left: 10px;
20    width: 50px;
21    height: 25px;
22    text-align: center;
23`,w=e=>{let{request:s,requestType:a}=e;const[i,r]=(0,l.useState)(!1),[d,c]=(0,l.useState)("/images/arrow_down.png"),h=e=>{var s,a;if(e.user.uuid)return(0,g.jsx)(y,{to:x.o+"admin/userInfo/"+e.user.uuid,children:(null===(s=e.user.userDetails)||void 0===s?void 0:s.first)+" "+(null===(a=e.user.userDetails)||void 0===a?void 0:a.last)})},j=()=>{var e,a,l,n;let t=(null===(e=s.user.userDetails)||void 0===e?void 0:e.first)+" "+(null===(a=s.user.userDetails)||void 0===a?void 0:a.last)+" "+(null===(l=s.user.userDetails)||void 0===l?void 0:l.organization)+" "+(null===(n=s.user.userDetails)||void 0===n?void 0:n.country);return(0,g.jsx)(o.N_,{to:"https://www.google.com/search?q="+t,target:"_blank",children:(0,g.jsx)(b,{onClick:()=>S(),src:"https://www.google.com/logos/Logo_25wht.gif",alt:"Web Search for User",className:""})})},p=()=>{var e,a,l,n,t;return null!==(null===(e=s.user.userDetails)||void 0===e?void 0:e.learnAboutPDS)&&(null===(a=s.user.userDetails)||void 0===a?void 0:a.learnAboutPDS)!==m.NZ?null===(t=s.user.userDetails)||void 0===t?void 0:t.learnAboutPDS:null!==(null===(l=s.user.userDetails)||void 0===l?void 0:l.learnAboutPDSOther)?null===(n=s.user.userDetails)||void 0===n?void 0:n.learnAboutPDSOther:m.QE},w=()=>{var e,a,l;return null!==(null===(e=s.user.userDetails)||void 0===e?void 0:e.linkedinProfileURL)&&0===(null===(a=s.user.userDetails)||void 0===a?void 0:a.linkedinProfileURL.indexOf("http"))?(0,g.jsx)(o.N_,{to:null===(l=s.user.userDetails)||void 0===l?void 0:l.linkedinProfileURL,target:"_blank",children:"View Profile"}):(0,g.jsx)("span",{children:"NA"})},S=()=>{r(!i),c(i?"/images/arrow_down.png":"/images/arrow_up.png")};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(u.TW,{className:"",children:[(0,g.jsxs)(n.A,{className:"grid-entry space-3 ",children:[h(s),(0,g.jsx)("img",{onClick:()=>S(),src:d,className:"text-center",alt:"arrow"})]}),(0,g.jsx)(n.A,{className:"grid-entry space-3",children:s.user.userDetails.email}),(0,g.jsx)(n.A,{className:"grid-entry",children:s.requestType}),(0,g.jsx)(n.A,{className:"grid-entry",children:new Date(s.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,g.jsx)(n.A,{className:"grid-entry",children:(0,g.jsx)(u.Op,{to:x.o+"admin/request/accounts/"+s.requestId+"/"+a,children:s.requestStatus})})]},s.requestId)}),i&&(()=>{var e,a,l,n,i;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(f,{className:" pb-1 pe-4 ms-4 mb-4",children:[(0,g.jsxs)(t.A,{className:"w-100 pe-2 ps-2 ",children:[(0,g.jsx)(N,{className:"ps-3  ",lg:3,children:"Name:"}),(0,g.jsxs)(v,{className:"ps-3  ",lg:9,children:[(null===(e=s.user.userDetails)||void 0===e?void 0:e.first)+" "+(null===(a=s.user.userDetails)||void 0===a?void 0:a.last),j()]})]}),(0,g.jsxs)(t.A,{className:"w-100 pe-2 ps-2",children:[(0,g.jsx)(N,{className:"ps-3  ",lg:3,children:"Organization or University:"}),(0,g.jsx)(v,{className:"ps-3  ",lg:9,children:null===(l=s.user.userDetails)||void 0===l?void 0:l.organization})]}),(0,g.jsxs)(t.A,{className:"w-100 pe-2 ps-2",children:[(0,g.jsx)(N,{className:"ps-3  ",lg:3,children:"Country:"}),(0,g.jsx)(v,{className:"ps-3  ",lg:9,children:null===(n=s.user.userDetails)||void 0===n?void 0:n.country})]}),(0,g.jsxs)(t.A,{className:"w-100 pe-2 ps-2",children:[(0,g.jsx)(N,{className:"ps-3  ",lg:3,children:"How Learned About PDS:"}),(0,g.jsx)(v,{className:"ps-3  ",lg:9,children:p()})]}),(0,g.jsxs)(t.A,{className:"w-100 pe-2 ps-2",children:[(0,g.jsx)(N,{className:"ps-3  ",lg:3,children:"LinkedIn Profile Url:"}),(0,g.jsx)(v,{className:"ps-3  ",lg:9,children:w()})]}),(0,g.jsxs)(t.A,{className:"w-100 pe-2 ps-2",children:[(0,g.jsx)(N,{className:"ps-3  ",lg:3,children:"Research Goals:"}),(0,g.jsx)(A,{className:"ps-3  ",lg:9,children:null===(i=s.user.userDetails)||void 0===i?void 0:i.proposedResearchGoals})]})]})})})()]})};var S=a(5363),D=a(213),C=a(9052),T=a(3849),I=a(3841),k=a(5862);const F=(0,j.Ay)(n.A)`
24    font-size: ${p.$N.px16};
25    border: 1px solid ${p.lm.middle_grey};
26`,q=e=>{let{userDownloads:s,show:a,showHide:l}=e;return(0,g.jsxs)(T.A,{size:"lg",scrollable:!0,show:a,children:[(0,g.jsx)(T.A.Header,{closeButton:!0,onClick:l,children:(0,g.jsxs)(u.c7,{children:["Downloads for User - ",null===s||void 0===s?void 0:s.username]})}),(0,g.jsx)(T.A.Body,{children:(0,g.jsx)(F,{children:(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(k.P,{downloads:s,showDonationLink:!1})})})}),(0,g.jsx)(T.A.Footer,{children:(0,g.jsx)(I.A,{variant:"primary",onClick:l,children:"Close"})})]})},R=e=>{let{userUuid:s}=e;
26const[a,n]=(0,l.useState)(!1),[t,i]=(0,l.useState)(!1),[r,d]=(0,l.useState)(),c=()=>{n(!a)},m=()=>{i(!t)};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(q,{userDownloads:r,show:t,showHide:m}),(0,g.jsx)(C.x,{message:"User not in Active Directory",show:a,showHide:c}),(0,g.jsx)(o.N_,{to:"",onClick:()=>(async()=>{const e="https://data.projectdatasphere.org//api/admin/users/userdownloads/"+s,{data:a,error:l}=await(0,D.gZ)(e);null!==a?(d(a),i(!0)):l&&n(!0)})(),children:"downloads"})]})})},V=()=>{const{requestType:e}=(0,o.g)(),s=(0,l.useRef)(null),[a,j]=(0,l.useState)(""),p="https://data.projectdatasphere.org//api/admin/users/requests/"+e,v="https://data.projectdatasphere.org//api/admin/users/requests/search/"+a,[A,N]=(0,l.useState)(""),[f,y]=(0,l.useState)([]),[b,C]=(0,l.useState)(),[T,I]=(0,l.useState)(),[k,F]=(0,l.useState)(0),[q,V]=(0,l.useState)(!0),[U,P]=(0,l.useState)(!1),E=(0,l.useRef)(null);(0,l.useMemo)((()=>{null!==a&&a.trim().length>0?N(v):N(p),F(0),V(!0),y([])}),[a]),(0,l.useMemo)((()=>{(async()=>{if(A.length<=0)return;I(!0);const{data:s,error:a}=await(0,D.gZ)(A);if(null!==s)y(s),e===m.K3&&s.length<25?V(!1):e===m.K3&&(V(!0),F(1));else if(a){var l;C(null===(l=a.response)||void 0===l?void 0:l.data.detail)}I(!1)})()}),[A]);const L=(0,l.useCallback)((async()=>{if(U||!q||e!==m.K3||a.trim().length>0)return;P(!0);const s="https://data.projectdatasphere.org//api/admin/users/requests/"+e+"/page/"+k,{data:l,error:n}=await(0,D.gZ)(s);if(null!==l)0===l.length?V(!1):(y((e=>[...e,...l])),F((e=>e+1)),l.length<25&&V(!1));else if(n){var t;C(null===(t=n.response)||void 0===t?void 0:t.data.detail)}P(!1)}),[U,q,k,e,a]);(0,l.useEffect)((()=>{if(e!==m.K3)return;const s=E.current;if(!s)return;const a=new IntersectionObserver((e=>{e[0].isIntersecting&&q&&!T&&!U&&L()}),{threshold:.1});return a.observe(s),()=>a.disconnect()}),[q,T,U,L,e]);const O=()=>(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(u.TW,{className:"",children:[(0,g.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Name"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry space-3",children:" Email"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry ",children:"Request Type"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry ",children:"Request Date"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry",children:"Current Status"})]})}),z=s=>(0,g.jsx)(g.Fragment,{children:null===s||void 0===s?void 0:s.map((s=>(0,g.jsx)(w,{request:s,requestType:e})))}),$=()=>{const e=null===f||void 0===f?void 0:f.filter((e=>e.requestStatus===m.js));return void 0!==e&&e.length>0},_=()=>{const e=null===f||void 0===f?void 0:f.filter((e=>e.requestStatus===m.Js||e.requestStatus===m.GD||e.requestStatus===m.IZ));return void 0!==e&&e.length>0},G=()=>(0,g.jsx)(c.l1,{innerRef:s,onSubmit:()=>{},initialValues:{actions:"",rmiReason:"",declinedReason:"",declinedOther:"",comments:"Admin Comment"},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s}=e;return(0,g.jsx)(r.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:(0,g.jsx)(u.$8,{lg:3,children:(0,g.jsxs)(r.A.Group,{as:n.A,className:"w-100 pe-0 ps-1  ",controlId:"",children:[(0,g.jsx)(r.A.Label,{className:"",column:"sm",children:"Search Accounts "}),(0,g.jsx)(r.A.Control,{type:"search",placeholder:"",className:"search-box border-search","aria-label":"Search",onChange:e=>{return s=e,void j(null!==a?s.target.value:"");var s}})]})})})}});return(0,g.jsxs)(d.A,{className:"w-100 ",children:[(0,g.jsx)(t.A,{className:"mt-3  "}),(0,g.jsx)(h.B,{countsList:m.lk,requestType:e,countsUrl:"/api/admin/dashboard/counts/accounts"}),T&&(0,g.jsx)(i.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),b&&(0,g.jsx)(u.UQ,{children:b}),f&&(()=>{if(e===m.K3)return null!==f&&void 0!==f&&f.length||a.length>0?(0,g.jsxs)(g.Fragment,{children:[G(),(0,g.jsx)(t.A,{children:(0,g.jsxs)(u.nN,{className:"mt-3",children:[null!==f?"Account Requests (Number of Users Found - "+(null===f||void 0===f?void 0:f.length):"Account Requests (Number of Users Found - 0",")"]})}),(null===f||void 0===f?void 0:f.length)&&(0,g.jsxs)(n.A,{className:"mb-3",children:[(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(u.TW,{className:"",children:[(0,g.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Name"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:"Email"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry ",children:"Request Type"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry ",children:"Request Date"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry",children:"Current Status"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry",children:"Downloads"})]})}),(0,g.jsx)(g.Fragment,{children:null===f||void 0===f?void 0:f.map((s=>{var a,l;return(0,g.jsxs)(u.TW,{className:"",children:[(0,g.jsxs)(u.KI,{className:"grid-entry space-3",children:[(0,g.jsx)(S.d,{userUuid:s.user.uuid}),(0,g.jsx)(u.Op,{to:x.o+"admin/userInfo/"+s.user.uuid,children:(null===(a=s.user.userDetails)||void 0===a?void 0:a.first)+" "+(null===(l=s.user.userDetails)||void 0===l?void 0:l.last)})]}),(0,g.jsx)(n.A,{className:"grid-entry space-2",children:s.user.userDetails.email}),(0,g.jsx)(n.A,{className:"grid-entry",children:s.requestType}),(0,g.jsx)(n.A,{className:"grid-entry",children:new Date(s.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,g.jsx)(n.A,{className:"grid-entry",children:(0,g.jsx)(u.Op,{to:x.o+"admin/request/accounts/"+s.requestId+"/"+e,children:s.requestStatus})}),(0,g.jsx)(n.A,{className:"grid-entry",children:(0,g.jsx)(R,{userUuid:s.user.uuid})})]},s.requestId)}))}),(0,g.jsx)("div",{ref:E}),U&&(0,g.jsx)(i.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading more..."})}),!q&&f.length>0&&0===a.trim().length&&(0,g.jsx)(t.A,{className:"justify-content-center mt-2",children:(0,g.jsx)(n.A,{className:"text-center text-muted",children:"All users loaded"})})]})]}):(0,g.jsx)(u.DV,{children:"No approved user requests at this time"});if(e===m.$q)return null!==f&&void 0!==f&&f.length?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.A,{children:(0,g.jsx)(u.nN,{className:"mt-3",children:"Declined A
26ccounts"})}),(0,g.jsxs)(n.A,{className:"mb-3",children:[(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(u.TW,{className:"",children:[(0,g.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Name"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:" Email"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry ",children:"Request Type"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry ",children:" Request Date"}),(0,g.jsx)(n.A,{className:"grid-header grid-entry",children:"Current Status"})]})}),(0,g.jsx)(g.Fragment,{children:null===f||void 0===f?void 0:f.map((s=>(0,g.jsxs)(u.TW,{className:"",children:[(0,g.jsx)(n.A,{className:"grid-entry space-3",children:s.user.userDetails.first+" "+s.user.userDetails.last}),(0,g.jsx)(n.A,{className:"grid-entry space-2",children:s.user.userDetails.email}),(0,g.jsx)(n.A,{className:"grid-entry",children:s.requestType}),(0,g.jsx)(n.A,{className:"grid-entry",children:new Date(s.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,g.jsx)(n.A,{className:"grid-entry",children:(0,g.jsx)(u.Op,{to:x.o+"admin/request/accounts/"+s.requestId+"/"+e,children:s.requestStatus})})]},s.requestId)))})]})]}):(0,g.jsx)(u.DV,{children:"No declined user requests at this time"});if(void 0!==f&&(null===f||void 0===f?void 0:f.length)>0){const e=f.filter((e=>e.requestStatus===m.Js||e.requestStatus===m.GD||e.requestStatus===m.IZ));return(0,g.jsxs)(g.Fragment,{children:[_()&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.A,{children:(0,g.jsx)(u.nN,{className:"mt-3",children:"Pending Account Requests"})}),(0,g.jsxs)(n.A,{className:"mb-3 ",children:[O(),z(e)]})]}),!_()&&(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(u.DV,{children:"No pending user requests at this time"})}),$()&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.A,{children:(0,g.jsx)(u.nN,{className:"mt-5",children:"RMI Account Requests"})}),(0,g.jsxs)(n.A,{className:"mb-3",children:[O(),z(f.filter((e=>e.requestStatus===m.js||e.requestStatus===m.IZ||e.requestStatus===m.GD)))]})]})]})}return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(u.DV,{children:"No pending user requests at this time"}),$()&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.A,{children:(0,g.jsx)(u.nN,{className:"mt-5",children:"RMI Account Requests"})}),(0,g.jsxs)(n.A,{className:"mb-3",children:[O(),z(f.filter((e=>e.requestStatus===m.js||e.requestStatus===m.IZ)))]})]})]})})()]})}},2241(e,s,a){a.d(s,{AdminReporting:()=>x});var l=a(9379),n=a(8094),t=a(3841),i=a(9307),r=a(7102),d=a(1506),o=a(5197),c=a(8365),m=a(213),u=a(5363),h=a(5678);const x=()=>{const[e,s]=(0,n.useState)(),a=(new Date).getFullYear(),x=Array.from({length:a-2014+1},((e,s)=>a-s)),[j,p]=(0,n.useState)(a),[g,v]=(0,n.useState)(a),[A,N]=(0,n.useState)(null),[f,y]=(0,n.useState)(null),[b,w]=(0,n.useState)(new Set),[S,D]=(0,n.useState)({}
26),[C,T]=(0,n.useState)(new Set),[I,k]=(0,n.useState)({}),F={Jan:1,Feb:2,Mar:3,Apr:4,May:5,Jun:6,Jul:7,Aug:8,Sep:9,Oct:10,Nov:11,Dec:12},q=async e=>{y(null),T(new Set),k({});const a=`https://data.projectdatasphere.org//api/admin/reporting/downloads/monthly/${e}`,{data:l,error:n}=await(0,m.gZ)(a);if(null!==l)y(l);else if(n){var t;s(null===(t=n.response)||void 0===t?void 0:t.data.detail)}},R=async e=>{N(null);const a=`https://data.projectdatasphere.org//api/admin/reporting/users/monthly/${e}`,{data:l,error:n}=await(0,m.gZ)(a);if(null!==l)N(l),w(new Set),D({});else if(n){var t;s(null===(t=n.response)||void 0===t?void 0:t.data.detail)}},V=async e=>{if(b.has(e))w((s=>{const a=new Set(s);return a.delete(e),a}));else{let a=S[e];a||(a=await(async e=>{var a;const l=null!==(a=F[e])&&void 0!==a?a:1,n=`https://data.projectdatasphere.org//api/admin/reporting/users/monthly/${j}/${l}`,{data:t,error:i}=await(0,m.gZ)(n);return null!==t?t:(i&&s(null===(r=i.response)||void 0===r?void 0:r.data.detail),[]);var r})(e),D((s=>(0,l.A)((0,l.A)({},s),{},{[e]:a})))),w((s=>new Set(Array.from(s).concat(e))))}},U=async e=>{if(C.has(e))T((s=>{const a=new Set(s);return a.delete(e),a}));else{let a=I[e];a||(a=await(async e=>{var a;const l=null!==(a=F[e])&&void 0!==a?a:1,n=`https://data.projectdatasphere.org//api/admin/reporting/downloads/monthly/${g}/${l}`,{data:t,error:i}=await(0,m.gZ)(n);return null!==t?t:(i&&s(null===(r=i.response)||void 0===r?void 0:r.data.detail),[]);var r})(e),k((s=>(0,l.A)((0,l.A)({},s),{},{[e]:a})))),T((s=>new Set(Array.from(s).concat(e))))}};(0,n.useEffect)((()=>{R(a),q(a)}),[]);const P=async e=>{const{data:a,error:l}=await(0,m.y$)(e);if(null!==a)(e=>{if(null!=e){let s=JSON.parse(e.headers.get("Content-Disposition").split("filename=")[1]);const a=window.URL.createObjectURL(e.data),l=document.createElement("a");l.href=a,l.setAttribute("download",s),document.body.appendChild(l),l.click(),null!==l.parentNode&&l.parentNode.removeChild(l)}})(a);else if(l){var n;s(null===(n=l.response)||void 0===n?void 0:n.data.detail)}},E=async()=>{await P("https://data.projectdatasphere.org//api/admin/dashboard/reporting/metadata")},L=async()=>{await P("https://data.projectdatasphere.org//api/admin/dashboard/reporting/user")},O=()=>x.map((e=>(0,h.jsx)("option",{value:e,children:e},e)));return(0,h.jsx)(r.A,{className:"form-container",fluid:!0,children:(0,h.jsx)(c.NE,{name:"content-page",children:(0,h.jsxs)(c.ff,{name:"page-wrapper",children:[e&&(0,h.jsx)(c.UQ,{children:e}),(0,h.jsx)(c.$8,{className:"mt-3 mb-5",lg:12,children:(0,h.jsx)(c.$8,{lg:8,children:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(o.A,{className:"mb-3",children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:(0,h.jsx)(t.A,{onClick:()=>E(),children:"Metadata"})}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:(0,h.jsx)(t.A,{onClick:()=>L(),children:"User"})})]}),(0,h.jsx)(o.A,{className:"mt-3",children:(0,h.jsx)(c.nN,{children:"User Accounts"})}),(0,h.jsxs)(c.TW,{children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Year"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Action"})]}),(0,h.jsxs)(c.TW,{children:[(0,h.jsx)(i.A,{className:"grid-entry space-3",children:(0,h.jsx)(d.A.Select,{size:"sm",value:j,onChange:e=>{const s=Number(e.target.value);p(s),R(s)},children:O()})}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:(0,h.jsx)(t.A,{size:"sm",onClick:()=>L(),children:"Download"})})]}),null!==A&&0===A.length&&(0,h.jsx)(c.TW,{children:(0,h.jsxs)(i.A,{className:"grid-entry space-3",children:["No user accounts found for ",j,"."]})}),null!==A&&A.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(c.TW,{className:"mt-2",children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Month"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"New Users"})]}),A.map((e=>(0,h.jsxs)("div",{className:"mt-3",style:{borderBottom:"1px solid #dee2e6",paddingBottom:"4px"},children:[(0,h.jsxs)(c.TW,{children:[(0,h.jsxs)(i.A,{className:"grid-entry space-3",children:[(0,h.jsx)("span",{style:{fontWeight:"600",fontSize:"1.05rem"},children:e.month}),(0,h.jsx)("img",{src:b.has(e.month)?"/images/arrow_down.png":"/images/arrow_up.png",alt:b.has(e.month)?"collapse":"expand",style:{cursor:"pointer",width:"16px",marginRight:"6px"},onClick:()=>V(e.month)})]}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:e.count})]}),b.has(e.month)&&S[e.month]&&(0,h.jsxs)("div",{style:{paddingLeft:"1.5rem"},children:[(0,h.jsxs)(c.TW,{children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Name"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Email"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Registration Date"})]}),S[e.month].map(((e,s)=>(0,h.jsxs)(c.TW,{children:[(0,h.jsxs)(i.A,{className:"grid-entry space-3",children:[(0,h.jsx)(u.d,{userUuid:e.uuid})," ",e.last,", ",e.first]}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:e.email}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:e.dateTime?new Date(e.dateTime).toLocaleDateString():""})]},s)))]})]},e.month)))]}),(0,h.jsx)(o.A,{className:"mt-4",children:(0,h.jsx)(c.nN,{children:"Downloads"})}),(0,h.jsxs)(c.TW,{children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Year"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Action"})]}),(0,h.jsxs)(c.TW,{children:[(0,h.jsx)(i.A,{className:"grid-entry space-3",children:(0,h.jsx)(d.A.Select,{size:"sm",value:g,onChange:e=>{const s=Number(e.target.value);v(s),q(s)},children:O()})}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:(0,h.jsx)(t.A,{size:"sm",onClick:()=>E(),children:"Download"})})]}),null!==f&&0===f.length&&(0,h.jsx)(c.TW,{children:(0,h.jsxs)(i.A,{className:"grid-entry space-3",children:["No downloads found for ",g,"."]})}),null!==f&&f.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(c.TW,{className:"mt-2",children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Month"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Downloads"})]}),f.map((e=>(0,h.jsxs)("div",{className:"mt-3",style:{borderBottom:"1px solid #dee2e6",paddingBottom:"4px"},children:[(0,h.jsxs)(c.TW,{children:[(0,h.jsxs)(i.A,{className:"grid-entry space-3",children:[(0,h.jsx)("span",{style:{fontWeight:"600",fontSize:"1.05rem"},children:e.month}),(0,h.jsx)("img",{src:C.has(e.month)?"/images/arrow_down.png":"/images/arrow_up.png",alt:C.has(e.month)?"collapse":"expand",style:{cursor:"pointer",width:"16px",marginRight:"6px"},onClick:()=>U(e.month)})]}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:e.count})]}),C.has(e.month)&&I[e.month]&&(0,h.jsxs)("div",{style:{paddingLeft:"1.5rem"},children:[(0,h.jsxs)(c.TW,{children:[(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Name"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Email"}),(0,h.jsx)(i.A,{className:"grid-header grid-entry space-3",children:"Downloads"})]}),I[e.month].map(((e,s)=>(0,h.jsxs)(c.TW,{children:[(0,h.jsxs)(i.A,{className:"grid-entry space-3",children:[(0,h.jsx)(u.d,{userUuid:e.uuid})," ",e.last,", ",e.first]}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:e.email}),(0,h.jsx)(i.A,{className:"grid-entry space-3",children:e.count})]},s)))]})]},e.month)))]})]})})})]})})})}},2374(e,s,a){a.d(s,{AdminDatasetsRequests:()=>y});var l=a(8094),n=a(9307),t=a(7102),i=a(5197),r=a(292),d=a(4091),o=a(5326),c=a(4524),m=a(7860),u=a(9994),h=a(8365),x=a(8159),j=a(687),p=a(5678);const g=d.Ay.h6`
27    font-weight: bold;
28    color: ${o.lm.dark_grey_blue};
29`,v=d.Ay.div`
30    display: flex;
31    margin-right: 0;
32    margin-left: 0;
33    padding-right: 0;
34    padding-left: 0;
35    width: 100%;
36    margin-top: .5%;
37    padding-bottom: .75%;
38    font-size: ${o.$N.px14};
39    border-bottom: 2px solid ${o.lm.light_grey};
40
41    a {
42        color: ${o.lm.dark_grey_blue};
43    }
44
45    a.approval {
46        color: ${o.lm.cerulean};
47    }
48
49`,A=(0,d.Ay)(v)`
50    font-weight: bold;
51    background-color: ${o.lm.filter_gray};
52    padding: .5% 0;
53    margin-top: 0;
54`,N=d.Ay.div`
55    display: flex;
56    flex-direction: column;
57    align-items: center;
58    margin-right: 0;
59    margin-left: 2%;
60    padding-right: 0;
61    padding-left: 0;
62    width: 12%;
63
64    span {
65        color: ${o.lm.dark_grey_blue};
66    }
67`,f=d.Ay.div`
68    display: flex;
69    flex-direction: column;
70    color: ${o.lm.dark_grey_blue};
71    width: 30%;
72
73    span {
74        display: block;
75    }
76`,y=()=>{var e,s;const{requestType:a}=(0,c.g)(),[d,o]=(0,l.useState)([]),y="https://data.projectdatasphere.org//api/admin/donations/requests/"+a,{data:b,loading:w,error:S}=(0,j.c)(y),D="DATA_SET_FORM",C="FILES",T="SUBMISSION",I="APPROVAL",k="INCOMPLETE",F="READY_FOR_ACTION",q="COMPLETE";(0,l.useMemo)((()=>{null!=b&&o(b)}),[b]);const R=(e,s)=>s.find((s=>s.statusType===e)),V=(e,s,a,l,t)=>{return null!==e&&void 0!==e&&e.nci&&"DSA"===s?(0,p.jsx)(n.A,{className:"icon  ",children:(0,p.jsx)("span",{className:"w-100 icon  share-title text-center",children:"N/A"})}):(0,p.jsxs)(n.A,{className:"icon  ",children:[(0,p.jsx)("span",{className:"w-100 icon bold-label share-title text-center",children:(0,p.jsx)("img",{className:"mx-auto",src:"/images/icons/"+(null===(i=R(s,e.statuses))||void 0===i?void 0:i.icon),alt:"Waiting icon",width:"32",height:"32"})}),l&&s===T&&(0,p.jsxs)("span",{className:"w-100 icon share-title text-center mt-1 pb-2",children:[" ",t(e)]}),l&&s!==T&&(0,p.jsxs)("span",{className:"w-100 icon share-title text-center mt-1 pb-2 ps-4",children:[" ",t(e)]})]});var i},U=e=>{var s,a;if(null!=(null===e||void 0===e||null===(s=e.request)||void 0===s?void 0:s.updatedAt))return new Date(null===e||void 0===e||null===(a=e.request)||void 0===a?void 0:a.updatedAt).toLocaleDateString("en-us",{day:"2-digit",month:"2-digit",year:"numeric"})},P=e=>{var s,a,l,n,t,i;if(null!=(null===e||void 0===e||null===(s=e.request)||void 0===s||null===(a=s.approver)||void 0===a?void 0:a.userDetails))return(null===e||void 0===e||null===(l=e.request)||void 0===l||null===(n=l.approver)||void 0===n?void 0:n.userDetails.first)+" "+(null===e||void 0===e||null===(t=e.request)||void 0===t||null===(i=t.approver)||void 0===i?void 0:i.userDetails.last)},E=e=>{if(e.dsaApproved&&!e.nci)return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(h.Op,{to:x.o+"dataShareAgreement/"+(null===e||void 0===e?void 0:e.uuid),children:"Approved"})})},L=e=>{if(!e.dsaApproved)return"";{var s,a,l;let n=x.o+"admin/request/datasets/donationInfo/"+(null===e||void 0===e?void 0:e.uuid);"REAL_WORLD"===e.dataType&&(n=x.o+"admin/request/datasets/donationInfo/ "+(null===e||void 0===e?void 0:e.uuid));let t="";if((null===(s=R(D,e.statuses))||void 0===s?void 0:s.key)===q?t="Complete":(null===(a=R(D,e.statuses))||void 0===a?void 0:a.key)===F?t="Enter Data":(null===(l=R(C,e.statuses))||void 0===l?void 0:l.key)===k&&(t="Incomplete"),""!==t)return(0,p.jsx)(h.Op,{to:n,children:t})}},O=e=>{var s,a,l;let n="",t=x.o+"admin/request/datasets/fileInfo/"+e.uuid;if((null===(s=R(C,e.statuses))||void 0===s?void 0:s.key)===q?n="Complete":(null===(a=R(C,e.statuses))||void 0===a?void 0:a.key)===F?n="Ready for Action":(null===(l=R(C,e.statuses))||void 0===l?void 0:l.key)===k&&(n="Incomplete"),""!==n)return(0,p.jsx)(h.Op,{to:t,children:n})},z=e=>{var s,a;let l="";if((null===(s=R(T,e.statuses))||void 0===s?void 0:s.key)===F?l="Ready for Action":(null===(a=R(T,e.statuses))||void 0===a?void 0:a.key)===q&&(l="Complete"),""!==l)return l},$=e=>{var s,a;let l=x.o+"admin/request/datasets/status/"+e.uuid,n="";return"PENDING_VERIFICATION"===(null===(s=R(I,e.statuses))||void 0===s?void 0:s.key)?n="Review in Process":(e.nci||(null===(a=R(I,e.statuses))||void 0===a?void 0:a.key)===m.K3)&&(n="Approved"),""!==n?(0,p.jsx)(h.Op,{to:l,children:n}):"N/A"},_=e=>{var s;return(null===e||void 0===e||null===(s=e.shareDataDashboard)||void 0===s?void 0:s.length)>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.A,{children:(0,p.jsx)(g,{className:"mt-3",children:e.title})}),(0,p.jsx)(n.A,{className:"mb-3 ",children:(0,p.jsxs)(A,{className:"",children:[(0,p.jsx)(f,{className:"",children:"Title"}),(0,p.jsx)(N,{className:"",children:"DSA Status"}),(0,p.jsx)(N,{className:"",children:"Dataset Form"}),(0,p.jsx)(N,{className:"pe-4",children:"Files"}),(0,p.jsx)(N,{className:"pe-4",children:"Submitted"}),(0,p.jsx)(N,{className:"pe-2",children:"Approval"})]})})]}):a===m.Nz||a===m.$q?(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(h.DV,{children:["No ",a===m.Nz?"Quarantined":"Declined"," datasets available"]})}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.A,{children:(0,p.jsx)(g,{className:"mt-3",children:e.title})}),(0,p.jsx)("span",{children:null===e||void 0===e?void 0:e.subTitle})]})},G=e=>{let s=x.o+"admin/request/datasets/donationInfo/"+e.uuid,a=null==e.title?m.QE:e.title;return(0,p.jsx)(h.Op,{to:s,children:a})},W=e=>{var s;if((null===e||void 0===e||null===(s=e.shareDataDashboard)||void 0===s?void 0:s.length)>0)return(0,p.jsx)(p.Fragment,{children:e.shareDataDashboard.map((e=>{return(0,p.jsx)(n.A,{className:"w-100",children:(0,p.jsxs)(v,{className:"mb-2 mt-1",children:[(0,p.jsxs)(f,{className:" span-title ",children:[(0,p.jsx)("span",{children:G(e)}),(0,p.jsxs)("span",{children:["Unique Dataset ID: ",e.uniqueId]}),(0,p.jsxs)("span",{children:["Clinical Trial ID(s):",e.clinicalGovId]})]}),V(e,"DSA",0,!0,E),V(e,D,0,!0,L),V(e,C,0,!0,O),V(e,T,0,!0,z),(s=e,(0,p.jsxs)(n.A,{className:"icon  ",children:[(0,p.jsxs)("span",{className:"w-100  icon share-title text-center  pb-1 ps-3",children:[" ",$(s)]}),(0,p.jsx)("span",{className:"w-100  icon share-title text-center mt-1  ps-3",children:P(s)}),(0,p.jsx)("span",{className:"w-100  icon share-title text-center  pb-1 ps-3",children:U(s)})]}))]},e.uuid)});var s}))})};return(0,p.jsxs)(t.A,{className:"w-100 ",children:[(0,p.jsx)(i.A,{className:"mt-3 "}),(0,p.jsx)(u.B,{countsList:m.hA,requestType:a,countsUrl:"/api/admin/dashboard/counts/datasets"}),w&&(0,p.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,p.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),S&&(0,p.jsxs)(h.UQ,{children:["Error - ",null===S||void 0===S||null===(e=S.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),d&&(0,p.jsx)(p.Fragment,{children:d.map((e=>(0,p.jsxs)("div",{children:[_(e),W(e)]})))})]})}},2596(e,s,a){a.d(s,{AdminDatasetFileInfo:()=>I});var l=a(8094),n=a(4524),t=a(9307),i=a(7102),r=a(5197),d=a(292),o=a(8365),c=a(4091),m=a(5326),u=a(648),h=a(3841);(0,c.Ay)(u.A.Item)`
77    font-size: ${m.$N.px12}; //.8125rem;
78    font-weight: 400;
79    line-height: 1.5;
80`;const x=(0,c.Ay)(h.A)`
81    font-weight: 700;
82    font-size: 14pt !important;
83    letter-spacing: 0.25px;
84    line-height: 1.2rem;
85    padding: 12px 46px;
86    min-width: 70px;
87    max-width: 475px;
88    text-align: center;
89    cursor: pointer;
90    text-decoration: none;
91    margin: 0px 10px;
92    border: 0;
93    outline: 0;
94    display: inline-block;
95`,j=c.Ay.p`
96    font-family: 'Source Sans Pro', sans-serif;
97
98`;var p=a(1506),g=a(3849),v=a(2025),A=a(7860),N=a(7714),f=a(213),y=a(5678);const b=e=>{let{donationUuid:s,dashboard:a,title:n,show:i,fileId:d,filename:c,fileDesc:m,fileType:u,handleFileChange:x,showHide:b}=e;const w=(0,l.useRef)(null),[S,D]=(0,l.useState)(-1),[C,T]=(0,l.useState)(0),[I,k]=(0,l.useState)(""),[F,q]=(0,l.useState)(!1),[R,V]=(0,l.useState)(),U=async e=>{const{data:s,error:a}=await(0,f.Yz)("https://data.projectdatasphere.org//api/admin/dataset/files/logEntry",e);if(null!==s)x();else if(a){var l;V(null===(l=a.response)||void 0===l?void 0:l.data.detail)}},P=e=>{U(-1===d?JSON.stringify({fileAction:"ADD",comments:I,fileId:e.id.toString(),oldFileId:d.toString()}):JSON.stringify({fileAction:"REPLACE",comments:I,fileId:S,oldFileId:d.toString()}))},E=async()=>{const e="https://data.projectdatasphere.org//api/admin/dataset/files/delete/"+s+"/"+d,{data:a,error:l}=await(0,f.Yz)(e,null);if(null!==a)P(a);else if(l){var n;V(null===(n=l.response)||void 0===n?void 0:n.data.detail)}},L=()=>-1===d||(m===A.DO||m===A.YY||m===A.Su),O=()=>{let e=A.e7,s=A.hK.find(z);return null!==s&&void 0!==s&&(e=s.valueList),e.map((e=>(0,y.jsx)("option",{value:e.value,children:e.label},e.id)))},z=e=>e.dsaType===(null===a||void 0===a?void 0:a.dataType)&&e.studyContent===(null===a||void 0===a?void 0:a.studyContent),$=N.Ik().shape({fileUploaded:N.gl().required("Please select a file"),comments:N.Yj().required("Please enter comments")});return(0,y.jsxs)(g.A,{show:i,size:"lg",children:[(0,y.jsx)(g.A.Header,{closeButton:!0,onClick:b,children:(0,y.jsx)(o.c7,{children:n})}),(0,y.jsx)(g.A.Body,{children:(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(t.A,{className:"",children:[d>0&&(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(t.A,{className:"ms-5 ",children:[(0,y.jsx)(o.DV,{className:"ms-5 mb-0",children:"File to Replace:"}),(0,y.jsx)(j,{className:"ms-5",children:c})]})}),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(v.l1,{innerRef:w,enableReinitialize:!0,validationSchema:$,onSubmit:async e=>{if(null!==e.fileUploaded){let t=new FormData;t.append("file",e.fileUploaded),t.append("fileType",L()?e.fileType:u),t.append("fileDesc",m);const i="https://data.projectdatasphere.org//api/admin/dataset/files/upload/"+s,{data:r,error:o}=await(0,f.Ms)(i,t);if(r)D((n=r).id),-1===d?P(n):E();else if(o){var a,l;V(null===(a=o.response)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.detail)}}var n},initialValues:{comments:"",fileType:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,values:l,setFieldValue:n,touched:i,errors:d}=e;return(0,y.jsx)(p.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:(0,y.jsx)(o.$8,{lg:12,children:(0,y.jsxs)(o.$8,{lg:8,children:[(0,y.jsxs)(r.A,{className:"mb-3 ",children:[(0,y.jsxs)(p.A.Group,{as:t.A,lg:12,required:!0,className:"mb-3 ",children:[(0,y.jsx)(p.A.Label,{className:"required",column:"sm",children:(0,y.jsx)(o.z9,{type:"button",className:"btn btn-link bold-label required",children:"Choose File"})}),(0,y.jsx)(p.A.Control,{id:"fileUploaded ",type:"file",size:"sm",name:"fileUploaded",accept:"Protocol"===m||"CRF"===m?A.Lv:m===A.Em?A.uS:A.GQ,value:void 0,onChange:e=>{n("fileUploaded",e.currentTarget.files[0]),q(!0)},isValid:i.fileUploaded&&!d.fileUploaded})]}),(0,y.jsx)(v.Kw,{name:"fileUploaded",render:e=>(0,y.jsx)("div",{className:"form-error-msg",children:e})})]}),F&&L()&&(0,y.jsxs)("div",{className:"selectorFileType-div",children:[(0,y.jsx)(p.A.Label,{className:"required",column:"sm",children:"Data Type "}),(0,y.jsx)(p.A.Select,{size:"sm",required:!0,name:"fileType",value:void 0,onChange:e=>{n("fileType",e.currentTarget.value)},children:O()})]}),(0,y.jsx)(r.A,{className:"mt-3 mb-3 justify-content-center",children:(0,y.jsxs)(p.A.Group,{as:t.A,lg:12,className:"mb-3",controlId:"formComments",children:[(0,y.jsxs)(o.AK,{children:[(0,y.jsx)(p.A.Label,{className:"required",column:"sm",children:"Comments "}),(0,y.jsxs)("span",{children:[C," of ",1e3," characters"]})]}),(0,y.jsx)(p.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"comments",type:"text",value:l.comments,isValid:i.comments&&!d.comments,onChange:e=>{k(e.target.value),T(e.target.value.length),a(e)}}),(0,y.jsx)(v.Kw,{name:"comments",render:e=>(0,y.jsx)("div",{className:"form-error-msg",children:e})})]})})]})})})}})})]})})}),(0,y.jsxs)(g.A.Footer,{children:[(0,y.jsx)(h.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{w.current&&w.current.handleSubmit()},children:"Submit"}),(0,y.jsx)(h.A,{variant:"secondary",onClick:b,children:"Close"})]})]})},w=(0,c.Ay)(t.A)`
99    margin-left: 11%;
100`,S=e=>{let{donationUuid:s,filename:a,fileId:n,show:i,submitAction:d,showHide:c}=e;const m=(0,l.useRef)(null),[u,x]=(0,l.useState)(0),[A,b]=(0,l.useState)(""),[S,D]=(0,l.useState)(),C=N.Ik().shape({comments:N.Yj().required("Please enter comments")});return(0,y.jsxs)(g.A,{show:i,size:"lg",children:[(0,y.jsx)(g.A.Header,{closeButton:!0,onClick:c,children:(0,y.jsx)(o.c7,{children:"Delete File"})}),(0,y.jsx)(g.A.Body,{children:(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(t.A,{children:[(0,y.jsx)(o.UQ,{children:S}),(0,y.jsx)(j,{className:"text-center",children:"Are you sure you want to delete this file?"}),(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(w,{className:"",children:[(0,y.jsx)(o.DV,{className:"ms-5 mb-0",children:"File to Delete:"}),(0,y.jsx)(j,{className:"ms-5",children:a})]})}),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(v.l1,{innerRef:m,enableReinitialize:!0,validationSchema:C,onSubmit:async()=>{const e="https://data.projectdatasphere.org//api/admin/dataset/files/delete/"+s+"/"+n,{data:a,error:l}=await(0,f.Yz)(e,null);
100if(null!==a)await(async()=>{const{data:e,error:s}=await(0,f.Yz)("https://data.projectdatasphere.org//api/admin/dataset/files/logEntry",JSON.stringify({fileAction:"DELETE",comments:A,fileId:"-1",oldFileId:n.toString()}));if(null!==e)d();else if(s){var a;D(null===(a=s.response)||void 0===a?void 0:a.data.detail)}})();else if(l){var t;D(null===(t=l.response)||void 0===t?void 0:t.data.detail)}},initialValues:{comments:null!==A&&void 0!==A?A:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,values:l,touched:n,errors:i}=e;return(0,y.jsx)(p.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:(0,y.jsx)(r.A,{className:"mt-3 mb-3 justify-content-center",children:(0,y.jsxs)(p.A.Group,{as:t.A,lg:8,className:"mb-3",controlId:"formComments",children:[(0,y.jsxs)(o.AK,{children:[(0,y.jsx)(p.A.Label,{className:"required",column:"sm",children:"Comments "}),(0,y.jsxs)("span",{children:[u," of ",1e3," characters"]})]}),(0,y.jsx)(p.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"comments",type:"text",value:l.comments,isValid:n.comments&&!i.comments,onChange:e=>{b(e.target.value),x(e.target.value.length),a(e)}}),(0,y.jsx)(p.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,y.jsx)(v.Kw,{name:"comments",render:e=>(0,y.jsx)("div",{className:"form-error-msg",children:e})})]})})})}})})]})})}),(0,y.jsxs)(g.A.Footer,{children:[(0,y.jsx)(h.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{m.current&&m.current.handleSubmit()},children:"Submit"}),(0,y.jsx)(h.A,{variant:"secondary",onClick:c,children:"Close"})]})]})},D=c.Ay.h6`
101    font-weight: bold;
102    color: ${m.lm.dark_grey_blue};
103`,C=c.Ay.div`
104    display: flex;
105    margin-right: 0;
106    margin-left: 0;
107    padding-right: 0;
108    padding-left: 0;
109    width: 100%;
110    margin-top: .5%;
111
112    font-size: ${m.$N.px14};
113
114
115    a {
116        color: ${m.lm.dark_grey_blue};
117    }
118`,T=(0,c.Ay)(x)`
119    font-weight: bold;
120    background-color: ${m.lm.turtle_green};
121
122    margin-left: 0;
123
124    :hover, :active:focus {
125        background-color: ${m.lm.hover_green};
126        color: ${m.lm.white};
127    }
128`,I=()=>{const{uuid:e}=(0,n.g)(),[s,a]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1),[u,h]=(0,l.useState)(),[x,j]=(0,l.useState)(!1),[p,g]=(0,l.useState)(),[v,N]=(0,l.useState)(""),[w,I]=(0,l.useState)(""),[k,F]=(0,l.useState)(""),[q,R]=(0,l.useState)(-1),[V,U]=(0,l.useState)(),P=async()=>{j(!0);const s="https://data.projectdatasphere.org//api/admin/donations/datasets/"+e,{data:a,error:l}=await(0,f.gZ)(s);if(a)U(a);else if(l){var n;h(null===(n=l.response)||void 0===n?void 0:n.data.detail)}j(!1)};(0,l.useMemo)((()=>{P()}),[]);const E=()=>{a(!1),m(!1),P()},L=e=>{R(e.id),N(e.filename),m(!c)},O=e=>{if((null===e||void 0===e?void 0:e.description)===A.Em)return A.QE;if((null===e||void 0===e?void 0:e.description)===A.DO||(null===e||void 0===e?void 0:e.description)===A.YY||(null===e||void 0===e?void 0:e.description)===A.Su){let s=null===V||void 0===V?void 0:V.files.filter((e=>e.description===A.DO||e.description===A.YY||e.description===A.Su));return null!==s&&void 0!==s&&s.length&&s.length>1?(0,y.jsx)("img",{className:"mx-auto pe-2",src:A.WL+"delete.png",title:"Delete",onClick:()=>{L(e)},alt:"delete"}):A.QE}return(0,y.jsx)("img",{className:"mx-auto pe-2",src:A.WL+"delete.png",title:"Delete",onClick:()=>{L(e)},alt:"delete file"})},z=()=>{var e;if(null!=V)return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(D,{className:"pb-4 w-100 ",children:V.title}),(0,y.jsxs)(C,{className:" ",children:[(0,y.jsx)(t.A,{className:"grid-header grid-entry space-5",children:"Filename"}),(0,y.jsx)(t.A,{className:"grid-header grid-entry ",children:"Size"}),(0,y.jsx)(t.A,{className:"grid-header grid-entry space-3",children:"File Type"}),(0,y.jsx)(t.A,{className:"grid-header grid-entry space-2",children:"Description"}),(0,y.jsx)(t.A,{className:"grid-header grid-entry",children:"Replace"}),(0,y.jsx)(t.A,{className:"grid-header grid-entry",children:"Delete"})]}),null===(e=V.files)||void 0===e?void 0:e.map((e=>(0,y.jsxs)(C,{className:" ",children:[(0,y.jsx)(t.A,{className:" grid-entry space-5",children:e.filename}),(0,y.jsx)(t.A,{className:" grid-entry ",children:(0,o.kF)(e.fileSize)}),(0,y.jsx)(t.A,{className:" grid-entry space-3",children:e.fileType}),(0,y.jsx)(t.A,{className:" grid-entry space-2",children:e.description}),(0,y.jsx)(t.A,{className:" grid-entry",children:(0,y.jsx)("img",{className:"mx-auto pe-2",src:A.WL+"export.png",title:"Replace",onClick:()=>{(e=>{g("Replace File for Contribution"),R(e.id),N(e.filename),I(e.description),F(e.fileType),a(!s)})(e)},alt:"replace file"})}),(0,y.jsx)(t.A,{className:" grid-entry",children:O(e)})]}))),(0,y.jsx)(T,{className:"mt-2 mb-4",onClick:()=>(g("Add Data File to Contribution"),N(""),I("DATA"),R(-1),void a(!s)),children:"Add File To Contribution"})]})};return(0,y.jsxs)(i.A,{className:"w-100 ",children:[(0,y.jsx)(r.A,{className:"mt-3  "}),(0,y.jsx)(b,{donationUuid:e,dashboard:V,title:p,fileId:q,filename:v,fileDesc:w,fileType:k,handleFileChange:E,show:s,showHide:()=>{a(!s)}}),(0,y.jsx)(S,{donationUuid:e,fileId:q,filename:v,show:c,showHide:()=>{m(!c)},submitAction:E}),x&&(0,y.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,y.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),u&&(0,y.jsxs)(o.UQ,{children:["Error - ",u]}),V&&(()=>{if(null!=V)return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(t.A,{className:" ",children:z()})})})()]})}},2637(e,s,a){a.d(s,{AdminSiteMessage:()=>p});var l=a(8094),n=a(9307),t=a(7102),i=a(5197),r=a(292),d=a(4524),o=a(7860),c=a(8365),m=a(9994),u=a(8159),h=a(4790),x=a(687),j=a(5678);const p=()=>{var e;const{messageType:s}=(0,d.g)(),[a,p]=(0,l.useState)([]),g="PAST",{data:v,loading:A,error:N}=(0,x.c)("https://data.projectdatasphere.org//api/public/announcements/getSiteMessages/"+s);(0,l.useMemo)((()=>{null!=v&&p(v)}),[v]);return(0,j.jsxs)(t.A,{className:"w-100 ",children:[(0,j.jsx)(i.A,{className:"mt-3 "}),(0,j.jsx)(m.B,{countsList:o.Ye,requestType:s,countsUrl:"/api/admin/dashboard/counts/siteMessage"}),(0,j.jsx)(c.Kp,{className:"mt-3  ",children:(0,j.jsx)(n.A,{className:"mt-2",md:8,lg:5,children:(0,j.jsx)(c.NB,{to:u.o+"admin/siteMessages/action",children:"Create New Site Message"})})}),A&&(0,j.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,j.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),N&&(0,j.jsx)(c.UQ,{children:null===(e=N.response)||void 0===e?void 0:e.data.detail}),v&&(null!==a&&void 0!==a&&a.length?(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(n.A,{className:"mb-3",children:[(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(c.TW,{className:"mt-3",children:[(0,j.jsx)(n.A,{className:"grid-header grid-entry space-1 ",children:"Start Date"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-1 ",children:"End Date"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry  space-6",children:"Message"}),s!==g&&(0,j.jsx)(n.A,{className:"grid-header grid-entry  space-2",children:"Edit"})]})}),(0,j.jsx)(j.Fragment,{children:null===a||void 0===a?void 0:a.map((e=>(0,j.jsxs)(c.TW,{className:"mb-3",children:[(0,j.jsx)(n.A,{className:"grid-entry space-1 ",children:new Date(e.startDate).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,j.jsx)(n.A,{className:"grid-entry space-1 ",children:new Date(e.endDate).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,j.jsx)(n.A,{className:"grid-entry space-6",children:(0,h.Ay)(e.message)}),s!==g&&(0,j.jsx)(n.A,{className:"grid-entry space-2",children:(0,j.jsx)(d.k2,{to:u.o+"admin/siteMessages/action/"+e.id,className:"linkstyle ",children:"Edit"})})]})))})]})}):(0,j.jsxs)(c.DV,{children:["No ",null===s||void 0===s?void 0:s.toLocaleLowerCase()," site messages at this time"]}))]})}},2876(e,s,a){a.d(s,{R:()=>d});a(8094);var l=a(9307),n=a(1506),t=a(5197),i=a(2025),r=a(5678);const d=e=>{let{fieldName:s,label:a,value:d,valueHandler:o,disabled:c,touched:m,errors:u,formText:h,size:x}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(t.A,{className:"mt-3 mb-3 ",children:(0,r.jsxs)(n.A.Group,{as:l.A,lg:x,className:"",controlId:"",children:[(0,r.jsx)(n.A.Label,{className:"required",column:"sm",children:a}),(0,r.jsx)(n.A.Control,{size:"sm",required:!0,name:s,type:"text",value:d,disabled:c,isValid:m.fieldName&&!u.fieldName,onChange:e=>{o(e.target.value)}}),null!=h&&(0,r.jsx)(n.A.Text,{id:"",muted:!0,children:h}),(0,r.jsx)(i.Kw,{name:s,render:e=>(0,r.jsx)("div",{className:"form-error-msg",children:e})})]})})})}},3654(e,s,a){a.d(s,{AdminUserInfo:()=>h});var l=a(8094),n=a(4524),t=a(9307),i=a(7102),r=a(1506),d=a(5197),o=a(292),c=a(8365),m=a(687),u=a(5678);const h=()=>{const{userUuid:e}=(0,n.g)(),[s,a]=(0,l.useState)(),[h,x]=(0,l.useState)(!0),[j,p]=(0,l.useState)(!1),[g,v]=(0,l.useState)(!1),[A,N]=(0,l.useState)(!1),[f,y]=(0,l.useState)(!1),{data:b,loading:w,error:S}=(0,m.c)("https://data.projectdatasphere.org//api/admin/users/userInfo/uuid/"+e);(0,l.useMemo)((()=>{var e,s,l,n;null!=b&&(null!=(null===(e=b.userDetails)||void 0===e?void 0:e.sectorOther)&&p(!0),null!=(null===(s=b.userDetails)||void 0===s?void 0:s.roleOther)&&v(!0),null!=(null===(l=b.userDetails)||void 0===l?void 0:l.reasonForVisitingOther)&&N(!0),null!=(null===(n=b.userDetails)||void 0===n?void 0:n.learnAboutPDSOther)&&y(!0),a(b))}),[b]);return(0,u.jsx)(i.A,{className:"form-container",fluid:!0,children:(0,u.jsxs)(c.NE,{name:"content-page",children:[(0,u.jsx)(c.ff,{name:"page-wrapper",children:(0,u.jsx)(c.$8,{md:8,lg:9,name:"formLayoutColumn"})}),w&&(0,u.jsx)(o.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,u.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),S&&(0,u.jsx)("p",{children:"Error"}),b&&(()=>{var e,a,l,n,i,o,m,x,p,v,N,y,b,w,S,D,C,T,I,k,F;return(0,u.jsx)(c.$8,{className:"mt-5 mb-5",lg:12,children:(0,u.jsxs)(c.$8,{lg:8,children:[(0,u.jsxs)(d.A,{className:"mt-3 mb-3",children:[(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formfirstName",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"First Name "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"first",type:"text",disabled:h,defaultValue:null===s||void 0===s||null===(e=s.userDetails)||void 0===e?void 0:e.first})]}),(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formLastName",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Last Name "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"last",type:"text",disabled:h,defaultValue:null===s||void 0===s||null===(a=s.userDetails)||void 0===a?void 0:a.last})]})]}),(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,controlId:"formEmail",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Email Address "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"email",type:"email",disabled:h,defaultValue:null===s||void 0===s||null===(l=s.userDetails)||void 0===l?void 0:l.email})]})}),(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formPhone",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Phone "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"phone",type:"text",defaultValue:null===s||void 0===s||null===(n=s.userDetails)||void 0===n?void 0:n.phoneNumber,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formAffiliation",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Affiliation "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"affiliation",type:"text",defaultValue:null===s||void 0===s||null===(i=s.userDetails)||void 0===i?void 0:i.sector,disabled:h})]})}),j&&(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,className:"otherFieldGroup",lg:6,controlId:"formAffiliationOther",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Other Affiliation "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"affiliationOther",type:"text",defaultValue:null===s||void 0===s||null===(o=s.userDetails)||void 0===o?void 0:o.sectorOther,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-3 mb-3",children:(0,u.jsxs)(r.A.Group,{as:t.A,className:"",controlId:"formOrganization",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Organization "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"organization",type:"text",defaultValue:null===s||void 0===s||null===(m=s.userDetails)||void 0===m?void 0:m.organization,disabled:h})]})}),(0,u.jsxs)(d.A,{className:"mt-3 mb-3 ",children:[(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formRole",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Role "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"role",type:"text",defaultValue:null===s||void 0===s||null===(x=s.userDetails)||void 0===x?void 0:x.role,disabled:h})]}),(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formDepartment",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Department "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"department",type:"text",defaultValue:null===s||void 0===s||null===(p=s.userDetails)||void 0===p?void 0:p.department,disabled:h})]})]}),g&&(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,className:"otherFieldGroup",lg:6,controlId:"formRoleOther",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Other Role "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"roleOther",type:"text",defaultValue:null===s||void 0===s||null===(v=s.userDetails)||void 0===v?void 0:v.roleOther,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-3 mb-3",children:(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,className:"",controlId:"formLinkedInURL",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"LinkedIn Profile URL "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"linkedInURL",type:"text",defaultValue:null===s||void 0===s||null===(N=s.userDetails)||void 0===N?void 0:N.linkedinProfileURL,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-3 mb-3",children:(0,u.jsxs)(r.A.Group,{as:t.A,controlId:"formStreetAddress",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Street Address "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"streetAddress",type:"text",defaultValue:null===s||void 0===s||null===(y=s.userDetails)||void 0===y?void 0:y.address,disabled:h})]})}),(0,u.jsxs)(d.A,{className:"mt-3 mb-3",children:[(0,u.jsxs)(r.A.Group,{as:t.A,lg:5,controlId:"formCity",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"City "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"city",type:"text",defaultValue:null===s||void 0===s||null===(b=s.userDetails)||void 0===b?void 0:b.city,disabled:h})]}),(0,u.jsxs)(r.A.Group,{as:t.A,lg:3,controlId:"formState",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"State "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"state",type:"text",defaultValue:null===s||void 0===s||null===(w=s.userDetails)||void 0===w?void 0:w.state,disabled:h})]}),(0,u.jsxs)(r.A.Group,{as:t.A,lg:4,controlId:"formPostalCode",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Postal Code "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"postalCode",type:"text",defaultValue:null===s||void 0===s||null===(S=s.userDetails)||void 0===S?void 0:S.postalCode,disabled:h})]})]}),(0,u.jsx)(d.A,{className:"mt-3 mb-3",children:(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formCountry",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Country "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"country",type:"text",defaultValue:null===s||void 0===s||null===(D=s.userDetails)||void 0===D?void 0:D.country,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-4 mb-3",children:(0,u.jsxs)(r.A.Group,{as:t.A,lg:6,controlId:"formReasonForVisiting",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"What is your main reason for visiting? "}),(0,u.jsx)(r.A.Control,{size:"sm",name:"dataProvider",type:"text",defaultValue:null===s||void 0===s||null===(C=s.userDetails)||void 0===C?void 0:C.reasonForVisiting,disabled:h})]})}),A&&(0,u.jsx)(d.A,{className:"mt-4 mb-5 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,className:"otherFieldGroup",lg:6,controlId:"formReasonForVisitingOther",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Other Reason For 
128Visiting "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"reasonForVisitingOther",type:"text",defaultValue:null===s||void 0===s||null===(T=s.userDetails)||void 0===T?void 0:T.reasonForVisitingOther,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-4 mb-3",children:(0,u.jsxs)(r.A.Group,{as:t.A,controlId:"formLearnAbout",children:[(0,u.jsx)(r.A.Label,{column:"sm",children:"How did you learn about Project Data Sphere?"}),(0,u.jsx)(r.A.Control,{size:"sm",name:"dataProvider",type:"text",defaultValue:null===s||void 0===s||null===(I=s.userDetails)||void 0===I?void 0:I.learnAboutPDS,disabled:h}),(0,u.jsx)(r.A.Text,{className:"text-muted"})]})}),f&&(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsxs)(r.A.Group,{as:t.A,className:"otherFieldGroup",lg:11,controlId:"formLearnAboutPDSOther",children:[(0,u.jsx)(r.A.Label,{column:"sm",children:"Please describe in more detail "}),(0,u.jsx)(r.A.Control,{size:"sm",required:!0,name:"learnAboutPDSOther",type:"text",defaultValue:null===s||void 0===s||null===(k=s.userDetails)||void 0===k?void 0:k.learnAboutPDSOther,disabled:h}),(0,u.jsx)(r.A.Text,{className:"text-muted"})]})}),(0,u.jsx)(d.A,{className:"",children:(0,u.jsxs)(r.A.Group,{as:t.A,controlId:"formResearchGoals",children:[(0,u.jsx)(r.A.Label,{className:"bold",column:"sm",children:"Research Description & Goals "}),(0,u.jsx)(r.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"researchGoals",type:"text",defaultValue:null===s||void 0===s||null===(F=s.userDetails)||void 0===F?void 0:F.proposedResearchGoals,disabled:h})]})}),(0,u.jsx)(d.A,{className:"mt-3 mb-3 ",children:(0,u.jsx)(r.A.Group,{as:t.A,controlId:"formTermsOfUse",children:(0,u.jsx)(r.A.Control,{as:"textarea",rows:2,size:"sm",name:"dataProvider",type:"text",disabled:h,defaultValue:"Yes.I have read the Project Data Sphere agreement in full.I agree to comply with the conditions as stated in the agreement."})})})]})})})()]})})}},3963(e,s,a){a.d(s,{AdminDashboard:()=>D});var l=a(8094),n=a(7102),t=a(9307),i=a(292),r=a(8365),d=a(4091),o=a(5326),c=a(7860),m=a(8159),u=a(3849),h=a(5197),x=a(3841),j=a(5159),p=a(5678);const g=e=>{let{show:s,showHide:a}=e;const[n,i]=(0,l.useState)([]);return(0,l.useEffect)((()=>{if(!s)return;(async()=>{try{const e=await j.A.get("https://data.projectdatasphere.org//api/admin/dashboard/activeUsers");i(e)}catch(e){console.error("Failed to fetch active users",e)}})()}),[s]),(0,p.jsxs)(u.A,{show:s,size:"xl",children:[(0,p.jsx)(u.A.Header,{closeButton:!0,onClick:a,children:(0,p.jsx)(r.c7,{children:"Active Accounts"})}),(0,p.jsxs)(u.A.Body,{children:[(0,p.jsxs)(h.A,{className:"mt-3 w-100",children:[(0,p.jsx)(t.A,{lg:3,className:"bold-label",children:"User"}),(0,p.jsx)(t.A,{lg:2,className:"bold-label",children:"Start"}),(0,p.jsx)(t.A,{lg:2,className:"bold-label",children:"Last Access"}),(0,p.jsx)(t.A,{lg:2,className:"bold-label",children:"End"}),(0,p.jsx)(t.A,{lg:1,className:"bold-label",children:"Browser"}),(0,p.jsx)(t.A,{lg:2,className:"bold-label",children:"OS"})]}),null===n||void 0===n?void 0:n.map((e=>(0,p.jsxs)(h.A,{className:"mt-3 w-100",children:[(0,p.jsx)(t.A,{lg:3,children:e.username}),(0,p.jsx)(t.A,{lg:2,children:new Date(e.start).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}),(0,p.jsx)(t.A,{lg:2,children:new Date(e.lastAccessTime).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}),(0,p.jsx)(t.A,{lg:2,children:new Date(e.sessionEndTime).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}),(0,p.jsx)(t.A,{lg:1,children:e.browser}),(0,p.jsx)(t.A,{lg:2,children:e.os})]})))]}),(0,p.jsx)(u.A.Footer,{children:(0,p.jsx)(x.A,{variant:"secondary",onClick:a,children:"Close"})})]})};var v=a(4524),A=a(687),N=a(1445),f=a(9289);const y=(0,d.Ay)(r.nN)`
129    font-weight: bold;
130`,b=d.Ay.div`
131    width: 100%;
132    padding: 1% 0;
133    border-bottom: 1px solid ${o.lm.dark_grey_blue};
134`,w=d.Ay.p`
135    height: 10px;
136    border-top: 10px solid ${o.lm.light_grey};
137    margin-right: 2%;
138`,S=(0,d.Ay)(v.k2)`
139    padding-left: 20px;
140    padding-right: 20px;
141    text-decoration: none;
142    font-size: ${o.$N.px16};
143    font-weight: 400;
144    color: ${o.lm.cerulean};
145`,D=()=>{var e;const{sessionUser:s}=(0,N.E)(),[a,d]=(0,l.useState)(),[o,u]=(0,l.useState)(!1),{data:h,loading:x,error:j}=(0,A.c)("https://data.projectdatasphere.org//api/admin/dashboard/counts");(0,l.useMemo)((()=>{null!=h&&d(h)}),[h]);const D=e=>{e.preventDefault(),u(!o)},C=e=>{var s;let l=null===a||void 0===a||null===(s=a.techSupportStatusCounts)||void 0===s?void 0:s.find((s=>s.status===e));return void 0!==l?null===l||void 0===l?void 0:l.count:0},T=e=>{if(e===c.Js||e===c.GD||e===c.IZ){var s;let e=null===a||void 0===a||null===(s=a.accountStatusCounts)||void 0===s?void 0:s.filter((e=>e.status===c.GD||e.status===c.Js||e.status===c.IZ));if(void 0!==e&&e.length>0){let s=0;for(let a=0;a<e.length;a++)s+=e[a].count;return s}return 0}{var l;let s=null===a||void 0===a||null===(l=a.accountStatusCounts)||void 0===l?void 0:l.find((s=>s.status===e));return void 0!==s?null===s||void 0===s?void 0:s.count:0}},I=e=>{var s;let l=null===a||void 0===a||null===(s=a.datasetsStatusCounts)||void 0===s?void 0:s.find((s=>s.status===e));return void 0!==l?null===l||void 0===l?void 0:l.count:0},k=e=>{var s;let l=null===a||void 0===a||null===(s=a.dsaStatusCounts)||void 0===s?void 0:s.find((s=>s.status===e));return void 0!==l?null===l||void 0===l?void 0:l.count:0},F=()=>(0,p.jsxs)(t.A,{children:[(0,p.jsx)(r.TW,{className:"w-100",children:(0,p.jsx)(y,{className:"mt-3 mb-3",children:"Current Activity"})}),(0,p.jsx)(r.TW,{className:"w-100",children:(0,p.jsx)(t.A,{className:"mt-2 mb-3",lg:8,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:1,children:(0,p.jsx)("span",{id:"dashboardCircle",children:null===a||void 0===a?void 0:a.activeUsers.length})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsx)("span",{className:"dashboard-admin",children:"Users Logged in "}),(0,p.jsx)(v.N_,{to:"",onClick:e=>D(e),children:"View Accounts"})]})]})})})]}),q=()=>(0,p.jsxs)(t.A,{children:[(0,p.jsx)(r.TW,{className:"w-100  ",children:(0,p.jsx)(y,{className:"mt-2 mb-3",children:"Support Tickets Overview"})}),(0,p.jsxs)(r.TW,{className:"w-100 ",children:[(0,p.jsx)(t.A,{className:"mt-2 mb-3 ",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/partial_clock_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"justify-content-center",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[C(c.vP)," Tickets Awaiting "]}),(0,p.jsx)(S,{to:m.o+"admin/tickets/OPEN",children:"View Tickets"})]})]})}),(0,p.jsx)(t.A,{className:"mt-2 mb-3 ",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"b",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/incomplete_yellow_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"justify-content-center",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[C(c.mS)," Tickets In Progress "]}),(0,p.jsx)(S,{to:m.o+"admin/tickets/IN_PROGRESS",children:"View Tickets"})]})]})}),(0,p.jsx)(t.A,{className:"mt-2 mb-3 ",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/complete_check_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"justify-content-center",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[C(c.V)," Tickets Closed "]}),(0,p.jsx)(S,{to:m.o+"admin/tickets/CLOSED",children:"View Tickets"})]})]})})]})]}),R=()=>(0,p.jsxs)(t.A,{children:[(0,p.jsx)(r.TW,{className:"w-100  ",children:(0,p.jsx)(y,{className:"mt-2 mb-3",children:"Account Overview"})}),(0,p.jsxs)(r.TW,{className:"w-100",children:[(0,p.jsx)(t.A,{className:"mt-1 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/partial_clock_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[T(c.Js)," Requests Awaiting "]}),(0,p.jsx)(S,{to:m.o+"admin/request/users/NEW",children:"View Requests"})]})]})}),(0,p.jsx)(t.A,{className:"mt-1 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/complete_check_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[" ",T(c.Ek)," Active Accounts "]}),(0,p.jsx)(S,{to:m.o+"admin/request/users/APPROVED",children:"View Requests"})]})]})}),(0,p.jsx)(t.A,{className:"mt-1 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center mb-2",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/incomplete_X_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[" ",T(c.Rt)," Requests Declined "]}),(0,p.jsx)(S,{to:m.o+"admin/request/users/DECLINED",children:"View Requests"})]})]})})]})]}),V=()=>(0,p.jsxs)(t.A,{children:[(0,p.jsx)(r.TW,{className:"w-100  ",children:(0,p.jsx)(y,{className:"mt-2 mb-3",children:"Dataset Overview"})}),(0,p.jsxs)(r.TW,{className:"w-100 ",children:[(0,p.jsx)(t.A,{className:"mt-1 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/partial_clock_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[I(c.QQ)," Requests Awaiting "]}),(0,p.jsx)(S,{to:m.o+"admin/request/datasets/PENDING",children:"View Requests"})]})]})}),(0,p.jsx)(t.A,{className:"mt-1 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/complete_check_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[" ",I(c.Ek)," Datasets Completed "]}),(0,p.jsx)(S,{to:m.o+"admin/request/datasets/APPROVED",children:"View Datasets"})]})]})}),(0,p.jsx)(t.A,{className:"mt-1 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/incomplete_X_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[" ",I(c.Rt)," Datasets Declined "]}),(0,p.jsx)(S,{to:m.o+"admin/request/datasets/DECLINED",children:"View Datasets"})]})]})})]})]}),U=()=>(0,p.jsxs)(t.A,{children:[(0,p.jsx)(r.TW,{className:"w-100  ",children:(0,p.jsx)(y,{className:"mt-1 mb-3",children:"NCI Requests Overview"})}),(0,p.jsx)(r.TW,{className:"w-100 ",children:(0,p.jsx)(t.A,{className:"mt-2 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/partial_clock_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[null===a||void 0===a?void 0:a.nciRequestsCounts," NCI Requests "]}),(0,p.jsx)(S,{to:m.o+"admin/nci/getRequestsByUser",children:"View Requests"})]})]})})})]}),P=()=>(0,p.jsxs)(t.A,{children:[(0,p.jsx)(r.TW,{className:"w-100  ",children:(0,p.jsx)(y,{className:"mt-1 mb-3",children:"Data Share Agreement Overview"})}),(0,p.jsxs)(r.TW,{className:"w-100 ",children:[(0,p.jsx)(t.A,{className:"mt-2 mb-3",lg:4,children:(0,p.jsxs)(r.TW,{className:"align-items-center ",children:[(0,p.jsx)(t.A,{className:"",lg:2,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/partial_clock_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[" ",k(c.QQ)," Requests Awaiting "]}),(0,p.jsx)(S,{to:m.o+"admin/request/dsa/NEW",children:"View Requests"})]})]})}),(0,p.jsx)(t.A,{className:"mt-2 mb-3",lg:8,children:(0,p.jsxs)(r.TW,{className:"align-items-center mb-2",children:[(0,p.jsx)(t.A,{className:"",lg:1,children:(0,p.jsx)("img",{className:"text-center",src:"/images/icons/complete_check_48.png",alt:"Waiting icon",width:"48",height:"48"})}),(0,p.jsxs)(t.A,{className:"",children:[(0,p.jsxs)("span",{className:"dashboard-admin",children:[" ",k(c.Ek)," Data Share Agreements Completed "]}),(0,p.jsx)(S,{to:m.o+"admin/request/dsa/APPROVED",children:"View Data Share Agreements"})]})]})})]})]});return(0,p.jsxs)(n.A,{className:"w-100 ",fluid:!0,children:[(0,p.jsx)(g,{show:o,showHide:D}),(0,p.jsxs)(r.NE,{name:"content-page",children:[(0,p.jsx)(b,{children:(0,p.jsxs)(n.A,{children:[(0,p.jsx)(S,{to:m.o+"admin/reporting",children:"Reporting"}),s.pdsGroup===f.Z.Admin?(0,p.jsx)(S,{to:m.o+"admin/system",children:"System"}):null,(0,p.jsx)(S,{to:m.o+"admin/publications",children:"Publications"}),(0,p.jsx)(S,{to:m.o+"admin/announcements",children:"Announcements"}),(0,p.jsx)(S,{to:m.o+"admin/siteMessages/ACTIVE",children:"Site Messages"}),(0,p.jsx)(S,{to:m.o+"admin/additionalResources/ACTIVE",children:"Additional Resources"}),(0,p.jsx)(S,{to:m.o+"admin/platformAnnouncement",children:"Platform Announcements"})]})}),(0,p.jsxs)(r.ff,{name:"page-wrapper ",children:[x&&(0,p.jsx)(i.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,p.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),j&&(0,p.jsx)(r.UQ,{children:null===(e=j.response)||void 0===e?void 0:e.data.detail}),a&&(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(t.A,{className:"",children:[F(),(0,p.jsx)(w,{}),q(),(0,p.jsx)(w,{}),R(),(0,p.jsx)(w,{}),V(),(0,p.jsx)(w,{}),U(),(0,p.jsx)(w,{}),P()]})})]})]})]})}},4785(e,s,a){a.d(s,{AdminTicketAction:()=>N});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(8365),c=a(7860),m=a(4524),u=a(4515),h=a(7272),x=a(8159),j=a(6280),p=a(8819),g=a(687),v=a(213),A=a(5678);const N=()=>{const{ticketUuid:e,requestType:s}=(0,m.g)(),[a,N]=(0,l.useState)(!1),f="https://data.projectdatasphere.org//api/user/tickets/processTicket/"+e,[y,b]=(0,l.useState)(),[w,S]=(0,l.useState)(""),[D,C]=(0,l.useState)(""),[T,I]=(0,l.useState)(!1),k=(0,m.Zp
145)(),F=(0,l.useRef)(null),{data:q,loading:R,error:V}=(0,g.c)(f);(0,l.useEffect)((()=>{N(!0)}),[]),(0,l.useMemo)((()=>{null!==q&&(s===c.vP&&S(c.su),C(""),b(q))}),[q]);const U=()=>{let e;return e=s===c.vP?"Other"===(null===q||void 0===q?void 0:q.contactUs.subject)&&"Disabled Account"===q.contactUs.subjectOther?c.zV:c.GB:s===c.V?c.BR:c.nb,e.map((e=>(0,A.jsx)("option",{value:e.value,children:e.label},e.id)))},P=()=>(0,A.jsxs)(i.A,{className:"form-layout",onSubmit:a=>(async a=>{var l;a.preventDefault(),I(!0);const n="https://data.projectdatasphere.org//api/admin/tickets/ticketEvent/"+e,{data:t,error:i}=await(0,v.Yz)(n,JSON.stringify({event:w,comment:(0,p.a8)(null===F||void 0===F||null===(l=F.current)||void 0===l?void 0:l.getData())}));if(null!==t)k(x.o+"admin/tickets/"+s);else if(i){var r;console.error(null===(r=i.response)||void 0===r?void 0:r.data.detail)}I(!1)})(a),noValidate:!0,children:[(0,A.jsx)(o.$8,{className:"mx-auto",lg:12,children:(0,A.jsxs)(o.$8,{className:"me-5 ",lg:8,children:[(0,A.jsx)(r.A,{className:" mt-3 mb-3 w-100",children:(0,A.jsxs)(i.A.Group,{as:n.A,lg:6,controlId:"formAction",children:[(0,A.jsx)(i.A.Label,{className:"required",column:"sm",children:"Actions "}),(0,A.jsx)(i.A.Select,{size:"sm",name:"action",value:w,onChange:e=>{var s;S(e.target.value),(s=e.target.value)===c.u_?C("This is spam and will be close without notification or email sent."):C(""),S(s)},children:U()})]})}),(0,A.jsx)(r.A,{className:"mt-3 mb-5 ",children:(0,A.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formComments",children:[(0,A.jsx)(o.AK,{children:(0,A.jsx)(i.A.Label,{className:"",column:"sm",children:"Comments "})}),(0,A.jsx)(h.b,{reference:F,editorLoaded:a,disabled:!1,name:"comment",value:D})]})})]})}),(0,A.jsx)(u.E,{enableClear:!1,submitButtonText:c.XD,isSubmitting:T})]});return(0,A.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,A.jsx)(o.NE,{name:"content-page",children:(0,A.jsx)(o.ff,{name:"page-wrapper",children:(0,A.jsxs)(o.$8,{children:[R&&(0,A.jsx)(d.A,{className:"spinner-center",animation:"border",role:"status",children:(0,A.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),V&&(0,A.jsx)("p",{children:"Error"}),y&&(0,A.jsxs)(A.Fragment,{children:[P(),(0,A.jsx)(n.A,{children:(0,A.jsx)(j.h,{ticket:y})})]})]})})})})}},5059(e,s,a){a.d(s,{o:()=>r});a(8094);var l=a(9307),n=a(1506),t=a(5197),i=a(5678);const r=e=>{let{showUserFullName:s,userEmail:a,userPhone:r}=e;return(0,i.jsxs)(t.A,{className:"mt-3 mb-3  ",children:[(0,i.jsxs)(n.A.Group,{as:l.A,lg:4,controlId:"formName",children:[(0,i.jsx)(n.A.Label,{className:"bold-label",column:"sm",children:" Name "}),(0,i.jsx)(n.A.Control,{className:"read-only",size:"sm",name:"firstAndLast",type:"text",placeholder:"",disabled:!0,defaultValue:s}),(0,i.jsx)(n.A.Text,{className:"text-muted"})]}),(0,i.jsxs)(n.A.Group,{as:l.A,lg:5,className:"email",controlId:"formEmail",children:[(0,i.jsx)(n.A.Label,{className:"bold-label",column:"sm",children:"Email Address "}),(0,i.jsx)(n.A.Control,{className:"read-only",size:"sm",name:"email",type:"text",placeholder:"",disabled:!0,defaultValue:a}),(0,i.jsx)(n.A.Text,{className:"text-muted"})]}),(0,i.jsxs)(n.A.Group,{as:l.A,lg:3,controlId:"formPhone",children:[(0,i.jsx)(n.A.Label,{className:"bold-label",column:"sm",children:" Phone "}),(0,i.jsx)(n.A.Control,{size:"sm",name:"phone",type:"text",disabled:!0,defaultValue:r}),(0,i.jsx)(n.A.Text,{className:"text-muted"})]})]})}},5063(e,s,a){a.d(s,{G:()=>o});a(8094);var l=a(9307),n=a(1506),t=a(5197),i=a(2025),r=a(8365),d=a(5678);const o=e=>{let{fieldName:s,label:a,value:o,valueHandler:c,currentCharCount:m,maxTextAreaCount:u,countHandler:h,touched:x,errors:j,handleChange:p,disabled:g,formText:v}=e;return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(t.A,{className:"mt-3 mb-3 ",children:(0,d.jsxs)(n.A.Group,{as:l.A,lg:12,className:"",controlId:"",children:[(0,d.jsxs)(r.AK,{children:[(0,d.jsxs)(n.A.Label,{className:"required",column:"sm",children:[a," "]}),(0,d.jsxs)("span",{children:[m," of ",u," characters"]})]}),(0,d.jsx)(n.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:s,type:"text",value:o,disabled:g,maxLength:u,isValid:x.fieldName&&!j.fieldName,onChange:e=>{c(e.target.value),h(e.target.value.length),p(e)}}),null!=v&&(0,d.jsx)(n.A.Text,{id:"",muted:!0,children:v}),(0,d.jsx)(i.Kw,{name:s,render:e=>(0,d.jsx)("div",{className:"form-error-msg",children:e})})]})})})}},5089(e,s,a){a.d(s,{AdminNCIRequestsByUser:()=>N});var l=a(8094),n=a(9307),t=a(5197),i=a(7102),r=a(292),d=a(4091),o=a(5326),c=a(8159),m=a(8365),u=a(5678);const h=(0,d.Ay)(n.A)`
146    font-size: ${o.$N.px14};
147    color: ${o.lm.dark_grey_blue};
148    padding: .5% 0;
149    
150`,x=(0,d.Ay)(h)`
151    overflow-wrap: break-word;
152    
153`,j=(0,d.Ay)(n.A)`
154    font-size: ${o.$N.px14};
155    font-weight: bold;
156    color: ${o.lm.dark_grey_blue};
157    padding: 1% 0;
158`,p=(0,d.Ay)(j)`
159    padding-left: 20px !important;
160`,g=e=>{let{user:s}=e;const[a,i]=(0,l.useState)(!1),[r,d]=(0,l.useState)("/images/arrow_down.png"),o=e=>{if(void 0!==(null===e||void 0===e?void 0:e.userId))return(0,u.jsx)(m.Op,{to:c.o+"admin/userInfo/uuid/"+e.uuid,children:e.lastName+", "+e.firstName})},g=e=>{if(null!=(null===e||void 0===e?void 0:e.createdAt))return new Date(null===e||void 0===e?void 0:e.createdAt).toLocaleDateString("en-us",{day:"2-digit",month:"2-digit",year:"numeric"})},v=()=>{i(!a),d(a?"/images/arrow_down.png":"/images/arrow_up.png")};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(t.A,{className:"",children:[(0,u.jsxs)(h,{className:"ps-0 ",lg:6,children:[o(s),(0,u.jsx)("img",{onClick:()=>v(),src:r,className:"text-center",alt:"arrow"})]}),(0,u.jsx)(h,{className:"ps-0",lg:6,children:s.email})]})}),a&&(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(n.A,{className:"border-blue pb-1",children:[(0,u.jsxs)(t.A,{className:"w-100 pe-4 ps-4 ",children:[(0,u.jsx)(j,{className:"ps-0",lg:1,children:"Request ID"}),(0,u.jsx)(j,{className:"ps-0",lg:5,children:"Clinical Trials"}),(0,u.jsx)(p,{className:"ps-0",lg:2,children:"NCI Request"}),(0,u.jsx)(j,{className:"ps-0 ",lg:2,children:"Status"}),(0,u.jsx)(j,{className:"ps-0",lg:2,children:"Status Date"})]}),null===s||void 0===s?void 0:s.histories.map((e=>{return(0,u.jsxs)(t.A,{className:"w-100 pe-4 ps-4",children:[(0,u.jsx)(h,{className:"ps-3  ",lg:1,children:e.requestId}),(0,u.jsx)(x,{className:"ps-0",lg:5,children:(s=e.nctTrialNumbers,s.join(","))}),(0,u.jsx)(h,{className:"ps-0",lg:2,children:(0,u.jsx)(m.Op,{to:c.o+"nciRequest/"+e.requestId,children:"View NCI Request"})}),(0,u.jsx)(h,{className:"ps-2",lg:4,children:e.statusAndDate.map((e=>(e=>(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(t.A,{className:"",children:[(0,u.jsx)(h,{className:"ps-0 ",lg:6,children:e.status}),(0,u.jsx)(h,{className:"ps-0",lg:6,children:g(e)})]})}))(e)))})]});var s}))]})})]})};var v=a(687);const A=(0,d.Ay)(n.A)`
161    font-size: ${o.$N.px14};
162    font-weight: bold;
163    color: ${o.lm.dark_grey_blue};
164    padding: 1% 0;
165`,N=()=>{var e,s;const[a,d]=(0,l.useState)([]),{data:o,loading:c,error:h}=(0,v.c)("https://data.projectdatasphere.org//api/admin/nci/getRequestsByUser");(0,l.useMemo)((()=>{null!=o&&d(o)}),[o]);return(0,u.jsxs)(i.A,{className:"",children:[c&&(0,u.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,u.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),h&&(0,u.jsxs)(m.UQ,{children:["Error - ",null===h||void 0===h||null===(e=h.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),o&&(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(n.A,{className:"pe-0",children:[(0,u.jsxs)(t.A,{children:[(0,u.jsx)(A,{lg:6,children:"Name"}),(0,u.jsx)(A,{lg:6,children:"Email"})]}),null===a||void 0===a?void 0:a.map((e=>(0,u.jsx)(g,{user:e})))]})})]})}},5363(e,s,a){a.d(s,{d:()=>N});var l=a(8094),n=a(9307),t=a(5197),i=a(3841),r=a(3849),d=a(8365),o=a(4091),c=a(5326),m=a(5678);const u=(0,o.Ay)(n.A)`
166    font-size: ${c.$N.px16};
167    border: 1px solid ${c.lm.middle_grey};
168`,h=(0,o.Ay)(n.A)`
169    font-size: ${c.$N.px13};
170`,x=(0,o.Ay)(h)`
171    font-weight: bold;
172`,j=(0,o.Ay)(t.A)`
173    font-weight: bold;
174
175    span {
176        text-align: center;
177    }
178`,p=(0,o.Ay)(i.A)`
179    background-color: ${c.lm.turtle_green};
180    border-color: ${c.lm.turtle_green};
181    color: ${c.lm.white};
182    margin-bottom: 0.5rem;
183
184    &:hover {
185        background-color: ${c.lm.hover_green};
186        border-color: ${c.lm.hover_green};
187        color: ${c.lm.white};
188    }
189`,g=e=>{var s;let{userInfo:a,show:l,showHide:o,onEnableUser:c}=e;const g=(e,s)=>(0,m.jsxs)(t.A,{className:"w-100 pb-0",children:[(0,m.jsx)(n.A,{lg:5,className:"ps-4  ",children:e}),(0,m.jsx)(n.A,{lg:6,children:s})]});return(0,m.jsxs)(r.A,{show:l,children:[(0,m.jsx)(r.A.Header,{closeButton:!0,onClick:o,children:(0,m.jsx)(d.c7,{children:"User Information"})}),(0,m.jsxs)(r.A.Body,{children:[(0,m.jsxs)(u,{className:"mb-3",children:[g("Name:",null===a||void 0===a?void 0:a.name),g("Email:",null===a||void 0===a?void 0:a.email),g("Role:",null===a||void 0===a?void 0:a.role),g("AD User Id:",null===a||void 0===a?void 0:a.adUserId),(()=>{var e;const s="disabled"===(null===a||void 0===a||null===(e=a.adStatus)||void 0===e?void 0:e.toLowerCase());return(0,m.jsxs)(t.A,{className:"w-100 pb-0",children:[(0,m.jsx)(n.A,{lg:5,className:"ps-4",children:"AD User Status:"}),(0,m.jsx)(n.A,{lg:4,children:null===a||void 0===a?void 0:a.adStatus}),s&&c&&(0,m.jsx)(n.A,{lg:3,children:(0,m.jsx)(p,{size:"sm",onClick:c,children:"Enable"})})]})})()]}),(0,m.jsxs)(u,{className:"mb-3",children:[(()=>{var e;return null!==a&&void 0!==a&&null!==(e=a.userLogins)&&void 0!==e&&e.length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(j,{className:"mt-3 w-100 text-center",children:(0,m.jsx)("span",{children:"Last 5 Logins"})}),(0,m.jsxs)(t.A,{className:"mt-3 w-100",children:[(0,m.jsx)(x,{lg:6,className:"ps-4 ",children:"Login time"}),(0,m.jsx)(x,{lg:3,children:"Browser"}),(0,m.jsx)(x,{lg:3,children:"OS"})]})]}):(0,m.jsx)(j,{className:"mt-3 w-100 text-center",children:(0,m.jsx)("span",{children:"No Logins for this user"})})})(),null===a||void 0===a||null===(s=a.userLogins)||void 0===s?void 0:s.map((e=>(0,m.jsxs)(t.A,{className:"mt-1 w-100",children:[(0,m.jsx)(h,{lg:6,className:"ps-4 ",children:new Date(e.sessionStart).toLocaleDateString("en-us",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"})}),(0,m.jsx)(h,{lg:3,children:e.browserName}),(0,m.jsx)(h,{lg:3,children:e.os})]})))]})]}),(0,m.jsx)(r.A.Footer,{children:(0,m.jsx)(i.A,{variant:"primary",onClick:o,children:"Close"})})]})};var v=a(9052),A=a(213);const N=e=>{let{userUuid:s}=e;
189const[a,n]=(0,l.useState)(!1),[t,i]=(0,l.useState)(!1),[r,d]=(0,l.useState)(),o=()=>{n(!a)},c=()=>{i(!t)},u=async()=>{const e="https://data.projectdatasphere.org//api/admin/users/userLoginsInfo/"+s,{data:a,error:l}=await(0,A.gZ)(e);null!==a?(d(a),n(!0)):l&&i(!0)},h=async()=>{const e="https://data.projectdatasphere.org//api/admin/users/enable/"+s,{data:a,error:l}=await(0,A.r8)(e,null);null!==a?await u():l&&i(!0)};return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(g,{userInfo:r,show:a,showHide:o,onEnableUser:h}),(0,m.jsx)(v.x,{message:"User not in Active Directory",show:t,showHide:c}),(0,m.jsx)("img",{onClick:()=>u(),src:"/images/icons/more_info.png",className:"text-center",alt:"User Info"})]})})}},5759(e,s,a){a.d(s,{AdminDatasetInfo:()=>F});var l=a(8094),n=a(4524),t=a(7102),i=a(292),r=a(8365),d=a(7860),o=a(5059),c=a(1506),m=a(5197),u=a(9307),h=a(2025),x=a(7714),j=a(4091),p=a(5326),g=a(5678);const v=j.Ay.div`
190   width: 100%;
191   margin-left: 0;
192   margin-right: 0;    
193   padding-top: 0;
194   background-color: ${p.lm.light_grey};  
195        
196   @media (min-width: 768px){         
197     width: 100%;    
198    display: flex;
199    flex-direction: row;
200    align-items: center;
201    justify-content: center;
202    margin: 0;
203    height: 75px;
204   
205    padding-top: 2%;
206    
207   } 
208
209`,A=j.Ay.div`
210  max-width:  ${p.F0.MAX_WIDTH}; 
211    width: 100%;
212    height: 100%;
213    display: flex;
214    flex-direction: row;
215    justify-content: flex-end;
216    align-items: center;
217    padding-right: 0;
218    padding-left: 0;
219    padding-bottom: 1%; 
220`,N=(0,j.Ay)(u.A)` 
221    margin: 0 auto; 
222    background-color: ${p.lm.light_grey};
223`,f=(0,j.Ay)(r.Tf)`
224    color: ${p.lm.dark_grey_blue}; 
225    background-color: ${p.lm.white};
226   
227
228    :hover {
229      background-color: ${p.lm.white};
230      color: ${p.lm.dark_grey_blue};
231    }
232`,y=(0,j.Ay)(r.$8)`
233    background-color: ${p.lm.light_grey};
234    margin: 0 auto;
235`,b=j.Ay.div`
236      display:flex;           
237      justify-content: space-between;
238      padding-bottom: 3%;     
239      padding-top: 0;
240      padding-right: 6%; 
241      width: 85%;
242`,w=e=>{let{toggleMethod:s}=e;return(0,g.jsx)(N,{lg:12,children:(0,g.jsx)(N,{className:" mb-5 ",lg:8,children:(0,g.jsx)(m.A,{className:"w-100",children:(0,g.jsx)(y,{className:"mx-auto",children:(0,g.jsx)(v,{className:" ",children:(0,g.jsx)(A,{className:"",children:(0,g.jsxs)(b,{className:"",children:[(0,g.jsx)(f,{onClick:s,variant:"outline-light",className:"btn-submit  ",type:"button",children:"Cancel"}),(0,g.jsx)(r.WJ,{variant:"success",className:" pe-5 btn-submit",type:"submit",children:"Submit"})]})})})})})})})};var S=a(213);const D=e=>{let{label:s,fieldName:a,donationUuid:n,initialValue:i,adminEditForm:d}=e;const[o,j]=(0,l.useState)(!1),[p,v]=(0,l.useState)(d),[A,N]=(0,l.useState)(0),[f,y]=(0,l.useState)(""),[b,D]=(0,l.useState)(i),[C,T]=(0,l.useState)(),I=()=>{j(!o)};(0,l.useMemo)((()=>{v(d)}),[d]);const k=x.Ik().shape({comments:x.Yj().required("Please enter comments"),singleValue:x.Yj().required("Please enter a value")});return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,g.jsx)(r.NE,{name:"content-page",children:(0,g.jsxs)(r.ff,{name:"page-wrapper",children:[(0,g.jsx)(m.A,{children:(0,g.jsx)(r.UQ,{children:C})}),(0,g.jsx)(u.A,{md:10,lg:12,name:"shareDataColumn",children:(0,g.jsx)(h.l1,{enableReinitialize:!0,validationSchema:k,onSubmit:async e=>{const s="https://data.projectdatasphere.org//api/admin/adminEdit/updateFieldValue/"+n,{data:l,error:t}=await(0,S.Yz)(s,JSON.stringify({fieldName:a,singleValue:b,comments:f}));if(null!==l)await(async()=>{const{data:e,error:s}=await(0,S.Yz)("https://data.projectdatasphere.org//api/admin/adminEdit/logEntry",JSON.stringify({fieldName:a,donationUuid:n,oldValue:i,newValue:b,comments:f}));if(null!==e)j(!1);else if(s){var l;T(null===(l=s.response)||void 0===l?void 0:l.data.detail)}})();else if(t){var r;T(null===(r=t.response)||void 0===r?void 0:r.data.detail)}},initialValues:{fieldName:a,singleValue:i,comments:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:a,handleChange:l,touched:n,errors:t}=e;return(0,g.jsx)(c.A,{className:"form-layout",onSubmit:a,noValidate:!0,children:(0,g.jsxs)(m.A,{className:"mt-3 mb-3  ",children:[o&&p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.cZ,{className:"w-100 ps-3 pe-3",children:(0,g.jsxs)(c.A.Group,{as:u.A,lg:8,controlId:"",children:[(0,g.jsxs)(c.A.Label,{className:"required",column:"sm",children:[s," "]}),(0,g.jsx)(c.A.Control,{size:"sm",required:!0,name:"singleValue",type:"text",value:b,isValid:n.singleValue&&!t.singleValue,onChange:e=>{D(e.target.value),l(e)}}),(0,g.jsx)(c.A.Text,{className:"text-muted"}),(0,g.jsx)(h.Kw,{name:"singleValue",render:e=>(0,g.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,g.jsx)(r.cZ,{className:" pb-3 ps-3 pe-3",children:(0,g.jsxs)(c.A.Group,{as:u.A,controlId:"",children:[(0,g.jsx)(r.AK,{children:(0,g.jsx)(c.A.Label,{className:"required",column:"sm",children:"Comments "})}),(0,g.jsx)(c.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"comments",type:"text",value:f,isValid:n.
242comments&&!t.comments,onChange:e=>{y(e.target.value),N(e.target.value.length),l(e)}}),(0,g.jsx)(h.Kw,{name:"comments",render:e=>(0,g.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,g.jsx)(w,{toggleMethod:I})]}),!o&&(0,g.jsxs)(r.Ap,{className:" mb-4",children:[(0,g.jsxs)(r.s3,{children:[(0,g.jsx)("span",{className:"bold",children:s}),p&&(0,g.jsx)("button",{onClick:I,className:"btn btn-link select-files-link",children:"edit"})]}),(0,g.jsx)(r.s3,{children:(0,g.jsx)("span",{children:b||i})})]})]})})}})})]})})})})},C=e=>{let{trialStartYear:s,trialEndYear:a}=e;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(m.A,{className:"mt-3 mb-3 ",children:[(0,g.jsxs)(c.A.Group,{as:u.A,lg:6,controlId:"formTrialStartYear",children:[(0,g.jsx)(c.A.Label,{className:"bold",column:"sm",children:" Start Year"}),(0,g.jsx)(c.A.Control,{size:"sm",name:"trialStartYear",type:"text",defaultValue:s,disabled:!0})]}),(0,g.jsxs)(c.A.Group,{as:u.A,lg:6,controlId:"formTrialEndYear",children:[(0,g.jsx)(c.A.Label,{className:"bold",column:"sm",children:" End Year"}),(0,g.jsx)(c.A.Control,{size:"sm",name:"trialEndYear",type:"text",defaultValue:a,disabled:!0})]})]})})},T=e=>{let{label:s,fieldName:a,donationUuid:n,initialValues:i,listValues:o,otherFieldName:j,otherValue:p,adminEditForm:v}=e;const[A,N]=(0,l.useState)(!1),[f,y]=(0,l.useState)(v),[b,D]=(0,l.useState)(0),[C,T]=(0,l.useState)(i),[I,k]=(0,l.useState)(""),[F,q]=(0,l.useState)(""),[R,V]=(0,l.useState)(!1),[U,P]=(0,l.useState)(),E=()=>{if(C.length>0){const e=[...C];return p&&e.push(p),e.join(", ")}return""};(0,l.useMemo)((()=>{y(v),i.includes(d.NZ)&&(V(!0),k(null!=p?p:""))}),[v]);const L=()=>{N(!A)},O=()=>{if(C.length)return E();if(i.length>0){const e=[...i];return p&&e.push(p),e.join(", ")}return""},z=x.Ik().shape({comments:x.Yj().required("Please enter comments")});return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,g.jsx)(r.NE,{name:"content-page",children:(0,g.jsxs)(r.ff,{name:"page-wrapper",children:[(0,g.jsx)(m.A,{children:(0,g.jsx)(r.UQ,{children:U})}),(0,g.jsx)(u.A,{md:10,lg:12,name:"shareDataColumn",children:(0,g.jsx)(h.l1,{enableReinitialize:!0,validationSchema:z,onSubmit:async e=>{const s="https://data.projectdatasphere.org//api/admin/adminEdit/updateFieldValue/"+n,{data:l,error:t}=await(0,S.Yz)(s,JSON.stringify({fieldName:a,multipleTypeOther:I,multipleValues:C,comments:F}));if(null!==l)await(async()=>{const{data:e,error:s}=await(0,S.Yz)("https://data.projectdatasphere.org//api/admin/adminEdit/logEntry",JSON.stringify({fieldName:a,donationUuid:n,oldValue:O(),newValue:E(),comments:F}));if(null!==e)N(!1);else if(s){var l;P(null===(l=s.response)||void 0===l?void 0:l.data.detail)}})();else if(t){var i;P(null===(i=t.response)||void 0===i?void 0:i.data.detail)}L()},initialValues:{fieldName:a,multipleValues:i,multipleTypeOther:I,otherFieldName:"",comments:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:a,handleChange:l,touched:n,errors:t}=e;return(0,g.jsx)(c.A,{className:"form-layout",onSubmit:a,noValidate:!0,children:(0,g.jsxs)(m.A,{className:"mt-3 ",children:[A&&f&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.cZ,{className:"w-100 ps-3 pe-3",children:(0,g.jsxs)(c.A.Group,{as:u.A,lg:6,className:"tumorType",controlId:"",children:[(0,g.jsxs)(c.A.Label,{className:"required",column:"sm",children:[s," "]}),(0,g.jsx)(c.A.Select,{size:"sm",required:!0,multiple:!0,name:"multipleValues",value:C,isValid:n.multipleValues&&!t.multipleValues,onChange:e=>{const s=e.target.options;let a=[];for(let l=0,n=s.length;l<n;l++)s[l].selected&&a.push(s[l].value);T(a),(e=>{e.includes(d.NZ)?V(!0):R&&V(!1)})(a),l(e)},children:(i=o,i.map((e=>(0,g.jsx)("option",{value:e.value,children:e.label},e.id))))}),(0,g.jsx)(c.A.Text,{id:"tumorTypesHelpBlock",muted:!0,children:"Ctrl + click to select multiple"}),(0,g.jsx)(h.Kw,{name:"multipleValues",render:e=>(0,g.jsx)("div",{className:"form-error-msg",children:e})})]})}),(C.includes(d.NZ)&&null!=j&&null!=p||R)&&(0,g.jsx)(r.cZ,{className:"mt-3 mb-3 ",children:(0,g.jsxs)(c.A.Group,{as:u.A,lg:11,controlId:"",children:[(0,g.jsxs)(c.A.Label,{className:"required",column:"sm",children:[j,"(multiple entries include ',') "]}),(0,g.jsx)(c.A.Control,{size:"sm",required:!0,name:j,type:"text",value:I,isValid:n.otherFieldName&&!t.otherFieldName,onChange:e=>{var s;s=e.target.value,k(s),l(e)}}),(0,g.jsx)(c.A.Text,{className:"text-muted"}),(0,g.jsx)(h.Kw,{name:j,render:e=>(0,g.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,g.jsx)(r.cZ,{className:" pb-3 ps-3  pe-3",children:(0,g.jsxs)(c.A.Group,{as:u.A,controlId:"",children:[(0,g.jsx)(r.AK,{children:(0,g.jsx)(c.A.Label,{className:"required",column:"sm",children:"Comments "})}),(0,g.jsx)(c.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"comments",type:"text",value:F,isValid:n.
242comments&&!t.comments,onChange:e=>{q(e.target.value),D(e.target.value.length),l(e)}}),(0,g.jsx)(h.Kw,{name:"comments",render:e=>(0,g.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,g.jsx)(w,{toggleMethod:L})]}),!A&&(0,g.jsxs)(r.Ap,{className:" mb-4",children:[(0,g.jsxs)(r.s3,{children:[(0,g.jsx)("span",{className:"bold",children:s}),f&&(0,g.jsx)("button",{onClick:L,className:"btn btn-link select-files-link",children:"edit"})]}),(0,g.jsx)(r.s3,{children:(0,g.jsx)("span",{children:O()})})]})]})});var i}})})]})})})})},I=e=>{let{fieldlabel1:s,fieldName1:a,fieldValue1:l,fieldlabel2:n,fieldName2:t,fieldValue2:i,fieldlabel3:r,fieldName3:d,fieldValue3:o}=e;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(m.A,{className:"mt-3 mb-5 ",children:[(0,g.jsx)(m.A,{className:"mt-3  ",children:(0,g.jsxs)(c.A.Group,{as:u.A,children:[(0,g.jsxs)(c.A.Label,{className:"bold",column:"sm",children:[s," "]}),(0,g.jsx)(c.A.Control,{size:"sm",name:a,type:"text",defaultValue:l,disabled:!0})]})}),null!=i&&(0,g.jsx)(m.A,{className:"mt-3 ",children:(0,g.jsxs)(c.A.Group,{as:u.A,children:[(0,g.jsxs)(c.A.Label,{className:"bold",column:"sm",children:[n," "]}),(0,g.jsx)(c.A.Control,{size:"sm",name:t,type:"text",defaultValue:i,disabled:!0})]})}),null!=o&&(0,g.jsx)(m.A,{className:"mt-3 ",children:(0,g.jsxs)(c.A.Group,{as:u.A,children:[(0,g.jsxs)(c.A.Label,{className:"bold",column:"sm",children:[r," "]}),(0,g.jsx)(c.A.Control,{size:"sm",name:d,type:"text",defaultValue:o,disabled:!0})]})})]})})};var k=a(687);const F=()=>{var e,s;const{uuid:a}=(0,n.g)(),[c,m]=(0,l.useState)(),[u,h]=(0,l.useState)(!1),[x,j]=(0,l.useState)(!1),[p,v]=(0,l.useState)(!1),[A,N]=(0,l.useState)(!1),[f,y]=(0,l.useState)(!1),[b,w]=(0,l.useState)(""),S="https://data.projectdatasphere.org//api/admin/donations/metadata/"+a,{data:F,loading:q,error:R}=(0,k.c)(S);(0,l.useMemo)((()=>{null!=F&&m(F)}),[F]),(0,l.useMemo)((()=>{if(null!=c){var e,s,a,l,n,t,i;if(c.dataShareAgreement.dataTypes===d.KF)v(!0);else(null===(t=c.dataShareAgreement)||void 0===t?void 0:t.dataTypes)!==d.sV&&j(!0),(null===(i=c.dataShareAgreement)||void 0===i?void 0:i.dataTypes)!==d.QA&&h(!0);"Approved"===(null===(e=c.request)||void 0===e?void 0:e.requestStatus)&&N(!0),c.dataShareAgreement.workingTitle.includes("NCI DATA")&&y(!0),w((null===(s=c.user)||void 0===s||null===(a=s.userDetails)||void 0===a?void 0:a.first)+" "+(null===(l=c.user)||void 0===l||null===(n=l.userDetails)||void 0===n?void 0:n.last))}}),[c]);const V=()=>{var e,s,l,n;return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(r.$8,{className:"mt-5 mb-5 ",lg:12,children:(0,g.jsxs)(r.$8,{lg:8,className:"ps-3",children:[(0,g.jsx)(r.I3,{children:"User Information"}),(0,g.jsx)(o.o,{showUserFullName:b,userEmail:null===c||void 0===c||null===(e=c.user)||void 0===e||null===(s=e.userDetails)||void 0===s?void 0:s.email,userPhone:null===c||void 0===c||null===(l=c.user)||void 0===l||null===(n=l.userDetails)||void 0===n?void 0:n.phoneNumber}),(0,g.jsx)(D,{label:"Sponsor",fieldName:"sponsor",donationUuid:a,initialValue:null===c||void 0===c?void 0:c.sponsor,adminEditForm:A}),(0,g.jsx)(D,{label:"Data Provider",fieldName:"dataProvider",initialValue:null===c||void 0===c?void 0:c.dataProvider,donationUuid:a,adminEditForm:A}),!f&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.I3,{children:"Data Asset Information"}),(0,g.jsx)(D,{label:"Data Standard",fieldName:"dataType",donationUuid:a,initialValue:null===c||void 0===c?void 0:c.datasetType,adminEditForm:!1})]}),!p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.I3,{children:"CLINICALTRIAL.GOV Information"}),(0,g.jsx)(D,{label:"CLINICALTRIAL.GOV ID (multiple entries include ',')",fieldName:"clinicalGovId",donationUuid:a,initialValue:null===c||void 0===c?void 0:c.clinicalGovId,adminEditForm:!1})]}),p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.I3,{children:"Related Data Sources"}),(0,g.jsx)(D,{label:"Other RWD such as genomics this data can link to",fieldName:"relatedDataSources",donationUuid:a,initialValue:null===c||void 0===c?void 0:c.relatedDataSources,adminEditForm:!1})]})]})})})},U=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("hr",{}),(0,g.jsx)(r.$8,{className:"mt-5 mb-5  ",lg:12,children:(0,g.jsxs)(r.$8,{lg:8,className:"ps-3",children:[p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.I3,{children:"Data Collection Period"}),(0,g.jsx)(C,{trialStartYear:null===c||void 0===c?void 0:c.trialStartYear,trialEndYear:null===c||void 0===c?void 0:c.trialEndYear,adminEditForm:!1}),(0,g.jsx)(D,{label:"Outcome Measures",fieldName:"outcomeMeasures",initialValue:null===c||void 0===c?void 0:c.outcomeMeasures,donationUuid:a,adminEditForm:!1})]}),(0,g.jsx)(r.I3,{children:"Descriptive Information"}),p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(D,{label:"Trial or Data Collection Title",fieldName:"trialTitle",initialValue:null===c||void 0===c?void 0:c.title,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Data Summary and Conditions",fieldName:"trialSummary",initialValue:null===c||void 0===c?void 0:c.trialSummary,donationUuid:a,adminEditForm:!1})]}),(0,g.jsx)(D,{label:"Data Summary",fieldName:"dataSummary",initialValue:null===c||void 0===c?void 0:c.dataSummary,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Objectives",fieldName:"studyObjectives",initialValue:null===c||void 0===c?void 0:c.studyObjectives,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(r.I3,{children:"Design Information"}),(0,g.jsx)(D,{label:p?"Total Patients":"Total Study Enrolled Patients",fieldName:"sampleSize",initialValue:null===c||void 0===c?void 0:c.sampleSize,donationUuid:a,adminEditForm:!1}),u&&!f&&(0,g.jsx)(D,{label:"Comparator (Control) Arm Enrolled Patients",fieldName:"
242comparatorArmPatients",initialValue:null===c||void 0===c?void 0:c.comparatorArmPatients,donationUuid:a,adminEditForm:!1}),x&&!f&&(0,g.jsx)(D,{label:"Experimental (Active) Arm Enrolled Patients",fieldName:"activeArmPatients",initialValue:null===c||void 0===c?void 0:c.activeArmPatients,donationUuid:a,adminEditForm:!1}),p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(D,{label:"Population Grouping or Subsets By",fieldName:"populationGrouping",initialValue:null===c||void 0===c?void 0:c.populationGrouping,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Single or Multi-institutional Sites",fieldName:"institutionalSites",initialValue:null===c||void 0===c?void 0:c.institutionalSites,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Instrument or Data Collection",fieldName:"dataCollection",initialValue:null===c||void 0===c?void 0:c.dataCollection,donationUuid:a,adminEditForm:!1})]}),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(T,{label:"Study Phase(s)",fieldName:"studyPhases",initialValues:null==(null===c||void 0===c?void 0:c.studyType)?[]:null===c||void 0===c?void 0:c.studyType,donationUuid:a,listValues:d.lp,adminEditForm:A}),(0,g.jsx)(T,{label:"Tumor Type(s)",fieldName:"tumorTypes",initialValues:null==(null===c||void 0===c?void 0:c.tumorType)?[]:null===c||void 0===c?void 0:c.tumorType,donationUuid:a,listValues:d.iV,otherFieldName:"tumorTypeOther",otherValue:null===c||void 0===c?void 0:c.tumorTypeOther,adminEditForm:A})]}),p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(D,{label:"Region(s)",fieldName:"region",initialValue:null==(null===c||void 0===c?void 0:c.region)?[]:null===c||void 0===c?void 0:c.region.join(","),donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Age Range(s)",fieldName:"ageRange",initialValue:null==(null===c||void 0===c?void 0:c.ageRange)?[]:null===c||void 0===c?void 0:c.ageRange.join(","),donationUuid:a,adminEditForm:!1})]})]})})]}),P=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("hr",{}),(0,g.jsx)(r.$8,{className:"mt-5 mb-5  ",lg:12,children:(0,g.jsxs)(r.$8,{lg:8,className:"ps-3",children:[(0,g.jsx)(r.I3,{children:"Design Information"}),(0,g.jsx)(T,{label:"Study Phase(s)",fieldName:"studyPhases",initialValues:null==(null===c||void 0===c?void 0:c.studyType)?[]:null===c||void 0===c?void 0:c.studyType,donationUuid:a,listValues:d.lp,adminEditForm:A}),(0,g.jsx)(T,{label:"Tumor Type(s)",fieldName:"tumorTypes",initialValues:null==(null===c||void 0===c?void 0:c.tumorType)?[]:null===c||void 0===c?void 0:c.tumorType,donationUuid:a,listValues:d.iV,otherFieldName:"tumorTypeOther",otherValue:null===c||void 0===c?void 0:c.tumorTypeOther,adminEditForm:A})]})})]}),E=()=>{var e,s,l,n,t,i,d,o,m,u,h,x;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("hr",{}),(0,g.jsx)(r.$8,{className:"mt-5 mb-5",lg:12,children:(0,g.jsxs)(r.$8,{lg:8,className:"ps-3",children:[(0,g.jsx)(D,{label:"Unique Patient Identifier",fieldName:"uniquePatientIdentifier",initialValue:null===c||void 0===c||null===(e=c.supplementalInformation)||void 0===e?void 0:e.uniquePatientIdentifier,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Date/Time Variables",fieldName:"dateTimeVars",initialValue:null===c||void 0===c||null===(s=c.supplementalInformation)||void 0===s?void 0:s.dateTimeVars,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(r.I3,{children:"Descriptive Information"}),(0,g.jsx)(D,{label:"Efficacy Endpoints",fieldName:"efficacyEndpoints",initialValue:null===c||void 0===c||null===(l=c.supplementalInformation)||void 0===l?void 0:l.efficacyEndpoints,donationUuid:a,adminEditForm:!1}),(0,g.jsx)(D,{label:"Domains and Variables",fieldName:"efficacyEndpointsDomainVars",initialValue:null===c||void 0===c||null===(n=c.supplementalInformation)||void 0===n?void 0:n.efficacyEndpointsDomainVars,donationUuid:a,adminEditForm:!1}),!p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(I,{fieldlabel1:"Was PRO data captured as part of this study?",fieldName1:"patientReportedOutcomesCaptured",fieldValue1:null===c||void 0===c||null===(t=c.supplementalInformation)||void 0===t?void 0:t.patientReportedOutcomesCaptured,fieldlabel2:"If yes, are you providing them as part of this upload?",fieldName2:"patientReportedOutcomesProvided",fieldValue2:null===c||void 0===c||null===(i=c.supplementalInformation)||void 0===i?void 0:i.patientReportedOutcomesProvided,fieldlabel3:"If yes, please indicate which file(s) contain the PRO data",fieldName3:"patientReportedOutcomesFiles",fieldValue3:null===c||void 0===c||null===(d=c.supplementalInformation)||void 0===d?void 0:d.patientReportedOutcomesFiles}),(0,g.jsx)(r.I3,{children:"Custom Formats and Patient Breakdown"}),(0,g.jsx)(I,{fieldlabel1:"Does this dataset use custom formats?",fieldName1:"customFormatsUsed",fieldValue1:null===c||void 0===c||null===(o=c.supplementalInformation)||void 0===o?void 0:o.customFormatsUsed,fieldlabel2:"If yes, is the dataset decoded (i.e. format built in)?",fieldName2:"customFormatsDataDecoded",fieldValue2:null===c||void 0===c||null===(m=c.supplementalInformation)||void 0===m?void 0:m.customFormatsDataDecoded,fieldlabel3:"If no, is the custom format being provided as part of this upload?",fieldName3:"customFormatsUploaded",fieldValue3:null===c||void 0===c||null===(u=c.supplementalInformation)||void 0===u?void 0:u.customFormatsUploaded}),(0,g.jsx)(D,{label:"Patient Breakdown",fieldName:"patientBreakdown",initialValue:null===c||void 0===c||null===(h=c.supplementalInformation)||void 0===h?void 0:h.patientBreakdown,donationUuid:a,adminEditForm:!1})]}),p&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(r.I3,{children:"Patient Breakdown"}),(0,g.jsx)(D,{label:"Patient Breakdown",fieldName:"patientBreakdown",initialValue:null===c||void 0===c||null===(x=c.supplementalInformation)||void 0===x?void 0:x.patientBreakdown,donationUuid:a,adminEditForm:!1})]})]})})]})};return(0,g.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,g.jsxs)(r.NE,{name:"content-page",children:[(0,g.jsx)(r.ff,{name:"page-wrapper"}),q&&(0,g.jsx)(i.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,g.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),R&&(0,g.jsxs)(r.UQ,{children:["Error - ",null===R||void 0===R||null===(e=R.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),c&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(r.$8,{lg:8,children:[V(),!f&&U(),f&&P(),!f&&E()]})})]})})}},5814(e,s,a){a.d(s,{AdminAdditionalResourceAction:()=>b});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(7714),c=a(2025),m=a(8365),u=a(7860),h=a(4524),x=a(8159),j=a(2876),p=a(5063),g=a(8064),v=a(4091),A=a(687),N=a(213),f=a(5678);const y=(0,v.Ay)(r.A)`
243    padding-left: 12px;
244`,b=()=>{var e,s;const{additionalResourceId:a}=(0,h.g)(),[v,b]=(0,l.useState)(""),[w,S]=(0,l.useState)(""),[D,C]=(0,l.useState)(""),[T,I]=(0,l.useState)(!1),[k,F]=(0,l.useState)(0),q=(0,h.Zp)(),R=(0,l.useRef)(null),[V,U]=(0,l.useState)(),[P,E]=(0,l.useState)(!1),[L,O]=(0,l.useState)(),z="https://data.projectdatasphere.org//api/admin/additionalResources/find/"+a,{data:$,loading:_,error:G}=(0,A.c)(z);(0,l.useMemo)((()=>{null!=$&&(b($.title),S($.url),C($.description),I($.visible),U($))}),[$]);const W=()=>{q(x.o+"admin/additionalResources/ACTIVE")},B=async e=>{E(!0);const{data:s,error:a}=await(0,N.Yz)("https://data.projectdatasphere.org//api/admin/additionalResources/addOrEditAdditionalResource",e);if(null!==s)E(!1),q(x.o+"admin/additionalResources/ACTIVE");else if(a){var l;E(!1),O(null===a||void 0===a||null===(l=a.response)||void 0===l?void 0:l.data.title)}},M=o.Ik().shape({title:o.Yj().required("Please enter a title."),url:o.Yj().required("Please enter a url."),description:o.Yj().required("Please enter a description.")}),Y=()=>(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(c.l1,{innerRef:R,enableReinitialize:!0,validationSchema:M,onSubmit:e=>{B(null!==a?JSON.stringify({id:a,title:e.title,url:e.url,description:e.description,visible:T}):JSON.stringify({title:e.title,url:e.url,description:e.description,visible:T}))},initialValues:{title:null!==v&&void 0!==v?v:"",url:null!==w&&void 0!==w?w:"",description:null!==D&&void 0!==D?D:"",visible:T},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,values:l,touched:t,errors:d}=e;return(0,f.jsxs)(i.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:[(0,f.jsx)(m.$8,{lg:12,children:(0,f.jsxs)(m.$8,{lg:8,children:[(0,f.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,f.jsx)(j.R,{fieldName:"title",label:"Resource Label",value:v,valueHandler:b,disabled:!1,touched:t,errors:d,size:12})}),(0,f.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,f.jsx)(j.R,{fieldName:"url",label:"URL",value:w,valueHandler:S,disabled:!1,touched:t,errors:d,size:12})}),(0,f.jsx)(r.A,{className:"mt-3 mb-3 justify-content-center",children:(0,f.jsx)(p.G,{fieldName:"description",label:"Description",value:D,valueHandler:C,currentCharCount:k,maxTextAreaCount:u.RN,countHandler:F,disabled:!1,touched:t,errors:d,handleChange:a})}),(0,f.jsx)(y,{className:"mt-3 mb-5  ",children:(0,f.jsx)(i.A.Group,{as:n.A,controlId:"",children:(0,f.jsx)(i.A.Check,{className:"bold_label",required:!0,type:"checkbox",disabled:!1,label:"Is visible",checked:l.visible,onChange:e=>{I(!T),a(e)}})})})]})}),(0,f.jsx)(g.T,{handleReset:W,isSubmitting:P,submitButtonText:u.XD})]})}})});return(0,f.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,f.jsx)(m.NE,{name:"content-page",children:(0,f.jsx)(m.ff,{name:"page-wrapper",children:(0,f.jsxs)(m.$8,{children:[null!=a&&(0,f.jsxs)(f.Fragment,{children:[_&&(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,f.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}),G&&(0,f.jsxs)(m.UQ,{children:["Error - ",null===G||void 0===G||null===(e=G.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),L&&(0,f.jsxs)(m.UQ,{children:["Error - ",L]}),$&&Y()]}),null==a&&Y()]})})})})}},5862(e,s,a){a.d(s,{P:()=>x});a(8094);var l=a(9307),n=a(7102),t=a(5197),i=a(4091),r=a(5326),d=a(8365),o=a(4524),c=a(8159),m=a(5678);const u=i.Ay.div`
245    display: flex;
246    flex-direction: column;
247    margin: 0;
248    padding: 0;
249    width: 100%;
250
251    span {
252        font-size: ${r.$N.px14};
253        font-weight: bold;
254    }
255`,h=(0,i.Ay)(t.A)`
256    font-weight: bold;
257    padding-bottom: 10px;
258    text-align: center;
259`,x=e=>{let{downloads:s,showDonationLink:a}=e;const i=e=>{let s=e.sasToolsContentFolder;return e.nci&&(s=e.contentFolder.substring(4)),"APPROVED"!==e.status.toUpperCase()&&(s+=" (removed)"),a&&"APPROVED"===e.status.toUpperCase()?(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(o.N_,{to:c.o+"content/"+e.uuid,children:s})}):(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("span",{children:s})})};return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(n.A,{className:"w-100 container-fluid",children:(0,m.jsx)(u,{children:null!==s&&void 0!==s&&s.donations&&s.donations.length>0?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(h,{children:(0,m.jsxs)("h3",{children:["Downloads ( ",s.username," )"]})}),(0,m.jsxs)(d.TW,{children:[(0,m.jsx)(d.nN,{className:"grid-header grid-entry space-2",children:"Contribution"}),(0,m.jsx)(d.nN,{className:"grid-header grid-entry space-2",children:"File name"}),(0,m.jsx)(d.nN,{className:"grid-header grid-entry space-2",children:"Download time"}),s.donations.map((e=>{var s;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(t.A,{className:"mt-1 w-150",children:(0,m.jsxs)(l.A,{className:"grid-header grid-entry space-2",children:[i(e),"\xa0(",e.clinicalGovId.replaceAll(";",", "),")"]})},e.uuid),null===(s=e.downloads)||void 0===s?void 0:s.map((s=>(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(t.A,{className:"mt-1 w-150",children:[(0,m.jsx)(l.A,{className:"space-2",children:"\xa0"}),(0,m.jsx)(l.A,{className:"grid-header grid-entry space-2",children:s.filename}),(0,m.jsx)(l.A,{className:"grid-header grid-entry space-2",children:new Date(s.downloadDate).toLocaleDateString("en-us",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"})})]},e.uuid+"-"+s.fileId+"-"+Math.random())}))),(0,m.jsx)(t.A,{children:"\xa0"},e.uuid+e.status+"-"+Math.random())]})}))]})]}):"No Downloads found"})})})}},6280(e,s,a){a.d(s,{h:()=>u});a(8094);var l=a(5197),n=a(357),t=a(4091),i=a(8365),r=a(8819),d=a(5326),o=a(4790),c=a(5678);const m=(0,t.Ay)(n.A)`
260  border: 0;  
261  th, td {
262    font-size: ${d.$N.px14};
263    vertical-align: top;
264    padding: .5% 0;
265  }
266
267  th {
268    padding-bottom: 0;
269  }
270
271  th.small, td.small {
272    width: 20%;
273    padding-left: 1%;
274  }
275`,u=e=>{let{ticket:s}=e;const a=(e,s)=>{var a,l,n,t,i,r;return null!=(null===s||void 0===s?void 0:s.user)?(null===s||void 0===s||null===(a=s.user)||void 0===a||null===(l=a.userDetails)||void 0===l?void 0:l.first)+" "+(null===(n=s.user)||void 0===n||null===(t=n.userDetails)||void 0===t?void 0:t.last):null!=(null===e||void 0===e?void 0:e.contactUs)?(null===e||void 0===e||null===(i=e.contactUs)||void 0===i?void 0:i.first)+" "+(null===e||void 0===e||null===(r=e.contactUs)||void 0===r?void 0:r.last):void 0};return(0,c.jsxs)(c.Fragment,{children:[(()=>{var e;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.A,{children:(0,c.jsx)(i.nN,{className:"ms-3",children:"Previous Events"})}),(0,c.jsxs)(m,{borderless:!0,className:"w-100 ms-3",children:[(0,c.jsx)("thead",{children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{className:"w-25",children:"Status"}),(0,c.jsx)("th",{className:"w-25",children:"Name"}),(0,c.jsx)("th",{className:"small",children:"Date"}),(0,c.jsx)("th",{className:"",children:"Comments"})]})}),(0,c.jsx)("tbody",{children:null===s||void 0===s||null===(e=s.techSupportEvents)||void 0===e?void 0:e.map((e=>(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:"w-25",children:(0,r.pU)(e.event)}),(0,c.jsxs)("td",{className:"w-25",children:[" ",a(s,e)]}),(0,c.jsxs)("td",{className:"small",children:[" ",new Date(e.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})]}),(0,c.jsx)("td",{className:"",children:null===e.comment?"":(0,o.Ay)(e.comment)})]},e.id)))})]})]})})(),(()=>{var e,a,n,t,d;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.A,{children:(0,c.jsx)(i.nN,{className:"mt-5 ms-3",children:"Contact Us"})}),(0,c.jsxs)(m,{borderless:!0,className:"w-100 ms-3",children:[(0,c.jsx)("thead",{children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{className:"w-25",children:"Name"}),(0,c.jsx)("th",{className:"w-25",children:"Email"}),(0,c.jsx)("th",{className:"small",children:"Subject"}),(0,c.jsx)("th",{className:"",children:"Message"})]})}),(0,c.jsx)("tbody",{children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:"w-25",children:(null===s||void 0===s||null===(e=s.contactUs)||void 0===e?void 0:e.first)+" "+(null===s||void 0===s||null===(a=s.contactUs)||void 0===a?void 0:a.last)}),(0,c.jsx)("td",{className:"w-25",children:null===s||void 0===s||null===(n=s.contactUs)||void 0===n?void 0:n.email}),(0,c.jsx)("td",{className:"small",children:(0,r.z5)(s)}),(0,c.jsx)("td",{className:"",children:null==(null===s||void 0===s||null===(t=s.contactUs)||void 0===t?void 0:t.userComment)?"":null===s||void 0===s||null===(d=s.contactUs)||void 0===d?void 0:d.userComment})]})})]})]})})()]})}},6756(e,s,a){a.d(s,{AdminSystem:()=>h});var l=a(8094),n=a(9307),t=a(7102),i=a(5197),r=a(8365),d=a(4091),o=a(5326),c=a(213),m=a(5678);const u=(0,d.Ay)(r.z9)`
276    width: 250px;
277
278    :hover, :active:focus {
279        background-color: ${o.lm.cerulean};
280    }
281`,h=()=>{const[e,s]=(0,l.useState)(),a="https://data.projectdatasphere.org//api/admin/system/";return(0,l.useMemo)((()=>
281{if(void 0!==(null===e||void 0===e?void 0:e.length)&&(null===e||void 0===e?void 0:e.length)>0){(async()=>{const{data:s,error:a}=await(0,c.gZ)(e);if(null!==s)alert(JSON.stringify(s));else if(a){var l,n;alert(null===(l=a.response)||void 0===l||null===(n=l.data)||void 0===n?void 0:n.detail)}})().then((e=>{console.log("returned - "+e)}))}}),[e]),(0,m.jsx)(t.A,{className:"w-100",fluid:!0,children:(0,m.jsx)(r.NE,{name:"content-page",children:(0,m.jsx)(r.ff,{name:"page-wrapper ",children:(0,m.jsx)(r.$8,{className:"mt-5 mb-5 ",lg:12,children:(0,m.jsxs)(r.$8,{lg:8,children:[(0,m.jsxs)(i.A,{className:"mb-4 ",children:[(0,m.jsx)("h4",{children:"Clinical Trial.gov Section"}),(0,m.jsx)(u,{onClick:()=>s(a+"ctGovRefresh"),children:"Run CT.gov Refresh"})]}),(0,m.jsxs)(i.A,{className:"mb-4",children:[(0,m.jsx)("h4",{children:"Virus Scan Section"}),(0,m.jsx)(u,{onClick:()=>s(a+"virusscan"),children:"Run Virus Scanner"})]}),(0,m.jsx)(i.A,{className:"mb-4",children:(0,m.jsx)("h4",{children:"Gold Standard Section"})}),(0,m.jsxs)(i.A,{className:"mb-3",children:[(0,m.jsx)(n.A,{children:(0,m.jsx)(u,{onClick:()=>s(a+"goldStandard/2026"),children:"Run Gold Standard Feed (2026)"})}),(0,m.jsx)(n.A,{children:(0,m.jsx)(u,{onClick:()=>s(a+"goldStandard"),children:"Run Gold Standard Feed"})}),(0,m.jsx)(n.A,{})]}),(0,m.jsxs)(i.A,{className:"mb-3",children:[(0,m.jsx)("h4",{children:"Python Section"}),(0,m.jsx)(u,{onClick:()=>s(a+"runPython"),children:"Run Python"})]}),(0,m.jsxs)(i.A,{className:"mb-3",children:[(0,m.jsx)("h4",{children:"UUID Section"}),(0,m.jsx)(u,{onClick:()=>s(a+"buildDonationsUuid"),children:"Build the donation uuid's"})]})]})})})})})}},6850(e,s,a){a.d(s,{ClinicalDrugAdditivityDescription:()=>c});a(8094);var l=a(8365),n=a(4091),t=a(9307),i=a(5326),r=a(5678);const d=(0,n.Ay)(l.DV)`
282    text-align: center;
283    margin: 2% auto;
284`,o=n.Ay.div`
285
286
287    span, p {
288        font-size: ${i.$N.px13};
289    }
290`,c=()=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(l.NE,{name:"content-page",children:(0,r.jsx)(l.ff,{name:"page-wrapper",children:(0,r.jsx)(t.A,{lg:12,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{children:"The Palmer Algorithm Application"}),(0,r.jsx)(l.zN,{children:" This application provides an estimate of Progression Free Survival (PFS) for a combination therapy of two independent cancer agents. The estimate is based on a published algorithm (called the Palmer Algorithm or Palmer-Sorger Algorithm) that has been validated against clinical trial performance data [1]."}),(0,r.jsx)(l.zN,{children:"The inputs provided by the user for this algorithm are "}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:["Two comma-separated value files (.csv), one for each agent, denoting PFS values of Time in weeks (column 1) and Survival (column 2, stated as an integer reflecting the percentage of patients who have survived at that given Time; that is, 85% survival means 85 is entered as the value)",(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:"One of the inputs is labeled as \u2018Experiment\u2019 and the other \u2018Control\u2019; note that these terms conserve the original language of the algorithm, but for purposes of this application both agents can be assigned to one or the other category without any change in outcome"})})]}),(0,r.jsx)("li",{children:"For each agent, the First Radiology Scan time should be provided; this is the time (usually specified in weeks) that the first post-drug-administration radiology scan (CT or PET/CT) was performed to assess drug efficacy, usually derived from the protocol used in the clinical trial or study. If no value was specified, an integer value for the mean or median time in weeks of the scan can be used (the default is 0 weeks, but this will not give accurate results for the Additivity projection)"})]}),(0,r.jsx)(l.zN,{children:"The outputs provided by the algorithm are "}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Two .csv files showing estimated PFS curve results for"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Highest Single Agent (HSA). This curve is based on the assumption there is no interaction between the agents; that is, for a drug combination A and B, the performance is based on the best value for A or B at that point in t
290ime"}),(0,r.jsx)("li",{children:"Additivity. This curve projects the combination effect of the drugs; this is, for a drug combination A and B, the performance is based on values for A + B, and projects a better outcome than HSA"})]}),(0,r.jsx)("li",{children:"A graph demonstrating HSA and Additivity curves"})]}),(0,r.jsx)(l.zN,{children:"As for predicting successful combinations of agents, the HSA model has an AUC of 0.86 and the Additivity model has an AUC of 0.92 when measured against real-world combination results based on PFS curves from the performance of the agents independently."}),(0,r.jsxs)(o,{className:"mt-3 mb-5",children:[(0,r.jsx)("p",{className:" mb-0",children:"[1] Hwangbo, H., Patterson, S.C., Dai, A. et al. Additivity predicts the efficacy of most approved combination therapies for advanced cancer. Nat Cancer 4, 1693\u20131704 (2023)."}),(0,r.jsx)("span",{className:"mt-0  ",children:(0,r.jsx)("a",{href:"https://doi.org/10.1038/s43018-023-00667-z",target:"_blank",rel:"noopener noreferrer",children:"https://doi.org/10.1038/s43018-023-00667-z"})})]})]})})})})})},6952(e,s,a){a.d(s,{AdminAnnouncementAction:()=>A});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(8365),c=a(7860),m=a(4524),u=a(7272),h=a(8159),x=a(8819),j=a(8064),p=a(687),g=a(213),v=a(5678);const A=()=>{var e,s;const{announcementId:a}=(0,m.g)(),[A,N]=(0,l.useState)(!1),[f,y]=(0,l.useState)(),[b,w]=(0,l.useState)(""),[S,D]=(0,l.useState)(""),[C,T]=(0,l.useState)(!1),I=(0,m.Zp)(),k=(0,l.useRef)(null),[F,q]=(0,l.useState)(!1),[R,V]=(0,l.useState)(),U="https://data.projectdatasphere.org//api/admin/announcements/find/"+a,{data:P,loading:E,error:L}=(0,p.c)(U);(0,l.useMemo)((()=>{null!==P&&(w(P.subject),D(P.message),y(P),null!=P.sent&&T(!0))}),[P]),(0,l.useEffect)((()=>{N(!0)}),[]);const O=()=>{I(h.o+"admin/announcements")},z=async e=>{q(!0);const{data:s,error:a}=await(0,g.Yz)("https://data.projectdatasphere.org//api/admin/announcements/addOrEditMessage",e);if(null!=s)q(!1),I(h.o+"admin/announcements");else if(a){var l;q(!1),V(null===a||void 0===a||null===(l=a.response)||void 0===l?void 0:l.data.title)}},$=()=>(0,v.jsxs)(i.A,{className:"form-layout",onSubmit:e=>(e=>{var s,l;e.preventDefault(),z(null!=a?JSON.stringify({id:a,subject:b,message:(0,x.a8)(null===k||void 0===k||null===(s=k.current)||void 0===s?void 0:s.getData())}):JSON.stringify({subject:b,message:(0,x.a8)(null===k||void 0===k||null===(l=k.current)||void 0===l?void 0:l.getData())}))})(e),noValidate:!0,children:[(0,v.jsx)(o.$8,{className:"mx-auto",lg:12,children:(0,v.jsxs)(o.$8,{className:"me-5 ",lg:8,children:[(0,v.jsx)(r.A,{className:" mt-3 mb-3 w-100",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:6,controlId:"formAction",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Subject "}),(0,v.jsx)(i.A.Control,{name:"subject",value:b,disabled:C,onChange:e=>{w(e.target.value)}})]})}),(0,v.jsx)(r.A,{className:"mt-3 mb-5 ",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formMessage",children:[(0,v.jsx)(o.AK,{children:(0,v.jsx)(i.A.Label,{className:"",column:"sm",children:"Message "})}),(0,v.jsx)(u.b,{reference:k,editorLoaded:A,disabled:C,name:"message",value:S})]})})]})}),!C&&(0,v.jsx)(j.T,{handleReset:O,isSubmitting:F,submitButtonText:c.XD})]});return(0,v.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,v.jsx)(o.NE,{name:"content-page",children:(0,v.jsx)(o.ff,{name:"page-wrapper",children:(0,v.jsxs)(o.$8,{children:[null!=a&&(0,v.jsxs)(v.Fragment,{children:[E&&(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,v.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}),L&&(0,v.jsxs)(o.UQ,{children:["Error - ",null===L||void 0===L||null===(e=L.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),R&&(0,v.jsxs)(o.UQ,{children:["Error - ",R]}),P&&$()]}),null==a&&$()]})})})})}},6997(e,s,a){a.d(s,{AdminPlatformAnnouncementAction:()=>A});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(8365),c=a(7860),m=a(4524),u=a(7272),h=a(8159),x=a(8819),j=a(8064),p=a(687),g=a(213),v=a(5678);const A=()=>{var e,s;const{announcementId:a}=(0,m.g)(),[A,N]=(0,l.useState)(!1),[f,y]=(0,l.useState)(),[b,w]=(0,l.useState)(!1),[S,D]=(0,l.useState)(""),C=(0,m.Zp
290)(),T=(0,l.useRef)(null),[I,k]=(0,l.useState)(!1),[F,q]=(0,l.useState)(),R="https://data.projectdatasphere.org//api/admin/pdsAnnouncement/find/"+a,{data:V,loading:U,error:P}=(0,p.c)(R);(0,l.useEffect)((()=>{N(!0)}),[]),(0,l.useMemo)((()=>{null!=V&&(D(V.message),w(V.active),y(f))}),[V]);const E=()=>{C(h.o+"admin/platformAnnouncement")},L=async e=>{k(!0);const{data:s,error:a}=await(0,g.Yz)("https://data.projectdatasphere.org//api/admin/pdsAnnouncement/addOrEditAnnouncement",e);if(null!==s)k(!1),C(h.o+"admin/platformAnnouncement");else if(a){var l;k(!1),q(null===a||void 0===a||null===(l=a.response)||void 0===l?void 0:l.data.title)}},O=()=>(0,v.jsxs)(i.A,{className:"form-layout",onSubmit:e=>(e=>{var s,l;e.preventDefault(),L(null!=a?JSON.stringify({id:a,active:b,message:(0,x.a8)(null===T||void 0===T||null===(s=T.current)||void 0===s?void 0:s.getData())}):JSON.stringify({active:b,message:(0,x.a8)(null===T||void 0===T||null===(l=T.current)||void 0===l?void 0:l.getData())}))})(e),noValidate:!0,children:[(0,v.jsx)(o.$8,{className:"mx-auto",lg:12,children:(0,v.jsxs)(o.$8,{className:"me-5 ",lg:8,children:[(0,v.jsx)(r.A,{className:"mt-3 mb-5  ",children:(0,v.jsx)(i.A.Group,{as:n.A,controlId:"",children:(0,v.jsx)(i.A.Check,{className:"bold_label",required:!0,type:"checkbox",disabled:!1,label:"Is active",checked:b,onChange:e=>{w(!b)}})})}),(0,v.jsx)(r.A,{className:"mt-3 mb-5 ",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formMessage",children:[(0,v.jsx)(o.AK,{children:(0,v.jsx)(i.A.Label,{className:"",column:"sm",children:"Message "})}),(0,v.jsx)(u.b,{reference:T,editorLoaded:A,disabled:!1,name:"message",value:S})]})})]})}),(0,v.jsx)(j.T,{handleReset:E,isSubmitting:I,submitButtonText:c.XD})]});return(0,v.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,v.jsx)(o.NE,{name:"content-page",children:(0,v.jsx)(o.ff,{name:"page-wrapper",children:(0,v.jsxs)(o.$8,{children:[null!=a&&(0,v.jsxs)(v.Fragment,{children:[U&&(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,v.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}),P&&(0,v.jsxs)(o.UQ,{children:["Error - ",null===P||void 0===P||null===(e=P.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),F&&(0,v.jsxs)(o.UQ,{children:["Error - ",F]}),V&&O()]}),null==a&&O()]})})})})}},7272(e,s,a){a.d(s,{b:()=>u});var l=a(8094),n=a(1385),t=a(2384),i=a.n(t),r=a(7102),d=a(5197),o=a(5678);function c(){let e="";const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;a<5;a++)e+=s.charAt(Math.floor(62*Math.random()));return e}const m={language:"en",wordCount:{displayCharacters:!0,displayWords:!0,onUpdate:e=>{}}},u=e=>{let s,{reference:a,editorLoaded:t,disabled:u,name:h,value:x}=e;(0,l.useImperativeHandle)(a,(()=>({getData(){var e;return null===(e=s)||void 0===e?void 0:e.getData()}})));return(0,o.jsx)("div",{children:t?(0,o.jsx)(r.A,{children:(0,o.jsx)(d.A,{children:(0,o.jsx)(n.aF,{editor:i(),id:h+"-"+c(),config:m,onReady:e=>{e.editing.view.change((s=>{s.setStyle("height","250px",e.editing.view.document.getRoot()),s.setStyle("width","615px",e.editing.view.document.getRoot()),s.setStyle("min-width","200px",e.editing.view.document.getRoot())})),s=e},disabled:u,data:x})})}):(0,o.jsx)("div",{children:"Editor loading"})})}},7447(e,s,a){a.d(s,{AdminPlatformAnnouncement:()=>h});var l=a(8094),n=a(9307),t=a(7102),i=a(292),r=a(4524),d=a(8365),o=a(8159),c=a(4790),m=a(687),u=a(5678);const h=()=>{const[e,s]=(0,l.useState)([]),{data:a,loading:h,error:x}=(0,m.c)("https://data.projectdatasphere.org//api/admin/pdsAnnouncement/allAnnouncements");(0,l.useMemo)((()=>{null!=a&&s(a)}),[a]);const j=()=>(0,u.jsxs)(d.TW,{className:"",children:[(0,u.jsx)(n.A,{className:"grid-header grid-entry space-5 ",children:"Content"}),(0,u.jsx)(n.A,{className:"grid-header grid-entry space-2",children:" Date Created"}),(0,u.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:"Edit"})]}),p=e=>{if(e)return(0,u.jsxs)(d.TW,{className:"",children:[(0,u.jsxs)(n.A,{className:"grid-header grid-entry space-5",children:[" ",(0,c.Ay)(e.message)]}),(0,u.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:new Date(e.msgDate).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,u.jsx)(n.A,{className:"grid-header grid-entry space-2 ",children:(0,u.jsx)(r.k2,{to:o.o+"admin/platformAnnouncement/action/"+e.id,className:"linkstyle",children:"Edit"})})]})},g=e=>{let s=e.filter((e=>!e.active));return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(d.I3,{className:"mb-1 mt-5",children:"Inactive Platform Announcements"}),null!=s&&s.length>0&&j(),null===s||void 0===s?void 0:s.map((e=>p(e))),!(null!==s&&void 0!==s&&s.length)&&(0,u.jsx)(d.DV,{children:"No inactive platform announcements"})]})};return(0,u.jsxs)(t.A,{className:"w-100 ",children:[(0,u.jsx)(d.Kp,{className:"mt-3  ",children:(0,u.jsx)(n.A,{className:"mt-2",md:8,lg:5,children:(0,u.jsx)(d.NB,{to:o.o+"admin/platformAnnouncement/action",children:"Create New Platform Announcement"})})}),(0,u.jsxs)(u.Fragment,{children:[h&&(0,u.jsx)(i.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,u.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),x&&(0,u.jsx)("p",{children:"Error"}),e&&(e=>{let s=e.filter((e=>e.active));return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(d.I3,{className:"mb-3 mt-2",children:"Active Platform Announcements"}),(null===s||void 0===s?void 0:s.length)&&j(),null===s||void 0===s?void 0:s.map((e=>p(e))),!(null!==s&&void 0!==s&&s.length)&&(0,u.jsx)(d.DV,{children:"No active platform announcements"}),g(e)]})})(e)]})]})}},7630(e,s,a){a.d(s,{ClinicalDrugAdditivity:()=>K});var l=a(9379),n=a(8094),t=a(9307),i=a(357),r=a(1506),d=a(7102),o=a(5197),c=a(292),m=a(4091),u=a(8365),h=(a(3396),a(5326)),x=a(3849),j=a(3841),p=a(2025),g=a(
2907714),v=a(213),A=a(5678);const N=e=>{let{title:s,show:a,handleSave:l,showHide:i}=e;const d=(0,n.useRef)(null);g.Ik().shape({projectName:g.Yj().required("Please provide a project name.")});return(0,A.jsxs)(x.A,{show:a,children:[(0,A.jsx)(x.A.Header,{closeButton:!0,onClick:i,children:(0,A.jsx)(u.c7,{children:s})}),(0,A.jsx)(x.A.Body,{children:(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(p.l1,{innerRef:d,onSubmit:async e=>{const{data:s,error:a}=await(0,v.Yz)("https://data.projectdatasphere.org//api/clinicaldrug/saveProject",JSON.stringify({projectName:e.projectName}));if(null!==s)l();else if(a){var n;console.log(null===a||void 0===a||null===(n=a.response)||void 0===n?void 0:n.data.title)}},initialValues:{projectName:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,touched:l,errors:n}=e;return(0,A.jsx)(r.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:(0,A.jsx)(o.A,{className:"mt-3 mb-3",children:(0,A.jsxs)(r.A.Group,{as:t.A,lg:12,controlId:"",children:[(0,A.jsx)(r.A.Label,{className:"required",column:"sm",children:"Project Name "}),(0,A.jsx)(r.A.Control,{size:"sm",required:!0,name:"projectName",type:"text",isValid:l.projectName&&!n.projectName,onChange:a}),(0,A.jsx)(r.A.Text,{className:"text-muted"}),(0,A.jsx)(p.Kw,{name:"projectName",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})})})}})})}),(0,A.jsxs)(x.A.Footer,{children:[(0,A.jsx)(j.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{d.current&&d.current.handleSubmit()},children:"Submit"}),(0,A.jsx)(j.A,{variant:"secondary",onClick:i,children:"Close"})]})]})},f=e=>{let{projectName:s,projectId:a,show:l,handleDelete:n,showHide:t}=e;return(0,A.jsxs)(x.A,{show:l,children:[(0,A.jsx)(x.A.Header,{closeButton:!0,onClick:t,children:(0,A.jsxs)(u.c7,{children:["Delete Project: ",s]})}),(0,A.jsx)(x.A.Body,{children:"Do you want to delete the project?"}),(0,A.jsxs)(x.A.Footer,{children:[(0,A.jsx)(j.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{(async()=>{const e="https://data.projectdatasphere.org//api/clinicaldrug/deleteProject/"+a,{data:s,error:l}=await(0,v.gZ)(e);if(null!==s)n();else if(l){var t;console.log(null===(t=l.response)||void 0===t?void 0:t.data.detail)}})()},children:"Yes"}),(0,A.jsx)(j.A,{variant:"secondary",onClick:t,children:"No"})]})]})},y=e=>{let{projectName:s,projectId:a,show:l,handleUpload:i,showHide:d}=e;const c=(0,n.useRef)(null),m=g.Ik().shape({fileUploaded:g.gl().required("Please select a file")});return(0,A.jsxs)(x.A,{show:l,children:[(0,A.jsx)(x.A.Header,{closeButton:!0,onClick:d,children:(0,A.jsxs)(u.c7,{children:["Upload Files for Project: ",s,". If you choose a file that currently exists in your project, it will be replaced with the new selection."]})}),(0,A.jsx)(x.A.Body,{children:(0,A.jsx)(p.l1,{innerRef:c,validationSchema:m,onSubmit:async e=>{if(null!==e.fileUploaded){const n="https://data.projectdatasphere.org//api/clinicaldrug/upload/"+a;let t=new FormData;t.append("file",e.fileUploaded);const{data:r,error:d}=await(0,v.Ms)(n,t);if(r)i();else if(d){var s,l;console.error(null===(s=d.response)||void 0===s||null===(l=s.data)||void 0===l?void 0:l.detail)}}},initialValues:{fileUploaded:null},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,touched:a,errors:l,setFieldValue:n}=e;return(0,A.jsx)(r.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:(0,A.jsx)(u.$8,{lg:12,children:(0,A.jsx)(u.$8,{lg:8,children:(0,A.jsx)(o.A,{className:"mx-auto",children:(0,A.jsx)(o.A,{className:"mx-auto mb-3",children:(0,A.jsxs)(o.A,{className:"mb-3 ",children:[(0,A.jsxs)(r.A.Group,{as:t.A,lg:12,required:!0,className:"mb-3 ",children:[(0,A.jsx)(r.A.Label,{className:"required",column:"sm",children:(0,A.jsx)(u.z9,{type:"button",className:"btn btn-link bold-label required",children:"Choose A Project File"})}),(0,A.jsx)(r.A.Control,{id:"fileUploaded ",type:"file",size:"sm",name:"fileUploaded",accept:".csv",value:void 0,onChange:e=>{n("fileUploaded",e.currentTarget.files[0])},isValid:a.fileUploaded&&!l.fileUploaded})]}),(0,A.jsx)(r.A.Control.Feedback,{type:"invalid",children:"Please provide a subject."}),(0,A.jsx)(p.Kw,{name:"fileUploaded",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]})})})})})})}})}),(0,A.jsxs)(x.A.Footer,{children:[(0,A.jsx)(j.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{c.current&&c.current.handleSubmit()},children:"Upload File"}),(0,A.jsx)(j.A,{variant:"secondary",onClick:d,children:"Close"})]})]})};var b=a(7860);const w=(0,m.Ay)(u.DV)`
291    margin-top: 0;
292    height: 30px;
293`,S=e=>{let{project:s,scanTime1:a,scanTime2:l,valueHandlerTherapy1:n,valueHandlerTherapy2:i,handleChange:d,scanTimeTherapy1Handler:c,scanTimeTherapy2Handler:m,touched:h,errors:x}=e;const j=()=>{let e=[],a={id:1};if(a.value=b.ol,a.label=b.RP,e.push(a),null!=(null===s||void 0===s?void 0:s.files)&&s.files.length>0)for(let l=0;l<s.files.length;l++){let a={};a.id=l+1,a.value=s.files[l].filename,a.label=s.files[l].filename,e.push(a)}return e.map((e=>(0,A.jsx)("option",{value:e.value,children:e.label},e.id)))},g=()=>{var e,l;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(r.A.Group,{children:[(0,A.jsx)(r.A.Label,{className:"required",column:"sm",children:"Experiment "}),(0,A.jsx)(r.A.Select,{size:"sm",required:!0,name:"therapy1",value:null===s||void 0===s||null===(e=s.parameters)||void 0===e?void 0:e.therapy1,isValid:h.therapy1&&!x.therapy1,onChange:e=>{n(e.target.value)},children:j()}),(0,A.jsx)(p.Kw,{name:"therapy1",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]}),(0,A.jsxs)(r.A.Group,{as:o.A,className:"mt-4 mb-3 ",children:[(0,A.jsx)(r.A.Label,{column:!0,lg:4,children:"1st Radiology Scan"}),(0,A.jsxs)(t.A,{lg:5,children:[(0,A.jsx)(r.A.Control,{size:"sm",required:!0,name:"therapy1ScanTime",value:a,type:"text",onCh
293ange:e=>{c(e.target.value)}}),(0,A.jsx)(p.Kw,{name:"therapy1ScanTime",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]}),(0,A.jsx)(t.A,{lg:3,children:(0,A.jsx)(r.A.Select,{size:"sm",required:!0,className:"clin-drug-select",name:"therapy1ScanInterval",value:null===s||void 0===s||null===(l=s.parameters)||void 0===l?void 0:l.therapy1ScanInterval,children:N(b.uW)})})]})]})},v=()=>{var e,a;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(r.A.Group,{children:[(0,A.jsx)(r.A.Label,{className:"required",column:"sm",children:"Control "}),(0,A.jsx)(r.A.Select,{size:"sm",required:!0,name:"therapy2",value:null===s||void 0===s||null===(e=s.parameters)||void 0===e?void 0:e.therapy2,isValid:h.therapy2&&!x.therapy2,onChange:e=>{i(e.target.value)},children:j()}),(0,A.jsx)(p.Kw,{name:"therapy2",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]}),(0,A.jsxs)(r.A.Group,{as:o.A,className:"mt-4 mb-3",controlId:"",children:[(0,A.jsx)(r.A.Label,{column:!0,lg:4,children:"1st Radiology Scan"}),(0,A.jsxs)(t.A,{lg:5,children:[(0,A.jsx)(r.A.Control,{size:"sm",name:"therapy2ScanTime",value:l,type:"text",onChange:e=>{m(e.target.value)}}),(0,A.jsx)(p.Kw,{name:"therapy2ScanTime",render:e=>(0,A.jsx)("div",{className:"form-error-msg",children:e})})]}),(0,A.jsx)(t.A,{lg:3,children:(0,A.jsx)(r.A.Select,{size:"sm",required:!0,className:"clin-drug-select",name:"therapy2ScanInterval",value:null===s||void 0===s||null===(a=s.parameters)||void 0===a?void 0:a.therapy2ScanInterval,children:N(b.uW)})})]})]})},N=e=>e.map((e=>(0,A.jsx)("option",{value:e.value,children:e.label},e.id)));return(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w,{className:" mt-5 mb-0",children:"Therapy Selection"}),(0,A.jsx)(u.zN,{className:" mt-0",children:"Both Therapy 1 and Therapy 2 can only be associated with one file name in your project. In addition, the same file name cannot be used for Therapy 1 and Therapy 2. Both Therapy 1 and Therapy 2 must be selected."}),(0,A.jsxs)(o.A,{className:"mt-2 mb-5 ",children:[(0,A.jsx)(t.A,{lg:6,children:g()}),(0,A.jsx)(t.A,{lg:6,children:v()})]})]})})},D=e=>{let{projectId:s,fileName:a,fileId:l,show:n,handleDelete:t,showHide:i}=e;return(0,A.jsxs)(x.A,{show:n,children:[(0,A.jsx)(x.A.Header,{closeButton:!0,onClick:i,children:(0,A.jsxs)(u.c7,{children:["Delete File: ",a]})}),(0,A.jsx)(x.A.Body,{children:"Do you want to delete the file?"}),(0,A.jsxs)(x.A.Footer,{children:[(0,A.jsx)(j.A,{variant:"success",className:"btn-submit",type:"button",onClick:()=>{(async()=>{const e="https://data.projectdatasphere.org//api/clinicaldrug/deleteProjectFile/"+s+"/"+l,{data:a,error:n}=await(0,v.gZ)(e);null!==a?t():n&&console.log(n)})()},children:"Yes"}),(0,A.jsx)(j.A,{variant:"secondary",onClick:i,children:"No"})]})]})};var C=a(775);const T=m.Ay.div`
294    height: 500px;
295    width: 625px;
296    //border: 1px solid #ddd;
297    //background-color: #eee;
298    display: flex;
299
300    span.align {
301        //color: #fff;
302        font-size: 24px;
303        text-align: center;
304        //transform: rotate(-90deg);
305        //white-space: nowrap;
306
307    }
308`,I=m.Ay.div`
309    //background-color: #1976d2;
310    flex: 0 0 15px;
311    min-width: 0;
312    display: flex;
313    justify-content: center;
314    align-items: center;
315
316    span {
317        //color: #fff;
318        font-size: 24px;
319        transform: rotate(-90deg);
320        white-space: nowrap;
321
322    }
323
324`,k=m.Ay.div`
325    flex: 1;
326`,F=e=>{let{experimentalClean:s,combinationPredictedAdd:a,combinationPredictedInd:l,controlClean:t}=e;const i=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(null!==s&&void 0!==s&&s.length&&null!==t&&void 0!==t&&t.length){const e={top:20,right:1,bottom:30,left:40},n=550,r=400,d=C.Ltv(i.current).attr("width",n+e.left+e.right).attr("height",r+e.top+e.bottom).append("g").attr("transform","translate("+e.left+","+e.top+")"),o=C.m4Y().domain([0,1]).range([r,0]);d.append("g").attr("class","y axis").call(C.V4s(o));const c=C.m4Y().domain([C.jkA(s,(e=>e.time)),C.T9B(s,(e=>e.time))]).range([0,n]),m=C.n8j().x((e=>c(e.time))).y((e=>o(e.survival))).curve(C.UPb);d.append("g").attr("class","x axis").attr("transform","translate(0,"+r+")").call(C.l78(c)),d.append("g").attr("class","y axis").call(C.V4s(o)),d.append("path").datum(s).attr("d",m).attr("stroke","green").attr("fill","none"),d.append("path").datum(t).attr("d",m).attr("stroke","orange").attr("fill","none"),d.append("path").datum(a).attr("d",m).attr("stroke","red").attr("fill","none"),d.append("path").datum(l).attr("d",m).attr("stroke","blue").attr("fill","none")}}),[s]),(0,A.jsxs)(T,{children:[(0,A.jsx)(I,{children:(0,A.jsx)("span",{children:"Survival rate"})}),(0,A.jsxs)(k,{children:[(0,A.jsx)(o.A,{children:(0,A.jsx)("svg",{ref:i,width:600,height:400})}),(0,A.jsx)(o.A,{children:(0,A.jsx)("span",{className:"align",children:"Time (weeks)"})})]})]})},q=m.Ay.div`
327    display: flex;
328    justify-content: space-between;
329    width: 100%;
330    margin: 0;
331
332    span {
333        display: inline;
334    }
335`,R=m.Ay.div`
336    display: flex;
337    justify-content: space-between;
338    align-items: center;
339    width: 100%;
340    margin: 0;
341
342    span {
343        display: inline;
344    }
345`,V=m.Ay.div`
346    display: flex;
347    align-items: center;
348
349    span {
350        margin-left: 5px;
351
352        :hover {
353            text-decoration: underline;
354        }
355    }
356`,U=m.Ay.div`
357    display: flex;
358    align-items: center;
359    justify-content: space-between;
360    width: 50%;
361
362    img {
363        margin: 0 !important;
364    }
365`,P=(0,m.Ay)(i.A)`
366    max-height: 180px;
367
368    /*    th.first, tr.first {
369            width: 70%;
370        }
371    
372        th.second, tr.second {
373            width: 20%;
374        }
375    
376        th.third, tr.third {
377            width: 10%;
378        }*/
379`,E=e=>{let{projectId:s}=e;
379const a="/images/icons/",[l,i]=(0,n.useState)(),[d,m]=(0,n.useState)(!1),[h,x]=(0,n.useState)(!1),[N,f]=(0,n.useState)(""),[b,w]=(0,n.useState)(""),[C,T]=(0,n.useState)(""),[I,k]=(0,n.useState)(""),[E,L]=(0,n.useState)(.3),[O,z]=(0,n.useState)("Weeks"),[$,_]=(0,n.useState)("Weeks"),[G,W]=(0,n.useState)(""),[B,M]=(0,n.useState)(-1),[Y,H]=(0,n.useState)(""),[K,Z]=(0,n.useState)(),[Q,J]=(0,n.useState)(!0),[X,ee]=(0,n.useState)(),se=/^(0|[1-9]\d*)(\.\d+)?$/,ae="Scan time must be a numeric  value",le="Weeks",ne=async()=>{const e="https://data.projectdatasphere.org//api/clinicaldrug/getProject/"+s,{data:a,error:l}=await(0,v.gZ)(e);var n,t,r,d,o,c,m,u,h,x,j,p,g,A;if(null!==a)i(a),f(null===(n=a.parameters)||void 0===n?void 0:n.therapy1),w(null===(t=a.parameters)||void 0===t?void 0:t.therapy2),T(null!==(null===(r=a.parameters)||void 0===r?void 0:r.therapy1ScanTime)&&"-1"!==(null===(d=a.parameters)||void 0===d?void 0:d.therapy1ScanTime)?null===(o=a.parameters)||void 0===o?void 0:o.therapy1ScanTime.toString():""),k(null!==(null===(c=a.parameters)||void 0===c?void 0:c.therapy2ScanTime)&&"-1"!==(null===(m=a.parameters)||void 0===m?void 0:m.therapy2ScanTime)?null===(u=a.parameters)||void 0===u?void 0:u.therapy2ScanTime.toString():""),z(null!==(null===(h=a.parameters)||void 0===h?void 0:h.therapy1ScanInterval)?null===(x=a.parameters)||void 0===x?void 0:x.therapy1ScanInterval:le),_(null!==(null===(j=a.parameters)||void 0===j?void 0:j.therapy2ScanInterval)?null===(p=a.parameters)||void 0===p?void 0:p.therapy2ScanInterval:le),L(null!=(null===(g=a.parameters)||void 0===g?void 0:g.correlation)?null===(A=a.parameters)||void 0===A?void 0:A.correlation:.3);else if(l){var N;ee(null===(N=l.response)||void 0===N?void 0:N.data.detail)}J(!1)};(0,n.useMemo)((()=>{ne()}),[]);const te=()=>{m(!d)},ie=()=>{var e;return!(null===l||void 0===l||null===(e=l.files)||void 0===e||!e.length)},re=()=>{var e,s;return null!=(null===l||void 0===l||null===(e=l.files)||void 0===e?void 0:e.length)&&(null===l||void 0===l||null===(s=l.files)||void 0===s?void 0:s.length)>1},de=(e,s)=>(0,A.jsx)(U,{children:(0,A.jsx)("img",{className:"mx-auto ",src:a+"delete.png",title:"Delete",onClick:()=>{((e,s)=>{M(e),W(s),x(!0)})(e,s)},alt:"delete"})}),oe=async e=>{const a="https://data.projectdatasphere.org//api/clinicaldrug/download/"+s+"/"+Y;H(e);const{data:l,error:n}=await(0,v.y$)(a);if(null!==l)(e=>{console.log("successful download of oa file");const s=window.URL.createObjectURL(e.data),a=document.createElement("a");a.href=s,a.setAttribute("download",Y),document.body.appendChild(a),a.click(),null!==a.parentNode&&a.parentNode.removeChild(a)})(l);else if(n){var t;ee(null===(t=n.response)||void 0===t?void 0:t.data.detail)}},ce=()=>{var e;return(0,A.jsxs)(P,{bordered:!0,children:[(0,A.jsx)("thead",{children:(0,A.jsxs)("tr",{children:[(0,A.jsx)("th",{className:"first",children:"File name"}),(0,A.jsx)("th",{className:"second",children:"Upload Date"}),(0,A.jsx)("th",{className:"third",children:"Actions"})]})}),(0,A.jsx)("tbody",{children:null===l||void 0===l||null===(e=l.files)||void 0===e?void 0:e.map((e=>(e=>{return(0,A.jsxs)("tr",{children:[(0,A.jsx)("td",{className:"first",children:e.filename}),(0,A.jsx)("td",{className:"second",children:(s=e.createdAt,new Date(s).toLocaleDateString("en-us",{month:"2-digit",day:"2-digit",year:"numeric"}))}),(0,A.jsx)("td",{className:"third",children:de(e.id,e.filename)})]});var s})(e)))})]})},me=g.Ik().shape({therapy1:g.Yj().required("Please select a file for Therapy 1."),therapy2:g.Yj().required("Please select a file for Therapy 2.").notOneOf([g.KR("therapy1")],"Therapy 2 must be different than Therapy1"),therapy1ScanTime:g.Yj().matches(se,ae),therapy2ScanTime:g.Yj().matches(se,ae)}),ue=()=>(0,A.jsx)(p.l1,{enableReinitialize:!0,validationSchema:me,onSubmit:async e=>{const a="https://data.projectdatasphere.org//api/clinicaldrug/saveProjectParameters/"+s,{data:l,error:n}=await(0,v.Yz)(a,JSON.stringify({therapy1:e.therapy1,therapy2:e.therapy2,therapy1ScanTime:e.therapy1ScanTime,therapy2ScanTime:e.therapy2ScanTime,therapy1ScanInterval:e.therapy1ScanInterval,therapy2ScanInterval:e.therapy1ScanInterval,correlation:e.correlation}));if(null!==l)(e=>{const s=e.experimentalClean;if(0!==s[s.length-1].time){let a={time:0,survival:1};s.push(a),e.experimentalClean=s}const a=e.controlClean;if(0!==a[a.length-1].time){let s={time:0,survival:1};a.push(s),e.controlClean=a}const l=e.combinationPredictedAdd;if(0!==l[l.length-1].time){let s={time:0,survival:1};l.push(s),e.combinationPredictedAdd=l}
379const n=e.combinationPredictedInd;if(0!==n[n.length-1].time){let s={time:0,survival:1};n.push(s),e.combinationPredictedInd=n}Z(e)})(l);else if(n){var t;ee(null===n||void 0===n||null===(t=n.response)||void 0===t?void 0:t.data.title)}},initialValues:{therapy1:null!==N&&void 0!==N?N:"",therapy2:null!==b&&void 0!==b?b:"",therapy1ScanTime:null!==C&&void 0!==C?C:"",therapy2ScanTime:null!==I&&void 0!==I?I:"",therapy1ScanInterval:null!==O&&void 0!==O?O:"",therapy2ScanInterval:null!==$&&void 0!==$?$:"",correlation:E},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,touched:n,errors:t}=e;return(0,A.jsxs)(r.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:[(0,A.jsx)(u.$8,{className:"",lg:12,children:ie()&&(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(S,{project:l,scanTime1:C,scanTime2:I,valueHandlerTherapy1:f,valueHandlerTherapy2:w,scanTimeTherapy1Handler:T,scanTimeTherapy2Handler:k,handleChange:a,touched:n,errors:t})})}),ie()&&(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(R,{children:[(0,A.jsx)(j.A,{variant:"success",className:" mt-0 mb-3 ",type:"submit",children:"Calculate Results"}),K&&(0,A.jsxs)(u.Tm,{children:[(0,A.jsx)(j.A,{className:" mt-0 mb-3 me-3",onClick:()=>oe("ChemX1-ChemY2_combination_predicted_add.csv"),children:"Download Additivity File"}),(0,A.jsx)(j.A,{className:" mt-0 mb-3 ",onClick:()=>oe("ChemX1-ChemY2_combination_predicted_ind.csv"),children:"Download HSA File"})]})]})}),K&&(0,A.jsx)(o.A,{children:(0,A.jsx)(F,{experimentalClean:K.experimentalClean,controlClean:K.controlClean,combinationPredictedAdd:K.combinationPredictedAdd,combinationPredictedInd:K.combinationPredictedInd})})]})}});return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(y,{projectName:null===l||void 0===l?void 0:l.projectName,projectId:s,show:d,showHide:te,handleUpload:()=>{m(!d),ne()}}),(0,A.jsx)(D,{projectId:s,fileName:G,fileId:B,show:h,showHide:()=>{x(!h)},handleDelete:()=>{x(!h),ne()}}),Q&&(0,A.jsx)(c.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,A.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),X&&(0,A.jsx)(u.UQ,{children:X}),K&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(q,{className:"mt-2  ",children:[(0,A.jsx)(u.UQ,{children:X}),(0,A.jsx)(u.DV,{children:null!=l?ie()?l.projectName+" Parameters ":"Please upload 2 different files (.csv filetype only) for: "+l.projectName:"Please create a new project"}),(0,A.jsxs)(V,{children:[(0,A.jsx)("img",{className:"mx-auto",src:a+"upload.png",onClick:()=>{te()},alt:"upload"}),(0,A.jsx)("span",{onClick:()=>{te()},children:"Upload Data"})]})]}),ie()&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(t.A,{children:ce()}),re()&&(0,A.jsx)(t.A,{children:ue()})]})]})]})};var L=a(8159);const O=(0,m.Ay)(u.$8)`
380    background-color: ${h.lm.light_grey};
381    margin-top: 1px;
382`,z=(0,m.Ay)(t.A)`
383    width: 98%;
384    margin: 0 auto;
385    background-color: ${h.lm.white};
386`,$=(0,m.Ay)(t.A)`
387    width: 95%;
388    margin: 0 auto;
389    background-color: ${h.lm.white};
390`,_=(0,m.Ay)(t.A)`
391    background-color: ${h.lm.white};
392    border-right: 2px solid ${h.lm.access_data_gray};
393    margin-left: 0;
394    padding-left: 0;
395`,G=m.Ay.div`
396    display: flex;
397    justify-content: space-between;
398
399    width: 60%;
400    margin-left: 1%;
401
402    span {
403        display: inline;
404    }
405`,W=m.Ay.div`
406
407    display: flex;
408    justify-content: space-between;
409
410`,B=m.Ay.div`
411    display: flex;
412    align-items: center;
413
414    span {
415        margin-left: 5px;
416
417        :hover {
418            text-decoration: underline;
419        }
420    }
421`,M=m.Ay.div`
422    display: flex;
423    align-items: start;
424`,Y=m.Ay.div`
425    font-size: ${h.$N.px14};
426`,H=m.Ay.div`
427    span, p {
428        font-size: ${h.$N.px13};
429    }
430`,K=()=>{const[e,s]=(0,n.useState)({kindOfProject:"",another:"another"}),{kindOfProject:a}=e,i="/images/icons/",[m,h]=(0,n.useState)(),[x,j]=(0,n.useState)(),[p,g]=(0,n.useState)(!1),[y,b]=(0,n.useState)(!1),[w,S]=(0,n.useState)(""),[D,C]=(0,n.useState)(-1),T=(0,n.useRef)(null),[I,k]=(0,n.useState)(),[F,q]=(0,n.useState)(!1),R=()=>{g(!p)},V=e=>{let a=e.projectName;s((e=>(0,l.A)((0,l.A)({},e),{},{kindOfProject:a}))),S(a),C(e.id),j(e)},U=async()=>{q(!0);const{data:e,error:s}=await(0,v.gZ)("https://data.projectdatasphere.org//api/clinicaldrug/getUserProjects");if(null!==e)h(e),V(e[0]),S(e[0].projectName),C(e[0].id),j(e[0]);else if(s){var a;k(null===(a=s.response)||void 0===a?void 0:a.data.detail)}q(!1)};(0,n.useMemo)((()=>{U()}),[]);const P=e=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Y,{children:e.projectName}),(0,A.jsx)(Y,{className:"inline",children:K(e.createdAt)})]}),K=e=>new Date(e).toLocaleDateString("en-us",{month:"2-digit",day:"2-digit",year:"numeric"}),Z=e=>{const s=e.projectName;return(0,A.jsxs)(W,{className:"w-100 ",children:[(0,A.jsx)(r.A.Check,{value:s,type:"radio","aria-label":"radio 1",label:P(e),onChange:s=>{V(e),null!=T&&T.current&&T.current.handleChange(s)},checked:a===s}),(0,A.jsx)(M,{children:(0,A.jsx)("img",{className:"mx-auto pe-2",src:i+"delete.png",title:"Delete",onClick:()=>{((e,s)=>{C(e),S(s),b(!0)})(e.id,e.projectName)},alt:"Delete project"})})]})};return(0,A.jsx)(d.A,{className:"form-container",fluid:!0,children:(0,A.jsx)(u.NE,{name:"content-page",children:(0,A.jsxs)(u.ff,{name:"page-wrapper",children:[(0,A.jsx)(N,{title:"Create Project",show:p,showHide:R,handleSave:()=>{g(!p),U()}}),(0,A.jsx)(f,{projectName:w,projectId:D,show:y,showHide:()=>{b(!y)},handleDelete:()=>{b(!y),U()}}),(0,A.jsxs)(O,{md:8,lg:12,className:"pt-2 pb-2",children:[(0,A.jsx)(u.m,{className:" me-2 ms-2",children:"Clinical Drug Additivity Calculations"}),(0,A.jsxs)(u.zN,{className:" me-2 ms-2",children:["The \u201cPalmer Algorithm\u201d is an approach which has been shown to reliably predict which combinations of cancer drugs are likely to perform well as measured by Progression Free Survival (PFS) [1]. This application interface uploads several key parameters and two PFS data sets (\u2018Experiment\u2019 and \u2018Control\u2019) in .csv format provided by the user. It returns data for two PFS curves for the projected effect of the combination (Highest Single Agent (HSA) and Additivity) and illustrates these outcomes graphed on a single plot. From this data, the user can obtain an estimate of the efficacy of the two-drug combination prior to performing a formal clinical trial. For more detailed information on the algorithm, please",(0,A.jsx)(u.Op,{to:L.o+"clinicalDrugAdditivityDescription",children:"click here"})]}),(0,A.jsxs)(H,{className:"mt-3 mb-5",children:[(0,A.jsx)("p",{className:" mb-0",children:"[1] Hwangbo, H., Patterson, S.C., Dai, A. et al. Additivity predicts the efficacy of most approved combination therapies for advanced cancer. Nat Cancer 4, 1693\u20131704 (2023)."}),(0,A.jsx)("span",{className:"mt-0  ",children:(0,A.jsx)("a",{href:"https://doi.org/10.1038/s43018-023-00667-z",target:"_blank",rel:"noopener noreferrer",children:"https://doi.org/10.1038/s43018-023-00667-z"})})]}),(0,A.jsx)(z,{className:"mt-4 mb-2  b ",lg:12,children:(0,A.jsx)($,{className:"mt-2 ",children:(0,A.jsxs)(o.A,{children:[(0,A.jsxs)(r.A.Group,{as:_,lg:3,className:"mt-2  ",children:[(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(u.DV,{children:"Projects"}),(0,A.jsx)(G,{className:" mt-3 mb-3",children:(0,A.jsxs)(B,{children:[(0,A.jsx)("img",{className:"mx-auto ",src:i+"newStarburst.png",onClick:()=>{R()},alt:"new project"}),(0,A.jsx)("span",{onClick:()=>{R()},children:"Create New"})]})})]}),F&&(0,A.jsx)(c.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,A.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),I&&(0,A.jsxs)(u.UQ,{children:["Error - ",I]}),m&&(0,A.jsx)(r.A.Group,{as:t.A,lg:12,controlId:"kindOfProject",className:"ps-2",children:null===m||void 0===m?void 0:m.map((e=>Z(e)))})]}),m&&(0,A.jsx)(r.A.Group,{as:t.A,lg:9,className:"",children:(0,A.jsx)(E,{projectId:D})})]})})})]})]})})})}},8006(e,s,a){a.d(s,{AdminDatasetsFormNCI:()=>c});var l=a(8094),n=(a(9307),a(7102)),t=a(4091),i=a(5326),r=a(8365),d=a(687),o=a(5678);(0,t.Ay)(r.TW)`
431    font-weight: bold;
432    background-color: ${i.lm.filter_gray};
433    padding: .5% 0;
434    margin-top: 0;
435`,t.Ay.div`
436    display: flex;
437    flex-direction: column;
438    align-items: center;
439    margin-right: 0;
440    margin-left: 2%;
441    padding-right: 0;
442    padding-left: 0;
443    width: 12%;
444
445
446    span {
447        color: ${i.lm.dark_grey_blue};
448    }
449`,t.Ay.div`
450    display: flex;
451    flex-direction: column;
452    color: ${i.lm.dark_grey_blue};
453    width: 30%;
454
455    span {
456        display: block;
457    }
458`;const c=()=>{const[e,s]=(0,l.useState)(""),[a,t]=(0,l.useState)([]),[i,c]=(0,l.useState)(0),{data:m,loading:u,error:h}=(0,d.c)("https://data.projectdatasphere.org//api/accessdata/results");(0,l.useMemo)((()=>{null!=m&&(t(m),c(m.length))}),[m]);return(0,o.jsx)(n.A,{className:"w-100 ",children:(0,o.jsx)(r.NE,{name:"content-page",children:(0,o.jsx)(r.ff,{name:"page-wrapper",children:(0,o.jsx)(r.$8,{md:8,lg:9,name:"registrationColumn"})})})})}},8064(e,s,a){a.d(s,{T:()=>m});a(8094);var l=a(8365),n=a(4091),t=a(5326),i=a(292),r=a(5678);const d=n.Ay.div`
459    width: 100%;
460    margin-left: 0;
461    margin-right: 0;
462    padding-top: 2%;
463
464
465    @media (min-width: 768px) {
466        width: 100%;
467        display: flex;
468        flex-direction: row;
469        align-items: center;
470        justify-content: center;
471        margin: 0;
472        height: 75px;
473        padding-top: 2%;
474    }
475
476`,o=n.Ay.div`
477    max-width: ${t.F0.MAX_WIDTH};
478    width: 100%;
479    height: 100%;
480    display: flex;
481    flex-direction: row;
482    align-items: center;
483    padding-right: 2%;
484    padding-left: 2%;
485    padding-bottom: 1%;
486`,c=n.Ay.div`
487    width: 100%;
488    display: flex;
489    flex-direction: column;
490`,m=e=>{let{submitButtonText:s,handleReset:a,isSubmitting:n=!1}=e;return(0,r.jsx)(d,{className:"footer-wrapper ",children:(0,r.jsx)(o,{className:"footer-body",children:(0,r.jsx)(c,{className:"footer-main",children:(0,r.jsxs)(l.zE,{children:[(0,r.jsx)(l.DZ,{children:(0,r.jsx)(l.k2,{variant:"outline-light",className:"btn-submit",type:"reset",onClick:()=>{a()},children:"Cancel"})}),(0,r.jsx)(l.DZ,{children:(0,r.jsxs)(l.WJ,{variant:"success",className:"btn-submit",type:"submit",disabled:n,children:[n&&(0,r.jsx)(i.A,{as:"span",animation:"border",size:"sm",role:"status",variant:"warning","aria-hidden":"true"}),s]})})]})})})})}},9052(e,s,a){a.d(s,{x:()=>i});a(8094);var l=a(3841),n=a(3849),t=a(5678);const i=e=>{let{show:s,showHide:a,message:i}=e;return(0,t.jsxs)(n.A,{show:s,keyboard:!1,backdrop:"static",children:[(0,t.jsx)(n.A.Header,{closeButton:!0,children:(0,t.jsx)(n.A.Title,{children:"Error"})}),(0,t.jsx)(n.A.Body,{children:i}),(0,t.jsx)(n.A.Footer,{children:(0,t.jsx)(l.A,{variant:"secondary",onClick:a,children:"Close"})})]})}},9730(e,s,a){a.d(s,{AdminPublications:()=>S});var l=a(8094),n=a(9307),t=a(7102),i=a(5197),r=a(292),d=a(4091),o=a(5326),c=a(8365),m=a(687),u=a(4524),h=a(8159),x=a(3790),j=a(213),p=a(5678);const g=d.Ay.h4`
491    color: ${o.lm.dark_grey_blue};
492    font-weight: bold;
493    margin-bottom: 1rem;
494`,v=d.Ay.div`
495    font-size: ${o.$N.px14};
496    color: ${o.lm.dark_grey_blue};
497    overflow-x: auto;
498`,A=d.Ay.div`
499    display: flex;
500    background-color: ${o.lm.filter_gray};
501    font-weight: bold;
502    border-bottom: 2px solid ${o.lm.very_light_grey};
503    padding: 0.5rem 0;
504`,N=d.Ay.div`
505    display: flex;
506    border-bottom: 1px solid ${o.lm.light_grey};
507    padding: 0.4rem 0;
508
509    &:hover {
510        background-color: ${o.lm.light_grey};
511    }
512`,f=d.Ay.div`
513    flex: 0 0 ${e=>{let{width:s}=e;return null!==s&&void 0!==s?s:"8%"}};
514    width: ${e=>{let{width:s}=e;return null!==s&&void 0!==s?s:"8%"}};
515    padding: 0.25rem 0.5rem;
516    word-break: break-word;
517    align-self: center;
518
519    a {
520        color: ${o.lm.cerulean};
521    }
522`,y=d.Ay.button`
523    background-color: ${o.lm.cerulean};
524    color: ${o.lm.white};
525    border: none;
526    border-radius: 4px;
527    padding: 0.2rem 0.6rem;
528    font-size: ${o.$N.px13};
529    cursor: pointer;
530
531    &:hover {
532        background-color: ${o.lm.dark_grey_blue};
533    }
534`,b=d.Ay.button`
535    background-color: ${o.lm.remove_red};
536    color: ${o.lm.white};
537    border: none;
538    border-radius: 4px;
539    padding: 0.2rem 0.6rem;
540    font-size: ${o.$N.px13};
541    cursor: pointer;
542    margin-left: 0.4rem;
543
544    &:hover {
545        background-color: ${o.lm.hover_remove_red};
546    }
547`,w=d.Ay.span`
548    color: ${o.lm.middle_grey};
549    font-size: ${o.$N.px14};
550    margin-bottom: 0.5rem;
551    display: block;
552`,S=()=>{var e,s;const[a,d]=(0,l.useState)([]),[o,S]=(0,l.useState)(!1),[D,C]=(0,l.useState)(-1),T=(0,u.Zp)(),{data:I,loading:k,error:F}=(0,m.c)("https://data.projectdatasphere.org//api/admin/publications");(0,l.useMemo)((()=>{null!=I&&d(I)}),[I]);const q=()=>{S(!1),d((e=>e.filter((e=>e.id!==D)))),C(-1)};return(0,p.jsxs)(t.A,{className:"w-100",children:[(0,p.jsx)(x.T,{title:"Delete Publication",body:"Are you sure you want to delete this publication? This action cannot be undone.",show:o,showHide:()=>{S(!o)},submitAction:async()=>{const e="https://data.projectdatasphere.org//api/admin/publications/"+D,{data:s,error:a}=await(0,j.xj)(e);null!==s?q():a&&S(!1)},primaryButtonText:"Yes, Delete",secondaryButtonText:"Cancel"}),(0,p.jsx)(i.A,{className:"mt-3",children:(0,p.jsx)(g,{children:"Publication Datasets"})}),k&&(0,p.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,p.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),F&&(0,p.jsxs)(c.UQ,{children:["Error loading publication datasets - ",null===F||void 0===F||null===(e=F.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail]}),!k&&!F&&(0===a.length?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Kp,{className:"mt-3",children:(0,p.jsx)(n.A,{md:8,lg:4,children:(0,p.jsx)(c.NB,{to:h.o+"admin/publications/edit",children:"Create New Publication"})})}),(0,p.jsx)("p",{children:"No publication datasets found."})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Kp,{className:"mt-3",children:(0,p.jsx)(n.A,{md:8,lg:4,children:(0,p.jsx)(c.NB,{to:h.o+"admin/publications/edit",children:"Create New Publication"})})}),(0,p.jsxs)(w,{children:["Total records: ",a.length]}),(0,p.jsxs)(v,{children:[(0,p.jsxs)(A,{children:[(0,p.jsx)(f,{width:"8%",children:"PDS UID"}),(0,p.jsx)(f,{width:"10%",children:"NCT ID"}),(0,p.jsx)(f,{width:"19%",children:"Title"}),(0,p.jsx)(f,{width:"14%",children:"Authors"}),(0,p.jsx)(f,{width:"10%",children:"Journal"}),(0,p.jsx)(f,{width:"8%",children:"Focus Area"}),(0,p.jsx)(f,{width:"8%",children:"Publication Date"}),(0,p.jsx)(f,{width:"14%",children:"Related NCT IDs"}),(0,p.jsx)(f,{width:"11%",children:"Actions"})]}),a.map((e=>(e=>{return(0,p.jsxs)(N,{children:[(0,p.jsx)(f,{width:"8%",children:e.pdsUid}),(0,p.jsx)(f,{width:"10%",children:e.nctId}),(0,p.jsx)(f,{width:"17%",children:e.url?(0,p.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:e.title}):e.title}),(0,p.jsx)(f,{width:"14%",children:e.authors}),(0,p.jsx)(f,{width:"10%",children:e.journal}),(0,p.jsx)(f,{width:"8%",children:e.focusArea}),(0,p.jsx)(f,{width:"8%",children:(s=e.publicationDate,s?new Date(s).toLocaleDateString("en-us",{month:"2-digit",day:"2-digit",year:"numeric"}):"")}),(0,p.jsx)(f,{width:"14%",children:e.relatedNCTIds}),(0,p.jsxs)(f,{width:"11%",children:[(0,p.jsx)(y,{onClick:()=>T(h.o+"admin/publications/edit/"+e.id),children:"Edit"}),(0,p.jsx)(b,{onClick:()=>{C(e.id),S(!0)},children:"Delete"})]})]},e.id);var s})(e)))]})]}))]})}},9789(e,s,a){a.d(s,{AdminDSARequests:()=>p});var l=a(8094),n=a(9307),t=a(7102),i=a(5197),r=a(292),d=a(4524),o=a(7860),c=a(8365),m=a(9994),u=a(8159),h=a(687),x=a(213),j=a(5678);const p=()=>{var e;const{requestType:s}=(0,d.g)(),[a,p]=(0,l.useState)([]),[g,v]=(0,l.useState)(),A="https://data.projectdatasphere.org//api/admin/donations/dsa/"+s,{data:N,loading:f,error:y}=(0,h.c)(A);(0,l.useMemo)((()=>{null!=N&&p(N)}),[N]);const b=async(e,s)=>{const a="https://data.projectdatasphere.org//api/admin/donations/dsa/download/"+e,{data:l,error:n}=await(0,x.y$)(a);if(null!==l)((e,s)=>{const a=window.URL.createObjectURL(e.data),l=document.createElement("a");l.href=a,l.setAttribute("download",s),document.body.appendChild(l),l.click(),null!==l.parentNode&&l.parentNode.removeChild(l)})(l,s);else if(n){var t;v(null===(t=n.response)||void 0===t?void 0:t.data.detail)}},w=e=>u.o+"dataShareAgreement/"+e.uuid;return(0,j.jsxs)(t.A,{className:"w-100 ",children:[(0,j.jsx)(i.A,{className:"mt-3 "}),(0,j.jsx)(m.B,{countsList:o.EE,requestType:s,countsUrl:"/api/admin/dashboard/counts/dsa"}),f&&(0,j.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,j.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),y&&(0,j.jsx)(c.UQ,{children:null===(e=y.response)||void 0===e?void 0:e.data.detail}),g&&(0,j.jsx)(c.UQ,{children:g}),N&&(s===o.K3?void 0!==a&&(null===a||void 0===a?void 0:a.length)>0?(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(n.A,{className:"mb-3",children:[(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(c.TW,{className:"mt-3",children:[(0,j.jsx)(n.A,{className:"grid-header grid-entry space-5 ",children:"Title"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Name"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry  space-3",children:"Email"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3",children:" Provider"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-2",children:"Request Date"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-2",children:"Date Approved"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry",children:"Download"})]})}),(0,j.jsx)(j.Fragment,{children:null===a||void 0===a?void 0:a.map((e=>{var s;return(0,j.jsxs)(c.TW,{className:"mb-3",children:[(0,j.jsxs)(n.A,{className:"grid-entry space-5",children:[(0,j.jsx)(c.TW,{children:(0,j.jsx)(c.Op,{to:w(e),children:e.workingTitle})}),(0,j.jsxs)(c.TW,{children:["Unique Dataset ID: ",null!=e.uniqueDatasetId?e.uniqueDatasetId:o.NA]}),(0,j.jsxs)(c.TW,{children:["Clinical Trials ID(s): ",(null===(s=e.clinicalTr
552ialId)||void 0===s?void 0:s.length)>0?e.clinicalTrialId:o.NA]}),(0,j.jsxs)(c.TW,{children:["Dataset Status:",null!=e.requestStatus?e.requestStatus:o.NA]})]}),(0,j.jsx)(n.A,{className:"grid-entry space-3",children:decodeURIComponent(e.contactName)}),(0,j.jsx)(n.A,{className:"grid-entry space-3",children:e.contactEmail}),(0,j.jsx)(n.A,{className:"grid-entry space-3 ",children:decodeURIComponent(e.companyName)}),(0,j.jsx)(n.A,{className:"grid-entry space-2 ",children:new Date(e.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,j.jsx)(n.A,{className:"grid-entry space-2 ",children:new Date(e.updatedAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,j.jsx)(n.A,{className:"grid-entry",children:(0,j.jsx)(d.N_,{to:"",onClick:()=>b(e.uuid,e.fileName),className:"linkstyle dsa",target:"_blank",children:"Download"})})]},e.uuid)}))})]})}):(0,j.jsx)(c.DV,{children:"No approved DSAs at this time"}):void 0!==a&&(null===a||void 0===a?void 0:a.length)>0?(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(n.A,{className:"mb-3",children:[(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(c.TW,{className:"mt-4",children:[(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Title"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Name"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry  space-3",children:"Email"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3 ms-5",children:" Provider"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-2",children:"Request Date"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry space-3 ",children:"Current Status"}),(0,j.jsx)(n.A,{className:"grid-header grid-entry",children:"Delete"})]})}),(0,j.jsx)(j.Fragment,{children:null===a||void 0===a?void 0:a.map((e=>(0,j.jsxs)(c.TW,{className:"",children:[(0,j.jsx)(n.A,{className:"grid-entry space-3",children:(0,j.jsx)(c.Op,{to:w(e),children:e.workingTitle})}),(0,j.jsx)(n.A,{className:"grid-entry space-3",children:e.contactName}),(0,j.jsx)(n.A,{className:"grid-entry space-3",children:e.contactEmail}),(0,j.jsx)(n.A,{className:"grid-entry space-3 ms-5",children:e.companyName}),(0,j.jsx)(n.A,{className:"grid-entry space-2",children:new Date(e.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,j.jsx)(n.A,{className:"grid-entry space-3",children:(0,j.jsx)(c.Op,{to:u.o+"admin/request/dsa/details/"+e.uuid,children:"Pending Verification"})}),(0,j.jsx)(n.A,{className:"grid-entry",children:(0,j.jsx)(c.Op,{to:u.o+"admin/request/dsa",children:"Delete"})})]},e.uuid)))})]})}):(0,j.jsx)(c.DV,{children:"No open DSA requests at this time"}))]})}},9801(e,s,a){a.d(s,{AdminUserRequestAction:()=>A});var l=a(8094),n=a(9307),t=a(7102),i=a(1506),r=a(5197),d=a(292),o=a(7714),c=a(2025),m=a(8365),u=a(7860),h=a(4524),x=a(4515),j=a(8159),p=a(687),g=a(213),v=a(5678);const A=()=>{var e;const{requestId:s,requestType:a}=(0,h.g)(),A=(0,h.Zp)(),[N,f]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[w,S]=(0,l.useState)(0),[D,C]=(0,l.useState)(""),[T,I]=(0,l.useState)(""),[k,F]=(0,l.useState)("Comments "),[q,R]=(0,l.useState)(!1),V=(0,l.useRef)(null),[U,P]=(0,l.useState)(),[E,L]=(0,l.useState)(),O="Thank you for your interest in Project Data Sphere. We regret to inform you that new United States Department of Justice regulations concerning the sharing of data with restricted countries prevents us from approving your request for access to Project Data Sphere data.   More information can be found here\nhttps://www.justice.gov/opa/pr/justice-department-implements-critical-national-security-program-protect-americans-sensitive \nThank you for your understanding.",[z,$]=(0,l.useState)(!1),{data:_,loading:G,error:W}=(0,p.c)("https://data.projectdatasphere.org//api/admin/users/request/"+s);(0,l.useMemo)((()=>{null!=_&&P(_)}),[_]);const B=()=>a===u.dy?"Request is Pending":a===u.K3?"Request has been approved":a===u.$q?"Request has been declined":void 0,M=e=>e.map((e=>(0,v.jsx)("option",{value:e.value,children:e.label},e.id))),Y=()=>{null!=V&&V.current&&(V.current.resetForm(),H())},H=()=>{b(!1),f(!1)},K=o.Ik().shape({actions:o.Yj().required("Please select an action."),rmiReason:o.Yj().when(["actions"],{is:e=>e===u.js,then:e=>e.required("Please select a reason for request more information")}),declinedReason:o.Yj().when(["actions"],{is:e=>e===u.zP,then:e=>e.required("Please select a reason for declining the request.")}),declinedOther:o.Yj().when(["declinedReason"],{is:e=>e===u.NZ,then:e=>e.required("Please enter a reason for declining.")}),comments:o.Yj().required("Please enter comments")}),Z=()=>{var e;if(void 0!==U&&void 0!==(null===U||void 0===U?void 0:U.dispositions)&&(null===U||void 0===U||null===(e=U.dispositions)||void 0===e?void 0:e.length)>0)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(m.m,{className:"mb-2 ms-4",children:"Previous Dispositions"}),Q(),J()]})},Q=()=>(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(m.TW,{className:"ms-4",children:[(0,v.jsx)(n.A,{lg:1,className:"grid-header grid-entry  ",children:"Status"}),(0,v.jsx)(n.A,{lg:2,className:"grid-header grid-entry  ",children:" User"}),(0,v.jsx)(n.A,{lg:1,className:"grid-header grid-entry ",children:"Date"}),(0,v.jsx)(n.A,{lg:4,className:"grid-header grid-entry ",children:" Reason"}),(0,v.jsx)(n.A,{lg:4,className:"grid-header grid-entry",children:"Comments"})]})}),J=()=>{var e;return(0,v.jsx)(v.Fragment,{children:null===U||void 0===U||null===(e=U.dispositions)||void 0===e?void 0:e.map((e=>{var s,a;return(0,v.jsxs)(m.TW,{className:"ms-4",children:[(0,v.jsx)(n.A,{lg:1,className:" grid-entry  ",children:e.status}),(0,v.jsx)(n.A,{lg:2,className:" grid-entry  ",children:null===(s=e.user)||void 0===s||null===(a=s.userDetails)||void 0===a?void 0:a.email}),(0,v.jsx)(n.A,{lg:1,className:" grid-entry",children:new Date(e.createdAt).toLocaleDateString("en-us",{month:"numeric",day:"numeric",year:"numeric"})}),(0,v.jsxs)(n.A,{lg:3,className:" grid-entry ",children:[e.reason," "]}),(0,v.jsx)(n.A,{lg:4,className:" grid-entry",children:e.comments})]})}))})},X=()=>(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(c.l1,{innerRef:V,enableReinitialize:!0,validationSchema:K,onSubmit:async e=>{$(!0);const l="https://data.projectdatasphere.org//api/admin/users/requestaction/"+s,{data:n,error:t}=await(0,g.Yz)(l,JSON.stringify({actions:e.actions,rmiReason:e.rmiReason,declinedReason:e.declinedReason,declinedOther:e.declinedOther,comments:e.comments}));if(null!==n)$(!1),A(j.o+"admin/request/users/"+a);else if(t){var i;$(!1),L(null===(i=t.response)||void 0===i?void 0:i.data.detail)}},initialValues:{actions:null!==T&&void 0!==T?T:"",rmiReason:"",declinedReason:"",declinedOther:"",comments:null!==D&&void 0!==D?D:""},validateOnChange:!1,validateOnBlur:!1,children:e=>{let{handleSubmit:s,handleChange:a,values:l,touched:t,errors:d}=e;return(0,v.jsxs)(i.A,{className:"form-layout",onSubmit:s,noValidate:!0,children:[(0,v.jsx)(m.$8,{lg:12,children:(0,v.jsxs)(m.$8,{lg:8,children:[(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formAction",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Actions "}),(0,v.jsx)(i.A.Select,{size:"sm",name:"actions",value:l.actions,isValid:t.actions&&!d.actions,onChange:e=>{var s;s=e.target.value,I(s),C(s),s===u.js||s===u.zP?F("Comments (External to User)"):F("Comments (Internal Only)"),s===u.js?(f(!0),b(!1)):s===u.zP?(b(!0),f(!1)):(b(!1),f(!1)),a(e)},children:M(u.QJ)}),(0,v.jsx)(i.A.Text,{className:"text-muted"}),(0,v.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action."}),(0,v.jsx)(c.Kw,{name:"actions",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),N&&(0,v.jsx)(r.A,{className:" justify-content-center mt-3 mb-3 mx-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formAction",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"RMI Reason "}),(0,v.jsx)(i.A.Select,{size:"sm",name:"rmiReason",isValid:t.rmiReason&&!d.rmiReason,onChange:a,children:M(u.WH)}),(0,v.jsx)(i.A.Text,{className:"text-muted"}),(0,v.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,v.jsx)(c.Kw,{name:"rmiReason",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),y&&(0,v.jsx)(r.A,{className:" justify-content-center mt-3 mb-3 mx-3",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,controlId:"formAction",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Decline Reason "}),(0,v.jsx)(i.A.Select,{size:"sm",name:"declinedReason",isValid:t.declinedReason&&!d.declinedReason,onChange:e=>{(e=>{if(e===u.NZ)R(!0);else if(e===u.Fo){var s;null===(s=V.current)||void 0===s||s.setFieldValue("comments",O),S(465),R(!1)}else R(!1)})(e.target.value),a(e)},children:M(u.zO)}
552),(0,v.jsx)(i.A.Text,{className:"text-muted"}),(0,v.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,v.jsx)(c.Kw,{name:"declinedReason",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),q&&(0,v.jsx)(r.A,{className:"justify-content-center mt-3 mb-3 mx-4",children:(0,v.jsxs)(i.A.Group,{as:n.A,className:"otherFieldGroup",lg:8,controlId:"formDeclinedOther",children:[(0,v.jsx)(i.A.Label,{className:"required",column:"sm",children:"Other Declined "}),(0,v.jsx)(i.A.Control,{size:"sm",required:!0,name:"declinedOther",type:"text",isValid:t.declinedOther&&!d.declinedOther,onChange:a}),(0,v.jsx)(i.A.Text,{className:"text-muted"}),(0,v.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please provide a reason for declining."}),(0,v.jsx)(c.Kw,{name:"declinedOther",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})}),(0,v.jsx)(r.A,{className:"mt-3 mb-3 justify-content-center",children:(0,v.jsxs)(i.A.Group,{as:n.A,lg:8,className:"mb-3",controlId:"formComments",children:[(0,v.jsxs)(m.AK,{children:[(0,v.jsxs)(i.A.Label,{className:"required",column:"sm",children:[k," "]}),(0,v.jsxs)("span",{children:[w," of ",1e3," characters"]})]}),(0,v.jsx)(i.A.Control,{as:"textarea",rows:5,size:"sm",required:!0,name:"comments",type:"text",value:l.comments,isValid:t.comments&&!d.comments,onChange:e=>{S(e.target.value.length),a(e)}}),(0,v.jsx)(i.A.Control.Feedback,{type:"invalid",children:"Please select an action"}),(0,v.jsx)(c.Kw,{name:"comments",render:e=>(0,v.jsx)("div",{className:"form-error-msg",children:e})})]})})]})}),(0,v.jsx)(x.E,{handleReset:Y,enableClear:!0,isSubmitting:z,submitButtonText:u.XD})]})}})});return(0,v.jsx)(t.A,{className:"form-container",fluid:!0,children:(0,v.jsx)(m.NE,{name:"content-page",children:(0,v.jsx)(m.ff,{name:"page-wrapper",children:(0,v.jsxs)(m.$8,{children:[G&&(0,v.jsx)(d.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,v.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),W&&(0,v.jsx)(m.UQ,{children:null===(e=W.response)||void 0===e?void 0:e.data.detail}),E&&(0,v.jsx)(m.UQ,{children:E}),U&&(a===u.$q?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(n.A,{className:"mb-5",children:[(0,v.jsxs)(m.m,{className:"mt-2 mb-3 ms-4",children:["Current Status: ",B()]}),(0,v.jsxs)(r.A,{className:"justify-content-between ms-3 w-50 ",children:[(0,v.jsxs)(n.A,{className:"",children:["Name: ",(null===U||void 0===U?void 0:U.user.userDetails.first)+" "+(null===U||void 0===U?void 0:U.user.userDetails.last)]}),(0,v.jsxs)(n.A,{children:["Email: ",null===U||void 0===U?void 0:U.user.userDetails.email]})]})]}),(0,v.jsx)(n.A,{className:"mt-5",children:Z()})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(n.A,{className:"",children:[(0,v.jsxs)(m.m,{className:"mt-2 mb-2 ms-4",children:["Current Status: ",B()]}),(0,v.jsxs)(r.A,{className:"justify-content-between ms-3 w-50 ",children:[(0,v.jsxs)(n.A,{className:"",children:["Name: ",(null===U||void 0===U?void 0:U.user.userDetails.first)+" "+(null===U||void 0===U?void 0:U.user.userDetails.last)]}),(0,v.jsxs)(n.A,{children:["Email: ",null===U||void 0===U?void 0:U.user.userDetails.email]})]})]}),X(),Z()]}))]})})})})}},9994(e,s,a){a.d(s,{B:()=>j});
552var l=a(8094),n=a(3841),t=a(8962),i=a(5197),r=a(292),d=a(4091),o=a(4524),c=a(7860),m=a(687),u=a(8365),h=a(5678);const x=(0,d.Ay)(n.A)`
553    width: 30%;
554    color: #0694D5;
555    font-weight: bold;
556    background-color: white !important;
557    border: 2px solid #B2B2B2;
558
559    &:focus {
560        //border-color: #0694D5;
561        color: #0694D5;
562    }
563
564    &:hover {
565        color: #0694D5;
566    }
567`,j=e=>{var s;let{countsList:a,requestType:n,countsUrl:d}=e;const j=(0,o.Zp)(),[p,g]=(0,l.useState)(),v="https://data.projectdatasphere.org/"+d,{data:A,loading:N,error:f}=(0,m.c)(v);(0,l.useMemo)((()=>{null!=A&&g(A)}),[A]);const y=e=>{if(e===c.Js||e===c.GD||e===c.IZ){let e=null===p||void 0===p?void 0:p.filter((e=>e.status===c.GD||e.status===c.Js||e.status===c.IZ));if(void 0!==e&&e.length>0){let s=0;for(let a=0;a<e.length;a++)s+=e[a].count;return"("+s+")"}return"(0)"}{let s=null===p||void 0===p?void 0:p.find((s=>s.status===e));return void 0!==s?"("+(null===s||void 0===s?void 0:s.count)+")":"(0)"}};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.A,{className:"mt-3 "}),N&&(0,h.jsx)(r.A,{className:"spinner-center",animation:"border",variant:"primary",role:"status",children:(0,h.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),f&&(0,h.jsx)(u.UQ,{children:null===(s=f.response)||void 0===s?void 0:s.data.detail}),A&&(0,h.jsx)(t.A,{className:"w-100  ",children:a.map((e=>{return(0,h.jsxs)(x,{className:(s=e.type,a=e.className,s===n?" border-active "+a:"border-inactive "+a),onClick:()=>{j(e.navigateUrl)},variant:"light",children:[e.label," ",y(e.type),(0,h.jsx)("img",{className:"ms-3 text-center",src:e.image,alt:e.alt,width:"24",height:"24"})]},e.id);var s,a}))})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.