@s8lab/sso-client 1.1.5 → 1.1.6

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 CHANGED
@@ -1,4 +1,4 @@
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 Va(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=Va(I),gn=new Set;function $a(t){if(gn.has(t))return;gn.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 Yr(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 xs=I.createContext(null),bs=I.createContext(null);function _s(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}class ws extends Error{constructor(e,r){super(r),this.status=e,this.name="HttpError"}}async function vn(t,e){const r=await fetch(t,{...e,credentials:"include",headers:{"Content-Type":"application/json",..._s(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 ws(r.status,n)}if(r.status!==204)return r.json()}let Nt=null;function Fa(t){return Nt||(Nt=fetch(`${t}/auth/refresh`,{method:"POST",credentials:"include"}).then(e=>e.ok).catch(()=>!1).finally(()=>{Nt=null}),Nt)}function Da({children:t,apiUrl:e,projectId:r,fetcher:n}){const[s,a]=I.useState(null),[i,o]=I.useState(!0),[c,l]=I.useState({user:null,isLoading:!0,isAuthenticated:!1}),h=I.useRef(e);h.current=e;const f=I.useRef(r);f.current=r;const m=I.useRef(n??vn);m.current=n??vn;const p=I.useCallback(async(P,L={})=>{const Z=()=>m.current(P,{...L,headers:{..._s(L.headers),"X-Project-Id":f.current}});try{return await Z()}catch(te){if(!(te instanceof ws)||te.status!==401)throw te;if(!await Fa(h.current))throw l({user:null,isLoading:!1,isAuthenticated:!1}),te;return Z()}},[]);I.useEffect(()=>{let P=!1;async function L(){var te;let Z;try{Z=await p(`${h.current}/auth/config`),P||a(Z)}catch{Z={allowSignup:!0,allowMagicLink:!1,captcha:{enabled:!1}},P||a(Z)}finally{P||o(!1)}(te=Z.captcha)!=null&&te.enabled&&Z.captcha.provider==="recaptcha"&&Z.captcha.version==="v3"&&Z.captcha.siteKey&&$a(Z.captcha.siteKey);try{const ce=await p(`${h.current}/auth/me`);P||l({user:ce,isLoading:!1,isAuthenticated:!0})}catch{P||l({user:null,isLoading:!1,isAuthenticated:!1})}}return L(),()=>{P=!0}},[]);const x=I.useCallback(async P=>{l(L=>({...L,isLoading:!0}));try{const L=await p(`${h.current}/auth/login`,{method:"POST",body:JSON.stringify(P)});l({user:L.user,isLoading:!1,isAuthenticated:!0})}catch(L){throw l(Z=>({...Z,isLoading:!1})),L}},[p]),v=I.useCallback(async P=>{l(L=>({...L,isLoading:!0}));try{const L=await p(`${h.current}/auth/signup`,{method:"POST",body:JSON.stringify(P)});l({user:L.user,isLoading:!1,isAuthenticated:!0})}catch(L){throw l(Z=>({...Z,isLoading:!1})),L}},[p]),S=I.useCallback(async()=>{l(P=>({...P,isLoading:!0}));try{await p(`${h.current}/auth/logout`,{method:"POST"}).catch(()=>{})}finally{l({user:null,isLoading:!1,isAuthenticated:!1})}},[p]),k=I.useCallback(async P=>{await p(`${h.current}/auth/forgot-password`,{method:"POST",body:JSON.stringify(P)})},[p]),C=I.useCallback(async P=>{await p(`${h.current}/auth/magic-link`,{method:"POST",body:JSON.stringify(P)})},[p]),z=I.useCallback(P=>{l(L=>L.user?{...L,user:{...L.user,...P}}:L)},[]),V=I.useMemo(()=>({...c,login:x,signup:v,logout:S,forgotPassword:k,sendMagicLink:C,updateUser:z}),[c,x,v,S,k,C,z]),b=I.useMemo(()=>({config:s,configLoading:i,apiUrl:e}),[s,i,e]);return u.jsx(bs.Provider,{value:b,children:u.jsx(xs.Provider,{value:V,children:t})})}function Ot(){const t=I.useContext(xs);if(!t)throw new Error("useAuth must be used inside <AuthProvider>");return t}function dr(){const t=I.useContext(bs);if(!t)throw new Error("useAuthConfig must be used inside <AuthProvider>");return t}var Ut=t=>t.type==="checkbox",pt=t=>t instanceof Date,Le=t=>t==null;const ks=t=>typeof t=="object";var _e=t=>!Le(t)&&!Array.isArray(t)&&ks(t)&&!pt(t),Ua=t=>_e(t)&&t.target?Ut(t.target)?t.target.checked:t.target.value:t,Ss=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,za=(t,e)=>t.has(Ss(e)),Za=t=>{const e=t.constructor&&t.constructor.prototype;return _e(e)&&e.hasOwnProperty("isPrototypeOf")},Kr=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(Kr&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(_e(t)&&Za(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 fr=t=>/^\w*$/.test(t),be=t=>t===void 0,Jr=t=>Array.isArray(t)?t.filter(Boolean):[],Xr=t=>Jr(t.replace(/["|']|\]/g,"").split(/\.|\[/)),M=(t,e,r)=>{if(!e||!_e(t))return r;const n=(fr(e)?[e]:Xr(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",me=(t,e,r)=>{let n=-1;const s=fr(e)?[e]:Xr(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"},vr="form",Cs="root",Ba=I.createContext(null);Ba.displayName="HookFormControlContext";var Wa=(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 qa=typeof window<"u"?I.useLayoutEffect:I.useEffect;var Ae=t=>typeof t=="string",Ga=(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),Tr=t=>Le(t)||!ks(t);function st(t,e,r=new WeakSet){if(Tr(t)||Tr(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 Ha=I.createContext(null);Ha.displayName="HookFormContext";var Es=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{},Lt=t=>Array.isArray(t)?t:[t],xn=()=>{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 Rs(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=Rs(s,a);_e(i)&&(r[n]=i)}else t[n]&&(r[n]=a)}return r}var Ne=t=>_e(t)&&!Object.keys(t).length,Qr=t=>t.type==="file",Qt=t=>{if(!Kr)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Os=t=>t.type==="select-multiple",en=t=>t.type==="radio",Ya=t=>en(t)||Ut(t),xr=t=>Qt(t)&&t.isConnected;function Ka(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 Ja(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:fr(e)?[e]:Xr(e),n=r.length===1?t:Ka(t,r),s=r.length-1,a=r[s];return n&&delete n[a],s!==0&&(_e(n)&&Ne(n)||Array.isArray(n)&&Ja(n))&&ke(t,r.slice(0,-1)),t}var Xa=t=>{for(const e in t)if(Ge(t[e]))return!0;return!1};function js(t){return Array.isArray(t)||_e(t)&&!Xa(t)}function Pr(t,e={}){for(const r in t){const n=t[r];js(n)?(e[r]=Array.isArray(n)?[]:{},Pr(n,e[r])):be(n)||(e[r]=!0)}return e}function xt(t,e,r){r||(r=Pr(e));for(const n in t){const s=t[n];if(js(s))be(e)||Tr(r[n])?r[n]=Pr(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 bn={value:!1,isValid:!1},_n={value:!0,isValid:!0};var Ns=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===""?_n:{value:t[0].value,isValid:!0}:_n:bn}return bn},As=(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 wn={isValid:!1,value:null};var Ts=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,wn):wn;function kn(t){const e=t.ref;return Qr(e)?e.files:en(e)?Ts(t.refs).value:Os(e)?[...e.selectedOptions].map(({value:r})=>r):Ut(e)?Ns(t.refs).value:As(be(e.value)?t.ref.value:e.value,t)}var Qa=(t,e,r,n)=>{const s={};for(const a of t){const i=M(e,a);i&&me(s,a,i._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},er=t=>t instanceof RegExp,At=t=>be(t)?t:er(t)?t.source:_e(t)?er(t.value)?t.value.source:t.value:t,Sn=t=>({isOnSubmit:!t||t===He.onSubmit,isOnBlur:t===He.onBlur,isOnChange:t===He.onChange,isOnAll:t===He.all,isOnTouch:t===He.onTouched});const Cn="AsyncFunction";var ei=t=>!!t&&!!t.validate&&!!(Ge(t.validate)&&t.validate.constructor.name===Cn||_e(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Cn)),ti=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),En=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const Mt=(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(Mt(o,e))break}else if(_e(o)&&Mt(o,e))break}}};function Rn(t,e,r){const n=M(t,r);if(n||fr(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 ri=(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))},ni=(t,e,r)=>!t||!e||t===e||Lt(t).some(n=>n&&(r?n===e:n.startsWith(e)||e.startsWith(n))),si=(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,ai=(t,e)=>!Jr(M(t,e)).length&&ke(t,e),ii=(t,e,r)=>{const n=Lt(M(t,r));return me(n,Cs,e[r]),me(t,r,n),t};function On(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)&&!er(t)?t:{value:t,message:""},jn=async(t,e,r,n,s,a)=>{const{ref:i,refs:o,required:c,maxLength:l,minLength:h,min:f,max:m,pattern:p,validate:x,name:v,valueAsNumber:S,mount:k}=t._f,C=M(r,v);if(!k||e.has(v))return{};const z=o?o[0]:i,V=$=>{s&&z.reportValidity&&(z.setCustomValidity(Ke($)?"":$||""),z.reportValidity())},b={},P=en(i),L=Ut(i),Z=P||L,te=(S||Qr(i))&&be(i.value)&&be(C)||Qt(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,ce=Es.bind(null,v,n,b),ye=($,B,re,ve=We.maxLength,ue=We.minLength)=>{const xe=$?B:re;b[v]={type:$?ve:ue,message:xe,ref:i,...ce($?ve:ue,xe)}};if(a?!Array.isArray(C)||!C.length:c&&(!Z&&(te||Le(C))||Ke(C)&&!C||L&&!Ns(o).isValid||P&&!Ts(o).isValid)){const{value:$,message:B}=Ae(c)?{value:!!c,message:c}:vt(c);if($&&(b[v]={type:We.required,message:B,ref:z,...ce(We.required,B)},!n))return V(B),b}if(!te&&(!Le(f)||!Le(m))){let $,B;const re=vt(m),ve=vt(f);if(!Le(C)&&!isNaN(C)){const ue=i.valueAsNumber||C&&+C;Le(re.value)||($=ue>re.value),Le(ve.value)||(B=ue<ve.value)}else{const ue=i.valueAsDate||new Date(C),xe=_=>new Date(new Date().toDateString()+" "+_),we=i.type=="time",Ee=i.type=="week";Ae(re.value)&&C&&($=we?xe(C)>xe(re.value):Ee?C>re.value:ue>new Date(re.value)),Ae(ve.value)&&C&&(B=we?xe(C)<xe(ve.value):Ee?C<ve.value:ue<new Date(ve.value))}if(($||B)&&(ye(!!$,re.message,ve.message,We.max,We.min),!n))return V(b[v].message),b}if((l||h)&&!te&&(Ae(C)||a&&Array.isArray(C))){const $=vt(l),B=vt(h),re=!Le($.value)&&C.length>+$.value,ve=!Le(B.value)&&C.length<+B.value;if((re||ve)&&(ye(re,$.message,B.message),!n))return V(b[v].message),b}if(p&&!te&&Ae(C)){const{value:$,message:B}=vt(p);if(er($)&&!C.match($)&&(b[v]={type:We.pattern,message:B,ref:i,...ce(We.pattern,B)},!n))return V(B),b}if(x){if(Ge(x)){const $=await x(C,r),B=On($,z);if(B&&(b[v]={...B,...ce(We.validate,B.message)},!n))return V(B.message),b}else if(_e(x)){let $={};for(const B in x){if(!Ne($)&&!n)break;const re=On(await x[B](C,r),z,B);re&&($={...re,...ce(B,re.message)},V(re.message),n&&(b[v]=$))}if(!Ne($)&&(b[v]={ref:z,...$},!n))return b}}return V(!0),b};const oi={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function ci(t={}){let e={...oi,...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 m={...f};const p={array:xn(),state:xn()},x=e.criteriaMode===He.all,v=d=>y=>{clearTimeout(l),l=setTimeout(d,y)},S=async d=>{if(!i.keepIsValid&&!e.disabled&&(f.isValid||m.isValid||d)){let y;e.resolver?(y=Ne((await Z()).errors),k()):y=await ye({fields:n,onlyCheckValid:!0,eventType:gt.VALID}),y!==r.isValid&&p.state.next({isValid:y})}},k=(d,y)=>{!e.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((d||Array.from(o.mount)).forEach(g=>{g&&(y?me(r.validatingFields,g,y):ke(r.validatingFields,g))}),p.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 U=g(M(n,d),N.argA,N.argB);O&&me(n,d,U)}if(j&&Array.isArray(M(r.errors,d))){const U=g(M(r.errors,d),N.argA,N.argB);O&&me(r.errors,d,U),ai(r.errors,d)}if((f.touchedFields||m.touchedFields)&&j&&Array.isArray(M(r.touchedFields,d))){const U=g(M(r.touchedFields,d),N.argA,N.argB);O&&me(r.touchedFields,d,U)}if(f.dirtyFields||m.dirtyFields){const U=xt(s,a),K=Ss(d);me(r.dirtyFields,K,M(U,K))}p.state.next({name:d,isDirty:B(d,y),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else me(a,d,y)},z=(d,y)=>{me(r.errors,d,y),p.state.next({errors:r.errors})},V=d=>{r.errors=d,p.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?me(a,d,y?j:kn(O._f)):ue(d,j),i.mount&&!i.action&&S()}},P=(d,y,g,N,O)=>{let j=!1,U=!1;const K={name:d};if(!e.disabled){if(!g||N){(f.isDirty||m.isDirty)&&(U=r.isDirty,r.isDirty=K.isDirty=B(),j=U!==K.isDirty);const he=st(M(s,d),y);U=!!M(r.dirtyFields,d),he?ke(r.dirtyFields,d):me(r.dirtyFields,d,!0),K.dirtyFields=r.dirtyFields,j=j||(f.dirtyFields||m.dirtyFields)&&U!==!he}if(g){const he=M(r.touchedFields,d);he||(me(r.touchedFields,d,g),K.touchedFields=r.touchedFields,j=j||(f.touchedFields||m.touchedFields)&&he!==g)}j&&O&&p.state.next(K)}return j?K:{}},L=(d,y,g,N)=>{const O=M(r.errors,d),j=(f.isValid||m.isValid)&&Ke(y)&&r.isValid!==y;if(e.delayError&&g?(c=v(()=>z(d,g)),c(e.delayError)):(clearTimeout(l),c=null,g?me(r.errors,d,g):ke(r.errors,d)),(g?!st(O,g):O)||!Ne(N)||j){const U={...N,...j&&Ke(y)?{isValid:y}:{},errors:r.errors,name:d};r={...r,...U},p.state.next(U)}},Z=async d=>(k(d,!0),await e.resolver(a,e.context,Qa(d||o.mount,n,e.criteriaMode,e.shouldUseNativeValidation))),te=async d=>{const{errors:y}=await Z(d);if(k(d),d)for(const g of d){const N=M(y,g);N?me(r.errors,g,N):ke(r.errors,g)}else r.errors=y;return y},ce=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]&&ne(`${vr}.${N}`,{message:Ae(g.message)?g.message:"",type:We.validate});else Ae(g)||!g?ne(vr,{message:g||"",type:We.validate}):Y(vr);return g}return!0},ye=async({fields:d,onlyCheckValid:y,name:g,eventType:N,context:O={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(O.runRootValidation=!0,!await ce({name:g,eventType:N})&&(O.valid=!1,y)))return O.valid;for(const j in d){const U=d[j];if(U){const{_f:K,...he}=U;if(K){const Me=o.array.has(K.name),Ye=U._f&&ei(U._f);Ye&&f.validatingFields&&k([K.name],!0);const Te=await jn(U,o.disabled,a,x,e.shouldUseNativeValidation&&!y,Me);if(Ye&&f.validatingFields&&k([K.name]),Te[K.name]&&(O.valid=!1,y)||(!y&&(M(Te,K.name)?Me?ii(r.errors,Te,K.name):me(r.errors,K.name,Te[K.name]):ke(r.errors,K.name)),t.shouldUseNativeValidation&&Te[K.name]))break}!Ne(he)&&await ye({context:O,onlyCheckValid:y,fields:he,name:j,eventType:N})}}return O.valid},$=()=>{for(const d of o.unMount){const y=M(n,d);y&&(y._f.refs?y._f.refs.every(g=>!xr(g)):!xr(y._f.ref))&&ie(d)}o.unMount=new Set},B=(d,y)=>!e.disabled&&(d&&y&&me(a,d,y),!st(q(),s)),re=(d,y,g)=>Ga(d,o,{...i.mount?a:be(y)?s:Ae(d)?{[d]:y}:y},g,y),ve=d=>Jr(M(i.mount?a:s,d,e.shouldUnregister?M(s,d,[]):[])),ue=(d,y,g={})=>{const N=M(n,d);let O=y;if(N){const j=N._f;j&&(!j.disabled&&me(a,d,As(y,j)),O=Qt(j.ref)&&Le(y)?"":y,Os(j.ref)?[...j.ref.options].forEach(U=>U.selected=O.includes(U.value)):j.refs?Ut(j.ref)?j.refs.forEach(U=>{(!U.defaultChecked||!U.disabled)&&(Array.isArray(O)?U.checked=!!O.find(K=>K===U.value):U.checked=O===U.value||!!O)}):j.refs.forEach(U=>U.checked=U.value===O):Qr(j.ref)?j.ref.value="":(j.ref.value=O,j.ref.type||p.state.next({name:d,values:Ce(a)})))}(g.shouldDirty||g.shouldTouch)&&P(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,U=M(n,j);(o.array.has(d)||_e(O)||U&&!U._f)&&!pt(O)?xe(j,O,g):ue(j,O,g)}},we=(d,y,g={})=>{const N=M(n,d),O=o.array.has(d),j=Ce(y);me(a,d,j),O?(p.array.next({name:d,values:Ce(a)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&g.shouldDirty&&p.state.next({name:d,dirtyFields:xt(s,a),isDirty:B(d,j)})):N&&!N._f&&!Le(j)?xe(d,j,g):ue(d,j,g),En(d,o)?p.state.next({...r,name:d,values:Ce(a)}):p.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=he=>{N=Number.isNaN(he)||pt(he)&&isNaN(he.getTime())||st(he,M(a,g,he))},U=Sn(e.mode),K=Sn(e.reValidateMode);if(O){let he,Me;const Ye=y.type?kn(O._f):Ua(d),Te=d.type===gt.BLUR||d.type===gt.FOCUS_OUT,Ia=!ti(O._f)&&!t.validate&&!e.resolver&&!M(r.errors,g)&&!O._f.deps||si(Te,M(r.touchedFields,g),r.isSubmitted,K,U),yr=En(g,o,Te);me(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 gr=P(g,Ye,Te),La=!Ne(gr)||yr;if(!Te&&p.state.next({name:g,type:d.type,values:Ce(a)}),Ia)return(f.isValid||m.isValid)&&(e.mode==="onBlur"?Te&&S():Te||S()),La&&p.state.next({name:g,...yr?{}:gr});if(!e.resolver&&t.validate&&await ce({name:g,eventType:d.type}),!Te&&yr&&p.state.next({...r}),e.resolver){const{errors:mn}=await Z([g]);if(k([g]),j(Ye),N){const Ma=Rn(r.errors,n,g),yn=Rn(mn,n,Ma.name||g);he=yn.error,g=yn.name,Me=Ne(mn)}}else k([g],!0),he=(await jn(O,o.disabled,a,x,e.shouldUseNativeValidation))[g],k([g]),j(Ye),N&&(he?Me=!1:(f.isValid||m.isValid)&&(Me=await ye({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),L(g,Me,he,gr))}},_=(d,y)=>{if(M(r.errors,y)&&d.focus)return d.focus(),1},R=async(d,y={})=>{let g,N;const O=Lt(d);if(e.resolver){const j=await te(be(d)?d:O);g=Ne(j),N=d?!O.some(U=>M(j,U)):g}else d?(N=(await Promise.all(O.map(async j=>{const U=M(n,j);return await ye({fields:U&&U._f?{[j]:U}:U,eventType:gt.TRIGGER})}))).every(Boolean),!(!N&&!r.isValid)&&S()):N=g=await ye({fields:n,name:d,eventType:gt.TRIGGER});return p.state.next({...!Ae(d)||(f.isValid||m.isValid)&&g!==r.isValid?{}:{name:d},...e.resolver||!d?{isValid:g}:{},errors:r.errors}),y.shouldFocus&&!N&&Mt(n,_,d?O:o.mount),N},q=(d,y)=>{let g={...i.mount?a:s};return y&&(g=Rs(y.dirtyFields?r.dirtyFields:r.touchedFields,g)),be(d)?g:Ae(d)?M(g,d):d.map(N=>M(g,N))},W=(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)}),Y=d=>{const y=d?Lt(d):void 0;y==null||y.forEach(g=>ke(r.errors,g)),y?y.forEach(g=>{p.state.next({name:g,errors:r.errors})}):p.state.next({errors:{}})},ne=(d,y,g)=>{const N=(M(n,d,{_f:{}})._f||{}).ref,O=M(r.errors,d)||{},{ref:j,message:U,type:K,...he}=O;me(r.errors,d,{...he,...y,ref:N}),p.state.next({name:d,errors:r.errors,isValid:!1}),g&&g.shouldFocus&&N&&N.focus&&N.focus()},X=(d,y)=>Ge(d)?p.state.subscribe({next:g=>"values"in g&&d(re(void 0,y),g)}):re(d,y,!0),Q=d=>p.state.subscribe({next:y=>{ni(d.name,y.name,d.exact)&&ri(y,d.formState||f,Pa,d.reRenderRoot)&&d.callback({values:{...a},...r,...y,defaultValues:s})}}).unsubscribe,ae=d=>(i.mount=!0,m={...m,...d.formState},Q({...d,formState:{...h,...d.formState}})),ie=(d,y={})=>{for(const g of d?Lt(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);p.state.next({values:Ce(a)}),p.state.next({...r,...y.keepDirty?{isDirty:B()}:{}}),!y.keepIsValid&&S()},se=({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 me(n,d,{...g||{},_f:{...g&&g._f?g._f:{ref:{name:d}},name:d,mount:!0,...y}}),o.mount.add(d),g?se({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:At(y.min),max:At(y.max),minLength:At(y.minLength),maxLength:At(y.maxLength),pattern:At(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,U=Ya(j),K=g._f.refs||[];if(U?K.find(he=>he===j):j===g._f.ref)return;me(n,d,{_f:{...g._f,...U?{refs:[...K.filter(xr),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)&&!(za(o.array,d)&&i.action)&&o.unMount.add(d)}}},A=()=>e.shouldFocusError&&Mt(n,_,o.mount),Fe=d=>{Ke(d)&&(p.state.next({disabled:d}),Mt(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(p.state.next({isSubmitting:!0}),e.resolver){const{errors:j,values:U}=await Z();k(),r.errors=j,O=Ce(U)}else await ye({fields:n,eventType:gt.SUBMIT});if(o.disabled.size)for(const j of o.disabled)ke(O,j);if(ke(r.errors,Cs),Ne(r.errors)){p.state.next({errors:{}});try{await d(O,g)}catch(j){N=j}}else y&&await y({...r.errors},g),A(),setTimeout(A);if(p.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),me(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()),p.state.next({...r}))},fn=(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 U=new Set([...o.mount,...Object.keys(xt(s,a))]);for(const K of Array.from(U)){const he=M(r.dirtyFields,K),Me=M(a,K),Ye=M(j,K);he&&!be(Me)?me(j,K,Me):!he&&!be(Ye)&&we(K,Ye)}}else{if(Kr&&be(d))for(const U of o.mount){const K=M(n,U);if(K&&K._f){const he=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(Qt(he)){const Me=he.closest("form");if(Me){Me.reset();break}}}}if(y.keepFieldsRef)for(const U of o.mount)we(U,M(j,U));else n={}}a=e.shouldUnregister?y.keepDefaultValues?Ce(s):{}:Ce(j),p.array.next({values:{...j}}),p.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={}),p.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})},hn=(d,y)=>fn(Ge(d)?d(a):d,{...e.resetOptions,...y}),Ta=(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()})}},Pa=d=>{r={...r,...d}},pn={control:{register:Re,unregister:ie,getFieldState:W,handleSubmit:ht,setError:ne,_subscribe:Q,_runSchema:Z,_updateIsValidating:k,_focusError:A,_getWatch:re,_getDirty:B,_setValid:S,_setFieldArray:C,_setDisabledField:se,_setErrors:V,_getFieldArray:ve,_reset:fn,_resetDefaultValues:()=>Ge(e.defaultValues)&&e.defaultValues().then(d=>{hn(d,e.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:$,_disableForm:Fe,_subjects:p,_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:ae,trigger:R,register:Re,handleSubmit:ht,watch:X,setValue:we,getValues:q,reset:hn,resetField:Zt,clearErrors:Y,unregister:ie,setError:ne,setFocus:Ta,getFieldState:W};return{...pn,formControl:pn}}function tr(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}=ci(t);e.current={...o,formState:n}}const a=e.current.control;return a._options=t,qa(()=>{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(()=>Wa(n,a),[a,n]),e.current}const Nn=(t,e,r)=>{if(t&&"reportValidity"in t){const n=M(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Ps=(t,e)=>{for(const r in e.fields){const n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?Nn(n.ref,r,t):n.refs&&n.refs.forEach(s=>Nn(s,r,t))}},li=(t,e)=>{e.shouldUseNativeValidation&&Ps(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(ui(e.names||Object.keys(t),n)){const i=Object.assign({},M(r,n));me(i,"root",a),me(r,n,i)}else me(r,n,a)}return r},ui=(t,e)=>t.some(r=>r.startsWith(e+"."));var di=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]=Es(i,e,r,s,l?[].concat(l,n.message):n.message)}t.shift()}return r},rr=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&&Ps({},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:li(di(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 An;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(An||(An={}));const F=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 F.undefined;case"string":return F.string;case"number":return Number.isNaN(t)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(t)?F.array:t===null?F.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?F.promise:typeof Map<"u"&&t instanceof Map?F.map:typeof Set<"u"&&t instanceof Set?F.set:typeof Date<"u"&&t instanceof Date?F.date:F.object;default:return F.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 Ir=(t,e)=>{let r;switch(t.code){case E.invalid_type:t.received===F.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 fi=Ir;function hi(){return fi}const pi=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 T(t,e){const r=hi(),n=pi({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Ir?void 0:Ir].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 G;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 G;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 G=Object.freeze({status:"aborted"}),It=t=>({status:"dirty",value:t}),Ze=t=>({status:"valid",value:t}),Tn=t=>t.status==="aborted",Pn=t=>t.status==="dirty",wt=t=>t.status==="valid",nr=t=>typeof Promise<"u"&&t instanceof Promise;var D;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(D||(D={}));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 In=(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 ee(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 oe{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(nr(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 In(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(nr(s)?s:Promise.resolve(s));return In(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:H.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 or.create(this,this._def)}or(e){return ar.create([this,e],this._def)}and(e){return ir.create(this,e,this._def)}transform(e){return new St({...ee(this._def),schema:this,typeName:H.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Vr({...ee(this._def),innerType:this,defaultValue:r,typeName:H.ZodDefault})}brand(){return new Vi({typeName:H.ZodBranded,type:this,...ee(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new $r({...ee(this._def),innerType:this,catchValue:r,typeName:H.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return tn.create(this,e)}readonly(){return Fr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mi=/^c[^\s-]{8,}$/i,yi=/^[0-9a-z]+$/,gi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vi=/^[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,xi=/^[a-z0-9_-]{21}$/i,bi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_i=/^[-+]?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)?)??$/,wi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ki="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let br;const Si=/^(?:(?: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])$/,Ci=/^(?:(?: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])$/,Ei=/^(([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]))$/,Ri=/^(([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])$/,Oi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ji=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Is="((\\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])))",Ni=new RegExp(`^${Is}$`);function Ls(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 Ai(t){return new RegExp(`^${Ls(t)}$`)}function Ti(t){let e=`${Is}T${Ls(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 Pi(t,e){return!!((e==="v4"||!e)&&Si.test(t)||(e==="v6"||!e)&&Ei.test(t))}function Ii(t,e){if(!bi.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 Li(t,e){return!!((e==="v4"||!e)&&Ci.test(t)||(e==="v6"||!e)&&Ri.test(t))}class it extends oe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==F.string){const a=this._getOrReturnCtx(e);return T(a,{code:E.invalid_type,expected:F.string,received:a.parsedType}),G}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),T(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),T(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?T(s,{code:E.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&T(s,{code:E.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")wi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"email",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")br||(br=new RegExp(ki,"u")),br.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"emoji",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")vi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"uuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")xi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"nanoid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")mi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"cuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")yi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"cuid2",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")gi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(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),T(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),T(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),T(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),T(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),T(s,{code:E.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Ti(a).test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{code:E.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Ni.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{code:E.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Ai(a).test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{code:E.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?_i.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"duration",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Pi(e.data,a.version)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"ip",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?Ii(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"jwt",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Li(e.data,a.version)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"cidr",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Oi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"base64",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?ji.test(e.data)||(s=this._getOrReturnCtx(e,s),T(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,...D.errToObj(n)})}_addCheck(e){return new it({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...D.errToObj(e)})}url(e){return this._addCheck({kind:"url",...D.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...D.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...D.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...D.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...D.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...D.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...D.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...D.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...D.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...D.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...D.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...D.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,...D.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,...D.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...D.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...D.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...D.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...D.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...D.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...D.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...D.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...D.errToObj(r)})}nonempty(e){return this.min(1,D.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:H.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ee(t)});function Mi(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 Vt extends oe{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)!==F.number){const a=this._getOrReturnCtx(e);return T(a,{code:E.invalid_type,expected:F.number,received:a.parsedType}),G}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),T(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),T(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),T(n,{code:E.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Mi(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),T(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),T(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,D.toString(r))}gt(e,r){return this.setLimit("min",e,!1,D.toString(r))}lte(e,r){return this.setLimit("max",e,!0,D.toString(r))}lt(e,r){return this.setLimit("max",e,!1,D.toString(r))}setLimit(e,r,n,s){return new Vt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:D.toString(s)}]})}_addCheck(e){return new Vt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:D.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:D.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:D.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:D.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:D.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:D.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)}}Vt.create=t=>new Vt({checks:[],typeName:H.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ee(t)});class $t extends oe{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)!==F.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),T(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),T(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),T(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 T(r,{code:E.invalid_type,expected:F.bigint,received:r.parsedType}),G}gte(e,r){return this.setLimit("min",e,!0,D.toString(r))}gt(e,r){return this.setLimit("min",e,!1,D.toString(r))}lte(e,r){return this.setLimit("max",e,!0,D.toString(r))}lt(e,r){return this.setLimit("max",e,!1,D.toString(r))}setLimit(e,r,n,s){return new $t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:D.toString(s)}]})}_addCheck(e){return new $t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:D.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:D.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}}$t.create=t=>new $t({checks:[],typeName:H.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ee(t)});class Ln extends oe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==F.boolean){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:F.boolean,received:n.parsedType}),G}return Ze(e.data)}}Ln.create=t=>new Ln({typeName:H.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ee(t)});class sr extends oe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==F.date){const a=this._getOrReturnCtx(e);return T(a,{code:E.invalid_type,expected:F.date,received:a.parsedType}),G}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return T(a,{code:E.invalid_date}),G}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),T(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),T(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 sr({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:D.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:D.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}}sr.create=t=>new sr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:H.ZodDate,...ee(t)});class Mn extends oe{_parse(e){if(this._getType(e)!==F.symbol){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:F.symbol,received:n.parsedType}),G}return Ze(e.data)}}Mn.create=t=>new Mn({typeName:H.ZodSymbol,...ee(t)});class Vn extends oe{_parse(e){if(this._getType(e)!==F.undefined){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:F.undefined,received:n.parsedType}),G}return Ze(e.data)}}Vn.create=t=>new Vn({typeName:H.ZodUndefined,...ee(t)});class $n extends oe{_parse(e){if(this._getType(e)!==F.null){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:F.null,received:n.parsedType}),G}return Ze(e.data)}}$n.create=t=>new $n({typeName:H.ZodNull,...ee(t)});class Fn extends oe{constructor(){super(...arguments),this._any=!0}_parse(e){return Ze(e.data)}}Fn.create=t=>new Fn({typeName:H.ZodAny,...ee(t)});class Dn extends oe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ze(e.data)}}Dn.create=t=>new Dn({typeName:H.ZodUnknown,...ee(t)});class ut extends oe{_parse(e){const r=this._getOrReturnCtx(e);return T(r,{code:E.invalid_type,expected:F.never,received:r.parsedType}),G}}ut.create=t=>new ut({typeName:H.ZodNever,...ee(t)});class Un extends oe{_parse(e){if(this._getType(e)!==F.undefined){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:F.void,received:n.parsedType}),G}return Ze(e.data)}}Un.create=t=>new Un({typeName:H.ZodVoid,...ee(t)});class Xe extends oe{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==F.array)return T(r,{code:E.invalid_type,expected:F.array,received:r.parsedType}),G;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(i||o)&&(T(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&&(T(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&&(T(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:D.toString(r)}})}max(e,r){return new Xe({...this._def,maxLength:{value:e,message:D.toString(r)}})}length(e,r){return new Xe({...this._def,exactLength:{value:e,message:D.toString(r)}})}nonempty(e){return this.min(1,e)}}Xe.create=(t,e)=>new Xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:H.ZodArray,...ee(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 oe{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)!==F.object){const l=this._getOrReturnCtx(e);return T(l,{code:E.invalid_type,expected:F.object,received:l.parsedType}),G}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&&(T(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,m=await h.value;l.push({key:f,value:m,alwaysSet:h.alwaysSet})}return l}).then(l=>$e.mergeObjectSync(n,l)):$e.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return D.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:D.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:H.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 Ms(le.objectKeys(this.shape))}}Se.create=(t,e)=>new Se({shape:()=>t,unknownKeys:"strip",catchall:ut.create(),typeName:H.ZodObject,...ee(e)});Se.strictCreate=(t,e)=>new Se({shape:()=>t,unknownKeys:"strict",catchall:ut.create(),typeName:H.ZodObject,...ee(e)});Se.lazycreate=(t,e)=>new Se({shape:t,unknownKeys:"strip",catchall:ut.create(),typeName:H.ZodObject,...ee(e)});class ar extends oe{_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 T(r,{code:E.invalid_union,unionErrors:i}),G}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 T(r,{code:E.invalid_union,unionErrors:o}),G}}get options(){return this._def.options}}ar.create=(t,e)=>new ar({options:t,typeName:H.ZodUnion,...ee(e)});function Lr(t,e){const r=nt(t),n=nt(e);if(t===e)return{valid:!0,data:t};if(r===F.object&&n===F.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=Lr(t[o],e[o]);if(!c.valid)return{valid:!1};i[o]=c.data}return{valid:!0,data:i}}else if(r===F.array&&n===F.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=Lr(i,o);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===F.date&&n===F.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ir extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Tn(a)||Tn(i))return G;const o=Lr(a.value,i.value);return o.valid?((Pn(a)||Pn(i))&&r.dirty(),{status:r.value,value:o.data}):(T(n,{code:E.invalid_intersection_types}),G)};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}))}}ir.create=(t,e,r)=>new ir({left:t,right:e,typeName:H.ZodIntersection,...ee(r)});class mt extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==F.array)return T(n,{code:E.invalid_type,expected:F.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return T(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&n.data.length>this._def.items.length&&(T(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:H.ZodTuple,rest:null,...ee(e)})};class zn extends oe{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!==F.map)return T(n,{code:E.invalid_type,expected:F.map,received:n.parsedType}),G;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 G;(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 G;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),o.set(l.value,h.value)}return{status:r.value,value:o}}}}zn.create=(t,e,r)=>new zn({valueType:e,keyType:t,typeName:H.ZodMap,...ee(r)});class Ft extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==F.set)return T(n,{code:E.invalid_type,expected:F.set,received:n.parsedType}),G;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(T(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&&(T(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 G;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 Ft({...this._def,minSize:{value:e,message:D.toString(r)}})}max(e,r){return new Ft({...this._def,maxSize:{value:e,message:D.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Ft.create=(t,e)=>new Ft({valueType:t,minSize:null,maxSize:null,typeName:H.ZodSet,...ee(e)});class Zn extends oe{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:H.ZodLazy,...ee(e)});class Mr extends oe{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return T(r,{received:r.data,code:E.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:e.data}}get value(){return this._def.value}}Mr.create=(t,e)=>new Mr({value:t,typeName:H.ZodLiteral,...ee(e)});function Ms(t,e){return new kt({values:t,typeName:H.ZodEnum,...ee(e)})}class kt extends oe{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return T(r,{expected:le.joinValues(n),received:r.parsedType,code:E.invalid_type}),G}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 T(r,{received:r.data,code:E.invalid_enum_value,options:n}),G}return Ze(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=Ms;class Bn extends oe{_parse(e){const r=le.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==F.string&&n.parsedType!==F.number){const s=le.objectValues(r);return T(n,{expected:le.joinValues(s),received:n.parsedType,code:E.invalid_type}),G}if(this._cache||(this._cache=new Set(le.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=le.objectValues(r);return T(n,{received:n.data,code:E.invalid_enum_value,options:s}),G}return Ze(e.data)}get enum(){return this._def.values}}Bn.create=(t,e)=>new Bn({values:t,typeName:H.ZodNativeEnum,...ee(e)});class or extends oe{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==F.promise&&r.common.async===!1)return T(r,{code:E.invalid_type,expected:F.promise,received:r.parsedType}),G;const n=r.parsedType===F.promise?r.data:Promise.resolve(r.data);return Ze(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}or.create=(t,e)=>new or({type:t,typeName:H.ZodPromise,...ee(e)});class St extends oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===H.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=>{T(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 G;const c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?G:c.status==="dirty"||r.value==="dirty"?It(c.value):c});{if(r.value==="aborted")return G;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?G:o.status==="dirty"||r.value==="dirty"?It(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"?G:(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"?G:(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 G;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})):G);le.assertNever(s)}}St.create=(t,e,r)=>new St({schema:t,typeName:H.ZodEffects,effect:e,...ee(r)});St.createWithPreprocess=(t,e,r)=>new St({schema:e,effect:{type:"preprocess",transform:t},typeName:H.ZodEffects,...ee(r)});class ot extends oe{_parse(e){return this._getType(e)===F.undefined?Ze(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ot.create=(t,e)=>new ot({innerType:t,typeName:H.ZodOptional,...ee(e)});class Ct extends oe{_parse(e){return this._getType(e)===F.null?Ze(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ct.create=(t,e)=>new Ct({innerType:t,typeName:H.ZodNullable,...ee(e)});class Vr extends oe{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===F.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Vr.create=(t,e)=>new Vr({innerType:t,typeName:H.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ee(e)});class $r extends oe{_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 nr(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}}$r.create=(t,e)=>new $r({innerType:t,typeName:H.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ee(e)});class Wn extends oe{_parse(e){if(this._getType(e)!==F.nan){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:F.nan,received:n.parsedType}),G}return{status:"valid",value:e.data}}}Wn.create=t=>new Wn({typeName:H.ZodNaN,...ee(t)});class Vi extends oe{_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 tn extends oe{_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"?G:a.status==="dirty"?(r.dirty(),It(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"?G: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 tn({in:e,out:r,typeName:H.ZodPipeline})}}class Fr extends oe{_parse(e){const r=this._def.innerType._parse(e),n=s=>(wt(s)&&(s.value=Object.freeze(s.value)),s);return nr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Fr.create=(t,e)=>new Fr({innerType:t,typeName:H.ZodReadonly,...ee(e)});var H;(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"})(H||(H={}));const Je=it.create;ut.create;Xe.create;const hr=Se.create;ar.create;ir.create;mt.create;const $i=Mr.create;kt.create;or.create;ot.create;Ct.create;/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const u=require("react/jsx-runtime"),P=require("react");require("react-dom");function Va(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=Va(P),gn=new Set;function $a(t){if(gn.has(t))return;gn.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 Yr(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 xs=P.createContext(null),bs=P.createContext(null);function _s(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}class ws extends Error{constructor(e,r){super(r),this.status=e,this.name="HttpError"}}async function vn(t,e){const r=await fetch(t,{...e,credentials:"include",headers:{"Content-Type":"application/json",..._s(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 ws(r.status,n)}if(r.status!==204)return r.json()}let Nt=null;function Fa(t){return Nt||(Nt=fetch(`${t}/auth/refresh`,{method:"POST",credentials:"include"}).then(e=>e.ok).catch(()=>!1).finally(()=>{Nt=null}),Nt)}function Da({children:t,apiUrl:e,projectId:r,fetcher:n,rootPath:s="/"}){const[a,i]=P.useState(null),[o,c]=P.useState(!0),[l,h]=P.useState({user:null,isLoading:!0,isAuthenticated:!1}),f=P.useRef(e);f.current=e;const p=P.useRef(r);p.current=r;const m=P.useRef(n??vn);m.current=n??vn;const x=P.useCallback(async(M,z={})=>{const B=()=>m.current(M,{...z,headers:{..._s(z.headers),"X-Project-Id":p.current}});try{return await B()}catch(re){if(!(re instanceof ws)||re.status!==401)throw re;if(!await Fa(f.current))throw h({user:null,isLoading:!1,isAuthenticated:!1}),re;return B()}},[]);P.useEffect(()=>{let M=!1;async function z(){var re;let B;try{B=await x(`${f.current}/auth/config`),M||i(B)}catch{B={allowSignup:!0,allowMagicLink:!1,captcha:{enabled:!1}},M||i(B)}finally{M||c(!1)}(re=B.captcha)!=null&&re.enabled&&B.captcha.provider==="recaptcha"&&B.captcha.version==="v3"&&B.captcha.siteKey&&$a(B.captcha.siteKey);try{const he=await x(`${f.current}/auth/me`);M||h({user:he,isLoading:!1,isAuthenticated:!0})}catch{M||h({user:null,isLoading:!1,isAuthenticated:!1})}}return z(),()=>{M=!0}},[]);const v=P.useCallback(async M=>{h(z=>({...z,isLoading:!0}));try{const z=await x(`${f.current}/auth/login`,{method:"POST",body:JSON.stringify(M)});h({user:z.user,isLoading:!1,isAuthenticated:!0})}catch(z){throw h(B=>({...B,isLoading:!1})),z}},[x]),S=P.useCallback(async M=>{h(z=>({...z,isLoading:!0}));try{const z=await x(`${f.current}/auth/signup`,{method:"POST",body:JSON.stringify(M)});h({user:z.user,isLoading:!1,isAuthenticated:!0})}catch(z){throw h(B=>({...B,isLoading:!1})),z}},[x]),k=P.useCallback(async()=>{h(M=>({...M,isLoading:!0}));try{await x(`${f.current}/auth/logout`,{method:"POST"}).catch(()=>{})}finally{h({user:null,isLoading:!1,isAuthenticated:!1})}},[x]),C=P.useCallback(async M=>{await x(`${f.current}/auth/forgot-password`,{method:"POST",body:JSON.stringify(M)})},[x]),U=P.useCallback(async M=>{await x(`${f.current}/auth/magic-link`,{method:"POST",body:JSON.stringify(M)})},[x]),I=P.useCallback(M=>{h(z=>z.user?{...z,user:{...z.user,...M}}:z)},[]),b=P.useMemo(()=>({...l,login:v,signup:S,logout:k,forgotPassword:C,sendMagicLink:U,updateUser:I}),[l,v,S,k,C,U,I]),Z=P.useMemo(()=>({config:a,configLoading:o,apiUrl:e,rootPath:s}),[a,o,e,s]);return u.jsx(bs.Provider,{value:Z,children:u.jsx(xs.Provider,{value:b,children:t})})}function Ot(){const t=P.useContext(xs);if(!t)throw new Error("useAuth must be used inside <AuthProvider>");return t}function dr(){const t=P.useContext(bs);if(!t)throw new Error("useAuthConfig must be used inside <AuthProvider>");return t}var Ut=t=>t.type==="checkbox",pt=t=>t instanceof Date,Le=t=>t==null;const ks=t=>typeof t=="object";var _e=t=>!Le(t)&&!Array.isArray(t)&&ks(t)&&!pt(t),Ua=t=>_e(t)&&t.target?Ut(t.target)?t.target.checked:t.target.value:t,Ss=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,za=(t,e)=>t.has(Ss(e)),Za=t=>{const e=t.constructor&&t.constructor.prototype;return _e(e)&&e.hasOwnProperty("isPrototypeOf")},Kr=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(Kr&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(_e(t)&&Za(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 fr=t=>/^\w*$/.test(t),be=t=>t===void 0,Jr=t=>Array.isArray(t)?t.filter(Boolean):[],Xr=t=>Jr(t.replace(/["|']|\]/g,"").split(/\.|\[/)),L=(t,e,r)=>{if(!e||!_e(t))return r;const n=(fr(e)?[e]:Xr(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=fr(e)?[e]:Xr(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"},vr="form",Cs="root",Ba=P.createContext(null);Ba.displayName="HookFormControlContext";var Wa=(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 qa=typeof window<"u"?P.useLayoutEffect:P.useEffect;var Ae=t=>typeof t=="string",Ga=(t,e,r,n,s)=>Ae(t)?(n&&e.watch.add(t),L(r,t,s)):Array.isArray(t)?t.map(a=>(n&&e.watch.add(a),L(r,a))):(n&&(e.watchAll=!0),r),Tr=t=>Le(t)||!ks(t);function st(t,e,r=new WeakSet){if(Tr(t)||Tr(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 Ha=P.createContext(null);Ha.displayName="HookFormContext";var Es=(t,e,r,n,s)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[n]:s||!0}}:{},Lt=t=>Array.isArray(t)?t:[t],xn=()=>{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 Rs(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=Rs(s,a);_e(i)&&(r[n]=i)}else t[n]&&(r[n]=a)}return r}var Ne=t=>_e(t)&&!Object.keys(t).length,Qr=t=>t.type==="file",Qt=t=>{if(!Kr)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Os=t=>t.type==="select-multiple",en=t=>t.type==="radio",Ya=t=>en(t)||Ut(t),xr=t=>Qt(t)&&t.isConnected;function Ka(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 Ja(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:fr(e)?[e]:Xr(e),n=r.length===1?t:Ka(t,r),s=r.length-1,a=r[s];return n&&delete n[a],s!==0&&(_e(n)&&Ne(n)||Array.isArray(n)&&Ja(n))&&ke(t,r.slice(0,-1)),t}var Xa=t=>{for(const e in t)if(Ge(t[e]))return!0;return!1};function js(t){return Array.isArray(t)||_e(t)&&!Xa(t)}function Pr(t,e={}){for(const r in t){const n=t[r];js(n)?(e[r]=Array.isArray(n)?[]:{},Pr(n,e[r])):be(n)||(e[r]=!0)}return e}function xt(t,e,r){r||(r=Pr(e));for(const n in t){const s=t[n];if(js(s))be(e)||Tr(r[n])?r[n]=Pr(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 bn={value:!1,isValid:!1},_n={value:!0,isValid:!0};var Ns=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===""?_n:{value:t[0].value,isValid:!0}:_n:bn}return bn},As=(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 wn={isValid:!1,value:null};var Ts=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,wn):wn;function kn(t){const e=t.ref;return Qr(e)?e.files:en(e)?Ts(t.refs).value:Os(e)?[...e.selectedOptions].map(({value:r})=>r):Ut(e)?Ns(t.refs).value:As(be(e.value)?t.ref.value:e.value,t)}var Qa=(t,e,r,n)=>{const s={};for(const a of t){const i=L(e,a);i&&ye(s,a,i._f)}return{criteriaMode:r,names:[...t],fields:s,shouldUseNativeValidation:n}},er=t=>t instanceof RegExp,At=t=>be(t)?t:er(t)?t.source:_e(t)?er(t.value)?t.value.source:t.value:t,Sn=t=>({isOnSubmit:!t||t===He.onSubmit,isOnBlur:t===He.onBlur,isOnChange:t===He.onChange,isOnAll:t===He.all,isOnTouch:t===He.onTouched});const Cn="AsyncFunction";var ei=t=>!!t&&!!t.validate&&!!(Ge(t.validate)&&t.validate.constructor.name===Cn||_e(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Cn)),ti=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),En=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(n=>t.startsWith(n)&&/^\.\w+/.test(t.slice(n.length))));const Mt=(t,e,r,n)=>{for(const s of r||Object.keys(t)){const a=L(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(Mt(o,e))break}else if(_e(o)&&Mt(o,e))break}}};function Rn(t,e,r){const n=L(t,r);if(n||fr(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const a=s.join("."),i=L(e,a),o=L(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 ri=(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))},ni=(t,e,r)=>!t||!e||t===e||Lt(t).some(n=>n&&(r?n===e:n.startsWith(e)||e.startsWith(n))),si=(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,ai=(t,e)=>!Jr(L(t,e)).length&&ke(t,e),ii=(t,e,r)=>{const n=Lt(L(t,r));return ye(n,Cs,e[r]),ye(t,r,n),t};function On(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)&&!er(t)?t:{value:t,message:""},jn=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=L(r,v);if(!k||e.has(v))return{};const U=o?o[0]:i,I=V=>{s&&U.reportValidity&&(U.setCustomValidity(Ke(V)?"":V||""),U.reportValidity())},b={},Z=en(i),M=Ut(i),z=Z||M,B=(S||Qr(i))&&be(i.value)&&be(C)||Qt(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,re=Es.bind(null,v,n,b),he=(V,W,ne,ve=We.maxLength,ue=We.minLength)=>{const xe=V?W:ne;b[v]={type:V?ve:ue,message:xe,ref:i,...re(V?ve:ue,xe)}};if(a?!Array.isArray(C)||!C.length:c&&(!z&&(B||Le(C))||Ke(C)&&!C||M&&!Ns(o).isValid||Z&&!Ts(o).isValid)){const{value:V,message:W}=Ae(c)?{value:!!c,message:c}:vt(c);if(V&&(b[v]={type:We.required,message:W,ref:U,...re(We.required,W)},!n))return I(W),b}if(!B&&(!Le(f)||!Le(p))){let V,W;const ne=vt(p),ve=vt(f);if(!Le(C)&&!isNaN(C)){const ue=i.valueAsNumber||C&&+C;Le(ne.value)||(V=ue>ne.value),Le(ve.value)||(W=ue<ve.value)}else{const ue=i.valueAsDate||new Date(C),xe=_=>new Date(new Date().toDateString()+" "+_),we=i.type=="time",Ee=i.type=="week";Ae(ne.value)&&C&&(V=we?xe(C)>xe(ne.value):Ee?C>ne.value:ue>new Date(ne.value)),Ae(ve.value)&&C&&(W=we?xe(C)<xe(ve.value):Ee?C<ve.value:ue<new Date(ve.value))}if((V||W)&&(he(!!V,ne.message,ve.message,We.max,We.min),!n))return I(b[v].message),b}if((l||h)&&!B&&(Ae(C)||a&&Array.isArray(C))){const V=vt(l),W=vt(h),ne=!Le(V.value)&&C.length>+V.value,ve=!Le(W.value)&&C.length<+W.value;if((ne||ve)&&(he(ne,V.message,W.message),!n))return I(b[v].message),b}if(m&&!B&&Ae(C)){const{value:V,message:W}=vt(m);if(er(V)&&!C.match(V)&&(b[v]={type:We.pattern,message:W,ref:i,...re(We.pattern,W)},!n))return I(W),b}if(x){if(Ge(x)){const V=await x(C,r),W=On(V,U);if(W&&(b[v]={...W,...re(We.validate,W.message)},!n))return I(W.message),b}else if(_e(x)){let V={};for(const W in x){if(!Ne(V)&&!n)break;const ne=On(await x[W](C,r),U,W);ne&&(V={...ne,...re(W,ne.message)},I(ne.message),n&&(b[v]=V))}if(!Ne(V)&&(b[v]={ref:U,...V},!n))return b}}return I(!0),b};const oi={mode:He.onSubmit,reValidateMode:He.onChange,shouldFocusError:!0};function ci(t={}){let e={...oi,...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:xn(),state:xn()},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 z()).errors),k()):y=await he({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(L(n,d))){const D=g(L(n,d),N.argA,N.argB);O&&ye(n,d,D)}if(j&&Array.isArray(L(r.errors,d))){const D=g(L(r.errors,d),N.argA,N.argB);O&&ye(r.errors,d,D),ai(r.errors,d)}if((f.touchedFields||p.touchedFields)&&j&&Array.isArray(L(r.touchedFields,d))){const D=g(L(r.touchedFields,d),N.argA,N.argB);O&&ye(r.touchedFields,d,D)}if(f.dirtyFields||p.dirtyFields){const D=xt(s,a),J=Ss(d);ye(r.dirtyFields,J,L(D,J))}m.state.next({name:d,isDirty:W(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})},I=d=>{r.errors=d,m.state.next({errors:r.errors,isValid:!1})},b=(d,y,g,N)=>{const O=L(n,d);if(O){const j=L(a,d,be(g)?L(s,d):g);be(j)||N&&N.defaultChecked||y?ye(a,d,y?j:kn(O._f)):ue(d,j),i.mount&&!i.action&&S()}},Z=(d,y,g,N,O)=>{let j=!1,D=!1;const J={name:d};if(!e.disabled){if(!g||N){(f.isDirty||p.isDirty)&&(D=r.isDirty,r.isDirty=J.isDirty=W(),j=D!==J.isDirty);const pe=st(L(s,d),y);D=!!L(r.dirtyFields,d),pe?ke(r.dirtyFields,d):ye(r.dirtyFields,d,!0),J.dirtyFields=r.dirtyFields,j=j||(f.dirtyFields||p.dirtyFields)&&D!==!pe}if(g){const pe=L(r.touchedFields,d);pe||(ye(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:{}},M=(d,y,g,N)=>{const O=L(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)}},z=async d=>(k(d,!0),await e.resolver(a,e.context,Qa(d||o.mount,n,e.criteriaMode,e.shouldUseNativeValidation))),B=async d=>{const{errors:y}=await z(d);if(k(d),d)for(const g of d){const N=L(y,g);N?ye(r.errors,g,N):ke(r.errors,g)}else r.errors=y;return y},re=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(`${vr}.${N}`,{message:Ae(g.message)?g.message:"",type:We.validate});else Ae(g)||!g?se(vr,{message:g||"",type:We.validate}):K(vr);return g}return!0},he=async({fields:d,onlyCheckValid:y,name:g,eventType:N,context:O={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(O.runRootValidation=!0,!await re({name:g,eventType:N})&&(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&&ei(D._f);Ye&&f.validatingFields&&k([J.name],!0);const Te=await jn(D,o.disabled,a,x,e.shouldUseNativeValidation&&!y,Me);if(Ye&&f.validatingFields&&k([J.name]),Te[J.name]&&(O.valid=!1,y)||(!y&&(L(Te,J.name)?Me?ii(r.errors,Te,J.name):ye(r.errors,J.name,Te[J.name]):ke(r.errors,J.name)),t.shouldUseNativeValidation&&Te[J.name]))break}!Ne(pe)&&await he({context:O,onlyCheckValid:y,fields:pe,name:j,eventType:N})}}return O.valid},V=()=>{for(const d of o.unMount){const y=L(n,d);y&&(y._f.refs?y._f.refs.every(g=>!xr(g)):!xr(y._f.ref))&&oe(d)}o.unMount=new Set},W=(d,y)=>!e.disabled&&(d&&y&&ye(a,d,y),!st(G(),s)),ne=(d,y,g)=>Ga(d,o,{...i.mount?a:be(y)?s:Ae(d)?{[d]:y}:y},g,y),ve=d=>Jr(L(i.mount?a:s,d,e.shouldUnregister?L(s,d,[]):[])),ue=(d,y,g={})=>{const N=L(n,d);let O=y;if(N){const j=N._f;j&&(!j.disabled&&ye(a,d,As(y,j)),O=Qt(j.ref)&&Le(y)?"":y,Os(j.ref)?[...j.ref.options].forEach(D=>D.selected=O.includes(D.value)):j.refs?Ut(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):Qr(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 N in y){if(!y.hasOwnProperty(N))return;const O=y[N],j=d+"."+N,D=L(n,j);(o.array.has(d)||_e(O)||D&&!D._f)&&!pt(O)?xe(j,O,g):ue(j,O,g)}},we=(d,y,g={})=>{const N=L(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:W(d,j)})):N&&!N._f&&!Le(j)?xe(d,j,g):ue(d,j,g),En(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=L(n,g),j=pe=>{N=Number.isNaN(pe)||pt(pe)&&isNaN(pe.getTime())||st(pe,L(a,g,pe))},D=Sn(e.mode),J=Sn(e.reValidateMode);if(O){let pe,Me;const Ye=y.type?kn(O._f):Ua(d),Te=d.type===gt.BLUR||d.type===gt.FOCUS_OUT,Ia=!ti(O._f)&&!t.validate&&!e.resolver&&!L(r.errors,g)&&!O._f.deps||si(Te,L(r.touchedFields,g),r.isSubmitted,J,D),yr=En(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 gr=Z(g,Ye,Te),La=!Ne(gr)||yr;if(!Te&&m.state.next({name:g,type:d.type,values:Ce(a)}),Ia)return(f.isValid||p.isValid)&&(e.mode==="onBlur"?Te&&S():Te||S()),La&&m.state.next({name:g,...yr?{}:gr});if(!e.resolver&&t.validate&&await re({name:g,eventType:d.type}),!Te&&yr&&m.state.next({...r}),e.resolver){const{errors:mn}=await z([g]);if(k([g]),j(Ye),N){const Ma=Rn(r.errors,n,g),yn=Rn(mn,n,Ma.name||g);pe=yn.error,g=yn.name,Me=Ne(mn)}}else k([g],!0),pe=(await jn(O,o.disabled,a,x,e.shouldUseNativeValidation))[g],k([g]),j(Ye),N&&(pe?Me=!1:(f.isValid||p.isValid)&&(Me=await he({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),M(g,Me,pe,gr))}},_=(d,y)=>{if(L(r.errors,y)&&d.focus)return d.focus(),1},R=async(d,y={})=>{let g,N;const O=Lt(d);if(e.resolver){const j=await B(be(d)?d:O);g=Ne(j),N=d?!O.some(D=>L(j,D)):g}else d?(N=(await Promise.all(O.map(async j=>{const D=L(n,j);return await he({fields:D&&D._f?{[j]:D}:D,eventType:gt.TRIGGER})}))).every(Boolean),!(!N&&!r.isValid)&&S()):N=g=await he({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&&Mt(n,_,d?O:o.mount),N},G=(d,y)=>{let g={...i.mount?a:s};return y&&(g=Rs(y.dirtyFields?r.dirtyFields:r.touchedFields,g)),be(d)?g:Ae(d)?L(g,d):d.map(N=>L(g,N))},q=(d,y)=>({invalid:!!L((y||r).errors,d),isDirty:!!L((y||r).dirtyFields,d),error:L((y||r).errors,d),isValidating:!!L(r.validatingFields,d),isTouched:!!L((y||r).touchedFields,d)}),K=d=>{const y=d?Lt(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=(L(n,d,{_f:{}})._f||{}).ref,O=L(r.errors,d)||{},{ref:j,message:D,type:J,...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()},Q=(d,y)=>Ge(d)?m.state.subscribe({next:g=>"values"in g&&d(ne(void 0,y),g)}):ne(d,y,!0),ee=d=>m.state.subscribe({next:y=>{ni(d.name,y.name,d.exact)&&ri(y,d.formState||f,Pa,d.reRenderRoot)&&d.callback({values:{...a},...r,...y,defaultValues:s})}}).unsubscribe,ie=d=>(i.mount=!0,p={...p,...d.formState},ee({...d,formState:{...h,...d.formState}})),oe=(d,y={})=>{for(const g of d?Lt(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:W()}:{}}),!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=L(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?ae({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:At(y.min),max:At(y.max),minLength:At(y.minLength),maxLength:At(y.maxLength),pattern:At(y.pattern)}:{},name:d,onChange:Ee,onBlur:Ee,ref:O=>{if(O){Re(d,y),g=L(n,d);const j=be(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,D=Ya(j),J=g._f.refs||[];if(D?J.find(pe=>pe===j):j===g._f.ref)return;ye(n,d,{_f:{...g._f,...D?{refs:[...J.filter(xr),j,...Array.isArray(L(s,d))?[{}]:[]],ref:{type:j.type,name:d}}:{ref:j}}}),b(d,!1,void 0,j)}else g=L(n,d,{}),g._f&&(g._f.mount=!1),(e.shouldUnregister||y.shouldUnregister)&&!(za(o.array,d)&&i.action)&&o.unMount.add(d)}}},A=()=>e.shouldFocusError&&Mt(n,_,o.mount),Fe=d=>{Ke(d)&&(m.state.next({disabled:d}),Mt(n,(y,g)=>{const N=L(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 z();k(),r.errors=j,O=Ce(D)}else await he({fields:n,eventType:gt.SUBMIT});if(o.disabled.size)for(const j of o.disabled)ke(O,j);if(ke(r.errors,Cs),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={})=>{L(n,d)&&(be(y.defaultValue)?we(d,Ce(L(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?W(d,Ce(L(s,d))):W()),y.keepError||(ke(r.errors,d),f.isValid&&S()),m.state.next({...r}))},fn=(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 J of Array.from(D)){const pe=L(r.dirtyFields,J),Me=L(a,J),Ye=L(j,J);pe&&!be(Me)?ye(j,J,Me):!pe&&!be(Ye)&&we(J,Ye)}}else{if(Kr&&be(d))for(const D of o.mount){const J=L(n,D);if(J&&J._f){const pe=Array.isArray(J._f.refs)?J._f.refs[0]:J._f.ref;if(Qt(pe)){const Me=pe.closest("form");if(Me){Me.reset();break}}}}if(y.keepFieldsRef)for(const D of o.mount)we(D,L(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})},hn=(d,y)=>fn(Ge(d)?d(a):d,{...e.resetOptions,...y}),Ta=(d,y={})=>{const g=L(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()})}},Pa=d=>{r={...r,...d}},pn={control:{register:Re,unregister:oe,getFieldState:q,handleSubmit:ht,setError:se,_subscribe:ee,_runSchema:z,_updateIsValidating:k,_focusError:A,_getWatch:ne,_getDirty:W,_setValid:S,_setFieldArray:C,_setDisabledField:ae,_setErrors:I,_getFieldArray:ve,_reset:fn,_resetDefaultValues:()=>Ge(e.defaultValues)&&e.defaultValues().then(d=>{hn(d,e.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:V,_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:Q,setValue:we,getValues:G,reset:hn,resetField:Zt,clearErrors:K,unregister:oe,setError:se,setFocus:Ta,getFieldState:q};return{...pn,formControl:pn}}function tr(t={}){const e=P.useRef(void 0),r=P.useRef(void 0),[n,s]=P.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}=ci(t);e.current={...o,formState:n}}const a=e.current.control;return a._options=t,qa(()=>{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]),P.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),P.useEffect(()=>{t.mode&&(a._options.mode=t.mode),t.reValidateMode&&(a._options.reValidateMode=t.reValidateMode)},[a,t.mode,t.reValidateMode]),P.useEffect(()=>{t.errors&&(a._setErrors(t.errors),a._focusError())},[a,t.errors]),P.useEffect(()=>{t.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,t.shouldUnregister]),P.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==n.isDirty&&a._subjects.state.next({isDirty:i})}},[a,n.isDirty]),P.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]),P.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=P.useMemo(()=>Wa(n,a),[a,n]),e.current}const Nn=(t,e,r)=>{if(t&&"reportValidity"in t){const n=L(r,e);t.setCustomValidity(n&&n.message||""),t.reportValidity()}},Ps=(t,e)=>{for(const r in e.fields){const n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?Nn(n.ref,r,t):n.refs&&n.refs.forEach(s=>Nn(s,r,t))}},li=(t,e)=>{e.shouldUseNativeValidation&&Ps(t,e);const r={};for(const n in t){const s=L(e.fields,n),a=Object.assign(t[n]||{},{ref:s&&s.ref});if(ui(e.names||Object.keys(t),n)){const i=Object.assign({},L(r,n));ye(i,"root",a),ye(r,n,i)}else ye(r,n,a)}return r},ui=(t,e)=>t.some(r=>r.startsWith(e+"."));var di=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]=Es(i,e,r,s,l?[].concat(l,n.message):n.message)}t.shift()}return r},rr=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&&Ps({},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:li(di(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 An;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(An||(An={}));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 Ir=(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 fi=Ir;function hi(){return fi}const pi=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 T(t,e){const r=hi(),n=pi({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Ir?void 0:Ir].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"}),It=t=>({status:"dirty",value:t}),Ze=t=>({status:"valid",value:t}),Tn=t=>t.status==="aborted",Pn=t=>t.status==="dirty",wt=t=>t.status==="valid",nr=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 In=(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 te(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(nr(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 In(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(nr(s)?s:Promise.resolve(s));return In(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 or.create(this,this._def)}or(e){return ar.create([this,e],this._def)}and(e){return ir.create(this,e,this._def)}transform(e){return new St({...te(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Vr({...te(this._def),innerType:this,defaultValue:r,typeName:Y.ZodDefault})}brand(){return new Vi({typeName:Y.ZodBranded,type:this,...te(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new $r({...te(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 tn.create(this,e)}readonly(){return Fr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mi=/^c[^\s-]{8,}$/i,yi=/^[0-9a-z]+$/,gi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vi=/^[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,xi=/^[a-z0-9_-]{21}$/i,bi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_i=/^[-+]?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)?)??$/,wi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ki="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let br;const Si=/^(?:(?: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])$/,Ci=/^(?:(?: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])$/,Ei=/^(([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]))$/,Ri=/^(([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])$/,Oi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ji=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Is="((\\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])))",Ni=new RegExp(`^${Is}$`);function Ls(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 Ai(t){return new RegExp(`^${Ls(t)}$`)}function Ti(t){let e=`${Is}T${Ls(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 Pi(t,e){return!!((e==="v4"||!e)&&Si.test(t)||(e==="v6"||!e)&&Ei.test(t))}function Ii(t,e){if(!bi.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 Li(t,e){return!!((e==="v4"||!e)&&Ci.test(t)||(e==="v6"||!e)&&Ri.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 T(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),T(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),T(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?T(s,{code:E.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&T(s,{code:E.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")wi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"email",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")br||(br=new RegExp(ki,"u")),br.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"emoji",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")vi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"uuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")xi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"nanoid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")mi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"cuid",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")yi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"cuid2",code:E.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")gi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(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),T(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),T(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),T(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),T(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),T(s,{code:E.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Ti(a).test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{code:E.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Ni.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{code:E.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Ai(a).test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{code:E.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?_i.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"duration",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Pi(e.data,a.version)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"ip",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?Ii(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"jwt",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Li(e.data,a.version)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"cidr",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Oi.test(e.data)||(s=this._getOrReturnCtx(e,s),T(s,{validation:"base64",code:E.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?ji.test(e.data)||(s=this._getOrReturnCtx(e,s),T(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,...te(t)});function Mi(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 Vt 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 T(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),T(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),T(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),T(n,{code:E.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Mi(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),T(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),T(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 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]})}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)}}Vt.create=t=>new Vt({checks:[],typeName:Y.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...te(t)});class $t 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),T(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),T(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),T(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 T(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 $t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(s)}]})}_addCheck(e){return new $t({...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}}$t.create=t=>new $t({checks:[],typeName:Y.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...te(t)});class Ln extends ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==$.boolean){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:$.boolean,received:n.parsedType}),H}return Ze(e.data)}}Ln.create=t=>new Ln({typeName:Y.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...te(t)});class sr extends ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==$.date){const a=this._getOrReturnCtx(e);return T(a,{code:E.invalid_type,expected:$.date,received:a.parsedType}),H}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return T(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),T(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),T(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 sr({...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}}sr.create=t=>new sr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Y.ZodDate,...te(t)});class Mn extends ce{_parse(e){if(this._getType(e)!==$.symbol){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:$.symbol,received:n.parsedType}),H}return Ze(e.data)}}Mn.create=t=>new Mn({typeName:Y.ZodSymbol,...te(t)});class Vn extends ce{_parse(e){if(this._getType(e)!==$.undefined){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:$.undefined,received:n.parsedType}),H}return Ze(e.data)}}Vn.create=t=>new Vn({typeName:Y.ZodUndefined,...te(t)});class $n extends ce{_parse(e){if(this._getType(e)!==$.null){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:$.null,received:n.parsedType}),H}return Ze(e.data)}}$n.create=t=>new $n({typeName:Y.ZodNull,...te(t)});class Fn extends ce{constructor(){super(...arguments),this._any=!0}_parse(e){return Ze(e.data)}}Fn.create=t=>new Fn({typeName:Y.ZodAny,...te(t)});class Dn extends ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ze(e.data)}}Dn.create=t=>new Dn({typeName:Y.ZodUnknown,...te(t)});class ut extends ce{_parse(e){const r=this._getOrReturnCtx(e);return T(r,{code:E.invalid_type,expected:$.never,received:r.parsedType}),H}}ut.create=t=>new ut({typeName:Y.ZodNever,...te(t)});class Un extends ce{_parse(e){if(this._getType(e)!==$.undefined){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:$.void,received:n.parsedType}),H}return Ze(e.data)}}Un.create=t=>new Un({typeName:Y.ZodVoid,...te(t)});class Xe extends ce{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==$.array)return T(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)&&(T(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&&(T(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&&(T(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,...te(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 T(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&&(T(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 Ms(le.objectKeys(this.shape))}}Se.create=(t,e)=>new Se({shape:()=>t,unknownKeys:"strip",catchall:ut.create(),typeName:Y.ZodObject,...te(e)});Se.strictCreate=(t,e)=>new Se({shape:()=>t,unknownKeys:"strict",catchall:ut.create(),typeName:Y.ZodObject,...te(e)});Se.lazycreate=(t,e)=>new Se({shape:t,unknownKeys:"strip",catchall:ut.create(),typeName:Y.ZodObject,...te(e)});class ar 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 T(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 T(r,{code:E.invalid_union,unionErrors:o}),H}}get options(){return this._def.options}}ar.create=(t,e)=>new ar({options:t,typeName:Y.ZodUnion,...te(e)});function Lr(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=Lr(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=Lr(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 ir extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Tn(a)||Tn(i))return H;const o=Lr(a.value,i.value);return o.valid?((Pn(a)||Pn(i))&&r.dirty(),{status:r.value,value:o.data}):(T(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}))}}ir.create=(t,e,r)=>new ir({left:t,right:e,typeName:Y.ZodIntersection,...te(r)});class mt extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==$.array)return T(n,{code:E.invalid_type,expected:$.array,received:n.parsedType}),H;if(n.data.length<this._def.items.length)return T(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&&(T(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,...te(e)})};class zn 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 T(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}}}}zn.create=(t,e,r)=>new zn({valueType:e,keyType:t,typeName:Y.ZodMap,...te(r)});class Ft extends ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==$.set)return T(n,{code:E.invalid_type,expected:$.set,received:n.parsedType}),H;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(T(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&&(T(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 Ft({...this._def,minSize:{value:e,message:F.toString(r)}})}max(e,r){return new Ft({...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)}}Ft.create=(t,e)=>new Ft({valueType:t,minSize:null,maxSize:null,typeName:Y.ZodSet,...te(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,...te(e)});class Mr extends ce{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return T(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}}Mr.create=(t,e)=>new Mr({value:t,typeName:Y.ZodLiteral,...te(e)});function Ms(t,e){return new kt({values:t,typeName:Y.ZodEnum,...te(e)})}class kt extends ce{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return T(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 T(r,{received:r.data,code:E.invalid_enum_value,options:n}),H}return Ze(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=Ms;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 T(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 T(n,{received:n.data,code:E.invalid_enum_value,options:s}),H}return Ze(e.data)}get enum(){return this._def.values}}Bn.create=(t,e)=>new Bn({values:t,typeName:Y.ZodNativeEnum,...te(e)});class or extends ce{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==$.promise&&r.common.async===!1)return T(r,{code:E.invalid_type,expected:$.promise,received:r.parsedType}),H;const n=r.parsedType===$.promise?r.data:Promise.resolve(r.data);return Ze(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}or.create=(t,e)=>new or({type:t,typeName:Y.ZodPromise,...te(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=>{T(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"?It(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"?It(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,...te(r)});St.createWithPreprocess=(t,e,r)=>new St({schema:e,effect:{type:"preprocess",transform:t},typeName:Y.ZodEffects,...te(r)});class ot extends ce{_parse(e){return this._getType(e)===$.undefined?Ze(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ot.create=(t,e)=>new ot({innerType:t,typeName:Y.ZodOptional,...te(e)});class Ct extends ce{_parse(e){return this._getType(e)===$.null?Ze(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ct.create=(t,e)=>new Ct({innerType:t,typeName:Y.ZodNullable,...te(e)});class Vr 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}}Vr.create=(t,e)=>new Vr({innerType:t,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...te(e)});class $r 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 nr(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}}$r.create=(t,e)=>new $r({innerType:t,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...te(e)});class Wn extends ce{_parse(e){if(this._getType(e)!==$.nan){const n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:$.nan,received:n.parsedType}),H}return{status:"valid",value:e.data}}}Wn.create=t=>new Wn({typeName:Y.ZodNaN,...te(t)});class Vi 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 tn 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(),It(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 tn({in:e,out:r,typeName:Y.ZodPipeline})}}class Fr extends ce{_parse(e){const r=this._def.innerType._parse(e),n=s=>(wt(s)&&(s.value=Object.freeze(s.value)),s);return nr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Fr.create=(t,e)=>new Fr({innerType:t,typeName:Y.ZodReadonly,...te(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 hr=Se.create;ar.create;ir.create;mt.create;const $i=Mr.create;kt.create;or.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.
@@ -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 Ui=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,...Di,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Vs("lucide",s),...o},[...i.map(([l,h])=>I.createElement(l,h)),...Array.isArray(a)?a:[a]]));/**
16
+ */const Ui=P.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:i,...o},c)=>P.createElement("svg",{ref:c,...Di,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Vs("lucide",s),...o},[...i.map(([l,h])=>P.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(Ui,{ref:a,iconNode:e,className:Vs(`lucide-${Fi(t)}`,n),...s}));return r.displayName=`${t}`,r};/**
21
+ */const ft=(t,e)=>{const r=P.forwardRef(({className:n,...s},a)=>P.createElement(Ui,{ref:a,iconNode:e,className:Vs(`lucide-${Fi(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 Hi=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 $s(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=$s(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Fs(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=$s(t))&&(n&&(n+=" "),n+=e);return n}const rn="-",Yi=t=>{const e=Ji(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const o=i.split(rn);return o[0]===""&&o.length!==1&&o.shift(),Ds(o,e)||Ki(i)},getConflictingClassGroupIds:(i,o)=>{const c=r[i]||[];return o&&n[i]?[...c,...n[i]]:c}}},Ds=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Ds(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const a=t.join(rn);return(i=e.validators.find(({validator:o})=>o(a)))==null?void 0:i.classGroupId},qn=/^\[(.+)\]$/,Ki=t=>{if(qn.test(t)){const e=qn.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Ji=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Qi(Object.entries(t.classGroups),r).forEach(([a,i])=>{Dr(i,n,a,e)}),n},Dr=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const a=s===""?e:Gn(e,s);a.classGroupId=r;return}if(typeof s=="function"){if(Xi(s)){Dr(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,i])=>{Dr(i,Gn(e,a),r,n)})})},Gn=(t,e)=>{let r=t;return e.split(rn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Xi=t=>t.isThemeGetter,Qi=(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,eo=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)}}},Us="!",to=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 m=c.length===0?o:o.substring(h),p=m.startsWith(Us),x=p?m.substring(1):m,v=f&&f>h?f-h:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:v}};return r?o=>r({className:o,parseClassName:i}):i},ro=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},no=t=>({cache:eo(t.cacheSize),parseClassName:to(t),...Yi(t)}),so=/\s+/,ao=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,a=[],i=t.trim().split(so);let o="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:h,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:p}=r(l);let x=!!p,v=n(x?m.substring(0,p):m);if(!v){if(!x){o=l+(o.length>0?" "+o:o);continue}if(v=n(m),!v){o=l+(o.length>0?" "+o:o);continue}x=!1}const S=ro(h).join(":"),k=f?S+Us:S,C=k+v;if(a.includes(C))continue;a.push(C);const z=s(v,x);for(let V=0;V<z.length;++V){const b=z[V];a.push(k+b)}o=l+(o.length>0?" "+o:o)}return o};function io(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=zs(e))&&(n&&(n+=" "),n+=r);return n}const zs=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=zs(t[n]))&&(r&&(r+=" "),r+=e);return r};function oo(t,...e){let r,n,s,a=i;function i(c){const l=e.reduce((h,f)=>f(h),t());return r=no(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=ao(c,r);return s(c,h),h}return function(){return a(io.apply(null,arguments))}}const ge=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Zs=/^\[(?:([a-z-]+):)?(.+)\]$/i,co=/^\d+\/\d+$/,lo=new Set(["px","full","screen"]),uo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fo=/\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$/,ho=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,po=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=t=>_t(t)||lo.has(t)||co.test(t),tt=t=>jt(t,"length",ko),_t=t=>!!t&&!Number.isNaN(Number(t)),_r=t=>jt(t,"number",_t),Tt=t=>!!t&&Number.isInteger(Number(t)),yo=t=>t.endsWith("%")&&_t(t.slice(0,-1)),J=t=>Zs.test(t),rt=t=>uo.test(t),go=new Set(["length","size","percentage"]),vo=t=>jt(t,go,Bs),xo=t=>jt(t,"position",Bs),bo=new Set(["image","url"]),_o=t=>jt(t,bo,Co),wo=t=>jt(t,"",So),Pt=()=>!0,jt=(t,e,r)=>{const n=Zs.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},ko=t=>fo.test(t)&&!ho.test(t),Bs=()=>!1,So=t=>po.test(t),Co=t=>mo.test(t),Eo=()=>{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"),m=ge("gap"),p=ge("gradientColorStops"),x=ge("gradientColorStopPositions"),v=ge("inset"),S=ge("margin"),k=ge("opacity"),C=ge("padding"),z=ge("saturate"),V=ge("scale"),b=ge("sepia"),P=ge("skew"),L=ge("space"),Z=ge("translate"),te=()=>["auto","contain","none"],ce=()=>["auto","hidden","clip","visible","scroll"],ye=()=>["auto",J,e],$=()=>[J,e],B=()=>["",Qe,tt],re=()=>["auto",_t,J],ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ue=()=>["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",J],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[_t,J];return{cacheSize:500,separator:":",theme:{colors:[Pt],spacing:[Qe,tt],blur:["none","",rt,J],brightness:R(),borderColor:[t],borderRadius:["none","","full",rt,J],borderSpacing:$(),borderWidth:B(),contrast:R(),grayscale:Ee(),hueRotate:R(),invert:Ee(),gap:$(),gradientColorStops:[t],gradientColorStopPositions:[yo,tt],inset:ye(),margin:ye(),opacity:R(),padding:$(),saturate:R(),scale:R(),sepia:Ee(),skew:R(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],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(),J]}],overflow:[{overflow:ce()}],"overflow-x":[{"overflow-x":ce()}],"overflow-y":[{"overflow-y":ce()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],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",Tt,J]}],basis:[{basis:ye()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:Ee()}],shrink:[{shrink:Ee()}],order:[{order:["first","last","none",Tt,J]}],"grid-cols":[{"grid-cols":[Pt]}],"col-start-end":[{col:["auto",{span:["full",Tt,J]},J]}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":[Pt]}],"row-start-end":[{row:["auto",{span:[Tt,J]},J]}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"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":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,e]}],"min-w":[{"min-w":[J,e,"min","max","fit"]}],"max-w":[{"max-w":[J,e,"none","full","min","max","fit","prose",{screen:[rt]},rt]}],h:[{h:[J,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,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",_r]}],"font-family":[{font:[Pt]}],"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",J]}],"line-clamp":[{"line-clamp":["none",_t,_r]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qe,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"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:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qe,tt]}],"underline-offset":[{"underline-offset":["auto",Qe,J]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"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(),xo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_o]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[...ue(),"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:ue()}],"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:["",...ue()]}],"outline-offset":[{"outline-offset":[Qe,J]}],"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,wo]}],"shadow-color":[{shadow:[Pt]}],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,J]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[z]}],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":[z]}],"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",J]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[V]}],"scale-x":[{"scale-x":[V]}],"scale-y":[{"scale-y":[V]}],rotate:[{rotate:[Tt,J]}],"translate-x":[{"translate-x":[Z]}],"translate-y":[{"translate-y":[Z]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],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",J]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",J]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Qe,tt,_r]}],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"]}}},Ro=oo(Eo);function pe(...t){return Ro(Fs(t))}function Ws(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bt={exports:{}},Wt={exports:{}},de={};/** @license React v16.13.1
61
+ */const Hi=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 $s(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=$s(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Fs(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=$s(t))&&(n&&(n+=" "),n+=e);return n}const rn="-",Yi=t=>{const e=Ji(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const o=i.split(rn);return o[0]===""&&o.length!==1&&o.shift(),Ds(o,e)||Ki(i)},getConflictingClassGroupIds:(i,o)=>{const c=r[i]||[];return o&&n[i]?[...c,...n[i]]:c}}},Ds=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Ds(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const a=t.join(rn);return(i=e.validators.find(({validator:o})=>o(a)))==null?void 0:i.classGroupId},qn=/^\[(.+)\]$/,Ki=t=>{if(qn.test(t)){const e=qn.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Ji=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Qi(Object.entries(t.classGroups),r).forEach(([a,i])=>{Dr(i,n,a,e)}),n},Dr=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const a=s===""?e:Gn(e,s);a.classGroupId=r;return}if(typeof s=="function"){if(Xi(s)){Dr(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,i])=>{Dr(i,Gn(e,a),r,n)})})},Gn=(t,e)=>{let r=t;return e.split(rn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Xi=t=>t.isThemeGetter,Qi=(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,eo=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)}}},Us="!",to=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(Us),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},ro=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},no=t=>({cache:eo(t.cacheSize),parseClassName:to(t),...Yi(t)}),so=/\s+/,ao=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,a=[],i=t.trim().split(so);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=ro(h).join(":"),k=f?S+Us:S,C=k+v;if(a.includes(C))continue;a.push(C);const U=s(v,x);for(let I=0;I<U.length;++I){const b=U[I];a.push(k+b)}o=l+(o.length>0?" "+o:o)}return o};function io(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=zs(e))&&(n&&(n+=" "),n+=r);return n}const zs=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=zs(t[n]))&&(r&&(r+=" "),r+=e);return r};function oo(t,...e){let r,n,s,a=i;function i(c){const l=e.reduce((h,f)=>f(h),t());return r=no(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=ao(c,r);return s(c,h),h}return function(){return a(io.apply(null,arguments))}}const ge=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Zs=/^\[(?:([a-z-]+):)?(.+)\]$/i,co=/^\d+\/\d+$/,lo=new Set(["px","full","screen"]),uo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fo=/\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$/,ho=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,po=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=t=>_t(t)||lo.has(t)||co.test(t),tt=t=>jt(t,"length",ko),_t=t=>!!t&&!Number.isNaN(Number(t)),_r=t=>jt(t,"number",_t),Tt=t=>!!t&&Number.isInteger(Number(t)),yo=t=>t.endsWith("%")&&_t(t.slice(0,-1)),X=t=>Zs.test(t),rt=t=>uo.test(t),go=new Set(["length","size","percentage"]),vo=t=>jt(t,go,Bs),xo=t=>jt(t,"position",Bs),bo=new Set(["image","url"]),_o=t=>jt(t,bo,Co),wo=t=>jt(t,"",So),Pt=()=>!0,jt=(t,e,r)=>{const n=Zs.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},ko=t=>fo.test(t)&&!ho.test(t),Bs=()=>!1,So=t=>po.test(t),Co=t=>mo.test(t),Eo=()=>{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"),I=ge("scale"),b=ge("sepia"),Z=ge("skew"),M=ge("space"),z=ge("translate"),B=()=>["auto","contain","none"],re=()=>["auto","hidden","clip","visible","scroll"],he=()=>["auto",X,e],V=()=>[X,e],W=()=>["",Qe,tt],ne=()=>["auto",_t,X],ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ue=()=>["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:[Pt],spacing:[Qe,tt],blur:["none","",rt,X],brightness:R(),borderColor:[t],borderRadius:["none","","full",rt,X],borderSpacing:V(),borderWidth:W(),contrast:R(),grayscale:Ee(),hueRotate:R(),invert:Ee(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[yo,tt],inset:he(),margin:he(),opacity:R(),padding:V(),saturate:R(),scale:R(),sepia:Ee(),skew:R(),space:V(),translate:V()},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:[...ve(),X]}],overflow:[{overflow:re()}],"overflow-x":[{"overflow-x":re()}],"overflow-y":[{"overflow-y":re()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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",Tt,X]}],basis:[{basis:he()}],"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",Tt,X]}],"grid-cols":[{"grid-cols":[Pt]}],"col-start-end":[{col:["auto",{span:["full",Tt,X]},X]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[Pt]}],"row-start-end":[{row:["auto",{span:[Tt,X]},X]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"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":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"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",_r]}],"font-family":[{font:[Pt]}],"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,_r]}],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:[...ue(),"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:V()}],"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:[...ve(),xo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_o]}],"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:[...ue(),"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:ue()}],"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:["",...ue()]}],"outline-offset":[{"outline-offset":[Qe,X]}],"outline-w":[{outline:[Qe,tt]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:W()}],"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,wo]}],"shadow-color":[{shadow:[Pt]}],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:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Tt,X]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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,_r]}],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"]}}},Ro=oo(Eo);function me(...t){return Ro(Fs(t))}function Ws(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bt={exports:{}},Wt={exports:{}},de={};/** @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 Hn;function Oo(){if(Hn)return de;Hn=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,m=t?Symbol.for("react.suspense_list"):60120,p=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 z(b){if(typeof b=="object"&&b!==null){var P=b.$$typeof;switch(P){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 p:case i:return b;default:return P}}case r:return P}}}function V(b){return z(b)===l}return de.AsyncMode=c,de.ConcurrentMode=l,de.ContextConsumer=o,de.ContextProvider=i,de.Element=e,de.ForwardRef=h,de.Fragment=n,de.Lazy=x,de.Memo=p,de.Portal=r,de.Profiler=a,de.StrictMode=s,de.Suspense=f,de.isAsyncMode=function(b){return V(b)||z(b)===c},de.isConcurrentMode=V,de.isContextConsumer=function(b){return z(b)===o},de.isContextProvider=function(b){return z(b)===i},de.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},de.isForwardRef=function(b){return z(b)===h},de.isFragment=function(b){return z(b)===n},de.isLazy=function(b){return z(b)===x},de.isMemo=function(b){return z(b)===p},de.isPortal=function(b){return z(b)===r},de.isProfiler=function(b){return z(b)===a},de.isStrictMode=function(b){return z(b)===s},de.isSuspense=function(b){return z(b)===f},de.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===l||b===a||b===s||b===f||b===m||typeof b=="object"&&b!==null&&(b.$$typeof===x||b.$$typeof===p||b.$$typeof===i||b.$$typeof===o||b.$$typeof===h||b.$$typeof===S||b.$$typeof===k||b.$$typeof===C||b.$$typeof===v)},de.typeOf=z,de}var fe={};/** @license React v16.13.1
68
+ */var Hn;function Oo(){if(Hn)return de;Hn=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 I(b){return U(b)===l}return de.AsyncMode=c,de.ConcurrentMode=l,de.ContextConsumer=o,de.ContextProvider=i,de.Element=e,de.ForwardRef=h,de.Fragment=n,de.Lazy=x,de.Memo=m,de.Portal=r,de.Profiler=a,de.StrictMode=s,de.Suspense=f,de.isAsyncMode=function(b){return I(b)||U(b)===c},de.isConcurrentMode=I,de.isContextConsumer=function(b){return U(b)===o},de.isContextProvider=function(b){return U(b)===i},de.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},de.isForwardRef=function(b){return U(b)===h},de.isFragment=function(b){return U(b)===n},de.isLazy=function(b){return U(b)===x},de.isMemo=function(b){return U(b)===m},de.isPortal=function(b){return U(b)===r},de.isProfiler=function(b){return U(b)===a},de.isStrictMode=function(b){return U(b)===s},de.isSuspense=function(b){return U(b)===f},de.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)},de.typeOf=U,de}var fe={};/** @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 Yn;function jo(){return Yn||(Yn=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,m=t?Symbol.for("react.suspense_list"):60120,p=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 z(A){return typeof A=="string"||typeof A=="function"||A===n||A===l||A===a||A===s||A===f||A===m||typeof A=="object"&&A!==null&&(A.$$typeof===x||A.$$typeof===p||A.$$typeof===i||A.$$typeof===o||A.$$typeof===h||A.$$typeof===S||A.$$typeof===k||A.$$typeof===C||A.$$typeof===v)}function V(A){if(typeof A=="object"&&A!==null){var Fe=A.$$typeof;switch(Fe){case e:var ht=A.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 p:case i:return Zt;default:return Fe}}case r:return Fe}}}var b=c,P=l,L=o,Z=i,te=e,ce=h,ye=n,$=x,B=p,re=r,ve=a,ue=s,xe=f,we=!1;function Ee(A){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.")),_(A)||V(A)===c}function _(A){return V(A)===l}function R(A){return V(A)===o}function q(A){return V(A)===i}function W(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function Y(A){return V(A)===h}function ne(A){return V(A)===n}function X(A){return V(A)===x}function Q(A){return V(A)===p}function ae(A){return V(A)===r}function ie(A){return V(A)===a}function se(A){return V(A)===s}function Re(A){return V(A)===f}fe.AsyncMode=b,fe.ConcurrentMode=P,fe.ContextConsumer=L,fe.ContextProvider=Z,fe.Element=te,fe.ForwardRef=ce,fe.Fragment=ye,fe.Lazy=$,fe.Memo=B,fe.Portal=re,fe.Profiler=ve,fe.StrictMode=ue,fe.Suspense=xe,fe.isAsyncMode=Ee,fe.isConcurrentMode=_,fe.isContextConsumer=R,fe.isContextProvider=q,fe.isElement=W,fe.isForwardRef=Y,fe.isFragment=ne,fe.isLazy=X,fe.isMemo=Q,fe.isPortal=ae,fe.isProfiler=ie,fe.isStrictMode=se,fe.isSuspense=Re,fe.isValidElementType=z,fe.typeOf=V})()),fe}var Kn;function nn(){return Kn||(Kn=1,process.env.NODE_ENV==="production"?Wt.exports=Oo():Wt.exports=jo()),Wt.exports}/*
75
+ */var Yn;function jo(){return Yn||(Yn=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(A){return typeof A=="string"||typeof A=="function"||A===n||A===l||A===a||A===s||A===f||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===x||A.$$typeof===m||A.$$typeof===i||A.$$typeof===o||A.$$typeof===h||A.$$typeof===S||A.$$typeof===k||A.$$typeof===C||A.$$typeof===v)}function I(A){if(typeof A=="object"&&A!==null){var Fe=A.$$typeof;switch(Fe){case e:var ht=A.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,M=o,z=i,B=e,re=h,he=n,V=x,W=m,ne=r,ve=a,ue=s,xe=f,we=!1;function Ee(A){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.")),_(A)||I(A)===c}function _(A){return I(A)===l}function R(A){return I(A)===o}function G(A){return I(A)===i}function q(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function K(A){return I(A)===h}function se(A){return I(A)===n}function Q(A){return I(A)===x}function ee(A){return I(A)===m}function ie(A){return I(A)===r}function oe(A){return I(A)===a}function ae(A){return I(A)===s}function Re(A){return I(A)===f}fe.AsyncMode=b,fe.ConcurrentMode=Z,fe.ContextConsumer=M,fe.ContextProvider=z,fe.Element=B,fe.ForwardRef=re,fe.Fragment=he,fe.Lazy=V,fe.Memo=W,fe.Portal=ne,fe.Profiler=ve,fe.StrictMode=ue,fe.Suspense=xe,fe.isAsyncMode=Ee,fe.isConcurrentMode=_,fe.isContextConsumer=R,fe.isContextProvider=G,fe.isElement=q,fe.isForwardRef=K,fe.isFragment=se,fe.isLazy=Q,fe.isMemo=ee,fe.isPortal=ie,fe.isProfiler=oe,fe.isStrictMode=ae,fe.isSuspense=Re,fe.isValidElementType=U,fe.typeOf=I})()),fe}var Kn;function nn(){return Kn||(Kn=1,process.env.NODE_ENV==="production"?Wt.exports=Oo():Wt.exports=jo()),Wt.exports}/*
76
76
  object-assign
77
77
  (c) Sindre Sorhus
78
78
  @license MIT
79
- */var wr,Jn;function No(){if(Jn)return wr;Jn=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 wr=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 m=0;m<l.length;m++)r.call(o,l[m])&&(c[l[m]]=o[l[m]])}}return c},wr}var kr,Xn;function sn(){if(Xn)return kr;Xn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return kr=t,kr}var Sr,Qn;function qs(){return Qn||(Qn=1,Sr=Function.call.bind(Object.prototype.hasOwnProperty)),Sr}var Cr,es;function Ao(){if(es)return Cr;es=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=sn(),r={},n=qs();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 m=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 m.name="Invariant Violation",m}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 p=l?l():"";t("Failed "+o+" type: "+f.message+(p??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Cr=s,Cr}var Er,ts;function To(){if(ts)return Er;ts=1;var t=nn(),e=No(),r=sn(),n=qs(),s=Ao(),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 Er=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 m="<<anonymous>>",p={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:z,element:V(),elementType:b(),instanceOf:P,node:ce(),objectOf:Z,oneOf:L,oneOfType:te,shape:$,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={},q=0;function W(ne,X,Q,ae,ie,se,Re){if(ae=ae||m,se=se||Q,Re!==r){if(c){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Fe=ae+":"+Q;!R[Fe]&&q<3&&(a("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+ae+"`. 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,q++)}}return X[Q]==null?ne?X[Q]===null?new v("The "+ie+" `"+se+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new v("The "+ie+" `"+se+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:_(X,Q,ae,ie,se)}var Y=W.bind(null,!1);return Y.isRequired=W.bind(null,!0),Y}function k(_){function R(q,W,Y,ne,X,Q){var ae=q[W],ie=ue(ae);if(ie!==_){var se=xe(ae);return new v("Invalid "+ne+" `"+X+"` of type "+("`"+se+"` supplied to `"+Y+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return S(R)}function C(){return S(i)}function z(_){function R(q,W,Y,ne,X){if(typeof _!="function")return new v("Property `"+X+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var Q=q[W];if(!Array.isArray(Q)){var ae=ue(Q);return new v("Invalid "+ne+" `"+X+"` of type "+("`"+ae+"` supplied to `"+Y+"`, expected an array."))}for(var ie=0;ie<Q.length;ie++){var se=_(Q,ie,Y,ne,X+"["+ie+"]",r);if(se instanceof Error)return se}return null}return S(R)}function V(){function _(R,q,W,Y,ne){var X=R[q];if(!o(X)){var Q=ue(X);return new v("Invalid "+Y+" `"+ne+"` of type "+("`"+Q+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return S(_)}function b(){function _(R,q,W,Y,ne){var X=R[q];if(!t.isValidElementType(X)){var Q=ue(X);return new v("Invalid "+Y+" `"+ne+"` of type "+("`"+Q+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return S(_)}function P(_){function R(q,W,Y,ne,X){if(!(q[W]instanceof _)){var Q=_.name||m,ae=Ee(q[W]);return new v("Invalid "+ne+" `"+X+"` of type "+("`"+ae+"` supplied to `"+Y+"`, expected ")+("instance of `"+Q+"`."))}return null}return S(R)}function L(_){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(q,W,Y,ne,X){for(var Q=q[W],ae=0;ae<_.length;ae++)if(x(Q,_[ae]))return null;var ie=JSON.stringify(_,function(Re,A){var Fe=xe(A);return Fe==="symbol"?String(A):A});return new v("Invalid "+ne+" `"+X+"` of value `"+String(Q)+"` "+("supplied to `"+Y+"`, expected one of "+ie+"."))}return S(R)}function Z(_){function R(q,W,Y,ne,X){if(typeof _!="function")return new v("Property `"+X+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var Q=q[W],ae=ue(Q);if(ae!=="object")return new v("Invalid "+ne+" `"+X+"` of type "+("`"+ae+"` supplied to `"+Y+"`, expected an object."));for(var ie in Q)if(n(Q,ie)){var se=_(Q,ie,Y,ne,X+"."+ie,r);if(se instanceof Error)return se}return null}return S(R)}function te(_){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 q=_[R];if(typeof q!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+we(q)+" at index "+R+"."),i}function W(Y,ne,X,Q,ae){for(var ie=[],se=0;se<_.length;se++){var Re=_[se],A=Re(Y,ne,X,Q,ae,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&ie.push(A.data.expectedType)}var Fe=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new v("Invalid "+Q+" `"+ae+"` supplied to "+("`"+X+"`"+Fe+"."))}return S(W)}function ce(){function _(R,q,W,Y,ne){return re(R[q])?null:new v("Invalid "+Y+" `"+ne+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return S(_)}function ye(_,R,q,W,Y){return new v((_||"React class")+": "+R+" type `"+q+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function $(_){function R(q,W,Y,ne,X){var Q=q[W],ae=ue(Q);if(ae!=="object")return new v("Invalid "+ne+" `"+X+"` of type `"+ae+"` "+("supplied to `"+Y+"`, expected `object`."));for(var ie in _){var se=_[ie];if(typeof se!="function")return ye(Y,ne,X,ie,xe(se));var Re=se(Q,ie,Y,ne,X+"."+ie,r);if(Re)return Re}return null}return S(R)}function B(_){function R(q,W,Y,ne,X){var Q=q[W],ae=ue(Q);if(ae!=="object")return new v("Invalid "+ne+" `"+X+"` of type `"+ae+"` "+("supplied to `"+Y+"`, expected `object`."));var ie=e({},q[W],_);for(var se in ie){var Re=_[se];if(n(_,se)&&typeof Re!="function")return ye(Y,ne,X,se,xe(Re));if(!Re)return new v("Invalid "+ne+" `"+X+"` key `"+se+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(q[W],null," ")+`
80
- Valid keys: `+JSON.stringify(Object.keys(_),null," "));var A=Re(Q,se,Y,ne,X+"."+se,r);if(A)return A}return null}return S(R)}function re(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(re);if(_===null||o(_))return!0;var R=f(_);if(R){var q=R.call(_),W;if(R!==_.entries){for(;!(W=q.next()).done;)if(!re(W.value))return!1}else for(;!(W=q.next()).done;){var Y=W.value;if(Y&&!re(Y[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 ue(_){var R=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":ve(R,_)?"symbol":R}function xe(_){if(typeof _>"u"||_===null)return""+_;var R=ue(_);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?m:_.constructor.name}return p.checkPropTypes=s,p.resetWarningCache=s.resetWarningCache,p.PropTypes=p,p},Er}var Rr,rs;function Po(){if(rs)return Rr;rs=1;var t=sn();function e(){}function r(){}return r.resetWarningCache=e,Rr=function(){function n(i,o,c,l,h,f){if(f!==t){var m=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 m.name="Invariant Violation",m}}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},Rr}var ns;function Io(){if(ns)return Bt.exports;if(ns=1,process.env.NODE_ENV!=="production"){var t=nn(),e=!0;Bt.exports=To()(t.isElement,e)}else Bt.exports=Po()();return Bt.exports}var Lo=Io();const Ie=Ws(Lo);var Mo=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Ur(){return Ur=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},Ur.apply(this,arguments)}function Vo(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 qt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zr(t,e)}function zr(t,e){return zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},zr(t,e)}var pr=(function(t){$o(e,t);function e(){var n;return n=t.call(this)||this,n.handleExpired=n.handleExpired.bind(qt(n)),n.handleErrored=n.handleErrored.bind(qt(n)),n.handleChange=n.handleChange.bind(qt(n)),n.handleRecaptchaRef=n.handleRecaptchaRef.bind(qt(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=Vo(s,Mo);return w.createElement("div",Ur({},a,{ref:this.handleRecaptchaRef}))},e})(w.Component);pr.displayName="ReCAPTCHA";pr.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};pr.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Or,ss;function Fo(){if(ss)return Or;ss=1;var t=nn(),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,m=Object.prototype;function p(x,v,S){if(typeof v!="string"){if(m){var k=f(v);k&&k!==m&&p(x,k,S)}var C=c(v);l&&(C=C.concat(l(v)));for(var z=i(x),V=i(v),b=0;b<C.length;++b){var P=C[b];if(!r[P]&&!(S&&S[P])&&!(V&&V[P])&&!(z&&z[P])){var L=h(v,P);try{o(x,P,L)}catch{}}}}return x}return Or=p,Or}var Do=Fo();const Uo=Ws(Do);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 zo(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 Zo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Be={},Bo=0;function Wo(t,e){return e=e||{},function(n){var s=n.displayName||n.name||"Component",a=(function(o){Zo(c,o);function c(h,f){var m;return m=o.call(this,h,f)||this,m.state={},m.__scriptURL="",m}var l=c.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Bo++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL=typeof t=="function"?t():t,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(f){var m=this;this.setState(f,function(){return m.props.asyncScriptOnLoad&&m.props.asyncScriptOnLoad(m.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=Be[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var m in f.observers)f.observers[m](f);delete window[e.callbackName]},l.componentDidMount=function(){var f=this,m=this.setupScriptURL(),p=this.asyncScriptLoaderGetScriptLoaderID(),x=e,v=x.globalName,S=x.callbackName,k=x.scriptId;if(v&&typeof window[v]<"u"&&(Be[m]={loaded:!0,observers:{}}),Be[m]){var C=Be[m];if(C&&(C.loaded||C.errored)){this.asyncScriptLoaderHandleLoad(C);return}C.observers[p]=function(L){return f.asyncScriptLoaderHandleLoad(L)};return}var z={};z[p]=function(L){return f.asyncScriptLoaderHandleLoad(L)},Be[m]={loaded:!1,observers:z};var V=document.createElement("script");V.src=m,V.async=!0;for(var b in e.attributes)V.setAttribute(b,e.attributes[b]);k&&(V.id=k);var P=function(Z){if(Be[m]){var te=Be[m],ce=te.observers;for(var ye in ce)Z(ce[ye])&&delete ce[ye]}};S&&typeof window<"u"&&(window[S]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),V.onload=function(){var L=Be[m];L&&(L.loaded=!0,P(function(Z){return S?!1:(Z(L),!0)}))},V.onerror=function(){var L=Be[m];L&&(L.errored=!0,P(function(Z){return Z(L),!0}))},document.body.appendChild(V)},l.componentWillUnmount=function(){var f=this.__scriptURL;if(e.removeOnUnmount===!0)for(var m=document.getElementsByTagName("script"),p=0;p<m.length;p+=1)m[p].src.indexOf(f)>-1&&m[p].parentNode&&m[p].parentNode.removeChild(m[p]);var x=Be[f];x&&(delete x.observers[this.asyncScriptLoaderGetScriptLoaderID()],e.removeOnUnmount===!0&&delete Be[f])},l.render=function(){var f=e.globalName,m=this.props;m.asyncScriptOnLoad;var p=m.forwardedRef,x=zo(m,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(x[f]=typeof window[f]<"u"?window[f]:void 0),x.ref=p,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},Uo(i,n)}}var Br="onloadcallback",qo="grecaptcha";function Wr(){return typeof window<"u"&&window.recaptchaOptions||{}}function Go(){var t=Wr(),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 Ho=Wo(Go,{callbackName:Br,globalName:qo,attributes:Wr().nonce?{nonce:Wr().nonce}:{}})(pr);function De(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qr(t,e){return qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},qr(t,e)}function Yo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,qr(t,e)}var Ko=Object.defineProperty,Jo=Object.defineProperties,Xo=Object.getOwnPropertyDescriptors,lr=Object.getOwnPropertySymbols,Gs=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable,Gr=(t,e,r)=>e in t?Ko(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ve=(t,e)=>{for(var r in e||(e={}))Gs.call(e,r)&&Gr(t,r,e[r]);if(lr)for(var r of lr(e))Hs.call(e,r)&&Gr(t,r,e[r]);return t},Ys=(t,e)=>Jo(t,Xo(e)),Qo=(t,e)=>{var r={};for(var n in t)Gs.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&lr)for(var n of lr(t))e.indexOf(n)<0&&Hs.call(t,n)&&(r[n]=t[n]);return r},Oe=(t,e,r)=>(Gr(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())}),ec="hCaptcha-script",Jt="hCaptchaOnLoad",as="script-error",at="@hCaptcha/loader";function tc(t){return Object.entries(t).filter(([,e])=>e||e===!1).map(([e,r])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`).join("&")}function Ks(t){let e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function Js(t){return t||document.head}function rc(t){var e;t.setTag("source",at),t.setTag("url",document.URL),t.setContext("os",{UA:navigator.userAgent}),t.setContext("browser",Ve({},nc())),t.setContext("device",Ys(Ve({},ac()),{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 nc(){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 sc(t){return new Promise(e=>setTimeout(e,t))}function ac(){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 ic=class Xs{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 Xs(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}},oc=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,lc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,uc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Gt="?",is="An unknown error occurred",dc="0.0.4";function fc(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 hc(){let t=fc(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 pc=[[oc,"chrome"],[lc,"winjs"],[cc,"gecko"]];function mc(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,m]of pc)if(l=f.exec(i[o]),l){h=m;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]||Gt,lineno:l[3]?+l[3]:null,colno:l[4]?+l[4]:null};else if(h==="winjs")c={filename:l[2],function:l[1]||Gt,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]||Gt,lineno:l[4]?+l[4]:null,colno:l[5]?+l[5]:null};else continue;!c.function&&c.lineno&&(c.function=Gt),a.push(c)}}return a.length?a.reverse():null}function yc(t){let e=mc(t);return{type:t.name,value:t.message,stacktrace:{frames:e??[]}}}function gc(t){let e=uc.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 vc(t,e,r){var n,s;let a=Ve({event_id:hc().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:dc},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(yc(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 xc(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=Qo(r,["message"]),a=new Error(typeof n=="string"?n:is);return Object.assign(a,s)}let e=new Error(is);return Object.assign(e,{cause:t})}function bc(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,Ys(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,Hr=(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 ic,this.apiURL=gc(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:xc(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=vc(t,this.environment,this.release),n={event_id:r.event_id,dsn:this.dsn},s={type:"event"},a=JSON.stringify(n)+`
79
+ */var wr,Jn;function No(){if(Jn)return wr;Jn=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 wr=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},wr}var kr,Xn;function sn(){if(Xn)return kr;Xn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return kr=t,kr}var Sr,Qn;function qs(){return Qn||(Qn=1,Sr=Function.call.bind(Object.prototype.hasOwnProperty)),Sr}var Cr,es;function Ao(){if(es)return Cr;es=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=sn(),r={},n=qs();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={})},Cr=s,Cr}var Er,ts;function To(){if(ts)return Er;ts=1;var t=nn(),e=No(),r=sn(),n=qs(),s=Ao(),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 Er=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:I(),elementType:b(),instanceOf:Z,node:re(),objectOf:z,oneOf:M,oneOfType:B,shape:V,exact:W};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(se,Q,ee,ie,oe,ae,Re){if(ie=ie||p,ae=ae||ee,Re!==r){if(c){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Fe=ie+":"+ee;!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 Q[ee]==null?se?Q[ee]===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:_(Q,ee,ie,oe,ae)}var K=q.bind(null,!1);return K.isRequired=q.bind(null,!0),K}function k(_){function R(G,q,K,se,Q,ee){var ie=G[q],oe=ue(ie);if(oe!==_){var ae=xe(ie);return new v("Invalid "+se+" `"+Q+"` 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,se,Q){if(typeof _!="function")return new v("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var ee=G[q];if(!Array.isArray(ee)){var ie=ue(ee);return new v("Invalid "+se+" `"+Q+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected an array."))}for(var oe=0;oe<ee.length;oe++){var ae=_(ee,oe,K,se,Q+"["+oe+"]",r);if(ae instanceof Error)return ae}return null}return S(R)}function I(){function _(R,G,q,K,se){var Q=R[G];if(!o(Q)){var ee=ue(Q);return new v("Invalid "+K+" `"+se+"` of type "+("`"+ee+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return S(_)}function b(){function _(R,G,q,K,se){var Q=R[G];if(!t.isValidElementType(Q)){var ee=ue(Q);return new v("Invalid "+K+" `"+se+"` of type "+("`"+ee+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return S(_)}function Z(_){function R(G,q,K,se,Q){if(!(G[q]instanceof _)){var ee=_.name||p,ie=Ee(G[q]);return new v("Invalid "+se+" `"+Q+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected ")+("instance of `"+ee+"`."))}return null}return S(R)}function M(_){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,se,Q){for(var ee=G[q],ie=0;ie<_.length;ie++)if(x(ee,_[ie]))return null;var oe=JSON.stringify(_,function(Re,A){var Fe=xe(A);return Fe==="symbol"?String(A):A});return new v("Invalid "+se+" `"+Q+"` of value `"+String(ee)+"` "+("supplied to `"+K+"`, expected one of "+oe+"."))}return S(R)}function z(_){function R(G,q,K,se,Q){if(typeof _!="function")return new v("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var ee=G[q],ie=ue(ee);if(ie!=="object")return new v("Invalid "+se+" `"+Q+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected an object."));for(var oe in ee)if(n(ee,oe)){var ae=_(ee,oe,K,se,Q+"."+oe,r);if(ae instanceof Error)return ae}return null}return S(R)}function B(_){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,se,Q,ee,ie){for(var oe=[],ae=0;ae<_.length;ae++){var Re=_[ae],A=Re(K,se,Q,ee,ie,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&oe.push(A.data.expectedType)}var Fe=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new v("Invalid "+ee+" `"+ie+"` supplied to "+("`"+Q+"`"+Fe+"."))}return S(q)}function re(){function _(R,G,q,K,se){return ne(R[G])?null:new v("Invalid "+K+" `"+se+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return S(_)}function he(_,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 V(_){function R(G,q,K,se,Q){var ee=G[q],ie=ue(ee);if(ie!=="object")return new v("Invalid "+se+" `"+Q+"` of type `"+ie+"` "+("supplied to `"+K+"`, expected `object`."));for(var oe in _){var ae=_[oe];if(typeof ae!="function")return he(K,se,Q,oe,xe(ae));var Re=ae(ee,oe,K,se,Q+"."+oe,r);if(Re)return Re}return null}return S(R)}function W(_){function R(G,q,K,se,Q){var ee=G[q],ie=ue(ee);if(ie!=="object")return new v("Invalid "+se+" `"+Q+"` 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 he(K,se,Q,ae,xe(Re));if(!Re)return new v("Invalid "+se+" `"+Q+"` key `"+ae+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(G[q],null," ")+`
80
+ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var A=Re(ee,ae,K,se,Q+"."+ae,r);if(A)return A}return null}return S(R)}function ne(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(ne);if(_===null||o(_))return!0;var R=f(_);if(R){var G=R.call(_),q;if(R!==_.entries){for(;!(q=G.next()).done;)if(!ne(q.value))return!1}else for(;!(q=G.next()).done;){var K=q.value;if(K&&!ne(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 ue(_){var R=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":ve(R,_)?"symbol":R}function xe(_){if(typeof _>"u"||_===null)return""+_;var R=ue(_);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},Er}var Rr,rs;function Po(){if(rs)return Rr;rs=1;var t=sn();function e(){}function r(){}return r.resetWarningCache=e,Rr=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},Rr}var ns;function Io(){if(ns)return Bt.exports;if(ns=1,process.env.NODE_ENV!=="production"){var t=nn(),e=!0;Bt.exports=To()(t.isElement,e)}else Bt.exports=Po()();return Bt.exports}var Lo=Io();const Ie=Ws(Lo);var Mo=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Ur(){return Ur=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},Ur.apply(this,arguments)}function Vo(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 qt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zr(t,e)}function zr(t,e){return zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},zr(t,e)}var pr=(function(t){$o(e,t);function e(){var n;return n=t.call(this)||this,n.handleExpired=n.handleExpired.bind(qt(n)),n.handleErrored=n.handleErrored.bind(qt(n)),n.handleChange=n.handleChange.bind(qt(n)),n.handleRecaptchaRef=n.handleRecaptchaRef.bind(qt(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=Vo(s,Mo);return w.createElement("div",Ur({},a,{ref:this.handleRecaptchaRef}))},e})(w.Component);pr.displayName="ReCAPTCHA";pr.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};pr.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Or,ss;function Fo(){if(ss)return Or;ss=1;var t=nn(),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),I=i(v),b=0;b<C.length;++b){var Z=C[b];if(!r[Z]&&!(S&&S[Z])&&!(I&&I[Z])&&!(U&&U[Z])){var M=h(v,Z);try{o(x,Z,M)}catch{}}}}return x}return Or=m,Or}var Do=Fo();const Uo=Ws(Do);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 zo(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 Zo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Be={},Bo=0;function Wo(t,e){return e=e||{},function(n){var s=n.displayName||n.name||"Component",a=(function(o){Zo(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-"+Bo++),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=Be[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"&&(Be[p]={loaded:!0,observers:{}}),Be[p]){var C=Be[p];if(C&&(C.loaded||C.errored)){this.asyncScriptLoaderHandleLoad(C);return}C.observers[m]=function(M){return f.asyncScriptLoaderHandleLoad(M)};return}var U={};U[m]=function(M){return f.asyncScriptLoaderHandleLoad(M)},Be[p]={loaded:!1,observers:U};var I=document.createElement("script");I.src=p,I.async=!0;for(var b in e.attributes)I.setAttribute(b,e.attributes[b]);k&&(I.id=k);var Z=function(z){if(Be[p]){var B=Be[p],re=B.observers;for(var he in re)z(re[he])&&delete re[he]}};S&&typeof window<"u"&&(window[S]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),I.onload=function(){var M=Be[p];M&&(M.loaded=!0,Z(function(z){return S?!1:(z(M),!0)}))},I.onerror=function(){var M=Be[p];M&&(M.errored=!0,Z(function(z){return z(M),!0}))},document.body.appendChild(I)},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=Be[f];x&&(delete x.observers[this.asyncScriptLoaderGetScriptLoaderID()],e.removeOnUnmount===!0&&delete Be[f])},l.render=function(){var f=e.globalName,p=this.props;p.asyncScriptOnLoad;var m=p.forwardedRef,x=zo(p,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(x[f]=typeof window[f]<"u"?window[f]:void 0),x.ref=m,P.createElement(n,x)},c})(P.Component),i=P.forwardRef(function(o,c){return P.createElement(a,Zr({},o,{forwardedRef:c}))});return i.displayName="AsyncScriptLoader("+s+")",i.propTypes={asyncScriptOnLoad:Ie.func},Uo(i,n)}}var Br="onloadcallback",qo="grecaptcha";function Wr(){return typeof window<"u"&&window.recaptchaOptions||{}}function Go(){var t=Wr(),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 Ho=Wo(Go,{callbackName:Br,globalName:qo,attributes:Wr().nonce?{nonce:Wr().nonce}:{}})(pr);function De(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qr(t,e){return qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},qr(t,e)}function Yo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,qr(t,e)}var Ko=Object.defineProperty,Jo=Object.defineProperties,Xo=Object.getOwnPropertyDescriptors,lr=Object.getOwnPropertySymbols,Gs=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable,Gr=(t,e,r)=>e in t?Ko(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ve=(t,e)=>{for(var r in e||(e={}))Gs.call(e,r)&&Gr(t,r,e[r]);if(lr)for(var r of lr(e))Hs.call(e,r)&&Gr(t,r,e[r]);return t},Ys=(t,e)=>Jo(t,Xo(e)),Qo=(t,e)=>{var r={};for(var n in t)Gs.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&lr)for(var n of lr(t))e.indexOf(n)<0&&Hs.call(t,n)&&(r[n]=t[n]);return r},Oe=(t,e,r)=>(Gr(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())}),ec="hCaptcha-script",Jt="hCaptchaOnLoad",as="script-error",at="@hCaptcha/loader";function tc(t){return Object.entries(t).filter(([,e])=>e||e===!1).map(([e,r])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`).join("&")}function Ks(t){let e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function Js(t){return t||document.head}function rc(t){var e;t.setTag("source",at),t.setTag("url",document.URL),t.setContext("os",{UA:navigator.userAgent}),t.setContext("browser",Ve({},nc())),t.setContext("device",Ys(Ve({},ac()),{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 nc(){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 sc(t){return new Promise(e=>setTimeout(e,t))}function ac(){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 ic=class Xs{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 Xs(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}},oc=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,lc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,uc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Gt="?",is="An unknown error occurred",dc="0.0.4";function fc(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 hc(){let t=fc(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 pc=[[oc,"chrome"],[lc,"winjs"],[cc,"gecko"]];function mc(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 pc)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]||Gt,lineno:l[3]?+l[3]:null,colno:l[4]?+l[4]:null};else if(h==="winjs")c={filename:l[2],function:l[1]||Gt,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]||Gt,lineno:l[4]?+l[4]:null,colno:l[5]?+l[5]:null};else continue;!c.function&&c.lineno&&(c.function=Gt),a.push(c)}}return a.length?a.reverse():null}function yc(t){let e=mc(t);return{type:t.name,value:t.message,stacktrace:{frames:e??[]}}}function gc(t){let e=uc.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 vc(t,e,r){var n,s;let a=Ve({event_id:hc().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:dc},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(yc(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 xc(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=Qo(r,["message"]),a=new Error(typeof n=="string"?n:is);return Object.assign(a,s)}let e=new Error(is);return Object.assign(e,{cause:t})}function bc(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,Ys(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,Hr=(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 ic,this.apiURL=gc(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:xc(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=vc(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 bc(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),_c="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",wc="2.3.0",kc="production";function Sc(t=!0){if(!t)return os();Hr.init({dsn:_c,release:wc,environment:kc});let e=Hr.scope;return rc(e),os(e)}function os(t=null){return{addBreadcrumb:e=>{t&&t.addBreadcrumb(e)},captureRequest:e=>{t&&t.setRequest(e)},captureException:e=>{t&&Hr.captureException(e,t)}}}function Cc({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=Js(t),h=Ks(l);return new Promise((f,m)=>{let p=h.document.createElement("script");p.id=ec,o?p.src=`${o}?onload=${Jt}`:i?p.src=`${s}/1/secure-api.js?onload=${Jt}`:p.src=`${s}/1/api.js?onload=${Jt}`,p.crossOrigin=n,p.async=r;let x=(v,S)=>{try{!i&&a&&l.removeChild(p),S(v)}catch(k){m(k)}};p.onload=v=>x(v,f),p.onerror=v=>{c&&c(p.src),x(v,m)},p.src+=e!==""?`&${e}`:"",l.appendChild(p)})}var Ht=[];function Ec(t={cleanup:!1},e){try{e.addBreadcrumb({category:at,message:"hCaptcha loader params",data:t});let r=Js(t.scriptLocation),n=Ks(r),s=Ht.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[Jt]=()=>{e.addBreadcrumb({category:at,message:"hCaptcha script called onload function"}),i(n.window.hcaptcha)};let c=tc({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 Cc(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=Ht.findIndex(h=>h.scope===n.window);l!==-1&&Ht.splice(l,1),o(new Error(as))}}));return Ht.push({promise:a,scope:n.window}),a}catch(r){return e.captureException(r),Promise.reject(new Error(as))}}function Qs(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 Ec(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 sc(i),r+=1,Qs(t,e,r))}})}function Rc(){return Et(this,arguments,function*(t={}){let e=Sc(t.sentry);return yield Qs(t,e)})}function cs(t){var e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function ls(t){return t||document.head}var Oc=(function(t){Yo(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=ls(this.props.scriptLocation),i=cs(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,m=s.reportapi,p=s.sentry,x=s.custom,v=s.loadAsync,S=s.scriptLocation,k=s.scriptSource,C=s.secureApi,z=s.cleanup,V=z===void 0?!0:z,b=s.userJourneys,P={render:"explicit",apihost:a,assethost:i,endpoint:o,hl:h,host:c,imghost:l,recaptchacompat:f===!1?"off":null,reportapi:m,sentry:p,custom:x,loadAsync:v,scriptLocation:S,scriptSource:k,secureApi:C,cleanup:V,uj:b!==void 0?b:!1};Rc(P).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=ls(s.props.scriptLocation),i=cs(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 m=i.execute(f,s);m&&typeof m.then=="function"?m.then(function(p){a._pendingExecute=null,l(p)}).catch(function(p){a._pendingExecute=null,h(p)}):(a._pendingExecute=null,h(new Error("hcaptcha-execute-no-promise")))}catch(p){a._pendingExecute=null,h(p)}}}):(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 Dt=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(Oc,{ref:a,sitekey:t.siteKey,onVerify:e,onExpire:r}):t.version!=="v3"?u.jsx(Ho,{ref:s,sitekey:t.siteKey,onChange:i=>e(i??""),onExpired:r}):null});Dt.displayName="CaptchaWidget";function us(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function an(...t){return e=>{let r=!1;const n=t.map(s=>{const a=us(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():us(t[s],null)}}}}function on(...t){return w.useCallback(an(...t),t)}var jc=Symbol.for("react.lazy"),ur=w[" use ".trim().toString()];function Nc(t){return typeof t=="object"&&t!==null&&"then"in t}function ea(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===jc&&"_payload"in t&&Nc(t._payload)}function ta(t){const e=Tc(t),r=w.forwardRef((n,s)=>{let{children:a,...i}=n;ea(a)&&typeof ur=="function"&&(a=ur(a._payload));const o=w.Children.toArray(a),c=o.find(Ic);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 Ac=ta("Slot");function Tc(t){const e=w.forwardRef((r,n)=>{let{children:s,...a}=r;if(ea(s)&&typeof ur=="function"&&(s=ur(s._payload)),w.isValidElement(s)){const i=Mc(s),o=Lc(a,s.props);return s.type!==w.Fragment&&(o.ref=n?an(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 Pc=Symbol("radix.slottable");function Ic(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Pc}function Lc(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 Mc(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 ds=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,fs=Fs,ra=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return fs(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 m=ds(h)||ds(f);return s[l][m]}),o=r&&Object.entries(r).reduce((l,h)=>{let[f,m]=h;return m===void 0||(l[f]=m),l},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((l,h)=>{let{class:f,className:m,...p}=h;return Object.entries(p).every(x=>{let[v,S]=x;return Array.isArray(S)?S.includes({...a,...o}[v]):{...a,...o}[v]===S})?[...l,f,m]:l},[]);return fs(t,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},Vc=ra("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?Ac:"button";return u.jsx(i,{className:pe(Vc({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:pe("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 $c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=$c.reduce((t,e)=>{const r=ta(`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}},{}),Fc="Label",na=w.forwardRef((t,e)=>u.jsx(zt.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())}}));na.displayName=Fc;var sa=na;const Dc=ra("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ue=w.forwardRef(({className:t,...e},r)=>u.jsx(sa,{ref:r,className:pe(Dc(),t),...e}));Ue.displayName=sa.displayName;const ze=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:pe("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));ze.displayName="Card";const aa=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:pe("flex flex-col space-y-1.5 p-6",t),...e}));aa.displayName="CardHeader";const ia=w.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:pe("text-2xl font-semibold leading-none tracking-tight",t),...e}));ia.displayName="CardTitle";const oa=w.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:pe("text-sm text-muted-foreground",t),...e}));oa.displayName="CardDescription";const Xt=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:pe("p-6 pt-0",t),...e}));Xt.displayName="CardContent";const Uc=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:pe("flex items-center p-6 pt-0",t),...e}));Uc.displayName="CardFooter";function zc(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:m,children:p,...x}=f,v=((k=m==null?void 0:m[t])==null?void 0:k[c])||o,S=w.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:S,children:p})};l.displayName=a+"Provider";function h(f,m){var v;const p=((v=m==null?void 0:m[t])==null?void 0:v[c])||o,x=w.useContext(p);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,Zc(s,...e)]}function Zc(...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 hs(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:()=>{},Bc=w[" useInsertionEffect ".trim().toString()]||yt;function Wc({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,a,i]=qc({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 m=Gc(h)?h(t):h;m!==t&&((f=i.current)==null||f.call(i,m))}else a(h)},[o,t,a,i]);return[c,l]}function qc({defaultProp:t,onChange:e}){const[r,n]=w.useState(t),s=w.useRef(r),a=w.useRef(e);return Bc(()=>{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 Gc(t){return typeof t=="function"}function Hc(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 Yc(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 Kc(t,e){return w.useReducer((r,n)=>e[r][n]??r,t)}var ca=t=>{const{present:e,children:r}=t,n=Jc(e),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=on(n.ref,Xc(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:a}):null};ca.displayName="Presence";function Jc(t){const[e,r]=w.useState(),n=w.useRef(null),s=w.useRef(t),a=w.useRef("none"),i=t?"mounted":"unmounted",[o,c]=Kc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Yt(n.current);a.current=o==="mounted"?l:"none"},[o]),yt(()=>{const l=n.current,h=s.current;if(h!==t){const m=a.current,p=Yt(l);t?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),yt(()=>{if(e){let l;const h=e.ownerDocument.defaultView??window,f=p=>{const v=Yt(n.current).includes(CSS.escape(p.animationName));if(p.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)})}},m=p=>{p.target===e&&(a.current=Yt(n.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{h.clearTimeout(l),e.removeEventListener("animationstart",m),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 Yt(t){return(t==null?void 0:t.animationName)||"none"}function Xc(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 Qc(t){const e=el(t),r=w.forwardRef((n,s)=>{const{children:a,...i}=n,o=w.Children.toArray(a),c=o.find(rl);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 el(t){const e=w.forwardRef((r,n)=>{const{children:s,...a}=r;if(w.isValidElement(s)){const i=sl(s),o=nl(a,s.props);return s.type!==w.Fragment&&(o.ref=n?an(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 tl=Symbol("radix.slottable");function rl(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tl}function nl(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 sl(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 al=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cn=al.reduce((t,e)=>{const r=Qc(`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}},{}),mr="Checkbox",[il]=zc(mr),[ol,ln]=il(mr);function cl(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,[m,p]=Wc({prop:r,defaultProp:s??!1,onChange:c,caller:mr}),[x,v]=w.useState(null),[S,k]=w.useState(null),C=w.useRef(!1),z=x?!!i||!!x.closest("form"):!0,V={checked:m,disabled:a,setChecked:p,control:x,setControl:v,name:o,form:i,value:h,hasConsumerStoppedPropagationRef:C,required:l,defaultChecked:ct(s)?!1:s,isFormControl:z,bubbleInput:S,setBubbleInput:k};return u.jsx(ol,{scope:e,...V,children:ll(f)?f(V):n})}var la="CheckboxTrigger",ua=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:m,isFormControl:p,bubbleInput:x}=ln(la,t),v=on(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(cn.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":l,"data-state":ma(c),"data-disabled":o?"":void 0,disabled:o,value:i,...n,ref:v,onKeyDown:hs(e,k=>{k.key==="Enter"&&k.preventDefault()}),onClick:hs(r,k=>{f(C=>ct(C)?!0:!C),x&&p&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})})});ua.displayName=la;var un=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(cl,{__scopeCheckbox:r,checked:s,defaultChecked:a,disabled:o,required:i,onCheckedChange:l,name:n,form:h,value:c,internal_do_not_use_render:({isFormControl:m})=>u.jsxs(u.Fragment,{children:[u.jsx(ua,{...f,ref:e,__scopeCheckbox:r}),m&&u.jsx(pa,{__scopeCheckbox:r})]})})});un.displayName=mr;var da="CheckboxIndicator",fa=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,a=ln(da,r);return u.jsx(ca,{present:n||ct(a.checked)||a.checked===!0,children:u.jsx(cn.span,{"data-state":ma(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});fa.displayName=da;var ha="CheckboxBubbleInput",pa=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:m,setBubbleInput:p}=ln(ha,t),x=on(r,p),v=Hc(a),S=Yc(n);w.useEffect(()=>{const C=m;if(!C)return;const z=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(z,"checked").set,P=!s.current;if(v!==a&&b){const L=new Event("click",{bubbles:P});C.indeterminate=ct(a),b.call(C,ct(a)?!1:a),C.dispatchEvent(L)}},[m,v,a,s]);const k=w.useRef(ct(a)?!1:a);return u.jsx(cn.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%)"}})});pa.displayName=ha;function ll(t){return typeof t=="function"}function ct(t){return t==="indeterminate"}function ma(t){return ct(t)?"indeterminate":t?"checked":"unchecked"}const ya=w.forwardRef(({className:t,...e},r)=>u.jsx(un,{ref:r,className:pe("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(fa,{className:"flex items-center justify-center text-current",children:u.jsx(zi,{className:"h-3.5 w-3.5"})})}));ya.displayName=un.displayName;var ul="Separator",ps="horizontal",dl=["horizontal","vertical"],ga=w.forwardRef((t,e)=>{const{decorative:r,orientation:n=ps,...s}=t,a=fl(n)?n:ps,o=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(zt.div,{"data-orientation":a,...o,...s,ref:e})});ga.displayName=ul;function fl(t){return dl.includes(t)}var va=ga;const Rt=w.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},s)=>u.jsx(va,{ref:s,decorative:r,orientation:e,className:pe("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));Rt.displayName=va.displayName;const hl=hr({email:Je().email("Enter a valid email address"),password:Je().min(6,"Password must be at least 6 characters")}),pl=hr({email:Je().email("Enter a valid email address")});function ml(){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 yl({provider:t}){return t==="google"?u.jsx(ml,{}):t==="github"?u.jsx(Bi,{className:"h-4 w-4"}):null}function gl({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(yl,{provider:t.provider}),e]})})}function vl({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:pe("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 xl(){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 bl({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}=dr(),[h,f]=I.useState("password"),[m,p]=I.useState(""),[x,v]=I.useState(null),[S,k]=I.useState(null),[C,z]=I.useState(!1),[V,b]=I.useState(!1),P=I.useRef(null),L=tr({resolver:rr(hl)}),Z=tr({resolver:rr(pl)});async function te(){return c!=null&&c.captcha.enabled?c.captcha.provider==="recaptcha"&&c.captcha.version==="v3"&&c.captcha.siteKey?Yr(c.captcha.siteKey,"login"):m||(v("Please complete the captcha"),null):""}function ce(){var _;(_=P.current)==null||_.reset(),p(""),v(null)}const ye=L.handleSubmit(async _=>{k(null);const R=await te();if(R!==null)try{await i({email:_.email,password:_.password,captchaToken:R,rememberMe:V}),ce(),e==null||e({})}catch(q){ce();const W=q instanceof Error?q:new Error("Login failed");k(W.message),r==null||r(W)}}),$=Z.handleSubmit(async _=>{k(null);const R=await te();if(R!==null)try{await o({email:_.email,captchaToken:R}),ce(),z(!0)}catch(q){ce();const W=q instanceof Error?q:new Error("Failed to send magic link");k(W.message),r==null||r(W)}});if(C)return u.jsxs(ze,{className:pe("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:Z.getValues("email")})]}),u.jsx("button",{type:"button",onClick:()=>z(!1),className:"text-sm text-primary underline-offset-4 hover:underline",children:"Use a different email"})]});if(l)return u.jsx(ze,{className:pe("w-full max-w-sm",t),children:u.jsx(xl,{})});const B=L.formState.isSubmitting,re=Z.formState.isSubmitting,ve=B||re,ue=(((xe=c==null?void 0:c.oauthProviders)==null?void 0:xe.length)??0)>0;return u.jsx(ze,{className:pe("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}),ue&&u.jsx("div",{className:pe("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(gl,{provider:_},_.provider))}),ue&&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(vl,{mode:h,onChange:_=>{f(_),k(null),ce()}}),h==="password"&&u.jsxs("form",{onSubmit:ye,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",...L.register("email")}),L.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:L.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",...L.register("password")}),L.formState.errors.password&&u.jsx("p",{className:"text-xs text-destructive",children:L.formState.errors.password.message})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ya,{id:"remember-me",checked:V,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(Dt,{ref:P,config:c.captcha,onVerify:_=>{p(_),v(null)},onExpire:()=>p("")}),x&&u.jsx("p",{className:"text-xs text-destructive",children:x})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:ve,children:[B&&u.jsx(cr,{className:"animate-spin"}),B?"Signing in…":"Sign in"]})]}),h==="magic-link"&&u.jsxs("form",{onSubmit:$,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",...Z.register("email")}),Z.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:Z.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(Dt,{ref:P,config:c.captcha,onVerify:_=>{p(_),v(null)},onExpire:()=>p("")}),x&&u.jsx("p",{className:"text-xs text-destructive",children:x})]}),u.jsxs(dt,{type:"submit",className:"w-full",disabled:ve,children:[re&&u.jsx(cr,{className:"animate-spin"}),re?"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 _l=hr({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($i(""))}).refine(t=>t.password===t.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function wl(){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 kl({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Create an account"}){const{signup:a}=Ot(),{config:i,configLoading:o}=dr(),[c,l]=I.useState(""),[h,f]=I.useState(null),[m,p]=I.useState(null),x=I.useRef(null),{register:v,handleSubmit:S,formState:{errors:k,isSubmitting:C}}=tr({resolver:rr(_l)});async function z(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Yr(i.captcha.siteKey,"signup"):c||(f("Please complete the captcha"),null):""}function V(){var P;(P=x.current)==null||P.reset(),l(""),f(null)}const b=S(async P=>{p(null);const L=await z();if(L!==null)try{await a({firstName:P.firstName,lastName:P.lastName,email:P.email,password:P.password,whatsappNumber:P.whatsappNumber||void 0,captchaToken:L}),V(),e==null||e({})}catch(Z){V();const te=Z instanceof Error?Z:new Error("Signup failed");p(te.message),r==null||r(te)}});return o?u.jsx(ze,{className:pe("w-full max-w-sm",t),children:u.jsx(wl,{})}):u.jsx(ze,{className:pe("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:[m&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:m}),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(Dt,{ref:x,config:i.captcha,onVerify:P=>{l(P),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(cr,{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 Sl=hr({email:Je().email("Enter a valid email address")});function Cl(){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 El({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Forgot password?"}){const{forgotPassword:a}=Ot(),{config:i,configLoading:o}=dr(),[c,l]=I.useState(""),[h,f]=I.useState(null),[m,p]=I.useState(null),[x,v]=I.useState(!1),S=I.useRef(null),{register:k,handleSubmit:C,getValues:z,formState:{errors:V,isSubmitting:b}}=tr({resolver:rr(Sl)});async function P(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Yr(i.captcha.siteKey,"forgot_password"):c||(f("Please complete the captcha"),null):""}function L(){var te;(te=S.current)==null||te.reset(),l(""),f(null)}const Z=C(async te=>{p(null);const ce=await P();if(ce!==null)try{await a({email:te.email,captchaToken:ce}),L(),v(!0),e==null||e()}catch(ye){L();const $=ye instanceof Error?ye:new Error("Request failed");p($.message),r==null||r($)}});return o?u.jsx(ze,{className:pe("w-full max-w-sm",t),children:u.jsx(Cl,{})}):x?u.jsx(ze,{className:pe("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(Zi,{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:z("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:pe("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:Z,noValidate:!0,className:"space-y-4",children:[m&&u.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:m}),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")}),V.email&&u.jsx("p",{className:"text-xs text-destructive",children:V.email.message})]}),(i==null?void 0:i.captcha.enabled)&&i.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Dt,{ref:S,config:i.captcha,onVerify:te=>{l(te),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(cr,{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 xa({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:pe("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:pe("gap-2",t),children:[u.jsx(Wi,{className:"h-4 w-4"}),i?"Signing out…":n]})}function Rl(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:m,children:p,...x}=f,v=((k=m==null?void 0:m[t])==null?void 0:k[c])||o,S=w.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:S,children:p})};l.displayName=a+"Provider";function h(f,m){var v;const p=((v=m==null?void 0:m[t])==null?void 0:v[c])||o,x=w.useContext(p);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,Ol(s,...e)]}function Ol(...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 jl(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 Kt={exports:{}},jr={};/**
83
+ `+JSON.stringify(r),i=yield bc(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),_c="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",wc="2.3.0",kc="production";function Sc(t=!0){if(!t)return os();Hr.init({dsn:_c,release:wc,environment:kc});let e=Hr.scope;return rc(e),os(e)}function os(t=null){return{addBreadcrumb:e=>{t&&t.addBreadcrumb(e)},captureRequest:e=>{t&&t.setRequest(e)},captureException:e=>{t&&Hr.captureException(e,t)}}}function Cc({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=Js(t),h=Ks(l);return new Promise((f,p)=>{let m=h.document.createElement("script");m.id=ec,o?m.src=`${o}?onload=${Jt}`:i?m.src=`${s}/1/secure-api.js?onload=${Jt}`:m.src=`${s}/1/api.js?onload=${Jt}`,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 Ht=[];function Ec(t={cleanup:!1},e){try{e.addBreadcrumb({category:at,message:"hCaptcha loader params",data:t});let r=Js(t.scriptLocation),n=Ks(r),s=Ht.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[Jt]=()=>{e.addBreadcrumb({category:at,message:"hCaptcha script called onload function"}),i(n.window.hcaptcha)};let c=tc({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 Cc(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=Ht.findIndex(h=>h.scope===n.window);l!==-1&&Ht.splice(l,1),o(new Error(as))}}));return Ht.push({promise:a,scope:n.window}),a}catch(r){return e.captureException(r),Promise.reject(new Error(as))}}function Qs(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 Ec(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 sc(i),r+=1,Qs(t,e,r))}})}function Rc(){return Et(this,arguments,function*(t={}){let e=Sc(t.sentry);return yield Qs(t,e)})}function cs(t){var e=t&&t.ownerDocument||document,r=e.defaultView||e.parentWindow||window;return{document:e,window:r}}function ls(t){return t||document.head}var Oc=(function(t){Yo(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=ls(this.props.scriptLocation),i=cs(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,I=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:I,uj:b!==void 0?b:!1};Rc(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=ls(s.props.scriptLocation),i=cs(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 Dt=P.forwardRef(({config:t,onVerify:e,onExpire:r},n)=>{const s=P.useRef(null),a=P.useRef(null);return P.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(Oc,{ref:a,sitekey:t.siteKey,onVerify:e,onExpire:r}):t.version!=="v3"?u.jsx(Ho,{ref:s,sitekey:t.siteKey,onChange:i=>e(i??""),onExpired:r}):null});Dt.displayName="CaptchaWidget";function us(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function an(...t){return e=>{let r=!1;const n=t.map(s=>{const a=us(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():us(t[s],null)}}}}function on(...t){return w.useCallback(an(...t),t)}var jc=Symbol.for("react.lazy"),ur=w[" use ".trim().toString()];function Nc(t){return typeof t=="object"&&t!==null&&"then"in t}function ea(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===jc&&"_payload"in t&&Nc(t._payload)}function ta(t){const e=Tc(t),r=w.forwardRef((n,s)=>{let{children:a,...i}=n;ea(a)&&typeof ur=="function"&&(a=ur(a._payload));const o=w.Children.toArray(a),c=o.find(Ic);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 Ac=ta("Slot");function Tc(t){const e=w.forwardRef((r,n)=>{let{children:s,...a}=r;if(ea(s)&&typeof ur=="function"&&(s=ur(s._payload)),w.isValidElement(s)){const i=Mc(s),o=Lc(a,s.props);return s.type!==w.Fragment&&(o.ref=n?an(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 Pc=Symbol("radix.slottable");function Ic(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Pc}function Lc(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 Mc(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 ds=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,fs=Fs,ra=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return fs(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=ds(h)||ds(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 fs(t,i,c,r==null?void 0:r.class,r==null?void 0:r.className)},Vc=ra("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?Ac:"button";return u.jsx(i,{className:me(Vc({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 $c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=$c.reduce((t,e)=>{const r=ta(`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}},{}),Fc="Label",na=w.forwardRef((t,e)=>u.jsx(zt.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())}}));na.displayName=Fc;var sa=na;const Dc=ra("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ue=w.forwardRef(({className:t,...e},r)=>u.jsx(sa,{ref:r,className:me(Dc(),t),...e}));Ue.displayName=sa.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 aa=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("flex flex-col space-y-1.5 p-6",t),...e}));aa.displayName="CardHeader";const ia=w.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:me("text-2xl font-semibold leading-none tracking-tight",t),...e}));ia.displayName="CardTitle";const oa=w.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:me("text-sm text-muted-foreground",t),...e}));oa.displayName="CardDescription";const Xt=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("p-6 pt-0",t),...e}));Xt.displayName="CardContent";const Uc=w.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:me("flex items-center p-6 pt-0",t),...e}));Uc.displayName="CardFooter";function zc(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,Zc(s,...e)]}function Zc(...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 hs(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:()=>{},Bc=w[" useInsertionEffect ".trim().toString()]||yt;function Wc({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,a,i]=qc({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=Gc(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 qc({defaultProp:t,onChange:e}){const[r,n]=w.useState(t),s=w.useRef(r),a=w.useRef(e);return Bc(()=>{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 Gc(t){return typeof t=="function"}function Hc(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 Yc(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 Kc(t,e){return w.useReducer((r,n)=>e[r][n]??r,t)}var ca=t=>{const{present:e,children:r}=t,n=Jc(e),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=on(n.ref,Xc(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:a}):null};ca.displayName="Presence";function Jc(t){const[e,r]=w.useState(),n=w.useRef(null),s=w.useRef(t),a=w.useRef("none"),i=t?"mounted":"unmounted",[o,c]=Kc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Yt(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=Yt(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=Yt(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=Yt(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 Yt(t){return(t==null?void 0:t.animationName)||"none"}function Xc(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 Qc(t){const e=el(t),r=w.forwardRef((n,s)=>{const{children:a,...i}=n,o=w.Children.toArray(a),c=o.find(rl);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 el(t){const e=w.forwardRef((r,n)=>{const{children:s,...a}=r;if(w.isValidElement(s)){const i=sl(s),o=nl(a,s.props);return s.type!==w.Fragment&&(o.ref=n?an(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 tl=Symbol("radix.slottable");function rl(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tl}function nl(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 sl(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 al=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cn=al.reduce((t,e)=>{const r=Qc(`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}},{}),mr="Checkbox",[il]=zc(mr),[ol,ln]=il(mr);function cl(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]=Wc({prop:r,defaultProp:s??!1,onChange:c,caller:mr}),[x,v]=w.useState(null),[S,k]=w.useState(null),C=w.useRef(!1),U=x?!!i||!!x.closest("form"):!0,I={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(ol,{scope:e,...I,children:ll(f)?f(I):n})}var la="CheckboxTrigger",ua=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}=ln(la,t),v=on(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(cn.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":l,"data-state":ma(c),"data-disabled":o?"":void 0,disabled:o,value:i,...n,ref:v,onKeyDown:hs(e,k=>{k.key==="Enter"&&k.preventDefault()}),onClick:hs(r,k=>{f(C=>ct(C)?!0:!C),x&&m&&(p.current=k.isPropagationStopped(),p.current||k.stopPropagation())})})});ua.displayName=la;var un=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(cl,{__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(ua,{...f,ref:e,__scopeCheckbox:r}),p&&u.jsx(pa,{__scopeCheckbox:r})]})})});un.displayName=mr;var da="CheckboxIndicator",fa=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,a=ln(da,r);return u.jsx(ca,{present:n||ct(a.checked)||a.checked===!0,children:u.jsx(cn.span,{"data-state":ma(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});fa.displayName=da;var ha="CheckboxBubbleInput",pa=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}=ln(ha,t),x=on(r,m),v=Hc(a),S=Yc(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 M=new Event("click",{bubbles:Z});C.indeterminate=ct(a),b.call(C,ct(a)?!1:a),C.dispatchEvent(M)}},[p,v,a,s]);const k=w.useRef(ct(a)?!1:a);return u.jsx(cn.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%)"}})});pa.displayName=ha;function ll(t){return typeof t=="function"}function ct(t){return t==="indeterminate"}function ma(t){return ct(t)?"indeterminate":t?"checked":"unchecked"}const ya=w.forwardRef(({className:t,...e},r)=>u.jsx(un,{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(fa,{className:"flex items-center justify-center text-current",children:u.jsx(zi,{className:"h-3.5 w-3.5"})})}));ya.displayName=un.displayName;var ul="Separator",ps="horizontal",dl=["horizontal","vertical"],ga=w.forwardRef((t,e)=>{const{decorative:r,orientation:n=ps,...s}=t,a=fl(n)?n:ps,o=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(zt.div,{"data-orientation":a,...o,...s,ref:e})});ga.displayName=ul;function fl(t){return dl.includes(t)}var va=ga;const Rt=w.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},s)=>u.jsx(va,{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=va.displayName;const hl=hr({email:Je().email("Enter a valid email address"),password:Je().min(6,"Password must be at least 6 characters")}),pl=hr({email:Je().email("Enter a valid email address")});function ml(){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 yl({provider:t}){return t==="google"?u.jsx(ml,{}):t==="github"?u.jsx(Bi,{className:"h-4 w-4"}):null}function gl({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(yl,{provider:t.provider}),e]})})}function vl({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 xl(){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 bl({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}=dr(),[h,f]=P.useState("password"),[p,m]=P.useState(""),[x,v]=P.useState(null),[S,k]=P.useState(null),[C,U]=P.useState(!1),[I,b]=P.useState(!1),Z=P.useRef(null),M=tr({resolver:rr(hl)}),z=tr({resolver:rr(pl)});async function B(){return c!=null&&c.captcha.enabled?c.captcha.provider==="recaptcha"&&c.captcha.version==="v3"&&c.captcha.siteKey?Yr(c.captcha.siteKey,"login"):p||(v("Please complete the captcha"),null):""}function re(){var _;(_=Z.current)==null||_.reset(),m(""),v(null)}const he=M.handleSubmit(async _=>{k(null);const R=await B();if(R!==null)try{await i({email:_.email,password:_.password,captchaToken:R,rememberMe:I}),re(),e==null||e({})}catch(G){re();const q=G instanceof Error?G:new Error("Login failed");k(q.message),r==null||r(q)}}),V=z.handleSubmit(async _=>{k(null);const R=await B();if(R!==null)try{await o({email:_.email,captchaToken:R}),re(),U(!0)}catch(G){re();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:z.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(xl,{})});const W=M.formState.isSubmitting,ne=z.formState.isSubmitting,ve=W||ne,ue=(((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}),ue&&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(gl,{provider:_},_.provider))}),ue&&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(vl,{mode:h,onChange:_=>{f(_),k(null),re()}}),h==="password"&&u.jsxs("form",{onSubmit:he,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",...M.register("email")}),M.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:M.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",...M.register("password")}),M.formState.errors.password&&u.jsx("p",{className:"text-xs text-destructive",children:M.formState.errors.password.message})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ya,{id:"remember-me",checked:I,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(Dt,{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:ve,children:[W&&u.jsx(cr,{className:"animate-spin"}),W?"Signing in…":"Sign in"]})]}),h==="magic-link"&&u.jsxs("form",{onSubmit:V,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",...z.register("email")}),z.formState.errors.email&&u.jsx("p",{className:"text-xs text-destructive",children:z.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(Dt,{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:ve,children:[ne&&u.jsx(cr,{className:"animate-spin"}),ne?"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 _l=hr({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($i(""))}).refine(t=>t.password===t.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function wl(){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 kl({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Create an account"}){const{signup:a}=Ot(),{config:i,configLoading:o}=dr(),[c,l]=P.useState(""),[h,f]=P.useState(null),[p,m]=P.useState(null),x=P.useRef(null),{register:v,handleSubmit:S,formState:{errors:k,isSubmitting:C}}=tr({resolver:rr(_l)});async function U(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Yr(i.captcha.siteKey,"signup"):c||(f("Please complete the captcha"),null):""}function I(){var Z;(Z=x.current)==null||Z.reset(),l(""),f(null)}const b=S(async Z=>{m(null);const M=await U();if(M!==null)try{await a({firstName:Z.firstName,lastName:Z.lastName,email:Z.email,password:Z.password,whatsappNumber:Z.whatsappNumber||void 0,captchaToken:M}),I(),e==null||e({})}catch(z){I();const B=z instanceof Error?z:new Error("Signup failed");m(B.message),r==null||r(B)}});return o?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(wl,{})}):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(Dt,{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(cr,{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 Sl=hr({email:Je().email("Enter a valid email address")});function Cl(){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 El({className:t,onSuccess:e,onError:r,loginUrl:n,title:s="Forgot password?"}){const{forgotPassword:a}=Ot(),{config:i,configLoading:o}=dr(),[c,l]=P.useState(""),[h,f]=P.useState(null),[p,m]=P.useState(null),[x,v]=P.useState(!1),S=P.useRef(null),{register:k,handleSubmit:C,getValues:U,formState:{errors:I,isSubmitting:b}}=tr({resolver:rr(Sl)});async function Z(){return i!=null&&i.captcha.enabled?i.captcha.provider==="recaptcha"&&i.captcha.version==="v3"&&i.captcha.siteKey?Yr(i.captcha.siteKey,"forgot_password"):c||(f("Please complete the captcha"),null):""}function M(){var B;(B=S.current)==null||B.reset(),l(""),f(null)}const z=C(async B=>{m(null);const re=await Z();if(re!==null)try{await a({email:B.email,captchaToken:re}),M(),v(!0),e==null||e()}catch(he){M();const V=he instanceof Error?he:new Error("Request failed");m(V.message),r==null||r(V)}});return o?u.jsx(ze,{className:me("w-full max-w-sm",t),children:u.jsx(Cl,{})}):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(Zi,{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:z,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")}),I.email&&u.jsx("p",{className:"text-xs text-destructive",children:I.email.message})]}),(i==null?void 0:i.captcha.enabled)&&i.captcha.version!=="v3"&&u.jsxs("div",{className:"space-y-1",children:[u.jsx(Dt,{ref:S,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:b,children:[b&&u.jsx(cr,{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 xa({className:t,onSuccess:e,onError:r,label:n="Sign out",children:s}){const{logout:a}=Ot(),[i,o]=P.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(Wi,{className:"h-4 w-4"}),i?"Signing out…":n]})}function Rl(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,Ol(s,...e)]}function Ol(...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 jl(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 Kt={exports:{}},jr={};/**
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(Q,se,Y,ne,X+"."
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 ms;function Nl(){if(ms)return jr;ms=1;var t=I;function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,s=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue;function o(f,m){var p=m(),x=n({inst:{value:p,getSnapshot:m}}),v=x[0].inst,S=x[1];return a(function(){v.value=p,v.getSnapshot=m,c(v)&&S({inst:v})},[f,p,m]),s(function(){return c(v)&&S({inst:v}),f(function(){c(v)&&S({inst:v})})},[f]),i(p),p}function c(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!r(f,p)}catch{return!0}}function l(f,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return jr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,jr}var Nr={};/**
91
+ */var ms;function Nl(){if(ms)return jr;ms=1;var t=P;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 jr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,jr}var Nr={};/**
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(Q,se,Y,ne,X+"."
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 ys;function Al(){return ys||(ys=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}function e(p,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})},[p,v,x]),o(function(){return r(k)&&C({inst:k}),p(function(){r(k)&&C({inst:k})})},[p]),l(v),v}function r(p){var x=p.getSnapshot;p=p.value;try{var v=x();return!a(p,v)}catch{return!0}}function n(p,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,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Nr.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Nr}var gs;function Tl(){return gs||(gs=1,process.env.NODE_ENV==="production"?Kt.exports=Nl():Kt.exports=Al()),Kt.exports}var Pl=Tl();function Il(){return Pl.useSyncExternalStore(Ll,()=>!0,()=>!1)}function Ll(){return()=>{}}var dn="Avatar",[Ml]=Rl(dn),[Vl,ba]=Ml(dn),_a=w.forwardRef((t,e)=>{const{__scopeAvatar:r,...n}=t,[s,a]=w.useState("idle");return u.jsx(Vl,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:a,children:u.jsx(zt.span,{...n,ref:e})})});_a.displayName=dn;var wa="AvatarImage",ka=w.forwardRef((t,e)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...a}=t,i=ba(wa,r),o=$l(n,a),c=jl(l=>{s(l),i.onImageLoadingStatusChange(l)});return yt(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?u.jsx(zt.img,{...a,ref:e,src:n}):null});ka.displayName=wa;var Sa="AvatarFallback",Ca=w.forwardRef((t,e)=>{const{__scopeAvatar:r,delayMs:n,...s}=t,a=ba(Sa,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(zt.span,{...s,ref:e}):null});Ca.displayName=Sa;function vs(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function $l(t,{referrerPolicy:e,crossOrigin:r}){const n=Il(),s=w.useRef(null),a=n?(s.current||(s.current=new window.Image),s.current):null,[i,o]=w.useState(()=>vs(a,t));return yt(()=>{o(vs(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 Ea=_a,Ra=ka,Oa=Ca;const ja=w.forwardRef(({className:t,...e},r)=>u.jsx(Ea,{ref:r,className:pe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));ja.displayName=Ea.displayName;const Na=w.forwardRef(({className:t,...e},r)=>u.jsx(Ra,{ref:r,className:pe("aspect-square h-full w-full",t),...e}));Na.displayName=Ra.displayName;const Aa=w.forwardRef(({className:t,...e},r)=>u.jsx(Oa,{ref:r,className:pe("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Aa.displayName=Oa.displayName;function Fl({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:pe("w-full max-w-md",t),children:u.jsx(Xt,{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:pe("w-full max-w-md",t),children:u.jsx(Xt,{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:pe("w-full max-w-md",t),children:[u.jsx(aa,{children:u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsxs(ja,{className:"h-16 w-16",children:[s.avatarUrl&&u.jsx(Na,{src:s.avatarUrl,alt:c}),u.jsx(Aa,{className:"text-lg",children:o})]}),u.jsxs("div",{className:"flex-1 space-y-1",children:[u.jsx(ia,{className:"text-xl",children:c}),u.jsx(oa,{children:s.email})]}),e&&u.jsx(dt,{variant:"ghost",size:"icon",onClick:()=>e(s),"aria-label":"Edit profile",children:u.jsx(Gi,{className:"h-4 w-4"})})]})}),u.jsx(Rt,{}),u.jsxs(Xt,{className:"space-y-4 pt-4",children:[u.jsx(Ar,{icon:u.jsx(qi,{className:"h-4 w-4 text-muted-foreground"}),label:"Email",value:s.email}),s.whatsappNumber&&u.jsx(Ar,{icon:u.jsx(Hi,{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,m])=>typeof m=="string"||typeof m=="number"?u.jsx(Ar,{label:Dl(f),value:String(m)},f):null),r&&u.jsxs(u.Fragment,{children:[u.jsx(Rt,{}),u.jsx(xa,{className:"w-full",onSuccess:n})]})]})]})}function Ar({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 Dl(t){return t.replace(/([A-Z])/g," $1").replace(/_/g," ").trim().replace(/^\w/,e=>e.toUpperCase())}exports.AuthProvider=Da;exports.ForgotPasswordForm=El;exports.LoginForm=bl;exports.LogoutButton=xa;exports.ProfileComponent=Fl;exports.SignupForm=kl;exports.useAuth=Ot;exports.useAuthConfig=dr;
99
+ */var ys;function Al(){return ys||(ys=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=P,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;Nr.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())})()),Nr}var gs;function Tl(){return gs||(gs=1,process.env.NODE_ENV==="production"?Kt.exports=Nl():Kt.exports=Al()),Kt.exports}var Pl=Tl();function Il(){return Pl.useSyncExternalStore(Ll,()=>!0,()=>!1)}function Ll(){return()=>{}}var dn="Avatar",[Ml]=Rl(dn),[Vl,ba]=Ml(dn),_a=w.forwardRef((t,e)=>{const{__scopeAvatar:r,...n}=t,[s,a]=w.useState("idle");return u.jsx(Vl,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:a,children:u.jsx(zt.span,{...n,ref:e})})});_a.displayName=dn;var wa="AvatarImage",ka=w.forwardRef((t,e)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...a}=t,i=ba(wa,r),o=$l(n,a),c=jl(l=>{s(l),i.onImageLoadingStatusChange(l)});return yt(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?u.jsx(zt.img,{...a,ref:e,src:n}):null});ka.displayName=wa;var Sa="AvatarFallback",Ca=w.forwardRef((t,e)=>{const{__scopeAvatar:r,delayMs:n,...s}=t,a=ba(Sa,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(zt.span,{...s,ref:e}):null});Ca.displayName=Sa;function vs(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function $l(t,{referrerPolicy:e,crossOrigin:r}){const n=Il(),s=w.useRef(null),a=n?(s.current||(s.current=new window.Image),s.current):null,[i,o]=w.useState(()=>vs(a,t));return yt(()=>{o(vs(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 Ea=_a,Ra=ka,Oa=Ca;const ja=w.forwardRef(({className:t,...e},r)=>u.jsx(Ea,{ref:r,className:me("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));ja.displayName=Ea.displayName;const Na=w.forwardRef(({className:t,...e},r)=>u.jsx(Ra,{ref:r,className:me("aspect-square h-full w-full",t),...e}));Na.displayName=Ra.displayName;const Aa=w.forwardRef(({className:t,...e},r)=>u.jsx(Oa,{ref:r,className:me("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Aa.displayName=Oa.displayName;function Fl({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(Xt,{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(Xt,{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(aa,{children:u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsxs(ja,{className:"h-16 w-16",children:[s.avatarUrl&&u.jsx(Na,{src:s.avatarUrl,alt:c}),u.jsx(Aa,{className:"text-lg",children:o})]}),u.jsxs("div",{className:"flex-1 space-y-1",children:[u.jsx(ia,{className:"text-xl",children:c}),u.jsx(oa,{children:s.email})]}),e&&u.jsx(dt,{variant:"ghost",size:"icon",onClick:()=>e(s),"aria-label":"Edit profile",children:u.jsx(Gi,{className:"h-4 w-4"})})]})}),u.jsx(Rt,{}),u.jsxs(Xt,{className:"space-y-4 pt-4",children:[u.jsx(Ar,{icon:u.jsx(qi,{className:"h-4 w-4 text-muted-foreground"}),label:"Email",value:s.email}),s.whatsappNumber&&u.jsx(Ar,{icon:u.jsx(Hi,{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(Ar,{label:Dl(f),value:String(p)},f):null),r&&u.jsxs(u.Fragment,{children:[u.jsx(Rt,{}),u.jsx(xa,{className:"w-full",onSuccess:n})]})]})]})}function Ar({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 Dl(t){return t.replace(/([A-Z])/g," $1").replace(/_/g," ").trim().replace(/^\w/,e=>e.toUpperCase())}exports.AuthProvider=Da;exports.ForgotPasswordForm=El;exports.LoginForm=bl;exports.LogoutButton=xa;exports.ProfileComponent=Fl;exports.SignupForm=kl;exports.useAuth=Ot;exports.useAuthConfig=dr;
100
100
  //# sourceMappingURL=index.cjs.map