"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2328],{87670:function(e,t){var r;!/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var o=i.apply(null,r);o&&e.push(o)}}else if("object"===a){if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0!==(r=(function(){return i}).apply(t,[]))&&(e.exports=r)}()},74898:function(e,t,r){Object.defineProperty(t,"$",{enumerable:!0,get:function(){return i}});let n=r(3206);function i(e){let{createServerReference:t}=r(59947);return t(e,n.callServer)}},97106:function(e,t,r){r.d(t,{Nc:function(){return d}});var n=r(64759),i=r(76109);let a=(0,i.forwardRef)((e,t)=>{let{as:r="div",...i}=e;return(0,n.jsx)(r,{...i,ref:t})}),o="cf-turnstile-script",s="onloadTurnstileCallback",l=e=>!!document.getElementById(e),c=e=>{let{render:t="explicit",onLoadCallbackName:r=s,scriptOptions:{nonce:n="",defer:i=!0,async:a=!0,id:c="",appendTo:u}={}}=e,d=c||o;if(l(d))return;let f=document.createElement("script");f.id=d,f.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${r}&render=${t}`,document.querySelector(`script[src="${f.src}"]`)||(f.defer=!!i,f.async=!!a,n&&(f.nonce=n),("body"===u?document.body:document.getElementsByTagName("head")[0]).appendChild(f))},u={normal:{width:300,height:65},compact:{width:130,height:120},invisible:{width:0,height:0,overflow:"hidden"},interactionOnly:{width:"fit-content",height:"auto"}},d=(0,i.forwardRef)((e,t)=>{let{scriptOptions:r,options:d={},siteKey:f,onSuccess:h,onExpire:p,onError:w,onBeforeInteractive:g,onAfterInteractive:R,onUnsupported:m,id:E,style:b,as:y="div",injectScript:A=!0,..._}=e,v=d.size??"normal",[O,S]=(0,i.useState)("execute"===d.execution?u.invisible:"interaction-only"===d.appearance?u.interactionOnly:u[v]),I=(0,i.useRef)(null),T=(0,i.useRef)(!1),[N,C]=(0,i.useState)(),[P,x]=(0,i.useState)(!1),D=E??"cf-turnstile",U=A?r?.id||`${o}__${D}`:r?.id||o,K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,[t,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=()=>{l(e)&&r(!0)},n=new MutationObserver(t);return n.observe(document,{childList:!0,subtree:!0}),t(),()=>{n.disconnect()}},[e]),t}(U),k=r?.onLoadCallbackName?`${r.onLoadCallbackName}__${D}`:`${s}__${D}`,L=(0,i.useMemo)(()=>{let e;return{sitekey:f,action:d.action,cData:d.cData,callback:h,"error-callback":w,"expired-callback":p,"before-interactive-callback":g,"after-interactive-callback":R,"unsupported-callback":m,theme:d.theme??"auto",language:d.language??"auto",tabindex:d.tabIndex,"response-field":d.responseField,"response-field-name":d.responseFieldName,size:("invisible"!==v&&(e=v),e),retry:d.retry??"auto","retry-interval":d.retryInterval??8e3,"refresh-expired":d.refreshExpired??"auto",execution:d.execution??"render",appearance:d.appearance??"always"}},[f,d,h,w,p,v,g,R,m]),$=(0,i.useMemo)(()=>JSON.stringify(L),[L]);return(0,i.useImperativeHandle)(t,()=>{if(!K)return;let{turnstile:e}=window;return{getResponse(){if(!e?.getResponse||!N){console.warn("Turnstile has not been loaded");return}return e.getResponse(N)},reset(){if(!e?.reset||!N){console.warn("Turnstile has not been loaded");return}"execute"===d.execution&&S(u.invisible);try{e.reset(N)}catch(e){console.warn(`Failed to reset Turnstile widget ${N}`,e)}},remove(){if(!e?.remove||!N){console.warn("Turnstile has not been loaded");return}C(""),S(u.invisible),e.remove(N)},render(){if(!e?.render||!I.current||N){console.warn("Turnstile has not been loaded or widget already rendered");return}let t=e.render(I.current,L);return C(t),"execute"!==d.execution&&S(u[v]),t},execute(){if("execute"===d.execution){if(!e?.execute||!I.current||!N){console.warn("Turnstile has not been loaded or widget has not been rendered");return}e.execute(I.current,L),S(u[v])}}}},[K,N,d.execution,v,L,I]),(0,i.useEffect)(()=>(window[k]=()=>x(!0),()=>{delete window[k]}),[k]),(0,i.useEffect)(()=>{A&&!P&&c({onLoadCallbackName:k,scriptOptions:{...r,id:U}})},[A,P,k,r,U]),(0,i.useEffect)(()=>{K&&!P&&window.turnstile&&x(!0)},[P,K]),(0,i.useEffect)(()=>{if(!f){console.warn("sitekey was not provided");return}K&&I.current&&P&&!T.current&&(C(window.turnstile.render(I.current,L)),T.current=!0)},[K,f,L,T,P]),(0,i.useEffect)(()=>{window.turnstile&&I.current&&N&&(l(N)&&window.turnstile.remove(N),C(window.turnstile.render(I.current,L)),T.current=!0)},[$,f]),(0,i.useEffect)(()=>{if(window.turnstile&&N&&l(N))return()=>{window.turnstile.remove(N)}},[N]),(0,i.useEffect)(()=>{S("execute"===d.execution?u.invisible:"interaction-only"===L.appearance?u.interactionOnly:u[v])},[d.execution,v,L.appearance]),(0,n.jsx)(a,{ref:I,as:y,id:D,style:{...O,...b},..._})});d.displayName="Turnstile"},90482:function(e,t,r){r.d(t,{FY:function(){return n.F},IQ:function(){return i.I},RE:function(){return a.RE},y0:function(){return o.y}});var n=r(93303);r(32206);var i=r(78029),a=r(12283);r(73495),r(63609);var o=r(63276);r(93600)},77029:function(e,t,r){function n(e){let t=new Uint8Array(e),r="";for(let e of t)r+=String.fromCharCode(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function i(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,n=atob(t.padEnd(t.length+r,"=")),i=new ArrayBuffer(n.length),a=new Uint8Array(i);for(let e=0;e<n.length;e++)a[e]=n.charCodeAt(e);return i}function a(){return window?.PublicKeyCredential!==void 0&&"function"==typeof window.PublicKeyCredential}function o(e){let{id:t}=e;return{...e,id:i(t),transports:e.transports}}function s(e){return"localhost"===e||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}r.d(t,{RQ:function(){return h},ef:function(){return u},oz:function(){return w},x6:function(){return g}});class l extends Error{constructor({message:e,code:t,cause:r,name:n}){super(e,{cause:r}),this.name=n??r.name,this.code=t}}class c{createNewAbortSignal(){if(this.controller){let e=Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}let u=new c,d=["cross-platform","platform"];function f(e){if(!(!e||0>d.indexOf(e)))return e}async function h(e){let t,r,c,d,h;if(!a())throw Error("WebAuthn is not supported in this browser");let w={publicKey:{...e,challenge:i(e.challenge),user:{...e.user,id:i(e.user.id)},excludeCredentials:e.excludeCredentials?.map(o)}};w.signal=u.createNewAbortSignal();try{t=await navigator.credentials.create(w)}catch(e){throw function(e){let{error:t,options:r}=e,{publicKey:n}=r;if(!n)throw Error("options was missing required publicKey property");if("AbortError"===t.name){if(r.signal instanceof AbortSignal)return new l({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if("ConstraintError"===t.name){if(n.authenticatorSelection?.requireResidentKey===!0)return new l({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(n.authenticatorSelection?.userVerification==="required")return new l({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else if("InvalidStateError"===t.name)return new l({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});else if("NotAllowedError"===t.name)return new l({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});else if("NotSupportedError"===t.name)return new l(0===n.pubKeyCredParams.filter(e=>"public-key"===e.type).length?{message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}:{message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});else if("SecurityError"===t.name){let e=window.location.hostname;if(!s(e))return new l({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t});if(n.rp.id!==e)return new l({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else if("TypeError"===t.name){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new l({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if("UnknownError"===t.name)return new l({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t});return t}({error:e,options:w})}if(!t)throw Error("Registration was not completed");let{id:g,rawId:R,response:m,type:E}=t;if("function"==typeof m.getTransports&&(c=m.getTransports()),"function"==typeof m.getPublicKeyAlgorithm)try{d=m.getPublicKeyAlgorithm()}catch(e){p("getPublicKeyAlgorithm()",e)}if("function"==typeof m.getPublicKey)try{let e=m.getPublicKey();null!==e&&(h=n(e))}catch(e){p("getPublicKey()",e)}if("function"==typeof m.getAuthenticatorData)try{r=n(m.getAuthenticatorData())}catch(e){p("getAuthenticatorData()",e)}return{id:g,rawId:n(R),response:{attestationObject:n(m.attestationObject),clientDataJSON:n(m.clientDataJSON),transports:c,publicKeyAlgorithm:d,publicKey:h,authenticatorData:r},type:E,clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:f(t.authenticatorAttachment)}}function p(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
`,t)}async function w(e){let t,r,c,d=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a())throw Error("WebAuthn is not supported in this browser");e.allowCredentials?.length!==0&&(r=e.allowCredentials?.map(o));let h={...e,challenge:i(e.challenge),allowCredentials:r},p={};if(d){if(!await function(){if(!a())return new Promise(e=>e(!1));let e=window.PublicKeyCredential;return void 0===e.isConditionalMediationAvailable?new Promise(e=>e(!1)):e.isConditionalMediationAvailable()}())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');p.mediation="conditional",h.allowCredentials=[]}p.publicKey=h,p.signal=u.createNewAbortSignal();try{c=await navigator.credentials.get(p)}catch(e){throw function(e){let{error:t,options:r}=e,{publicKey:n}=r;if(!n)throw Error("options was missing required publicKey property");if("AbortError"===t.name){if(r.signal instanceof AbortSignal)return new l({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if("NotAllowedError"===t.name)return new l({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});else if("SecurityError"===t.name){let e=window.location.hostname;if(!s(e))return new l({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t});if(n.rpId!==e)return new l({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else if("UnknownError"===t.name)return new l({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t});return t}({error:e,options:p})}if(!c)throw Error("Authentication was not completed");let{id:w,rawId:g,response:R,type:m}=c;return R.userHandle&&(t=n(R.userHandle)),{id:w,rawId:n(g),response:{authenticatorData:n(R.authenticatorData),clientDataJSON:n(R.clientDataJSON),signature:n(R.signature),userHandle:t},type:m,clientExtensionResults:c.getClientExtensionResults(),authenticatorAttachment:f(c.authenticatorAttachment)}}function g(){return a()?PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable():new Promise(e=>e(!1))}}}]);