1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return u},urlObjectKeys:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${i}${c}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return l(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(71645);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=o(e,n)),t&&(i.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),i=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return b}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(90809),a=e.r(43476),l=o._(e.r(71645)),s=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550);e.r(33525);let p=e.r(88540),h=e.r(91949),m=e.r(73668),v=e.r(9396);function g(t){var r,n;let i,o,g,[b,x]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),j=(0,l.useRef)(null),{href:w,as:C,children:_,prefetch:S=null,passHref:O,replace:P,shallow:R,scroll:N,onClick:E,onMouseEnter:k,onTouchStart:T,legacyBehavior:A=!1,onNavigate:L,transitionTypes:D,ref:I,unstable_dynamicOnHover:$,...M}=t;i=_,A&&("string"==typeof i||"number"==typeof i)&&(i=(0,a.jsx)("a",{children:i}));let z=l.default.useContext(u.AppRouterContext),U=!1!==S,F=!1!==S?null===(n=S)||"auto"===n?v.FetchStrategy.PPR:v.FetchStrategy.Full:v.FetchStrategy.PPR,B="string"==typeof(r=C||w)?r:(0,s.formatUrl)(r);if(A){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(i)}let V=A?o&&"object"==typeof o&&o.ref:I,W=l.default.useCallback(e=>(null!==z&&(j.current=(0,h.mountLinkInstance)(e,B,z,F,U,x)),()=>{j.current&&((0,h.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,B,z,F,x]),K={ref:(0,c.useMergedRef)(W,V),onClick(t){A||"function"!=typeof E||E(t),A&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!z||t.defaultPrevented||function(t,r,n,i,o,a,s){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);l.default.startTransition(()=>{d(r,i?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s)})}}(t,B,j,P,N,L,D)},onMouseEnter(e){A||"function"!=typeof k||k(e),A&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),z&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){A||"function"!=typeof T||T(e),A&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),z&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,d.isAbsoluteUrl)(B)?K.href=B:A&&!O&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(B)),g=A?l.default.cloneElement(o,K):(0,a.jsx)("a",{...M,...K,children:i}),(0,a.jsx)(y.Provider,{value:b,children:g})}e.r(84508);let y=(0,l.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},20783,e=>{"use strict";var t=e.i(71645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,i=e.map(e=>{let i=r(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():r(e[t],null)}}}}e.s(["composeRefs",0,n,"useComposedRefs",0,function(...e){return t.useCallback(n(...e),e)}])},48425,e=>{"use strict";var t=e.i(71645),r=e.i(74080),n=e.i(20783),i=e.i(43476),o=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o}var l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var o,l;let s,u,c,d=(l=o=`Primitive.${r}`,(s=t.forwardRef((e,r)=>{let{children:i,...o}=e;if(t.isValidElement(i)){var a;let e,l,s=(a=i,(l=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(l=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,i.props);return i.type!==t.Fragment&&(u.ref=r?(0,n.composeRefs)(r,s):s),t.cloneElement(i,u)}return t.Children.count(i)>1?t.Children.only(null):null})).displayName=`${l}.SlotClone`,u=s,(c=t.forwardRef((e,r)=>{let{children:n,...o}=e,l=t.Children.toArray(n),s=l.find(a);if(s){let e=s.props.children,n=l.map(r=>r!==s?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,i.jsx)(u,{...o,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,i.jsx)(u,{...o,ref:r,children:n})})).displayName=`${o}.Slot`,c),f=t.forwardRef((e,t)=>{let{asChild:n,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?d:r,{...o,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});e.s(["Primitive",0,l,"dispatchDiscreteCustomEvent",0,function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}],48425)},25913,e=>{"use strict";var t=e.i(7670);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=t.clsx;e.s(["cva",0,(e,t)=>i=>{var o;if((null==t?void 0:t.variants)==null)return n(e,null==i?void 0:i.class,null==i?void 0:i.className);let{variants:a,defaultVariants:l}=t,s=Object.keys(a).map(e=>{let t=null==i?void 0:i[e],n=null==l?void 0:l[e];if(null===t)return null;let o=r(t)||r(n);return a[e][o]}),u=i&&Object.entries(i).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return n(e,s,null==t||null==(o=t.compoundVariants)?void 0:o.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...u}[t]):({...l,...u})[t]===r})?[...e,r,n]:e},[]),null==i?void 0:i.class,null==i?void 0:i.className)}])},67881,9840,e=>{"use strict";var t=e.i(43476),r=e.i(25913),n=e.i(71645),i=e.i(20783);function o(e){var r;let o,a=(r=e,(o=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(n.isValidElement(r)){var a;let e,l,s=(a=r,(l=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(l=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(u.ref=t?(0,i.composeRefs)(t,s):s),n.cloneElement(r,u)}return n.Children.count(r)>1?n.Children.only(null):null})).displayName=`${r}.SlotClone`,o),l=n.forwardRef((e,r)=>{let{children:i,...o}=e,l=n.Children.toArray(i),s=l.find(c);if(s){let e=s.props.children,i=l.map(t=>t!==s?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,t.jsx)(a,{...o,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,i):null})}return(0,t.jsx)(a,{...o,ref:r,children:i})});return l.displayName=`${e}.Slot`,l}var a=o("Slot"),l=Symbol("radix.slottable");function s(e){let r=({children:e})=>(0,t.jsx)(t.Fragment,{children:e});return r.displayName=`${e}.Slottable`,r.__radixId=l,r}var u=s("Slottable");function c(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}e.s(["Root",0,a,"Slot",0,a,"Slottable",0,u,"createSlot",0,o,"createSlottable",0,s],43556);var d=e.i(43556);e.s(["Slot",0,d],9840);var d=d,f=e.i(47163);let p=(0,r.cva)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:r="default",size:n="default",asChild:i=!1,...o}){let a=i?d.Root:"button";return(0,t.jsx)(a,{"data-slot":"button","data-variant":r,"data-size":n,className:(0,f.cn)(p({variant:r,size:n,className:e})),...o})}],67881)},70065,e=>{"use strict";var t=e.i(43476),r=e.i(47163);e.s(["Card",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center px-6 [.border-t]:pt-6",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",e),...n})}])},23750,e=>{"use strict";var t=e.i(43476),r=e.i(47163);e.s(["Input",0,function({className:e,type:n,...i}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...i})}])},10708,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(48425),i=r.forwardRef((e,r)=>(0,t.jsx)(n.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label",e.s(["Label",0,i,"Root",0,i],44461);var o=e.i(44461),o=o,a=e.i(47163);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(o.Root,{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],10708)},90571,e=>{"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,e.s(["__assign",()=>t,"__awaiter",0,function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})},"__rest",0,function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},"__spreadArray",0,function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}])},88879,e=>{"use strict";var t=e.i(43476),r=e.i(47163),n=e.i(20755),i=e.i(67881),o=e.i(70065),a=e.i(23750),l=e.i(10708),s=e.i(22016),u=e.i(71645);e.s(["ForgotPasswordForm",0,function({className:e,...c}){let[d,f]=(0,u.useState)(""),[p,h]=(0,u.useState)(null),[m,v]=(0,u.useState)(!1),[g,y]=(0,u.useState)(!1),b=async e=>{e.preventDefault();let t=(0,n.createClient)();y(!0),h(null);try{let{error:e}=await t.auth.resetPasswordForEmail(d,{redirectTo:`${window.location.origin}/auth/update-password`});if(e)throw e;v(!0)}catch(e){h(e instanceof Error?e.message:"An error occurred")}finally{y(!1)}};return(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col gap-6",e),...c,children:m?(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)(o.CardHeader,{children:[(0,t.jsx)(o.CardTitle,{className:"text-2xl",children:"Check Your Email"}),(0,t.jsx)(o.CardDescription,{children:"Password reset instructions sent"})]}),(0,t.jsx)(o.CardContent,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"If you registered using your email and password, you will receive a password reset email."})})]}):(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)(o.CardHeader,{children:[(0,t.jsx)(o.CardTitle,{className:"text-2xl",children:"Reset Your Password"}),(0,t.jsx)(o.CardDescription,{children:"Type in your email and we'll send you a link to reset your password"})]}),(0,t.jsx)(o.CardContent,{children:(0,t.jsxs)("form",{onSubmit:b,children:[(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(l.Label,{htmlFor:"email",children:"Email"}),(0,t.jsx)(a.Input,{id:"email",type:"email",placeholder:"m@example.com",required:!0,value:d,onChange:e=>f(e.target.value)})]}),p&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:p}),(0,t.jsx)(i.Button,{type:"submit",className:"w-full",disabled:g,children:g?"Sending...":"Send reset email"})]}),(0,t.jsxs)("div",{className:"mt-4 text-center text-sm",children:["Already have an account?"," ",(0,t.jsx)(s.default,{href:"/auth/login",className:"underline underline-offset-4",children:"Login"})]})]})})]})})}])}]); |