PageSourceSearch

https://www.clientpoint.me/_next/static/chunks/pages/email/%5BemailId%5D-cb552ec609e21e07.js

js clientpoint.me collected 2026-10-02 07:13:33 UTC 9,114 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7346],{23283:function(e,n,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/email/[emailId]",function(){return l(39860)}])},39860:function(e,n,l){"use strict";l.r(n),l.d(n,{EmailPage:function(){return p}});var t=l(52322),i=l(10495),a=l(5632),c=l(57675),s=l(2784),r=l(94449),d=l(69745),o=l(95207),u=l(12910),m=l(66773),h=l(90047);function p(){let e=(0,a.useRouter)(),n=(0,r.I0)(),l=(0,r.v9)(e=>e.auth),[p,x]=(0,s.useState)([]),[v,f]=(0,s.useState)(!0),[g,N]=(0,s.useState)("Hi, I set up a private workspace for you and me on ClientPoint. This is where we can chat, schedule, meet, share content (files, links, pictures, videos etc.), sign contracts etc. all in one place."),[j,k]=(0,s.useState)([]),{emailId:w,titleMessage:y}=e.query,I=(0,s.useCallback)(async()=>{var n,t,i,a,c,s;try{let i=await o.zk.get(u.eb+"/user/email?email="+encodeURIComponent(String(w))),a=null==i?void 0:null===(t=i.data)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.userId;if(l.userId===a){e.replace("/");return}a&&e.replace("/relationships/".concat(a,"?chat=true"))}catch(u){let{firstName:n="",lastName:l="",phone:t="",jobTitle:r="",companyName:d=""}=e.query,o=decodeURIComponent(String(w));k([{email:o,firstName:decodeURIComponent(String(n))||(null==o?void 0:o.split("@")[0]),lastName:decodeURIComponent(String(l)),companyName:null===(i=decodeURIComponent(String(d)))||void 0===i?void 0:i.replaceAll("-",""),jobTitle:null===(a=decodeURIComponent(String(r)))||void 0===a?void 0:a.replaceAll("-",""),checked:!1,...decodeURIComponent(String(t))&&{phone:null===(s=decodeURIComponent(String(t)))||void 0===s?void 0:null===(c=s.split("ext.")[0])||void 0===c?void 0:c.replace(/[^0-9]/g,"")}}]),f(!1)}},[l.userId,w,e]),C=(0,s.useCallback)(async n=>{try{var t,i,a,c;let s={userId:l.userId,emails:n.map(e=>e.email)},r=await o.zk.post(u.eb+"/user/emails",JSON.stringify(s)),d=null==r?void 0:null===(i=r.data)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.results,m=null==d?void 0:null===(a=d.filter(e=>e.userId!==l.userId))||void 0===a?void 0:a.map(e=>({...e,checked:!1}));x(m);let h=m.map(e=>e.email),p=null===(c=n.filter(e=>!h.includes(e.email)&&e.email!==l.email))||void 0===c?void 0:c.map(e=>{var n,l,t,i;return{...e,firstName:e.firstName||e.email.split("@")[0],companyName:null===(n=e.companyName)||void 0===n?void 0:n.replaceAll("-",""),jobTitle:null===(l=e.jobTitle)||void 0===l?void 0:l.replaceAll("-",""),checked:!1,...e.phone&&{phone:null===(i=e.phone)||void 0===i?void 0:null===(t=i.split("ext.")[0])||void 0===t?void 0:t.replace(/[^0-9]/g,"")}}});if(!p.length){if(!m.length){e.replace("/");return}if(1===m.length){e.replace("/relationships/".concat(m[0].userId,"?chat=true"));return}}k(p),f(!1)}catch(n){e.replace("/")}},[l.email,l.userId,e]);(0,s.useEffect)(()=>{var n;window.addEventListener("message",e=>{if(e.source===parent&&e.data){let{type:n,payload:l}=e.data;"CP_MCD"===n&&C(l)}}),m.Z.checkSession({audience:"https://auth.clientpoint.me",redirectUri:"".concat(window.location.origin,"/login")},n=>{n&&e.replace("/"),(0,o.v0)()}),"multiContact"===w?parent.postMessage("CP_SEND_MCD","*"):I(),null===(n=window.rudderanalytics)||void 0===n||n.page()},[w,I,C,e]);let b=async()=>{let t=null==j?void 0:j.filter(e=>e.checked),i=null==p?void 0:p.filter(e=>e.checked&&"undefined"===e.connected);if(!(null==t?void 0:t.length)&&!(null==i?void 0:i.length)){h.Am.warn("No contact selected");return}if(null==t?void 0:t.length){let e=JSON.stringify({senderUserId:l.userId,nonRegisteredUsers:null==t?void 0:t.map(e=>{let{checked:n,phone:l,...t}=e;return{...t,phone:(null==l?void 0:l.length)===10?"1".concat(l):l}}),invitationMessage:g});await o.zk.post(u.eb+"/user/invite",e)}null==i||i.forEach(async e=>{if(l.userId!==e.userId){let n=JSON.stringify({userId:l.userId,connectWithUserId:e.userId,source:(0,o.MT)()});await o.zk.post(u.eb+"/user/connect",n)}}),h.Am.success("Connection request sent!"),n((0,d.Pj)()),e.replace("/")};return(0,t.jsx)("div",{className:"h-screen w-full flex items-center justify-center",children:v?(0,t.jsx)(i.aN,{size:30}
1):(0,t.jsxs)(i.Vq,{open:!0,"aria-labelledby":"customized-dialog-title",className:"dialog-common multi-contact",children:[(0,t.jsx)(i.$N,{children:(0,t.jsxs)("div",{className:"flex flex-row items-center w-full",children:[(0,t.jsx)("h1",{className:"text-[17px] font-medium text-darkBlue",children:decodeURIComponent(String(y))}),(0,t.jsx)("div",{className:"text-gray-400 ml-auto",children:(0,t.jsx)("button",{onClick:()=>e.replace("/"),children:(0,t.jsx)(i.Tw,{color:"inherit",fontSize:"small"})})})]})}),(0,t.jsx)("hr",{className:"MuiDivider-root w-full"}),(0,t.jsx)(i.cZ,{style:{padding:0},children:(0,t.jsxs)("div",{className:"dialog-content",children:[(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("h1",{className:"text-[14px] font-medium text-darkBlue mb-2",children:"".concat((null==j?void 0:j.length)||(null==p?void 0:p.find(e=>"undefined"===e.connected))?"Create a ClientPoint workspace with the following new":"You are already connected with all the"," contact").concat(((null==p?void 0:p.length)||0)+((null==j?void 0:j.length)||0)>1?"s":""," found\n                  on this page.")}),[...j,...p.filter(e=>"undefined"===e.connected)].length>1?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(i.XZ,{color:"primary",checked:!(null==j?void 0:j.find(e=>!e.checked))&&!(null==p?void 0:p.find(e=>"undefined"===e.connected&&!e.checked)),onChange:e=>{k(null==j?void 0:j.map(n=>({...n,checked:e.target.checked}))),x(null==p?void 0:p.map(n=>("undefined"===n.connected&&(n.checked=e.target.checked),n)))}}),(0,t.jsx)("span",{className:"ml-2",children:"Select All"})]}):null]}),(0,t.jsxs)(i.aV,{children:[null==j?void 0:j.map(e=>(0,t.jsx)(i.HC,{className:"justify-between items-center w-full",children:(0,t.jsxs)(i.xu,{className:"items-center flex flex-1",children:[(0,t.jsx)(i.XZ,{color:"primary",checked:e.checked,onChange:n=>{k(j.map(l=>(l.email===e.email&&(l.checked=n.target.checked),l)))}}),(0,t.jsx)("div",{className:"ml-2 mr-3",children:(0,t.jsx)(c.S_,{userName:"".concat(e.firstName," ").concat(e.lastName||""),initials:(0,o.Ux)("".concat(e.firstName," ").concat(e.lastName||""))})}),(0,t.jsx)(i.F_,{children:(0,t.jsx)(i.xu,{alignItems:"center",children:(0,t.jsx)(i.xu,{className:"cursor-pointer multi-contacts",children:(0,t.jsx)(i.xu,{color:"grey.800",children:(0,t.jsx)(i.ZT,{className:"relation-title pr-[17px] truncate",variant:"subtitle1",gutterBottom:!0,color:"inherit",children:"".concat(e.firstName," ").concat(e.lastName||"")})})})})})]})},e.email)),null==p?void 0:p.map(n=>(0,t.jsx)(i.HC,{className:"justify-between items-center w-full",children:(0,t.jsxs)(i.xu,{className:"items-center flex flex-1",children:[(0,t.jsx)(i.XZ,{color:"primary",style:{visibility:"undefined"!==n.connected?"hidden":"visible"},checked:"undefined"===n.connected&&n.checked,onChange:e=>{x(p.map(l=>(l.email===n.email&&(l.checked=e.target.checked),l)))}}),(0,t.jsx)("div",{className:"ml-2 mr-3",children:(0,t.jsx)(c.S_,{initials:(0,o.Ux)("".concat(n.firstName," ").concat(n.firstName||"")),userName:"".concat(n.firstName," ").concat(n.lastName||""),avatarUrl:n.avatar?(0,o.ov)(n.userId,n.avatar):void 0})}),(0,t.jsx)(i.F_,{children:(0,t.jsx)(i.xu,{alignItems:"center",children:(0,t.jsxs)(i.xu,{className:"cursor-pointer multi-contacts",children:[(0,t.jsx)(i.xu,{color:"grey.800",children:(0,t.jsx)(i.ZT,{className:"relation-title pr-[17px] truncate",variant:"subtitle1",gutterBottom:!0,color:"inherit",children:"".concat(n.firstName," ").concat(n.lastName||"")})}),(0,t.jsx)(i.xu,{className:"w-full max-w-[92%]",color:"text.textGrey",children:(0,t.jsx)(i.ZT,{className:"text-gray600 text-xs text-ellipsis whitespace-nowrap overflow-hidden",variant:"body2",gutterBottom:!0,children:n.headline})})]})})}),"undefined"!==n.connected&&(0,t.jsx)(i.xu,{children:(0,t.jsx)(i.zx,{className:"whitespace-nowrap",variant:"outlined",color:"primary",size:"small",onClick:()=>e.replace("/relationships/".concat(n.userId,"?chat=true")),disableElevation:!0,children:"visit Workspace"})})]})},n.userId))]}),(0,t.jsx)("div",{className:"feedback-textarea-container p-4",children:(null==j?void 0:j.length)||(null==p?void 0:p.find(e=>"undefined"===e.connected))?(0,t.jsxs)(t.Fragment,{children:["Send message along with your invite",(0,t.jsx)(i.uz,{id:"improvements",name:"improvements",className:"textarea-feedback border w-full resize-none focus:outline-none text-sm rounded-[5px] p-3 mt-2","aria-label":"maximum height",maxLength:1e3,value:g,onChange:e=>N(e.target.value),placeholder:g}),(0,t.jsx)(i.xu,{className:"gray-500 mb-3 text-xs",children:(0,t.jsxs)("span",{children:[g.length,"/1000"]})}),(0,t.jsx)(i.zx,{className:"w-full",variant:"contained",color:"primary",size:"small",onClick:b,disabled:!(null==j?void 0:j.find(e=>e.checked))&&!(null==p?void 0:p.find(e=>e.checked&&"undefined"===e.connected)),disableElevation:!0,children:"CONNECT"})]}):null})]})})]})})}n.default=p}},function(e){e.O(0,[3325,2182,5220,2812,5417,3661,6577,9097,1055,524,3850,2888,9774,179],function(){return e(e.s=23283)}),_N_E=e.O()}]);

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.