PageSourceSearch

https://aizzie.ai/assets/login-D3GLLa1l.js

js aizzie.ai collected 2026-10-05 11:49:42 UTC 29,090 bytes, 28 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a10ba3-57fc-7272-aea8-4a8fb4ef8baa")}catch(e){}}();(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`e9fb79ad3c03520b98d9ed2a83b95005a20db7c0`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`7d60c286-72f6-462b-9db4-94ab0e8cf08a`,e._sentryDebugIdIdentifier=`sentry-dbid-7d60c286-72f6-462b-9db4-94ab0e8cf08a`)})()}catch{}import{a as e,t}from"./rolldown-runtime-D8wYlBlI.js";import{hn as n,lt as r,tt as i}from"./icons-CHrkIgss.js";import{$n as a,A as o,Dn as s,Fn as c,Gn as l,Hn as u,In as d,Jn as f,Kn as p,N as m,P as h,Qn as g,Un as _,Vn as v,Wn as y,Yn as b,d as x,dr as S,er as C,j as w,qn as T,t as E,u as D}from"./ui-components-3gjYgAeN.js";import{t as O}from"./useParams-86TKxjJl.js";import{t as k}from"./useNavigate-Dw2vahUE.js";import{t as A}from"./use-event-tracking-ig_IJZXt.js";import{r as j}from"./context-DCiRFRC7.js";import{i as M}from"./axios-instance-Dr89rWvO.js";import{Ct as N,Dt as ee,Et as te,Mt as ne,Ot as re,ln as ie,wt as ae}from"./web-CtTTjsKt.js";import{f as P,l as F,u as I}from"./external-BRRWhSNN.js";import{v as oe}from"./index-D1wZpiG3.js";import{t as se}from"./aizzie-logo-D4C0hwuu.js";import{t as ce}from"./LanguageSelector-BpD5HPnj.js";import{n as le,r as ue}from"./safe-redirect-BILPRiac.js";import{t as de}from"./hooks-DzATKjfi.js";var fe=e(t(((e,t)=>{t.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}}))()),pe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function L(e){var t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(fe.default[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){var r=e.indexOf(`-->`);return{type:`comment`,comment:r===-1?``:e.slice(4,r)}}for(var i=new RegExp(pe),a=null;(a=i.exec(e))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,``];o.indexOf(`=`)>-1&&(s=o.split(`=`)),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var R=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,z=/^\s*$/,B=Object.create(null);function V(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:return e+=`<`+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+`="`+e[n]+`"`);return t.length?` `+t.join(` `):``}(t.attrs):``)+(t.voidElement?`/>`:`>`),t.voidElement?e:e+t.children.reduce(V,``)+`</`+t.name+`>`;case`comment`:return e+`<!--`+t.comment+`-->`}}var me={parse:function(e,t){t||={},t.components||=B;var n,r=[],i=[],a=-1,o=!1;if(e.indexOf(`<`)!==0){var s=e.indexOf(`<`);r.push({type:`text`,content:s===-1?e:e.substring(0,s)})}return e.replace(R,function(s,c){if(o){if(s!==`</`+n.name+`>`)return;o=!1}var l,u=s.charAt(1)!==`/`,d=s.startsWith(`<!--`),f=c+s.length,p=e.charAt(f);if(d){var m=L(s);return a<0?(r.push(m),r):((l=i[a]).children.push(m),r)}if(u&&(a++,(n=L(s)).type===`tag`&&t.components[n.name]&&(n.type=`component`,o=!0),n.voidElement||o||!p||p===`<`||n.children.push({type:`text`,content:e.slice(f,e.indexOf(`<`,f))}),a===0&&r.push(n),(l=i[a-1])&&l.children.push(n),i[a]=n),(!u||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=a===-1?r:i[a]),!o&&p!==`<`&&p)){l=a===-1?r:i[a].children;var h=e.indexOf(`<`,f),g=e.slice(f,h===-1?void 0:h);z.test(g)&&(g=` `),(h>-1&&a+l.length>=0||g!==` `)&&l.push({type:`text`,content:g})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+V(``,t)},``)}},H=e(n()),U=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},W=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?G(t):t},he=e=>Array.isArray(e)&&e.every(H.isValidElement),G=e=>Array.isArray(e)?e:[e],ge=(e,t)=>
1{let n={...t};return n.props=Object.assign(e.props,t.props),n},K=(e,t,n,r)=>{if(!e)return``;let i=``,a=G(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((e,a)=>{if(T(e)){i+=`${e}`;return}if((0,H.isValidElement)(e)){let{props:s,type:c}=e,l=Object.keys(s).length,u=o.indexOf(c)>-1,d=s.children;if(!d&&u&&!l){i+=`<${c}/>`;return}if(!d&&(!u||l)||s.i18nIsDynamicList){i+=`<${a}></${a}>`;return}if(u&&l===1&&T(d)){i+=`<${c}>${d}</${c}>`;return}let f=K(d,t,n,r);i+=`<${a}>${f}</${a}>`;return}if(e===null){f(n,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:r});return}if(p(e)){let{format:t,...a}=e,o=Object.keys(a);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];i+=`{{${e}}}`;return}f(n,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:r,child:e});return}f(n,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:r,child:e})}),i},_e=(e,t,n,r,i,a,o)=>{if(n===``)return[];let s=i.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(s.map(e=>`<${e}`).join(`|`)).test(n);if(!e&&!t&&!c&&!o)return[n];let l=t??{},u=e=>{G(e).forEach(e=>{T(e)||(U(e)?u(W(e)):p(e)&&!(0,H.isValidElement)(e)&&Object.assign(l,e))})};u(e);let d=me.parse(`<0>${n}</0>`),f={...l,...a},m=(e,t,n)=>{let r=W(e),i=g(r,t.children,n);return he(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},h=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,H.cloneElement)(e,{key:r},i?void 0:t))):n.push(...H.Children.map([e],e=>{let n={...e.props};return delete n.i18nIsDynamicList,(0,H.createElement)(e.type,{...n,key:r,ref:e.props.ref??e.ref},i?null:t)}))},g=(e,n,a)=>{let l=G(e);return G(n).reduce((e,n,u)=>{let d=n.children?.[0]?.content&&r.services.interpolator.interpolate(n.children[0].content,f,r.language);if(n.type===`tag`){let o=l[parseInt(n.name,10)];!o&&t&&(o=t[n.name]),a.length===1&&!o&&(o=a[0][n.name]),o||={};let _=Object.keys(n.attrs).length===0?o:ge({props:n.attrs},o),v=(0,H.isValidElement)(_),y=v&&U(n,!0)&&!n.voidElement,b=c&&p(_)&&_.dummy&&!v,x=p(t)&&Object.hasOwnProperty.call(t,n.name);if(T(_)){let t=r.services.interpolator.interpolate(_,f,r.language);e.push(t)}else if(U(_)||y)h(_,m(_,n,a),e,u);else if(b)h(_,g(l,n.children,a),e,u);else if(Number.isNaN(parseFloat(n.name)))if(x)h(_,m(_,n,a),e,u,n.voidElement);else if(i.transSupportBasicHtmlNodes&&s.indexOf(n.name)>-1)if(n.voidElement)e.push((0,H.createElement)(n.name,{key:`${n.name}-${u}`}));else{let t=g(l,n.children,a);e.push((0,H.createElement)(n.name,{key:`${n.name}-${u}`},t))}else if(n.voidElement)e.push(`<${n.name} />`);else{let t=g(l,n.children,a);e.push(`<${n.name}>${t}</${n.name}>`)}else if(p(_)&&!v){let t=n.children[0]?d:null;t&&e.push(t)}else h(_,d,e,u,n.children.length!==1||!d)}else if(n.type===`text`){let t=i.transWrapTextNodes,a=o?i.unescape(r.services.interpolator.interpolate(n.content,f,r.language)):r.services.interpolator.interpolate(n.content,f,r.language);t?e.push((0,H.createElement)(t,{key:`${n.name}-${u}`},a)):e.push(a)}return e},[])};return W(g([{dummy:!0,children:e||[]}],d,G(e||[]))[0])},q=(e,t,n)=>{let r=e.key||t,i=(0,H.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,H.createElement)(H.Fragment,null,i)}return(0,H.createElement)(a,{key:r})},ve=(e,t)=>e.map((e,n)=>q(e,n,t)),J=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:q(e[r],r,t)})}),n},ye=(e,t,n,r)=>e?Array.isArray(e)?ve(e,t):p(e)?J(e,t):(b(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,be=e=>!p(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function xe({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:u,i18n:d,t:f,shouldUnescape:p,...m}){let h=d||y();if(!h)return b(h,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using i18nextReactModule`,{i18nKey:r}),e;let g=f||h.t.bind(h)||(e=>e),_={...l(),...h.options?.react},v=u||g.ns||h.options?.defaultNS;v=T(v)?[v]:v||[`translation`];let x=K(e,_,h,r),S=s||x||_.transEmptyNodeValue||r,{hashTransKey:C}=_,w=r||(C?C(x||S):x||S);h.options?.interpolation?.defaultVariables&&(o=o&&Object.keys(o).length>0?{...o,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables});let E=o||t!==void 0&&!h.options?.interpolation?.alwaysFormat||!e?a.interpolation:{interpolation:{...a.interpolation,prefix:`#$?`,suffix:`?$#`}},D={...a,context:i||a.context,count:t,...o,...E,defaultValue:S,ns:v}
1,O=w?g(w,D):S,k=ye(c,O,h,r),A=k||e,j=null;be(k)&&(j=k,A=e);let M=_e(A,j,O,h,_,D,p),N=n??_.defaultTransParent;return N?(0,H.createElement)(N,m,M):M}function Se({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let{i18n:m,defaultNS:h}=(0,H.useContext)(_)||{},g=u||m||y(),v=d||g?.t.bind(g);return xe({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a,values:o,defaults:s,components:c,ns:l||v?.ns||h||g?.options?.defaultNS,i18n:g,t:d,shouldUnescape:f,...p})}function Ce(e={}){let{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,a]=(0,H.useState)(!1),o=(0,H.useRef)(n);o.current=n;let s=(0,H.useRef)(r);return s.current=r,(0,H.useEffect)(()=>{let e=document.createElement(`script`);return e.src=`https://accounts.google.com/gsi/client`,e.async=!0,e.defer=!0,e.nonce=t,e.onload=()=>{var e;a(!0),(e=o.current)==null||e.call(o)},e.onerror=()=>{var e;a(!1),(e=s.current)==null||e.call(s)},document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),i}var Y=(0,H.createContext)(null);function we({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){let a=Ce({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),o=(0,H.useMemo)(()=>({clientId:e,scriptLoadedSuccessfully:a}),[e,a]);return H.createElement(Y.Provider,{value:o},i)}function Te(){let e=(0,H.useContext)(Y);if(!e)throw Error(`Google OAuth components must be used within GoogleOAuthProvider`);return e}function Ee({flow:e=`implicit`,scope:t=``,onSuccess:n,onError:r,onNonOAuthError:i,overrideScope:a,state:o,...s}){let{clientId:c,scriptLoadedSuccessfully:l}=Te(),u=(0,H.useRef)(),d=(0,H.useRef)(n);d.current=n;let f=(0,H.useRef)(r);f.current=r;let p=(0,H.useRef)(i);p.current=i,(0,H.useEffect)(()=>{if(!l)return;let n=e===`implicit`?`initTokenClient`:`initCodeClient`;u.current=((window==null?void 0:window.google)?.accounts)?.oauth2[n]({client_id:c,scope:a?t:`openid profile email ${t}`,callback:e=>{var t;if(e.error)return f.current?.call(f,e);(t=d.current)==null||t.call(d,e)},error_callback:e=>{var t;(t=p.current)==null||t.call(p,e)},state:o,...s})},[c,l,e,t,o]);let m=(0,H.useCallback)(e=>u.current?.requestAccessToken(e),[]),h=(0,H.useCallback)(()=>u.current?.requestCode(),[]);return e===`implicit`?m:h}var X=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=n();function r(e){(0,t.useEffect)(function(){if(e){var t=document.querySelectorAll(`script[src="${e}"]`)[0];t||(t=document.createElement(`script`),t.src=e,t.async=!0,document.body.appendChild(t))}},[e])}e.default=r})),De=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},r=n.pollFrequency,i=r===void 0?1e3:r,a=n.retries,o=a===void 0?100:a,s=n.parent,c=s===void 0?window:s;if(c&&c.hasOwnProperty(t))return Promise.resolve(c[t]);if(!o)return Promise.resolve(void 0);var l=o-1;return new Promise(function(e){return setTimeout(e,typeof i==`function`?i({retries:l}):i)}).then(function(){return e(t,{pollFrequency:i,parent:c,retries:l})})}})),Z=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=n(De());function n(e){return e&&e.__esModule?e:{default:e}}e.default={APPLE_SCRIPT_SRC:`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,signIn:function(e){var n=e.authOptions,r=e.onSuccess,i=e.onError;return(0,t.default)(`AppleID`).then(function(){return window.AppleID||console.error(Error(`Error loading apple script`)),window.AppleID.auth.init(n),window.AppleID.auth.signIn().then(function(e){return r&&r(e),e}).catch(function(e){return i?i(e):console.error(e),null})}).catch(function(e){return i?i(e):console.error(e),null})}}})),Oe=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=o(n()),r=o(X()),i=o(Z()),a=[`onSuccess`,`onError`,`skipScript`,`authOptions`,`iconProps`,`render`,`uiType`,`className`,`noDefaultStyle`,`buttonExtraChildren`];
1function o(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if(e==null)return{};var n=f(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var p=`
2.react-apple-signin-auth-btn {
3  background-color: transparent;
4  border: none;
5  padding: 0;
6  cursor: pointer;
7  border-radius: 4px;
8  padding: 0 8px 0 2px;
9  font-size: 14px;
10  font-size: 1em;
11  line-height: 1;
12  border: 1px solid #000;
13  overflow: hidden;
14  display: inline-flex;
15  justify-content: center;
16  align-items: center;
17}
18.react-apple-signin-auth-btn-light {
19  background-color: #FFF;
20  color: #000;
21  border-color: #000;
22}
23.react-apple-signin-auth-btn-dark {
24  background-color: #000;
25  color: #FFF;
26  border-color: #FFF;
27}`.replace(/ {2}|\n/g,``);e.default=function(e){var n=e.onSuccess,o=e.onError,c=e.skipScript,u=c===void 0?!1:c,f=e.authOptions,m=e.iconProps,h=e.render,g=e.uiType,_=g===void 0?`dark`:g,v=e.className,y=e.noDefaultStyle,b=y===void 0?!1:y,x=e.buttonExtraChildren,S=x===void 0?`Continue with Apple`:x,C=d(e,a);(0,r.default)(u?null:i.default.APPLE_SCRIPT_SRC);var w=l({children:t.default.createElement(t.default.Fragment,null,t.default.createElement(`svg`,s({width:`24px`,height:`44px`,viewBox:`0 0 24 44`},m),t.default.createElement(`g`,{stroke:`none`,strokeWidth:`1`,fill:`none`,fillRule:`evenodd`},t.default.createElement(`rect`,{fill:_===`light`?`#FFF`:`#000`,x:`0`,y:`0`,width:`24`,height:`44`}),t.default.createElement(`path`,{d:`M12.2337427,16.9879688 C12.8896607,16.9879688 13.7118677,16.5445313 14.2014966,15.9532812 C14.6449341,15.4174609 14.968274,14.6691602 14.968274,13.9208594 C14.968274,13.8192383 14.9590357,13.7176172 14.9405591,13.6344727 C14.2107349,13.6621875 13.3330982,14.1241016 12.8065162,14.7430664 C12.3907935,15.2142188 12.012024,15.9532812 12.012024,16.7108203 C12.012024,16.8216797 12.0305005,16.9325391 12.0397388,16.9694922 C12.0859302,16.9787305 12.1598365,16.9879688 12.2337427,16.9879688 Z M9.92417241,28.1662891 C10.8202857,28.1662891 11.2175318,27.5658008 12.3353638,27.5658008 C13.4716724,27.5658008 13.721106,28.1478125 14.7188404,28.1478125 C15.6980982,28.1478125 16.3540162,27.2424609 16.972981,26.3555859 C17.6658521,25.339375 17.9522388,24.3416406 17.9707154,24.2954492 C17.9060474,24.2769727 16.0306763,23.5101953 16.0306763,21.3576758 C16.0306763,19.491543 17.5088013,18.6508594 17.5919459,18.5861914 C16.612688,17.1819727 15.1253248,17.1450195 14.7188404,17.1450195 C13.6194849,17.1450195 12.7233716,17.8101758 12.1598365,17.8101758 C11.5501099,17.8101758 10.7463794,17.1819727 9.79483648,17.1819727 C7.98413335,17.1819727 6.14571538,18.6785742 6.14571538,21.5054883 C6.14571538,23.2607617 6.8293482,25.1176563 7.67003179,26.3186328 C8.39061773,27.3348438 9.01882085,28.1662891 9.92417241,28.1662891 Z`,fill:_===`light`?`#000`:`#FFF`,fillRule:`nonzero`}))),S),onClick:function(e){e&&(e.preventDefault(),e.stopPropagation()),i.default.signIn({authOptions:f,onSuccess:n,onError:o})}},C);return h?h(w):t.default.createElement(t.default.Fragment,null,t.default.createElement(`button`,s({className:`${b?``:`react-apple-signin-auth-btn react-apple-signin-auth-btn-${_}`}${v?` ${v}`:``}`,type:`button`,"aria-label":`Signin with apple ID`},w)),b?null:t.default.createElement(`style`,null,p))}}
27)),Q=e(t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`appleAuthHelpers`,{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,`useScript`,{enumerable:!0,get:function(){return r.default}}),e.default=void 0;var t=i(Oe()),n=i(Z()),r=i(X());function i(e){return e&&e.__esModule?e:{default:e}}e.default=t.default}))(),1),$=S(),ke=Q.default.default??Q.default,Ae=()=>(0,$.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,className:`mr-2`,children:(0,$.jsx)(`path`,{fill:`currentColor`,d:`M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z`})});function je({onSuccess:e,className:t}){let{t:n}=u(),{captureEvent:r}=A(),i=ee({mutation:{onSuccess:t=>{r(t.isNewUser?`user_signed_up`:`user_logged_in`,{method:`apple`}),e?.(t)},onError:()=>{g.error(n(`components.appleLoginButton.authErrorToast`))}}});return(0,$.jsx)(`div`,{className:t,children:(0,$.jsx)(ke,{authOptions:{clientId:`ai.confa.aizzie.si`,scope:`email name`,redirectURI:`https://aizzie.ai/login`,usePopup:!0},uiType:`dark`,render:e=>(0,$.jsxs)(s,{type:`button`,variant:`outline`,className:`w-full`,onClick:e.onClick,disabled:i.isPending,children:[(0,$.jsx)(Ae,{}),n(`components.appleLoginButton.continueWithText`)]}),onSuccess:e=>{let t=e.authorization;if(!t?.id_token||!t?.code){g.error(n(`components.appleLoginButton.authErrorToast`));return}i.mutate({data:{identityToken:t.id_token,authorizationCode:t.code,fullName:e.user?.name?{givenName:e.user.name.firstName??void 0,familyName:e.user.name.lastName??void 0}:void 0}})},onError:()=>{g.error(n(`components.appleLoginButton.authErrorToast`))}})})}var Me=/Barcelona|Instagram|FBAN|FBAV|FB_IAB|MicroMessenger|Line\/|; wv\)/;function Ne(e){return Me.test(e)}var Pe=()=>(0,$.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,className:`mr-2`,children:[(0,$.jsx)(`path`,{fill:`#4285F4`,d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`}),(0,$.jsx)(`path`,{fill:`#34A853`,d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`}),(0,$.jsx)(`path`,{fill:`#FBBC05`,d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z`}),(0,$.jsx)(`path`,{fill:`#EA4335`,d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z`})]});function Fe({onSuccess:e,className:t}){let{t:n}=u(),{captureEvent:o}=A(),c=a(),[l,d]=(0,H.useState)(!1),f=re({mutation:{onSuccess:t=>{o(t.isNewUser?`user_signed_up`:`user_logged_in`,{method:`google`}),e?.(t)},onError:()=>{g.error(n(`components.googleLoginButton.authErrorToast`))}}}),p=Ee({flow:`auth-code`,onSuccess:e=>{if(d(!1),!e.code){g.error(n(`components.googleLoginButton.authErrorToast`));return}f.mutate({data:{code:e.code,redirectUri:`postmessage`}})},onError:()=>{d(!1),g.error(n(`components.googleLoginButton.authErrorToast`))},onNonOAuthError:()=>{d(!1)}});if(c&&Ne(navigator.userAgent))return(0,$.jsxs)(D,{className:t,children:[(0,$.jsx)(r,{}),(0,$.jsx)(x,{children:n(`components.googleLoginButton.inAppBrowserNotice`)})]});let m=l||f.isPending;return(0,$.jsxs)(s,{type:`button`,variant:`outline`,className:t,onClick:()=>{d(!0),p()},disabled:m,children:[m?(0,$.jsx)(i,{className:`mr-2 animate-spin`}):(0,$.jsx)(Pe,{}),n(`components.googleLoginButton.continueWithText`)]})}var Ie=I({email:F().min(1,`Email is required`),password:P(),username:P()}),Le=I({email:F().min(1,`Email is required`),password:P().min(1,`Password is required`),username:P()}),Re=()=>{let{t:e}=u();return(0,H.useMemo)(()=>I({username:P().min(4,e(`pages.signup.usernameValidationRequiredMessage`)).max(30,e(`pages.signup.usernameValidationLengthMessage`)).regex(/^[a-zA-Z0-9_.]+$/,e(`pages.signup.usernameValidationCharactersMessage`)),email:F(e(`pages.signup.emailValidationInvalidMessage`)).min(1,e(`form.validation.required`,{label:e(`pages.signup.emailFieldLabel`)})),password:P().min(8,e(`pages.signup.passwordValidationMinMessage`)).max(100,e(`pages.signup.passwordValidationMaxMessage`))}),[e])};function ze({defaultEmail:e,initialStep:t,onSuccess:n}){let{t:r}=u(),i=O({strict:!1}).locale??`en`,{captureEvent:a}=A(),[o,s]=(0,H.useState)(t??`email`),[c,l]=(0,H.useState)(``),[f,p]=(0,H.useState)(!1),m=(0,H.useRef)(null),h=(0,H.useRef)(null),_=Re(),y=ae(),b=N({mutation:{onSuccess:(e,t)=>{l(t.data.email);let n=e.registered?`password`:`signup`;if(s(n),n===`signup`){let e=(t.data.email.split(`@`)[0]??``).replace(/[^a-zA-Z0-9_.]/g,``);y.mutate({data:{baseUsername:e}},{onSuccess:e=>{k.setFieldValue(`username`,e.username)}})}let r=n===`password`?m:h;setTimeout(()=>r.current?.focus(),300)},onError:()=>{g.error(r(`pages.login.checkEmailErrorToast`))}}});(0,H.useEffect)(()=>{e&&!t&&b.mutate({data:{email:e}})},[]);let x=te({mutation:{onSuccess:e=>{a(`user_logged_in`,{method:`email`}),n(e)},onError:()=>{g.error(r(`pages.login.signInErrorToast`))}}}),S=ne({mutation:{onSuccess:e=>{a(`user_signed_up`,{method:`email`}),p(!0),M(e.accessToken),n(e)},onError:e=>{let t=e.response?.data;if(typeof t==`object`&&t){if(t.code===`USERNAME_ALREADY_EXISTS`){k.setFieldMeta(`username`,e=>({...e,errorMap:{...e.errorMap,onSubmit:r(`pages.signup.usernameTakenError`)}}));return}if(t.code===`EMAIL_ALREADY_EXISTS`){g.error(r(`pages.signup.emailAlreadyExistsError`));return}}g.error(r(`pages.signup.signUpErrorToast`))}}}),[w,T]=(0,H.useState)(!1),D=v(o).with(`email`,()=>Ie).with(`password`,()=>Le).with(`signup`,()=>_).exhaustive(),k=de({defaultValues:{email:e,password:``,username:``},validators:{onChange:w?D:void 0,onSubmit:D},onSubmit:async({value:e})=>{await v(o).with(`email`,()=>b.mutateAsync({data:{email:e.email}})).with(`password`,()=>x.mutateAsync({data:{email:e.email,password:e.password}})).with(`signup`,()=>S.mutateAsync({data:{name:e.username,username:e.username,email:e.email,password:e.password,locale:d(i)}})).exhaustive()}});(0,H.useEffect)(()=>{T(k.state.isSubmitted)},[k.state.isSubmitted]);let j=o===`password`||o===`signup`;return(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),k.handleSubmit()},className:`space-y-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(k.AppField,{name:`email`,listeners:{onChange:({value:e})=>{j&&e!==c&&(s(`email`),T(!1),k.reset({email:e,password:``,username:``},{keepDefaultValues:!0}))}},children:e=>(0,$.jsx)(e.TextField,{type:`email`,label:r(`pages.login.emailFieldLabel`),placeholder:r(`pages.login.emailFieldPlaceholder`),autoComplete:`email`,autoF
27ocus:!0})}),(0,$.jsx)(`div`,{className:`grid transition-[grid-template-rows] duration-300 ease-out`,style:{gridTemplateRows:o===`signup`?`1fr`:`0fr`},children:(0,$.jsx)(`div`,{className:`overflow-hidden`,children:(0,$.jsx)(`div`,{className:`pt-4`,children:(0,$.jsx)(k.AppField,{name:`username`,children:e=>(0,$.jsx)(e.TextField,{ref:h,type:`text`,label:r(`pages.signup.usernameFieldLabel`),placeholder:r(`pages.signup.usernameFieldPlaceholder`),autoComplete:`username`})})})})}),(0,$.jsx)(`div`,{className:`grid transition-[grid-template-rows] duration-300 ease-out`,style:{gridTemplateRows:j?`1fr`:`0fr`},children:(0,$.jsx)(`div`,{className:`overflow-hidden`,children:(0,$.jsx)(`div`,{className:`pt-4`,children:(0,$.jsx)(k.AppField,{name:`password`,children:e=>(0,$.jsx)(e.PasswordField,{ref:m,label:v(o).with(`signup`,()=>r(`pages.signup.passwordFieldLabel`)).otherwise(()=>r(`pages.login.passwordFieldLabel`)),placeholder:v(o).with(`signup`,()=>r(`pages.signup.passwordFieldPlaceholder`)).otherwise(()=>r(`pages.login.passwordFieldPlaceholder`)),autoComplete:o===`signup`?`new-password`:`current-password`,description:o===`signup`?r(`pages.signup.passwordFieldDescription`):void 0})})})})})]}),(0,$.jsx)(k.AppForm,{children:(0,$.jsx)(k.SubmitButton,{className:`w-full`,disabled:f,loadingText:v(o).with(`email`,()=>r(`pages.login.continueButtonLoadingText`)).with(`password`,()=>r(`pages.login.signInButtonLoadingText`)).with(`signup`,()=>r(`pages.signup.createAccountButtonLoadingText`)).exhaustive(),children:v(o).with(`email`,()=>r(`pages.login.continueButtonText`)).with(`password`,()=>r(`pages.login.signInButtonText`)).with(`signup`,()=>r(`pages.signup.createAccountButtonText`)).exhaustive()})})]}),(0,$.jsx)(`div`,{className:`grid transition-[grid-template-rows] duration-300 ease-out`,style:{gridTemplateRows:o===`password`?`1fr`:`0fr`},children:(0,$.jsx)(`div`,{className:`overflow-hidden`,children:(0,$.jsx)(`div`,{className:`pt-4 text-center text-sm`,children:(0,$.jsx)(C,{to:`/{-$locale}/forgot-passwd`,className:`font-medium text-primary hover:underline`,children:r(`pages.login.forgotPasswordLinkText`)})})})}),(0,$.jsx)(`div`,{className:`grid transition-[grid-template-rows] duration-300 ease-out`,style:{gridTemplateRows:o===`signup`?`1fr`:`0fr`},children:(0,$.jsx)(`div`,{className:`overflow-hidden`,children:(0,$.jsx)(`div`,{className:`pt-4 text-sm text-muted-foreground`,children:(0,$.jsx)(Se,{i18nKey:`pages.signup.termsCheckboxLabel`,components:{1:(0,$.jsx)(E,{to:`/{-$locale}/terms`,className:`font-medium text-primary hover:underline inline`}),2:(0,$.jsx)(E,{to:`/{-$locale}/privacy`,className:`font-medium text-primary hover:underline inline`})}})})})})]})}function Be(){let{t:e}=u(),t=k(),{redirectTo:n,email:r,"join-trip-plan-id":i}=oe.useSearch(),a=le(n),s=j(),l=ie({mutation:{onSuccess:()=>{if(a){window.location.replace(a);return}i&&t({to:`/{-$locale}/p/$tripPlanId`,params:{tripPlanId:i},reloadDocument:!0})},onError:n=>{g.error(n.message||e(`pages.acceptInvite.acceptInviteErrorToast`)),setTimeout(()=>{if(a){window.location.replace(a);return}t({to:`/{-$locale}/home`,reloadDocument:!0})},2e3)}}}),d=async e=>{if(M(e.accessToken),i){l.mutateAsync({data:{tripPlanId:i}});return}if(a){window.location.replace(a);return}await t({to:`/{-$locale}/home`,reloadDocument:!0,params:{locale:e.user?.locale&&e.user?.locale!==`en`?c(e.user?.locale):void 0}})};return(0,H.useEffect)(()=>{if(s.user){if(a){window.location.replace(a);return}t({to:`/{-$locale}/home`,replace:!0})}},[t,a,s.user]),s.isLoading||s.user?(0,$.jsx)(ue,{}):(0,$.jsxs)(`div`,{className:`relative min-h-screen flex items-center justify-center bg-secondary py-12 px-4 sm:px-6 lg:px-8`,children:[(0,$.jsx)(`div`,{className:`absolute top-4 right-4 bg-white rounded-md`,children:(0,$.jsx)(ce,{size:`sm`})}),(0,$.jsxs)(o,{className:`w-full max-w-md`,children:[(0,$.jsxs)(m,{className:`space-y-2`,children:[(0,$.jsx)(`img`,{src:se,alt:`Aizzie`,className:`mx-auto h-8 object-contain`}),(0,$.jsx)(h,{className:`text-2xl font-bold text-center`,children:e(`pages.login.title`)})]}),(0,$.jsxs)(w,{className:`space-y-4`,children:[(0,$.jsx)(we,{clientId:`325115170440-umv7s5pe0fgj4tc4bfurcne60dvb71nn.apps.googleusercontent.com`,children:(0,$.jsx)(Fe,{className:`w-full`,onSuccess:d})}),(0,$.jsx)(je,{className:`w-full`,onSuccess:d}),(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,$.jsx)(`span`,{className:`w-full border-t`})}),(0,$.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,$.jsx)(`span`,{className:`bg-background px-2 text-muted-foreground`,children:e(`common.separators.or`)})})]}),(0,$.jsx)(ze,{defaultEmail:r??``,onSuccess:e=>void d(e)})]})]})]})}export{Be as component};
28//# chunkId=01a10ba3-57fc-7272-aea8-4a8fb4ef8baa

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.