1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30],{9368:function(e,t,s){"use strict";s.d(t,{$:function(){return n}});var r=s(5893),n=(s(7294),function(e){var t=e.className,s=void 0===t?"":t;return(0,r.jsx)("div",{className:s+" flex-0 max-w-7xl sm:px-6 lg:max-w-7xl lg:px-8 lg:grid lg:grid-cols-12 lg:gap-8 grid-rows-0 mx-4 md:mx-0 my-3 pt-3 mt-auto",children:(0,r.jsxs)("main",{className:"col-span-full py-3",children:[(0,r.jsx)("a",{href:"https://twitter.com/_IndexApp",target:"_blank",className:"text-gray-400 hover:text-gray-500 pr-4 text-sm",children:"Help"}),(0,r.jsx)("a",{href:"https://twitter.com/_IndexApp",target:"_blank",className:"text-gray-400 hover:text-gray-500 pr-4 text-sm",children:"Send feedback"}),(0,r.jsx)("a",{href:"/terms",target:"_blank",className:"text-gray-400 hover:text-gray-500 pr-4 text-sm",children:"Terms"}),(0,r.jsx)("a",{href:"/privacy",target:"_blank",className:"text-gray-400 hover:text-gray-500 pr-4 text-sm",children:"Privacy"})]})})})},4151:function(e,t,s){"use strict";s.d(t,{c:function(){return g}});var r=s(5893),n=s(7294),a=s(5914),i=s(9368),o=s(4699),d=s(950),l=s(5331),c=s(5343),u=s(9654),m=function(e){var t=e.onSuccess,s=e.onForgotPassword,a=(0,d.LY)(),i=(0,n.useState)(!1),m=i[0],g=i[1];(0,n.useEffect)((function(){return t&&a.registerStateInterceptor("login",(function(e){})),function(){a.removeStateInterceptor("login")}}),[]);
1var x=(0,n.useState)(""),p=x[0],f=x[1],h=(0,n.useState)({status:"pending"}),v=h[0],b=h[1],w=(0,n.useState)(""),j=w[0],N=w[1],y=(0,n.useState)({status:"pending"}),S=y[0],k=y[1],C=(0,n.useState)(null),_=C[0],T=C[1];return(0,r.jsxs)("form",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700",children:"Email address"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,className:(0,c.A)("appearance-none block w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none sm:text-sm","valid"===v.status?"placeholder-gray-400 border-indigo-300 bg-blue-50":"pending"===v.status?"border-gray-300 placeholder-gray-400 focus:ring-indigo-500 focus:border-indigo-500":"border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500"),value:p,onChange:function(e){var t=e.currentTarget.value,s=(0,l.oH)(t),r=(0,o.Z)(s,1)[0];if(f(t),r)return b({status:"valid"});"invalid"!==v.status&&"pending"!==v.status&&b({status:"pending"})}}),"invalid"===v.status&&(0,r.jsx)("p",{className:"mt-2 text-sm text-red-600",id:"email-error",children:null===v||void 0===v?void 0:v.message})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700",children:"Password"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:(0,c.A)("appearance-none block w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none sm:text-sm","valid"===S.status?"placeholder-gray-400 border-indigo-300 bg-blue-50":"pending"===S.status?"border-gray-300 placeholder-gray-400 focus:ring-indigo-500 focus:border-indigo-500":"border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500"),value:j,onChange:function(e){var t=e.currentTarget.value,s=(0,l.uo)(t),r=(0,o.Z)(s,1)[0];if(N(t),r)return k({status:"valid"});"invalid"!==S.status&&"pending"!==S.status&&k({status:"pending"})}}),"invalid"===S.status&&(0,r.jsx)("p",{className:"mt-2 text-sm text-red-600",id:"email-error",children:null===S||void 0===S?void 0:S.message})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("div",{className:"flex items-center"}),(0,r.jsx)("div",{className:"text-sm",children:(0,r.jsx)("button",{type:"button",onClick:s,className:"font-medium text-indigo-600 hover:text-indigo-500",children:"Forgot your password?"})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("button",{type:"submit",className:(0,c.A)("w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white focus:outline-none transition ease-in-out duration-150",m?"bg-indigo-500 hover:bg-indigo-400 cursor-not-allowed":"bg-indigo-600 hover:bg-indigo-700 focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"),onClick:function(e){e.preventDefault();var s=(0,l.oH)(p),r=(0,o.Z)(s,2),n=r[0],i=r[1];n||b({status:"invalid",message:i});var d=(0,l.uo)(j),c=(0,o.Z)(d,2),u=c[0],m=c[1];u||k({status:"invalid",message:m}),n&&u&&(g(!0),a.login(p,j).then((function(e){t?t(e):a.getUserDetails()})).catch((function(e){return g(!1),null!==e&&void 0!==e&&e.message?T(e.message):T("Unexpected error")})))},children:m?(0,r.jsx)("span",{className:"-ml-1 mr-3 text-white",children:(0,r.jsx)(u.$,{})}):"Sign in"}),_&&(0,r.jsx)("p",{className:"mt-4 text-center text-sm text-red-600",id:"email-error",children:_})]})]})},g=function(e){var t=e.onSuccess,s=e.onRequestPage;return(0,r.jsxs)("div",{className:"min-h-full flex flex-col justify-center pt-12 bg-gray-100",children:[(0,r.jsxs)("div",{className:"px-6 mx-auto w-full max-w-md",children:[(0,r.jsx)("div",{className:"mx-auto h-7 w-auto",children:(0,r.jsx)(a.TR,{height:"100%",width:"100%"})}),(0,r.jsx)("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900",children:"Sign in to your account"}),(0,r.jsxs)("p",{className:"mt-2 text-center text-sm text-gray-600",children:["Don't have an account?"," ",(0,r.jsx)("button",{onClick:function(){return s("sign-up")},className:"font-medium text-indigo-600 hover:text-indigo-500",children:"Sign up"})]})]}),(0,r.jsx)("div",{className:"px-2 mt-8 mx-auto w-full max-w-md",children:(0,r.jsx)("div",{className:"bg-white py-8 px-4 shadow rounded-lg sm:px-10",children:(0,r.jsx)(m,{onSuccess:t,onForgotPassword:function(){return s("forgot-password")}})})}),(0,r.jsx)(i.$,{})]})}},3093:function(e,t,s){"use strict";s.d(t,{M:function(){return g}});var r=s(5893),n=s(7294),a=s(5914),i=s(9368),o=s(4699),d=s(9654),l=s(5343),c=s(5331),u=s(950),m=function(e){var t=e.onSuccess,s=(0,u.LY)(),a=(0,n.use
1State)(!1),i=a[0],m=a[1];(0,n.useEffect)((function(){return t&&s.registerStateInterceptor("register",(function(e){})),function(){s.removeStateInterceptor("register")}}),[]);var g=(0,n.useState)(""),x=g[0],p=g[1],f=(0,n.useState)({status:"pending"}),h=f[0],v=f[1],b=(0,n.useState)(""),w=b[0],j=b[1],N=(0,n.useState)({status:"pending"}),y=N[0],S=N[1],k=(0,n.useState)(""),C=k[0],_=k[1],T=(0,n.useState)({status:"pending"}),E=T[0],A=T[1],I=(0,n.useState)(null),P=I[0],R=I[1];return(0,r.jsxs)("form",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700",children:"Name"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"name",name:"name",type:"text",autoComplete:"text",required:!0,className:(0,l.A)("appearance-none block w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none sm:text-sm","valid"===h.status?"placeholder-gray-400 border-indigo-300 bg-blue-50":"pending"===h.status?"border-gray-300 placeholder-gray-400 focus:ring-indigo-500 focus:border-indigo-500":"border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500"),value:x,onChange:function(e){var t=e.currentTarget.value,s=(0,c.Ol)(t),r=(0,o.Z)(s,1)[0];if(p(t),r)return v({status:"valid"});"invalid"!==h.status&&"pending"!==h.status&&v({status:"pending"})}}),"invalid"===h.status&&(0,r.jsx)("p",{className:"mt-2 text-sm text-red-600",id:"email-error",children:null===h||void 0===h?void 0:h.message})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700",children:"Email address"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,className:(0,l.A)("appearance-none block w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none sm:text-sm","valid"===y.status?"placeholder-gray-400 border-indigo-300 bg-blue-50":"pending"===y.status?"border-gray-300 placeholder-gray-400 focus:ring-indigo-500 focus:border-indigo-500":"border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500"),value:w,onChange:function(e){var t=e.currentTarget.value,s=(0,c.oH)(t),r=(0,o.Z)(s,1)[0];if(j(t),r)return S({status:"valid"});"invalid"!==y.status&&"pending"!==y.status&&S({status:"pending"})}}),"invalid"===y.status&&(0,r.jsx)("p",{className:"mt-2 text-sm text-red-600",id:"email-error",children:null===y||void 0===y?void 0:y.message})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700",children:"Password"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:(0,l.A)("appearance-none block w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none sm:text-sm","valid"===E.status?"placeholder-gray-400 border-indigo-300 bg-blue-50":"pending"===E.status?"border-gray-300 placeholder-gray-400 focus:ring-indigo-500 focus:border-indigo-500":"border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500"),value:C,onChange:function(e){var t=e.currentTarget.value,s=(0,c.uo)(t),r=(0,o.Z)(s,1)[0];if(_(t),r)return A({status:"valid"});"invalid"!==E.status&&"pending"!==E.status&&A({status:"pending"})}}),"invalid"===E.status&&(0,r.jsx)("p",{className:"mt-2 text-sm text-red-600",id:"email-error",children:null===E||void 0===E?void 0:E.message})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("button",{className:(0,l.A)("w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white focus:outline-none transition ease-in-out duration-150",i?"bg-indigo-500 hover:bg-indigo-400 cursor-not-allowed":"bg-indigo-600 hover:bg-indigo-700 focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"),onClick:function(e){e.preventDefault();var r=(0,c.Ol)(x),n=(0,o.Z)(r,2),a=n[0],i=n[1];a||v({status:"invalid",message:i});var d=(0,c.oH)(w),l=(0,o.Z)(d,2),u=l[0],g=l[1];u||S({status:"invalid",message:g});var p=(0,c.uo)(C),f=(0,o.Z)(p,2),h=f[0],b=f[1];h||A({status:"invalid",message:b}),a&&u&&h&&(m(!0),s.register(w,C,x).then((function(e){t&&t(e)})).catch((function(e){return m(!1),null!==e&&void 0!==e&&e.message?R(e.message):R("Unexpected error")})))},children:i?(0,r.jsx)("span",{className:"-ml-1 mr-3 text-white",children:(0,r.jsx)(d.$,{})}):"Sign up"}),P&&(0,r.jsx)("p",{className:"mt-4 text-center text-sm text-red-600",id:"email-error",children:P})]})]})},g=function(e){var t=e.onSuccess,s=e.onRequestPage;return(0,r.jsxs)("div",{className:"min-h-full flex flex-col justify-center pt-12 bg-gray-100",children:[(0,r.jsxs)("div",{className:"px-6 mx-auto w-full max-w-md",children:[(0,r.jsx)("div",{className:"mx-auto h-7 w-auto",children:(0,r.jsx)(a.TR,{height:"100%",width:"100%"})}),(0,r.jsx)("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900",children:"Create your account"}),(0,r.jsxs)("p",{className:"mt-2 text-center text-sm text-gray-600",children:["Already have an account?"," ",(0,r.jsx)("button",{onClick:function(){return s("sign-in")},className:"font-medium text-indigo-600 hover:text-indigo-500",children:"Sign in"})]})]}),(0,r.jsx)("div",{className:"px-2 mt-8 mx-auto w-full max-w-md",children:(0,r.jsx)("div",{className:"bg-white py-8 px-4 shadow rounded-lg sm:px-10",children:(0,r.jsx)(m,{onSuccess:t})})}),(0,r.jsx)(i.$,{})]})}},3576:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return h}});var r=s(5893),n=s(7757),a=s.n(n),i=s(2137),o=s(7294),d=s(1163),l=s(3093),c=s(255),u=s(6695),m=s(950),g=s(4353),x=s(4151),p=s(7014),f={"sign-in":x.c,"sign-up":l.M};function h(){var e=(0,c.d)(["src","action","url"]),t=(0,m.LY)(),s=(0,o.useState)(null),n=s[0],l=s[1],x=(0,o.useState)(null),h=x[0],v=x[1];(0,o.useEffect)((function(){(0,i.Z)(a().mark((function s(){var r,n,i,o;return a().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,"extension"===e.get("src")){s.next=3;break}throw(0,u.gz)(u._Y.AUTHENTICATION_REDIRECT,"UrlParameter src or src type not recognised.");case 3:if("installed"!==e.get("action")||"signin"!==e.get("action")){s.next=5;break}throw(0,u.gz)(u._Y.AUTHENTICATION_REDIRECT,"UrlParameter action or action type not recognised.");case 5:if(e.has("url")){s.next=7;break}throw(0,u.gz)(u._Y.AUTHENTICATION_REDIRECT,"UrlParameter url or url type not recognised.");case 7:return r=e.get("action"),n=decodeURIComponent(e.get("url")),s.next=11,t.whoami();case 11:if(!(i=s.sent)){s.next=17;break}return s.next=15,g.V.get();case 15:o=s.sent,window.location.href=n+"?token=".concat(o);case 17:v(n),s.t0=r,s.next="installed"===s.t0?21:"signin"===s.t0?23:25;break;case 21:return l("sign-up"),s.abrupt("break",26);case 23:return i||l("sign-in"),s.abrupt("break",26);case 25:throw(0,u.gz)(u._Y.AUTHENTICATION_REDIRECT,"UrlParameter action not recognised.");case 26:s.next=31;break;case 28:s.prev=28,s.t1=s.catch(0),d.default.push("/error?code=500&message=".concat(s.t1.message));case 31:case"end":return s.stop()}}),s,null,[[0,28]])})))()}),[]);var b=f[n];return b?(0,r.jsx)(b,{onSuccess:function(e){var t=e.access_token;window.location.href=h+"?token=".concat(t).concat("sign-up"===n?"&action=welcome":"")},onRequestPage:function(e){"forgot-password"===e?d.default.push("/forgot-password"):l(e)}}):(0,r.jsx)("div",{className:"min-h-screen flex flex-col justify-center items-center animate-fade-in-up",children:(0,r.jsx)("div",{className:"animate-pulse",children:(0,r.jsx)(p.J,{width:"36",height:"36"})})})}},5331:function(e,t,s){"use strict";s.d(t,{Ol:function(){return r},oH:function(){return n},uo:function(){return a},xL:function(){return i}});var r=function(e){return[!!(String(e).length>=2&&String(e).length<20),"Must be at least 2 characters long and less than 20."]},n=function(e){return[!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),"Please provide a valid email address."]},a=function(e){return[!!(String(e).length>=6&&String(e).length<20),"Must be at least 6 characters long and less than 20."]},i=function(e){return[!!(String(e).length>=1&&String(e).length<20),"Must be at least 1 characters long and less than 20."]}},5250:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/authenticate",function(){return s(3576)}])}},function(e){e.O(0,[774,888,179],(function(){return t=5250,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.