PageSourceSearch

https://app.usemerge.com/_next/static/chunks/pages/team/invitation/[token]-44a3cd3eba8d0890.js

js usemerge.com collected 2026-10-09 03:14:40 UTC 3,321 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5537,3696],{90052:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/team/invitation/[token]",function(){return t(65754)}])},65754:function(n,e,t){"use strict";t.r(e);var i=t(85893),o=t(67294),a=t(11163),s=t(10018),r=t(60990),c=t(84677),l=t(97182),d=t(11032),u=t(31754),v=t(96788),h=t(30381),x=t.n(h),p=t(56611),f=t(17794);e.default=()=>{const n=(0,a.useRouter)(),{user:e}=(0,f.useAuth)(),t=n.query.token,[h,m]=(0,o.useState)(!0),[y,j]=(0,o.useState)(!1),[g,k]=(0,o.useState)(null),[Z,_]=(0,o.useState)(null),[C,b]=(0,o.useState)(!1),w=(0,o.useMemo)(()=>{var n,e;return Z?x()((null===(e=Z.expiresAt)||void 0===e||null===(n=e.toDate)||void 0===n?void 0:n.call(e))||Z.expiresAt):null},[Z]);return(0,o.useEffect)(()=>{t&&(async()=>{m(!0),k(null);try{var n,e;const i=await(0,p.GK)(t);if(!i)return void k("Invitation has expired");if("accepted"===i.status)return b(!0),void _(i);const o=x()((null===(e=i.expiresAt)||void 0===e||null===(n=e.toDate)||void 0===n?void 0:n.call(e))||i.expiresAt);if(x()().isAfter(o))return void k("This invitation has expired");_(i)}catch(n){k(n instanceof Error?n.message:"Failed to load invitation")}finally{m(!1)}})()},[t]),(0,i.jsx)(d.Z,{maxWidth:"sm",children:(0,i.jsx)(r.Z,{sx:{py:6},children:(0,i.jsxs)(u.Z,{sx:{p:4},children:[(0,i.jsx)(v.Z,{variant:"h5",sx:{mb:2,fontWeight:700},children:"Team Invitation"}),h?(0,i.jsx)(r.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,i.jsx)(l.Z,{})}):g?(0,i.jsx)(s.Z,{severity:"error",children:g}):C?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Z,{severity:"success",sx:{mb:2},children:"This invitation was already accepted. You can continue to the app — no need to use this link again."}),(0,i.jsx)(c.Z,{variant:"contained",fullWidth:!0,onClick:()=>{n.push("/dashboard")},children:"Go to dashboard"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.Z,{severity:"info",sx:{mb:2},children:["You’ve been invited to join a team on Merge.",w?" This invite expires on ".concat(w.format("MMM D, YYYY"),"."):null]}),(0,i.jsx)(c.Z,{variant:"contained",fullWidth:!0,onClick:async()=>{if(t){j(!0);try{var i,o;const n=await(0,p.GK)(t);if(!n)return k("This invitation is no longer valid. The account owner may have canceled it."),_(null),void j(!1);const e=n.status;if(e&&"pending"!==e)return k("This invitation is no longer valid."),_(null),void j(!1);const a=x()((null===(o=n.expiresAt)||void 0===o||null===(i=o.toDate)||void 0===i?void 0:i.call(o))||n.expiresAt);if(x()().isAfter(a))return k("This invitation has expired"),_(null),void j(!1)}catch(n){return k(n instanceof Error?n.message:"Failed to verify invitation"),void j(!1)}e?n.push("/team/accept-invitation?token=".concat(encodeURIComponent(t))):n.push("/signup?token=".concat(encodeURIComponent(t)))}},disabled:y,startIcon:y?(0,i.jsx)(l.Z,{size:18,color:"inherit"}):void 0,children:y?"Verifying…":"Continue"}),(0,i.jsx)(c.Z,{variant:"text",fullWidth:!0,sx:{mt:1},disabled:y,onClick:()=>{const e="/team/accept-invitation?token=".concat(encodeURIComponent(t));n.push("/login?redirect=".concat(encodeURIComponent(e)))},children:"I already have an account"})]})]})})})}}},function(n){n.O(0,[9551,2016,4885,8299,4006,7527,9605,4544,3390,4606,7794,2888,9774,179],function(){return n(n.s=90052)});var e=n.O();_N_E=e}]);

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.