1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3189],{71552:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/confirm-email",function(){return t(36606)}])},36606:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return _}});var l=t(37340),o=t(85893),r=t(67294),i=t(9008),a=t.n(i),s=t(74931),d=t(26997),c=t(92432);function u(){let e=(0,l._)(["\n mutation {\n resendCompanyConfirmationCode {\n ok\n status\n message\n }\n }\n"]);return u=function(){return e},e}let m=(0,d.Ps)(u());var x=e=>{let{}=e,[n,t]=(0,c.Db)(m);return(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("span",{className:"text-oldGray-600 text-xs pb-1 pt-2",children:"Didn't receive an email?"}),(0,o.jsx)("div",{children:(0,o.jsx)("button",{className:"text-oldGray-600 text-xs",onClick:async()=>{var e,n,l,o;let r=await t();if(!(null==r?void 0:null===(n=r.data)||void 0===n?void 0:null===(e=n.resendCompanyConfirmationCode)||void 0===e?void 0:e.ok)){s.ZP.error(null==r?void 0:null===(o=r.data)||void 0===o?void 0:null===(l=o.resendCompanyConfirmationCode)||void 0===l?void 0:l.message);return}s.ZP.success("Confirmation code has been resent")},children:"Click here to re-send confirmation code"})})]})},f=t(36808),v=t.n(f),h=t(39666),p=t(59888),y=t(20299),b=e=>{let{}=e,{resetClient:n}=(0,y.X)();return(0,o.jsxs)("button",{className:"px-2 py-1 rounded flex flex-row items-center justify-center fixed right-0 lg:left-0 lg:right-auto bottom-0 mb-5 mr-6 lg:mr-0 lg:ml-6 bg-white text-gray-600 hover:font-bold hover:border-gray-600",onClick:()=>{v().remove("token"),v().remove("isPlanner"),n(),(0,h.e)(e=>e.setUser(null)),(0,p.Z)("/company/sign-up")},children:[(0,o.jsx)("svg",{className:"self-center inline-block mr-2 overflow-visible text-oldGray-700 fill-current",width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M11.414 10l2.829-2.828-1.415-1.415L10 8.586 7.172 5.757 5.757 7.172 8.586 10l-2.829 2.828 1.415 1.415L10 11.414l2.828 2.829 1.415-1.415L11.414 10zM2.93 17.071c3.905 3.905 10.237 3.905 14.142 0 3.905-3.905 3.905-10.237 0-14.142-3.905-3.905-10.237-3.905-14.142 0-3.905 3.905-3.905 10.237 0 14.142zm1.414-1.414A8 8 0 1015.657 4.343 8 8 0 004.343 15.657z",fillRule:"evenodd"})}),"Sign out"]})},g=t(11163),j=t(32042);function C(){let e=(0,l._)(["\n query {\n me {\n id\n ok\n message\n status\n email\n }\n isPlannerUser\n }\n"]);return C=function(){return e},e}function w(){let e=(0,l._)(["\n mutation ($code: String!) {\n companyConfirmEmail(code: $code) {\n ok\n status\n message\n redirectUrl\n }\n }\n"]);return w=function(){return e},e}let k=(0,d.Ps)(C()),N=(0,d.Ps)(w());var _=(0,j.Z)(e=>{var n,t;let[l,i]=(0,c.Db)(N),d=(0,g.useRouter)(),[u,m]=(0,r.useState)(d.query.code||""),[f]=(0,c.aM)({query:k,requestPolicy:"network-only"}),{data:v,fetching:h,error:y}=f;if(h)return null;let j=window.location.pathname.split("/"),C=window.location.hostname.split("."),w=C.length>1?C.slice(1).join("."):C[0],_=C[0];if("adviice.ca"!==w&&"404"!==j[1]&&!("app"===_||"dev"===_||"alpha"===_))return(0,p.Z)("/404",!0),null;let P=async()=>{var e,n,t,l,o,r;let a=await i({code:u});if((null==a?void 0:null===(n=a.data)||void 0===n?void 0:null===(e=n.companyConfirmEmail)||void 0===e?void 0:e.ok)===!1){s.ZP.error(null==a?void 0:null===(r=a.data)||void 0===r?void 0:null===(o=r.companyConfirmEmail)||void 0===o?void 0:o.message);return}(0,p.Z)(null==a?void 0:null===(l=a.data)||void 0===l?void 0:null===(t=l.companyConfirmEmail)||void 0===t?void 0:t.redirectUrl)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a(),{children:(0,o.jsx)("title",{children:"Confirm Company Email"})}),(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen",children:[(0,o.jsxs)("div",{className:"flex flex-col items-center px-5 text-center",children:[(0,o.jsx)("h1",{className:"text-5xl font-bold text-brand",children:"Company Confirm"}),(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,o.jsxs)("div",{className:"flex flex-col pb-4",children:[(0,o.jsx)("span",{className:"pt-4 text-sm text-oldGray-700",children:"Thank y
1ou for starting your company account!"}),(0,o.jsxs)("span",{className:"text-sm text-oldGray-700",children:["We've sent a confirmation code to ",(0,o.jsx)("span",{className:"font-bold break-all",children:null!==(t=null==v?void 0:null===(n=v.me)||void 0===n?void 0:n.email)&&void 0!==t?t:"your email"})]})]}),(0,o.jsx)("input",{className:"block form-input w-40 brand-input mt-1 text-center",name:"token",placeholder:"Enter code here",value:u,onChange:e=>m(e.target.value),type:"text"}),(0,o.jsx)("button",{onClick:P,className:"block px-4 py-2 mx-auto mt-5 w-40 font-semibold border rounded text-brand border-brand hover:text-white hover:bg-brand",children:"Confirm"}),(0,o.jsx)(x,{})]})]}),(0,o.jsx)("div",{}),(0,o.jsx)(b,{})]})]})})},32042:function(e,n,t){"use strict";var l=t(85893);t(67294);var o=t(59888),r=t(11163),i=t(36808),a=t.n(i);n.Z=e=>n=>{let t=(0,r.useRouter)(),i=a().get("token");return i&&""!=i?(0,l.jsx)(e,{...n}):((0,o.Z)("/planner/signin",!1,t.pathname,t.asPath),null)}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=71552)}),_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.