@s8lab/sso-client 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1299 -1290
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const u=require("react/jsx-runtime"),I=require("react");require("react-dom");function Pa(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const w=Pa(I),yn=new Set;function Ia(t){if(yn.has(t))return;yn.add(t);const e=document.createElement("script");e.src=`https://www.google.com/recaptcha/api.js?render=${t}`,e.async=!0,document.head.appendChild(e)}function Hr(t,e){return new Promise((r,n)=>{const s=()=>{window.grecaptcha.ready(()=>{window.grecaptcha.execute(t,{action:e}).then(r).catch(n)})};if(typeof window.grecaptcha<"u"){s();return}let a=0;const i=setInterval(()=>{typeof window.grecaptcha<"u"?(clearInterval(i),s()):a++>30&&(clearInterval(i),n(new Error("reCAPTCHA v3 script failed to load")))},300)})}const gs=I.createContext(null),vs=I.createContext(null);async function La(t,e){const r=await fetch(t,{...e,headers:{"Content-Type":"application/json",...e.headers??{}}});if(!r.ok){let n=`Request failed: ${r.status} ${r.statusText}`;try{const s=await r.json();s!=null&&s.message?n=s.message:s!=null&&s.error&&(n=s.error)}catch{}throw new Error(n)}if(r.status!==204)return r.json()}function Ma({children:t,apiUrl:e,projectId:r,storageKeyPrefix:n="sso",fetcher:s}){const[a,i]=I.useState(null),[o,c]=I.useState(!0),[l,h]=I.useState({user:null,tokens:null,isLoading:!0,isAuthenticated:!1}),f=s??La,p=I.useRef(e);p.current=e;const m=I.useRef(r);m.current=r;const x=`${n}:tokens`,v=I.useCallback($=>{$?localStorage.setItem(x,JSON.stringify($)):localStorage.removeItem(x)},[x]),S=I.useCallback(()=>{try{const $=localStorage.getItem(x);return $?JSON.parse($):null}catch{return null}},[x]);I.useEffect(()=>{let $=!1;async function z(){var Z;let ee;try{ee=await f(`${p.current}/auth/config`,{headers:{"X-Project-Id":m.current}}),$||i(ee)}catch{ee={allowSignup:!0,allowMagicLink:!1,captcha:{enabled:!1}},$||i(ee)}finally{$||c(!1)}(Z=ee.captcha)!=null&&Z.enabled&&ee.captcha.provider==="recaptcha"&&ee.captcha.version==="v3"&&ee.captcha.siteKey&&Ia(ee.captcha.siteKey);const T=S();if(!(T!=null&&T.accessToken)){$||h(J=>({...J,isLoading:!1}));return}try{const J=await f(`${p.current}/auth/me`,{headers:{Authorization:`Bearer ${T.accessToken}`}});$||h({user:J,tokens:T,isLoading:!1,isAuthenticated:!0})}catch{v(null),$||h({user:null,tokens:null,isLoading:!1,isAuthenticated:!1})}}return z(),()=>{$=!0}},[]);const k=I.useCallback(async $=>{h(z=>({...z,isLoading:!0}));try{const z=await f(`${p.current}/auth/login`,{method:"POST",body:JSON.stringify($)});v(z.tokens),h({user:z.user,tokens:z.tokens,isLoading:!1,isAuthenticated:!0})}catch(z){throw h(ee=>({...ee,isLoading:!1})),z}},[f,v]),C=I.useCallback(async $=>{h(z=>({...z,isLoading:!0}));try{const z=await f(`${p.current}/auth/signup`,{method:"POST",body:JSON.stringify($)});v(z.tokens),h({user:z.user,tokens:z.tokens,isLoading:!1,isAuthenticated:!0})}catch(z){throw h(ee=>({...ee,isLoading:!1})),z}},[f,v]),U=I.useCallback(async()=>{h($=>({...$,isLoading:!0}));try{const $=S();$!=null&&$.accessToken&&await f(`${p.current}/auth/logout`,{method:"POST",headers:{Authorization:`Bearer ${$.accessToken}`}}).catch(()=>{})}finally{v(null),h({user:null,tokens:null,isLoading:!1,isAuthenticated:!1})}},[f,S,v]),L=I.useCallback(async $=>{await f(`${p.current}/auth/forgot-password`,{method:"POST",body:JSON.stringify($)})},[f]),b=I.useCallback(async $=>{await f(`${p.current}/auth/magic-link`,{method:"POST",body:JSON.stringify($)})},[f]),B=I.useCallback($=>{h(z=>z.user?{...z,user:{...z.user,...$}}:z)},[]),W=I.useMemo(()=>({...l,login:k,signup:C,logout:U,forgotPassword:L,sendMagicLink:b,updateUser:B}),[l,k,C,U,L,b,B]),ae=I.useMemo(()=>({config:a,configLoading:o,apiUrl:e}),[a,o,e]);return u.jsx(vs.Provider,{value:ae,children:u.jsx(gs.Provider,{value:W,children:t})})}function Ot(){const t=I.useContext(gs);if(!t)throw new Error("useAuth must be used inside <AuthProvider>");return t}function ur(){const t=I.useContext(vs);if(!t)throw new Error("useAuthConfig must be used inside <AuthProvider>");return t}var Dt=t=>t.type==="checkbox",pt=t=>t instanceof Date,Le=t=>t==null;const xs=t=>typeof t=="object";var _e=t=>!Le(t)&&!Array.isArray(t)&&xs(t)&&!pt(t),Va=t=>_e(t)&&t.target?Dt(t.target)?t.target.checked:t.target.value:t,bs=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,$a=(t,e)=>t.has(bs(e)),Fa=t=>{const e=t.constructor&&t.constructor.prototype;return _e(e)&&e.hasOwnProperty("isPrototypeOf")},Yr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ce(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(Yr&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(_e(t)&&Fa(t)))return t;const n=r?[]:Object.create(Object.getPrototypeOf(t));for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=Ce(t[s]));return n}var dr=t=>/^\w*$/.test(t),be=t=>t===void 0,Kr=t=>Array.isArray(t)?t.filter(Boolean):[],Jr=t=>Kr(t.replace(/["|']|\]/g,"").split(/\.|\[/)),M=(t,e,r)=>{if(!e||!_e(t))return r;const n=(dr(e)?[e]:Jr(e)).reduce((s,a)=>Le(s)?s:s[a],t);return be(n)||n===t?be(t[e])?r:t[e]:n},Ke=t=>typeof t=="boolean",Ge=t=>typeof t=="function",ye=(t,e,r)=>{let n=-1;const s=dr(e)?[e]:Jr(e),a=s.length,i=a-1;for(;++n<a;){const o=s[n];let c=r;if(n!==i){const l=t[o];c=_e(l)||Array.isArray(l)?l:isNaN(+s[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;t[o]=c,t=t[o]}};const gt={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},He={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gr="form",_s="root",Da=I.createContext(null);Da.displayName="HookFormControlContext";var Ua=(t,e,r,n=!0)=>{const s={defaultValues:e._defaultValues};for(const a in t)Object.defineProperty(s,a,{get:()=>{const i=a;return e._proxyFormState[i]!==He.all&&(e._proxyFormState[i]=!n||He.all),t[i]}});return s};const za=typeof window<"u"?I.useLayoutEffect:I.useEffect;var Ae=t=>typeof t=="string",Ba=(t,e,r,n,s)=>Ae(t)?(n&&e.watch.add(t),M(r,t,s)):Array.isArray(t)?t.map(a=>(n&&e.watch.add(a),M(r,a))):(n&&(e.watchAll=!0),r),Ar=t=>Le(t)||!xs(t);function st(t,e,r=new WeakSet){if(Ar(t)||Ar(e))return Object.is(t,e);if(pt(t)&&pt(e))return Object.is(t.getTime(),e.getTime());const n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const a of n){const i=t[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(pt(i)&&pt(o)||_e(i)&&_e(o)||Array.isArray(i)&&Array.isArray(o)?!st(i,o,r):!Object.is(i,o))return!1}}return!0}const Za=I.createContext(null);Za.displayName="HookFormContext";var ws=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{},It=t=>Array.isArray(t)?t:[t],gn=()=>{let t=[];return{get observers(){return t},next:s=>{for(const a of t)a.next&&a.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(a=>a!==s)}}),unsubscribe:()=>{t=[]}}};function ks(t,e){const r={};for(const n in t)if(t.hasOwnProperty(n)){const s=t[n],a=e[n];if(s&&_e(s)&&a){const i=ks(s,a);_e(i)&&(r[n]=i)}else t[n]&&(r[n]=a)}return r}var Ne=t=>_e(t)&&!Object.keys(t).length,Xr=t=>t.type==="file",Xt=t=>{if(!Yr)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Ss=t=>t.type==="select-multiple",Qr=t=>t.type==="radio",Wa=t=>Qr(t)||Dt(t),vr=t=>Xt(t)&&t.isConnected;function qa(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=be(t)?n++:t[e[n++]];return t}function Ga(t){for(const e in t)if(t.hasOwnProperty(e)&&!be(t[e]))return!1;return!0}function ke(t,e){const r=Array.isArray(e)?e:dr(e)?[e]:Jr(e),n=r.length===1?t:qa(t,r),s=r.length-1,a=r[s];return n&&delete n[a],s!==0&&(_e(n)&&Ne(n)||Array.isArray(n)&&Ga(n))&&ke(t,r.slice(0,-1)),t}var Ha=t=>{for(const e in t)if(Ge(t[e]))return!0;return!1};function Cs(t){return Array.isArray(t)||_e(t)&&!Ha(t)}function Tr(t,e={}){for(const r in t){const n=t[r];Cs(n)?(e[r]=Array.isArray(n)?[]:{},Tr(n,e[r])):be(n)||(e[r]=!0)}return e}function xt(t,e,r){r||(r=Tr(e));for(const n in t){const s=t[n];if(Cs(s))be(e)||Ar(r[n])?r[n]=Tr(s,Array.isArray(s)?[]:{}):xt(s,Le(e)?{}:e[n],r[n]);else{const a=e[n];r[n]=!st(s,a)}}return r}const vn={value:!1,isValid:!1},xn={value:!0,isValid:!0};var Es=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!be(t[0].attributes.value)?be(t[0].value)||t[0].value===""?xn:{value:t[0].value,isValid:!0}:xn:vn}return vn},Rs=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>be(t)?t:e?t===""?NaN:t&&+t:r&&Ae(t)?new Date(t):n?n(t):t;const bn={isValid:!1,value:null};var Os=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,bn):bn;function _n(t){const e=t.ref;return Xr(e)?e.files:Qr(e)?Os(t.refs).value:Ss(e)?[...e.selectedOptions].map(({value:r})=>r):Dt(e)?Es(t.refs).value:Rs(be(e.value)?t.ref.value:e.value,t)}var Ya=(t,e,r,n)=>{const s={};for(const a of t){const i=M(e,a);i&&ye(s,a,i._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},Qt=t=>t instanceof RegExp,Nt=t=>be(t)?t:Qt(t)?t.source:_e(t)?Qt(t.value)?t.value.source:t.value:t,wn=t=>({isOnSubmit:!t||t===He.onSubmit,isOnBlur:t===He.onBlur,isOnChange:t===He.onChange,isOnAll:t===He.all,isOnTouch:t===He.onTouched});const kn="AsyncFunction";var Ka=t=>!!t&&!!t.validate&&!!(Ge(t.validate)&&t.validate.constructor.name===kn||_e(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===kn)),Ja=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Sn=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const Lt=(t,e,r,n)=>{for(const s of r||Object.keys(t)){const a=M(t,s);if(a){const{_f:i,...o}=a;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],s)&&!n)return!0;if(i.ref&&e(i.ref,i.name)&&!n)return!0;if(Lt(o,e))break}else if(_e(o)&&Lt(o,e))break}}};function Cn(t,e,r){const n=M(t,r);if(n||dr(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const a=s.join("."),i=M(e,a),o=M(t,a);if(i&&!Array.isArray(i)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};s.pop()}return{name:r}}var Xa=(t,e,r,n)=>{r(t);const{name:s,...a}=t;return Ne(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!n||He.all))},Qa=(t,e,r)=>!t||!e||t===e||It(t).some(n=>n&&(r?n===e:n.startsWith(e)||e.startsWith(n))),ei=(t,e,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(e||t):(r?n.isOnBlur:s.isOnBlur)?!t:(r?n.isOnChange:s.isOnChange)?t:!0,ti=(t,e)=>!Kr(M(t,e)).length&&ke(t,e),ri=(t,e,r)=>{const n=It(M(t,r));return ye(n,_s,e[r]),ye(t,r,n),t};function En(t,e,r="validate"){if(Ae(t)||Array.isArray(t)&&t.every(Ae)||Ke(t)&&!t)return{type:r,message:Ae(t)?t:"",ref:e}}var vt=t=>_e(t)&&!Qt(t)?t:{value:t,message:""},Rn=async(t,e,r,n,s,a)=>{const{ref:i,refs:o,required:c,maxLength:l,minLength:h,min:f,max:p,pattern:m,validate:x,name:v,valueAsNumber:S,mount:k}=t._f,C=M(r,v);if(!k||e.has(v))return{};const U=o?o[0]:i,L=T=>{s&&U.reportValidity&&(U.setCustomValidity(Ke(T)?"":T||""),U.reportValidity())},b={},B=Qr(i),W=Dt(i),ae=B||W,$=(S||Xr(i))&&be(i.value)&&be(C)||Xt(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,z=ws.bind(null,v,n,b),ee=(T,Z,J,ve=We.maxLength,de=We.minLength)=>{const xe=T?Z:J;b[v]={type:T?ve:de,message:xe,ref:i,...z(T?ve:de,xe)}};if(a?!Array.isArray(C)||!C.length:c&&(!ae&&($||Le(C))||Ke(C)&&!C||W&&!Es(o).isValid||B&&!Os(o).isValid)){const{value:T,message:Z}=Ae(c)?{value:!!c,message:c}:vt(c);if(T&&(b[v]={type:We.required,message:Z,ref:U,...z(We.required,Z)},!n))return L(Z),b}if(!$&&(!Le(f)||!Le(p))){let T,Z;const J=vt(p),ve=vt(f);if(!Le(C)&&!isNaN(C)){const de=i.valueAsNumber||C&&+C;Le(J.value)||(T=de>J.value),Le(ve.value)||(Z=de<ve.value)}else{const de=i.valueAsDate||new Date(C),xe=_=>new Date(new Date().toDateString()+" "+_),we=i.type=="time",Ee=i.type=="week";Ae(J.value)&&C&&(T=we?xe(C)>xe(J.value):Ee?C>J.value:de>new Date(J.value)),Ae(ve.value)&&C&&(Z=we?xe(C)<xe(ve.value):Ee?C<ve.value:de<new Date(ve.value))}if((T||Z)&&(ee(!!T,J.message,ve.message,We.max,We.min),!n))return L(b[v].message),b}if((l||h)&&!$&&(Ae(C)||a&&Array.isArray(C))){const T=vt(l),Z=vt(h),J=!Le(T.value)&&C.length>+T.value,ve=!Le(Z.value)&&C.length<+Z.value;if((J||ve)&&(ee(J,T.message,Z.message),!n))return L(b[v].message),b}if(m&&!$&&Ae(C)){const{value:T,message:Z}=vt(m);if(Qt(T)&&!C.match(T)&&(b[v]={type:We.pattern,message:Z,ref:i,...z(We.pattern,Z)},!n))return L(Z),b}if(x){if(Ge(x)){const T=await x(C,r),Z=En(T,U);if(Z&&(b[v]={...Z,...z(We.validate,Z.message)},!n))return L(Z.message),b}else if(_e(x)){let T={};for(const Z in x){if(!Ne(T)&&!n)break;const J=En(await x[Z](C,r),U,Z);J&&(T={...J,...z(Z,J.message)},L(J.message),n&&(b[v]=T))}if(!Ne(T)&&(b[v]={ref:U,...T},!n))return b}}return L(!0),b};const ni={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function si(t={}){let e={...ni,...t},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ge(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},n={},s=_e(e.defaultValues)||_e(e.values)?Ce(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:Ce(s),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...h};let p={...f};const m={array:gn(),state:gn()},x=e.criteriaMode===He.all,v=d=>y=>{clearTimeout(l),l=setTimeout(d,y)},S=async d=>{if(!i.keepIsValid&&!e.disabled&&(f.isValid||p.isValid||d)){let y;e.resolver?(y=Ne((await ae()).errors),k()):y=await ee({fields:n,onlyCheckValid:!0,eventType:gt.VALID}),y!==r.isValid&&m.state.next({isValid:y})}},k=(d,y)=>{!e.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((d||Array.from(o.mount)).forEach(g=>{g&&(y?ye(r.validatingFields,g,y):ke(r.validatingFields,g))}),m.state.next({validatingFields:r.validatingFields,isValidating:!Ne(r.validatingFields)}))},C=(d,y=[],g,N,O=!0,j=!0)=>{if(N&&g&&!e.disabled){if(i.action=!0,j&&Array.isArray(M(n,d))){const D=g(M(n,d),N.argA,N.argB);O&&ye(n,d,D)}if(j&&Array.isArray(M(r.errors,d))){const D=g(M(r.errors,d),N.argA,N.argB);O&&ye(r.errors,d,D),ti(r.errors,d)}if((f.touchedFields||p.touchedFields)&&j&&Array.isArray(M(r.touchedFields,d))){const D=g(M(r.touchedFields,d),N.argA,N.argB);O&&ye(r.touchedFields,d,D)}if(f.dirtyFields||p.dirtyFields){const D=xt(s,a),X=bs(d);ye(r.dirtyFields,X,M(D,X))}m.state.next({name:d,isDirty:Z(d,y),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ye(a,d,y)},U=(d,y)=>{ye(r.errors,d,y),m.state.next({errors:r.errors})},L=d=>{r.errors=d,m.state.next({errors:r.errors,isValid:!1})},b=(d,y,g,N)=>{const O=M(n,d);if(O){const j=M(a,d,be(g)?M(s,d):g);be(j)||N&&N.defaultChecked||y?ye(a,d,y?j:_n(O._f)):de(d,j),i.mount&&!i.action&&S()}},B=(d,y,g,N,O)=>{let j=!1,D=!1;const X={name:d};if(!e.disabled){if(!g||N){(f.isDirty||p.isDirty)&&(D=r.isDirty,r.isDirty=X.isDirty=Z(),j=D!==X.isDirty);const pe=st(M(s,d),y);D=!!M(r.dirtyFields,d),pe?ke(r.dirtyFields,d):ye(r.dirtyFields,d,!0),X.dirtyFields=r.dirtyFields,j=j||(f.dirtyFields||p.dirtyFields)&&D!==!pe}if(g){const pe=M(r.touchedFields,d);pe||(ye(r.touchedFields,d,g),X.touchedFields=r.touchedFields,j=j||(f.touchedFields||p.touchedFields)&&pe!==g)}j&&O&&m.state.next(X)}return j?X:{}},W=(d,y,g,N)=>{const O=M(r.errors,d),j=(f.isValid||p.isValid)&&Ke(y)&&r.isValid!==y;if(e.delayError&&g?(c=v(()=>U(d,g)),c(e.delayError)):(clearTimeout(l),c=null,g?ye(r.errors,d,g):ke(r.errors,d)),(g?!st(O,g):O)||!Ne(N)||j){const D={...N,...j&&Ke(y)?{isValid:y}:{},errors:r.errors,name:d};r={...r,...D},m.state.next(D)}},ae=async d=>(k(d,!0),await e.resolver(a,e.context,Ya(d||o.mount,n,e.criteriaMode,e.shouldUseNativeValidation))),$=async d=>{const{errors:y}=await ae(d);if(k(d),d)for(const g of d){const N=M(y,g);N?ye(r.errors,g,N):ke(r.errors,g)}else r.errors=y;return y},z=async({name:d,eventType:y})=>{if(t.validate){const g=await t.validate({formValues:a,formState:r,name:d,eventType:y});if(_e(g))for(const N in g)g[N]&&se(`${gr}.${N}`,{message:Ae(g.message)?g.message:"",type:We.validate});else Ae(g)||!g?se(gr,{message:g||"",type:We.validate}):K(gr);return g}return!0},ee=async({fields:d,onlyCheckValid:y,name:g,eventType:N,context:O={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(O.runRootValidation=!0,!await z({name:g,eventType:N})&&(O.valid=!1,y)))return O.valid;for(const j in d){const D=d[j];if(D){const{_f:X,...pe}=D;if(X){const Me=o.array.has(X.name),Ye=D._f&&Ka(D._f);Ye&&f.validatingFields&&k([X.name],!0);const Te=await Rn(D,o.disabled,a,x,e.shouldUseNativeValidation&&!y,Me);if(Ye&&f.validatingFields&&k([X.name]),Te[X.name]&&(O.valid=!1,y)||(!y&&(M(Te,X.name)?Me?ri(r.errors,Te,X.name):ye(r.errors,X.name,Te[X.name]):ke(r.errors,X.name)),t.shouldUseNativeValidation&&Te[X.name]))break}!Ne(pe)&&await ee({context:O,onlyCheckValid:y,fields:pe,name:j,eventType:N})}}return O.valid},T=()=>{for(const d of o.unMount){const y=M(n,d);y&&(y._f.refs?y._f.refs.every(g=>!vr(g)):!vr(y._f.ref))&&ce(d)}o.unMount=new Set},Z=(d,y)=>!e.disabled&&(d&&y&&ye(a,d,y),!st(G(),s)),J=(d,y,g)=>Ba(d,o,{...i.mount?a:be(y)?s:Ae(d)?{[d]:y}:y},g,y),ve=d=>Kr(M(i.mount?a:s,d,e.shouldUnregister?M(s,d,[]):[])),de=(d,y,g={})=>{const N=M(n,d);let O=y;if(N){const j=N._f;j&&(!j.disabled&&ye(a,d,Rs(y,j)),O=Xt(j.ref)&&Le(y)?"":y,Ss(j.ref)?[...j.ref.options].forEach(D=>D.selected=O.includes(D.value)):j.refs?Dt(j.ref)?j.refs.forEach(D=>{(!D.defaultChecked||!D.disabled)&&(Array.isArray(O)?D.checked=!!O.find(X=>X===D.value):D.checked=O===D.value||!!O)}):j.refs.forEach(D=>D.checked=D.value===O):Xr(j.ref)?j.ref.value="":(j.ref.value=O,j.ref.type||m.state.next({name:d,values:Ce(a)})))}(g.shouldDirty||g.shouldTouch)&&B(d,O,g.shouldTouch,g.shouldDirty,!0),g.shouldValidate&&R(d)},xe=(d,y,g)=>{for(const N in y){if(!y.hasOwnProperty(N))return;const O=y[N],j=d+"."+N,D=M(n,j);(o.array.has(d)||_e(O)||D&&!D._f)&&!pt(O)?xe(j,O,g):de(j,O,g)}},we=(d,y,g={})=>{const N=M(n,d),O=o.array.has(d),j=Ce(y);ye(a,d,j),O?(m.array.next({name:d,values:Ce(a)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&g.shouldDirty&&m.state.next({name:d,dirtyFields:xt(s,a),isDirty:Z(d,j)})):N&&!N._f&&!Le(j)?xe(d,j,g):de(d,j,g),Sn(d,o)?m.state.next({...r,name:d,values:Ce(a)}):m.state.next({name:i.mount?d:void 0,values:Ce(a)})},Ee=async d=>{i.mount=!0;const y=d.target;let g=y.name,N=!0;const O=M(n,g),j=pe=>{N=Number.isNaN(pe)||pt(pe)&&isNaN(pe.getTime())||st(pe,M(a,g,pe))},D=wn(e.mode),X=wn(e.reValidateMode);if(O){let pe,Me;const Ye=y.type?_n(O._f):Va(d),Te=d.type===gt.BLUR||d.type===gt.FOCUS_OUT,Na=!Ja(O._f)&&!t.validate&&!e.resolver&&!M(r.errors,g)&&!O._f.deps||ei(Te,M(r.touchedFields,g),r.isSubmitted,X,D),mr=Sn(g,o,Te);ye(a,g,Ye),Te?(!y||!y.readOnly)&&(O._f.onBlur&&O._f.onBlur(d),c&&c(0)):O._f.onChange&&O._f.onChange(d);const yr=B(g,Ye,Te),Aa=!Ne(yr)||mr;if(!Te&&m.state.next({name:g,type:d.type,values:Ce(a)}),Na)return(f.isValid||p.isValid)&&(e.mode==="onBlur"?Te&&S():Te||S()),Aa&&m.state.next({name:g,...mr?{}:yr});if(!e.resolver&&t.validate&&await z({name:g,eventType:d.type}),!Te&&mr&&m.state.next({...r}),e.resolver){const{errors:pn}=await ae([g]);if(k([g]),j(Ye),N){const Ta=Cn(r.errors,n,g),mn=Cn(pn,n,Ta.name||g);pe=mn.error,g=mn.name,Me=Ne(pn)}}else k([g],!0),pe=(await Rn(O,o.disabled,a,x,e.shouldUseNativeValidation))[g],k([g]),j(Ye),N&&(pe?Me=!1:(f.isValid||p.isValid)&&(Me=await ee({fields:n,onlyCheckValid:!0,name:g,eventType:d.type})));N&&(O._f.deps&&(!Array.isArray(O._f.deps)||O._f.deps.length>0)&&R(O._f.deps),W(g,Me,pe,yr))}},_=(d,y)=>{if(M(r.errors,y)&&d.focus)return d.focus(),1},R=async(d,y={})=>{let g,N;const O=It(d);if(e.resolver){const j=await $(be(d)?d:O);g=Ne(j),N=d?!O.some(D=>M(j,D)):g}else d?(N=(await Promise.all(O.map(async j=>{const D=M(n,j);return await ee({fields:D&&D._f?{[j]:D}:D,eventType:gt.TRIGGER})}))).every(Boolean),!(!N&&!r.isValid)&&S()):N=g=await ee({fields:n,name:d,eventType:gt.TRIGGER});return m.state.next({...!Ae(d)||(f.isValid||p.isValid)&&g!==r.isValid?{}:{name:d},...e.resolver||!d?{isValid:g}:{},errors:r.errors}),y.shouldFocus&&!N&&Lt(n,_,d?O:o.mount),N},G=(d,y)=>{let g={...i.mount?a:s};return y&&(g=ks(y.dirtyFields?r.dirtyFields:r.touchedFields,g)),be(d)?g:Ae(d)?M(g,d):d.map(N=>M(g,N))},q=(d,y)=>({invalid:!!M((y||r).errors,d),isDirty:!!M((y||r).dirtyFields,d),error:M((y||r).errors,d),isValidating:!!M(r.validatingFields,d),isTouched:!!M((y||r).touchedFields,d)}),K=d=>{const y=d?It(d):void 0;y==null||y.forEach(g=>ke(r.errors,g)),y?y.forEach(g=>{m.state.next({name:g,errors:r.errors})}):m.state.next({errors:{}})},se=(d,y,g)=>{const N=(M(n,d,{_f:{}})._f||{}).ref,O=M(r.errors,d)||{},{ref:j,message:D,type:X,...pe}=O;ye(r.errors,d,{...pe,...y,ref:N}),m.state.next({name:d,errors:r.errors,isValid:!1}),g&&g.shouldFocus&&N&&N.focus&&N.focus()},te=(d,y)=>Ge(d)?m.state.subscribe({next:g=>"values"in g&&d(J(void 0,y),g)}):J(d,y,!0),re=d=>m.state.subscribe({next:y=>{Qa(d.name,y.name,d.exact)&&Xa(y,d.formState||f,ja,d.reRenderRoot)&&d.callback({values:{...a},...r,...y,defaultValues:s})}}).unsubscribe,oe=d=>(i.mount=!0,p={...p,...d.formState},re({...d,formState:{...h,...d.formState}})),ce=(d,y={})=>{for(const g of d?It(d):o.mount)o.mount.delete(g),o.array.delete(g),y.keepValue||(ke(n,g),ke(a,g)),!y.keepError&&ke(r.errors,g),!y.keepDirty&&ke(r.dirtyFields,g),!y.keepTouched&&ke(r.touchedFields,g),!y.keepIsValidating&&ke(r.validatingFields,g),!e.shouldUnregister&&!y.keepDefaultValue&&ke(s,g);m.state.next({values:Ce(a)}),m.state.next({...r,...y.keepDirty?{isDirty:Z()}:{}}),!y.keepIsValid&&S()},ie=({disabled:d,name:y})=>{if(Ke(d)&&i.mount||d||o.disabled.has(y)){const O=o.disabled.has(y)!==!!d;d?o.disabled.add(y):o.disabled.delete(y),O&&i.mount&&!i.action&&S()}},Re=(d,y={})=>{let g=M(n,d);const N=Ke(y.disabled)||Ke(e.disabled);return ye(n,d,{...g||{},_f:{...g&&g._f?g._f:{ref:{name:d}},name:d,mount:!0,...y}}),o.mount.add(d),g?ie({disabled:Ke(y.disabled)?y.disabled:e.disabled,name:d}):b(d,!0,y.value),{...N?{disabled:y.disabled||e.disabled}:{},...e.progressive?{required:!!y.required,min:Nt(y.min),max:Nt(y.max),minLength:Nt(y.minLength),maxLength:Nt(y.maxLength),pattern:Nt(y.pattern)}:{},name:d,onChange:Ee,onBlur:Ee,ref:O=>{if(O){Re(d,y),g=M(n,d);const j=be(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,D=Wa(j),X=g._f.refs||[];if(D?X.find(pe=>pe===j):j===g._f.ref)return;ye(n,d,{_f:{...g._f,...D?{refs:[...X.filter(vr),j,...Array.isArray(M(s,d))?[{}]:[]],ref:{type:j.type,name:d}}:{ref:j}}}),b(d,!1,void 0,j)}else g=M(n,d,{}),g._f&&(g._f.mount=!1),(e.shouldUnregister||y.shouldUnregister)&&!($a(o.array,d)&&i.action)&&o.unMount.add(d)}}},A=()=>e.shouldFocusError&&Lt(n,_,o.mount),Fe=d=>{Ke(d)&&(m.state.next({disabled:d}),Lt(n,(y,g)=>{const N=M(n,g);N&&(y.disabled=N._f.disabled||d,Array.isArray(N._f.refs)&&N._f.refs.forEach(O=>{O.disabled=N._f.disabled||d}))},0,!1))},ht=(d,y)=>async g=>{let N;g&&(g.preventDefault&&g.preventDefault(),g.persist&&g.persist());let O=Ce(a);if(m.state.next({isSubmitting:!0}),e.resolver){const{errors:j,values:D}=await ae();k(),r.errors=j,O=Ce(D)}else await ee({fields:n,eventType:gt.SUBMIT});if(o.disabled.size)for(const j of o.disabled)ke(O,j);if(ke(r.errors,_s),Ne(r.errors)){m.state.next({errors:{}});try{await d(O,g)}catch(j){N=j}}else y&&await y({...r.errors},g),A(),setTimeout(A);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ne(r.errors)&&!N,submitCount:r.submitCount+1,errors:r.errors}),N)throw N},zt=(d,y={})=>{M(n,d)&&(be(y.defaultValue)?we(d,Ce(M(s,d))):(we(d,y.defaultValue),ye(s,d,Ce(y.defaultValue))),y.keepTouched||ke(r.touchedFields,d),y.keepDirty||(ke(r.dirtyFields,d),r.isDirty=y.defaultValue?Z(d,Ce(M(s,d))):Z()),y.keepError||(ke(r.errors,d),f.isValid&&S()),m.state.next({...r}))},dn=(d,y={})=>{const g=d?Ce(d):s,N=Ce(g),O=Ne(d),j=O?s:N;if(y.keepDefaultValues||(s=g),!y.keepValues){if(y.keepDirtyValues){const D=new Set([...o.mount,...Object.keys(xt(s,a))]);for(const X of Array.from(D)){const pe=M(r.dirtyFields,X),Me=M(a,X),Ye=M(j,X);pe&&!be(Me)?ye(j,X,Me):!pe&&!be(Ye)&&we(X,Ye)}}else{if(Yr&&be(d))for(const D of o.mount){const X=M(n,D);if(X&&X._f){const pe=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(Xt(pe)){const Me=pe.closest("form");if(Me){Me.reset();break}}}}if(y.keepFieldsRef)for(const D of o.mount)we(D,M(j,D));else n={}}a=e.shouldUnregister?y.keepDefaultValues?Ce(s):{}:Ce(j),m.array.next({values:{...j}}),m.state.next({values:{...j}})}o={mount:y.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!y.keepIsValid||!!y.keepDirtyValues||!e.shouldUnregister&&!Ne(j),i.watch=!!e.shouldUnregister,i.keepIsValid=!!y.keepIsValid,i.action=!1,y.keepErrors||(r.errors={}),m.state.next({submitCount:y.keepSubmitCount?r.submitCount:0,isDirty:O?!1:y.keepDirty?r.isDirty:!!(y.keepDefaultValues&&!st(d,s)),isSubmitted:y.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:O?{}:y.keepDirtyValues?y.keepDefaultValues&&a?xt(s,a):r.dirtyFields:y.keepDefaultValues&&d?xt(s,d):y.keepDirty?r.dirtyFields:{},touchedFields:y.keepTouched?r.touchedFields:{},errors:y.keepErrors?r.errors:{},isSubmitSuccessful:y.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},fn=(d,y)=>dn(Ge(d)?d(a):d,{...e.resetOptions,...y}),Oa=(d,y={})=>{const g=M(n,d),N=g&&g._f;if(N){const O=N.refs?N.refs[0]:N.ref;O.focus&&setTimeout(()=>{O.focus(),y.shouldSelect&&Ge(O.select)&&O.select()})}},ja=d=>{r={...r,...d}},hn={control:{register:Re,unregister:ce,getFieldState:q,handleSubmit:ht,setError:se,_subscribe:re,_runSchema:ae,_updateIsValidating:k,_focusError:A,_getWatch:J,_getDirty:Z,_setValid:S,_setFieldArray:C,_setDisabledField:ie,_setErrors:L,_getFieldArray:ve,_reset:dn,_resetDefaultValues:()=>Ge(e.defaultValues)&&e.defaultValues().then(d=>{fn(d,e.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:T,_disableForm:Fe,_subjects:m,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return i},set _state(d){i=d},get _defaultValues(){return s},get _names(){return o},set _names(d){o=d},get _formState(){return r},get _options(){return e},set _options(d){e={...e,...d}}},subscribe:oe,trigger:R,register:Re,handleSubmit:ht,watch:te,setValue:we,getValues:G,reset:fn,resetField:zt,clearErrors:K,unregister:ce,setError:se,setFocus:Oa,getFieldState:q};return{...hn,formControl:hn}}function er(t={}){const e=I.useRef(void 0),r=I.useRef(void 0),[n,s]=I.useState({isDirty:!1,isValidating:!1,isLoading:Ge(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:Ge(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:n},t.defaultValues&&!Ge(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:i,...o}=si(t);e.current={...o,formState:n}}const a=e.current.control;return a._options=t,za(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>s({...a._formState}),reRenderRoot:!0});return s(o=>({...o,isReady:!0})),a._formState.isReady=!0,i},[a]),I.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),I.useEffect(()=>{t.mode&&(a._options.mode=t.mode),t.reValidateMode&&(a._options.reValidateMode=t.reValidateMode)},[a,t.mode,t.reValidateMode]),I.useEffect(()=>{t.errors&&(a._setErrors(t.errors),a._focusError())},[a,t.errors]),I.useEffect(()=>{t.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,t.shouldUnregister]),I.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==n.isDirty&&a._subjects.state.next({isDirty:i})}},[a,n.isDirty]),I.useEffect(()=>{var i;t.values&&!st(t.values,r.current)?(a._reset(t.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((i=a._options.resetOptions)===null||i===void 0)&&i.keepIsValid||a._setValid(),r.current=t.values,s(o=>({...o}))):a._resetDefaultValues()},[a,t.values]),I.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=I.useMemo(()=>Ua(n,a),[a,n]),e.current}const On=(t,e,r)=>{if(t&&"reportValidity"in t){const n=M(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},js=(t,e)=>{for(const r in e.fields){const n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?On(n.ref,r,t):n.refs&&n.refs.forEach(s=>On(s,r,t))}},ai=(t,e)=>{e.shouldUseNativeValidation&&js(t,e);const r={};for(const n in t){const s=M(e.fields,n),a=Object.assign(t[n]||{},{ref:s&&s.ref});if(ii(e.names||Object.keys(t),n)){const i=Object.assign({},M(r,n));ye(i,"root",a),ye(r,n,i)}else ye(r,n,a)}return r},ii=(t,e)=>t.some(r=>r.startsWith(e+"."));var oi=function(t,e){for(var r={};t.length;){var n=t[0],s=n.code,a=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var o=n.unionErrors[0].errors[0];r[i]={message:o.message,type:o.code}}else r[i]={message:a,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(h){return h.errors.forEach(function(f){return t.push(f)})}),e){var c=r[i].types,l=c&&c[n.code];r[i]=ws(i,e,r,s,l?[].concat(l,n.message):n.message)}t.shift()}return r},tr=function(t,e,r){return r===void 0&&(r={}),function(n,s,a){try{return Promise.resolve((function(i,o){try{var c=Promise.resolve(t[r.mode==="sync"?"parse":"parseAsync"](n,e)).then(function(l){return a.shouldUseNativeValidation&&js({},a),{errors:{},values:r.raw?n:l}})}catch(l){return o(l)}return c&&c.then?c.then(void 0,o):c})(0,function(i){if((function(o){return Array.isArray(o==null?void 0:o.errors)})(i))return{values:{},errors:ai(oi(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}}},ue;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},t.getValidEnumValues=s=>{const a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(const i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(ue||(ue={}));var jn;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(jn||(jn={}));const V=ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nt=t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return Number.isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}},E=ue.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class et extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(r(i))):o[l]=o[l]||{_errors:[]},o=o[l],c++}}};return s(this),n}static assert(e){if(!(e instanceof et))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ue.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];r[a]=r[a]||[],r[a].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}et.create=t=>new et(t);const Pr=(t,e)=>{let r;switch(t.code){case E.invalid_type:t.received===V.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ue.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${ue.joinValues(t.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ue.joinValues(t.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${ue.joinValues(t.options)}, received '${t.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ue.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case E.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case E.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=e.defaultError,ue.assertNever(t)}return{message:r}};let ci=Pr;function li(){return ci}const ui=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)o=l(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}};function P(t,e){const r=li(),n=ui({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Pr?void 0:Pr].filter(s=>!!s)});t.common.issues.push(n)}class $e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return H;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return $e.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return H;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const H=Object.freeze({status:"aborted"}),Pt=t=>({status:"dirty",value:t}),Be=t=>({status:"valid",value:t}),Nn=t=>t.status==="aborted",An=t=>t.status==="dirty",wt=t=>t.status==="valid",rr=t=>typeof Promise<"u"&&t instanceof Promise;var F;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(F||(F={}));class lt{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tn=(t,e)=>{if(wt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new et(t.common.issues);return this._error=r,this._error}}};function ne(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{const{message:c}=t;return i.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??n??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:c??r??o.defaultError}},description:s}}class le{get description(){return this._def.description}_getType(e){return nt(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:nt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $e,ctx:{common:e.parent.common,data:e.data,parsedType:nt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(rr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:nt(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Tn(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:nt(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:r});return wt(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(s=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(a=>wt(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:nt(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(rr(s)?s:Promise.resolve(s));return Tn(n,a)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:E.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new St({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ot.create(this,this._def)}nullable(){return Ct.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xe.create(this)}promise(){return ir.create(this,this._def)}or(e){return sr.create([this,e],this._def)}and(e){return ar.create(this,e,this._def)}transform(e){return new St({...ne(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Mr({...ne(this._def),innerType:this,defaultValue:r,typeName:Y.ZodDefault})}brand(){return new Pi({typeName:Y.ZodBranded,type:this,...ne(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Vr({...ne(this._def),innerType:this,catchValue:r,typeName:Y.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return en.create(this,e)}readonly(){return $r.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const di=/^c[^\s-]{8,}$/i,fi=/^[0-9a-z]+$/,hi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pi=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mi=/^[a-z0-9_-]{21}$/i,yi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gi=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xr;const bi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_i=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,wi=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ki=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Si=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ci=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ns="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ei=new RegExp(`^${Ns}$`);function As(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Ri(t){return new RegExp(`^${As(t)}$`)}function Oi(t){let e=`${Ns}T${As(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function ji(t,e){return!!((e==="v4"||!e)&&bi.test(t)||(e==="v6"||!e)&&wi.test(t))}function Ni(t,e){if(!yi.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Ai(t,e){return!!((e==="v4"||!e)&&_i.test(t)||(e==="v6"||!e)&&ki.test(t))}class it extends le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_type,expected:V.string,received:a.parsedType}),H}const n=new $e;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?P(s,{code:E.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&P(s,{code:E.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")vi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"email",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")xr||(xr=new RegExp(xi,"u")),xr.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"emoji",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")pi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"uuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")mi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"nanoid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")di.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"cuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")fi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"cuid2",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")hi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"ulid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),P(s,{validation:"url",code:E.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"regex",code:E.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Oi(a).test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Ei.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Ri(a).test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?gi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"duration",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?ji(e.data,a.version)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"ip",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?Ni(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"jwt",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Ai(e.data,a.version)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"cidr",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Si.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"base64",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Ci.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"base64url",code:E.invalid_string,message:a.message}),n.dirty()):ue.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:E.invalid_string,...F.errToObj(n)})}_addCheck(e){return new it({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...F.errToObj(e)})}url(e){return this._addCheck({kind:"url",...F.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...F.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...F.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...F.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...F.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...F.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...F.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...F.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...F.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...F.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...F.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...F.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...F.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...F.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...F.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...F.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...F.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...F.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...F.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...F.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...F.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...F.errToObj(r)})}nonempty(e){return this.min(1,F.errToObj(e))}trim(){return new it({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new it({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new it({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}it.create=t=>new it({checks:[],typeName:Y.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ne(t)});function Ti(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=Number.parseInt(t.toFixed(s).replace(".","")),i=Number.parseInt(e.toFixed(s).replace(".",""));return a%i/10**s}class Mt extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_type,expected:V.number,received:a.parsedType}),H}let n;const s=new $e;for(const a of this._def.checks)a.kind==="int"?ue.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),P(n,{code:E.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Ti(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),P(n,{code:E.not_finite,message:a.message}),s.dirty()):ue.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,F.toString(r))}gt(e,r){return this.setLimit("min",e,!1,F.toString(r))}lte(e,r){return this.setLimit("max",e,!0,F.toString(r))}lt(e,r){return this.setLimit("max",e,!1,F.toString(r))}setLimit(e,r,n,s){return new Mt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(s)}]})}_addCheck(e){return new Mt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:F.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:F.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:F.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:F.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:F.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:F.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:F.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:F.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:F.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ue.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Mt.create=t=>new Mt({checks:[],typeName:Y.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ne(t)});class Vt extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let n;const s=new $e;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):ue.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return P(r,{code:E.invalid_type,expected:V.bigint,received:r.parsedType}),H}gte(e,r){return this.setLimit("min",e,!0,F.toString(r))}gt(e,r){return this.setLimit("min",e,!1,F.toString(r))}lte(e,r){return this.setLimit("max",e,!0,F.toString(r))}lt(e,r){return this.setLimit("max",e,!1,F.toString(r))}setLimit(e,r,n,s){return new Vt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(s)}]})}_addCheck(e){return new Vt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:F.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:F.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:F.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:F.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:F.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Vt.create=t=>new Vt({checks:[],typeName:Y.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ne(t)});class Pn extends le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:V.boolean,received:n.parsedType}),H}return Be(e.data)}}Pn.create=t=>new Pn({typeName:Y.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ne(t)});class nr extends le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_type,expected:V.date,received:a.parsedType}),H}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_date}),H}const n=new $e;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):ue.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new nr({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:F.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:F.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}nr.create=t=>new nr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Y.ZodDate,...ne(t)});class In extends le{_parse(e){if(this._getType(e)!==V.symbol){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:V.symbol,received:n.parsedType}),H}return Be(e.data)}}In.create=t=>new In({typeName:Y.ZodSymbol,...ne(t)});class Ln extends le{_parse(e){if(this._getType(e)!==V.undefined){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:V.undefined,received:n.parsedType}),H}return Be(e.data)}}Ln.create=t=>new Ln({typeName:Y.ZodUndefined,...ne(t)});class Mn extends le{_parse(e){if(this._getType(e)!==V.null){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:V.null,received:n.parsedType}),H}return Be(e.data)}}Mn.create=t=>new Mn({typeName:Y.ZodNull,...ne(t)});class Vn extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return Be(e.data)}}Vn.create=t=>new Vn({typeName:Y.ZodAny,...ne(t)});class $n extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Be(e.data)}}$n.create=t=>new $n({typeName:Y.ZodUnknown,...ne(t)});class ut extends le{_parse(e){const r=this._getOrReturnCtx(e);return P(r,{code:E.invalid_type,expected:V.never,received:r.parsedType}),H}}ut.create=t=>new ut({typeName:Y.ZodNever,...ne(t)});class Fn extends le{_parse(e){if(this._getType(e)!==V.undefined){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:V.void,received:n.parsedType}),H}return Be(e.data)}}Fn.create=t=>new Fn({typeName:Y.ZodVoid,...ne(t)});class Xe extends le{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==V.array)return P(r,{code:E.invalid_type,expected:V.array,received:r.parsedType}),H;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(i||o)&&(P(r,{code:i?E.too_big:E.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(P(r,{code:E.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(P(r,{code:E.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new lt(r,i,r.path,o)))).then(i=>$e.mergeArray(n,i));const a=[...r.data].map((i,o)=>s.type._parseSync(new lt(r,i,r.path,o)));return $e.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Xe({...this._def,minLength:{value:e,message:F.toString(r)}})}max(e,r){return new Xe({...this._def,maxLength:{value:e,message:F.toString(r)}})}length(e,r){return new Xe({...this._def,exactLength:{value:e,message:F.toString(r)}})}nonempty(e){return this.min(1,e)}}Xe.create=(t,e)=>new Xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...ne(e)});function bt(t){if(t instanceof Se){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=ot.create(bt(n))}return new Se({...t._def,shape:()=>e})}else return t instanceof Xe?new Xe({...t._def,type:bt(t.element)}):t instanceof ot?ot.create(bt(t.unwrap())):t instanceof Ct?Ct.create(bt(t.unwrap())):t instanceof mt?mt.create(t.items.map(e=>bt(e))):t}class Se extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=ue.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==V.object){const l=this._getOrReturnCtx(e);return P(l,{code:E.invalid_type,expected:V.object,received:l.parsedType}),H}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ut&&this._def.unknownKeys==="strip"))for(const l in s.data)i.includes(l)||o.push(l);const c=[];for(const l of i){const h=a[l],f=s.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new lt(s,f,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof ut){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of o)c.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(l==="strict")o.length>0&&(P(s,{code:E.unrecognized_keys,keys:o}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of o){const f=s.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new lt(s,f,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const f=await h.key,p=await h.value;l.push({key:f,value:p,alwaysSet:h.alwaysSet})}return l}).then(l=>$e.mergeObjectSync(n,l)):$e.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return F.errToObj,new Se({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var a,i;const s=((i=(a=this._def).errorMap)==null?void 0:i.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:F.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Se({...this._def,unknownKeys:"strip"})}passthrough(){return new Se({...this._def,unknownKeys:"passthrough"})}extend(e){return new Se({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Se({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Se({...this._def,catchall:e})}pick(e){const r={};for(const n of ue.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Se({...this._def,shape:()=>r})}omit(e){const r={};for(const n of ue.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Se({...this._def,shape:()=>r})}deepPartial(){return bt(this)}partial(e){const r={};for(const n of ue.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new Se({...this._def,shape:()=>r})}required(e){const r={};for(const n of ue.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof ot;)a=a._def.innerType;r[n]=a}return new Se({...this._def,shape:()=>r})}keyof(){return Ts(ue.objectKeys(this.shape))}}Se.create=(t,e)=>new Se({shape:()=>t,unknownKeys:"strip",catchall:ut.create(),typeName:Y.ZodObject,...ne(e)});Se.strictCreate=(t,e)=>new Se({shape:()=>t,unknownKeys:"strict",catchall:ut.create(),typeName:Y.ZodObject,...ne(e)});Se.lazycreate=(t,e)=>new Se({shape:t,unknownKeys:"strip",catchall:ut.create(),typeName:Y.ZodObject,...ne(e)});class sr extends le{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new et(o.ctx.common.issues));return P(r,{code:E.invalid_union,unionErrors:i}),H}if(r.common.async)return Promise.all(n.map(async a=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},h=c._parseSync({data:r.data,path:r.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new et(c));return P(r,{code:E.invalid_union,unionErrors:o}),H}}get options(){return this._def.options}}sr.create=(t,e)=>new sr({options:t,typeName:Y.ZodUnion,...ne(e)});function Ir(t,e){const r=nt(t),n=nt(e);if(t===e)return{valid:!0,data:t};if(r===V.object&&n===V.object){const s=ue.objectKeys(e),a=ue.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(const o of a){const c=Ir(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(r===V.array&&n===V.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<t.length;a++){const i=t[a],o=e[a],c=Ir(i,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===V.date&&n===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ar extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Nn(a)||Nn(i))return H;const o=Ir(a.value,i.value);return o.valid?((An(a)||An(i))&&r.dirty(),{status:r.value,value:o.data}):(P(n,{code:E.invalid_intersection_types}),H)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ar.create=(t,e,r)=>new ar({left:t,right:e,typeName:Y.ZodIntersection,...ne(r)});class mt extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return P(n,{code:E.invalid_type,expected:V.array,received:n.parsedType}),H;if(n.data.length<this._def.items.length)return P(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;!this._def.rest&&n.data.length>this._def.items.length&&(P(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new lt(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>$e.mergeArray(r,i)):$e.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new mt({...this._def,rest:e})}}mt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mt({items:t,typeName:Y.ZodTuple,rest:null,...ne(e)})};class Dn extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return P(n,{code:E.invalid_type,expected:V.map,received:n.parsedType}),H;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,c],l)=>({key:s._parse(new lt(n,o,n.path,[l,"key"])),value:a._parse(new lt(n,c,n.path,[l,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return H;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),o.set(l.value,h.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const c of i){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return H;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),o.set(l.value,h.value)}return{status:r.value,value:o}}}}Dn.create=(t,e,r)=>new Dn({valueType:e,keyType:t,typeName:Y.ZodMap,...ne(r)});class $t extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return P(n,{code:E.invalid_type,expected:V.set,received:n.parsedType}),H;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(P(n,{code:E.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(P(n,{code:E.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const a=this._def.valueType;function i(c){const l=new Set;for(const h of c){if(h.status==="aborted")return H;h.status==="dirty"&&r.dirty(),l.add(h.value)}return{status:r.value,value:l}}const o=[...n.data.values()].map((c,l)=>a._parse(new lt(n,c,n.path,l)));return n.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,r){return new $t({...this._def,minSize:{value:e,message:F.toString(r)}})}max(e,r){return new $t({...this._def,maxSize:{value:e,message:F.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}$t.create=(t,e)=>new $t({valueType:t,minSize:null,maxSize:null,typeName:Y.ZodSet,...ne(e)});class Un extends le{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Un.create=(t,e)=>new Un({getter:t,typeName:Y.ZodLazy,...ne(e)});class Lr extends le{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return P(r,{received:r.data,code:E.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:e.data}}get value(){return this._def.value}}Lr.create=(t,e)=>new Lr({value:t,typeName:Y.ZodLiteral,...ne(e)});function Ts(t,e){return new kt({values:t,typeName:Y.ZodEnum,...ne(e)})}class kt extends le{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return P(r,{expected:ue.joinValues(n),received:r.parsedType,code:E.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return P(r,{received:r.data,code:E.invalid_enum_value,options:n}),H}return Be(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return kt.create(e,{...this._def,...r})}exclude(e,r=this._def){return kt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}kt.create=Ts;class zn extends le{_parse(e){const r=ue.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){const s=ue.objectValues(r);return P(n,{expected:ue.joinValues(s),received:n.parsedType,code:E.invalid_type}),H}if(this._cache||(this._cache=new Set(ue.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=ue.objectValues(r);return P(n,{received:n.data,code:E.invalid_enum_value,options:s}),H}return Be(e.data)}get enum(){return this._def.values}}zn.create=(t,e)=>new zn({values:t,typeName:Y.ZodNativeEnum,...ne(e)});class ir extends le{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.promise&&r.common.async===!1)return P(r,{code:E.invalid_type,expected:V.promise,received:r.parsedType}),H;const n=r.parsedType===V.promise?r.data:Promise.resolve(r.data);return Be(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ir.create=(t,e)=>new ir({type:t,typeName:Y.ZodPromise,...ne(e)});class St extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{P(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return H;const c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?H:c.status==="dirty"||r.value==="dirty"?Pt(c.value):c});{if(r.value==="aborted")return H;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?H:o.status==="dirty"||r.value==="dirty"?Pt(o.value):o}}if(s.type==="refinement"){const i=o=>{const c=s.refinement(o,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?H:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?H:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wt(i))return H;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>wt(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):H);ue.assertNever(s)}}St.create=(t,e,r)=>new St({schema:t,typeName:Y.ZodEffects,effect:e,...ne(r)});St.createWithPreprocess=(t,e,r)=>new St({schema:e,effect:{type:"preprocess",transform:t},typeName:Y.ZodEffects,...ne(r)});class ot extends le{_parse(e){return this._getType(e)===V.undefined?Be(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ot.create=(t,e)=>new ot({innerType:t,typeName:Y.ZodOptional,...ne(e)});class Ct extends le{_parse(e){return this._getType(e)===V.null?Be(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ct.create=(t,e)=>new Ct({innerType:t,typeName:Y.ZodNullable,...ne(e)});class Mr extends le{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Mr.create=(t,e)=>new Mr({innerType:t,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ne(e)});class Vr extends le{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return rr(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new et(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new et(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Vr.create=(t,e)=>new Vr({innerType:t,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ne(e)});class Bn extends le{_parse(e){if(this._getType(e)!==V.nan){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:V.nan,received:n.parsedType}),H}return{status:"valid",value:e.data}}}Bn.create=t=>new Bn({typeName:Y.ZodNaN,...ne(t)});class Pi extends le{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class en extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?H:a.status==="dirty"?(r.dirty(),Pt(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?H:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new en({in:e,out:r,typeName:Y.ZodPipeline})}}class $r extends le{_parse(e){const r=this._def.innerType._parse(e),n=s=>(wt(s)&&(s.value=Object.freeze(s.value)),s);return rr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}$r.create=(t,e)=>new $r({innerType:t,typeName:Y.ZodReadonly,...ne(e)});var Y;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Y||(Y={}));const Je=it.create;ut.create;Xe.create;const fr=Se.create;sr.create;ar.create;mt.create;const Ii=Lr.create;kt.create;ir.create;ot.create;Ct.create;/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const u=require("react/jsx-runtime"),I=require("react");require("react-dom");function Ia(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const w=Ia(I),yn=new Set;function La(t){if(yn.has(t))return;yn.add(t);const e=document.createElement("script");e.src=`https://www.google.com/recaptcha/api.js?render=${t}`,e.async=!0,document.head.appendChild(e)}function Hr(t,e){return new Promise((r,n)=>{const s=()=>{window.grecaptcha.ready(()=>{window.grecaptcha.execute(t,{action:e}).then(r).catch(n)})};if(typeof window.grecaptcha<"u"){s();return}let a=0;const i=setInterval(()=>{typeof window.grecaptcha<"u"?(clearInterval(i),s()):a++>30&&(clearInterval(i),n(new Error("reCAPTCHA v3 script failed to load")))},300)})}const vs=I.createContext(null),xs=I.createContext(null);async function gn(t,e){const r=await fetch(t,{...e,headers:{"Content-Type":"application/json",...e.headers??{}}});if(!r.ok){let n=`Request failed: ${r.status} ${r.statusText}`;try{const s=await r.json();s!=null&&s.message?n=s.message:s!=null&&s.error&&(n=s.error)}catch{}throw new Error(n)}if(r.status!==204)return r.json()}function Ma({children:t,apiUrl:e,projectId:r,storageKeyPrefix:n="sso",fetcher:s}){const[a,i]=I.useState(null),[o,c]=I.useState(!0),[l,h]=I.useState({user:null,tokens:null,isLoading:!0,isAuthenticated:!1}),f=I.useRef(e);f.current=e;const p=I.useRef(r);p.current=r;const m=I.useRef(s??gn);m.current=s??gn;const x=I.useCallback((V,z={})=>m.current(V,{...z,headers:{"X-Project-Id":p.current,...z.headers??{}}}),[]),v=`${n}:tokens`,S=I.useCallback(V=>{V?localStorage.setItem(v,JSON.stringify(V)):localStorage.removeItem(v)},[v]),k=I.useCallback(()=>{try{const V=localStorage.getItem(v);return V?JSON.parse(V):null}catch{return null}},[v]);I.useEffect(()=>{let V=!1;async function z(){var Q;let N;try{N=await x(`${f.current}/auth/config`),V||i(N)}catch{N={allowSignup:!0,allowMagicLink:!1,captcha:{enabled:!1}},V||i(N)}finally{V||c(!1)}(Q=N.captcha)!=null&&Q.enabled&&N.captcha.provider==="recaptcha"&&N.captcha.version==="v3"&&N.captcha.siteKey&&La(N.captcha.siteKey);const B=k();if(!(B!=null&&B.accessToken)){V||h(ye=>({...ye,isLoading:!1}));return}try{const ye=await x(`${f.current}/auth/me`,{headers:{Authorization:`Bearer ${B.accessToken}`}});V||h({user:ye,tokens:B,isLoading:!1,isAuthenticated:!0})}catch{S(null),V||h({user:null,tokens:null,isLoading:!1,isAuthenticated:!1})}}return z(),()=>{V=!0}},[]);const C=I.useCallback(async V=>{h(z=>({...z,isLoading:!0}));try{const z=await x(`${f.current}/auth/login`,{method:"POST",body:JSON.stringify(V)});S(z.tokens),h({user:z.user,tokens:z.tokens,isLoading:!1,isAuthenticated:!0})}catch(z){throw h(N=>({...N,isLoading:!1})),z}},[x,S]),U=I.useCallback(async V=>{h(z=>({...z,isLoading:!0}));try{const z=await x(`${f.current}/auth/signup`,{method:"POST",body:JSON.stringify(V)});S(z.tokens),h({user:z.user,tokens:z.tokens,isLoading:!1,isAuthenticated:!0})}catch(z){throw h(N=>({...N,isLoading:!1})),z}},[x,S]),L=I.useCallback(async()=>{h(V=>({...V,isLoading:!0}));try{const V=k();V!=null&&V.accessToken&&await x(`${f.current}/auth/logout`,{method:"POST",headers:{Authorization:`Bearer ${V.accessToken}`}}).catch(()=>{})}finally{S(null),h({user:null,tokens:null,isLoading:!1,isAuthenticated:!1})}},[x,k,S]),b=I.useCallback(async V=>{await x(`${f.current}/auth/forgot-password`,{method:"POST",body:JSON.stringify(V)})},[x]),Z=I.useCallback(async V=>{await x(`${f.current}/auth/magic-link`,{method:"POST",body:JSON.stringify(V)})},[x]),W=I.useCallback(V=>{h(z=>z.user?{...z,user:{...z.user,...V}}:z)},[]),se=I.useMemo(()=>({...l,login:C,signup:U,logout:L,forgotPassword:b,sendMagicLink:Z,updateUser:W}),[l,C,U,L,b,Z,W]),ue=I.useMemo(()=>({config:a,configLoading:o,apiUrl:e}),[a,o,e]);return u.jsx(xs.Provider,{value:ue,children:u.jsx(vs.Provider,{value:se,children:t})})}function Ot(){const t=I.useContext(vs);if(!t)throw new Error("useAuth must be used inside <AuthProvider>");return t}function ur(){const t=I.useContext(xs);if(!t)throw new Error("useAuthConfig must be used inside <AuthProvider>");return t}var Dt=t=>t.type==="checkbox",pt=t=>t instanceof Date,Le=t=>t==null;const bs=t=>typeof t=="object";var _e=t=>!Le(t)&&!Array.isArray(t)&&bs(t)&&!pt(t),Va=t=>_e(t)&&t.target?Dt(t.target)?t.target.checked:t.target.value:t,_s=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,$a=(t,e)=>t.has(_s(e)),Fa=t=>{const e=t.constructor&&t.constructor.prototype;return _e(e)&&e.hasOwnProperty("isPrototypeOf")},Yr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ce(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(Yr&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(_e(t)&&Fa(t)))return t;const n=r?[]:Object.create(Object.getPrototypeOf(t));for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=Ce(t[s]));return n}var dr=t=>/^\w*$/.test(t),be=t=>t===void 0,Kr=t=>Array.isArray(t)?t.filter(Boolean):[],Jr=t=>Kr(t.replace(/["|']|\]/g,"").split(/\.|\[/)),M=(t,e,r)=>{if(!e||!_e(t))return r;const n=(dr(e)?[e]:Jr(e)).reduce((s,a)=>Le(s)?s:s[a],t);return be(n)||n===t?be(t[e])?r:t[e]:n},Ke=t=>typeof t=="boolean",Ge=t=>typeof t=="function",ge=(t,e,r)=>{let n=-1;const s=dr(e)?[e]:Jr(e),a=s.length,i=a-1;for(;++n<a;){const o=s[n];let c=r;if(n!==i){const l=t[o];c=_e(l)||Array.isArray(l)?l:isNaN(+s[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;t[o]=c,t=t[o]}};const gt={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},He={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gr="form",ws="root",Da=I.createContext(null);Da.displayName="HookFormControlContext";var Ua=(t,e,r,n=!0)=>{const s={defaultValues:e._defaultValues};for(const a in t)Object.defineProperty(s,a,{get:()=>{const i=a;return e._proxyFormState[i]!==He.all&&(e._proxyFormState[i]=!n||He.all),t[i]}});return s};const za=typeof window<"u"?I.useLayoutEffect:I.useEffect;var Ae=t=>typeof t=="string",Ba=(t,e,r,n,s)=>Ae(t)?(n&&e.watch.add(t),M(r,t,s)):Array.isArray(t)?t.map(a=>(n&&e.watch.add(a),M(r,a))):(n&&(e.watchAll=!0),r),Ar=t=>Le(t)||!bs(t);function st(t,e,r=new WeakSet){if(Ar(t)||Ar(e))return Object.is(t,e);if(pt(t)&&pt(e))return Object.is(t.getTime(),e.getTime());const n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const a of n){const i=t[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(pt(i)&&pt(o)||_e(i)&&_e(o)||Array.isArray(i)&&Array.isArray(o)?!st(i,o,r):!Object.is(i,o))return!1}}return!0}const Za=I.createContext(null);Za.displayName="HookFormContext";var ks=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{},It=t=>Array.isArray(t)?t:[t],vn=()=>{let t=[];return{get observers(){return t},next:s=>{for(const a of t)a.next&&a.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(a=>a!==s)}}),unsubscribe:()=>{t=[]}}};function Ss(t,e){const r={};for(const n in t)if(t.hasOwnProperty(n)){const s=t[n],a=e[n];if(s&&_e(s)&&a){const i=Ss(s,a);_e(i)&&(r[n]=i)}else t[n]&&(r[n]=a)}return r}var Ne=t=>_e(t)&&!Object.keys(t).length,Xr=t=>t.type==="file",Xt=t=>{if(!Yr)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Cs=t=>t.type==="select-multiple",Qr=t=>t.type==="radio",Wa=t=>Qr(t)||Dt(t),vr=t=>Xt(t)&&t.isConnected;function qa(t,e){const r=e.slice(0,-1).length;let n=0;for(;n<r;)t=be(t)?n++:t[e[n++]];return t}function Ga(t){for(const e in t)if(t.hasOwnProperty(e)&&!be(t[e]))return!1;return!0}function ke(t,e){const r=Array.isArray(e)?e:dr(e)?[e]:Jr(e),n=r.length===1?t:qa(t,r),s=r.length-1,a=r[s];return n&&delete n[a],s!==0&&(_e(n)&&Ne(n)||Array.isArray(n)&&Ga(n))&&ke(t,r.slice(0,-1)),t}var Ha=t=>{for(const e in t)if(Ge(t[e]))return!0;return!1};function Es(t){return Array.isArray(t)||_e(t)&&!Ha(t)}function Tr(t,e={}){for(const r in t){const n=t[r];Es(n)?(e[r]=Array.isArray(n)?[]:{},Tr(n,e[r])):be(n)||(e[r]=!0)}return e}function xt(t,e,r){r||(r=Tr(e));for(const n in t){const s=t[n];if(Es(s))be(e)||Ar(r[n])?r[n]=Tr(s,Array.isArray(s)?[]:{}):xt(s,Le(e)?{}:e[n],r[n]);else{const a=e[n];r[n]=!st(s,a)}}return r}const xn={value:!1,isValid:!1},bn={value:!0,isValid:!0};var Rs=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!be(t[0].attributes.value)?be(t[0].value)||t[0].value===""?bn:{value:t[0].value,isValid:!0}:bn:xn}return xn},Os=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:n})=>be(t)?t:e?t===""?NaN:t&&+t:r&&Ae(t)?new Date(t):n?n(t):t;const _n={isValid:!1,value:null};var js=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,_n):_n;function wn(t){const e=t.ref;return Xr(e)?e.files:Qr(e)?js(t.refs).value:Cs(e)?[...e.selectedOptions].map(({value:r})=>r):Dt(e)?Rs(t.refs).value:Os(be(e.value)?t.ref.value:e.value,t)}var Ya=(t,e,r,n)=>{const s={};for(const a of t){const i=M(e,a);i&&ge(s,a,i._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},Qt=t=>t instanceof RegExp,Nt=t=>be(t)?t:Qt(t)?t.source:_e(t)?Qt(t.value)?t.value.source:t.value:t,kn=t=>({isOnSubmit:!t||t===He.onSubmit,isOnBlur:t===He.onBlur,isOnChange:t===He.onChange,isOnAll:t===He.all,isOnTouch:t===He.onTouched});const Sn="AsyncFunction";var Ka=t=>!!t&&!!t.validate&&!!(Ge(t.validate)&&t.validate.constructor.name===Sn||_e(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Sn)),Ja=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Cn=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const Lt=(t,e,r,n)=>{for(const s of r||Object.keys(t)){const a=M(t,s);if(a){const{_f:i,...o}=a;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],s)&&!n)return!0;if(i.ref&&e(i.ref,i.name)&&!n)return!0;if(Lt(o,e))break}else if(_e(o)&&Lt(o,e))break}}};function En(t,e,r){const n=M(t,r);if(n||dr(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const a=s.join("."),i=M(e,a),o=M(t,a);if(i&&!Array.isArray(i)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};s.pop()}return{name:r}}var Xa=(t,e,r,n)=>{r(t);const{name:s,...a}=t;return Ne(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!n||He.all))},Qa=(t,e,r)=>!t||!e||t===e||It(t).some(n=>n&&(r?n===e:n.startsWith(e)||e.startsWith(n))),ei=(t,e,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(e||t):(r?n.isOnBlur:s.isOnBlur)?!t:(r?n.isOnChange:s.isOnChange)?t:!0,ti=(t,e)=>!Kr(M(t,e)).length&&ke(t,e),ri=(t,e,r)=>{const n=It(M(t,r));return ge(n,ws,e[r]),ge(t,r,n),t};function Rn(t,e,r="validate"){if(Ae(t)||Array.isArray(t)&&t.every(Ae)||Ke(t)&&!t)return{type:r,message:Ae(t)?t:"",ref:e}}var vt=t=>_e(t)&&!Qt(t)?t:{value:t,message:""},On=async(t,e,r,n,s,a)=>{const{ref:i,refs:o,required:c,maxLength:l,minLength:h,min:f,max:p,pattern:m,validate:x,name:v,valueAsNumber:S,mount:k}=t._f,C=M(r,v);if(!k||e.has(v))return{};const U=o?o[0]:i,L=N=>{s&&U.reportValidity&&(U.setCustomValidity(Ke(N)?"":N||""),U.reportValidity())},b={},Z=Qr(i),W=Dt(i),se=Z||W,ue=(S||Xr(i))&&be(i.value)&&be(C)||Xt(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,V=ks.bind(null,v,n,b),z=(N,B,Q,ye=We.maxLength,de=We.minLength)=>{const xe=N?B:Q;b[v]={type:N?ye:de,message:xe,ref:i,...V(N?ye:de,xe)}};if(a?!Array.isArray(C)||!C.length:c&&(!se&&(ue||Le(C))||Ke(C)&&!C||W&&!Rs(o).isValid||Z&&!js(o).isValid)){const{value:N,message:B}=Ae(c)?{value:!!c,message:c}:vt(c);if(N&&(b[v]={type:We.required,message:B,ref:U,...V(We.required,B)},!n))return L(B),b}if(!ue&&(!Le(f)||!Le(p))){let N,B;const Q=vt(p),ye=vt(f);if(!Le(C)&&!isNaN(C)){const de=i.valueAsNumber||C&&+C;Le(Q.value)||(N=de>Q.value),Le(ye.value)||(B=de<ye.value)}else{const de=i.valueAsDate||new Date(C),xe=_=>new Date(new Date().toDateString()+" "+_),we=i.type=="time",Ee=i.type=="week";Ae(Q.value)&&C&&(N=we?xe(C)>xe(Q.value):Ee?C>Q.value:de>new Date(Q.value)),Ae(ye.value)&&C&&(B=we?xe(C)<xe(ye.value):Ee?C<ye.value:de<new Date(ye.value))}if((N||B)&&(z(!!N,Q.message,ye.message,We.max,We.min),!n))return L(b[v].message),b}if((l||h)&&!ue&&(Ae(C)||a&&Array.isArray(C))){const N=vt(l),B=vt(h),Q=!Le(N.value)&&C.length>+N.value,ye=!Le(B.value)&&C.length<+B.value;if((Q||ye)&&(z(Q,N.message,B.message),!n))return L(b[v].message),b}if(m&&!ue&&Ae(C)){const{value:N,message:B}=vt(m);if(Qt(N)&&!C.match(N)&&(b[v]={type:We.pattern,message:B,ref:i,...V(We.pattern,B)},!n))return L(B),b}if(x){if(Ge(x)){const N=await x(C,r),B=Rn(N,U);if(B&&(b[v]={...B,...V(We.validate,B.message)},!n))return L(B.message),b}else if(_e(x)){let N={};for(const B in x){if(!Ne(N)&&!n)break;const Q=Rn(await x[B](C,r),U,B);Q&&(N={...Q,...V(B,Q.message)},L(Q.message),n&&(b[v]=N))}if(!Ne(N)&&(b[v]={ref:U,...N},!n))return b}}return L(!0),b};const ni={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function si(t={}){let e={...ni,...t},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ge(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},n={},s=_e(e.defaultValues)||_e(e.values)?Ce(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:Ce(s),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...h};let p={...f};const m={array:vn(),state:vn()},x=e.criteriaMode===He.all,v=d=>y=>{clearTimeout(l),l=setTimeout(d,y)},S=async d=>{if(!i.keepIsValid&&!e.disabled&&(f.isValid||p.isValid||d)){let y;e.resolver?(y=Ne((await se()).errors),k()):y=await z({fields:n,onlyCheckValid:!0,eventType:gt.VALID}),y!==r.isValid&&m.state.next({isValid:y})}},k=(d,y)=>{!e.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((d||Array.from(o.mount)).forEach(g=>{g&&(y?ge(r.validatingFields,g,y):ke(r.validatingFields,g))}),m.state.next({validatingFields:r.validatingFields,isValidating:!Ne(r.validatingFields)}))},C=(d,y=[],g,A,O=!0,j=!0)=>{if(A&&g&&!e.disabled){if(i.action=!0,j&&Array.isArray(M(n,d))){const D=g(M(n,d),A.argA,A.argB);O&&ge(n,d,D)}if(j&&Array.isArray(M(r.errors,d))){const D=g(M(r.errors,d),A.argA,A.argB);O&&ge(r.errors,d,D),ti(r.errors,d)}if((f.touchedFields||p.touchedFields)&&j&&Array.isArray(M(r.touchedFields,d))){const D=g(M(r.touchedFields,d),A.argA,A.argB);O&&ge(r.touchedFields,d,D)}if(f.dirtyFields||p.dirtyFields){const D=xt(s,a),J=_s(d);ge(r.dirtyFields,J,M(D,J))}m.state.next({name:d,isDirty:B(d,y),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ge(a,d,y)},U=(d,y)=>{ge(r.errors,d,y),m.state.next({errors:r.errors})},L=d=>{r.errors=d,m.state.next({errors:r.errors,isValid:!1})},b=(d,y,g,A)=>{const O=M(n,d);if(O){const j=M(a,d,be(g)?M(s,d):g);be(j)||A&&A.defaultChecked||y?ge(a,d,y?j:wn(O._f)):de(d,j),i.mount&&!i.action&&S()}},Z=(d,y,g,A,O)=>{let j=!1,D=!1;const J={name:d};if(!e.disabled){if(!g||A){(f.isDirty||p.isDirty)&&(D=r.isDirty,r.isDirty=J.isDirty=B(),j=D!==J.isDirty);const pe=st(M(s,d),y);D=!!M(r.dirtyFields,d),pe?ke(r.dirtyFields,d):ge(r.dirtyFields,d,!0),J.dirtyFields=r.dirtyFields,j=j||(f.dirtyFields||p.dirtyFields)&&D!==!pe}if(g){const pe=M(r.touchedFields,d);pe||(ge(r.touchedFields,d,g),J.touchedFields=r.touchedFields,j=j||(f.touchedFields||p.touchedFields)&&pe!==g)}j&&O&&m.state.next(J)}return j?J:{}},W=(d,y,g,A)=>{const O=M(r.errors,d),j=(f.isValid||p.isValid)&&Ke(y)&&r.isValid!==y;if(e.delayError&&g?(c=v(()=>U(d,g)),c(e.delayError)):(clearTimeout(l),c=null,g?ge(r.errors,d,g):ke(r.errors,d)),(g?!st(O,g):O)||!Ne(A)||j){const D={...A,...j&&Ke(y)?{isValid:y}:{},errors:r.errors,name:d};r={...r,...D},m.state.next(D)}},se=async d=>(k(d,!0),await e.resolver(a,e.context,Ya(d||o.mount,n,e.criteriaMode,e.shouldUseNativeValidation))),ue=async d=>{const{errors:y}=await se(d);if(k(d),d)for(const g of d){const A=M(y,g);A?ge(r.errors,g,A):ke(r.errors,g)}else r.errors=y;return y},V=async({name:d,eventType:y})=>{if(t.validate){const g=await t.validate({formValues:a,formState:r,name:d,eventType:y});if(_e(g))for(const A in g)g[A]&&ne(`${gr}.${A}`,{message:Ae(g.message)?g.message:"",type:We.validate});else Ae(g)||!g?ne(gr,{message:g||"",type:We.validate}):K(gr);return g}return!0},z=async({fields:d,onlyCheckValid:y,name:g,eventType:A,context:O={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(O.runRootValidation=!0,!await V({name:g,eventType:A})&&(O.valid=!1,y)))return O.valid;for(const j in d){const D=d[j];if(D){const{_f:J,...pe}=D;if(J){const Me=o.array.has(J.name),Ye=D._f&&Ka(D._f);Ye&&f.validatingFields&&k([J.name],!0);const Te=await On(D,o.disabled,a,x,e.shouldUseNativeValidation&&!y,Me);if(Ye&&f.validatingFields&&k([J.name]),Te[J.name]&&(O.valid=!1,y)||(!y&&(M(Te,J.name)?Me?ri(r.errors,Te,J.name):ge(r.errors,J.name,Te[J.name]):ke(r.errors,J.name)),t.shouldUseNativeValidation&&Te[J.name]))break}!Ne(pe)&&await z({context:O,onlyCheckValid:y,fields:pe,name:j,eventType:A})}}return O.valid},N=()=>{for(const d of o.unMount){const y=M(n,d);y&&(y._f.refs?y._f.refs.every(g=>!vr(g)):!vr(y._f.ref))&&oe(d)}o.unMount=new Set},B=(d,y)=>!e.disabled&&(d&&y&&ge(a,d,y),!st(G(),s)),Q=(d,y,g)=>Ba(d,o,{...i.mount?a:be(y)?s:Ae(d)?{[d]:y}:y},g,y),ye=d=>Kr(M(i.mount?a:s,d,e.shouldUnregister?M(s,d,[]):[])),de=(d,y,g={})=>{const A=M(n,d);let O=y;if(A){const j=A._f;j&&(!j.disabled&&ge(a,d,Os(y,j)),O=Xt(j.ref)&&Le(y)?"":y,Cs(j.ref)?[...j.ref.options].forEach(D=>D.selected=O.includes(D.value)):j.refs?Dt(j.ref)?j.refs.forEach(D=>{(!D.defaultChecked||!D.disabled)&&(Array.isArray(O)?D.checked=!!O.find(J=>J===D.value):D.checked=O===D.value||!!O)}):j.refs.forEach(D=>D.checked=D.value===O):Xr(j.ref)?j.ref.value="":(j.ref.value=O,j.ref.type||m.state.next({name:d,values:Ce(a)})))}(g.shouldDirty||g.shouldTouch)&&Z(d,O,g.shouldTouch,g.shouldDirty,!0),g.shouldValidate&&R(d)},xe=(d,y,g)=>{for(const A in y){if(!y.hasOwnProperty(A))return;const O=y[A],j=d+"."+A,D=M(n,j);(o.array.has(d)||_e(O)||D&&!D._f)&&!pt(O)?xe(j,O,g):de(j,O,g)}},we=(d,y,g={})=>{const A=M(n,d),O=o.array.has(d),j=Ce(y);ge(a,d,j),O?(m.array.next({name:d,values:Ce(a)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&g.shouldDirty&&m.state.next({name:d,dirtyFields:xt(s,a),isDirty:B(d,j)})):A&&!A._f&&!Le(j)?xe(d,j,g):de(d,j,g),Cn(d,o)?m.state.next({...r,name:d,values:Ce(a)}):m.state.next({name:i.mount?d:void 0,values:Ce(a)})},Ee=async d=>{i.mount=!0;const y=d.target;let g=y.name,A=!0;const O=M(n,g),j=pe=>{A=Number.isNaN(pe)||pt(pe)&&isNaN(pe.getTime())||st(pe,M(a,g,pe))},D=kn(e.mode),J=kn(e.reValidateMode);if(O){let pe,Me;const Ye=y.type?wn(O._f):Va(d),Te=d.type===gt.BLUR||d.type===gt.FOCUS_OUT,Aa=!Ja(O._f)&&!t.validate&&!e.resolver&&!M(r.errors,g)&&!O._f.deps||ei(Te,M(r.touchedFields,g),r.isSubmitted,J,D),mr=Cn(g,o,Te);ge(a,g,Ye),Te?(!y||!y.readOnly)&&(O._f.onBlur&&O._f.onBlur(d),c&&c(0)):O._f.onChange&&O._f.onChange(d);const yr=Z(g,Ye,Te),Ta=!Ne(yr)||mr;if(!Te&&m.state.next({name:g,type:d.type,values:Ce(a)}),Aa)return(f.isValid||p.isValid)&&(e.mode==="onBlur"?Te&&S():Te||S()),Ta&&m.state.next({name:g,...mr?{}:yr});if(!e.resolver&&t.validate&&await V({name:g,eventType:d.type}),!Te&&mr&&m.state.next({...r}),e.resolver){const{errors:pn}=await se([g]);if(k([g]),j(Ye),A){const Pa=En(r.errors,n,g),mn=En(pn,n,Pa.name||g);pe=mn.error,g=mn.name,Me=Ne(pn)}}else k([g],!0),pe=(await On(O,o.disabled,a,x,e.shouldUseNativeValidation))[g],k([g]),j(Ye),A&&(pe?Me=!1:(f.isValid||p.isValid)&&(Me=await z({fields:n,onlyCheckValid:!0,name:g,eventType:d.type})));A&&(O._f.deps&&(!Array.isArray(O._f.deps)||O._f.deps.length>0)&&R(O._f.deps),W(g,Me,pe,yr))}},_=(d,y)=>{if(M(r.errors,y)&&d.focus)return d.focus(),1},R=async(d,y={})=>{let g,A;const O=It(d);if(e.resolver){const j=await ue(be(d)?d:O);g=Ne(j),A=d?!O.some(D=>M(j,D)):g}else d?(A=(await Promise.all(O.map(async j=>{const D=M(n,j);return await z({fields:D&&D._f?{[j]:D}:D,eventType:gt.TRIGGER})}))).every(Boolean),!(!A&&!r.isValid)&&S()):A=g=await z({fields:n,name:d,eventType:gt.TRIGGER});return m.state.next({...!Ae(d)||(f.isValid||p.isValid)&&g!==r.isValid?{}:{name:d},...e.resolver||!d?{isValid:g}:{},errors:r.errors}),y.shouldFocus&&!A&&Lt(n,_,d?O:o.mount),A},G=(d,y)=>{let g={...i.mount?a:s};return y&&(g=Ss(y.dirtyFields?r.dirtyFields:r.touchedFields,g)),be(d)?g:Ae(d)?M(g,d):d.map(A=>M(g,A))},q=(d,y)=>({invalid:!!M((y||r).errors,d),isDirty:!!M((y||r).dirtyFields,d),error:M((y||r).errors,d),isValidating:!!M(r.validatingFields,d),isTouched:!!M((y||r).touchedFields,d)}),K=d=>{const y=d?It(d):void 0;y==null||y.forEach(g=>ke(r.errors,g)),y?y.forEach(g=>{m.state.next({name:g,errors:r.errors})}):m.state.next({errors:{}})},ne=(d,y,g)=>{const A=(M(n,d,{_f:{}})._f||{}).ref,O=M(r.errors,d)||{},{ref:j,message:D,type:J,...pe}=O;ge(r.errors,d,{...pe,...y,ref:A}),m.state.next({name:d,errors:r.errors,isValid:!1}),g&&g.shouldFocus&&A&&A.focus&&A.focus()},ee=(d,y)=>Ge(d)?m.state.subscribe({next:g=>"values"in g&&d(Q(void 0,y),g)}):Q(d,y,!0),te=d=>m.state.subscribe({next:y=>{Qa(d.name,y.name,d.exact)&&Xa(y,d.formState||f,Na,d.reRenderRoot)&&d.callback({values:{...a},...r,...y,defaultValues:s})}}).unsubscribe,ie=d=>(i.mount=!0,p={...p,...d.formState},te({...d,formState:{...h,...d.formState}})),oe=(d,y={})=>{for(const g of d?It(d):o.mount)o.mount.delete(g),o.array.delete(g),y.keepValue||(ke(n,g),ke(a,g)),!y.keepError&&ke(r.errors,g),!y.keepDirty&&ke(r.dirtyFields,g),!y.keepTouched&&ke(r.touchedFields,g),!y.keepIsValidating&&ke(r.validatingFields,g),!e.shouldUnregister&&!y.keepDefaultValue&&ke(s,g);m.state.next({values:Ce(a)}),m.state.next({...r,...y.keepDirty?{isDirty:B()}:{}}),!y.keepIsValid&&S()},ae=({disabled:d,name:y})=>{if(Ke(d)&&i.mount||d||o.disabled.has(y)){const O=o.disabled.has(y)!==!!d;d?o.disabled.add(y):o.disabled.delete(y),O&&i.mount&&!i.action&&S()}},Re=(d,y={})=>{let g=M(n,d);const A=Ke(y.disabled)||Ke(e.disabled);return ge(n,d,{...g||{},_f:{...g&&g._f?g._f:{ref:{name:d}},name:d,mount:!0,...y}}),o.mount.add(d),g?ae({disabled:Ke(y.disabled)?y.disabled:e.disabled,name:d}):b(d,!0,y.value),{...A?{disabled:y.disabled||e.disabled}:{},...e.progressive?{required:!!y.required,min:Nt(y.min),max:Nt(y.max),minLength:Nt(y.minLength),maxLength:Nt(y.maxLength),pattern:Nt(y.pattern)}:{},name:d,onChange:Ee,onBlur:Ee,ref:O=>{if(O){Re(d,y),g=M(n,d);const j=be(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,D=Wa(j),J=g._f.refs||[];if(D?J.find(pe=>pe===j):j===g._f.ref)return;ge(n,d,{_f:{...g._f,...D?{refs:[...J.filter(vr),j,...Array.isArray(M(s,d))?[{}]:[]],ref:{type:j.type,name:d}}:{ref:j}}}),b(d,!1,void 0,j)}else g=M(n,d,{}),g._f&&(g._f.mount=!1),(e.shouldUnregister||y.shouldUnregister)&&!($a(o.array,d)&&i.action)&&o.unMount.add(d)}}},T=()=>e.shouldFocusError&&Lt(n,_,o.mount),Fe=d=>{Ke(d)&&(m.state.next({disabled:d}),Lt(n,(y,g)=>{const A=M(n,g);A&&(y.disabled=A._f.disabled||d,Array.isArray(A._f.refs)&&A._f.refs.forEach(O=>{O.disabled=A._f.disabled||d}))},0,!1))},ht=(d,y)=>async g=>{let A;g&&(g.preventDefault&&g.preventDefault(),g.persist&&g.persist());let O=Ce(a);if(m.state.next({isSubmitting:!0}),e.resolver){const{errors:j,values:D}=await se();k(),r.errors=j,O=Ce(D)}else await z({fields:n,eventType:gt.SUBMIT});if(o.disabled.size)for(const j of o.disabled)ke(O,j);if(ke(r.errors,ws),Ne(r.errors)){m.state.next({errors:{}});try{await d(O,g)}catch(j){A=j}}else y&&await y({...r.errors},g),T(),setTimeout(T);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ne(r.errors)&&!A,submitCount:r.submitCount+1,errors:r.errors}),A)throw A},zt=(d,y={})=>{M(n,d)&&(be(y.defaultValue)?we(d,Ce(M(s,d))):(we(d,y.defaultValue),ge(s,d,Ce(y.defaultValue))),y.keepTouched||ke(r.touchedFields,d),y.keepDirty||(ke(r.dirtyFields,d),r.isDirty=y.defaultValue?B(d,Ce(M(s,d))):B()),y.keepError||(ke(r.errors,d),f.isValid&&S()),m.state.next({...r}))},dn=(d,y={})=>{const g=d?Ce(d):s,A=Ce(g),O=Ne(d),j=O?s:A;if(y.keepDefaultValues||(s=g),!y.keepValues){if(y.keepDirtyValues){const D=new Set([...o.mount,...Object.keys(xt(s,a))]);for(const J of Array.from(D)){const pe=M(r.dirtyFields,J),Me=M(a,J),Ye=M(j,J);pe&&!be(Me)?ge(j,J,Me):!pe&&!be(Ye)&&we(J,Ye)}}else{if(Yr&&be(d))for(const D of o.mount){const J=M(n,D);if(J&&J._f){const pe=Array.isArray(J._f.refs)?J._f.refs[0]:J._f.ref;if(Xt(pe)){const Me=pe.closest("form");if(Me){Me.reset();break}}}}if(y.keepFieldsRef)for(const D of o.mount)we(D,M(j,D));else n={}}a=e.shouldUnregister?y.keepDefaultValues?Ce(s):{}:Ce(j),m.array.next({values:{...j}}),m.state.next({values:{...j}})}o={mount:y.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!y.keepIsValid||!!y.keepDirtyValues||!e.shouldUnregister&&!Ne(j),i.watch=!!e.shouldUnregister,i.keepIsValid=!!y.keepIsValid,i.action=!1,y.keepErrors||(r.errors={}),m.state.next({submitCount:y.keepSubmitCount?r.submitCount:0,isDirty:O?!1:y.keepDirty?r.isDirty:!!(y.keepDefaultValues&&!st(d,s)),isSubmitted:y.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:O?{}:y.keepDirtyValues?y.keepDefaultValues&&a?xt(s,a):r.dirtyFields:y.keepDefaultValues&&d?xt(s,d):y.keepDirty?r.dirtyFields:{},touchedFields:y.keepTouched?r.touchedFields:{},errors:y.keepErrors?r.errors:{},isSubmitSuccessful:y.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},fn=(d,y)=>dn(Ge(d)?d(a):d,{...e.resetOptions,...y}),ja=(d,y={})=>{const g=M(n,d),A=g&&g._f;if(A){const O=A.refs?A.refs[0]:A.ref;O.focus&&setTimeout(()=>{O.focus(),y.shouldSelect&&Ge(O.select)&&O.select()})}},Na=d=>{r={...r,...d}},hn={control:{register:Re,unregister:oe,getFieldState:q,handleSubmit:ht,setError:ne,_subscribe:te,_runSchema:se,_updateIsValidating:k,_focusError:T,_getWatch:Q,_getDirty:B,_setValid:S,_setFieldArray:C,_setDisabledField:ae,_setErrors:L,_getFieldArray:ye,_reset:dn,_resetDefaultValues:()=>Ge(e.defaultValues)&&e.defaultValues().then(d=>{fn(d,e.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:Fe,_subjects:m,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return i},set _state(d){i=d},get _defaultValues(){return s},get _names(){return o},set _names(d){o=d},get _formState(){return r},get _options(){return e},set _options(d){e={...e,...d}}},subscribe:ie,trigger:R,register:Re,handleSubmit:ht,watch:ee,setValue:we,getValues:G,reset:fn,resetField:zt,clearErrors:K,unregister:oe,setError:ne,setFocus:ja,getFieldState:q};return{...hn,formControl:hn}}function er(t={}){const e=I.useRef(void 0),r=I.useRef(void 0),[n,s]=I.useState({isDirty:!1,isValidating:!1,isLoading:Ge(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:Ge(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:n},t.defaultValues&&!Ge(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:i,...o}=si(t);e.current={...o,formState:n}}const a=e.current.control;return a._options=t,za(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>s({...a._formState}),reRenderRoot:!0});return s(o=>({...o,isReady:!0})),a._formState.isReady=!0,i},[a]),I.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),I.useEffect(()=>{t.mode&&(a._options.mode=t.mode),t.reValidateMode&&(a._options.reValidateMode=t.reValidateMode)},[a,t.mode,t.reValidateMode]),I.useEffect(()=>{t.errors&&(a._setErrors(t.errors),a._focusError())},[a,t.errors]),I.useEffect(()=>{t.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,t.shouldUnregister]),I.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==n.isDirty&&a._subjects.state.next({isDirty:i})}},[a,n.isDirty]),I.useEffect(()=>{var i;t.values&&!st(t.values,r.current)?(a._reset(t.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((i=a._options.resetOptions)===null||i===void 0)&&i.keepIsValid||a._setValid(),r.current=t.values,s(o=>({...o}))):a._resetDefaultValues()},[a,t.values]),I.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=I.useMemo(()=>Ua(n,a),[a,n]),e.current}const jn=(t,e,r)=>{if(t&&"reportValidity"in t){const n=M(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Ns=(t,e)=>{for(const r in e.fields){const n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?jn(n.ref,r,t):n.refs&&n.refs.forEach(s=>jn(s,r,t))}},ai=(t,e)=>{e.shouldUseNativeValidation&&Ns(t,e);const r={};for(const n in t){const s=M(e.fields,n),a=Object.assign(t[n]||{},{ref:s&&s.ref});if(ii(e.names||Object.keys(t),n)){const i=Object.assign({},M(r,n));ge(i,"root",a),ge(r,n,i)}else ge(r,n,a)}return r},ii=(t,e)=>t.some(r=>r.startsWith(e+"."));var oi=function(t,e){for(var r={};t.length;){var n=t[0],s=n.code,a=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var o=n.unionErrors[0].errors[0];r[i]={message:o.message,type:o.code}}else r[i]={message:a,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(h){return h.errors.forEach(function(f){return t.push(f)})}),e){var c=r[i].types,l=c&&c[n.code];r[i]=ks(i,e,r,s,l?[].concat(l,n.message):n.message)}t.shift()}return r},tr=function(t,e,r){return r===void 0&&(r={}),function(n,s,a){try{return Promise.resolve((function(i,o){try{var c=Promise.resolve(t[r.mode==="sync"?"parse":"parseAsync"](n,e)).then(function(l){return a.shouldUseNativeValidation&&Ns({},a),{errors:{},values:r.raw?n:l}})}catch(l){return o(l)}return c&&c.then?c.then(void 0,o):c})(0,function(i){if((function(o){return Array.isArray(o==null?void 0:o.errors)})(i))return{values:{},errors:ai(oi(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}}},le;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},t.getValidEnumValues=s=>{const a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(const i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(le||(le={}));var Nn;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Nn||(Nn={}));const $=le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nt=t=>{switch(typeof t){case"undefined":return $.undefined;case"string":return $.string;case"number":return Number.isNaN(t)?$.nan:$.number;case"boolean":return $.boolean;case"function":return $.function;case"bigint":return $.bigint;case"symbol":return $.symbol;case"object":return Array.isArray(t)?$.array:t===null?$.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?$.promise:typeof Map<"u"&&t instanceof Map?$.map:typeof Set<"u"&&t instanceof Set?$.set:typeof Date<"u"&&t instanceof Date?$.date:$.object;default:return $.unknown}},E=le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class et extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(r(i))):o[l]=o[l]||{_errors:[]},o=o[l],c++}}};return s(this),n}static assert(e){if(!(e instanceof et))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];r[a]=r[a]||[],r[a].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}et.create=t=>new et(t);const Pr=(t,e)=>{let r;switch(t.code){case E.invalid_type:t.received===$.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,le.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${le.joinValues(t.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${le.joinValues(t.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${le.joinValues(t.options)}, received '${t.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:le.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case E.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case E.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=e.defaultError,le.assertNever(t)}return{message:r}};let ci=Pr;function li(){return ci}const ui=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)o=l(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}};function P(t,e){const r=li(),n=ui({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Pr?void 0:Pr].filter(s=>!!s)});t.common.issues.push(n)}class $e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return H;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return $e.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return H;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const H=Object.freeze({status:"aborted"}),Pt=t=>({status:"dirty",value:t}),Be=t=>({status:"valid",value:t}),An=t=>t.status==="aborted",Tn=t=>t.status==="dirty",wt=t=>t.status==="valid",rr=t=>typeof Promise<"u"&&t instanceof Promise;var F;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(F||(F={}));class lt{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Pn=(t,e)=>{if(wt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new et(t.common.issues);return this._error=r,this._error}}};function re(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{const{message:c}=t;return i.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??n??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:c??r??o.defaultError}},description:s}}class ce{get description(){return this._def.description}_getType(e){return nt(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:nt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $e,ctx:{common:e.parent.common,data:e.data,parsedType:nt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(rr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:nt(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Pn(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:nt(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:r});return wt(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(s=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(a=>wt(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:nt(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(rr(s)?s:Promise.resolve(s));return Pn(n,a)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:E.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new St({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ot.create(this,this._def)}nullable(){return Ct.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xe.create(this)}promise(){return ir.create(this,this._def)}or(e){return sr.create([this,e],this._def)}and(e){return ar.create(this,e,this._def)}transform(e){return new St({...re(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Mr({...re(this._def),innerType:this,defaultValue:r,typeName:Y.ZodDefault})}brand(){return new Pi({typeName:Y.ZodBranded,type:this,...re(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Vr({...re(this._def),innerType:this,catchValue:r,typeName:Y.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return en.create(this,e)}readonly(){return $r.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const di=/^c[^\s-]{8,}$/i,fi=/^[0-9a-z]+$/,hi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pi=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mi=/^[a-z0-9_-]{21}$/i,yi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gi=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xr;const bi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_i=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,wi=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ki=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Si=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ci=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,As="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ei=new RegExp(`^${As}$`);function Ts(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Ri(t){return new RegExp(`^${Ts(t)}$`)}function Oi(t){let e=`${As}T${Ts(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function ji(t,e){return!!((e==="v4"||!e)&&bi.test(t)||(e==="v6"||!e)&&wi.test(t))}function Ni(t,e){if(!yi.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Ai(t,e){return!!((e==="v4"||!e)&&_i.test(t)||(e==="v6"||!e)&&ki.test(t))}class it extends ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==$.string){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_type,expected:$.string,received:a.parsedType}),H}const n=new $e;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?P(s,{code:E.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&P(s,{code:E.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")vi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"email",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")xr||(xr=new RegExp(xi,"u")),xr.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"emoji",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")pi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"uuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")mi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"nanoid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")di.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"cuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")fi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"cuid2",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")hi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"ulid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),P(s,{validation:"url",code:E.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"regex",code:E.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Oi(a).test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Ei.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Ri(a).test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{code:E.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?gi.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"duration",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?ji(e.data,a.version)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"ip",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?Ni(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"jwt",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Ai(e.data,a.version)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"cidr",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Si.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"base64",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Ci.test(e.data)||(s=this._getOrReturnCtx(e,s),P(s,{validation:"base64url",code:E.invalid_string,message:a.message}),n.dirty()):le.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:E.invalid_string,...F.errToObj(n)})}_addCheck(e){return new it({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...F.errToObj(e)})}url(e){return this._addCheck({kind:"url",...F.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...F.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...F.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...F.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...F.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...F.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...F.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...F.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...F.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...F.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...F.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...F.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...F.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...F.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...F.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...F.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...F.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...F.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...F.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...F.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...F.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...F.errToObj(r)})}nonempty(e){return this.min(1,F.errToObj(e))}trim(){return new it({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new it({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new it({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}it.create=t=>new it({checks:[],typeName:Y.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...re(t)});function Ti(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=Number.parseInt(t.toFixed(s).replace(".","")),i=Number.parseInt(e.toFixed(s).replace(".",""));return a%i/10**s}class Mt extends ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==$.number){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_type,expected:$.number,received:a.parsedType}),H}let n;const s=new $e;for(const a of this._def.checks)a.kind==="int"?le.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),P(n,{code:E.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Ti(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),P(n,{code:E.not_finite,message:a.message}),s.dirty()):le.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,F.toString(r))}gt(e,r){return this.setLimit("min",e,!1,F.toString(r))}lte(e,r){return this.setLimit("max",e,!0,F.toString(r))}lt(e,r){return this.setLimit("max",e,!1,F.toString(r))}setLimit(e,r,n,s){return new Mt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(s)}]})}_addCheck(e){return new Mt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:F.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:F.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:F.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:F.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:F.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:F.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:F.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:F.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:F.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&le.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Mt.create=t=>new Mt({checks:[],typeName:Y.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...re(t)});class Vt extends ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==$.bigint)return this._getInvalidInput(e);let n;const s=new $e;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),P(n,{code:E.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):le.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return P(r,{code:E.invalid_type,expected:$.bigint,received:r.parsedType}),H}gte(e,r){return this.setLimit("min",e,!0,F.toString(r))}gt(e,r){return this.setLimit("min",e,!1,F.toString(r))}lte(e,r){return this.setLimit("max",e,!0,F.toString(r))}lt(e,r){return this.setLimit("max",e,!1,F.toString(r))}setLimit(e,r,n,s){return new Vt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(s)}]})}_addCheck(e){return new Vt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:F.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:F.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:F.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:F.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:F.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Vt.create=t=>new Vt({checks:[],typeName:Y.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...re(t)});class In extends ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==$.boolean){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:$.boolean,received:n.parsedType}),H}return Be(e.data)}}In.create=t=>new In({typeName:Y.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...re(t)});class nr extends ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==$.date){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_type,expected:$.date,received:a.parsedType}),H}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return P(a,{code:E.invalid_date}),H}const n=new $e;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),P(s,{code:E.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):le.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new nr({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:F.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:F.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}nr.create=t=>new nr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Y.ZodDate,...re(t)});class Ln extends ce{_parse(e){if(this._getType(e)!==$.symbol){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:$.symbol,received:n.parsedType}),H}return Be(e.data)}}Ln.create=t=>new Ln({typeName:Y.ZodSymbol,...re(t)});class Mn extends ce{_parse(e){if(this._getType(e)!==$.undefined){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:$.undefined,received:n.parsedType}),H}return Be(e.data)}}Mn.create=t=>new Mn({typeName:Y.ZodUndefined,...re(t)});class Vn extends ce{_parse(e){if(this._getType(e)!==$.null){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:$.null,received:n.parsedType}),H}return Be(e.data)}}Vn.create=t=>new Vn({typeName:Y.ZodNull,...re(t)});class $n extends ce{constructor(){super(...arguments),this._any=!0}_parse(e){return Be(e.data)}}$n.create=t=>new $n({typeName:Y.ZodAny,...re(t)});class Fn extends ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Be(e.data)}}Fn.create=t=>new Fn({typeName:Y.ZodUnknown,...re(t)});class ut extends ce{_parse(e){const r=this._getOrReturnCtx(e);return P(r,{code:E.invalid_type,expected:$.never,received:r.parsedType}),H}}ut.create=t=>new ut({typeName:Y.ZodNever,...re(t)});class Dn extends ce{_parse(e){if(this._getType(e)!==$.undefined){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:$.void,received:n.parsedType}),H}return Be(e.data)}}Dn.create=t=>new Dn({typeName:Y.ZodVoid,...re(t)});class Xe extends ce{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==$.array)return P(r,{code:E.invalid_type,expected:$.array,received:r.parsedType}),H;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(i||o)&&(P(r,{code:i?E.too_big:E.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(P(r,{code:E.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(P(r,{code:E.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new lt(r,i,r.path,o)))).then(i=>$e.mergeArray(n,i));const a=[...r.data].map((i,o)=>s.type._parseSync(new lt(r,i,r.path,o)));return $e.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new Xe({...this._def,minLength:{value:e,message:F.toString(r)}})}max(e,r){return new Xe({...this._def,maxLength:{value:e,message:F.toString(r)}})}length(e,r){return new Xe({...this._def,exactLength:{value:e,message:F.toString(r)}})}nonempty(e){return this.min(1,e)}}Xe.create=(t,e)=>new Xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...re(e)});function bt(t){if(t instanceof Se){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=ot.create(bt(n))}return new Se({...t._def,shape:()=>e})}else return t instanceof Xe?new Xe({...t._def,type:bt(t.element)}):t instanceof ot?ot.create(bt(t.unwrap())):t instanceof Ct?Ct.create(bt(t.unwrap())):t instanceof mt?mt.create(t.items.map(e=>bt(e))):t}class Se extends ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=le.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==$.object){const l=this._getOrReturnCtx(e);return P(l,{code:E.invalid_type,expected:$.object,received:l.parsedType}),H}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ut&&this._def.unknownKeys==="strip"))for(const l in s.data)i.includes(l)||o.push(l);const c=[];for(const l of i){const h=a[l],f=s.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new lt(s,f,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof ut){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of o)c.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(l==="strict")o.length>0&&(P(s,{code:E.unrecognized_keys,keys:o}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of o){const f=s.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new lt(s,f,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const f=await h.key,p=await h.value;l.push({key:f,value:p,alwaysSet:h.alwaysSet})}return l}).then(l=>$e.mergeObjectSync(n,l)):$e.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return F.errToObj,new Se({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var a,i;const s=((i=(a=this._def).errorMap)==null?void 0:i.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:F.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Se({...this._def,unknownKeys:"strip"})}passthrough(){return new Se({...this._def,unknownKeys:"passthrough"})}extend(e){return new Se({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Se({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Se({...this._def,catchall:e})}pick(e){const r={};for(const n of le.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Se({...this._def,shape:()=>r})}omit(e){const r={};for(const n of le.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Se({...this._def,shape:()=>r})}deepPartial(){return bt(this)}partial(e){const r={};for(const n of le.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new Se({...this._def,shape:()=>r})}required(e){const r={};for(const n of le.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof ot;)a=a._def.innerType;r[n]=a}return new Se({...this._def,shape:()=>r})}keyof(){return Ps(le.objectKeys(this.shape))}}Se.create=(t,e)=>new Se({shape:()=>t,unknownKeys:"strip",catchall:ut.create(),typeName:Y.ZodObject,...re(e)});Se.strictCreate=(t,e)=>new Se({shape:()=>t,unknownKeys:"strict",catchall:ut.create(),typeName:Y.ZodObject,...re(e)});Se.lazycreate=(t,e)=>new Se({shape:t,unknownKeys:"strip",catchall:ut.create(),typeName:Y.ZodObject,...re(e)});class sr extends ce{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new et(o.ctx.common.issues));return P(r,{code:E.invalid_union,unionErrors:i}),H}if(r.common.async)return Promise.all(n.map(async a=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},h=c._parseSync({data:r.data,path:r.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(c=>new et(c));return P(r,{code:E.invalid_union,unionErrors:o}),H}}get options(){return this._def.options}}sr.create=(t,e)=>new sr({options:t,typeName:Y.ZodUnion,...re(e)});function Ir(t,e){const r=nt(t),n=nt(e);if(t===e)return{valid:!0,data:t};if(r===$.object&&n===$.object){const s=le.objectKeys(e),a=le.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(const o of a){const c=Ir(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(r===$.array&&n===$.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<t.length;a++){const i=t[a],o=e[a],c=Ir(i,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===$.date&&n===$.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ar extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(An(a)||An(i))return H;const o=Ir(a.value,i.value);return o.valid?((Tn(a)||Tn(i))&&r.dirty(),{status:r.value,value:o.data}):(P(n,{code:E.invalid_intersection_types}),H)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ar.create=(t,e,r)=>new ar({left:t,right:e,typeName:Y.ZodIntersection,...re(r)});class mt extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==$.array)return P(n,{code:E.invalid_type,expected:$.array,received:n.parsedType}),H;if(n.data.length<this._def.items.length)return P(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;!this._def.rest&&n.data.length>this._def.items.length&&(P(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((i,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new lt(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>$e.mergeArray(r,i)):$e.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new mt({...this._def,rest:e})}}mt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mt({items:t,typeName:Y.ZodTuple,rest:null,...re(e)})};class Un extends ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==$.map)return P(n,{code:E.invalid_type,expected:$.map,received:n.parsedType}),H;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,c],l)=>({key:s._parse(new lt(n,o,n.path,[l,"key"])),value:a._parse(new lt(n,c,n.path,[l,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return H;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),o.set(l.value,h.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const c of i){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return H;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),o.set(l.value,h.value)}return{status:r.value,value:o}}}}Un.create=(t,e,r)=>new Un({valueType:e,keyType:t,typeName:Y.ZodMap,...re(r)});class $t extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==$.set)return P(n,{code:E.invalid_type,expected:$.set,received:n.parsedType}),H;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(P(n,{code:E.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(P(n,{code:E.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const a=this._def.valueType;function i(c){const l=new Set;for(const h of c){if(h.status==="aborted")return H;h.status==="dirty"&&r.dirty(),l.add(h.value)}return{status:r.value,value:l}}const o=[...n.data.values()].map((c,l)=>a._parse(new lt(n,c,n.path,l)));return n.common.async?Promise.all(o).then(c=>i(c)):i(o)}min(e,r){return new $t({...this._def,minSize:{value:e,message:F.toString(r)}})}max(e,r){return new $t({...this._def,maxSize:{value:e,message:F.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}$t.create=(t,e)=>new $t({valueType:t,minSize:null,maxSize:null,typeName:Y.ZodSet,...re(e)});class zn extends ce{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}zn.create=(t,e)=>new zn({getter:t,typeName:Y.ZodLazy,...re(e)});class Lr extends ce{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return P(r,{received:r.data,code:E.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:e.data}}get value(){return this._def.value}}Lr.create=(t,e)=>new Lr({value:t,typeName:Y.ZodLiteral,...re(e)});function Ps(t,e){return new kt({values:t,typeName:Y.ZodEnum,...re(e)})}class kt extends ce{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return P(r,{expected:le.joinValues(n),received:r.parsedType,code:E.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return P(r,{received:r.data,code:E.invalid_enum_value,options:n}),H}return Be(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return kt.create(e,{...this._def,...r})}exclude(e,r=this._def){return kt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}kt.create=Ps;class Bn extends ce{_parse(e){const r=le.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==$.string&&n.parsedType!==$.number){const s=le.objectValues(r);return P(n,{expected:le.joinValues(s),received:n.parsedType,code:E.invalid_type}),H}if(this._cache||(this._cache=new Set(le.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=le.objectValues(r);return P(n,{received:n.data,code:E.invalid_enum_value,options:s}),H}return Be(e.data)}get enum(){return this._def.values}}Bn.create=(t,e)=>new Bn({values:t,typeName:Y.ZodNativeEnum,...re(e)});class ir extends ce{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==$.promise&&r.common.async===!1)return P(r,{code:E.invalid_type,expected:$.promise,received:r.parsedType}),H;const n=r.parsedType===$.promise?r.data:Promise.resolve(r.data);return Be(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ir.create=(t,e)=>new ir({type:t,typeName:Y.ZodPromise,...re(e)});class St extends ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{P(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return H;const c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?H:c.status==="dirty"||r.value==="dirty"?Pt(c.value):c});{if(r.value==="aborted")return H;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?H:o.status==="dirty"||r.value==="dirty"?Pt(o.value):o}}if(s.type==="refinement"){const i=o=>{const c=s.refinement(o,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?H:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?H:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wt(i))return H;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>wt(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):H);le.assertNever(s)}}St.create=(t,e,r)=>new St({schema:t,typeName:Y.ZodEffects,effect:e,...re(r)});St.createWithPreprocess=(t,e,r)=>new St({schema:e,effect:{type:"preprocess",transform:t},typeName:Y.ZodEffects,...re(r)});class ot extends ce{_parse(e){return this._getType(e)===$.undefined?Be(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ot.create=(t,e)=>new ot({innerType:t,typeName:Y.ZodOptional,...re(e)});class Ct extends ce{_parse(e){return this._getType(e)===$.null?Be(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ct.create=(t,e)=>new Ct({innerType:t,typeName:Y.ZodNullable,...re(e)});class Mr extends ce{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===$.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Mr.create=(t,e)=>new Mr({innerType:t,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...re(e)});class Vr extends ce{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return rr(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new et(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new et(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Vr.create=(t,e)=>new Vr({innerType:t,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...re(e)});class Zn extends ce{_parse(e){if(this._getType(e)!==$.nan){const n=this._getOrReturnCtx(e);return P(n,{code:E.invalid_type,expected:$.nan,received:n.parsedType}),H}return{status:"valid",value:e.data}}}Zn.create=t=>new Zn({typeName:Y.ZodNaN,...re(t)});class Pi extends ce{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class en extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?H:a.status==="dirty"?(r.dirty(),Pt(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?H:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new en({in:e,out:r,typeName:Y.ZodPipeline})}}class $r extends ce{_parse(e){const r=this._def.innerType._parse(e),n=s=>(wt(s)&&(s.value=Object.freeze(s.value)),s);return rr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}$r.create=(t,e)=>new $r({innerType:t,typeName:Y.ZodReadonly,...re(e)});var Y;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Y||(Y={}));const Je=it.create;ut.create;Xe.create;const fr=Se.create;sr.create;ar.create;mt.create;const Ii=Lr.create;kt.create;ir.create;ot.create;Ct.create;/**
|
|
2
2
|
* @license lucide-react v0.468.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Li=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),
|
|
6
|
+
*/const Li=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Is=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
|
|
7
7
|
* @license lucide-react v0.468.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Vi=I.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:i,...o},c)=>I.createElement("svg",{ref:c,...Mi,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:
|
|
16
|
+
*/const Vi=I.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:i,...o},c)=>I.createElement("svg",{ref:c,...Mi,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Is("lucide",s),...o},[...i.map(([l,h])=>I.createElement(l,h)),...Array.isArray(a)?a:[a]]));/**
|
|
17
17
|
* @license lucide-react v0.468.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const ft=(t,e)=>{const r=I.forwardRef(({className:n,...s},a)=>I.createElement(Vi,{ref:a,iconNode:e,className:
|
|
21
|
+
*/const ft=(t,e)=>{const r=I.forwardRef(({className:n,...s},a)=>I.createElement(Vi,{ref:a,iconNode:e,className:Is(`lucide-${Li(t)}`,n),...s}));return r.displayName=`${t}`,r};/**
|
|
22
22
|
* @license lucide-react v0.468.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
@@ -58,29 +58,29 @@
|
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Zi=ft("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);function Is(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Is(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ls(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Is(t))&&(n&&(n+=" "),n+=e);return n}const tn="-",Wi=t=>{const e=Gi(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const o=i.split(tn);return o[0]===""&&o.length!==1&&o.shift(),Ms(o,e)||qi(i)},getConflictingClassGroupIds:(i,o)=>{const c=r[i]||[];return o&&n[i]?[...c,...n[i]]:c}}},Ms=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Ms(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const a=t.join(tn);return(i=e.validators.find(({validator:o})=>o(a)))==null?void 0:i.classGroupId},Zn=/^\[(.+)\]$/,qi=t=>{if(Zn.test(t)){const e=Zn.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Gi=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Yi(Object.entries(t.classGroups),r).forEach(([a,i])=>{Fr(i,n,a,e)}),n},Fr=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const a=s===""?e:Wn(e,s);a.classGroupId=r;return}if(typeof s=="function"){if(Hi(s)){Fr(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,i])=>{Fr(i,Wn(e,a),r,n)})})},Wn=(t,e)=>{let r=t;return e.split(tn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Hi=t=>t.isThemeGetter,Yi=(t,e)=>e?t.map(([r,n])=>{const s=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,o])=>[e+i,o])):a);return[r,s]}):t,Ki=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(a,i)=>{r.set(a,i),e++,e>t&&(e=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return s(a,i),i},set(a,i){r.has(a)?r.set(a,i):s(a,i)}}},Vs="!",Ji=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],a=e.length,i=o=>{const c=[];let l=0,h=0,f;for(let S=0;S<o.length;S++){let k=o[S];if(l===0){if(k===s&&(n||o.slice(S,S+a)===e)){c.push(o.slice(h,S)),h=S+a;continue}if(k==="/"){f=S;continue}}k==="["?l++:k==="]"&&l--}const p=c.length===0?o:o.substring(h),m=p.startsWith(Vs),x=m?p.substring(1):p,v=f&&f>h?f-h:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:v}};return r?o=>r({className:o,parseClassName:i}):i},Xi=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},Qi=t=>({cache:Ki(t.cacheSize),parseClassName:Ji(t),...Wi(t)}),eo=/\s+/,to=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,a=[],i=t.trim().split(eo);let o="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:h,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=r(l);let x=!!m,v=n(x?p.substring(0,m):p);if(!v){if(!x){o=l+(o.length>0?" "+o:o);continue}if(v=n(p),!v){o=l+(o.length>0?" "+o:o);continue}x=!1}const S=Xi(h).join(":"),k=f?S+Vs:S,C=k+v;if(a.includes(C))continue;a.push(C);const U=s(v,x);for(let L=0;L<U.length;++L){const b=U[L];a.push(k+b)}o=l+(o.length>0?" "+o:o)}return o};function ro(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=$s(e))&&(n&&(n+=" "),n+=r);return n}const $s=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=$s(t[n]))&&(r&&(r+=" "),r+=e);return r};function no(t,...e){let r,n,s,a=i;function i(c){const l=e.reduce((h,f)=>f(h),t());return r=Qi(l),n=r.cache.get,s=r.cache.set,a=o,o(c)}function o(c){const l=n(c);if(l)return l;const h=to(c,r);return s(c,h),h}return function(){return a(ro.apply(null,arguments))}}const ge=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Fs=/^\[(?:([a-z-]+):)?(.+)\]$/i,so=/^\d+\/\d+$/,ao=new Set(["px","full","screen"]),io=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,co=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=t=>_t(t)||ao.has(t)||so.test(t),tt=t=>jt(t,"length",xo),_t=t=>!!t&&!Number.isNaN(Number(t)),br=t=>jt(t,"number",_t),At=t=>!!t&&Number.isInteger(Number(t)),fo=t=>t.endsWith("%")&&_t(t.slice(0,-1)),Q=t=>Fs.test(t),rt=t=>io.test(t),ho=new Set(["length","size","percentage"]),po=t=>jt(t,ho,Ds),mo=t=>jt(t,"position",Ds),yo=new Set(["image","url"]),go=t=>jt(t,yo,_o),vo=t=>jt(t,"",bo),Tt=()=>!0,jt=(t,e,r)=>{const n=Fs.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},xo=t=>oo.test(t)&&!co.test(t),Ds=()=>!1,bo=t=>lo.test(t),_o=t=>uo.test(t),wo=()=>{const t=ge("colors"),e=ge("spacing"),r=ge("blur"),n=ge("brightness"),s=ge("borderColor"),a=ge("borderRadius"),i=ge("borderSpacing"),o=ge("borderWidth"),c=ge("contrast"),l=ge("grayscale"),h=ge("hueRotate"),f=ge("invert"),p=ge("gap"),m=ge("gradientColorStops"),x=ge("gradientColorStopPositions"),v=ge("inset"),S=ge("margin"),k=ge("opacity"),C=ge("padding"),U=ge("saturate"),L=ge("scale"),b=ge("sepia"),B=ge("skew"),W=ge("space"),ae=ge("translate"),$=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto",Q,e],T=()=>[Q,e],Z=()=>["",Qe,tt],J=()=>["auto",_t,Q],ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],de=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],Ee=()=>["","0",Q],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[_t,Q];return{cacheSize:500,separator:":",theme:{colors:[Tt],spacing:[Qe,tt],blur:["none","",rt,Q],brightness:R(),borderColor:[t],borderRadius:["none","","full",rt,Q],borderSpacing:T(),borderWidth:Z(),contrast:R(),grayscale:Ee(),hueRotate:R(),invert:Ee(),gap:T(),gradientColorStops:[t],gradientColorStopPositions:[fo,tt],inset:ee(),margin:ee(),opacity:R(),padding:T(),saturate:R(),scale:R(),sepia:Ee(),skew:R(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[rt]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ve(),Q]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",At,Q]}],basis:[{basis:ee()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:Ee()}],shrink:[{shrink:Ee()}],order:[{order:["first","last","none",At,Q]}],"grid-cols":[{"grid-cols":[Tt]}],"col-start-end":[{col:["auto",{span:["full",At,Q]},Q]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Tt]}],"row-start-end":[{row:["auto",{span:[At,Q]},Q]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,e]}],"min-w":[{"min-w":[Q,e,"min","max","fit"]}],"max-w":[{"max-w":[Q,e,"none","full","min","max","fit","prose",{screen:[rt]},rt]}],h:[{h:[Q,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,e,"auto","min","max","fit"]}],"font-size":[{text:["base",rt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",br]}],"font-family":[{font:[Tt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",_t,br]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qe,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qe,tt]}],"underline-offset":[{"underline-offset":["auto",Qe,Q]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ve(),mo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",po]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},go]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...de(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:de()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...de()]}],"outline-offset":[{"outline-offset":[Qe,Q]}],"outline-w":[{outline:[Qe,tt]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Qe,tt]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",rt,vo]}],"shadow-color":[{shadow:[Tt]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",rt,Q]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[U]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[U]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[At,Q]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Qe,tt,br]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ko=no(wo);function me(...t){return ko(Ls(t))}function Us(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bt={exports:{}},Zt={exports:{}},fe={};/** @license React v16.13.1
|
|
61
|
+
*/const Zi=ft("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);function Ls(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Ls(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ms(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Ls(t))&&(n&&(n+=" "),n+=e);return n}const tn="-",Wi=t=>{const e=Gi(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const o=i.split(tn);return o[0]===""&&o.length!==1&&o.shift(),Vs(o,e)||qi(i)},getConflictingClassGroupIds:(i,o)=>{const c=r[i]||[];return o&&n[i]?[...c,...n[i]]:c}}},Vs=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Vs(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const a=t.join(tn);return(i=e.validators.find(({validator:o})=>o(a)))==null?void 0:i.classGroupId},Wn=/^\[(.+)\]$/,qi=t=>{if(Wn.test(t)){const e=Wn.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Gi=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Yi(Object.entries(t.classGroups),r).forEach(([a,i])=>{Fr(i,n,a,e)}),n},Fr=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const a=s===""?e:qn(e,s);a.classGroupId=r;return}if(typeof s=="function"){if(Hi(s)){Fr(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,i])=>{Fr(i,qn(e,a),r,n)})})},qn=(t,e)=>{let r=t;return e.split(tn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Hi=t=>t.isThemeGetter,Yi=(t,e)=>e?t.map(([r,n])=>{const s=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,o])=>[e+i,o])):a);return[r,s]}):t,Ki=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(a,i)=>{r.set(a,i),e++,e>t&&(e=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return s(a,i),i},set(a,i){r.has(a)?r.set(a,i):s(a,i)}}},$s="!",Ji=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],a=e.length,i=o=>{const c=[];let l=0,h=0,f;for(let S=0;S<o.length;S++){let k=o[S];if(l===0){if(k===s&&(n||o.slice(S,S+a)===e)){c.push(o.slice(h,S)),h=S+a;continue}if(k==="/"){f=S;continue}}k==="["?l++:k==="]"&&l--}const p=c.length===0?o:o.substring(h),m=p.startsWith($s),x=m?p.substring(1):p,v=f&&f>h?f-h:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:v}};return r?o=>r({className:o,parseClassName:i}):i},Xi=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},Qi=t=>({cache:Ki(t.cacheSize),parseClassName:Ji(t),...Wi(t)}),eo=/\s+/,to=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,a=[],i=t.trim().split(eo);let o="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:h,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=r(l);let x=!!m,v=n(x?p.substring(0,m):p);if(!v){if(!x){o=l+(o.length>0?" "+o:o);continue}if(v=n(p),!v){o=l+(o.length>0?" "+o:o);continue}x=!1}const S=Xi(h).join(":"),k=f?S+$s:S,C=k+v;if(a.includes(C))continue;a.push(C);const U=s(v,x);for(let L=0;L<U.length;++L){const b=U[L];a.push(k+b)}o=l+(o.length>0?" "+o:o)}return o};function ro(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Fs(e))&&(n&&(n+=" "),n+=r);return n}const Fs=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Fs(t[n]))&&(r&&(r+=" "),r+=e);return r};function no(t,...e){let r,n,s,a=i;function i(c){const l=e.reduce((h,f)=>f(h),t());return r=Qi(l),n=r.cache.get,s=r.cache.set,a=o,o(c)}function o(c){const l=n(c);if(l)return l;const h=to(c,r);return s(c,h),h}return function(){return a(ro.apply(null,arguments))}}const ve=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Ds=/^\[(?:([a-z-]+):)?(.+)\]$/i,so=/^\d+\/\d+$/,ao=new Set(["px","full","screen"]),io=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,co=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=t=>_t(t)||ao.has(t)||so.test(t),tt=t=>jt(t,"length",xo),_t=t=>!!t&&!Number.isNaN(Number(t)),br=t=>jt(t,"number",_t),At=t=>!!t&&Number.isInteger(Number(t)),fo=t=>t.endsWith("%")&&_t(t.slice(0,-1)),X=t=>Ds.test(t),rt=t=>io.test(t),ho=new Set(["length","size","percentage"]),po=t=>jt(t,ho,Us),mo=t=>jt(t,"position",Us),yo=new Set(["image","url"]),go=t=>jt(t,yo,_o),vo=t=>jt(t,"",bo),Tt=()=>!0,jt=(t,e,r)=>{const n=Ds.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},xo=t=>oo.test(t)&&!co.test(t),Us=()=>!1,bo=t=>lo.test(t),_o=t=>uo.test(t),wo=()=>{const t=ve("colors"),e=ve("spacing"),r=ve("blur"),n=ve("brightness"),s=ve("borderColor"),a=ve("borderRadius"),i=ve("borderSpacing"),o=ve("borderWidth"),c=ve("contrast"),l=ve("grayscale"),h=ve("hueRotate"),f=ve("invert"),p=ve("gap"),m=ve("gradientColorStops"),x=ve("gradientColorStopPositions"),v=ve("inset"),S=ve("margin"),k=ve("opacity"),C=ve("padding"),U=ve("saturate"),L=ve("scale"),b=ve("sepia"),Z=ve("skew"),W=ve("space"),se=ve("translate"),ue=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",X,e],N=()=>[X,e],B=()=>["",Qe,tt],Q=()=>["auto",_t,X],ye=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],de=()=>["solid","dashed","dotted","double","none"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],Ee=()=>["","0",X],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[_t,X];return{cacheSize:500,separator:":",theme:{colors:[Tt],spacing:[Qe,tt],blur:["none","",rt,X],brightness:R(),borderColor:[t],borderRadius:["none","","full",rt,X],borderSpacing:N(),borderWidth:B(),contrast:R(),grayscale:Ee(),hueRotate:R(),invert:Ee(),gap:N(),gradientColorStops:[t],gradientColorStopPositions:[fo,tt],inset:z(),margin:z(),opacity:R(),padding:N(),saturate:R(),scale:R(),sepia:Ee(),skew:R(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[rt]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ye(),X]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:ue()}],"overscroll-x":[{"overscroll-x":ue()}],"overscroll-y":[{"overscroll-y":ue()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",At,X]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:Ee()}],shrink:[{shrink:Ee()}],order:[{order:["first","last","none",At,X]}],"grid-cols":[{"grid-cols":[Tt]}],"col-start-end":[{col:["auto",{span:["full",At,X]},X]}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":[Tt]}],"row-start-end":[{row:["auto",{span:[At,X]},X]}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",X]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",X]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,e]}],"min-w":[{"min-w":[X,e,"min","max","fit"]}],"max-w":[{"max-w":[X,e,"none","full","min","max","fit","prose",{screen:[rt]},rt]}],h:[{h:[X,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,e,"auto","min","max","fit"]}],"font-size":[{text:["base",rt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",br]}],"font-family":[{font:[Tt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",_t,br]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qe,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qe,tt]}],"underline-offset":[{"underline-offset":["auto",Qe,X]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ye(),mo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",po]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},go]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...de(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:de()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...de()]}],"outline-offset":[{"outline-offset":[Qe,X]}],"outline-w":[{outline:[Qe,tt]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Qe,tt]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",rt,vo]}],"shadow-color":[{shadow:[Tt]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...xe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":xe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",rt,X]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[U]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[U]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",X]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[At,X]}],"translate-x":[{"translate-x":[se]}],"translate-y":[{"translate-y":[se]}],"skew-x":[{"skew-x":[Z]}],"skew-y":[{"skew-y":[Z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Qe,tt,br]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ko=no(wo);function me(...t){return ko(Ms(t))}function zs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bt={exports:{}},Zt={exports:{}},fe={};/** @license React v16.13.1
|
|
62
62
|
* react-is.production.min.js
|
|
63
63
|
*
|
|
64
64
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the MIT license found in the
|
|
67
67
|
* LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/var
|
|
68
|
+
*/var Gn;function So(){if(Gn)return fe;Gn=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,x=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function U(b){if(typeof b=="object"&&b!==null){var Z=b.$$typeof;switch(Z){case e:switch(b=b.type,b){case c:case l:case n:case a:case s:case f:return b;default:switch(b=b&&b.$$typeof,b){case o:case h:case x:case m:case i:return b;default:return Z}}case r:return Z}}}function L(b){return U(b)===l}return fe.AsyncMode=c,fe.ConcurrentMode=l,fe.ContextConsumer=o,fe.ContextProvider=i,fe.Element=e,fe.ForwardRef=h,fe.Fragment=n,fe.Lazy=x,fe.Memo=m,fe.Portal=r,fe.Profiler=a,fe.StrictMode=s,fe.Suspense=f,fe.isAsyncMode=function(b){return L(b)||U(b)===c},fe.isConcurrentMode=L,fe.isContextConsumer=function(b){return U(b)===o},fe.isContextProvider=function(b){return U(b)===i},fe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},fe.isForwardRef=function(b){return U(b)===h},fe.isFragment=function(b){return U(b)===n},fe.isLazy=function(b){return U(b)===x},fe.isMemo=function(b){return U(b)===m},fe.isPortal=function(b){return U(b)===r},fe.isProfiler=function(b){return U(b)===a},fe.isStrictMode=function(b){return U(b)===s},fe.isSuspense=function(b){return U(b)===f},fe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===l||b===a||b===s||b===f||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===x||b.$$typeof===m||b.$$typeof===i||b.$$typeof===o||b.$$typeof===h||b.$$typeof===S||b.$$typeof===k||b.$$typeof===C||b.$$typeof===v)},fe.typeOf=U,fe}var he={};/** @license React v16.13.1
|
|
69
69
|
* react-is.development.js
|
|
70
70
|
*
|
|
71
71
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the MIT license found in the
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/var
|
|
75
|
+
*/var Hn;function Co(){return Hn||(Hn=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,x=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function U(T){return typeof T=="string"||typeof T=="function"||T===n||T===l||T===a||T===s||T===f||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===x||T.$$typeof===m||T.$$typeof===i||T.$$typeof===o||T.$$typeof===h||T.$$typeof===S||T.$$typeof===k||T.$$typeof===C||T.$$typeof===v)}function L(T){if(typeof T=="object"&&T!==null){var Fe=T.$$typeof;switch(Fe){case e:var ht=T.type;switch(ht){case c:case l:case n:case a:case s:case f:return ht;default:var zt=ht&&ht.$$typeof;switch(zt){case o:case h:case x:case m:case i:return zt;default:return Fe}}case r:return Fe}}}var b=c,Z=l,W=o,se=i,ue=e,V=h,z=n,N=x,B=m,Q=r,ye=a,de=s,xe=f,we=!1;function Ee(T){return we||(we=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(T)||L(T)===c}function _(T){return L(T)===l}function R(T){return L(T)===o}function G(T){return L(T)===i}function q(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function K(T){return L(T)===h}function ne(T){return L(T)===n}function ee(T){return L(T)===x}function te(T){return L(T)===m}function ie(T){return L(T)===r}function oe(T){return L(T)===a}function ae(T){return L(T)===s}function Re(T){return L(T)===f}he.AsyncMode=b,he.ConcurrentMode=Z,he.ContextConsumer=W,he.ContextProvider=se,he.Element=ue,he.ForwardRef=V,he.Fragment=z,he.Lazy=N,he.Memo=B,he.Portal=Q,he.Profiler=ye,he.StrictMode=de,he.Suspense=xe,he.isAsyncMode=Ee,he.isConcurrentMode=_,he.isContextConsumer=R,he.isContextProvider=G,he.isElement=q,he.isForwardRef=K,he.isFragment=ne,he.isLazy=ee,he.isMemo=te,he.isPortal=ie,he.isProfiler=oe,he.isStrictMode=ae,he.isSuspense=Re,he.isValidElementType=U,he.typeOf=L})()),he}var Yn;function rn(){return Yn||(Yn=1,process.env.NODE_ENV==="production"?Zt.exports=So():Zt.exports=Co()),Zt.exports}/*
|
|
76
76
|
object-assign
|
|
77
77
|
(c) Sindre Sorhus
|
|
78
78
|
@license MIT
|
|
79
|
-
*/var _r,
|
|
80
|
-
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var A=Re(re,ie,K,se,te+"."+ie,r);if(A)return A}return null}return S(R)}function J(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(J);if(_===null||o(_))return!0;var R=f(_);if(R){var G=R.call(_),q;if(R!==_.entries){for(;!(q=G.next()).done;)if(!J(q.value))return!1}else for(;!(q=G.next()).done;){var K=q.value;if(K&&!J(K[1]))return!1}}else return!1;return!0;default:return!1}}function ve(_,R){return _==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function de(_){var R=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":ve(R,_)?"symbol":R}function xe(_){if(typeof _>"u"||_===null)return""+_;var R=de(_);if(R==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return R}function we(_){var R=xe(_);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function Ee(_){return!_.constructor||!_.constructor.name?p:_.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},Cr}var Er,es;function jo(){if(es)return Er;es=1;var t=nn();function e(){}function r(){}return r.resetWarningCache=e,Er=function(){function n(i,o,c,l,h,f){if(f!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Er}var ts;function No(){if(ts)return Bt.exports;if(ts=1,process.env.NODE_ENV!=="production"){var t=rn(),e=!0;Bt.exports=Oo()(t.isElement,e)}else Bt.exports=jo()();return Bt.exports}var Ao=No();const Ie=Us(Ao);var To=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Dr(){return Dr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dr.apply(this,arguments)}function Po(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,a;for(a=0;a<n.length;a++)s=n[a],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Wt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Io(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ur(t,e)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Ur(t,e)}var hr=(function(t){Io(e,t);function e(){var n;return n=t.call(this)||this,n.handleExpired=n.handleExpired.bind(Wt(n)),n.handleErrored=n.handleErrored.bind(Wt(n)),n.handleChange=n.handleChange.bind(Wt(n)),n.handleRecaptchaRef=n.handleRecaptchaRef.bind(Wt(n)),n}var r=e.prototype;return r.getCaptchaFunction=function(s){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[s]:this.props.grecaptcha[s]:null},r.getValue=function(){var s=this.getCaptchaFunction("getResponse");return s&&this._widgetId!==void 0?s(this._widgetId):null},r.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},r.execute=function(){var s=this.getCaptchaFunction("execute");if(s&&this._widgetId!==void 0)return s(this._widgetId);this._executeRequested=!0},r.executeAsync=function(){var s=this;return new Promise(function(a,i){s.executionResolve=a,s.executionReject=i,s.execute()})},r.reset=function(){var s=this.getCaptchaFunction("reset");s&&this._widgetId!==void 0&&s(this._widgetId)},r.forceReset=function(){var s=this.getCaptchaFunction("reset");s&&s()},r.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},r.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},r.handleChange=function(s){this.props.onChange&&this.props.onChange(s),this.executionResolve&&(this.executionResolve(s),delete this.executionReject,delete this.executionResolve)},r.explicitRender=function(){var s=this.getCaptchaFunction("render");if(s&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=s(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},r.componentDidMount=function(){this.explicitRender()},r.componentDidUpdate=function(){this.explicitRender()},r.handleRecaptchaRef=function(s){this.captcha=s},r.render=function(){var s=this.props;s.sitekey,s.onChange,s.theme,s.type,s.tabindex,s.onExpired,s.onErrored,s.size,s.stoken,s.grecaptcha,s.badge,s.hl,s.isolated;var a=Po(s,To);return w.createElement("div",Dr({},a,{ref:this.handleRecaptchaRef}))},e})(w.Component);hr.displayName="ReCAPTCHA";hr.propTypes={sitekey:Ie.string.isRequired,onChange:Ie.func,grecaptcha:Ie.object,theme:Ie.oneOf(["dark","light"]),type:Ie.oneOf(["image","audio"]),tabindex:Ie.number,onExpired:Ie.func,onErrored:Ie.func,size:Ie.oneOf(["compact","normal","invisible"]),stoken:Ie.string,hl:Ie.string,badge:Ie.oneOf(["bottomright","bottomleft","inline"]),isolated:Ie.bool};hr.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Rr,rs;function Lo(){if(rs)return Rr;rs=1;var t=rn(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[t.ForwardRef]=n,a[t.Memo]=s;function i(x){return t.isMemo(x)?s:a[x.$$typeof]||e}var o=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(x,v,S){if(typeof v!="string"){if(p){var k=f(v);k&&k!==p&&m(x,k,S)}var C=c(v);l&&(C=C.concat(l(v)));for(var U=i(x),L=i(v),b=0;b<C.length;++b){var B=C[b];if(!r[B]&&!(S&&S[B])&&!(L&&L[B])&&!(U&&U[B])){var W=h(v,B);try{o(x,B,W)}catch{}}}}return x}return Rr=m,Rr}var Mo=Lo();const Vo=Us(Mo);function zr(){return zr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zr.apply(this,arguments)}function $o(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,a;for(a=0;a<n.length;a++)s=n[a],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Fo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Ze={},Do=0;function Uo(t,e){return e=e||{},function(n){var s=n.displayName||n.name||"Component",a=(function(o){Fo(c,o);function c(h,f){var p;return p=o.call(this,h,f)||this,p.state={},p.__scriptURL="",p}var l=c.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Do++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL=typeof t=="function"?t():t,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(f){var p=this;this.setState(f,function(){return p.props.asyncScriptOnLoad&&p.props.asyncScriptOnLoad(p.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=Ze[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var p in f.observers)f.observers[p](f);delete window[e.callbackName]},l.componentDidMount=function(){var f=this,p=this.setupScriptURL(),m=this.asyncScriptLoaderGetScriptLoaderID(),x=e,v=x.globalName,S=x.callbackName,k=x.scriptId;if(v&&typeof window[v]<"u"&&(Ze[p]={loaded:!0,observers:{}}),Ze[p]){var C=Ze[p];if(C&&(C.loaded||C.errored)){this.asyncScriptLoaderHandleLoad(C);return}C.observers[m]=function(W){return f.asyncScriptLoaderHandleLoad(W)};return}var U={};U[m]=function(W){return f.asyncScriptLoaderHandleLoad(W)},Ze[p]={loaded:!1,observers:U};var L=document.createElement("script");L.src=p,L.async=!0;for(var b in e.attributes)L.setAttribute(b,e.attributes[b]);k&&(L.id=k);var B=function(ae){if(Ze[p]){var $=Ze[p],z=$.observers;for(var ee in z)ae(z[ee])&&delete z[ee]}};S&&typeof window<"u"&&(window[S]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),L.onload=function(){var W=Ze[p];W&&(W.loaded=!0,B(function(ae){return S?!1:(ae(W),!0)}))},L.onerror=function(){var W=Ze[p];W&&(W.errored=!0,B(function(ae){return ae(W),!0}))},document.body.appendChild(L)},l.componentWillUnmount=function(){var f=this.__scriptURL;if(e.removeOnUnmount===!0)for(var p=document.getElementsByTagName("script"),m=0;m<p.length;m+=1)p[m].src.indexOf(f)>-1&&p[m].parentNode&&p[m].parentNode.removeChild(p[m]);var x=Ze[f];x&&(delete x.observers[this.asyncScriptLoaderGetScriptLoaderID()],e.removeOnUnmount===!0&&delete Ze[f])},l.render=function(){var f=e.globalName,p=this.props;p.asyncScriptOnLoad;var m=p.forwardedRef,x=$o(p,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(x[f]=typeof window[f]<"u"?window[f]:void 0),x.ref=m,I.createElement(n,x)},c})(I.Component),i=I.forwardRef(function(o,c){return I.createElement(a,zr({},o,{forwardedRef:c}))});return i.displayName="AsyncScriptLoader("+s+")",i.propTypes={asyncScriptOnLoad:Ie.func},Vo(i,n)}}var Br="onloadcallback",zo="grecaptcha";function Zr(){return typeof window<"u"&&window.recaptchaOptions||{}}function Bo(){var t=Zr(),e=t.useRecaptchaNet?"recaptcha.net":"www.google.com";return t.enterprise?"https://"+e+"/recaptcha/enterprise.js?onload="+Br+"&render=explicit":"https://"+e+"/recaptcha/api.js?onload="+Br+"&render=explicit"}const Zo=Uo(Bo,{callbackName:Br,globalName:zo,attributes:Zr().nonce?{nonce:Zr().nonce}:{}})(hr);function De(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wr(t,e){return Wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Wr(t,e)}function Wo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wr(t,e)}var qo=Object.defineProperty,Go=Object.defineProperties,Ho=Object.getOwnPropertyDescriptors,cr=Object.getOwnPropertySymbols,Bs=Object.prototype.hasOwnProperty,Zs=Object.prototype.propertyIsEnumerable,qr=(t,e,r)=>e in t?qo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ve=(t,e)=>{for(var r in e||(e={}))Bs.call(e,r)&&qr(t,r,e[r]);if(cr)for(var r of cr(e))Zs.call(e,r)&&qr(t,r,e[r]);return t},Ws=(t,e)=>Go(t,Ho(e)),Yo=(t,e)=>{var r={};for(var n in t)Bs.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&cr)for(var n of cr(t))e.indexOf(n)<0&&Zs.call(t,n)&&(r[n]=t[n]);return r},Oe=(t,e,r)=>(qr(t,typeof e!="symbol"?e+"":e,r),r),Et=(t,e,r)=>new Promise((n,s)=>{var a=c=>{try{o(r.next(c))}catch(l){s(l)}},i=c=>{try{o(r.throw(c))}catch(l){s(l)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,i);o((r=r.apply(t,e)).next())}),Ko="hCaptcha-script",Kt="hCaptchaOnLoad",ns="script-error",at="@hCaptcha/loader";function Jo(t){return Object.entries(t).filter(([,e])=>e||e===!1).map(([e,r])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`).join("&")}function qs(t){let e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function Gs(t){return t||document.head}function Xo(t){var e;t.setTag("source",at),t.setTag("url",document.URL),t.setContext("os",{UA:navigator.userAgent}),t.setContext("browser",Ve({},Qo())),t.setContext("device",Ws(Ve({},tc()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((e=screen.orientation)==null?void 0:e.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function Qo(){var t,e,r,n,s,a;let i=navigator.userAgent,o,c;return i.indexOf("Firefox")!==-1?(o="Firefox",c=(t=i.match(/Firefox\/([\d.]+)/))==null?void 0:t[1]):i.indexOf("Edg")!==-1?(o="Microsoft Edge",c=(e=i.match(/Edg\/([\d.]+)/))==null?void 0:e[1]):i.indexOf("Chrome")!==-1&&i.indexOf("Safari")!==-1?(o="Chrome",c=(r=i.match(/Chrome\/([\d.]+)/))==null?void 0:r[1]):i.indexOf("Safari")!==-1&&i.indexOf("Chrome")===-1?(o="Safari",c=(n=i.match(/Version\/([\d.]+)/))==null?void 0:n[1]):i.indexOf("Opera")!==-1||i.indexOf("OPR")!==-1?(o="Opera",c=(s=i.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:s[2]):i.indexOf("MSIE")!==-1||i.indexOf("Trident")!==-1?(o="Internet Explorer",c=(a=i.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:a[2]):(o="Unknown",c="Unknown"),{name:o,version:c}}function ec(t){return new Promise(e=>setTimeout(e,t))}function tc(){let t=navigator.userAgent,e;t.indexOf("Win")!==-1?e="Windows":t.indexOf("Mac")!==-1?e="Mac":t.indexOf("Linux")!==-1?e="Linux":t.indexOf("Android")!==-1?e="Android":t.indexOf("like Mac")!==-1||t.indexOf("iPhone")!==-1||t.indexOf("iPad")!==-1?e="iOS":e="Unknown";let r;return/Mobile|iPhone|iPod|Android/i.test(t)?r="Mobile":/Tablet|iPad/i.test(t)?r="Tablet":r="Desktop",{model:e,family:e,device:r}}var rc=class Hs{constructor(e){Oe(this,"_parent"),Oe(this,"breadcrumbs",[]),Oe(this,"context",{}),Oe(this,"extra",{}),Oe(this,"tags",{}),Oe(this,"request"),Oe(this,"user"),this._parent=e}get parent(){return this._parent}child(){return new Hs(this)}setRequest(e){return this.request=e,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(e){return typeof e.timestamp>"u"&&(e.timestamp=new Date().toISOString()),this.breadcrumbs.push(e),this}setExtra(e,r){return this.extra[e]=r,this}removeExtra(e){return delete this.extra[e],this}setContext(e,r){return typeof r.type>"u"&&(r.type=e),this.context[e]=r,this}removeContext(e){return delete this.context[e],this}setTags(e){return this.tags=Ve(Ve({},this.tags),e),this}setTag(e,r){return this.tags[e]=r,this}removeTag(e){return delete this.tags[e],this}setUser(e){return this.user=e,this}removeUser(){return this.user=void 0,this}toBody(){let e=[],r=this;for(;r;)e.push(r),r=r.parent;return e.reverse().reduce((n,s)=>{var a;return n.breadcrumbs=[...(a=n.breadcrumbs)!=null?a:[],...s.breadcrumbs],n.extra=Ve(Ve({},n.extra),s.extra),n.contexts=Ve(Ve({},n.contexts),s.context),n.tags=Ve(Ve({},n.tags),s.tags),s.user&&(n.user=s.user),s.request&&(n.request=s.request),n},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},nc=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,ac=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ic=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,qt="?",ss="An unknown error occurred",oc="0.0.4";function cc(t){for(let e=0;e<t.length;e++)t[e]=Math.floor(Math.random()*256);return t}function je(t){return(t+256).toString(16).substring(1)}function lc(){let t=cc(new Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,je(t[0])+je(t[1])+je(t[2])+je(t[3])+"-"+je(t[4])+je(t[5])+"-"+je(t[6])+je(t[7])+"-"+je(t[8])+je(t[9])+"-"+je(t[10])+je(t[11])+je(t[12])+je(t[13])+je(t[14])+je(t[15])}var uc=[[nc,"chrome"],[ac,"winjs"],[sc,"gecko"]];function dc(t){var e,r,n,s;if(!t.stack)return null;let a=[],i=(n=(r=(e=t.stack).split)==null?void 0:r.call(e,`
|
|
81
|
-
`))!=null?n:[];for(let o=0;o<i.length;++o){let c=null,l=null,h=null;for(let[f,p]of uc)if(l=f.exec(i[o]),l){h=p;break}if(!(!l||!h)){if(h==="chrome")c={filename:(s=l[2])!=null&&s.startsWith("address at ")?l[2].substring(11):l[2],function:l[1]||qt,lineno:l[3]?+l[3]:null,colno:l[4]?+l[4]:null};else if(h==="winjs")c={filename:l[2],function:l[1]||qt,lineno:+l[3],colno:l[4]?+l[4]:null};else if(h==="gecko")o===0&&!l[5]&&t.columnNumber!==void 0&&a.length>0&&(a[0].column=t.columnNumber+1),c={filename:l[3],function:l[1]||qt,lineno:l[4]?+l[4]:null,colno:l[5]?+l[5]:null};else continue;!c.function&&c.lineno&&(c.function=qt),a.push(c)}}return a.length?a.reverse():null}function fc(t){let e=dc(t);return{type:t.name,value:t.message,stacktrace:{frames:e??[]}}}function hc(t){let e=ic.exec(t),r=e?e.slice(1):[];if(r.length!==6)throw new Error("Invalid DSN");let n=r[5].split("/"),s=n.slice(0,-1).join("/");return r[0]+"://"+r[3]+(r[4]?":"+r[4]:"")+(s?"/"+s:"")+"/api/"+n.pop()+"/envelope/?sentry_version=7&sentry_key="+r[1]+(r[2]?"&sentry_secret="+r[2]:"")}function pc(t,e,r){var n,s;let a=Ve({event_id:lc().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:oc},environment:e,release:r,timestamp:Date.now()/1e3},t.scope.toBody());if(t.type==="exception"){a.message=(s=(n=t.error)==null?void 0:n.message)!=null?s:"Unknown error",a.fingerprint=[a.message];let i=[],o=t.error;for(let c=0;c<5&&o&&(i.push(fc(o)),!(!o.cause||!(o.cause instanceof Error)));c++)o=o.cause;a.exception={values:i.reverse()}}return t.type==="message"&&(a.message=t.message,a.level=t.level),a}function mc(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(typeof t=="object"&&t!==null&&!Array.isArray(t)){let r=t,{message:n}=r,s=Yo(r,["message"]),a=new Error(typeof n=="string"?n:
|
|
79
|
+
*/var _r,Kn;function Eo(){if(Kn)return _r;Kn=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var c=Object.getOwnPropertyNames(i).map(function(h){return i[h]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(h){l[h]=h}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return _r=s()?Object.assign:function(a,i){for(var o,c=n(a),l,h=1;h<arguments.length;h++){o=Object(arguments[h]);for(var f in o)e.call(o,f)&&(c[f]=o[f]);if(t){l=t(o);for(var p=0;p<l.length;p++)r.call(o,l[p])&&(c[l[p]]=o[l[p]])}}return c},_r}var wr,Jn;function nn(){if(Jn)return wr;Jn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wr=t,wr}var kr,Xn;function Bs(){return Xn||(Xn=1,kr=Function.call.bind(Object.prototype.hasOwnProperty)),kr}var Sr,Qn;function Ro(){if(Qn)return Sr;Qn=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=nn(),r={},n=Bs();t=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,c,l){if(process.env.NODE_ENV!=="production"){for(var h in a)if(n(a,h)){var f;try{if(typeof a[h]!="function"){var p=Error((c||"React class")+": "+o+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=a[h](i,h,c,o,null,e)}catch(x){f=x}if(f&&!(f instanceof Error)&&t((c||"React class")+": type specification of "+o+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var m=l?l():"";t("Failed "+o+" type: "+f.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Sr=s,Sr}var Cr,es;function Oo(){if(es)return Cr;es=1;var t=rn(),e=Eo(),r=nn(),n=Bs(),s=Ro(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Cr=function(o,c){var l=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(_){var R=_&&(l&&_[l]||_[h]);if(typeof R=="function")return R}var p="<<anonymous>>",m={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:C(),arrayOf:U,element:L(),elementType:b(),instanceOf:Z,node:V(),objectOf:se,oneOf:W,oneOfType:ue,shape:N,exact:B};function x(_,R){return _===R?_!==0||1/_===1/R:_!==_&&R!==R}function v(_,R){this.message=_,this.data=R&&typeof R=="object"?R:{},this.stack=""}v.prototype=Error.prototype;function S(_){if(process.env.NODE_ENV!=="production")var R={},G=0;function q(ne,ee,te,ie,oe,ae,Re){if(ie=ie||p,ae=ae||te,Re!==r){if(c){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Fe=ie+":"+te;!R[Fe]&&G<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+ie+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[Fe]=!0,G++)}}return ee[te]==null?ne?ee[te]===null?new v("The "+oe+" `"+ae+"` is marked as required "+("in `"+ie+"`, but its value is `null`.")):new v("The "+oe+" `"+ae+"` is marked as required in "+("`"+ie+"`, but its value is `undefined`.")):null:_(ee,te,ie,oe,ae)}var K=q.bind(null,!1);return K.isRequired=q.bind(null,!0),K}function k(_){function R(G,q,K,ne,ee,te){var ie=G[q],oe=de(ie);if(oe!==_){var ae=xe(ie);return new v("Invalid "+ne+" `"+ee+"` of type "+("`"+ae+"` supplied to `"+K+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return S(R)}function C(){return S(i)}function U(_){function R(G,q,K,ne,ee){if(typeof _!="function")return new v("Property `"+ee+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var te=G[q];if(!Array.isArray(te)){var ie=de(te);return new v("Invalid "+ne+" `"+ee+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected an array."))}for(var oe=0;oe<te.length;oe++){var ae=_(te,oe,K,ne,ee+"["+oe+"]",r);if(ae instanceof Error)return ae}return null}return S(R)}function L(){function _(R,G,q,K,ne){var ee=R[G];if(!o(ee)){var te=de(ee);return new v("Invalid "+K+" `"+ne+"` of type "+("`"+te+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return S(_)}function b(){function _(R,G,q,K,ne){var ee=R[G];if(!t.isValidElementType(ee)){var te=de(ee);return new v("Invalid "+K+" `"+ne+"` of type "+("`"+te+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return S(_)}function Z(_){function R(G,q,K,ne,ee){if(!(G[q]instanceof _)){var te=_.name||p,ie=Ee(G[q]);return new v("Invalid "+ne+" `"+ee+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected ")+("instance of `"+te+"`."))}return null}return S(R)}function W(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function R(G,q,K,ne,ee){for(var te=G[q],ie=0;ie<_.length;ie++)if(x(te,_[ie]))return null;var oe=JSON.stringify(_,function(Re,T){var Fe=xe(T);return Fe==="symbol"?String(T):T});return new v("Invalid "+ne+" `"+ee+"` of value `"+String(te)+"` "+("supplied to `"+K+"`, expected one of "+oe+"."))}return S(R)}function se(_){function R(G,q,K,ne,ee){if(typeof _!="function")return new v("Property `"+ee+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var te=G[q],ie=de(te);if(ie!=="object")return new v("Invalid "+ne+" `"+ee+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected an object."));for(var oe in te)if(n(te,oe)){var ae=_(te,oe,K,ne,ee+"."+oe,r);if(ae instanceof Error)return ae}return null}return S(R)}function ue(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var R=0;R<_.length;R++){var G=_[R];if(typeof G!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+we(G)+" at index "+R+"."),i}function q(K,ne,ee,te,ie){for(var oe=[],ae=0;ae<_.length;ae++){var Re=_[ae],T=Re(K,ne,ee,te,ie,r);if(T==null)return null;T.data&&n(T.data,"expectedType")&&oe.push(T.data.expectedType)}var Fe=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new v("Invalid "+te+" `"+ie+"` supplied to "+("`"+ee+"`"+Fe+"."))}return S(q)}function V(){function _(R,G,q,K,ne){return Q(R[G])?null:new v("Invalid "+K+" `"+ne+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return S(_)}function z(_,R,G,q,K){return new v((_||"React class")+": "+R+" type `"+G+"."+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function N(_){function R(G,q,K,ne,ee){var te=G[q],ie=de(te);if(ie!=="object")return new v("Invalid "+ne+" `"+ee+"` of type `"+ie+"` "+("supplied to `"+K+"`, expected `object`."));for(var oe in _){var ae=_[oe];if(typeof ae!="function")return z(K,ne,ee,oe,xe(ae));var Re=ae(te,oe,K,ne,ee+"."+oe,r);if(Re)return Re}return null}return S(R)}function B(_){function R(G,q,K,ne,ee){var te=G[q],ie=de(te);if(ie!=="object")return new v("Invalid "+ne+" `"+ee+"` of type `"+ie+"` "+("supplied to `"+K+"`, expected `object`."));var oe=e({},G[q],_);for(var ae in oe){var Re=_[ae];if(n(_,ae)&&typeof Re!="function")return z(K,ne,ee,ae,xe(Re));if(!Re)return new v("Invalid "+ne+" `"+ee+"` key `"+ae+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(G[q],null," ")+`
|
|
80
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var T=Re(te,ae,K,ne,ee+"."+ae,r);if(T)return T}return null}return S(R)}function Q(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(Q);if(_===null||o(_))return!0;var R=f(_);if(R){var G=R.call(_),q;if(R!==_.entries){for(;!(q=G.next()).done;)if(!Q(q.value))return!1}else for(;!(q=G.next()).done;){var K=q.value;if(K&&!Q(K[1]))return!1}}else return!1;return!0;default:return!1}}function ye(_,R){return _==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function de(_){var R=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":ye(R,_)?"symbol":R}function xe(_){if(typeof _>"u"||_===null)return""+_;var R=de(_);if(R==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return R}function we(_){var R=xe(_);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function Ee(_){return!_.constructor||!_.constructor.name?p:_.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},Cr}var Er,ts;function jo(){if(ts)return Er;ts=1;var t=nn();function e(){}function r(){}return r.resetWarningCache=e,Er=function(){function n(i,o,c,l,h,f){if(f!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Er}var rs;function No(){if(rs)return Bt.exports;if(rs=1,process.env.NODE_ENV!=="production"){var t=rn(),e=!0;Bt.exports=Oo()(t.isElement,e)}else Bt.exports=jo()();return Bt.exports}var Ao=No();const Ie=zs(Ao);var To=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Dr(){return Dr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dr.apply(this,arguments)}function Po(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,a;for(a=0;a<n.length;a++)s=n[a],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Wt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Io(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ur(t,e)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Ur(t,e)}var hr=(function(t){Io(e,t);function e(){var n;return n=t.call(this)||this,n.handleExpired=n.handleExpired.bind(Wt(n)),n.handleErrored=n.handleErrored.bind(Wt(n)),n.handleChange=n.handleChange.bind(Wt(n)),n.handleRecaptchaRef=n.handleRecaptchaRef.bind(Wt(n)),n}var r=e.prototype;return r.getCaptchaFunction=function(s){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[s]:this.props.grecaptcha[s]:null},r.getValue=function(){var s=this.getCaptchaFunction("getResponse");return s&&this._widgetId!==void 0?s(this._widgetId):null},r.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},r.execute=function(){var s=this.getCaptchaFunction("execute");if(s&&this._widgetId!==void 0)return s(this._widgetId);this._executeRequested=!0},r.executeAsync=function(){var s=this;return new Promise(function(a,i){s.executionResolve=a,s.executionReject=i,s.execute()})},r.reset=function(){var s=this.getCaptchaFunction("reset");s&&this._widgetId!==void 0&&s(this._widgetId)},r.forceReset=function(){var s=this.getCaptchaFunction("reset");s&&s()},r.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},r.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},r.handleChange=function(s){this.props.onChange&&this.props.onChange(s),this.executionResolve&&(this.executionResolve(s),delete this.executionReject,delete this.executionResolve)},r.explicitRender=function(){var s=this.getCaptchaFunction("render");if(s&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=s(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},r.componentDidMount=function(){this.explicitRender()},r.componentDidUpdate=function(){this.explicitRender()},r.handleRecaptchaRef=function(s){this.captcha=s},r.render=function(){var s=this.props;s.sitekey,s.onChange,s.theme,s.type,s.tabindex,s.onExpired,s.onErrored,s.size,s.stoken,s.grecaptcha,s.badge,s.hl,s.isolated;var a=Po(s,To);return w.createElement("div",Dr({},a,{ref:this.handleRecaptchaRef}))},e})(w.Component);hr.displayName="ReCAPTCHA";hr.propTypes={sitekey:Ie.string.isRequired,onChange:Ie.func,grecaptcha:Ie.object,theme:Ie.oneOf(["dark","light"]),type:Ie.oneOf(["image","audio"]),tabindex:Ie.number,onExpired:Ie.func,onErrored:Ie.func,size:Ie.oneOf(["compact","normal","invisible"]),stoken:Ie.string,hl:Ie.string,badge:Ie.oneOf(["bottomright","bottomleft","inline"]),isolated:Ie.bool};hr.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Rr,ns;function Lo(){if(ns)return Rr;ns=1;var t=rn(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[t.ForwardRef]=n,a[t.Memo]=s;function i(x){return t.isMemo(x)?s:a[x.$$typeof]||e}var o=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(x,v,S){if(typeof v!="string"){if(p){var k=f(v);k&&k!==p&&m(x,k,S)}var C=c(v);l&&(C=C.concat(l(v)));for(var U=i(x),L=i(v),b=0;b<C.length;++b){var Z=C[b];if(!r[Z]&&!(S&&S[Z])&&!(L&&L[Z])&&!(U&&U[Z])){var W=h(v,Z);try{o(x,Z,W)}catch{}}}}return x}return Rr=m,Rr}var Mo=Lo();const Vo=zs(Mo);function zr(){return zr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zr.apply(this,arguments)}function $o(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,a;for(a=0;a<n.length;a++)s=n[a],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Fo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Ze={},Do=0;function Uo(t,e){return e=e||{},function(n){var s=n.displayName||n.name||"Component",a=(function(o){Fo(c,o);function c(h,f){var p;return p=o.call(this,h,f)||this,p.state={},p.__scriptURL="",p}var l=c.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Do++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL=typeof t=="function"?t():t,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(f){var p=this;this.setState(f,function(){return p.props.asyncScriptOnLoad&&p.props.asyncScriptOnLoad(p.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=Ze[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var p in f.observers)f.observers[p](f);delete window[e.callbackName]},l.componentDidMount=function(){var f=this,p=this.setupScriptURL(),m=this.asyncScriptLoaderGetScriptLoaderID(),x=e,v=x.globalName,S=x.callbackName,k=x.scriptId;if(v&&typeof window[v]<"u"&&(Ze[p]={loaded:!0,observers:{}}),Ze[p]){var C=Ze[p];if(C&&(C.loaded||C.errored)){this.asyncScriptLoaderHandleLoad(C);return}C.observers[m]=function(W){return f.asyncScriptLoaderHandleLoad(W)};return}var U={};U[m]=function(W){return f.asyncScriptLoaderHandleLoad(W)},Ze[p]={loaded:!1,observers:U};var L=document.createElement("script");L.src=p,L.async=!0;for(var b in e.attributes)L.setAttribute(b,e.attributes[b]);k&&(L.id=k);var Z=function(se){if(Ze[p]){var ue=Ze[p],V=ue.observers;for(var z in V)se(V[z])&&delete V[z]}};S&&typeof window<"u"&&(window[S]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),L.onload=function(){var W=Ze[p];W&&(W.loaded=!0,Z(function(se){return S?!1:(se(W),!0)}))},L.onerror=function(){var W=Ze[p];W&&(W.errored=!0,Z(function(se){return se(W),!0}))},document.body.appendChild(L)},l.componentWillUnmount=function(){var f=this.__scriptURL;if(e.removeOnUnmount===!0)for(var p=document.getElementsByTagName("script"),m=0;m<p.length;m+=1)p[m].src.indexOf(f)>-1&&p[m].parentNode&&p[m].parentNode.removeChild(p[m]);var x=Ze[f];x&&(delete x.observers[this.asyncScriptLoaderGetScriptLoaderID()],e.removeOnUnmount===!0&&delete Ze[f])},l.render=function(){var f=e.globalName,p=this.props;p.asyncScriptOnLoad;var m=p.forwardedRef,x=$o(p,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(x[f]=typeof window[f]<"u"?window[f]:void 0),x.ref=m,I.createElement(n,x)},c})(I.Component),i=I.forwardRef(function(o,c){return I.createElement(a,zr({},o,{forwardedRef:c}))});return i.displayName="AsyncScriptLoader("+s+")",i.propTypes={asyncScriptOnLoad:Ie.func},Vo(i,n)}}var Br="onloadcallback",zo="grecaptcha";function Zr(){return typeof window<"u"&&window.recaptchaOptions||{}}function Bo(){var t=Zr(),e=t.useRecaptchaNet?"recaptcha.net":"www.google.com";return t.enterprise?"https://"+e+"/recaptcha/enterprise.js?onload="+Br+"&render=explicit":"https://"+e+"/recaptcha/api.js?onload="+Br+"&render=explicit"}const Zo=Uo(Bo,{callbackName:Br,globalName:zo,attributes:Zr().nonce?{nonce:Zr().nonce}:{}})(hr);function De(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wr(t,e){return Wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Wr(t,e)}function Wo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wr(t,e)}var qo=Object.defineProperty,Go=Object.defineProperties,Ho=Object.getOwnPropertyDescriptors,cr=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Ws=Object.prototype.propertyIsEnumerable,qr=(t,e,r)=>e in t?qo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ve=(t,e)=>{for(var r in e||(e={}))Zs.call(e,r)&&qr(t,r,e[r]);if(cr)for(var r of cr(e))Ws.call(e,r)&&qr(t,r,e[r]);return t},qs=(t,e)=>Go(t,Ho(e)),Yo=(t,e)=>{var r={};for(var n in t)Zs.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&cr)for(var n of cr(t))e.indexOf(n)<0&&Ws.call(t,n)&&(r[n]=t[n]);return r},Oe=(t,e,r)=>(qr(t,typeof e!="symbol"?e+"":e,r),r),Et=(t,e,r)=>new Promise((n,s)=>{var a=c=>{try{o(r.next(c))}catch(l){s(l)}},i=c=>{try{o(r.throw(c))}catch(l){s(l)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,i);o((r=r.apply(t,e)).next())}),Ko="hCaptcha-script",Kt="hCaptchaOnLoad",ss="script-error",at="@hCaptcha/loader";function Jo(t){return Object.entries(t).filter(([,e])=>e||e===!1).map(([e,r])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`).join("&")}function Gs(t){let e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function Hs(t){return t||document.head}function Xo(t){var e;t.setTag("source",at),t.setTag("url",document.URL),t.setContext("os",{UA:navigator.userAgent}),t.setContext("browser",Ve({},Qo())),t.setContext("device",qs(Ve({},tc()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((e=screen.orientation)==null?void 0:e.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function Qo(){var t,e,r,n,s,a;let i=navigator.userAgent,o,c;return i.indexOf("Firefox")!==-1?(o="Firefox",c=(t=i.match(/Firefox\/([\d.]+)/))==null?void 0:t[1]):i.indexOf("Edg")!==-1?(o="Microsoft Edge",c=(e=i.match(/Edg\/([\d.]+)/))==null?void 0:e[1]):i.indexOf("Chrome")!==-1&&i.indexOf("Safari")!==-1?(o="Chrome",c=(r=i.match(/Chrome\/([\d.]+)/))==null?void 0:r[1]):i.indexOf("Safari")!==-1&&i.indexOf("Chrome")===-1?(o="Safari",c=(n=i.match(/Version\/([\d.]+)/))==null?void 0:n[1]):i.indexOf("Opera")!==-1||i.indexOf("OPR")!==-1?(o="Opera",c=(s=i.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:s[2]):i.indexOf("MSIE")!==-1||i.indexOf("Trident")!==-1?(o="Internet Explorer",c=(a=i.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:a[2]):(o="Unknown",c="Unknown"),{name:o,version:c}}function ec(t){return new Promise(e=>setTimeout(e,t))}function tc(){let t=navigator.userAgent,e;t.indexOf("Win")!==-1?e="Windows":t.indexOf("Mac")!==-1?e="Mac":t.indexOf("Linux")!==-1?e="Linux":t.indexOf("Android")!==-1?e="Android":t.indexOf("like Mac")!==-1||t.indexOf("iPhone")!==-1||t.indexOf("iPad")!==-1?e="iOS":e="Unknown";let r;return/Mobile|iPhone|iPod|Android/i.test(t)?r="Mobile":/Tablet|iPad/i.test(t)?r="Tablet":r="Desktop",{model:e,family:e,device:r}}var rc=class Ys{constructor(e){Oe(this,"_parent"),Oe(this,"breadcrumbs",[]),Oe(this,"context",{}),Oe(this,"extra",{}),Oe(this,"tags",{}),Oe(this,"request"),Oe(this,"user"),this._parent=e}get parent(){return this._parent}child(){return new Ys(this)}setRequest(e){return this.request=e,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(e){return typeof e.timestamp>"u"&&(e.timestamp=new Date().toISOString()),this.breadcrumbs.push(e),this}setExtra(e,r){return this.extra[e]=r,this}removeExtra(e){return delete this.extra[e],this}setContext(e,r){return typeof r.type>"u"&&(r.type=e),this.context[e]=r,this}removeContext(e){return delete this.context[e],this}setTags(e){return this.tags=Ve(Ve({},this.tags),e),this}setTag(e,r){return this.tags[e]=r,this}removeTag(e){return delete this.tags[e],this}setUser(e){return this.user=e,this}removeUser(){return this.user=void 0,this}toBody(){let e=[],r=this;for(;r;)e.push(r),r=r.parent;return e.reverse().reduce((n,s)=>{var a;return n.breadcrumbs=[...(a=n.breadcrumbs)!=null?a:[],...s.breadcrumbs],n.extra=Ve(Ve({},n.extra),s.extra),n.contexts=Ve(Ve({},n.contexts),s.context),n.tags=Ve(Ve({},n.tags),s.tags),s.user&&(n.user=s.user),s.request&&(n.request=s.request),n},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},nc=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,ac=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ic=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,qt="?",as="An unknown error occurred",oc="0.0.4";function cc(t){for(let e=0;e<t.length;e++)t[e]=Math.floor(Math.random()*256);return t}function je(t){return(t+256).toString(16).substring(1)}function lc(){let t=cc(new Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,je(t[0])+je(t[1])+je(t[2])+je(t[3])+"-"+je(t[4])+je(t[5])+"-"+je(t[6])+je(t[7])+"-"+je(t[8])+je(t[9])+"-"+je(t[10])+je(t[11])+je(t[12])+je(t[13])+je(t[14])+je(t[15])}var uc=[[nc,"chrome"],[ac,"winjs"],[sc,"gecko"]];function dc(t){var e,r,n,s;if(!t.stack)return null;let a=[],i=(n=(r=(e=t.stack).split)==null?void 0:r.call(e,`
|
|
81
|
+
`))!=null?n:[];for(let o=0;o<i.length;++o){let c=null,l=null,h=null;for(let[f,p]of uc)if(l=f.exec(i[o]),l){h=p;break}if(!(!l||!h)){if(h==="chrome")c={filename:(s=l[2])!=null&&s.startsWith("address at ")?l[2].substring(11):l[2],function:l[1]||qt,lineno:l[3]?+l[3]:null,colno:l[4]?+l[4]:null};else if(h==="winjs")c={filename:l[2],function:l[1]||qt,lineno:+l[3],colno:l[4]?+l[4]:null};else if(h==="gecko")o===0&&!l[5]&&t.columnNumber!==void 0&&a.length>0&&(a[0].column=t.columnNumber+1),c={filename:l[3],function:l[1]||qt,lineno:l[4]?+l[4]:null,colno:l[5]?+l[5]:null};else continue;!c.function&&c.lineno&&(c.function=qt),a.push(c)}}return a.length?a.reverse():null}function fc(t){let e=dc(t);return{type:t.name,value:t.message,stacktrace:{frames:e??[]}}}function hc(t){let e=ic.exec(t),r=e?e.slice(1):[];if(r.length!==6)throw new Error("Invalid DSN");let n=r[5].split("/"),s=n.slice(0,-1).join("/");return r[0]+"://"+r[3]+(r[4]?":"+r[4]:"")+(s?"/"+s:"")+"/api/"+n.pop()+"/envelope/?sentry_version=7&sentry_key="+r[1]+(r[2]?"&sentry_secret="+r[2]:"")}function pc(t,e,r){var n,s;let a=Ve({event_id:lc().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:oc},environment:e,release:r,timestamp:Date.now()/1e3},t.scope.toBody());if(t.type==="exception"){a.message=(s=(n=t.error)==null?void 0:n.message)!=null?s:"Unknown error",a.fingerprint=[a.message];let i=[],o=t.error;for(let c=0;c<5&&o&&(i.push(fc(o)),!(!o.cause||!(o.cause instanceof Error)));c++)o=o.cause;a.exception={values:i.reverse()}}return t.type==="message"&&(a.message=t.message,a.level=t.level),a}function mc(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(typeof t=="object"&&t!==null&&!Array.isArray(t)){let r=t,{message:n}=r,s=Yo(r,["message"]),a=new Error(typeof n=="string"?n:as);return Object.assign(a,s)}let e=new Error(as);return Object.assign(e,{cause:t})}function yc(t,e,r){return Et(this,null,function*(){var n,s;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let a;if(r){let c=new AbortController;a=c.signal,setTimeout(()=>c.abort(),r)}let i=yield fetch(t,qs(Ve({},e),{signal:a})),o=yield i.text();return{status:i.status,body:o}}return yield new Promise((a,i)=>{var o,c;let l=new XMLHttpRequest;if(l.open((o=e==null?void 0:e.method)!=null?o:"GET",t),l.onload=()=>a({status:l.status,body:l.responseText}),l.onerror=()=>i(new Error("XHR Network Error")),e==null?void 0:e.headers)for(let[h,f]of Object.entries(e.headers))l.setRequestHeader(h,f);if(r){let h=setTimeout(()=>{l.abort(),i(new Error("Request timed out"))},r);l.onloadend=()=>{clearTimeout(h)}}l.send((c=e==null?void 0:e.body)==null?void 0:c.toString())})}catch(a){return{status:0,body:(s=(n=a==null?void 0:a.toString)==null?void 0:n.call(a))!=null?s:"Unknown error"}}})}var Pe,Gr=(Pe=class{constructor(t){Oe(this,"apiURL"),Oe(this,"dsn"),Oe(this,"environment"),Oe(this,"release"),Oe(this,"sampleRate"),Oe(this,"debug"),Oe(this,"_scope"),Oe(this,"shouldBuffer",!1),Oe(this,"bufferlimit",20),Oe(this,"buffer",[]);var e,r,n,s,a;this.environment=t.environment,this.release=t.release,this.sampleRate=(e=t.sampleRate)!=null?e:1,this.debug=(r=t.debug)!=null?r:!1,this._scope=(n=t.scope)!=null?n:new rc,this.apiURL=hc(t.dsn),this.dsn=t.dsn,this.shouldBuffer=(s=t.buffer)!=null?s:!1,this.bufferlimit=(a=t.bufferLimit)!=null?a:20}static init(t){Pe._instance||(Pe._instance=new Pe(t))}static get instance(){if(!Pe._instance)throw new Error("Sentry has not been initialized");return Pe._instance}log(...t){this.debug&&console.log(...t)}get scope(){return this._scope}static get scope(){return Pe.instance.scope}withScope(t){let e=this._scope.child();t(e)}static withScope(t){Pe.instance.withScope(t)}captureException(t,e){this.captureEvent({type:"exception",level:"error",error:mc(t),scope:e??this._scope})}static captureException(t,e){Pe.instance.captureException(t,e)}captureMessage(t,e="info",r){this.captureEvent({type:"message",level:e,message:t,scope:r??this._scope})}static captureMessage(t,e="info",r){Pe.instance.captureMessage(t,e,r)}captureEvent(t){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(t)}else this.sendEvent(t)}sendEvent(t,e=5e3){return Et(this,null,function*(){try{this.log("Sending sentry event",t);let r=pc(t,this.environment,this.release),n={event_id:r.event_id,dsn:this.dsn},s={type:"event"},a=JSON.stringify(n)+`
|
|
82
82
|
`+JSON.stringify(s)+`
|
|
83
|
-
`+JSON.stringify(r),i=yield yc(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:a},e);this.log("Sentry response",i.status),i.status!==200&&(console.log(i.body),console.error("Failed to send event to Sentry",i))}catch(r){console.error("Failed to send event",r)}})}flush(t=5e3){return Et(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let e=this.buffer.splice(0,this.buffer.length).map(r=>this.sendEvent(r,t));yield Promise.all(e),this.log("Flushed all events")}catch(e){console.error("Failed to flush events",e)}})}static flush(t=5e3){return Pe.instance.flush(t)}static reset(){Pe._instance=void 0}},Oe(Pe,"_instance"),Pe),gc="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",vc="2.3.0",xc="production";function bc(t=!0){if(!t)return as();Gr.init({dsn:gc,release:vc,environment:xc});let e=Gr.scope;return Xo(e),as(e)}function as(t=null){return{addBreadcrumb:e=>{t&&t.addBreadcrumb(e)},captureRequest:e=>{t&&t.setRequest(e)},captureException:e=>{t&&Gr.captureException(e,t)}}}function _c({scriptLocation:t,query:e,loadAsync:r=!0,crossOrigin:n="anonymous",apihost:s="https://js.hcaptcha.com",cleanup:a=!1,secureApi:i=!1,scriptSource:o=""}={},c){let l=Gs(t),h=qs(l);return new Promise((f,p)=>{let m=h.document.createElement("script");m.id=Ko,o?m.src=`${o}?onload=${Kt}`:i?m.src=`${s}/1/secure-api.js?onload=${Kt}`:m.src=`${s}/1/api.js?onload=${Kt}`,m.crossOrigin=n,m.async=r;let x=(v,S)=>{try{!i&&a&&l.removeChild(m),S(v)}catch(k){p(k)}};m.onload=v=>x(v,f),m.onerror=v=>{c&&c(m.src),x(v,p)},m.src+=e!==""?`&${e}`:"",l.appendChild(m)})}var Gt=[];function wc(t={cleanup:!1},e){try{e.addBreadcrumb({category:at,message:"hCaptcha loader params",data:t});let r=Gs(t.scriptLocation),n=qs(r),s=Gt.find(({scope:i})=>i===n.window);if(s)return e.addBreadcrumb({category:at,message:"hCaptcha already loaded"}),s.promise;let a=new Promise((i,o)=>Et(this,null,function*(){try{n.window[Kt]=()=>{e.addBreadcrumb({category:at,message:"hCaptcha script called onload function"}),i(n.window.hcaptcha)};let c=Jo({custom:t.custom,render:t.render,sentry:t.sentry,assethost:t.assethost,imghost:t.imghost,reportapi:t.reportapi,endpoint:t.endpoint,host:t.host,recaptchacompat:t.recaptchacompat,hl:t.hl,uj:t.uj});yield _c(Ve({query:c},t),l=>{e.captureRequest({url:l,method:"GET"})}),e.addBreadcrumb({category:at,message:"hCaptcha loaded",data:s})}catch{e.addBreadcrumb({category:at,message:"hCaptcha failed to load"});let l=Gt.findIndex(h=>h.scope===n.window);l!==-1&&Gt.splice(l,1),o(new Error(ns))}}));return Gt.push({promise:a,scope:n.window}),a}catch(r){return e.captureException(r),Promise.reject(new Error(ns))}}function Ys(t,e,r=0){return Et(this,null,function*(){var n,s;let a=(n=t.maxRetries)!=null?n:2,i=(s=t.retryDelay)!=null?s:1e3,o=r<a?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield wc(t,e)}catch(c){return e.addBreadcrumb({category:at,message:o}),r>=a?(e.captureException(c),Promise.reject(c)):(e.addBreadcrumb({category:at,message:`Waiting ${i}ms before retry attempt ${r+1}`}),yield ec(i),r+=1,Ys(t,e,r))}})}function kc(){return Et(this,arguments,function*(t={}){let e=bc(t.sentry);return yield Ys(t,e)})}function is(t){var e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function os(t){return t||document.head}var Sc=(function(t){Wo(e,t);function e(n){var s;return s=t.call(this,n)||this,s._hcaptcha=void 0,s.renderCaptcha=s.renderCaptcha.bind(De(s)),s.resetCaptcha=s.resetCaptcha.bind(De(s)),s.removeCaptcha=s.removeCaptcha.bind(De(s)),s.isReady=s.isReady.bind(De(s)),s._onReady=null,s.loadCaptcha=s.loadCaptcha.bind(De(s)),s.handleOnLoad=s.handleOnLoad.bind(De(s)),s.handleSubmit=s.handleSubmit.bind(De(s)),s.handleExpire=s.handleExpire.bind(De(s)),s.handleError=s.handleError.bind(De(s)),s.handleOpen=s.handleOpen.bind(De(s)),s.handleClose=s.handleClose.bind(De(s)),s.handleChallengeExpired=s.handleChallengeExpired.bind(De(s)),s.ref=w.createRef(),s.apiScriptRequested=!1,s.sentryHub=null,s.captchaId="",s._pendingExecute=null,s.state={isApiReady:!1,isRemoved:!1,elementId:n.id},s}var r=e.prototype;return r.componentDidMount=function(){var s=this,a=os(this.props.scriptLocation),i=is(a);this._hcaptcha=i.window.hcaptcha||void 0;var o=typeof this._hcaptcha<"u";if(o){this.setState({isApiReady:!0},function(){s.renderCaptcha()});return}this.loadCaptcha()},r.componentWillUnmount=function(){var s=this._hcaptcha,a=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(s.reset(a),s.remove(a))},r.shouldComponentUpdate=function(s,a){return!(this.state.isApiReady!==a.isApiReady||this.state.isRemoved!==a.isRemoved)},r.componentDidUpdate=function(s){var a=this,i=["sitekey","size","theme","tabindex","languageOverride","endpoint"],o=i.every(function(c){return s[c]===a.props[c]});o||this.removeCaptcha(function(){a.renderCaptcha()})},r.loadCaptcha=function(){if(!this.apiScriptRequested){var s=this.props,a=s.apihost,i=s.assethost,o=s.endpoint,c=s.host,l=s.imghost,h=s.languageOverride,f=s.reCaptchaCompat,p=s.reportapi,m=s.sentry,x=s.custom,v=s.loadAsync,S=s.scriptLocation,k=s.scriptSource,C=s.secureApi,U=s.cleanup,L=U===void 0?!0:U,b=s.userJourneys,B={render:"explicit",apihost:a,assethost:i,endpoint:o,hl:h,host:c,imghost:l,recaptchacompat:f===!1?"off":null,reportapi:p,sentry:m,custom:x,loadAsync:v,scriptLocation:S,scriptSource:k,secureApi:C,cleanup:L,uj:b!==void 0?b:!1};kc(B).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},r.renderCaptcha=function(s){var a=this,i=this.props.onReady,o=this.state.isApiReady,c=this.captchaId;if(!(!o||c)){var l=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),h=this._hcaptcha,f=h.render(this.ref.current,l);this.captchaId=f,this.setState({isRemoved:!1},function(){s&&s(),i&&i(),a._onReady&&a._onReady(f)})}},r.resetCaptcha=function(){var s=this._hcaptcha,a=this.captchaId;this.isReady()&&(s.reset(a),this._cancelPendingExecute("hcaptcha-reset"))},r.removeCaptcha=function(s){var a=this,i=this._hcaptcha,o=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){a.captchaId="",i.remove(o),s&&s()})},r.handleOnLoad=function(){var s=this;this.setState({isApiReady:!0},function(){var a=os(s.props.scriptLocation),i=is(a);s._hcaptcha=i.window.hcaptcha,s.renderCaptcha(function(){var o=s.props.onLoad;o&&o()})})},r.handleSubmit=function(s){var a=this.props.onVerify,i=this.state.isRemoved,o=this._hcaptcha,c=this.captchaId;if(!(typeof o>"u"||i)){var l=o.getResponse(c),h=o.getRespKey(c);a&&a(l,h)}},r.handleExpire=function(){var s=this.props.onExpire,a=this._hcaptcha,i=this.captchaId;this.isReady()&&(a.reset(i),s&&s())},r.handleError=function(s){var a=this.props.onError,i=this._hcaptcha,o=this.captchaId;this.isReady()&&i.reset(o),a&&a(s)},r.isReady=function(){var s=this.state,a=s.isApiReady,i=s.isRemoved;return a&&!i},r._cancelPendingExecute=function(s){if(this._pendingExecute){var a=this._pendingExecute;this._pendingExecute=null;var i=new Error(s);a.reject(i)}},r.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},r.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},r.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},r.execute=function(s){var a=this;s===void 0&&(s=null),s=typeof s=="object"?s:null;try{var i=this._hcaptcha,o=this.captchaId;if(s&&s.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return s&&s.async?new Promise(function(l,h){a._pendingExecute={resolve:l,reject:h},a._onReady=function(f){if(a._pendingExecute)try{var p=i.execute(f,s);p&&typeof p.then=="function"?p.then(function(m){a._pendingExecute=null,l(m)}).catch(function(m){a._pendingExecute=null,h(m)}):(a._pendingExecute=null,h(new Error("hcaptcha-execute-no-promise")))}catch(m){a._pendingExecute=null,h(m)}}}):(this._onReady=function(l){i.execute(l,s)},null);var c=i.execute(o,s);return s&&s.async&&c&&typeof c.then=="function"?new Promise(function(l,h){a._pendingExecute={resolve:l,reject:h},c.then(function(f){a._pendingExecute=null,l(f)}).catch(function(f){a._pendingExecute=null,h(f)})}):c}catch(l){return s&&s.async?Promise.reject(l):null}},r.close=function(){var s=this._hcaptcha,a=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return s.close(a)},r.setData=function(s){var a=this._hcaptcha,i=this.captchaId;this.isReady()&&(s&&typeof s!="object"&&(s=null),a.setData(i,s))},r.getResponse=function(){var s=this._hcaptcha;return s.getResponse(this.captchaId)},r.getRespKey=function(){var s=this._hcaptcha;return s.getRespKey(this.captchaId)},r.render=function(){var s=this.state.elementId;return w.createElement("div",{ref:this.ref,id:s})},e})(w.Component);const Ft=I.forwardRef(({config:t,onVerify:e,onExpire:r},n)=>{const s=I.useRef(null),a=I.useRef(null);return I.useImperativeHandle(n,()=>({reset(){var i,o;(i=s.current)==null||i.reset(),(o=a.current)==null||o.resetCaptcha()}})),!t.enabled||!t.siteKey?null:t.provider==="hcaptcha"?u.jsx(Sc,{ref:a,sitekey:t.siteKey,onVerify:e,onExpire:r}):t.version!=="v3"?u.jsx(Zo,{ref:s,sitekey:t.siteKey,onChange:i=>e(i??""),onExpired:r}):null});Ft.displayName="CaptchaWidget";function cs(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function sn(...t){return e=>{let r=!1;const n=t.map(s=>{const a=cs(s,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():cs(t[s],null)}}}}function an(...t){return w.useCallback(sn(...t),t)}var Cc=Symbol.for("react.lazy"),lr=w[" use ".trim().toString()];function Ec(t){return typeof t=="object"&&t!==null&&"then"in t}function Ks(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Cc&&"_payload"in t&&Ec(t._payload)}function Js(t){const e=Oc(t),r=w.forwardRef((n,s)=>{let{children:a,...i}=n;Ks(a)&&typeof lr=="function"&&(a=lr(a._payload));const o=w.Children.toArray(a),c=o.find(Nc);if(c){const l=c.props.children,h=o.map(f=>f===c?w.Children.count(l)>1?w.Children.only(null):w.isValidElement(l)?l.props.children:null:f);return u.jsx(e,{...i,ref:s,children:w.isValidElement(l)?w.cloneElement(l,void 0,h):null})}return u.jsx(e,{...i,ref:s,children:a})});return r.displayName=`${t}.Slot`,r}var Rc=Js("Slot");function Oc(t){const e=w.forwardRef((r,n)=>{let{children:s,...a}=r;if(Ks(s)&&typeof lr=="function"&&(s=lr(s._payload)),w.isValidElement(s)){const i=Tc(s),o=Ac(a,s.props);return s.type!==w.Fragment&&(o.ref=n?sn(n,i):i),w.cloneElement(s,o)}return w.Children.count(s)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var jc=Symbol("radix.slottable");function Nc(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jc}function Ac(t,e){const r={...e};for(const n in e){const s=t[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...t,...r}}function Tc(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const ls=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,us=Ls,Xs=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return us(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:a}=e,i=Object.keys(s).map(l=>{const h=r==null?void 0:r[l],f=a==null?void 0:a[l];if(h===null)return null;const p=ls(h)||ls(f);return s[l][p]}),o=r&&Object.entries(r).reduce((l,h)=>{let[f,p]=h;return p===void 0||(l[f]=p),l},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((l,h)=>{let{class:f,className:p,...m}=h;return Object.entries(m).every(x=>{let[v,S]=x;return Array.isArray(S)?S.includes({...a,...o}[v]):{...a,...o}[v]===S})?[...l,f,p]:l},[]);return us(t,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},Pc=Xs("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),dt=w.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},a)=>{const i=n?Rc:"button";return u.jsx(i,{className:me(Pc({variant:e,size:r,className:t})),ref:a,...s})});dt.displayName="Button";const qe=w.forwardRef(({className:t,type:e,...r},n)=>u.jsx("input",{type:e,className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...r}));qe.displayName="Input";var Ic=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ut=Ic.reduce((t,e)=>{const r=Js(`Primitive.${e}`),n=w.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...o,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),Lc="Label",Qs=w.forwardRef((t,e)=>u.jsx(Ut.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Qs.displayName=Lc;var ea=Qs;const Mc=Xs("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ue=w.forwardRef(({className:t,...e},r)=>u.jsx(ea,{ref:r,className:me(Mc(),t),...e}));Ue.displayName=ea.displayName;const ze=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));ze.displayName="Card";const ta=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("flex flex-col space-y-1.5 p-6",t),...e}));ta.displayName="CardHeader";const ra=w.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:me("text-2xl font-semibold leading-none tracking-tight",t),...e}));ra.displayName="CardTitle";const na=w.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:me("text-sm text-muted-foreground",t),...e}));na.displayName="CardDescription";const Jt=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("p-6 pt-0",t),...e}));Jt.displayName="CardContent";const Vc=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("flex items-center p-6 pt-0",t),...e}));Vc.displayName="CardFooter";function $c(t,e=[]){let r=[];function n(a,i){const o=w.createContext(i),c=r.length;r=[...r,i];const l=f=>{var k;const{scope:p,children:m,...x}=f,v=((k=p==null?void 0:p[t])==null?void 0:k[c])||o,S=w.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:S,children:m})};l.displayName=a+"Provider";function h(f,p){var v;const m=((v=p==null?void 0:p[t])==null?void 0:v[c])||o,x=w.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,h]}const s=()=>{const a=r.map(i=>w.createContext(i));return function(o){const c=(o==null?void 0:o[t])||a;return w.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[n,Fc(s,...e)]}function Fc(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=n.reduce((o,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...o,...f}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function ds(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}var yt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Dc=w[" useInsertionEffect ".trim().toString()]||yt;function Uc({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,a,i]=zc({defaultProp:e,onChange:r}),o=t!==void 0,c=o?t:s;{const h=w.useRef(t!==void 0);w.useEffect(()=>{const f=h.current;f!==o&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=o},[o,n])}const l=w.useCallback(h=>{var f;if(o){const p=Bc(h)?h(t):h;p!==t&&((f=i.current)==null||f.call(i,p))}else a(h)},[o,t,a,i]);return[c,l]}function zc({defaultProp:t,onChange:e}){const[r,n]=w.useState(t),s=w.useRef(r),a=w.useRef(e);return Dc(()=>{a.current=e},[e]),w.useEffect(()=>{var i;s.current!==r&&((i=a.current)==null||i.call(a,r),s.current=r)},[r,s]),[r,n,a]}function Bc(t){return typeof t=="function"}function Zc(t){const e=w.useRef({value:t,previous:t});return w.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function Wc(t){const[e,r]=w.useState(void 0);return yt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,o;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,o=l.blockSize}else i=t.offsetWidth,o=t.offsetHeight;r({width:i,height:o})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function qc(t,e){return w.useReducer((r,n)=>e[r][n]??r,t)}var sa=t=>{const{present:e,children:r}=t,n=Gc(e),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=an(n.ref,Hc(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:a}):null};sa.displayName="Presence";function Gc(t){const[e,r]=w.useState(),n=w.useRef(null),s=w.useRef(t),a=w.useRef("none"),i=t?"mounted":"unmounted",[o,c]=qc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Ht(n.current);a.current=o==="mounted"?l:"none"},[o]),yt(()=>{const l=n.current,h=s.current;if(h!==t){const p=a.current,m=Ht(l);t?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&p!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),yt(()=>{if(e){let l;const h=e.ownerDocument.defaultView??window,f=m=>{const v=Ht(n.current).includes(CSS.escape(m.animationName));if(m.target===e&&v&&(c("ANIMATION_END"),!s.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",l=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},p=m=>{m.target===e&&(a.current=Ht(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{h.clearTimeout(l),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:w.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function Ht(t){return(t==null?void 0:t.animationName)||"none"}function Hc(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Yc(t){const e=Kc(t),r=w.forwardRef((n,s)=>{const{children:a,...i}=n,o=w.Children.toArray(a),c=o.find(Xc);if(c){const l=c.props.children,h=o.map(f=>f===c?w.Children.count(l)>1?w.Children.only(null):w.isValidElement(l)?l.props.children:null:f);return u.jsx(e,{...i,ref:s,children:w.isValidElement(l)?w.cloneElement(l,void 0,h):null})}return u.jsx(e,{...i,ref:s,children:a})});return r.displayName=`${t}.Slot`,r}function Kc(t){const e=w.forwardRef((r,n)=>{const{children:s,...a}=r;if(w.isValidElement(s)){const i=el(s),o=Qc(a,s.props);return s.type!==w.Fragment&&(o.ref=n?sn(n,i):i),w.cloneElement(s,o)}return w.Children.count(s)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Jc=Symbol("radix.slottable");function Xc(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Jc}function Qc(t,e){const r={...e};for(const n in e){const s=t[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...t,...r}}function el(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],on=tl.reduce((t,e)=>{const r=Yc(`Primitive.${e}`),n=w.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...o,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),pr="Checkbox",[rl]=$c(pr),[nl,cn]=rl(pr);function sl(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:s,disabled:a,form:i,name:o,onCheckedChange:c,required:l,value:h="on",internal_do_not_use_render:f}=t,[p,m]=Uc({prop:r,defaultProp:s??!1,onChange:c,caller:pr}),[x,v]=w.useState(null),[S,k]=w.useState(null),C=w.useRef(!1),U=x?!!i||!!x.closest("form"):!0,L={checked:p,disabled:a,setChecked:m,control:x,setControl:v,name:o,form:i,value:h,hasConsumerStoppedPropagationRef:C,required:l,defaultChecked:ct(s)?!1:s,isFormControl:U,bubbleInput:S,setBubbleInput:k};return u.jsx(nl,{scope:e,...L,children:al(f)?f(L):n})}var aa="CheckboxTrigger",ia=w.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:r,...n},s)=>{const{control:a,value:i,disabled:o,checked:c,required:l,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:x}=cn(aa,t),v=an(s,h),S=w.useRef(c);return w.useEffect(()=>{const k=a==null?void 0:a.form;if(k){const C=()=>f(S.current);return k.addEventListener("reset",C),()=>k.removeEventListener("reset",C)}},[a,f]),u.jsx(on.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":l,"data-state":da(c),"data-disabled":o?"":void 0,disabled:o,value:i,...n,ref:v,onKeyDown:ds(e,k=>{k.key==="Enter"&&k.preventDefault()}),onClick:ds(r,k=>{f(C=>ct(C)?!0:!C),x&&m&&(p.current=k.isPropagationStopped(),p.current||k.stopPropagation())})})});ia.displayName=aa;var ln=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:a,required:i,disabled:o,value:c,onCheckedChange:l,form:h,...f}=t;return u.jsx(sl,{__scopeCheckbox:r,checked:s,defaultChecked:a,disabled:o,required:i,onCheckedChange:l,name:n,form:h,value:c,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(ia,{...f,ref:e,__scopeCheckbox:r}),p&&u.jsx(ua,{__scopeCheckbox:r})]})})});ln.displayName=pr;var oa="CheckboxIndicator",ca=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,a=cn(oa,r);return u.jsx(sa,{present:n||ct(a.checked)||a.checked===!0,children:u.jsx(on.span,{"data-state":da(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});ca.displayName=oa;var la="CheckboxBubbleInput",ua=w.forwardRef(({__scopeCheckbox:t,...e},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:a,defaultChecked:i,required:o,disabled:c,name:l,value:h,form:f,bubbleInput:p,setBubbleInput:m}=cn(la,t),x=an(r,m),v=Zc(a),S=Wc(n);w.useEffect(()=>{const C=p;if(!C)return;const U=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(U,"checked").set,B=!s.current;if(v!==a&&b){const W=new Event("click",{bubbles:B});C.indeterminate=ct(a),b.call(C,ct(a)?!1:a),C.dispatchEvent(W)}},[p,v,a,s]);const k=w.useRef(ct(a)?!1:a);return u.jsx(on.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??k.current,required:o,disabled:c,name:l,value:h,form:f,...e,tabIndex:-1,ref:x,style:{...e.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ua.displayName=la;function al(t){return typeof t=="function"}function ct(t){return t==="indeterminate"}function da(t){return ct(t)?"indeterminate":t?"checked":"unchecked"}const fa=w.forwardRef(({className:t,...e},r)=>u.jsx(ln,{ref:r,className:me("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:u.jsx(ca,{className:"flex items-center justify-center text-current",children:u.jsx($i,{className:"h-3.5 w-3.5"})})}));fa.displayName=ln.displayName;var il="Separator",fs="horizontal",ol=["horizontal","vertical"],ha=w.forwardRef((t,e)=>{const{decorative:r,orientation:n=fs,...s}=t,a=cl(n)?n:fs,o=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(Ut.div,{"data-orientation":a,...o,...s,ref:e})});ha.displayName=il;function cl(t){return ol.includes(t)}var pa=ha;const Rt=w.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},s)=>u.jsx(pa,{ref:s,decorative:r,orientation:e,className:me("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));Rt.displayName=pa.displayName;const ll=fr({email:Je().email("Enter a valid email address"),password:Je().min(6,"Password must be at least 6 characters")}),ul=fr({email:Je().email("Enter a valid email address")});function dl(){return u.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{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",fill:"#4285F4"}),u.jsx("path",{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",fill:"#34A853"}),u.jsx("path",{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",fill:"#FBBC05"}),u.jsx("path",{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",fill:"#EA4335"})]})}function fl({provider:t}){return t==="google"?u.jsx(dl,{}):t==="github"?u.jsx(Di,{className:"h-4 w-4"}):null}function hl({provider:t}){const e=t.label??t.provider.charAt(0).toUpperCase()+t.provider.slice(1);return u.jsx("a",{href:t.url,children:u.jsxs(dt,{type:"button",variant:"outline",className:"w-full gap-2 rounded-full",children:[u.jsx(fl,{provider:t.provider}),e]})})}function pl({mode:t,onChange:e}){return u.jsx("div",{className:"flex rounded-lg bg-muted p-1 text-sm font-medium",children:["password","magic-link"].map(r=>u.jsx("button",{type:"button",onClick:()=>e(r),className:me("flex-1 rounded-md px-3 py-1.5 transition-all",t===r?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r==="password"?"Password":"Magic Link"},r))})}function ml(){return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsx("div",{className:"h-6 w-3/4 animate-pulse rounded bg-muted mx-auto"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"})]})}function yl({className:t,onSuccess:e,onError:r,forgotPasswordUrl:n,signupUrl:s,title:a="Sign in to your account"}){var xe,we,Ee;const{login:i,sendMagicLink:o}=Ot(),{config:c,configLoading:l}=ur(),[h,f]=I.useState("password"),[p,m]=I.useState(""),[x,v]=I.useState(null),[S,k]=I.useState(null),[C,U]=I.useState(!1),[L,b]=I.useState(!1),B=I.useRef(null),W=er({resolver:tr(ll)}),ae=er({resolver:tr(ul)});async function $(){return c!=null&&c.captcha.enabled?c.captcha.provider==="recaptcha"&&c.captcha.version==="v3"&&c.captcha.siteKey?Hr(c.captcha.siteKey,"login"):p||(v("Please complete the captcha"),null):""}function z(){var _;(_=B.current)==null||_.reset(),m(""),v(null)}const ee=W.handleSubmit(async _=>{k(null);const R=await $();if(R!==null)try{await i({email:_.email,password:_.password,captchaToken:R,rememberMe:L}),z(),e==null||e({})}catch(G){z();const q=G instanceof Error?G:new Error("Login failed");k(q.message),r==null||r(q)}}),T=ae.handleSubmit(async _=>{k(null);const R=await $();if(R!==null)try{await o({email:_.email,captchaToken:R}),z(),U(!0)}catch(G){z();const q=G instanceof Error?G:new Error("Failed to send magic link");k(q.message),r==null||r(q)}});if(C)return u.jsxs(ze,{className:me("w-full max-w-sm p-8 text-center space-y-3",t),children:[u.jsx("div",{className:"text-4xl",children:"✉️"}),u.jsx("p",{className:"font-semibold",children:"Check your inbox"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a sign-in link to"," ",u.jsx("span",{className:"font-medium text-foreground",children:ae.getValues("email")})]}),u.jsx("button",{type:"button",onClick:()=>U(!1),className:"text-sm text-primary underline-offset-4 hover:underline",children:"Use a different email"})]});if(l)return u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(ml,{})});const Z=W.formState.isSubmitting,J=ae.formState.isSubmitting,ve=Z||J,de=(((xe=c==null?void 0:c.oauthProviders)==null?void 0:xe.length)??0)>0;return u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"p-6 space-y-5",children:[(c==null?void 0:c.logoUrl)&&u.jsx("img",{src:c.logoUrl,alt:"Logo",className:"mx-auto h-8 object-contain"}),u.jsx("h1",{className:"text-center text-xl font-bold tracking-tight",children:a}),de&&u.jsx("div",{className:me("grid gap-2",(((we=c==null?void 0:c.oauthProviders)==null?void 0:we.length)??0)===1?"grid-cols-1":"grid-cols-2"),children:(Ee=c==null?void 0:c.oauthProviders)==null?void 0:Ee.map(_=>u.jsx(hl,{provider:_},_.provider))}),de&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Rt,{className:"flex-1"}),u.jsx("span",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground",children:"Or continue with email"}),u.jsx(Rt,{className:"flex-1"})]}),(c==null?void 0:c.allowMagicLink)&&u.jsx(pl,{mode:h,onChange:_=>{f(_),k(null),z()}}),h==="password"&&u.jsxs("form",{onSubmit:ee,noValidate:!0,className:"space-y-4",children:[S&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:S}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"login-email",children:"Email"}),u.jsx(qe,{id:"login-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...W.register("email")}),W.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:W.formState.errors.email.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Ue,{htmlFor:"login-password",children:"Password"}),n&&u.jsx("a",{href:n,className:"text-xs text-muted-foreground underline-offset-4 hover:underline",children:"Forgot password?"})]}),u.jsx(qe,{id:"login-password",type:"password",placeholder:"••••••••",autoComplete:"current-password",...W.register("password")}),W.formState.errors.password&&u.jsx("p",{className:"text-xs text-destructive",children:W.formState.errors.password.message})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(fa,{id:"remember-me",checked:L,onCheckedChange:_=>b(!!_)}),u.jsx(Ue,{htmlFor:"remember-me",className:"text-sm font-normal cursor-pointer",children:"Remember me"})]}),(c==null?void 0:c.captcha.enabled)&&c.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:B,config:c.captcha,onVerify:_=>{m(_),v(null)},onExpire:()=>m("")}),x&&u.jsx("p",{className:"text-xs text-destructive",children:x})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:ve,children:[Z&&u.jsx(or,{className:"animate-spin"}),Z?"Signing in…":"Sign in"]})]}),h==="magic-link"&&u.jsxs("form",{onSubmit:T,noValidate:!0,className:"space-y-4",children:[S&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:S}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"magic-email",children:"Email"}),u.jsx(qe,{id:"magic-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...ae.register("email")}),ae.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:ae.formState.errors.email.message})]}),(c==null?void 0:c.captcha.enabled)&&c.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:B,config:c.captcha,onVerify:_=>{m(_),v(null)},onExpire:()=>m("")}),x&&u.jsx("p",{className:"text-xs text-destructive",children:x})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:ve,children:[J&&u.jsx(or,{className:"animate-spin"}),J?"Sending…":"Send Magic Link"]})]}),((c==null?void 0:c.termsOfServiceUrl)||(c==null?void 0:c.privacyPolicyUrl))&&u.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["By continuing, you agree to our"," ",c.termsOfServiceUrl&&u.jsx("a",{href:c.termsOfServiceUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Terms of Service"}),c.termsOfServiceUrl&&c.privacyPolicyUrl&&" and ",c.privacyPolicyUrl&&u.jsx("a",{href:c.privacyPolicyUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Privacy Policy"}),"."]}),(c==null?void 0:c.allowSignup)&&s&&u.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",u.jsx("a",{href:s,className:"font-medium text-primary underline-offset-4 hover:underline",children:"Sign up"})]})]})})}const gl=fr({firstName:Je().min(1,"First name is required"),lastName:Je().min(1,"Last name is required"),email:Je().email("Enter a valid email address"),password:Je().min(8,"Password must be at least 8 characters").regex(/[A-Z]/,"Must contain an uppercase letter").regex(/[0-9]/,"Must contain a number"),confirmPassword:Je(),whatsappNumber:Je().regex(/^\+?[1-9]\d{6,14}$/,"Enter a valid WhatsApp number").optional().or(Ii(""))}).refine(t=>t.password===t.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function vl(){return u.jsx("div",{className:"space-y-4 p-6",children:[...Array(5)].map((t,e)=>u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"},e))})}function xl({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Create an account"}){const{signup:a}=Ot(),{config:i,configLoading:o}=ur(),[c,l]=I.useState(""),[h,f]=I.useState(null),[p,m]=I.useState(null),x=I.useRef(null),{register:v,handleSubmit:S,formState:{errors:k,isSubmitting:C}}=er({resolver:tr(gl)});async function U(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Hr(i.captcha.siteKey,"signup"):c||(f("Please complete the captcha"),null):""}function L(){var B;(B=x.current)==null||B.reset(),l(""),f(null)}const b=S(async B=>{m(null);const W=await U();if(W!==null)try{await a({firstName:B.firstName,lastName:B.lastName,email:B.email,password:B.password,whatsappNumber:B.whatsappNumber||void 0,captchaToken:W}),L(),e==null||e({})}catch(ae){L();const $=ae instanceof Error?ae:new Error("Signup failed");m($.message),r==null||r($)}});return o?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(vl,{})}):u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"p-6 space-y-5",children:[(i==null?void 0:i.logoUrl)&&u.jsx("img",{src:i.logoUrl,alt:"Logo",className:"mx-auto h-8 object-contain"}),u.jsx("h1",{className:"text-center text-xl font-bold tracking-tight",children:s}),u.jsxs("form",{onSubmit:b,noValidate:!0,className:"space-y-4",children:[p&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-first",children:"First name"}),u.jsx(qe,{id:"signup-first",placeholder:"John",autoComplete:"given-name",...v("firstName")}),k.firstName&&u.jsx("p",{className:"text-xs text-destructive",children:k.firstName.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-last",children:"Last name"}),u.jsx(qe,{id:"signup-last",placeholder:"Doe",autoComplete:"family-name",...v("lastName")}),k.lastName&&u.jsx("p",{className:"text-xs text-destructive",children:k.lastName.message})]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-email",children:"Email"}),u.jsx(qe,{id:"signup-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...v("email")}),k.email&&u.jsx("p",{className:"text-xs text-destructive",children:k.email.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(Ue,{htmlFor:"signup-whatsapp",children:["WhatsApp"," ",u.jsx("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),u.jsx(qe,{id:"signup-whatsapp",type:"tel",placeholder:"+91 98765 43210",autoComplete:"tel",...v("whatsappNumber")}),k.whatsappNumber&&u.jsx("p",{className:"text-xs text-destructive",children:k.whatsappNumber.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-password",children:"Password"}),u.jsx(qe,{id:"signup-password",type:"password",placeholder:"••••••••",autoComplete:"new-password",...v("password")}),k.password&&u.jsx("p",{className:"text-xs text-destructive",children:k.password.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-confirm",children:"Confirm password"}),u.jsx(qe,{id:"signup-confirm",type:"password",placeholder:"••••••••",autoComplete:"new-password",...v("confirmPassword")}),k.confirmPassword&&u.jsx("p",{className:"text-xs text-destructive",children:k.confirmPassword.message})]}),(i==null?void 0:i.captcha.enabled)&&i.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:x,config:i.captcha,onVerify:B=>{l(B),f(null)},onExpire:()=>l("")}),h&&u.jsx("p",{className:"text-xs text-destructive",children:h})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:C,children:[C&&u.jsx(or,{className:"animate-spin"}),C?"Creating account…":"Create account"]})]}),((i==null?void 0:i.termsOfServiceUrl)||(i==null?void 0:i.privacyPolicyUrl))&&u.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["By continuing, you agree to our"," ",i.termsOfServiceUrl&&u.jsx("a",{href:i.termsOfServiceUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Terms of Service"}),i.termsOfServiceUrl&&i.privacyPolicyUrl&&" and ",i.privacyPolicyUrl&&u.jsx("a",{href:i.privacyPolicyUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Privacy Policy"}),"."]}),u.jsx(Rt,{}),n&&u.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",u.jsx("a",{href:n,className:"font-medium text-primary underline-offset-4 hover:underline",children:"Sign in"})]})]})})}const bl=fr({email:Je().email("Enter a valid email address")});function _l(){return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsx("div",{className:"h-6 w-3/4 animate-pulse rounded bg-muted mx-auto"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"})]})}function wl({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Forgot password?"}){const{forgotPassword:a}=Ot(),{config:i,configLoading:o}=ur(),[c,l]=I.useState(""),[h,f]=I.useState(null),[p,m]=I.useState(null),[x,v]=I.useState(!1),S=I.useRef(null),{register:k,handleSubmit:C,getValues:U,formState:{errors:L,isSubmitting:b}}=er({resolver:tr(bl)});async function B(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Hr(i.captcha.siteKey,"forgot_password"):c||(f("Please complete the captcha"),null):""}function W(){var $;($=S.current)==null||$.reset(),l(""),f(null)}const ae=C(async $=>{m(null);const z=await B();if(z!==null)try{await a({email:$.email,captchaToken:z}),W(),v(!0),e==null||e()}catch(ee){W();const T=ee instanceof Error?ee:new Error("Request failed");m(T.message),r==null||r(T)}});return o?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(_l,{})}):x?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"flex flex-col items-center gap-4 p-8 text-center",children:[u.jsx(Fi,{className:"h-12 w-12 text-primary"}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"font-semibold",children:"Check your inbox"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a reset link to"," ",u.jsx("span",{className:"font-medium text-foreground",children:U("email")})]})]}),n&&u.jsx("a",{href:n,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:"Back to sign in"})]})}):u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"p-6 space-y-5",children:[(i==null?void 0:i.logoUrl)&&u.jsx("img",{src:i.logoUrl,alt:"Logo",className:"mx-auto h-8 object-contain"}),u.jsxs("div",{className:"space-y-1 text-center",children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:s}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your email and we'll send you a reset link"})]}),u.jsxs("form",{onSubmit:ae,noValidate:!0,className:"space-y-4",children:[p&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"forgot-email",children:"Email"}),u.jsx(qe,{id:"forgot-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...k("email")}),L.email&&u.jsx("p",{className:"text-xs text-destructive",children:L.email.message})]}),(i==null?void 0:i.captcha.enabled)&&i.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:S,config:i.captcha,onVerify:$=>{l($),f(null)},onExpire:()=>l("")}),h&&u.jsx("p",{className:"text-xs text-destructive",children:h})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:b,children:[b&&u.jsx(or,{className:"animate-spin"}),b?"Sending…":"Send reset link"]})]}),n&&u.jsx("p",{className:"text-center text-sm text-muted-foreground",children:u.jsx("a",{href:n,className:"font-medium text-primary underline-offset-4 hover:underline",children:"Back to sign in"})})]})})}function ma({className:t,onSuccess:e,onError:r,label:n="Sign out",children:s}){const{logout:a}=Ot(),[i,o]=I.useState(!1),c=async()=>{o(!0);try{await a(),e==null||e()}catch(l){const h=l instanceof Error?l:new Error("Logout failed");r==null||r(h)}finally{o(!1)}};return s?u.jsx("span",{onClick:c,className:me("cursor-pointer",t),role:"button",tabIndex:0,onKeyDown:l=>l.key==="Enter"&&c(),children:s({isLoading:i})}):u.jsxs(dt,{variant:"outline",onClick:c,disabled:i,className:me("gap-2",t),children:[u.jsx(Ui,{className:"h-4 w-4"}),i?"Signing out…":n]})}function kl(t,e=[]){let r=[];function n(a,i){const o=w.createContext(i);o.displayName=a+"Context";const c=r.length;r=[...r,i];const l=f=>{var k;const{scope:p,children:m,...x}=f,v=((k=p==null?void 0:p[t])==null?void 0:k[c])||o,S=w.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:S,children:m})};l.displayName=a+"Provider";function h(f,p){var v;const m=((v=p==null?void 0:p[t])==null?void 0:v[c])||o,x=w.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,h]}const s=()=>{const a=r.map(i=>w.createContext(i));return function(o){const c=(o==null?void 0:o[t])||a;return w.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[n,Sl(s,...e)]}function Sl(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=n.reduce((o,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...o,...f}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function Cl(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}var Yt={exports:{}},Or={};/**
|
|
83
|
+
`+JSON.stringify(r),i=yield yc(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:a},e);this.log("Sentry response",i.status),i.status!==200&&(console.log(i.body),console.error("Failed to send event to Sentry",i))}catch(r){console.error("Failed to send event",r)}})}flush(t=5e3){return Et(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let e=this.buffer.splice(0,this.buffer.length).map(r=>this.sendEvent(r,t));yield Promise.all(e),this.log("Flushed all events")}catch(e){console.error("Failed to flush events",e)}})}static flush(t=5e3){return Pe.instance.flush(t)}static reset(){Pe._instance=void 0}},Oe(Pe,"_instance"),Pe),gc="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",vc="2.3.0",xc="production";function bc(t=!0){if(!t)return is();Gr.init({dsn:gc,release:vc,environment:xc});let e=Gr.scope;return Xo(e),is(e)}function is(t=null){return{addBreadcrumb:e=>{t&&t.addBreadcrumb(e)},captureRequest:e=>{t&&t.setRequest(e)},captureException:e=>{t&&Gr.captureException(e,t)}}}function _c({scriptLocation:t,query:e,loadAsync:r=!0,crossOrigin:n="anonymous",apihost:s="https://js.hcaptcha.com",cleanup:a=!1,secureApi:i=!1,scriptSource:o=""}={},c){let l=Hs(t),h=Gs(l);return new Promise((f,p)=>{let m=h.document.createElement("script");m.id=Ko,o?m.src=`${o}?onload=${Kt}`:i?m.src=`${s}/1/secure-api.js?onload=${Kt}`:m.src=`${s}/1/api.js?onload=${Kt}`,m.crossOrigin=n,m.async=r;let x=(v,S)=>{try{!i&&a&&l.removeChild(m),S(v)}catch(k){p(k)}};m.onload=v=>x(v,f),m.onerror=v=>{c&&c(m.src),x(v,p)},m.src+=e!==""?`&${e}`:"",l.appendChild(m)})}var Gt=[];function wc(t={cleanup:!1},e){try{e.addBreadcrumb({category:at,message:"hCaptcha loader params",data:t});let r=Hs(t.scriptLocation),n=Gs(r),s=Gt.find(({scope:i})=>i===n.window);if(s)return e.addBreadcrumb({category:at,message:"hCaptcha already loaded"}),s.promise;let a=new Promise((i,o)=>Et(this,null,function*(){try{n.window[Kt]=()=>{e.addBreadcrumb({category:at,message:"hCaptcha script called onload function"}),i(n.window.hcaptcha)};let c=Jo({custom:t.custom,render:t.render,sentry:t.sentry,assethost:t.assethost,imghost:t.imghost,reportapi:t.reportapi,endpoint:t.endpoint,host:t.host,recaptchacompat:t.recaptchacompat,hl:t.hl,uj:t.uj});yield _c(Ve({query:c},t),l=>{e.captureRequest({url:l,method:"GET"})}),e.addBreadcrumb({category:at,message:"hCaptcha loaded",data:s})}catch{e.addBreadcrumb({category:at,message:"hCaptcha failed to load"});let l=Gt.findIndex(h=>h.scope===n.window);l!==-1&&Gt.splice(l,1),o(new Error(ss))}}));return Gt.push({promise:a,scope:n.window}),a}catch(r){return e.captureException(r),Promise.reject(new Error(ss))}}function Ks(t,e,r=0){return Et(this,null,function*(){var n,s;let a=(n=t.maxRetries)!=null?n:2,i=(s=t.retryDelay)!=null?s:1e3,o=r<a?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield wc(t,e)}catch(c){return e.addBreadcrumb({category:at,message:o}),r>=a?(e.captureException(c),Promise.reject(c)):(e.addBreadcrumb({category:at,message:`Waiting ${i}ms before retry attempt ${r+1}`}),yield ec(i),r+=1,Ks(t,e,r))}})}function kc(){return Et(this,arguments,function*(t={}){let e=bc(t.sentry);return yield Ks(t,e)})}function os(t){var e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function cs(t){return t||document.head}var Sc=(function(t){Wo(e,t);function e(n){var s;return s=t.call(this,n)||this,s._hcaptcha=void 0,s.renderCaptcha=s.renderCaptcha.bind(De(s)),s.resetCaptcha=s.resetCaptcha.bind(De(s)),s.removeCaptcha=s.removeCaptcha.bind(De(s)),s.isReady=s.isReady.bind(De(s)),s._onReady=null,s.loadCaptcha=s.loadCaptcha.bind(De(s)),s.handleOnLoad=s.handleOnLoad.bind(De(s)),s.handleSubmit=s.handleSubmit.bind(De(s)),s.handleExpire=s.handleExpire.bind(De(s)),s.handleError=s.handleError.bind(De(s)),s.handleOpen=s.handleOpen.bind(De(s)),s.handleClose=s.handleClose.bind(De(s)),s.handleChallengeExpired=s.handleChallengeExpired.bind(De(s)),s.ref=w.createRef(),s.apiScriptRequested=!1,s.sentryHub=null,s.captchaId="",s._pendingExecute=null,s.state={isApiReady:!1,isRemoved:!1,elementId:n.id},s}var r=e.prototype;return r.componentDidMount=function(){var s=this,a=cs(this.props.scriptLocation),i=os(a);this._hcaptcha=i.window.hcaptcha||void 0;var o=typeof this._hcaptcha<"u";if(o){this.setState({isApiReady:!0},function(){s.renderCaptcha()});return}this.loadCaptcha()},r.componentWillUnmount=function(){var s=this._hcaptcha,a=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(s.reset(a),s.remove(a))},r.shouldComponentUpdate=function(s,a){return!(this.state.isApiReady!==a.isApiReady||this.state.isRemoved!==a.isRemoved)},r.componentDidUpdate=function(s){var a=this,i=["sitekey","size","theme","tabindex","languageOverride","endpoint"],o=i.every(function(c){return s[c]===a.props[c]});o||this.removeCaptcha(function(){a.renderCaptcha()})},r.loadCaptcha=function(){if(!this.apiScriptRequested){var s=this.props,a=s.apihost,i=s.assethost,o=s.endpoint,c=s.host,l=s.imghost,h=s.languageOverride,f=s.reCaptchaCompat,p=s.reportapi,m=s.sentry,x=s.custom,v=s.loadAsync,S=s.scriptLocation,k=s.scriptSource,C=s.secureApi,U=s.cleanup,L=U===void 0?!0:U,b=s.userJourneys,Z={render:"explicit",apihost:a,assethost:i,endpoint:o,hl:h,host:c,imghost:l,recaptchacompat:f===!1?"off":null,reportapi:p,sentry:m,custom:x,loadAsync:v,scriptLocation:S,scriptSource:k,secureApi:C,cleanup:L,uj:b!==void 0?b:!1};kc(Z).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},r.renderCaptcha=function(s){var a=this,i=this.props.onReady,o=this.state.isApiReady,c=this.captchaId;if(!(!o||c)){var l=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),h=this._hcaptcha,f=h.render(this.ref.current,l);this.captchaId=f,this.setState({isRemoved:!1},function(){s&&s(),i&&i(),a._onReady&&a._onReady(f)})}},r.resetCaptcha=function(){var s=this._hcaptcha,a=this.captchaId;this.isReady()&&(s.reset(a),this._cancelPendingExecute("hcaptcha-reset"))},r.removeCaptcha=function(s){var a=this,i=this._hcaptcha,o=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){a.captchaId="",i.remove(o),s&&s()})},r.handleOnLoad=function(){var s=this;this.setState({isApiReady:!0},function(){var a=cs(s.props.scriptLocation),i=os(a);s._hcaptcha=i.window.hcaptcha,s.renderCaptcha(function(){var o=s.props.onLoad;o&&o()})})},r.handleSubmit=function(s){var a=this.props.onVerify,i=this.state.isRemoved,o=this._hcaptcha,c=this.captchaId;if(!(typeof o>"u"||i)){var l=o.getResponse(c),h=o.getRespKey(c);a&&a(l,h)}},r.handleExpire=function(){var s=this.props.onExpire,a=this._hcaptcha,i=this.captchaId;this.isReady()&&(a.reset(i),s&&s())},r.handleError=function(s){var a=this.props.onError,i=this._hcaptcha,o=this.captchaId;this.isReady()&&i.reset(o),a&&a(s)},r.isReady=function(){var s=this.state,a=s.isApiReady,i=s.isRemoved;return a&&!i},r._cancelPendingExecute=function(s){if(this._pendingExecute){var a=this._pendingExecute;this._pendingExecute=null;var i=new Error(s);a.reject(i)}},r.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},r.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},r.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},r.execute=function(s){var a=this;s===void 0&&(s=null),s=typeof s=="object"?s:null;try{var i=this._hcaptcha,o=this.captchaId;if(s&&s.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return s&&s.async?new Promise(function(l,h){a._pendingExecute={resolve:l,reject:h},a._onReady=function(f){if(a._pendingExecute)try{var p=i.execute(f,s);p&&typeof p.then=="function"?p.then(function(m){a._pendingExecute=null,l(m)}).catch(function(m){a._pendingExecute=null,h(m)}):(a._pendingExecute=null,h(new Error("hcaptcha-execute-no-promise")))}catch(m){a._pendingExecute=null,h(m)}}}):(this._onReady=function(l){i.execute(l,s)},null);var c=i.execute(o,s);return s&&s.async&&c&&typeof c.then=="function"?new Promise(function(l,h){a._pendingExecute={resolve:l,reject:h},c.then(function(f){a._pendingExecute=null,l(f)}).catch(function(f){a._pendingExecute=null,h(f)})}):c}catch(l){return s&&s.async?Promise.reject(l):null}},r.close=function(){var s=this._hcaptcha,a=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return s.close(a)},r.setData=function(s){var a=this._hcaptcha,i=this.captchaId;this.isReady()&&(s&&typeof s!="object"&&(s=null),a.setData(i,s))},r.getResponse=function(){var s=this._hcaptcha;return s.getResponse(this.captchaId)},r.getRespKey=function(){var s=this._hcaptcha;return s.getRespKey(this.captchaId)},r.render=function(){var s=this.state.elementId;return w.createElement("div",{ref:this.ref,id:s})},e})(w.Component);const Ft=I.forwardRef(({config:t,onVerify:e,onExpire:r},n)=>{const s=I.useRef(null),a=I.useRef(null);return I.useImperativeHandle(n,()=>({reset(){var i,o;(i=s.current)==null||i.reset(),(o=a.current)==null||o.resetCaptcha()}})),!t.enabled||!t.siteKey?null:t.provider==="hcaptcha"?u.jsx(Sc,{ref:a,sitekey:t.siteKey,onVerify:e,onExpire:r}):t.version!=="v3"?u.jsx(Zo,{ref:s,sitekey:t.siteKey,onChange:i=>e(i??""),onExpired:r}):null});Ft.displayName="CaptchaWidget";function ls(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function sn(...t){return e=>{let r=!1;const n=t.map(s=>{const a=ls(s,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():ls(t[s],null)}}}}function an(...t){return w.useCallback(sn(...t),t)}var Cc=Symbol.for("react.lazy"),lr=w[" use ".trim().toString()];function Ec(t){return typeof t=="object"&&t!==null&&"then"in t}function Js(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Cc&&"_payload"in t&&Ec(t._payload)}function Xs(t){const e=Oc(t),r=w.forwardRef((n,s)=>{let{children:a,...i}=n;Js(a)&&typeof lr=="function"&&(a=lr(a._payload));const o=w.Children.toArray(a),c=o.find(Nc);if(c){const l=c.props.children,h=o.map(f=>f===c?w.Children.count(l)>1?w.Children.only(null):w.isValidElement(l)?l.props.children:null:f);return u.jsx(e,{...i,ref:s,children:w.isValidElement(l)?w.cloneElement(l,void 0,h):null})}return u.jsx(e,{...i,ref:s,children:a})});return r.displayName=`${t}.Slot`,r}var Rc=Xs("Slot");function Oc(t){const e=w.forwardRef((r,n)=>{let{children:s,...a}=r;if(Js(s)&&typeof lr=="function"&&(s=lr(s._payload)),w.isValidElement(s)){const i=Tc(s),o=Ac(a,s.props);return s.type!==w.Fragment&&(o.ref=n?sn(n,i):i),w.cloneElement(s,o)}return w.Children.count(s)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var jc=Symbol("radix.slottable");function Nc(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jc}function Ac(t,e){const r={...e};for(const n in e){const s=t[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...t,...r}}function Tc(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const us=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ds=Ms,Qs=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return ds(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:a}=e,i=Object.keys(s).map(l=>{const h=r==null?void 0:r[l],f=a==null?void 0:a[l];if(h===null)return null;const p=us(h)||us(f);return s[l][p]}),o=r&&Object.entries(r).reduce((l,h)=>{let[f,p]=h;return p===void 0||(l[f]=p),l},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((l,h)=>{let{class:f,className:p,...m}=h;return Object.entries(m).every(x=>{let[v,S]=x;return Array.isArray(S)?S.includes({...a,...o}[v]):{...a,...o}[v]===S})?[...l,f,p]:l},[]);return ds(t,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},Pc=Qs("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),dt=w.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},a)=>{const i=n?Rc:"button";return u.jsx(i,{className:me(Pc({variant:e,size:r,className:t})),ref:a,...s})});dt.displayName="Button";const qe=w.forwardRef(({className:t,type:e,...r},n)=>u.jsx("input",{type:e,className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...r}));qe.displayName="Input";var Ic=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ut=Ic.reduce((t,e)=>{const r=Xs(`Primitive.${e}`),n=w.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...o,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),Lc="Label",ea=w.forwardRef((t,e)=>u.jsx(Ut.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));ea.displayName=Lc;var ta=ea;const Mc=Qs("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ue=w.forwardRef(({className:t,...e},r)=>u.jsx(ta,{ref:r,className:me(Mc(),t),...e}));Ue.displayName=ta.displayName;const ze=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));ze.displayName="Card";const ra=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("flex flex-col space-y-1.5 p-6",t),...e}));ra.displayName="CardHeader";const na=w.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:me("text-2xl font-semibold leading-none tracking-tight",t),...e}));na.displayName="CardTitle";const sa=w.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:me("text-sm text-muted-foreground",t),...e}));sa.displayName="CardDescription";const Jt=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("p-6 pt-0",t),...e}));Jt.displayName="CardContent";const Vc=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("flex items-center p-6 pt-0",t),...e}));Vc.displayName="CardFooter";function $c(t,e=[]){let r=[];function n(a,i){const o=w.createContext(i),c=r.length;r=[...r,i];const l=f=>{var k;const{scope:p,children:m,...x}=f,v=((k=p==null?void 0:p[t])==null?void 0:k[c])||o,S=w.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:S,children:m})};l.displayName=a+"Provider";function h(f,p){var v;const m=((v=p==null?void 0:p[t])==null?void 0:v[c])||o,x=w.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,h]}const s=()=>{const a=r.map(i=>w.createContext(i));return function(o){const c=(o==null?void 0:o[t])||a;return w.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[n,Fc(s,...e)]}function Fc(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=n.reduce((o,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...o,...f}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function fs(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}var yt=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Dc=w[" useInsertionEffect ".trim().toString()]||yt;function Uc({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,a,i]=zc({defaultProp:e,onChange:r}),o=t!==void 0,c=o?t:s;{const h=w.useRef(t!==void 0);w.useEffect(()=>{const f=h.current;f!==o&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=o},[o,n])}const l=w.useCallback(h=>{var f;if(o){const p=Bc(h)?h(t):h;p!==t&&((f=i.current)==null||f.call(i,p))}else a(h)},[o,t,a,i]);return[c,l]}function zc({defaultProp:t,onChange:e}){const[r,n]=w.useState(t),s=w.useRef(r),a=w.useRef(e);return Dc(()=>{a.current=e},[e]),w.useEffect(()=>{var i;s.current!==r&&((i=a.current)==null||i.call(a,r),s.current=r)},[r,s]),[r,n,a]}function Bc(t){return typeof t=="function"}function Zc(t){const e=w.useRef({value:t,previous:t});return w.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function Wc(t){const[e,r]=w.useState(void 0);return yt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,o;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,o=l.blockSize}else i=t.offsetWidth,o=t.offsetHeight;r({width:i,height:o})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function qc(t,e){return w.useReducer((r,n)=>e[r][n]??r,t)}var aa=t=>{const{present:e,children:r}=t,n=Gc(e),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=an(n.ref,Hc(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:a}):null};aa.displayName="Presence";function Gc(t){const[e,r]=w.useState(),n=w.useRef(null),s=w.useRef(t),a=w.useRef("none"),i=t?"mounted":"unmounted",[o,c]=qc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Ht(n.current);a.current=o==="mounted"?l:"none"},[o]),yt(()=>{const l=n.current,h=s.current;if(h!==t){const p=a.current,m=Ht(l);t?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&p!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),yt(()=>{if(e){let l;const h=e.ownerDocument.defaultView??window,f=m=>{const v=Ht(n.current).includes(CSS.escape(m.animationName));if(m.target===e&&v&&(c("ANIMATION_END"),!s.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",l=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},p=m=>{m.target===e&&(a.current=Ht(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{h.clearTimeout(l),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:w.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function Ht(t){return(t==null?void 0:t.animationName)||"none"}function Hc(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Yc(t){const e=Kc(t),r=w.forwardRef((n,s)=>{const{children:a,...i}=n,o=w.Children.toArray(a),c=o.find(Xc);if(c){const l=c.props.children,h=o.map(f=>f===c?w.Children.count(l)>1?w.Children.only(null):w.isValidElement(l)?l.props.children:null:f);return u.jsx(e,{...i,ref:s,children:w.isValidElement(l)?w.cloneElement(l,void 0,h):null})}return u.jsx(e,{...i,ref:s,children:a})});return r.displayName=`${t}.Slot`,r}function Kc(t){const e=w.forwardRef((r,n)=>{const{children:s,...a}=r;if(w.isValidElement(s)){const i=el(s),o=Qc(a,s.props);return s.type!==w.Fragment&&(o.ref=n?sn(n,i):i),w.cloneElement(s,o)}return w.Children.count(s)>1?w.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Jc=Symbol("radix.slottable");function Xc(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Jc}function Qc(t,e){const r={...e};for(const n in e){const s=t[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...t,...r}}function el(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],on=tl.reduce((t,e)=>{const r=Yc(`Primitive.${e}`),n=w.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...o,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),pr="Checkbox",[rl]=$c(pr),[nl,cn]=rl(pr);function sl(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:s,disabled:a,form:i,name:o,onCheckedChange:c,required:l,value:h="on",internal_do_not_use_render:f}=t,[p,m]=Uc({prop:r,defaultProp:s??!1,onChange:c,caller:pr}),[x,v]=w.useState(null),[S,k]=w.useState(null),C=w.useRef(!1),U=x?!!i||!!x.closest("form"):!0,L={checked:p,disabled:a,setChecked:m,control:x,setControl:v,name:o,form:i,value:h,hasConsumerStoppedPropagationRef:C,required:l,defaultChecked:ct(s)?!1:s,isFormControl:U,bubbleInput:S,setBubbleInput:k};return u.jsx(nl,{scope:e,...L,children:al(f)?f(L):n})}var ia="CheckboxTrigger",oa=w.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:r,...n},s)=>{const{control:a,value:i,disabled:o,checked:c,required:l,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:x}=cn(ia,t),v=an(s,h),S=w.useRef(c);return w.useEffect(()=>{const k=a==null?void 0:a.form;if(k){const C=()=>f(S.current);return k.addEventListener("reset",C),()=>k.removeEventListener("reset",C)}},[a,f]),u.jsx(on.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":l,"data-state":fa(c),"data-disabled":o?"":void 0,disabled:o,value:i,...n,ref:v,onKeyDown:fs(e,k=>{k.key==="Enter"&&k.preventDefault()}),onClick:fs(r,k=>{f(C=>ct(C)?!0:!C),x&&m&&(p.current=k.isPropagationStopped(),p.current||k.stopPropagation())})})});oa.displayName=ia;var ln=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:a,required:i,disabled:o,value:c,onCheckedChange:l,form:h,...f}=t;return u.jsx(sl,{__scopeCheckbox:r,checked:s,defaultChecked:a,disabled:o,required:i,onCheckedChange:l,name:n,form:h,value:c,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(oa,{...f,ref:e,__scopeCheckbox:r}),p&&u.jsx(da,{__scopeCheckbox:r})]})})});ln.displayName=pr;var ca="CheckboxIndicator",la=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,a=cn(ca,r);return u.jsx(aa,{present:n||ct(a.checked)||a.checked===!0,children:u.jsx(on.span,{"data-state":fa(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});la.displayName=ca;var ua="CheckboxBubbleInput",da=w.forwardRef(({__scopeCheckbox:t,...e},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:a,defaultChecked:i,required:o,disabled:c,name:l,value:h,form:f,bubbleInput:p,setBubbleInput:m}=cn(ua,t),x=an(r,m),v=Zc(a),S=Wc(n);w.useEffect(()=>{const C=p;if(!C)return;const U=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(U,"checked").set,Z=!s.current;if(v!==a&&b){const W=new Event("click",{bubbles:Z});C.indeterminate=ct(a),b.call(C,ct(a)?!1:a),C.dispatchEvent(W)}},[p,v,a,s]);const k=w.useRef(ct(a)?!1:a);return u.jsx(on.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??k.current,required:o,disabled:c,name:l,value:h,form:f,...e,tabIndex:-1,ref:x,style:{...e.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});da.displayName=ua;function al(t){return typeof t=="function"}function ct(t){return t==="indeterminate"}function fa(t){return ct(t)?"indeterminate":t?"checked":"unchecked"}const ha=w.forwardRef(({className:t,...e},r)=>u.jsx(ln,{ref:r,className:me("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:u.jsx(la,{className:"flex items-center justify-center text-current",children:u.jsx($i,{className:"h-3.5 w-3.5"})})}));ha.displayName=ln.displayName;var il="Separator",hs="horizontal",ol=["horizontal","vertical"],pa=w.forwardRef((t,e)=>{const{decorative:r,orientation:n=hs,...s}=t,a=cl(n)?n:hs,o=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(Ut.div,{"data-orientation":a,...o,...s,ref:e})});pa.displayName=il;function cl(t){return ol.includes(t)}var ma=pa;const Rt=w.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},s)=>u.jsx(ma,{ref:s,decorative:r,orientation:e,className:me("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));Rt.displayName=ma.displayName;const ll=fr({email:Je().email("Enter a valid email address"),password:Je().min(6,"Password must be at least 6 characters")}),ul=fr({email:Je().email("Enter a valid email address")});function dl(){return u.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{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",fill:"#4285F4"}),u.jsx("path",{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",fill:"#34A853"}),u.jsx("path",{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",fill:"#FBBC05"}),u.jsx("path",{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",fill:"#EA4335"})]})}function fl({provider:t}){return t==="google"?u.jsx(dl,{}):t==="github"?u.jsx(Di,{className:"h-4 w-4"}):null}function hl({provider:t}){const e=t.label??t.provider.charAt(0).toUpperCase()+t.provider.slice(1);return u.jsx("a",{href:t.url,children:u.jsxs(dt,{type:"button",variant:"outline",className:"w-full gap-2 rounded-full",children:[u.jsx(fl,{provider:t.provider}),e]})})}function pl({mode:t,onChange:e}){return u.jsx("div",{className:"flex rounded-lg bg-muted p-1 text-sm font-medium",children:["password","magic-link"].map(r=>u.jsx("button",{type:"button",onClick:()=>e(r),className:me("flex-1 rounded-md px-3 py-1.5 transition-all",t===r?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r==="password"?"Password":"Magic Link"},r))})}function ml(){return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsx("div",{className:"h-6 w-3/4 animate-pulse rounded bg-muted mx-auto"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"})]})}function yl({className:t,onSuccess:e,onError:r,forgotPasswordUrl:n,signupUrl:s,title:a="Sign in to your account"}){var xe,we,Ee;const{login:i,sendMagicLink:o}=Ot(),{config:c,configLoading:l}=ur(),[h,f]=I.useState("password"),[p,m]=I.useState(""),[x,v]=I.useState(null),[S,k]=I.useState(null),[C,U]=I.useState(!1),[L,b]=I.useState(!1),Z=I.useRef(null),W=er({resolver:tr(ll)}),se=er({resolver:tr(ul)});async function ue(){return c!=null&&c.captcha.enabled?c.captcha.provider==="recaptcha"&&c.captcha.version==="v3"&&c.captcha.siteKey?Hr(c.captcha.siteKey,"login"):p||(v("Please complete the captcha"),null):""}function V(){var _;(_=Z.current)==null||_.reset(),m(""),v(null)}const z=W.handleSubmit(async _=>{k(null);const R=await ue();if(R!==null)try{await i({email:_.email,password:_.password,captchaToken:R,rememberMe:L}),V(),e==null||e({})}catch(G){V();const q=G instanceof Error?G:new Error("Login failed");k(q.message),r==null||r(q)}}),N=se.handleSubmit(async _=>{k(null);const R=await ue();if(R!==null)try{await o({email:_.email,captchaToken:R}),V(),U(!0)}catch(G){V();const q=G instanceof Error?G:new Error("Failed to send magic link");k(q.message),r==null||r(q)}});if(C)return u.jsxs(ze,{className:me("w-full max-w-sm p-8 text-center space-y-3",t),children:[u.jsx("div",{className:"text-4xl",children:"✉️"}),u.jsx("p",{className:"font-semibold",children:"Check your inbox"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a sign-in link to"," ",u.jsx("span",{className:"font-medium text-foreground",children:se.getValues("email")})]}),u.jsx("button",{type:"button",onClick:()=>U(!1),className:"text-sm text-primary underline-offset-4 hover:underline",children:"Use a different email"})]});if(l)return u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(ml,{})});const B=W.formState.isSubmitting,Q=se.formState.isSubmitting,ye=B||Q,de=(((xe=c==null?void 0:c.oauthProviders)==null?void 0:xe.length)??0)>0;return u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"p-6 space-y-5",children:[(c==null?void 0:c.logoUrl)&&u.jsx("img",{src:c.logoUrl,alt:"Logo",className:"mx-auto h-8 object-contain"}),u.jsx("h1",{className:"text-center text-xl font-bold tracking-tight",children:a}),de&&u.jsx("div",{className:me("grid gap-2",(((we=c==null?void 0:c.oauthProviders)==null?void 0:we.length)??0)===1?"grid-cols-1":"grid-cols-2"),children:(Ee=c==null?void 0:c.oauthProviders)==null?void 0:Ee.map(_=>u.jsx(hl,{provider:_},_.provider))}),de&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Rt,{className:"flex-1"}),u.jsx("span",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground",children:"Or continue with email"}),u.jsx(Rt,{className:"flex-1"})]}),(c==null?void 0:c.allowMagicLink)&&u.jsx(pl,{mode:h,onChange:_=>{f(_),k(null),V()}}),h==="password"&&u.jsxs("form",{onSubmit:z,noValidate:!0,className:"space-y-4",children:[S&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:S}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"login-email",children:"Email"}),u.jsx(qe,{id:"login-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...W.register("email")}),W.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:W.formState.errors.email.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Ue,{htmlFor:"login-password",children:"Password"}),n&&u.jsx("a",{href:n,className:"text-xs text-muted-foreground underline-offset-4 hover:underline",children:"Forgot password?"})]}),u.jsx(qe,{id:"login-password",type:"password",placeholder:"••••••••",autoComplete:"current-password",...W.register("password")}),W.formState.errors.password&&u.jsx("p",{className:"text-xs text-destructive",children:W.formState.errors.password.message})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ha,{id:"remember-me",checked:L,onCheckedChange:_=>b(!!_)}),u.jsx(Ue,{htmlFor:"remember-me",className:"text-sm font-normal cursor-pointer",children:"Remember me"})]}),(c==null?void 0:c.captcha.enabled)&&c.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:Z,config:c.captcha,onVerify:_=>{m(_),v(null)},onExpire:()=>m("")}),x&&u.jsx("p",{className:"text-xs text-destructive",children:x})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:ye,children:[B&&u.jsx(or,{className:"animate-spin"}),B?"Signing in…":"Sign in"]})]}),h==="magic-link"&&u.jsxs("form",{onSubmit:N,noValidate:!0,className:"space-y-4",children:[S&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:S}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"magic-email",children:"Email"}),u.jsx(qe,{id:"magic-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...se.register("email")}),se.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:se.formState.errors.email.message})]}),(c==null?void 0:c.captcha.enabled)&&c.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:Z,config:c.captcha,onVerify:_=>{m(_),v(null)},onExpire:()=>m("")}),x&&u.jsx("p",{className:"text-xs text-destructive",children:x})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:ye,children:[Q&&u.jsx(or,{className:"animate-spin"}),Q?"Sending…":"Send Magic Link"]})]}),((c==null?void 0:c.termsOfServiceUrl)||(c==null?void 0:c.privacyPolicyUrl))&&u.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["By continuing, you agree to our"," ",c.termsOfServiceUrl&&u.jsx("a",{href:c.termsOfServiceUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Terms of Service"}),c.termsOfServiceUrl&&c.privacyPolicyUrl&&" and ",c.privacyPolicyUrl&&u.jsx("a",{href:c.privacyPolicyUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Privacy Policy"}),"."]}),(c==null?void 0:c.allowSignup)&&s&&u.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",u.jsx("a",{href:s,className:"font-medium text-primary underline-offset-4 hover:underline",children:"Sign up"})]})]})})}const gl=fr({firstName:Je().min(1,"First name is required"),lastName:Je().min(1,"Last name is required"),email:Je().email("Enter a valid email address"),password:Je().min(8,"Password must be at least 8 characters").regex(/[A-Z]/,"Must contain an uppercase letter").regex(/[0-9]/,"Must contain a number"),confirmPassword:Je(),whatsappNumber:Je().regex(/^\+?[1-9]\d{6,14}$/,"Enter a valid WhatsApp number").optional().or(Ii(""))}).refine(t=>t.password===t.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function vl(){return u.jsx("div",{className:"space-y-4 p-6",children:[...Array(5)].map((t,e)=>u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"},e))})}function xl({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Create an account"}){const{signup:a}=Ot(),{config:i,configLoading:o}=ur(),[c,l]=I.useState(""),[h,f]=I.useState(null),[p,m]=I.useState(null),x=I.useRef(null),{register:v,handleSubmit:S,formState:{errors:k,isSubmitting:C}}=er({resolver:tr(gl)});async function U(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Hr(i.captcha.siteKey,"signup"):c||(f("Please complete the captcha"),null):""}function L(){var Z;(Z=x.current)==null||Z.reset(),l(""),f(null)}const b=S(async Z=>{m(null);const W=await U();if(W!==null)try{await a({firstName:Z.firstName,lastName:Z.lastName,email:Z.email,password:Z.password,whatsappNumber:Z.whatsappNumber||void 0,captchaToken:W}),L(),e==null||e({})}catch(se){L();const ue=se instanceof Error?se:new Error("Signup failed");m(ue.message),r==null||r(ue)}});return o?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(vl,{})}):u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"p-6 space-y-5",children:[(i==null?void 0:i.logoUrl)&&u.jsx("img",{src:i.logoUrl,alt:"Logo",className:"mx-auto h-8 object-contain"}),u.jsx("h1",{className:"text-center text-xl font-bold tracking-tight",children:s}),u.jsxs("form",{onSubmit:b,noValidate:!0,className:"space-y-4",children:[p&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-first",children:"First name"}),u.jsx(qe,{id:"signup-first",placeholder:"John",autoComplete:"given-name",...v("firstName")}),k.firstName&&u.jsx("p",{className:"text-xs text-destructive",children:k.firstName.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-last",children:"Last name"}),u.jsx(qe,{id:"signup-last",placeholder:"Doe",autoComplete:"family-name",...v("lastName")}),k.lastName&&u.jsx("p",{className:"text-xs text-destructive",children:k.lastName.message})]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-email",children:"Email"}),u.jsx(qe,{id:"signup-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...v("email")}),k.email&&u.jsx("p",{className:"text-xs text-destructive",children:k.email.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(Ue,{htmlFor:"signup-whatsapp",children:["WhatsApp"," ",u.jsx("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),u.jsx(qe,{id:"signup-whatsapp",type:"tel",placeholder:"+91 98765 43210",autoComplete:"tel",...v("whatsappNumber")}),k.whatsappNumber&&u.jsx("p",{className:"text-xs text-destructive",children:k.whatsappNumber.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-password",children:"Password"}),u.jsx(qe,{id:"signup-password",type:"password",placeholder:"••••••••",autoComplete:"new-password",...v("password")}),k.password&&u.jsx("p",{className:"text-xs text-destructive",children:k.password.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"signup-confirm",children:"Confirm password"}),u.jsx(qe,{id:"signup-confirm",type:"password",placeholder:"••••••••",autoComplete:"new-password",...v("confirmPassword")}),k.confirmPassword&&u.jsx("p",{className:"text-xs text-destructive",children:k.confirmPassword.message})]}),(i==null?void 0:i.captcha.enabled)&&i.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:x,config:i.captcha,onVerify:Z=>{l(Z),f(null)},onExpire:()=>l("")}),h&&u.jsx("p",{className:"text-xs text-destructive",children:h})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:C,children:[C&&u.jsx(or,{className:"animate-spin"}),C?"Creating account…":"Create account"]})]}),((i==null?void 0:i.termsOfServiceUrl)||(i==null?void 0:i.privacyPolicyUrl))&&u.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["By continuing, you agree to our"," ",i.termsOfServiceUrl&&u.jsx("a",{href:i.termsOfServiceUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Terms of Service"}),i.termsOfServiceUrl&&i.privacyPolicyUrl&&" and ",i.privacyPolicyUrl&&u.jsx("a",{href:i.privacyPolicyUrl,className:"underline underline-offset-2 hover:text-foreground",children:"Privacy Policy"}),"."]}),u.jsx(Rt,{}),n&&u.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",u.jsx("a",{href:n,className:"font-medium text-primary underline-offset-4 hover:underline",children:"Sign in"})]})]})})}const bl=fr({email:Je().email("Enter a valid email address")});function _l(){return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsx("div",{className:"h-6 w-3/4 animate-pulse rounded bg-muted mx-auto"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"}),u.jsx("div",{className:"h-10 animate-pulse rounded bg-muted"})]})}function wl({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Forgot password?"}){const{forgotPassword:a}=Ot(),{config:i,configLoading:o}=ur(),[c,l]=I.useState(""),[h,f]=I.useState(null),[p,m]=I.useState(null),[x,v]=I.useState(!1),S=I.useRef(null),{register:k,handleSubmit:C,getValues:U,formState:{errors:L,isSubmitting:b}}=er({resolver:tr(bl)});async function Z(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Hr(i.captcha.siteKey,"forgot_password"):c||(f("Please complete the captcha"),null):""}function W(){var ue;(ue=S.current)==null||ue.reset(),l(""),f(null)}const se=C(async ue=>{m(null);const V=await Z();if(V!==null)try{await a({email:ue.email,captchaToken:V}),W(),v(!0),e==null||e()}catch(z){W();const N=z instanceof Error?z:new Error("Request failed");m(N.message),r==null||r(N)}});return o?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(_l,{})}):x?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"flex flex-col items-center gap-4 p-8 text-center",children:[u.jsx(Fi,{className:"h-12 w-12 text-primary"}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"font-semibold",children:"Check your inbox"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a reset link to"," ",u.jsx("span",{className:"font-medium text-foreground",children:U("email")})]})]}),n&&u.jsx("a",{href:n,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:"Back to sign in"})]})}):u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsxs("div",{className:"p-6 space-y-5",children:[(i==null?void 0:i.logoUrl)&&u.jsx("img",{src:i.logoUrl,alt:"Logo",className:"mx-auto h-8 object-contain"}),u.jsxs("div",{className:"space-y-1 text-center",children:[u.jsx("h1",{className:"text-xl font-bold tracking-tight",children:s}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your email and we'll send you a reset link"})]}),u.jsxs("form",{onSubmit:se,noValidate:!0,className:"space-y-4",children:[p&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ue,{htmlFor:"forgot-email",children:"Email"}),u.jsx(qe,{id:"forgot-email",type:"email",placeholder:"name@example.com",autoComplete:"email",...k("email")}),L.email&&u.jsx("p",{className:"text-xs text-destructive",children:L.email.message})]}),(i==null?void 0:i.captcha.enabled)&&i.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Ft,{ref:S,config:i.captcha,onVerify:ue=>{l(ue),f(null)},onExpire:()=>l("")}),h&&u.jsx("p",{className:"text-xs text-destructive",children:h})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:b,children:[b&&u.jsx(or,{className:"animate-spin"}),b?"Sending…":"Send reset link"]})]}),n&&u.jsx("p",{className:"text-center text-sm text-muted-foreground",children:u.jsx("a",{href:n,className:"font-medium text-primary underline-offset-4 hover:underline",children:"Back to sign in"})})]})})}function ya({className:t,onSuccess:e,onError:r,label:n="Sign out",children:s}){const{logout:a}=Ot(),[i,o]=I.useState(!1),c=async()=>{o(!0);try{await a(),e==null||e()}catch(l){const h=l instanceof Error?l:new Error("Logout failed");r==null||r(h)}finally{o(!1)}};return s?u.jsx("span",{onClick:c,className:me("cursor-pointer",t),role:"button",tabIndex:0,onKeyDown:l=>l.key==="Enter"&&c(),children:s({isLoading:i})}):u.jsxs(dt,{variant:"outline",onClick:c,disabled:i,className:me("gap-2",t),children:[u.jsx(Ui,{className:"h-4 w-4"}),i?"Signing out…":n]})}function kl(t,e=[]){let r=[];function n(a,i){const o=w.createContext(i);o.displayName=a+"Context";const c=r.length;r=[...r,i];const l=f=>{var k;const{scope:p,children:m,...x}=f,v=((k=p==null?void 0:p[t])==null?void 0:k[c])||o,S=w.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:S,children:m})};l.displayName=a+"Provider";function h(f,p){var v;const m=((v=p==null?void 0:p[t])==null?void 0:v[c])||o,x=w.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,h]}const s=()=>{const a=r.map(i=>w.createContext(i));return function(o){const c=(o==null?void 0:o[t])||a;return w.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[n,Sl(s,...e)]}function Sl(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=n.reduce((o,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...o,...f}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function Cl(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}var Yt={exports:{}},Or={};/**
|
|
84
84
|
* @license React
|
|
85
85
|
* use-sync-external-store-shim.production.js
|
|
86
86
|
*
|
|
@@ -88,7 +88,7 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var A=Re(re,ie,K,se,te+"
|
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the MIT license found in the
|
|
90
90
|
* LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var
|
|
91
|
+
*/var ps;function El(){if(ps)return Or;ps=1;var t=I;function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,s=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue;function o(f,p){var m=p(),x=n({inst:{value:m,getSnapshot:p}}),v=x[0].inst,S=x[1];return a(function(){v.value=m,v.getSnapshot=p,c(v)&&S({inst:v})},[f,m,p]),s(function(){return c(v)&&S({inst:v}),f(function(){c(v)&&S({inst:v})})},[f]),i(m),m}function c(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!r(f,m)}catch{return!0}}function l(f,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return Or.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,Or}var jr={};/**
|
|
92
92
|
* @license React
|
|
93
93
|
* use-sync-external-store-shim.development.js
|
|
94
94
|
*
|
|
@@ -96,5 +96,5 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var A=Re(re,ie,K,se,te+"
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var
|
|
99
|
+
*/var ms;function Rl(){return ms||(ms=1,process.env.NODE_ENV!=="production"&&(function(){function t(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}function e(m,x){h||s.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=x();if(!f){var S=x();a(v,S)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}S=i({inst:{value:v,getSnapshot:x}});var k=S[0].inst,C=S[1];return c(function(){k.value=v,k.getSnapshot=x,r(k)&&C({inst:k})},[m,v,x]),o(function(){return r(k)&&C({inst:k}),m(function(){r(k)&&C({inst:k})})},[m]),l(v),v}function r(m){var x=m.getSnapshot;m=m.value;try{var v=x();return!a(m,v)}catch{return!0}}function n(m,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=I,a=typeof Object.is=="function"?Object.is:t,i=s.useState,o=s.useEffect,c=s.useLayoutEffect,l=s.useDebugValue,h=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;jr.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),jr}var ys;function Ol(){return ys||(ys=1,process.env.NODE_ENV==="production"?Yt.exports=El():Yt.exports=Rl()),Yt.exports}var jl=Ol();function Nl(){return jl.useSyncExternalStore(Al,()=>!0,()=>!1)}function Al(){return()=>{}}var un="Avatar",[Tl]=kl(un),[Pl,ga]=Tl(un),va=w.forwardRef((t,e)=>{const{__scopeAvatar:r,...n}=t,[s,a]=w.useState("idle");return u.jsx(Pl,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:a,children:u.jsx(Ut.span,{...n,ref:e})})});va.displayName=un;var xa="AvatarImage",ba=w.forwardRef((t,e)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...a}=t,i=ga(xa,r),o=Il(n,a),c=Cl(l=>{s(l),i.onImageLoadingStatusChange(l)});return yt(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?u.jsx(Ut.img,{...a,ref:e,src:n}):null});ba.displayName=xa;var _a="AvatarFallback",wa=w.forwardRef((t,e)=>{const{__scopeAvatar:r,delayMs:n,...s}=t,a=ga(_a,r),[i,o]=w.useState(n===void 0);return w.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>o(!0),n);return()=>window.clearTimeout(c)}},[n]),i&&a.imageLoadingStatus!=="loaded"?u.jsx(Ut.span,{...s,ref:e}):null});wa.displayName=_a;function gs(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Il(t,{referrerPolicy:e,crossOrigin:r}){const n=Nl(),s=w.useRef(null),a=n?(s.current||(s.current=new window.Image),s.current):null,[i,o]=w.useState(()=>gs(a,t));return yt(()=>{o(gs(a,t))},[a,t]),yt(()=>{const c=f=>()=>{o(f)};if(!a)return;const l=c("loaded"),h=c("error");return a.addEventListener("load",l),a.addEventListener("error",h),e&&(a.referrerPolicy=e),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",l),a.removeEventListener("error",h)}},[a,r,e]),i}var ka=va,Sa=ba,Ca=wa;const Ea=w.forwardRef(({className:t,...e},r)=>u.jsx(ka,{ref:r,className:me("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Ea.displayName=ka.displayName;const Ra=w.forwardRef(({className:t,...e},r)=>u.jsx(Sa,{ref:r,className:me("aspect-square h-full w-full",t),...e}));Ra.displayName=Sa.displayName;const Oa=w.forwardRef(({className:t,...e},r)=>u.jsx(Ca,{ref:r,className:me("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Oa.displayName=Ca.displayName;function Ll({className:t,onEditProfile:e,showLogout:r=!0,onLogoutSuccess:n}){var l,h;const{user:s,isLoading:a,isAuthenticated:i}=Ot();if(a)return u.jsx(ze,{className:me("w-full max-w-md",t),children:u.jsx(Jt,{className:"flex items-center justify-center py-10",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})})});if(!i||!s)return u.jsx(ze,{className:me("w-full max-w-md",t),children:u.jsx(Jt,{className:"py-10 text-center",children:u.jsx("p",{className:"text-sm text-muted-foreground",children:"Not signed in"})})});const o=[(l=s.firstName)==null?void 0:l[0],(h=s.lastName)==null?void 0:h[0]].filter(Boolean).join("").toUpperCase(),c=[s.firstName,s.lastName].filter(Boolean).join(" ");return u.jsxs(ze,{className:me("w-full max-w-md",t),children:[u.jsx(ra,{children:u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsxs(Ea,{className:"h-16 w-16",children:[s.avatarUrl&&u.jsx(Ra,{src:s.avatarUrl,alt:c}),u.jsx(Oa,{className:"text-lg",children:o})]}),u.jsxs("div",{className:"flex-1 space-y-1",children:[u.jsx(na,{className:"text-xl",children:c}),u.jsx(sa,{children:s.email})]}),e&&u.jsx(dt,{variant:"ghost",size:"icon",onClick:()=>e(s),"aria-label":"Edit profile",children:u.jsx(Bi,{className:"h-4 w-4"})})]})}),u.jsx(Rt,{}),u.jsxs(Jt,{className:"space-y-4 pt-4",children:[u.jsx(Nr,{icon:u.jsx(zi,{className:"h-4 w-4 text-muted-foreground"}),label:"Email",value:s.email}),s.whatsappNumber&&u.jsx(Nr,{icon:u.jsx(Zi,{className:"h-4 w-4 text-muted-foreground"}),label:"WhatsApp",value:s.whatsappNumber}),Object.entries(s).filter(([f])=>!["id","email","firstName","lastName","whatsappNumber","avatarUrl"].includes(f)).map(([f,p])=>typeof p=="string"||typeof p=="number"?u.jsx(Nr,{label:Ml(f),value:String(p)},f):null),r&&u.jsxs(u.Fragment,{children:[u.jsx(Rt,{}),u.jsx(ya,{className:"w-full",onSuccess:n})]})]})]})}function Nr({icon:t,label:e,value:r}){return u.jsxs("div",{className:"flex items-center gap-3",children:[t&&u.jsx("span",{className:"shrink-0",children:t}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),u.jsx("p",{className:"truncate text-sm",children:r})]})]})}function Ml(t){return t.replace(/([A-Z])/g," $1").replace(/_/g," ").trim().replace(/^\w/,e=>e.toUpperCase())}exports.AuthProvider=Ma;exports.ForgotPasswordForm=wl;exports.LoginForm=yl;exports.LogoutButton=ya;exports.ProfileComponent=Ll;exports.SignupForm=xl;exports.useAuth=Ot;exports.useAuthConfig=ur;
|
|
100
100
|
//# sourceMappingURL=index.cjs.map
|