PageSourceSearch

https://researchpal-test.web.app/static/js/7873.69a1055a.chunk.js

js researchpal-test.web.app collected 2026-10-03 12:34:46 UTC 21,311 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkresearchpal=globalThis.webpackChunkresearchpal||[]).push([[7873],{59568(e,t,o){var n=o(65043),s=o(36910),i=o(10885),a=o(7353),r=o(38978),l=o(34535),c=o(70579);const d=(0,l.A)(({className:e,...t})=>(0,c.jsx)(i.A,{...t,classes:{popper:e}}))({[`& .${r.A.tooltip}`]:{background:"#ffffff",fontFamily:"Raleway",fontWeight:500,color:"#353535",boxShadow:"0px 2px 4px 0px #0000002E",textAlign:"center",padding:"10px 20px",fontSize:"14px"},[`& .${r.A.arrow}`]:{color:"#ffffff"}}),x=({text:e,file:t=""})=>{const[o,i]=(0,n.useState)(!1),[r,l]=(0,n.useState)(!1);return(0,c.jsx)(a.A,{sx:{background:"#3535351A",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px"},children:(0,c.jsx)(d,{open:r,arrow:!0,title:"Copied !",children:(0,c.jsx)(s.A,{sx:{mx:.8,fontSize:"20px",color:"#35353599",cursor:"pointer","&:hover":{color:"#353535"}},onClick:()=>{l(!0),setTimeout(()=>{l(!1)},1e3),navigator.clipboard.writeText(e).then(()=>{i(!0)}).catch(e=>{console.error("Failed to copy text: ",e)})}})})})};o.d(t,["A",0,x])},57873(e,t,o){o.r(t),o.d(t,{default:()=>ee});var n=o(65043),s=o(51387),i=o(83560),a=o(98440),r=o(2081),l=o(7353),c=o(53193),d=o(51962),x=o(43845),p=o(17392),u=o(32143),f=o(82851),h=o(79190),g=o(69285),m=o(34535),A=o(94496),b=o(79456),j=o(92878);const y=o.p+"static/media/references.7622b0bfd80c9f32758811da1ce8f8ec.svg";var F=o(80280),S=o(59568),v=o(47098),w=o(81591),C=o(54464),k=o(79630),I=o(43993),R=o(6234),E=o(33438),D=o(83462),z=o(11906),O=o(81637),T=o(26600),W=o(35316),H=o(15795),M=o(14212),L=o(73216),P=o(90973),B=o(17802),N=o(47871),q=o(71589),V=o(23131),J=o(70579);const Y=({handleClose:e,open:t,data:o,onDuplicateRefs:s})=>{const i=(0,L.Zp)(),[a,r]=(0,n.useState)(""),[c,d]=(0,n.useState)(!1),[x,u]=(0,n.use
1State)(!1),[h,g]=(0,n.useState)("");console.log("ref",h);const[m,y]=(0,n.useState)(!1),[F,S]=(0,n.useState)(!1);console.log("isLimit",F);const v=(0,b.wA)(),w=()=>{let e=[];for(const[t,o]of Object.entries(h))e.push(o);return e};console.log("formats()",w());const C=()=>{v((0,V.jX)()),localStorage.clear(),v((0,M.lM)()),v((0,B.OM)()),v((0,N.cI)()),v((0,q.JP)()),i("/")};return(0,J.jsx)("div",{children:(0,J.jsxs)(D.A,{onClose:e,"aria-labelledby":"customized-abstract-title",open:t,maxWidth:"sm",sx:{padding:"0px !important","& .MuiDialog-paper":{borderRadius:"16px",width:"100%"}},children:[(0,J.jsx)(T.A,{fontSize:12,fontWeight:600,fontFamily:"Raleway",id:"customized-abstract-title",sx:{scrollBehavior:"smooth",scrollMarginTop:"100px"},children:"ADD MANUAL CITATION"}),(0,J.jsx)(p.A,{"aria-label":"close",onClick:e,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,J.jsx)(E.A,{})}),(0,J.jsx)(W.A,{dividers:!0,sx:{padding:"10px",width:"100%"},children:h?(0,J.jsx)(D.A,{open:x,fullWidth:!0,maxWidth:"sm",children:(0,J.jsx)(W.A,{children:(0,J.jsxs)(f.A,{spacing:5,children:[(0,J.jsx)(A.A,{variant:"h6",children:"Paper Citation:"}),(0,J.jsxs)(l.A,{children:[""===h&&(0,J.jsx)(A.A,{sx:{textAlign:"center"},children:"No Citation found"}),h&&w().filter(e=>!e.includes("http")).map(e=>(0,J.jsx)(A.A,{sx:{textAlign:"center"},children:e}))]}),m&&(0,J.jsx)(f.A,{alignItems:"center",justifyContent:"center",children:(0,J.jsx)(O.A,{size:30,color:"success"})}),(0,J.jsxs)(f.A,{direction:"row",width:"100%",justifyContent:"space-between",children:[(0,J.jsx)(z.A,{size:"small",variant:"contained",sx:{textTransform:"none",background:"#ffffff !important",color:"#353535"},onClick:()=>{e()},children:"Cancel"}),F?(0,J.jsx)(z.A,{size:"small",variant:"contained",sx:{textTransform:"none",background:"#1E4F6B !important"},onClick:()=>{i("/subscription")},children:"Upgrade Subscription"}):(0,J.jsx)(z.A,{size:"small",variant:"contained",sx:{textTransform:"none",background:"#1E4F6B !important"},onClick:async()=>{try{const t=localStorage.getItem("projectId");let o={researchProjectId:t},n=o.references||{};const i=Object.keys(h)[0],a=h[i];n[i]=a,o.references=n,o.link=h.link;const r=await(0,j.R9)(o),l=null===r||void 0===r?void 0:r.existingRefs;if(console.log("API raw response:",r),console.log("existingRefs value:",l,"type:",typeof l,"length:",null===l||void 0===l?void 0:l.length),Array.isArray(l)&&l.length>0)return console.log("existingRefs found:",l),(0,k.A)("info","Citation already exists and is highlighted below."),s&&(console.log("Calling onDuplicateRefs with:",l),s(l)),void setTimeout(()=>{e()},1500);v((0,R.Af)()),v((0,R.tW)(t)),y(!1),e()}catch(t){(0,k.A)("error","Error")}},children:"Add to Citations"})]})]})})}):(0,J.jsxs)("form",{onSubmit:e=>{let t=localStorage.getItem("token"),o="";t&&"undefined"!=t&&(o=t),e.preventDefault(),d(!0);const n=setTimeout(()=>{(0,j.Oq)({user:localStorage.getItem("email"),feature:"Manual Reference",error:"20 seconds",query:a,delayInResponse:!0})},2e4),s={manualReference:!0,email:localStorage.getItem("email"),title:a,token:o},i=new Headers;i.append("Content-Type","application/json"),i.append("Access-Control-Allow-Origin","http://localhost:3000"),i.append("Access-Control-Allow-Origin","https://researchpal.co/"),i.append("Access-Control-Allow-Methods","GET, POST, PUT, DELETE");const r={method:"POST",headers:i,body:JSON.stringify(s),redirect:"follow"};fetch(`${P.baseDomain}/script`,r).then(e=>e.text()).then(e=>{clearTimeout(n),d(!1);const t=JSON.parse(e);if(console.log("Parsed response:",t),"Invalid Session Id! You might be logged in from two different devices"===t.data.error||"Token is empty!"==t.data.error)(0,k.A)("info","Session has expired login again"),C();else if(t.data.sourceObj.error&&""==t.data.response){if("Citation generator limit reached. Please upgrade your subscription for more."===t.data.sourceObj.error)return S(!0),g(t.data.sourceObj),void u(!0);(0,k.A)("error",t.data.sourceObj.error),(0,j.Oq)({user:localStorage.getItem("email"),feature:"Manual Reference",error:t.data.sourceObj.error,query:a})}else{if("Something went wrong!"===t.data.response)return void(0,j.Oq)({user:localStorage.getItem("email"),feature:"Manual Reference",error:t.data.response,query:a});g(t.data.sourceObj),u(!0)}})},children:[(0,J.jsx)(l.A,{sx:{marginY:1},children:(0,J.jsx)(f.A,{children:(0,J.jsx)(H.A,{id:"title-of-article",label:"Title of Article",variant:"outlined",size:"small",value:a,onChange:e=>r(e.target.value)})})}),(0,J.jsx)(l.A,{sx:{marginY:1},children:(0,J.jsx)(f.A,{children:(0,J.jsx)(z.A,{variant:"contained",type:"submit",size:"small",sx:{background:"linear-gradient(90deg, #5671F1 0%, rgba(23, 206, 173, 1) 100%) !important","&:hover":{background:"linear-gradient(90deg, #3950CE 0%, #15C3A3 100%)",boxShadow:"none"},fontFamily:"Raleway",fontSize:"10px",fontWeight:500,height:"40px !important",color:"#353535",textTransform:"none",padding:"6px 12px !important"},children:c?(0,J.jsx)(O.A,{size:20}):"Submit"})})})]})})]})})};var U=o(29347),Z=o(87683);const $=function({open:e,onClose:t,reference:o,onSubmit:s,editLoading:i}
1){const[a,r]=(0,n.useState)(o);return(0,J.jsxs)(D.A,{open:e,onClose:t,maxWidth:"sm",sx:{padding:"0px !important","& .MuiDialog-paper":{borderRadius:"16px",width:"100%"}},children:[(0,J.jsx)(T.A,{sx:{textAlign:"center",fontFamily:"'Red Hat Display'",fontWeight:600},children:"Edit Citation"}),(0,J.jsx)(W.A,{children:(0,J.jsx)(H.A,{autoFocus:!0,margin:"dense",id:"title",name:"title",label:"Citation Title",type:"text",fullWidth:!0,value:a,onChange:e=>{const{name:t,value:o}=e.target;r(o)},sx:{"& .MuiInputBase-input":{fontFamily:"'Red Hat Display'"},"& .MuiInputLabel-root":{fontFamily:"'Red Hat Display'"}}})}),(0,J.jsxs)(U.A,{children:[(0,J.jsx)(z.A,{size:"small",variant:"contained",sx:{textTransform:"none",background:"#ffffff !important",color:"#353535",fontFamily:"'Red Hat Display'",boxShadow:"none"},onClick:t,children:"Cancel"}),(0,J.jsx)(z.A,{size:"small",variant:"contained",sx:{textTransform:"none",background:"#2563EB !important",fontFamily:"'Red Hat Display'",boxShadow:"none","&:hover":{background:"#1d4ed8 !important"}},onClick:()=>{s(a)},children:i?(0,J.jsxs)(f.A,{direction:"row",sx:{display:"flex",alignItems:"center",justifyContent:"center"},spacing:1,children:[(0,J.jsx)(Z.pf,{height:"20px",width:"20px",color:"#fff",ariaLabel:"tail-spin-loading",radius:"1",visible:!0}),(0,J.jsx)(A.A,{fontSize:"10px",sx:{fontFamily:"'Red Hat Display'"},children:"Saving ..."})]}):"Save"})]})]})};var X=o(45350),_=o(10885);const G=(0,m.A)(A.A)({fontFamily:"'Red Hat Display'",fontSize:"10px",fontWeight:500,color:"#353535CC"}),K=(0,m.A)(l.A)(({theme:e})=>({width:"100%",background:"#F8F9FB",minHeight:"100vh",borderRadius:"4px",display:"flex",flexDirection:"column"})),Q=(0,m.A)(u.A)({fontFamily:"'Red Hat Display'"});const ee=function({data:e}){var t;const o=(0,L.Zp)(),u=(0,b.wA)(),m=(0,L.zy)(),{refFormats:E,loading:D}=(0,b.d4)(e=>e.refs);console.log("RefFormats:",E," and",Object.keys(E).length),console.log("Type of refFormat is:",typeof E);const{user:z}=(0,b.d4)(e=>e.user),{canEdit:O}=(0,X.S)(),[T,W]=(0,n.useState)({loading:!1,checked:[],delete:!1,filesData:[],selected:[],selectedDOIs:{}}),[H,M]=(0,n.useState)(!1),[P,B]=(0,n.useState)(""),[N,q]=(0,n.useState)(!1),[V,U]=(0,n.useState)(!1),[Z,ee]=(0,n.use
1State)(!1),[te,oe]=(0,n.useState)(null),[ne,se]=(0,n.useState)(!1),[ie,ae]=(0,n.useState)(null),[re,le]=(0,n.useState)(localStorage.getItem("selectedFormat")||"apa"),[ce,de]=(0,n.useState)(null),[xe,pe]=(0,n.useState)(null),ue=(0,n.useRef)({}),[fe,he]=(0,n.useState)([]);(0,n.useEffect)(()=>{window.fbq&&window.fbq("track","PageView",{page:m.pathname,title:"Reference"})},[m]),(0,n.useEffect)(()=>{window.ttq&&window.ttq.track("ViewContent",{page:m.pathname,title:"Reference"})},[m]),(0,n.useEffect)(()=>{E||u((0,R.tW)(localStorage.getItem("projectId")))},[]),(0,n.useEffect)(()=>{var e;if(null!==(e=m.state)&&void 0!==e&&e.highlightDuplicate)if(m.state.duplicateRefs&&Array.isArray(m.state.duplicateRefs))he(m.state.duplicateRefs),o(m.pathname,{replace:!0});else if(m.state.duplicateTitle){const e=m.state.duplicateTitle;if(E){let t=null;for(const[o,n]of Object.entries(E)){const s=["reference","apa","mla","chicago","harvard"];for(const i of s)if(n[i]&&n[i].toLowerCase().includes(e.toLowerCase())){t=o;break}if(t)break}t&&(pe(t),setTimeout(()=>{ue.current[t]&&ue.current[t].scrollIntoView({behavior:"smooth",block:"center"})},100),setTimeout(()=>{pe(null)},5e3),o(m.pathname,{replace:!0}))}}},[m.state,E,o,m.pathname]);const ge=()=>{U(e=>!e),q(!1)},me=()=>{let e=[];const t=new Set;for(const o of Object.values(E)){const n=o[re]||o.reference;if(!n)continue;const s=String(n).replace(/\s+/g," ").trim().toLowerCase();t.has(s)||(t.add(s),e.push(n))}return e};console.log("Filtered",me());const Ae=e=>{let t=null;for(const[o,n]of Object.entries(E))if(n[re]===e||n.reference===e){t=o;break}return t};return(0,n.useEffect)(()=>{if(!E||!fe||0===fe.length)return;const e=e=>e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();let t=[];if(fe.forEach(o=>{const n=e(o);for(const[s,i]of Object.entries(E)){const o=["reference","apa","mla","chicago","harvard"];
1for(const a of o)if(i[a]){const o=e(i[a]);if(o.includes(n)||n.includes(o)){t.push(s);break}}}}),t.length>0){(async e=>{for(let t=0;t<e.length;t++){const o=e[t];de(o),setTimeout(()=>{ue.current[o]&&ue.current[o].scrollIntoView({behavior:"smooth",block:"center"})},100),await new Promise(e=>setTimeout(e,2e3)),de(null)}})(t)}he([])},[E,fe]),(0,J.jsxs)(K,{sx:{padding:{xs:"16px 8px",md:"16px 32px"}},children:[(0,J.jsx)(w.A,{place:"Search citations...",val:P,onChange:e=>{const{value:t}=e.target;B(t)}}),!E&&(0,J.jsx)(f.A,{sx:{display:"flex",alignItems:"flex-end",justifyContent:"flex-end",marginTop:"16px"}}),(0,J.jsxs)(l.A,{children:[D&&(0,J.jsx)(l.A,{sx:{mt:5},children:(0,J.jsx)(C.A,{})}),!D&&!E&&(0,J.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"75vh"},children:[(0,J.jsx)("img",{src:y,alt:""}),(0,J.jsx)(A.A,{sx:{fontFamily:"'Red Hat Display'",fontSize:"16px",fontWeight:500,color:"#4E4E4E",my:1},children:"No citations found"})]}),!D&&E&&(0,J.jsxs)(l.A,{sx:{my:{xs:"12px",sm:"16px"},display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},children:[(0,J.jsxs)(l.A,{sx:{width:{xs:"100%",sm:"fit-content"},display:"flex",justifyContent:"space-between",alignItems:"center",mb:{xs:2,sm:0}},children:[(0,J.jsx)(G,{sx:{my:1.6,fontSize:"12px",fontWeight:600,mx:1,fontFamily:"'Red Hat Display'"},children:"Citations :"}),(0,J.jsxs)(l.A,{sx:{display:"flex",alignItems:"center"},children:[(0,J.jsx)(l.A,{sx:{mx:{xs:0,sm:1}},children:(0,J.jsx)(_.A,{title:O?"Delete All":"\ud83d\udd12 Read-only access",children:(0,J.jsx)("span",{style:{cursor:O?"pointer":"not-allowed"},children:(0,J.jsx)(F.A,{onClick:O?()=>{q(!0),U(!1)}:void 0,style:{opacity:O?1:.5,pointerEvents:O?"auto":"none"}})})})}),T.selected.length>0&&(0,J.jsx)(_.A,{title:O?"Delete Selected":"\ud83d\udd12 Read-only access",children:(0,J.jsx)("span",{style:{cursor:O?"pointer":"not-allowed"},children:(0,J.jsx)(s.A,{sx:{color:O?"#E25050":"#ccc",cursor:O?"pointer":"not-allowed",ml:{xs:2,sm:0}},onClick:O?ge:void 0})})})]})]}),(0,J.jsxs)(c.A,{sx:{minWidth:{xs:"100px",sm:"150px",md:"200px"}},size:"small",children:[(0,J.jsx)(h.A,{sx:{fontFamily:"'Red Hat Display'","&::after":{content:{xs:'"Pick Format"',sm:'"Select Format"'},display:"inline-block"}}}),(0,J.jsxs)(g.A,{size:"small",value:re,label:"Select Format",onChange:e=>{const{value:t}=e.target;le(t),localStorage.setItem("selectedFormat",t)},sx:{fontFamily:"'Red Hat Display'",fontSize:{xs:"13px",sm:"16px"},background:"#F6F7F9","& .MuiOutlinedInput-notchedOutline":{border:"none"},borderRadius:"12px"},MenuProps:{PaperProps:{sx:{boxShadow:"0px 4px 12px rgba(0,0,0,0.15)",borderRadius:"12px",mt:.5}}},children:[(0,J.jsx)(Q,{value:"apa",children:"APA"}),(0,J.jsx)(Q,{value:"mla",children:"MLA"}),(0,J.jsx)(Q,{value:"chicago",children:"Chicago"}),(0,J.jsx)(Q,{value:"harvard",children:"Harvard"})]})]})]}),(0,J.jsxs)(l.A,{sx:{maxHeight:"75vh",overflow:"auto"},children:[(0,J.jsx)("style",{children:"\n  @keyframes blink {\n    0%, 50% {\n      background-color: #FFF9C4;\n      border: 2px solid #FFC107;\n      box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);\n    }\n    25%, 75% {\n      background-color: #FFFDE7;\n      border: 2px solid #FFD54F;\n      box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);\n    }\n    100% {\n      background-color: #FFFFFF;\n      border: 1px solid #E7EAF1;\n      box-shadow: none;\n    }\n  }\n"}),E&&(null===(t=me())||void 0===t?void 0:t.map((e,t)=>{var o,n;const s=Ae(e),c=Array.isArray(ce)&&ce[0]===s,u=(Array.isArray(ce)?ce.includes(s):ce===s)||xe===s,h=(e=>{if(!e)return null;const t=e.match(/https?:\/\/[^\s,)]+/);return t?t[0]:null})(e)||(null===(o=E[s])||void 0===o?void 0:o.link)||(null===(n=E[s])||void 0===n?void 0:n.url)||null;(g=h)&&(g.includes("10.1145")||g.includes("acm.org")||g.includes("10.48550")||g.includes("arxiv.org")||g.includes("ARXIV")||g.includes("10.1109")||g.includes("ieee.org")||g.includes("10.1007")||g.includes("springer")||g.includes("10.1016")||g.includes("sciencedirect")||g.includes("10.1038")||g.includes("nature.com")||g.includes("10.1126")||g.includes("science.org")||g.includes("pubmed")||g.includes("ncbi.nlm.nih.gov")||g.includes("semanticscholar")||g.includes("researchgate"));var g;
1const m=Boolean(h);return(0,J.jsxs)(l.A,{ref:e=>ue.current[s]=e,sx:{display:"flex",alignItems:"flex-start",mb:1.5,...c&&{border:"2px solid red",borderRadius:"16px"}},children:[(0,J.jsx)(d.A,{size:"small",disableRipple:!0,checked:!!T.selectedDOIs[s],onChange:()=>(e=>{let t=Ae(e);if(void 0!==T.selectedDOIs[t]){let e=JSON.parse(JSON.stringify(T.selectedDOIs));delete e[t],W(o=>({...o,selectedDOIs:e,selected:T.selected.filter(e=>e!==t)}))}else{let e=JSON.parse(JSON.stringify(T.selectedDOIs));e[t]=t,W(o=>({...o,selectedDOIs:e,selected:[...T.selected,t]}))}})(e),sx:{mt:"14px"}}),(0,J.jsxs)(l.A,{sx:{flex:1,background:"#FFFFFF",border:u?void 0:m?"1px solid #D1FAE5":"1px solid #E7EAF1",borderRadius:"14px",overflow:"hidden",position:"relative",transition:"all 0.18s ease","&:hover":{borderColor:m?"#6EE7B7":"#C7D2FE",boxShadow:"0 4px 18px rgba(0,0,0,0.06)",transform:"translateY(-1px)"},...u&&{animation:"blink 5s ease-in-out",animationFillMode:"forwards"}},children:[(0,J.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:"4px",background:m?"linear-gradient(180deg, #10B981 0%, #34D399 100%)":"linear-gradient(180deg, #EF4444 0%, #FCA5A5 100%)",borderRadius:"14px 0 0 14px"}}),(0,J.jsxs)(l.A,{sx:{pl:"18px",pr:"18px",pt:"14px",pb:"13px"},children:[(0,J.jsxs)(l.A,{sx:{display:"flex",alignItems:"flex-start",gap:1,mb:1.2},children:[(0,J.jsx)(l.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"#EEF2FF",color:"#4338CA",fontWeight:700,fontSize:"11px",borderRadius:"6px",minWidth:"22px",height:"20px",padding:"0 6px",fontFamily:"'Red Hat Display'",flexShrink:0,mt:"2px"},children:t+1}),(0,J.jsx)(A.A,{sx:{flex:1,fontSize:"13.5px",lineHeight:1.75,color:"#1E293B",fontFamily:"'Red Hat Display'",fontWeight:400},children:e}),m?(0,J.jsx)(x.A,{icon:(0,J.jsx)(a.A,{sx:{fontSize:"13px !important",color:"#059669 !important"}}),label:"Source Linked",size:"small",sx:{height:"22px",fontSize:"11px",fontWeight:600,fontFamily:"'Red Hat Display'",color:"#059669",background:"#ECFDF5",border:"1px solid #A7F3D0",flexShrink:0,"& .MuiChip-icon":{ml:"5px"},"& .MuiChip-label":{px:"6px"}}}):(0,J.jsx)(x.A,{label:"No Link",size:"small",sx:{height:"22px",fontSize:"11px",fontFamily:"'Red Hat Display'",color:"#64748B",background:"#F1F5F9",border:"1px solid #E2E8F0",flexShrink:0,"& .MuiChip-label":{px:"7px"}}})]}),(0,J.jsxs)(l.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pt:1,borderTop:"1px solid #F1F5F9"},children:[(0,J.jsx)(l.A,{children:h?(0,J.jsxs)(l.A,{component:"a",href:h,target:"_blank",rel:"noopener noreferrer",sx:{display:"inline-flex",alignItems:"center",gap:"5px",textDecoration:"none",fontSize:"11.5px",fontWeight:600,fontFamily:"'Red Hat Display'",color:"#2563EB",background:"#EFF6FF",border:"1px solid #BFDBFE",borderRadius:"8px",px:1.3,py:.5,transition:"all 0.15s ease","&:hover":{background:"#DBEAFE",borderColor:"#93C5FD",boxShadow:"0 1px 4px rgba(37,99,235,0.12)"}},children:[(0,J.jsx)(r.A,{sx:{fontSize:"13px"}}),"View Source"]}):(0,J.jsx)(x.A,{label:"No Link",size:"small",sx:{height:"22px",fontSize:"11px",fontFamily:"'Red Hat Display'",color:"#64748B",background:"#F1F5F9",border:"1px solid #E2E8F0","& .MuiChip-label":{px:"7px"}}})}),(0,J.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,J.jsx)(_.A,{title:O?"Edit":"\ud83d\udd12 Read-only access",children:(0,J.jsx)("span",{style:{cursor:O?"default":"not-allowed"},children:(0,J.jsx)(p.A,{"aria-label":"edit",size:"small",disabled:!O,disableRipple:!0,sx:{opacity:O?1:.5,pointerEvents:O?"auto":"none",color:"#94A3B8",borderRadius:"7px","&:hover":{color:"#2563EB",background:"#EFF6FF"}},onClick:()=>{return e=E[s].harvard,t=s,ee(!0),oe(e),void ae(t);var e,t},children:(0,J.jsx)(i.A,{sx:{fontSize:"16px"}})})})}),(0,J.jsx)(S.A,{text:e,file:"refs"})]})]})]})]})]},t)}))]})]}),V&&(0,J.jsx)(v.A,{onSuccess:async()=>{console.log("state.selected:",T.selected);try{var e,t,o;U(e=>!e),W(e=>({...e,loading:!0}));let n=await I.A.research({request:{method:"deleteReferences",data:{email:localStorage.getItem("email"),title:localStorage.getItem("projectTitle"),referenceIds:T.selected,pdfAbstractIds:[]}}});null!==n&&void 0!==n&&null!==(e=n.data)&&void 0!==e&&null!==(t=e.response)&&void 0!==t&&null!==(o=t.data)&&void 0!==o&&o.id?((0,k.A)("success","Citations deleted successfully"),u((0,R.tW)(localStorage.getItem("projectId"))),W(e=>({...e,loading:!1,selected:[],selectedDOIs:{}}))):(0,k.A)("error","Error")}catch(n){console.log("err:",n),W(e=>({...e,loading:!0}))}},onClose:ge,loading:T.loading}),N&&(0,J.jsx)(v.A,{onSuccess:async()=>{const e={_id:localStorage.getItem("projectId"),references:{},referenceFormats:{}};(await(0,j.Wr)(e)).researchProjectId&&((0,k.A)("success","All Citations deleted"),u((0,R.tW)(localStorage.getItem("projectId"))),q(!1))},onClose:()=>{q(e=>!e)},loading:T.loading}),H&&(0,J.jsx)(Y,{handleClose:()=>M(!1),open:H,data:e,onDuplicateRefs:e=>{he(e)}}),Z&&(0,J.jsx)($,{open:Z,onClose:()=>ee(!1),reference:te,onSubmit:async e=>{console.log("editedReference:",e);const t=Ae(te);console.log("checkReference(editReference):",t),se(!0);try{(await(0,j.rw)({researchProjectId:localStorage.getItem("projectId"),reference:e,key:ie})).researchProjectId?((0,k.A)("success","Citation updated successfully"),se(!1),ee(!1),u((0,R.tW)(localStorage.getItem("projectId")))):((0,k.A)("error","Error updating citation"),se(!1))}catch(o){console.log("Error updating citation:",o),se(!1)}},editLoading:ne})]})}},83560(e,t,o){var n=o(59662),s=o(70579);const i=(0,n.A)((0,s.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");o.d(t,["A",0,i])},98440(e,t,o){var n=o(59662),s=o(70579);const i=(0,n.A)((0,s.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");o.d(t,["A",0,i])}}]);
2//# sourceMappingURL=7873.69a1055a.chunk.js.map

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.