1import{c as Ke,R as A,r as f,j as s,a as Y,a1 as Pr,B as Z,a2 as nr,V as Se,a3 as ho,e as rr,m as po,P as oi,a4 as si,n as ai,a5 as ii,a6 as li,A as pt,F as ci,D as di,E as ui,i as fi,C as go,a7 as mi,a8 as hi,a9 as pi,k as gi,u as xi,I as kn,h as yi,aa as jt,p as vi,q as Dn,ab as Ar,ac as bi,ad as xo,o as kt,t as Mn,G as Dt,ae as wi,M as Ni}from"./index-CAwO2oe3.js";import{u as Ci}from"./use-require-renter-auth-DBzRuA2o.js";import{a as Si,s as ji}from"./participant-HogDr-CR.js";import{I as it}from"./input-DKL6KkFm.js";import{L as Ce}from"./label-vyB6DH1G.js";import{C as ki,S as Di}from"./switch-ClqQFxaP.js";import{T as Mt}from"./textarea-COc1vuIg.js";import{u as Mi,a as Oi,C as yo}from"./checkbox-BBYZxlUf.js";import{C as Pi}from"./chevron-right-EGYpkoXo.js";import{C as or}from"./chevron-down-DjSvLBmW.js";import{P as ye,b as sr,d as $e,u as Bn,c as ue,a as vo}from"./index-D9GyPzJV.js";import{u as bo,P as wo,h as No,R as Co,a as So,F as jo,D as ko}from"./index-BUHdEnmI.js";import{u as cn}from"./index-CbW0fzxr.js";import{f as Ai,a as Ti}from"./phone-CXesSnNo.js";import{m as Tr}from"./verification-CdhSrV-j.js";import{u as Ri}from"./useQuery-DRTMoch5.js";import{u as Xt}from"./useServerFn-CuzwNQIs.js";import{g as Ii,b as Ei,s as _i,a as Wi}from"./identity.functions-BF8jElP4.js";import{T as Fi}from"./triangle-alert-Dhb8BHvN.js";import{A as Do}from"./arrow-left-CJYZvY8Q.js";import{A as zn}from"./arrow-right-BB8bmcq3.js";import{C as Jt}from"./check-Ect5xoXq.js";import{S as Mo}from"./StateCombobox-4m8tzJZG.js";import{S as en}from"./shield-check-BFyreMuM.js";import{L as gt}from"./loader-circle-CTgSPyap.js";import{C as tn}from"./circle-check-hqnNAf3h.js";import{C as Yi}from"./clock-DDPpdUwL.js";import{C as Bi}from"./circle-alert-BvoRUMRY.js";import{B as Oo}from"./badge-check-CSJnTuse.js";import{H as zi}from"./house-Bitbx2Rt.js";import{W as $i}from"./wallet-Beh9WL-G.js";import{U as Rr}from"./users-fQt30WAc.js";import{P as Hi}from"./pencil-e7pEdGUx.js";import{s as ut,c as Li,a as On,d as Vi}from"./storage-BRvRH8di.js";import{i as qi,h as Po,d as Ui,f as Lt}from"./cloudSync-BE3jQLne.js";import{c as Gi,b as Ir,m as Zi,C as Ki}from"./consents-gXdWTHBp.js";import{u as Xi,c as Qi}from"./index-B3qQ4HYb.js";import{P as Ji}from"./plus-DsNdn0ck.js";import{P as Er}from"./PublicHeader-CZmnjO2d.js";import"./auth-middleware-CgrRBznh.js";import"./user-BfGbPhtx.js";import"./log-out-pSeKHpui.js";const el=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],tl=Ke("calendar",el);const nl=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Ao=Ke("camera",nl);const rl=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ol=Ke("chevron-left",rl);const sl=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],al=Ke("cloud",sl);const il=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]],To=Ke("id-card",il);const ll=[["circle",{cx:"11",cy:"4",r:"2",key:"vol9p0"}],["circle",{cx:"18",cy:"8",r:"2",key:"17gozi"}],["circle",{cx:"20",cy:"16",r:"2",key:"1v9bxh"}],["path",{d:"M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z",key:"1ydw1z"}]],cl=Ke("paw-print",ll);const dl=[["path",{d:"M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z",key:"1piglc"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M2 8v1a2 2 0 0 0 2 2h1",key:"1env43"}]],ul=Ke("piggy-bank",dl);const fl=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],ml=Ke("scroll-text",fl);const hl=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594
11.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],pl=Ke("sparkles",hl);function gl(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const xl={},At={};function at(e,t){try{const r=(xl[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in At?At[r]:_r(r,r.split(":"))}catch{if(e in At)return At[e];const n=e?.match(yl);return n?_r(e,n.slice(1)):NaN}}const yl=/([+-]\d\d):?(\d\d)?/;function _r(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return At[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Ye extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(at(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Ro(this),$n(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Ye(...n,t):new Ye(Date.now(),t)}withTimeZone(t){return new Ye(+this,t)}getTimezoneOffset(){const t=-at(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),$n(this),+this}[Symbol.for("constructDateFrom")](t){return new Ye(+new Date(t),this.timeZone)}}const Wr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Wr.test(e))return;const t=e.replace(Wr,"$1UTC");Ye.prototype[t]&&(e.startsWith("get")?Ye.prototype[e]=function(){return this.internal[t]()}:(Ye.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),vl(this),+this},Ye.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),$n(this),+this}))});function $n(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-at(e.timeZone,e)*60))}function vl(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Ro(e)}function Ro(e){const t=at(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),l=-new Date(+r).getTimezoneOffset(),i=o-l,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const d=new Date(+e);d.setUTCSeconds(0);const m=o>0?d.getSeconds():(d.getSeconds()-60)%60,u=Math.round(-(at(e.timeZone,e)*60))%60;(u||m)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+m));const h=at(e.timeZone,e),p=h>0?Math.floor(h):Math.ceil(h),g=-new Date(+e).getTimezoneOffset()-p,b=p!==n,C=g-c;if(b&&C){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+C);const w=at(e.timeZone,e),v=w>0?Math.floor(w):Math.ceil(w),N=p-v;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class Ne extends Ye{static tz(t,...n){return n.length?new Ne(...n,t):new Ne(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}
1toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${gl(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Ne(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ne(+new Date(t),this.timeZone)}}const Io=6048e5,bl=864e5,Fr=Symbol.for("constructDateFrom");function pe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Fr in e?e[Fr](t):e instanceof Date?new e.constructor(t):new Date(t)}function se(e,t){return pe(t||e,e)}function Eo(e,t,n){const r=se(e,n?.in);return isNaN(t)?pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function _o(e,t,n){const r=se(e,n?.in);if(isNaN(t))return pe(e,NaN);if(!t)return r;const o=r.getDate(),l=pe(e,r.getTime());l.setMonth(r.getMonth()+t+1,0);const i=l.getDate();return o>=i?l:(r.setFullYear(l.getFullYear(),l.getMonth(),o),r)}let wl={};function Yt(){return wl}function yt(e,t){const n=Yt(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=se(e,t?.in),l=o.getDay(),i=(l<r?7:0)+l-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function _t(e,t){return yt(e,{...t,weekStartsOn:1})}function Wo(e,t){const n=se(e,t?.in),r=n.getFullYear(),o=pe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const l=_t(o),i=pe(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=_t(i);return n.getTime()>=l.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Yr(e){const t=se(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wt(e,...t){const n=pe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Wt(e,t){const n=se(e,t?.in);return n.setHours(0,0,0,0),n}function ar(e,t,n){const[r,o]=wt(n?.in,e,t),l=Wt(r),i=Wt(o),a=+l-Yr(l),c=+i-Yr(i);return Math.round((a-c)/bl)}function Nl(e,t){const n=Wo(e,t),r=pe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),_t(r)}function Cl(e,t,n){return Eo(e,t*7,n)}function Sl(e,t,n){return _o(e,t*12,n)}function jl(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=pe.bind(null,o));const l=se(o,r);(!n||n<l||isNaN(+l))&&(n=l)}),pe(r,n||NaN)}function kl(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=pe.bind(null,o));const l=se(o,r);(!n||n>l||isNaN(+l))&&(n=l)}),pe(r,n||NaN)}function Dl(e,t,n){const[r,o]=wt(n?.in,e,t);return+Wt(r)==+Wt(o)}function Fo(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ml(e){return!(!Fo(e)&&typeof e!="number"||isNaN(+se(e)))}function Yo(e,t,n){const[r,o]=wt(n?.in,e,t),l=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return l*12+i}function Ol(e,t){const n=se(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Bo(e,t){const[n,r]=wt(e,t.start,t.end);return{start:n,end:r}}function Pl(e,t){const{start:n,end:r}=Bo(t?.in,e);let o=+n>+r;const l=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=l;)c.push(pe(n,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function Al(e,t){const n=se(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Tl(e,t){const n=se(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function zo(e,t){const n=se(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Rl(e,t){const{start:n,end:r}=Bo(t?.in,e);let o=+n>+r;const l=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const c=[];for(;+i<=l;)c.push(pe(n,i)),i.setFullYear(i.getFullYear()+a);return o?c.reverse():c}function $o(e,t){const n=Yt(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=se(e,t?.in),l=o.getDay(),i=(l<r?-7:0)+6-(l-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Il(e,t){return $o(e,{...t,weekStartsOn:1}
vendor: 17,631 bytes, line 1
1)}const El={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_l=(e,t,n)=>{let r;const o=El[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Pn(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Wl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bl={date:Pn({formats:Wl,defaultWidth:"full"}),time:Pn({formats:Fl,defaultWidth:"full"}),dateTime:Pn({formats:Yl,defaultWidth:"full"})},zl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$l=(e,t,n,r)=>zl[e];function Ot(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const l=e.argumentCallback?e.argumentCallback(t):t;return o[l]}}const Hl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ll={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Vl={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ql={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ul={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Gl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Zl=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Kl={ordinalNumber:Zl,era:Ot({values:Hl,defaultWidth:"wide"}),quarter:Ot({values:Ll,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ot({values:Vl,defaultWidth:"wide"}),day:Ot({values:ql,defaultWidth:"wide"}),dayPeriod:Ot({values:Ul,defaultWidth:"wide",formattingValues:Gl,defaultFormattingWidth:"wide"})};function Pt(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],l=t.match(o);if(!l)return null;const i=l[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?Ql(a,u=>u.test(i)):Xl(a,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const m=t.slice(i.length);return{value:d,rest:m}}}function Xl(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ql(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Jl(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],l=t.match(e.parsePattern);if(!l)return null;let i=e.valueCallback?e.valueCallback(l[0]):l[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const ec=/^(\d+)(th|st|nd|rd)?/i,tc=/\d+/i,nc={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rc={any:[/^b/i,/^(a|c)/i]},oc={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sc={any:[/1/i,/2/i,/3/i,/4/i]},ac={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ic={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lc={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cc={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dc={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uc={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fc={ordinalNumber:Jl({matchPattern:ec,parsePattern:tc,valueCallback:e=>parseInt(e,10)}),era:Pt({matchPatterns:nc,defaultMatchWidth:"wide",parsePatterns:rc,defaultParseWidth:"any"}),quarter:Pt({matchPatterns:oc,defaultMatchWidth:"wide",parsePatterns:sc,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pt({matchPatterns:ac,defaultMatchWidth:"wide",parsePatterns:ic,defaultParseWidth:"any"}),day:Pt({matchPatterns:lc,defaultMatchWidth:"wide",parsePatterns:cc,defaultParseWidth:"any"}),dayPeriod:Pt({matchPatterns:dc,defaultMatchWidth:"any",parsePatterns:uc,defaultParseWidth:"any"})},ht={code:"en-US",formatDistance:_l,formatLong:Bl,formatRelative:$l,localize:Kl,match:fc,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mc(e,t){const n=se(e,t?.in);return ar(n,zo(n))+1}function ir(e,t){const n=se(e,t?.in),r=+_t(n)-+Nl(n);return Math.round(r/Io)+1}function Ho(e,t){const n=se(e,t?.in),r=n.getFullYear(),o=Yt(),l=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=pe(t?.in||e,0);i.setFullYear(r+1,0,l),i.setHours(0,0,0,0);const a=yt(i,t),c=pe(t?.in||e,0);c.setFullYear(r,0,l),c.setHours(0,0,0,0);const d=yt(c,t);return+n>=+a?r+1:+n>=+d?r:r-1}function hc(e,t){const n=Yt(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Ho(e,t),l=pe(t?.in||e,0);return l.setFullYear(o,0,r),l.setHours(0,0,0,0),yt(l,t)}function lr(e,t){const n=se(e,t?.in),r=+yt(n,t)-+hc(n,t);return Math.round(r/Io)+1}function re(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Qe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return re(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):re(n+1,2)},d(e,t){return re(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return re(e.getHours()%12||12,t.length)},H(e,t){return re(e.getHours(),t.length)},m(e,t){return re(e.getMinutes(),t.length)},s(e,t){return re(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return re(o,t.length)}},ft={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Br={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Qe.y(e,t)},Y:function(e,t,n,r){const o=Ho(e,r),l=o>0?o:1-o;if(t==="YY"){const i=l%100;return re(i,2)}return t==="Yo"?n.ordinalNumber(l,{unit:"year"}):re(l,t.length)},R:function(e,t){const n=Wo(e);return re(n,t.length)},u:function(e,t){const n=e.getFullYear();return re(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return re(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return re(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Qe.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return re(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=lr(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):re(o,t.length)},I:function(e,t,n){const r=ir(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):re(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Qe.d(e,t)},D:function(e,t,n){const r=mc(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):re(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),l=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return re(l,2);case"eo":return n.ordinalNumber(l,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),l=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return re(l,t.length);case"co":return n.ordinalNumber(l,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return re(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=ft.noon:r===0?o=ft.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=ft.evening:r>=12?o=ft.afternoon:r>=4?o=ft.morning:o=ft.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Qe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Qe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):re(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):re(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Qe.s(e,t)},S:function(e,t){return Qe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $r(r);case"XXXX":case"XX":return st(r);default:return st(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $r(r);case"xxxx":case"xx":return st(r);default:return st(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+zr(r,":");default:return"GMT"+st(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+zr(r,":");default:return"GMT"+st(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return re(r,t.length)},T:function(e,t,n){return re(+e,t.length)}};function zr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),l=r%60;return l===0?n+String(o):n+String(o)+t+re(l,2)}function $r(e,t){return e%60===0?(e>0?"-":"+")+re(Math.abs(e)/60,2):st(e,t)}function st(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=re(Math.trunc(r/60),2),l=re(r%60,2);return n+o+t+l}const Hr=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Lo=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},pc=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Hr(e,t);let l;switch(r){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",Hr(r,t)).replace("{{time}}",Lo(o,t))},gc={p:Lo,P:pc},xc=/^D+$/,yc=/^Y+$/,vc=["D","DD","YY","YYYY"];function bc(e){return xc.test(e)}function wc(e){return yc.test(e)}function Nc(e,t,n){const r=Cc(e,t,n);if(console.warn(r),vc.includes(e))throw new RangeError(r)}function Cc(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Sc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kc=/^'([^]*?)'?$/,Dc=/''/g,Mc=/[a-zA-Z]/;function Tt(e,t,n){const r=Yt(),o=n?.locale??r.locale??ht,l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=se(e,n?.in);if(!Ml(a))throw new RangeError("Invalid time value");let c=t.match(jc).map(m=>{const u=m[0];if(u==="p"||u==="P"){const h=gc[u];return h(m,o.formatLong)}return m}).join("").match(Sc).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const u=m[0];if(u==="'")return{isToken:!1,value:Oc(m)};if(Br[u])return{isToken:!0,value:m};
1if(u.match(Mc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const d={firstWeekContainsDate:l,weekStartsOn:i,locale:o};return c.map(m=>{if(!m.isToken)return m.value;const u=m.value;(!n?.useAdditionalWeekYearTokens&&wc(u)||!n?.useAdditionalDayOfYearTokens&&bc(u))&&Nc(u,t,String(e));const h=Br[u[0]];return h(a,u,o.localize,d)}).join("")}function Oc(e){const t=e.match(kc);return t?t[1].replace(Dc,"'"):e}function Pc(e,t){const n=se(e,t?.in),r=n.getFullYear(),o=n.getMonth(),l=pe(n,0);return l.setFullYear(r,o+1,0),l.setHours(0,0,0,0),l.getDate()}function Ac(e,t){return se(e,t?.in).getMonth()}function Tc(e,t){return se(e,t?.in).getFullYear()}function Rc(e,t){return+se(e)>+se(t)}function Ic(e,t){return+se(e)<+se(t)}function Ec(e,t,n){const[r,o]=wt(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function _c(e,t,n){const[r,o]=wt(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Wc(e,t,n){const r=se(e,n?.in),o=r.getFullYear(),l=r.getDate(),i=pe(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=Pc(i);return r.setMonth(t,Math.min(l,a)),r}function Fc(e,t,n){const r=se(e,n?.in);return isNaN(+r)?pe(e,NaN):(r.setFullYear(t),r)}const Lr=5,Yc=4;function Bc(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),l=t.addDays(o,Lr*7-1);return t.getMonth(e)===t.getMonth(l)?Lr:Yc}function Vo(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function zc(e,t){const n=Vo(e,t),r=Bc(e,t);return t.addDays(n,r*7-1)}const qo={...ht,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>Tt(i,a,{locale:ht,...n});let l=o(e,"PPPP");return t.today&&(l=`Today, ${l}`),t.selected&&(l=`${l}, selected`),l},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,l)=>Tt(o,l,{locale:ht,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>Tt(i,a,{locale:ht,...n});let l=o(e,"PPPP");return t?.today&&(l=`Today, ${l}`),l},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,l)=>Tt(o,l,{locale:ht,...t}),r(e,"cccc")}}};class Oe{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Ne.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,l)=>this.overrides?.newDate?this.overrides.newDate(r,o,l):this.options.timeZone?new Ne(r,o,l,this.options.timeZone):new Date(r,o,l),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):Eo(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):_o(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):Cl(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Sl(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ar(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Yo(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Pl(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Rl(r),l=new Set(o.map(a=>this.getYear(a)));if(l.size===o.length)return o;const i=[];return l.forEach(a=>{i.push(new Date(a,0,1))}),i},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):zc(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):Il(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):Ol(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):$o(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):Tl(r),this.format=(r,o,l)=>{const i=this.overrides?.format?this.overrides.format(r,o,this.options):Tt(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):ir(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Ac(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):Tc(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):lr(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Rc(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):Ic(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):Fo(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):Dl(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):Ec(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):_c(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):jl(r),this.min=r=>this.overrides?.min?this.overrides.min(r):kl(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Wc(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):Fc(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Vo(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Wt(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):_t(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Al(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):yt(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):zo(r),this.options={locale:qo,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;
1o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Oe.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,l=n?.code;if(l&&Oe.yearFirstLocales.has(l))try{return new Intl.DateTimeFormat(l,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}Oe.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const He=new Oe;class Uo{constructor(t,n,r=He){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class $c{constructor(t,n){this.date=t,this.weeks=n}}class Hc{constructor(t,n){this.days=n,this.weekNumber=t}}function Lc(e){return A.createElement("button",{...e})}function Vc(e){return A.createElement("span",{...e})}function qc(e){const{size:t=24,orientation:n="left",className:r}=e;return A.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&A.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&A.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&A.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&A.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Uc(e){const{day:t,modifiers:n,...r}=e;return A.createElement("td",{...r})}function Gc(e){const{day:t,modifiers:n,...r}=e,o=A.useRef(null);return A.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),A.createElement("button",{ref:o,...r})}var F;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(F||(F={}));var ce;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ce||(ce={}));var Ie;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Ie||(Ie={}));var ke;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ke||(ke={}));function Zc(e){const{options:t,className:n,components:r,classNames:o,...l}=e,i=[o[F.Dropdown],n].join(" "),a=t?.find(({value:c})=>c===l.value);return A.createElement("span",{"data-disabled":l.disabled,className:o[F.DropdownRoot]},A.createElement(r.Select,{className:i,...l},t?.map(({value:c,label:d,disabled:m})=>A.createElement(r.Option,{key:c,value:c,disabled:m},d))),A.createElement("span",{className:o[F.CaptionLabel],"aria-hidden":!0},a?.label,A.createElement(r.Chevron,{orientation:"down",size:18,className:o[F.Chevron]})))}function Kc(e){return A.createElement("div",{...e})}function Xc(e){return A.createElement("div",{...e})}function Qc(e){const{calendarMonth:t,displayIndex:n,...r}=e;return A.createElement("div",{...r},e.children)}
vendor: 3,222 bytes, line 1
1function Jc(e){const{calendarMonth:t,displayIndex:n,...r}=e;return A.createElement("div",{...r})}function ed(e){return A.createElement("table",{...e})}function td(e){return A.createElement("div",{...e})}const Go=f.createContext(void 0);function Bt(){const e=f.useContext(Go);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function nd(e){const{components:t}=Bt();return A.createElement(t.Dropdown,{...e})}function rd(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...l}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:d}}=Bt(),m=f.useCallback(h=>{o&&n?.(h)},[o,n]),u=f.useCallback(h=>{r&&t?.(h)},[r,t]);return A.createElement("nav",{...l},A.createElement(i.PreviousMonthButton,{type:"button",className:a[F.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:u},A.createElement(i.Chevron,{disabled:r?void 0:!0,className:a[F.Chevron],orientation:"left"})),A.createElement(i.NextMonthButton,{type:"button",className:a[F.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:m},A.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[F.Chevron]})))}function od(e){const{components:t}=Bt();return A.createElement(t.Button,{...e})}function sd(e){return A.createElement("option",{...e})}function ad(e){const{components:t}=Bt();return A.createElement(t.Button,{...e})}function id(e){const{rootRef:t,...n}=e;return A.createElement("div",{...n,ref:t})}function ld(e){return A.createElement("select",{...e})}function cd(e){const{week:t,...n}=e;return A.createElement("tr",{...n})}function dd(e){return A.createElement("th",{...e})}function ud(e){return A.createElement("thead",{"aria-hidden":!0},A.createElement("tr",{...e}))}function fd(e){const{week:t,...n}=e;return A.createElement("th",{...n})}function md(e){return A.createElement("th",{...e})}function hd(e){return A.createElement("tbody",{...e})}function pd(e){const{components:t}=Bt();return A.createElement(t.Dropdown,{...e})}const gd=Object.freeze(Object.defineProperty({__proto__:null,Button:Lc,CaptionLabel:Vc,Chevron:qc,Day:Uc,DayButton:Gc,Dropdown:Zc,DropdownNav:Kc,Footer:Xc,Month:Qc,MonthCaption:Jc,MonthGrid:ed,Months:td,MonthsDropdown:nd,Nav:rd,NextMonthButton:od,Option:sd,PreviousMonthButton:ad,Root:id,Select:ld,Week:cd,WeekNumber:fd,WeekNumberHeader:md,Weekday:dd,Weekdays:ud,Weeks:hd,YearsDropdown:pd},Symbol.toStringTag,{value:"Module"}));function qe(e,t,n=!1,r=He){let{from:o,to:l}=e;const{differenceInCalendarDays:i,isSameDay:a}=r;return o&&l?(i(l,o)<0&&([o,l]=[l,o]),i(t,o)>=(n?1:0)&&i(l,t)>=(n?1:0)):!n&&l?a(l,t):!n&&o?a(o,t):!1}function cr(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function dn(e){return!!(e&&typeof e=="object"&&"from"in e)}function dr(e){return!!(e&&typeof e=="object"&&"after"in e)}function ur(e){return!!(e&&typeof e=="object"&&"before"in e)}function Zo(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ko(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ue(e,t,n=He){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:l,isAfter:i}=n;return r.some(a=>{if(typeof a=="boolean")return a;
vendor: 14,548 bytes, line 1
1if(n.isDate(a))return o(e,a);if(Ko(a,n))return a.some(c=>o(e,c));if(dn(a))return qe(a,e,!1,n);if(Zo(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(cr(a)){const c=l(a.before,e),d=l(a.after,e),m=c>0,u=d<0;return i(a.before,a.after)?u&&m:m||u}return dr(a)?l(e,a.after)>0:ur(a)?l(a.before,e)>0:typeof a=="function"?a(e):!1})}function xd(e,t,n,r,o){const{disabled:l,hidden:i,modifiers:a,showOutsideDays:c,broadcastCalendar:d,today:m=o.today()}=t,{isSameDay:u,isSameMonth:h,startOfMonth:p,isBefore:y,endOfMonth:g,isAfter:b}=o,C=n&&p(n),w=r&&g(r),v={[ce.focused]:[],[ce.outside]:[],[ce.disabled]:[],[ce.hidden]:[],[ce.today]:[]},N={};for(const j of e){const{date:S,displayMonth:D}=j,I=!!(D&&!h(S,D)),E=!!(C&&y(S,C)),_=!!(w&&b(S,w)),M=!!(l&&Ue(S,l,o)),V=!!(i&&Ue(S,i,o))||E||_||!d&&!c&&I||d&&c===!1&&I,H=u(S,m);I&&v.outside.push(j),M&&v.disabled.push(j),V&&v.hidden.push(j),H&&v.today.push(j),a&&Object.keys(a).forEach(z=>{const X=a?.[z];X&&Ue(S,X,o)&&(N[z]?N[z].push(j):N[z]=[j])})}return j=>{const S={[ce.focused]:!1,[ce.disabled]:!1,[ce.hidden]:!1,[ce.outside]:!1,[ce.today]:!1},D={};for(const I in v){const E=v[I];S[I]=E.some(_=>_===j)}for(const I in N)D[I]=N[I].some(E=>E===j);return{...S,...D}}}function yd(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[l])=>(n[l]?o.push(n[l]):t[ce[l]]?o.push(t[ce[l]]):t[Ie[l]]&&o.push(t[Ie[l]]),o),[t[F.Day]])}function vd(e){return{...gd,...e}}function bd(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function fr(){const e={};for(const t in F)e[F[t]]=`rdp-${F[t]}`;for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in Ie)e[Ie[t]]=`rdp-${Ie[t]}`;for(const t in ke)e[ke[t]]=`rdp-${ke[t]}`;return e}function Xo(e,t,n){return(n??new Oe(t)).formatMonthYear(e)}const wd=Xo;function Nd(e,t,n){return(n??new Oe(t)).format(e,"d")}function Cd(e,t=He){return t.format(e,"LLLL")}function Sd(e,t,n){return(n??new Oe(t)).format(e,"cccccc")}function jd(e,t=He){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function kd(){return""}function Qo(e,t=He){return t.format(e,"yyyy")}const Dd=Qo,Md=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Xo,formatDay:Nd,formatMonthCaption:wd,formatMonthDropdown:Cd,formatWeekNumber:jd,formatWeekNumberHeader:kd,formatWeekdayName:Sd,formatYearCaption:Dd,formatYearDropdown:Qo},Symbol.toStringTag,{value:"Module"}));function Od(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Md,...e}}function mr(e,t,n,r){let o=(r??new Oe(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Pd=mr;function hr(e,t,n){return(n??new Oe(t)).formatMonthYear(e)}const Ad=hr;function Jo(e,t,n,r){let o=(r??new Oe(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function es(e){return"Choose the Month"}function ts(){return""}const Td="Go to the Next Month";function ns(e,t){return Td}function rs(e){return"Go to the Previous Month"}function os(e,t,n){return(n??new Oe(t)).format(e,"cccc")}function ss(e,t){return`Week ${e}`}function as(e){return"Week Number"}function is(e){return"Choose the Year"}const Rd=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Ad,labelDay:Pd,labelDayButton:mr,labelGrid:hr,labelGridcell:Jo,labelMonthDropdown:es,labelNav:ts,labelNext:ns,labelPrevious:rs,labelWeekNumber:ss,labelWeekNumberHeader:as,labelWeekday:os,labelYearDropdown:is},Symbol.toStringTag,{value:"Module"})),Te=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function Id(e,t){const n=t.locale?.labels??{};return{...Rd,...e??{},labelDayButton:Te(mr,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Te(es,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Te(ns,e?.labelNext,n.labelNext),labelPrevious:Te(rs,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Te(ss,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Te(is,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Te(hr,e?.labelGrid,n.labelGrid),labelGridcell:Te(Jo,e?.labelGridcell,n.labelGridcell),labelNav:Te(ts,e?.labelNav,n.labelNav),labelWeekNumberHeader:Te(as,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Te(os,e?.labelWeekday,n.labelWeekday)}}function Ed(e,t,n,r,o){const{startOfMonth:l,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:d}=o;return c({start:i(e),end:a(e)}).map(h=>{const p=r.formatMonthDropdown(h,o),y=d(h),g=t&&h<l(t)||n&&h>l(n)||!1;return{value:y,label:p,disabled:g}})}function _d(e,t={},n={}){let r={...t?.[F.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function Wd(e,t,n,r){const o=r??e.today(),l=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let a=0;a<7;a++){const c=e.addDays(l,a);i.push(c)}return i}function Fd(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:l,endOfYear:i,eachYearOfInterval:a,getYear:c}=r,d=l(e),m=i(t),u=a({start:d,end:m});return o&&u.reverse(),u.map(h=>{const p=n.formatYearDropdown(h,r);return{value:c(h),label:p,disabled:!1}})}function Yd(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,l=a=>{const c=typeof a=="number"||typeof a=="string"?new Date(a):a;return new Ne(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},i=a=>{const c=l(a);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>l(Ne.tz(e)),newDate:(a,c,d)=>new Ne(a,c,d,12,0,0,e),startOfDay:a=>l(a),startOfWeek:(a,c)=>{const d=l(a),m=c?.weekStartsOn??o,u=(d.getDay()-m+7)%7;return d.setDate(d.getDate()-u),d},startOfISOWeek:a=>{const c=l(a),d=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-d),c},startOfMonth:a=>{const c=l(a);return c.setDate(1),c},startOfYear:a=>{const c=l(a);return c.setMonth(0,1),c},endOfWeek:(a,c)=>{const d=l(a),h=(((c?.weekStartsOn??o)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+h),d},endOfISOWeek:a=>{const c=l(a),d=(7-c.getDay())%7;return c.setDate(c.getDate()+d),c},endOfMonth:a=>{const c=l(a);return c.setMonth(c.getMonth()+1,0),c},endOfYear:a=>{const c=l(a);return c.setMonth(11,31),c},eachMonthOfInterval:a=>{const c=l(a.start),d=l(a.end),m=[],u=new Ne(c.getFullYear(),c.getMonth(),1,12,0,0,e),h=d.getFullYear()*12+d.getMonth();for(;u.getFullYear()*12+u.getMonth()<=h;)m.push(new Ne(u,e)),u.setMonth(u.getMonth()+1,1);return m},addDays:(a,c)=>{const d=l(a);return d.setDate(d.getDate()+c),d},addWeeks:(a,c)=>{const d=l(a);return d.setDate(d.getDate()+c*7),d},addMonths:(a,c)=>{const d=l(a);return d.setMonth(d.getMonth()+c),d},addYears:(a,c)=>{const d=l(a);return d.setFullYear(d.getFullYear()+c),d},eachYearOfInterval:a=>{const c=l(a.start),d=l(a.end),m=[],u=new Ne(c.getFullYear(),0,1,12,0,0,e);for(;u.getFullYear()<=d.getFullYear();)m.push(new Ne(u,e)),u.setFullYear(u.getFullYear()+1,0,1);return m},getWeek:(a,c)=>{const d=i(a);return lr(d,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:a=>{const c=i(a);return ir(c)},differenceInCalendarDays:(a,c)=>{const d=i(a),m=i(c);return ar(d,m)},differenceInCalendarMonths:(a,c)=>{const d=i(a),m=i(c);return Yo(d,m)}}}const zt=e=>e instanceof HTMLElement?e:null,An=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Bd=e=>zt(e.querySelector("[data-animated-month]")),Tn=e=>zt(e.querySelector("[data-animated-caption]")),Rn=e=>zt(e.querySelector("[data-animated-weeks]")),zd=e=>zt(e.querySelector("[data-animated-nav]")),$d=e=>zt(e.querySelector("[data-animated-weekdays]"));function Hd(e,t,{classNames:n,months:r,focused:o,dateLib:l}){const i=f.useRef(null),a=f.useRef(r),c=f.useRef(!1);f.useLayoutEffect(()=>{const d=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const m=l.isSameMonth(r[0].date,d[0].date),u=l.isAfter(r[0].date,d[0].date),h=u?n[ke.caption_after_enter]:n[ke.caption_before_enter],p=u?n[ke.weeks_after_enter]:n[ke.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(An(g).forEach(v=>{if(!(v instanceof HTMLElement))return;const N=Bd(v);N&&v.contains(N)&&v.removeChild(N);const j=Tn(v);j&&j.classList.remove(h);const S=Rn(v);S&&S.classList.remove(p)}),i.current=g):i.current=null,c.current||m||o)return;const b=y instanceof HTMLElement?An(y):[],C=An(e.current);if(C?.every(w=>w instanceof HTMLElement)&&b&&b.every(w=>w instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const w=zd(e.current);w&&(w.style.zIndex="1"),C.forEach((v,N)=>{const j=b[N];if(!j)return;v.style.position="relative",v.style.overflow="hidden";const S=Tn(v);S&&S.classList.add(h);const D=Rn(v);D&&D.classList.add(p);const I=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),S&&S.classList.remove(h),D&&D.classList.remove(p),v.style.position="",v.style.overflow="",v.contains(j)&&v.removeChild(j)};j.style.pointerEvents="none",j.style.position="absolute",j.style.overflow="hidden",j.setAttribute("aria-hidden","true");const E=$d(j);E&&(E.style.opacity="0");const _=Tn(j);_&&(_.classList.add(u?n[ke.caption_before_exit]:n[ke.caption_after_exit]),_.addEventListener("animationend",I));const M=Rn(j);M&&M.classList.add(u?n[ke.weeks_before_exit]:n[ke.weeks_after_exit]),v.insertBefore(j,v.firstChild)})}})}function Ld(e,t,n,r){const o=e[0],l=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=n??{},{addDays:d,differenceInCalendarDays:m,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:p,endOfMonth:y,endOfWeek:g,isAfter:b,startOfBroadcastWeek:C,startOfISOWeek:w,startOfWeek:v}=r,N=c?C(o,r):i?w(o):v(o),j=c?h(l):i?p(y(l)):g(y(l)),S=t&&(c?h(t):i?p(t):g(t)),D=S&&b(j,S)?S:j,I=m(D,N),E=u(l,o)+1,_=[];for(let H=0;H<=I;H++){const z=d(N,H);_.push(z)}const V=(c?35:42)*E;if(a&&_.length<V){const H=V-_.length;for(let z=0;z<H;z++){const X=d(_[_.length-1],1);_.push(X)}}return _}function Vd(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((l,i)=>l.concat(i.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function qd(e,t,n,r){const{numberOfMonths:o=1}=n,l=[];for(let i=0;i<o;i++){const a=r.addMonths(e,i);if(t&&a>t)break;l.push(a)}return l}function Vr(e,t,n,r){const{month:o,defaultMonth:l,today:i=r.today(),numberOfMonths:a=1}=e;let c=o||l||i;const{differenceInCalendarMonths:d,addMonths:m,startOfMonth:u}=r;if(n&&d(n,c)<a-1){const h=-1*(a-1);c=m(n,h)}return t&&d(c,t)<0&&(c=t),u(c)}function Ud(e,t,n,r){const{addDays:o,endOfBroadcastWeek:l,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:d,getWeek:m,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:p}=r,y=e.reduce((g,b)=>{const C=n.broadcastCalendar?u(b,r):n.ISOWeek?h(b):p(b),w=n.broadcastCalendar?l(b):n.ISOWeek?i(a(b)):c(a(b)),v=t.filter(D=>D>=C&&D<=w),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<N){const D=t.filter(I=>{const E=N-v.length;return I>w&&I<=o(w,E)});v.push(...D)}const j=v.reduce((D,I)=>{const E=n.ISOWeek?d(I):m(I),_=D.find(V=>V.weekNumber===E),M=new Uo(I,b,r);return _?_.days.push(M):D.push(new Hc(E,[M])),D},[]),S=new $c(b,j);return g.push(S),g},[]);return n.reverseMonths?y.reverse():y}function Gd(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:l,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:d,newDate:m,today:u}=t,{fromYear:h,toYear:p,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&h&&(n=t.newDate(h,0,1)),!r&&g&&(r=g),!r&&p&&(r=m(p,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):h?n=m(h,0,1):!n&&b&&(n=o(c(e.today??u(),-100))),r?r=a(r):p?r=m(p,11,31):!r&&b&&(r=d(e.today??u())),[n&&l(n),r&&l(r)]}function Zd(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:l=1}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,d=o?l:1,m=i(e);if(!t)return a(m,d);if(!(c(t,e)<l))return a(m,d)}function Kd(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:l}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,d=o?l??1:1,m=i(e);if(!t)return a(m,-d);if(!(c(m,t)<=0))return a(m,-d)}function Xd(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function un(e,t){const[n,r]=f.useState(e);return[t===void 0?n:t,r]}function Qd(e,t){const[n,r]=Gd(e,t),{startOfMonth:o,endOfMonth:l}=t,i=Vr(e,n,r,t),[a,c]=un(i,e.month?i:void 0);f.useEffect(()=>{const N=Vr(e,n,r,t);c(N)},[e.timeZone]);const{months:d,weeks:m,days:u,previousMonth:h,nextMonth:p}=f.useMemo(()=>{const N=qd(a,r,{numberOfMonths:e.numberOfMonths},t),j=Ld(N,e.endMonth?l(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=Ud(N,j,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),D=Xd(S),I=Vd(S),E=Kd(a,n,e,t),_=Zd(a,r,e,t);return{months:S,weeks:D,days:I,previousMonth:E,nextMonth:_}},[t,a.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:y,onMonthChange:g}=e,b=N=>m.some(j=>j.days.some(S=>S.isEqualTo(N))),C=N=>{if(y)return;let j=o(N);n&&j<o(n)&&(j=o(n)),r&&j>o(r)&&(j=o(r)),c(j),g?.(j)};return{months:d,weeks:m,days:u,navStart:n,navEnd:r,previousMonth:h,nextMonth:p,goToMonth:C,goToDay:N=>{b(N)||C(N.date)}}}var Fe;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Fe||(Fe={}));function qr(e){return!e[ce.disabled]&&!e[ce.hidden]&&!e[ce.outside]}function Jd(e,t,n,r){let o,l=-1;for(const i of e){const a=t(i);qr(a)&&(a[ce.focused]&&l<Fe.FocusedModifier?(o=i,l=Fe.FocusedModifier):r?.isEqualTo(i)&&l<Fe.LastFocused?(o=i,l=Fe.LastFocused):n(i.date)&&l<Fe.Selected?(o=i,l=Fe.Selected):a[ce.today]&&l<Fe.Today&&(o=i,l=Fe.Today))}return o||(o=e.find(i=>qr(t(i)))),o}function eu(e,t,n,r,o,l,i){const{ISOWeek:a,broadcastCalendar:c}=l,{addDays:d,addMonths:m,addWeeks:u,addYears:h,endOfBroadcastWeek:p,endOfISOWeek:y,endOfWeek:g,max:b,min:C,startOfBroadcastWeek:w,startOfISOWeek:v,startOfWeek:N}=i;let S={day:d,week:u,month:m,year:h,startOfWeek:D=>c?w(D,i):a?v(D):N(D),endOfWeek:D=>
1c?p(D):a?y(D):g(D)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=b([r,S]):t==="after"&&o&&(S=C([o,S])),S}function ls(e,t,n,r,o,l,i,a=0){if(a>365)return;const c=eu(e,t,n.date,r,o,l,i),d=!!(l.disabled&&Ue(c,l.disabled,i)),m=!!(l.hidden&&Ue(c,l.hidden,i)),u=c,h=new Uo(c,u,i);return!d&&!m?h:ls(e,t,h,r,o,l,i,a+1)}function tu(e,t,n,r,o){const{autoFocus:l}=e,[i,a]=f.useState(),c=Jd(t.days,n,r||(()=>!1),i),[d,m]=f.useState(l?c:void 0);return{isFocusTarget:g=>!!c?.isEqualTo(g),setFocused:m,focused:d,blur:()=>{a(d),m(void 0)},moveFocus:(g,b)=>{if(!d)return;const C=ls(g,b,d,t.navStart,t.navEnd,e,o);C&&(e.disableNavigation&&!t.days.some(v=>v.isEqualTo(C))||(t.goToDay(C),m(C)))}}}function nu(e,t){const{selected:n,required:r,onSelect:o}=e,[l,i]=un(n,o?n:void 0),a=o?n:l,{isSameDay:c}=t,d=p=>a?.some(y=>c(y,p))??!1,{min:m,max:u}=e;return{selected:a,select:(p,y,g)=>{let b=[...a??[]];if(d(p)){if(a?.length===m||r&&a?.length===1)return;b=a?.filter(C=>!c(C,p))}else a?.length===u?b=[p]:b=[...b,p];return o||i(b),o?.(b,p,y,g),b},isSelected:d}}function ru(e,t,n=0,r=0,o=!1,l=He){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:d,isBefore:m}=l;let u;if(!i&&!a)u={from:e,to:n>0?void 0:e};else if(i&&!a)c(i,e)?n===0?u={from:i,to:e}:o?u={from:i,to:void 0}:u=void 0:m(e,i)?u={from:e,to:i}:u={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?u={from:i,to:a}:u=void 0;else if(c(i,e))u={from:i,to:n>0?void 0:e};else if(c(a,e))u={from:e,to:n>0?void 0:e};else if(m(e,i))u={from:e,to:a};else if(d(e,i))u={from:i,to:e};else if(d(e,a))u={from:i,to:e};else throw new Error("Invalid range");if(u?.from&&u?.to){const h=l.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function ou(e,t,n=He){const r=Array.isArray(t)?t:[t];let o=e.from;const l=n.differenceInCalendarDays(e.to,e.from),i=Math.min(l,6);for(let a=0;a<=i;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Ur(e,t,n=He){return qe(e,t.from,!1,n)||qe(e,t.to,!1,n)||qe(t,e.from,!1,n)||qe(t,e.to,!1,n)}function su(e,t,n=He){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?qe(e,a,!1,n):Ko(a,n)?a.some(c=>qe(e,c,!1,n)):dn(a)?a.from&&a.to?Ur(e,{from:a.from,to:a.to},n):!1:Zo(a)?ou(e,a.dayOfWeek,n):cr(a)?n.isAfter(a.before,a.after)?Ur(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):Ue(e.from,a,n)||Ue(e.to,a,n):dr(a)||ur(a)?Ue(e.from,a,n)||Ue(e.to,a,n):!1))return!0;const i=r.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=c;d++){if(i.some(m=>m(a)))return!0;a=n.addDays(a,1)}}return!1}function au(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:l,required:i,onSelect:a}=e,[c,d]=un(l,a?l:void 0),m=a?l:c;return{selected:m,select:(p,y,g)=>{const{min:b,max:C}=e;let w;if(p){const v=m?.from,N=m?.to,j=!!v&&!!N,S=!!v&&!!N&&t.isSameDay(v,N)&&t.isSameDay(p,v);o&&(j||!m?.from)?!i&&S?w=void 0:w={from:p,to:void 0}:w=ru(p,m,b,C,i,t)}return r&&n&&w?.from&&w.to&&su({from:w.from,to:w.to},n,t)&&(w.from=p,w.to=void 0),a||d(w),a?.(w,p,y,g),w},isSelected:p=>m&&qe(m,p,!1,t)}}function iu(e,t){const{selected:n,required:r,onSelect:o}=e,[l,i]=un(n,o?n:void 0),a=o?n:l,{isSameDay:c}=t;return{selected:a,select:(u,h,p)=>{let y=u;return!r&&a&&a&&c(u,a)&&(y=void 0),o||i(y),o?.(y,u,h,p),y},isSelected:u=>a?c(a,u):!1}}function lu(e,t){const n=iu(e,t),r=nu(e,t),o=au(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Pe(e,t){return e instanceof Ne&&e.timeZone===t?e:new Ne(e,t)}function mt(e,t,n){return Pe(e,t)}function Gr(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?mt(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?mt(r,t):r):dn(e)?{...e,from:e.from?Pe(e.from,t):e.from,to:e.to?Pe(e.to,t):e.to}:cr(e)?{before:mt(e.before,t),after:mt(e.after,t)}:dr(e)?{after:mt(e.after,t)}:ur(e)?{before:mt(e.before,t)}:e}function In(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Gr(r,t)):Gr(e,t))}function cu(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Pe(t.today,n)),t.month&&(t.month=Pe(t.month,n)),t.defaultMonth&&(t.defaultMonth=Pe(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Pe(t.startMonth,n)),t.endMonth&&(t.endMonth=Pe(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Pe(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(G=>Pe(G,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Pe(t.selected.from,n):t.selected.from,to:t.selected.to?Pe(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=In(t.disabled,n)),t.hidden!==void 0&&(t.hidden=In(t.hidden,n)),t.modifiers)){const G={};
1Object.keys(t.modifiers).forEach(te=>{G[te]=In(t.modifiers?.[te],n)}),t.modifiers=G}const{components:r,formatters:o,labels:l,dateLib:i,locale:a,classNames:c}=f.useMemo(()=>{const G={...qo,...t.locale},te=t.broadcastCalendar?1:t.weekStartsOn,L=t.noonSafe&&t.timeZone?Yd(t.timeZone,{weekStartsOn:te,locale:G}):void 0,ee=t.dateLib&&L?{...L,...t.dateLib}:t.dateLib??L,je=new Oe({locale:G,weekStartsOn:te,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ee);return{dateLib:je,components:vd(t.components),formatters:Od(t.formatters),labels:Id(t.labels,je.options),locale:G,classNames:{...fr(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:d,mode:m,navLayout:u,numberOfMonths:h=1,onDayBlur:p,onDayClick:y,onDayFocus:g,onDayKeyDown:b,onDayMouseEnter:C,onDayMouseLeave:w,onNextClick:v,onPrevClick:N,showWeekNumber:j,styles:S}=t,{formatCaption:D,formatDay:I,formatMonthDropdown:E,formatWeekNumber:_,formatWeekNumberHeader:M,formatWeekdayName:V,formatYearDropdown:H}=o,z=Qd(t,i),{days:X,months:B,navStart:W,navEnd:P,previousMonth:U,nextMonth:$,goToMonth:de}=z,ve=xd(X,t,W,P,i),{isSelected:be,select:fe,selected:ge}=lu(t,i)??{},{blur:me,focused:R,isFocusTarget:K,moveFocus:ie,setFocused:x}=tu(t,z,ve,be??(()=>!1),i),{labelDayButton:O,labelGridcell:T,labelGrid:k,labelMonthDropdown:q,labelNav:Ae,labelPrevious:ae,labelNext:J,labelWeekday:xe,labelWeekNumber:le,labelWeekNumberHeader:wn,labelYearDropdown:za}=l,$a=f.useMemo(()=>Wd(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),Mr=m!==void 0||y!==void 0,Nn=f.useCallback(()=>{U&&(de(U),N?.(U))},[U,de,N]),Cn=f.useCallback(()=>{$&&(de($),v?.($))},[de,$,v]),Ha=f.useCallback((G,te)=>L=>{L.preventDefault(),L.stopPropagation(),x(G),!te.disabled&&(fe?.(G.date,te,L),y?.(G.date,te,L))},[fe,y,x]),La=f.useCallback((G,te)=>L=>{x(G),g?.(G.date,te,L)},[g,x]),Va=f.useCallback((G,te)=>L=>{me(),p?.(G.date,te,L)},[me,p]),qa=f.useCallback((G,te)=>L=>{const ee={ArrowLeft:[L.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[L.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[L.shiftKey?"year":"week","after"],ArrowUp:[L.shiftKey?"year":"week","before"],PageUp:[L.shiftKey?"year":"month","before"],PageDown:[L.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ee[L.key]){L.preventDefault(),L.stopPropagation();const[je,Q]=ee[L.key];ie(je,Q)}b?.(G.date,te,L)},[ie,b,t.dir]),Ua=f.useCallback((G,te)=>L=>{C?.(G.date,te,L)},[C]),Ga=f.useCallback((G,te)=>L=>{w?.(G.date,te,L)},[w]),Za=f.useCallback(G=>te=>{const L=Number(te.target.value),ee=i.setMonth(i.startOfMonth(G),L);de(ee)},[i,de]),Ka=f.useCallback(G=>te=>{const L=Number(te.target.value),ee=i.setYear(i.startOfMonth(G),L);de(ee)},[i,de]),{className:Xa,style:Qa}=f.useMemo(()=>({className:[c[F.Root],t.className].filter(Boolean).join(" "),style:{...S?.[F.Root],...t.style}}),[c,t.className,t.style,S]),Ja=bd(t),Or=f.useRef(null);Hd(Or,!!t.animate,{classNames:c,months:B,focused:R,dateLib:i});const ei={dayPickerProps:t,selected:ge,select:fe,isSelected:be,months:B,nextMonth:$,previousMonth:U,goToMonth:de,getModifiers:ve,components:r,classNames:c,styles:S,labels:l,formatters:o};return A.createElement(Go.Provider,{value:ei},A.createElement(r.Root,{rootRef:t.animate?Or:void 0,className:Xa,style:Qa,dir:t.dir,id:t.id,lang:t.lang??a.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Ja},A.createElement(r.Months,{className:c[F.Months],style:S?.[F.Months]},!t.hideNavigation&&!u&&A.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[F.Nav],style:S?.[F.Nav],"aria-label":Ae(),onPreviousClick:Nn,onNextClick:Cn,previousMonth:U,nextMonth:$}),B.map((G,te)=>A.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[F.Month],style:S?.[F.Month],key:te,displayIndex:te,calendarMonth:G},u==="around"&&!t.hideNavigation&&te===0&&A.createElement(r.PreviousMonthButton,{type:"button",className:c[F.PreviousMonthButton],tabIndex:U?void 0:-1,"aria-disabled":U?void 0:!0,"aria-label":ae(U),onClick:Nn,"data-animated-button":t.animate?"true":void 0},A.createElement(r.Chevron,{disabled:U?void 0:!0,className:c[F.Chevron],orientation:t.dir==="rtl"?"right":"left"})),A.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[F.MonthCaption],style:S?.[F.MonthCaption],calendarMonth:G,displayIndex:te},d?.startsWith("dropdown")?A.createElement(r.DropdownNav,{className:c[F.Dropdowns],style:S?.[F.Dropdowns]},(()=>{const L=d==="dropdown"||d==="dropdown-months"?A.createElement(r.MonthsDropdown,{key:"month",className:c[F.MonthsDropdown],"aria-label":q(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Za(G.date),options:Ed(G.date,W,P,o,i),style:S?.[F.Dropdown],value:i.getMonth(G.date)}):A.createElement("span",{key:"month"},E(G.date,i)),ee=d==="dropdown"||d==="dropdown-years"?A.createElement(r.YearsDropdown,{key:"year",className:c[F.YearsDropdown],"aria-label":za(i.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Ka(G.date),options:Fd(W,P,o,i,!!t.reverseYears),style:S?.[F.Dropdown],value:i.getYear(G.date)}):A.createElement("span",{key:"year"},H(G.date,i));return i.getMonthYearOrder()==="year-first"?[ee,L]:[L,ee]})(),A.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(G.date,i.options,i))):A.createElement(r.CaptionLabel,{className:c[F.C
vendor: 5,480 bytes, line 1
1aptionLabel],role:"status","aria-live":"polite"},D(G.date,i.options,i))),u==="around"&&!t.hideNavigation&&te===h-1&&A.createElement(r.NextMonthButton,{type:"button",className:c[F.NextMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":J($),onClick:Cn,"data-animated-button":t.animate?"true":void 0},A.createElement(r.Chevron,{disabled:$?void 0:!0,className:c[F.Chevron],orientation:t.dir==="rtl"?"left":"right"})),te===h-1&&u==="after"&&!t.hideNavigation&&A.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[F.Nav],style:S?.[F.Nav],"aria-label":Ae(),onPreviousClick:Nn,onNextClick:Cn,previousMonth:U,nextMonth:$}),A.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":m==="multiple"||m==="range","aria-label":k(G.date,i.options,i)||void 0,className:c[F.MonthGrid],style:S?.[F.MonthGrid]},!t.hideWeekdays&&A.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[F.Weekdays],style:S?.[F.Weekdays]},j&&A.createElement(r.WeekNumberHeader,{"aria-label":wn(i.options),className:c[F.WeekNumberHeader],style:S?.[F.WeekNumberHeader],scope:"col"},M()),$a.map(L=>A.createElement(r.Weekday,{"aria-label":xe(L,i.options,i),className:c[F.Weekday],key:String(L),style:S?.[F.Weekday],scope:"col"},V(L,i.options,i)))),A.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[F.Weeks],style:S?.[F.Weeks]},G.weeks.map(L=>A.createElement(r.Week,{className:c[F.Week],key:L.weekNumber,style:S?.[F.Week],week:L},j&&A.createElement(r.WeekNumber,{week:L,style:S?.[F.WeekNumber],"aria-label":le(L.weekNumber,{locale:a}),className:c[F.WeekNumber],scope:"row",role:"rowheader"},_(L.weekNumber,i)),L.days.map(ee=>{const{date:je}=ee,Q=ve(ee);if(Q[ce.focused]=!Q.hidden&&!!R?.isEqualTo(ee),Q[Ie.selected]=be?.(je)||Q.selected,dn(ge)){const{from:Sn,to:jn}=ge;Q[Ie.range_start]=!!(Sn&&jn&&i.isSameDay(je,Sn)),Q[Ie.range_end]=!!(Sn&&jn&&i.isSameDay(je,jn)),Q[Ie.range_middle]=qe(ge,je,!0,i)}const ti=_d(Q,S,t.modifiersStyles),ni=yd(Q,c,t.modifiersClassNames),ri=!Mr&&!Q.hidden?T(je,Q,i.options,i):void 0;return A.createElement(r.Day,{key:`${ee.isoDate}_${ee.displayMonthId}`,day:ee,modifiers:Q,className:ni.join(" "),style:ti,role:"gridcell","aria-selected":Q.selected||void 0,"aria-label":ri,"data-day":ee.isoDate,"data-month":ee.outside?ee.dateMonthId:void 0,"data-selected":Q.selected||void 0,"data-disabled":Q.disabled||void 0,"data-hidden":Q.hidden||void 0,"data-outside":ee.outside||void 0,"data-focused":Q.focused||void 0,"data-today":Q.today||void 0},!Q.hidden&&Mr?A.createElement(r.DayButton,{className:c[F.DayButton],style:S?.[F.DayButton],type:"button",day:ee,modifiers:Q,disabled:!Q.focused&&Q.disabled||void 0,"aria-disabled":Q.focused&&Q.disabled||void 0,tabIndex:K(ee)?0:-1,"aria-label":O(je,Q,i.options,i),onClick:Ha(ee,Q),onBlur:Va(ee,Q),onFocus:La(ee,Q),onKeyDown:qa(ee,Q),onMouseEnter:Ua(ee,Q),onMouseLeave:Ga(ee,Q)},I(je,i.options,i)):!Q.hidden&&I(ee.date,i.options,i))})))))))),t.footer&&A.createElement(r.Footer,{className:c[F.Footer],style:S?.[F.Footer],role:"status","aria-live":"polite"},t.footer)))}function du({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:l,components:i,...a}){const c=fr();return s.jsx(cu,{showOutsideDays:n,className:Y("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:d=>d.toLocaleString("default",{month:"short"}),...l},classNames:{root:Y("w-fit",c.root),months:Y("relative flex flex-col gap-4 md:flex-row",c.months),month:Y("flex w-full flex-col gap-4",c.month),nav:Y("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:Y(Pr({variant:o}),"h-(--cell-size) w-(--cell-size) select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:Y(Pr({variant:o}),"h-(--cell-size) w-(--cell-size) select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:Y("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",c.month_caption),dropdowns:Y("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:Y("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",c.dropdown_root),dropdown:Y("bg-popover absolute inset-0 opacity-0",c.dropdown),caption_label:Y("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:Y("flex",c.weekdays),weekday:Y("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:Y("mt-2 flex w-full",c.week),week_number_header:Y("w-(--cell-size) select-none",c.week_number_header),week_number:Y("text-muted-foreground select-none text-[0.8rem]",c.week_number),day:Y("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",c.day),range_start:Y("bg-accent rounded-l-md",c.range_start),range_middle:Y("rounded-none",c.range_middle),range_end:Y("bg-accent rounded-r-md",c.range_end),today:Y("bg-
1accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:Y("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:Y("text-muted-foreground opacity-50",c.disabled),hidden:Y("invisible",c.hidden),...t},components:{Root:({className:d,rootRef:m,...u})=>s.jsx("div",{"data-slot":"calendar",ref:m,className:Y(d),...u}),Chevron:({className:d,orientation:m,...u})=>m==="left"?s.jsx(ol,{className:Y("size-4",d),...u}):m==="right"?s.jsx(Pi,{className:Y("size-4",d),...u}):s.jsx(or,{className:Y("size-4",d),...u}),DayButton:uu,WeekNumber:({children:d,...m})=>s.jsx("td",{...m,children:s.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...a})}function uu({className:e,day:t,modifiers:n,...r}){const o=fr(),l=f.useRef(null);return f.useEffect(()=>{n.focused&&l.current?.focus()},[n.focused]),s.jsx(Z,{ref:l,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:Y("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}const fu=["top","right","bottom","left"],Je=Math.min,De=Math.max,nn=Math.round,Vt=Math.floor,ze=e=>({x:e,y:e}),mu={left:"right",right:"left",bottom:"top",top:"bottom"};function Hn(e,t,n){return De(e,Je(t,n))}function Ge(e,t){return typeof e=="function"?e(t):e}function Ze(e){return e.split("-")[0]}function Nt(e){return e.split("-")[1]}function pr(e){return e==="x"?"y":"x"}function gr(e){return e==="y"?"height":"width"}function Be(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xr(e){return pr(Be(e))}function hu(e,t,n){n===void 0&&(n=!1);const r=Nt(e),o=xr(e),l=gr(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=rn(i)),[i,rn(i)]}function pu(e){const t=rn(e);return[Ln(e),t,Ln(t)]}function Ln(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Zr=["left","right"],Kr=["right","left"],gu=["top","bottom"],xu=["bottom","top"];function yu(e,t,n){switch(e){case"top":case"bottom":return n?t?Kr:Zr:t?Zr:Kr;case"left":case"right":return t?gu:xu;default:return[]}}function vu(e,t,n,r){const o=Nt(e);let l=yu(Ze(e),n==="start",r);return o&&(l=l.map(i=>i+"-"+o),t&&(l=l.concat(l.map(Ln)))),l}function rn(e){const t=Ze(e);return mu[t]+e.slice(t.length)}function bu(e){return{top:0,right:0,bottom:0,left:0,...e}}function cs(e){return typeof e!="number"?bu(e):{top:e,right:e,bottom:e,left:e}}function on(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Xr(e,t,n){let{reference:r,floating:o}=e;const l=Be(t),i=xr(t),a=gr(i),c=Ze(t),d=l==="y",m=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(c){case"top":p={x:m,y:r.y-o.height};break;case"bottom":p={x:m,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(Nt(t)){case"start":p[i]-=h*(n&&d?-1:1);break;case"end":p[i]+=h*(n&&d?-1:1);break}return p}async function wu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:i,elements:a,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=Ge(t,e),y=cs(p),b=a[h?u==="floating"?"reference":"floating":u],C=on(await l.getClippingRect
vendor: 4,808 bytes, line 1
1({element:(n=await(l.isElement==null?void 0:l.isElement(b)))==null||n?b:b.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:d,rootBoundary:m,strategy:c})),w=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),N=await(l.isElement==null?void 0:l.isElement(v))?await(l.getScale==null?void 0:l.getScale(v))||{x:1,y:1}:{x:1,y:1},j=on(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:c}):w);return{top:(C.top-j.top+y.top)/N.y,bottom:(j.bottom-C.bottom+y.bottom)/N.y,left:(C.left-j.left+y.left)/N.x,right:(j.right-C.right+y.right)/N.x}}const Nu=50,Cu=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:wu},c=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:u}=Xr(d,r,c),h=r,p=0;const y={};for(let g=0;g<l.length;g++){const b=l[g];if(!b)continue;const{name:C,fn:w}=b,{x:v,y:N,data:j,reset:S}=await w({x:m,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:y,rects:d,platform:a,elements:{reference:e,floating:t}});m=v??m,u=N??u,y[C]={...y[C],...j},S&&p<Nu&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:m,y:u}=Xr(d,h,c)),g=-1)}return{x:m,y:u,placement:h,strategy:o,middlewareData:y}},Su=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:l,platform:i,elements:a,middlewareData:c}=t,{element:d,padding:m=0}=Ge(e,t)||{};if(d==null)return{};const u=cs(m),h={x:n,y:r},p=xr(o),y=gr(p),g=await i.getDimensions(d),b=p==="y",C=b?"top":"left",w=b?"bottom":"right",v=b?"clientHeight":"clientWidth",N=l.reference[y]+l.reference[p]-h[p]-l.floating[y],j=h[p]-l.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let D=S?S[v]:0;(!D||!await(i.isElement==null?void 0:i.isElement(S)))&&(D=a.floating[v]||l.floating[y]);const I=N/2-j/2,E=D/2-g[y]/2-1,_=Je(u[C],E),M=Je(u[w],E),V=_,H=D-g[y]-M,z=D/2-g[y]/2+I,X=Hn(V,z,H),B=!c.arrow&&Nt(o)!=null&&z!==X&&l.reference[y]/2-(z<V?_:M)-g[y]/2<0,W=B?z<V?z-V:z-H:0;return{[p]:h[p]+W,data:{[p]:X,centerOffset:z-X-W,...B&&{alignmentOffset:W}},reset:B}}}),ju=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:i,initialPlacement:a,platform:c,elements:d}=t,{mainAxis:m=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=Ge(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const C=Ze(o),w=Be(a),v=Ze(a)===a,N=await(c.isRTL==null?void 0:c.isRTL(d.floating)),j=h||(v||!g?[rn(a)]:pu(a)),S=y!=="none";!h&&S&&j.push(...vu(a,g,y,N));const D=[a,...j],I=await c.detectOverflow(t,b),E=[];let _=((r=l.flip)==null?void 0:r.overflows)||[];if(m&&E.push(I[C]),u){const z=hu(o,i,N);E.push(I[z[0]],I[z[1]])}if(_=[..._,{placement:o,overflows:E}],!E.every(z=>z<=0)){var M,V;const z=(((M=l.flip)==null?void 0:M.index)||0)+1,X=D[z];if(X&&(!(u==="alignment"?w!==Be(X):!1)||_.every(P=>Be(P.placement)===w?P.overflows[0]>0:!0)))return{data:{index:z,overflows:_},reset:{placement:X}};let B=(V=_.filter(W=>W.overflows[0]<=0).sort((W,P)=>W.overflows[1]-P.overflows[1])[0])==null?void 0:V.placement;if(!B)switch(p){case"bestFit":{var H;const W=(H=_.filter(P=>{if(S){const U=Be(P.placement);return U===w||U==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(U=>U>0).reduce((U,$)=>U+$,0)]).sort((P,U)=>P[1]-U[1])[0])==null?void 0:H[0];W&&(B=W);break}case"initialPlacement":B=a;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Qr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jr(e){return fu.some(t=>e[t]>=0)}const ku=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...l}=Ge(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...l,elementContext:"reference"}),a=Qr(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Jr(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...l,altBoundary:!0}),a=Qr(i,n.floating);return{data:{escapedOffsets:a,escaped:Jr(a)}}}default:return{}}}}},ds=new Set(["left","top"]);async function Du(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ze(n),a=Nt(n),c=Be(n)==="y",d=ds.has(i)?-1:1,m=l&&c?-1:1,u=Ge(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}
1:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof y=="number"&&(p=a==="end"?y*-1:y),c?{x:p*m,y:h*d}:{x:h*d,y:p*m}}const Mu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:i,middlewareData:a}=t,c=await Du(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:l+c.y,data:{...c,placement:i}}}}},Ou=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:l}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:C=>{let{x:w,y:v}=C;return{x:w,y:v}}},...d}=Ge(e,t),m={x:n,y:r},u=await l.detectOverflow(t,d),h=Be(Ze(o)),p=pr(h);let y=m[p],g=m[h];if(i){const C=p==="y"?"top":"left",w=p==="y"?"bottom":"right",v=y+u[C],N=y-u[w];y=Hn(v,y,N)}if(a){const C=h==="y"?"top":"left",w=h==="y"?"bottom":"right",v=g+u[C],N=g-u[w];g=Hn(v,g,N)}const b=c.fn({...t,[p]:y,[h]:g});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[p]:i,[h]:a}}}}}},Pu=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:l,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:d=!0}=Ge(e,t),m={x:n,y:r},u=Be(o),h=pr(u);let p=m[h],y=m[u];const g=Ge(a,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const v=h==="y"?"height":"width",N=l.reference[h]-l.floating[v]+b.mainAxis,j=l.reference[h]+l.reference[v]-b.mainAxis;p<N?p=N:p>j&&(p=j)}if(d){var C,w;const v=h==="y"?"width":"height",N=ds.has(Ze(o)),j=l.reference[u]-l.floating[v]+(N&&((C=i.offset)==null?void 0:C[u])||0)+(N?0:b.crossAxis),S=l.reference[u]+l.reference[v]+(N?0:((w=i.offset)==null?void 0:w[u])||0)-(N?b.crossAxis:0);y<j?y=j:y>S&&(y=S)}return{[h]:p,[u]:y}}}},Au=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:i,elements:a}=t,{apply:c=()=>{},...d}=Ge(e,t),m=await i.detectOverflow(t,d),u=Ze(o),h=Nt(o),p=Be(o)==="y",{width:y,height:g}=l.floating;let b,C;u==="top"||u==="bottom"?(b=u,C=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(C=u,b=h==="end"?"top":"bottom");const w=g-m.top-m.bottom,v=y-m.left-m.right,N=Je(g-m[b],w),j=Je(y-m[C],v),S=!t.middlewareData.shift;let D=N,I=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=w),S&&!h){const _=De(m.left,0),M=De(m.right,0),V=De(m.top,0),H=De(m.bottom,0);p?I=y-2*(_!==0||M!==0?_+M:De(m.left,m.right)):D=g-2*(V!==0||H!==0?V+H:De(m.top,m.bottom))}await c({...t,availableWidth:I,availableHeight:D});const E=await i.getDimensions(a.floating);return y!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function fn(){return typeof window<"u"}function Ct(e){return us(e)?(e.nodeName||"").toLowerCase():"#document"}function Me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Le(e){var t;return(t=(us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function us(e){return fn()?e instanceof Node||e instanceof Me(e).Node:!1}function Ee(e){return fn()?e instanceof Element||e instanceof Me(e).Element:!1}function Xe(e){return fn()?e instanceof HTMLElement||e instanceof Me(e).HTMLElement:!1}function eo(e){return!fn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Me(e).ShadowRoot}function $t(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Tu(e){return/^(table|td|th)$/.test(Ct(e))}function mn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ru=/transform|translate|scale|rotate|perspective|filter/,Iu=/paint|layout|strict|content/,ot=e=>!!e&&e!=="none";let En;function yr(e){const t=Ee(e)?_e(e):e;return ot(t.transform)||ot(t.translate)||ot(t.scale)||ot(t.rotate)||ot(t.perspective)||!vr()&&(ot(t.backdropFilter)||ot(t.filter))||Ru.test(t.willChange||"")||Iu.test(t.contain||"")}function Eu(e){let t=et(e);for(;Xe(t)&&!vt(t);){if(yr(t))return t;if(mn(t))return null;t=et(t)}return null}function vr(){return En==null&&(En=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),En}function vt(e){return/^(html|body|#document)$/.test(Ct(e))}function _e(e){return Me(e).getComputedStyle(e)}function hn(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if(Ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eo(e)&&e.host||Le(e);return eo(t)?t.host:t}function fs(e){const t=et(e);return vt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&$t(t)?t:fs(t)}function Ft(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fs(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),i=Me(o);if(l){const a=Vn(i);
vendor: 4,444 bytes, line 1
1return t.concat(i,i.visualViewport||[],$t(o)?o:[],a&&n?Ft(a):[])}else return t.concat(o,Ft(o,[],n))}function Vn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ms(e){const t=_e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),l=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=nn(n)!==l||nn(r)!==i;return a&&(n=l,r=i),{width:n,height:r,$:a}}function br(e){return Ee(e)?e:e.contextElement}function xt(e){const t=br(e);if(!Xe(t))return ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=ms(t);let i=(l?nn(n.width):n.width)/r,a=(l?nn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const _u=ze(0);function hs(e){const t=Me(e);return!vr()||!t.visualViewport?_u:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Me(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=br(e);let i=ze(1);t&&(r?Ee(r)&&(i=xt(r)):i=xt(e));const a=Wu(l,n,r)?hs(l):ze(0);let c=(o.left+a.x)/i.x,d=(o.top+a.y)/i.y,m=o.width/i.x,u=o.height/i.y;if(l){const h=Me(l),p=r&&Ee(r)?Me(r):r;let y=h,g=Vn(y);for(;g&&r&&p!==y;){const b=xt(g),C=g.getBoundingClientRect(),w=_e(g),v=C.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,N=C.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,d*=b.y,m*=b.x,u*=b.y,c+=v,d+=N,y=Me(g),g=Vn(y)}}return on({width:m,height:u,x:c,y:d})}function pn(e,t){const n=hn(e).scrollLeft;return t?t.left+n:lt(Le(e)).left+n}function ps(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-pn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Fu(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",i=Le(r),a=t?mn(t.floating):!1;if(r===i||a&&l)return n;let c={scrollLeft:0,scrollTop:0},d=ze(1);const m=ze(0),u=Xe(r);if((u||!u&&!l)&&((Ct(r)!=="body"||$t(i))&&(c=hn(r)),u)){const p=lt(r);d=xt(r),m.x=p.x+r.clientLeft,m.y=p.y+r.clientTop}const h=i&&!u&&!l?ps(i,c):ze(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+m.x+h.x,y:n.y*d.y-c.scrollTop*d.y+m.y+h.y}}function Yu(e){return Array.from(e.getClientRects())}function Bu(e){const t=Le(e),n=hn(e),r=e.ownerDocument.body,o=De(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=De(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+pn(e);const a=-n.scrollTop;return _e(r).direction==="rtl"&&(i+=De(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:i,y:a}}const to=25;function zu(e,t){const n=Me(e),r=Le(e),o=n.visualViewport;let l=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){l=o.width,i=o.height;const m=vr();(!m||m&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const d=pn(r);if(d<=0){const m=r.ownerDocument,u=m.body,h=getComputedStyle(u),p=m.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(r.clientWidth-u.clientWidth-p);y<=to&&(l-=y)}else d<=to&&(l+=d);return{width:l,height:i,x:a,y:c}}function $u(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=Xe(e)?xt(e):ze(1),i=e.clientWidth*l.x,a=e.clientHeight*l.y,c=o*l.x,d=r*l.y;return{width:i,height:a,x:c,y:d}}function no(e,t,n){let r;if(t==="viewport")r=zu(e,n);else if(t==="document")r=Bu(Le(e));else if(Ee(t))r=$u(t,n);else{const o=hs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return on(r)}function gs(e,t){const n=et(e);return n===t||!Ee(n)||vt(n)?!1:_e(n).position==="fixed"||gs(n,t)}function Hu(e,t){const n=t.get(e);if(n)return n;let r=Ft(e,[],!1).filter(a=>Ee(a)&&Ct(a)!=="body"),o=null;const l=_e(e).position==="fixed";let i=l?et(e):e;for(;Ee(i)&&!vt(i);){const a=_e(i),c=yr(i);!c&&a.position==="fixed"&&(o=null),(l?!c&&!o:!c&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||$t(i)&&!c&&gs(e,i))?r=r.filter(m=>m!==i):o=a,i=et(i)}return t.set(e,r),r}function Lu(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?mn(t)?[]:Hu(t,this._c):[].concat(n),r],a=no(t,i[0],o);let c=a.top,d=a.right,m=a.bottom,u=a.left;for(let h=1;h<i.length;h++){const p=no(t,i[h],o);c=De(p.top,c),d=Je(p.right,d),m=Je(p.bottom,m),u=De(p.left,u)}return{width:d-u,height:m-c,x:u,y:c}}function Vu(e){const{width:t,height:n}=ms(e);return{width:t,height:n}}function qu(e,t,n){const r=Xe(t),o=Le(t),l=n==="fixed",i=lt(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const c=ze(0);function d(){c.x=pn(o)}
vendor: 9,242 bytes, line 1
1if(r||!r&&!l)if((Ct(t)!=="body"||$t(o))&&(a=hn(t)),r){const p=lt(t,!0,l,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&d();l&&!r&&o&&d();const m=o&&!r&&!l?ps(o,a):ze(0),u=i.left+a.scrollLeft-c.x-m.x,h=i.top+a.scrollTop-c.y-m.y;return{x:u,y:h,width:i.width,height:i.height}}function _n(e){return _e(e).position==="static"}function ro(e,t){if(!Xe(e)||_e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Le(e)===n&&(n=n.ownerDocument.body),n}function xs(e,t){const n=Me(e);if(mn(e))return n;if(!Xe(e)){let o=et(e);for(;o&&!vt(o);){if(Ee(o)&&!_n(o))return o;o=et(o)}return n}let r=ro(e,t);for(;r&&Tu(r)&&_n(r);)r=ro(r,t);return r&&vt(r)&&_n(r)&&!yr(r)?n:r||Eu(e)||n}const Uu=async function(e){const t=this.getOffsetParent||xs,n=this.getDimensions,r=await n(e.floating);return{reference:qu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Gu(e){return _e(e).direction==="rtl"}const Zu={convertOffsetParentRelativeRectToViewportRelativeRect:Fu,getDocumentElement:Le,getClippingRect:Lu,getOffsetParent:xs,getElementRects:Uu,getClientRects:Yu,getDimensions:Vu,getScale:xt,isElement:Ee,isRTL:Gu};function ys(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ku(e,t){let n=null,r;const o=Le(e);function l(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),l();const d=e.getBoundingClientRect(),{left:m,top:u,width:h,height:p}=d;if(a||t(),!h||!p)return;const y=Vt(u),g=Vt(o.clientWidth-(m+h)),b=Vt(o.clientHeight-(u+p)),C=Vt(m),v={rootMargin:-y+"px "+-g+"px "+-b+"px "+-C+"px",threshold:De(0,Je(1,c))||1};let N=!0;function j(S){const D=S[0].intersectionRatio;if(D!==c){if(!N)return i();D?i(!1,D):r=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!ys(d,e.getBoundingClientRect())&&i(),N=!1}try{n=new IntersectionObserver(j,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,v)}n.observe(e)}return i(!0),l}function Xu(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=br(e),m=o||l?[...d?Ft(d):[],...t?Ft(t):[]]:[];m.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),l&&C.addEventListener("resize",n)});const u=d&&a?Ku(d,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(C=>{let[w]=C;w&&w.target===d&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),n()}),d&&!c&&p.observe(d),t&&p.observe(t));let y,g=c?lt(e):null;c&&b();function b(){const C=lt(e);g&&!ys(g,C)&&n(),g=C,y=requestAnimationFrame(b)}return n(),()=>{var C;m.forEach(w=>{o&&w.removeEventListener("scroll",n),l&&w.removeEventListener("resize",n)}),u?.(),(C=p)==null||C.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const Qu=Mu,Ju=Ou,ef=ju,tf=Au,nf=ku,oo=Su,rf=Pu,of=(e,t,n)=>{const r=new Map,o={platform:Zu,...n},l={...o.platform,_c:r};return Cu(e,t,{...o,platform:l})};var sf=typeof document<"u",af=function(){},Qt=sf?f.useLayoutEffect:af;function sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!sn(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function vs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){const n=vs(e);return Math.round(t*n)/n}function Wn(e){const t=f.useRef(e);return Qt(()=>{t.current=e}),t}function lf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:i}={},transform:a=!0,whileElementsMounted:c,open:d}=e,[m,u]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);sn(h,r)||p(r);const[y,g]=f.useState(null),[b,C]=f.useState(null),w=f.useCallback(P=>{P!==S.current&&(S.current=P,g(P))},[]),v=f.useCallback(P=>{P!==D.current&&(D.current=P,C(P))},[]),N=l||y,j=i||b,S=f.useRef(null),D=f.useRef(null),I=f.useRef(m),E=c!=null,_=Wn(c),M=Wn(o),V=Wn(d),H=f.useCallback(()=>{if(!S.current||!D.current)return;const P={placement:t,strategy:n,middleware:h};M.current&&(P.platform=M.current),of(S.current,D.current,P).then(U=>{const $={...U,isPositioned:V.current!==!1};z.current&&!sn(I.current,$)&&(I.current=$,nr.flushSync(()=>{u($)}))})},[h,t,n,M,V]);Qt(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[d]);const z=f.useRef(!1);Qt(()=>(z.current=!0,()=>{z.current=!1}),[]),Qt(()=>{if(N&&(S.current=N),j&&(D.current=j),N&&j){if(_.current)return _.current(N,j,H);H()}},[N,j,H,_,E]);const X=f.useMemo(()=>({reference:S,floating:D,setReference:w,setFloating:v}),[w,v]),B=f.useMemo(()=>({reference:N,floating:j}),[N,j]),W=f.useMemo(()=>{const P={position:n,left:0,top:0};if(!B.floating)return P;const U=so(B.floating,m.x),$=so(B.floating,m.y);return a?{...P,transform:"translate("+U+"px, "+$+"px)",...vs(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:$}},[n,a,B.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:H,refs:X,elements:B,floatingStyles:W}),[m,H,X,B,W])}const cf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?oo({element:r.current,padding:o}).fn(n):{}:r?oo({element:r,padding:o}).fn(n):{}}}},df=(e,t)=>{const n=Qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},uf=(e,t)=>{const n=Ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},ff=(e,t)=>({fn:rf(e).fn,options:[e,t]}),mf=(e,t)=>{const n=ef(e);return{name:n.name,fn:n.fn,options:[e,t]}},hf=(e,t)=>{const n=tf(e);return{name:n.name,fn:n.fn,options:[e,t]}},pf=(e,t)=>{const n=nf(e);return{name:n.name,fn:n.fn,options:[e,t]}},gf=(e,t)=>{const n=cf(e);return{name:n.name,fn:n.fn,options:[e,t]}};var xf="Arrow",bs=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...l}=e;return s.jsx(ye.svg,{...l,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});bs.displayName=xf;var yf=bs,wr="Popper",[ws,gn]=sr(wr),[vf,Ns]=ws(wr),Cs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return s.jsx(vf,{scope:t,anchor:r,onAnchorChange:o,children:n})};Cs.displayName=wr;var Ss="PopperAnchor",js=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,l=Ns(Ss,n),i=f.useRef(null),a=Se(t,i),c=f.useRef(null);return f.useEffect(()=>{const d=c.current;c.current=r?.current||i.current,d!==c.current&&l.onAnchorChange(c.current)}),r?null:s.jsx(ye.div,{...o,ref:a})});js.displayName=Ss;var Nr="PopperContent",[bf,wf]=ws(Nr),ks=f.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:l="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:y,...g}=e,b=Ns(Nr,n),[C,w]=f.useState(null),v=Se(t,R=>w(R)),[N,j]=f.useState(null),S=Mi(N),D=S?.width??0,I=S?.height??0,E=r+(l!=="center"?"-"+l:""),_=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},M=Array.isArray(d)?d:[d],V=M.length>0,H={padding:_,boundary:M.filter(Cf),altBoundary:V},{refs:z,floatingStyles:X,placement:B,isPositioned:W,middlewareData:P}=lf({strategy:"fixed",placement:E,whileElementsMounted:(...R)=>Xu(...R,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[df({mainAxis:o+I,alignmentAxis:i}),c&&uf({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?ff():void 0,...H}),c&&mf({...H}),hf({...H,apply:({elements:R,rects:K,availableWidth:ie,availableHeight:x})=>{const{width:O,height:T}=K.reference,k=R.floating.style;k.setProperty("--radix-popper-available-width",`${ie}px`),k.setProperty("--radix-popper-available-height",`${x}px`),k.setProperty("--radix-popper-anchor-width",`${O}px`),k.setProperty("--radix-popper-anchor-height",`${T}px`)}}),N&&gf({element:N,padding:a}),Sf({arrowWidth:D,arrowHeight:I}),h&&pf({strategy:"referenceHidden",...H})]}),[U,$]=Os(B),de=bo(y);$e(()=>{W&&de?.()},[W,de]);const ve=P.arrow?.x,be=P.arrow?.y,fe=P.arrow?.centerOffset!==0,[ge,me]=f.useState();return $e(()=>{C&&me(window.getComputedStyle(C).zIndex)},[C]),s.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:W?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(bf,{scope:n,placedSide:U,onArrowChange:j,arrowX:ve,arrowY:be,shouldHideArrow:fe,children:s.jsx(ye.div,{"data-side":U,"data-align":$,...g,ref:v,style:{...g.style,animation:W?void 0:"none"}})})})});ks.displayName=Nr;var Ds="PopperArrow",Nf={top:"bottom",right:"left",bottom:"top",left:"r
1ight"},Ms=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,l=wf(Ds,r),i=Nf[l.placedSide];return s.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:s.jsx(yf,{...o,ref:n,style:{...o.style,display:"block"}})})});Ms.displayName=Ds;function Cf(e){return e!==null}var Sf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,m]=Os(n),u={start:"0%",center:"50%",end:"100%"}[m],h=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+c/2;let y="",g="";return d==="bottom"?(y=i?u:`${h}px`,g=`${-c}px`):d==="top"?(y=i?u:`${h}px`,g=`${r.floating.height+c}px`):d==="right"?(y=`${-c}px`,g=i?u:`${p}px`):d==="left"&&(y=`${r.floating.width+c}px`,g=i?u:`${p}px`),{data:{x:y,y:g}}}});function Os(e){const[t,n="center"]=e.split("-");return[t,n]}var Ps=Cs,Cr=js,As=ks,Ts=Ms;function jf(e){const t=kf(e),n=f.forwardRef((r,o)=>{const{children:l,...i}=r,a=f.Children.toArray(l),c=a.find(Mf);if(c){const d=c.props.children,m=a.map(u=>u===c?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return s.jsx(t,{...i,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,m):null})}return s.jsx(t,{...i,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function kf(e){const t=f.forwardRef((n,r)=>{const{children:o,...l}=n;if(f.isValidElement(o)){const i=Pf(o),a=Of(l,o.props);return o.type!==f.Fragment&&(a.ref=r?ho(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Df=Symbol("radix.slottable");function Mf(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Df}function Of(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...a)=>{const c=l(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function Pf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xn="Popover",[Rs]=sr(xn,[gn]),Ht=gn(),[Af,tt]=Rs(xn),Is=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:l,modal:i=!1}=e,a=Ht(t),c=f.useRef(null),[d,m]=f.useState(!1),[u,h]=Bn({prop:r,defaultProp:o??!1,onChange:l,caller:xn});return s.jsx(Ps,{...a,children:s.jsx(Af,{scope:t,contentId:cn(),triggerRef:c,open:u,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>m(!0),[]),onCustomAnchorRemove:f.useCallback(()=>m(!1),[]),modal:i,children:n})})};Is.displayName=xn;var Es="PopoverAnchor",Tf=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=tt(Es,n),l=Ht(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return f.useEffect(()=>(i(),()=>a()),[i,a]),s.jsx(Cr,{...l,...r,ref:t})});Tf.displayName=Es;var _s="PopoverTrigger",Ws=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=tt(_s,n),l=Ht(n),i=Se(t,o.triggerRef),a=s.jsx(ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$s(o.open),...r,ref:i,onClick:ue(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:s.jsx(Cr,{asChild:!0,...l,children:a})});Ws.displayName=_s;var Sr="PopoverPortal",[Rf,If]=Rs(Sr,{forceMount:void 0}),Fs=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,l=tt(Sr,t);return s.jsx(Rf,{scope:t,forceMount:n,children:s.jsx(vo,{present:n||l.open,children:s.jsx(wo,{asChild:!0,container:o,children:r})})})};Fs.displayName=Sr;var bt="PopoverContent",Ys=f.forwardRef((e,t)=>
1{const n=If(bt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,l=tt(bt,e.__scopePopover);return s.jsx(vo,{present:r||l.open,children:l.modal?s.jsx(_f,{...o,ref:t}):s.jsx(Wf,{...o,ref:t})})});Ys.displayName=bt;var Ef=jf("PopoverContent.RemoveScroll"),_f=f.forwardRef((e,t)=>{const n=tt(bt,e.__scopePopover),r=f.useRef(null),o=Se(t,r),l=f.useRef(!1);return f.useEffect(()=>{const i=r.current;if(i)return No(i)},[]),s.jsx(Co,{as:Ef,allowPinchZoom:!0,children:s.jsx(Bs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,i=>{i.preventDefault(),l.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,d=a.button===2||c;l.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ue(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Wf=f.forwardRef((e,t)=>{const n=tt(bt,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return s.jsx(Bs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(r.current||n.triggerRef.current?.focus(),l.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(r.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=l.target;n.triggerRef.current?.contains(i)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),Bs=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:m,...u}=e,h=tt(bt,n),p=Ht(n);return So(),s.jsx(jo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:l,children:s.jsx(ko,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:m,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:s.jsx(As,{"data-state":$s(h.open),role:"dialog",id:h.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),zs="PopoverClose",Ff=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=tt(zs,n);return s.jsx(ye.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});Ff.displayName=zs;var Yf="PopoverArrow",Bf=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ht(n);return s.jsx(Ts,{...o,...r,ref:t})});Bf.displayName=Yf;function $s(e){return e?"open":"closed"}var zf=Is,$f=Ws,Hf=Fs,Hs=Ys;const Lf=zf,Vf=$f,Ls=f.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>s.jsx(Hf,{children:s.jsx(Hs,{ref:o,align:t,sideOffset:n,className:Y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",e),...r})}));Ls.displayName=Hs.displayName;const qf=e=>e?new Date(e).toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"}):null;function Uf(){const e=Xt(Ii),n=Ri({queryKey:["refresh-status"],queryFn:()=>e(),retry:!1}).data?.residence;if(!n?.lastAt)return null;const r=n.reason==="too-soon",o=qf(n.nextAllowedAt);return s.jsxs("div",{className:"mb-5 flex gap-3 rounded-xl border border-primary/50 bg-primary/10 p-4 text-sm text-page-foreground",children:[s.jsx(Fi,{className:"mt-0.5 size-5 shrink-0 text-primary"}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:"font-semibold",children:"If you change your address, it has to be verified again."}
1),r?s.jsxs("p",{className:"text-page-foreground/85",children:["Your residence check was already refreshed in the last 30 days",o?`. A new residence check will be available on ${o}`:"",". Rechecks can't be requested early."]}):s.jsxs("p",{className:"text-page-foreground/85",children:["Your current residence confirmation stops applying to the new address. You can redo the residence check from"," ",s.jsx(rr,{to:"/account",hash:"verify",className:"font-semibold text-primary underline",children:"your account"})," ","at no extra charge inside your paid window."]})]})]})}function he({eyebrow:e,title:t,body:n,helper:r,children:o,onBack:l,onNext:i,nextLabel:a="Continue",nextDisabled:c,hideNext:d,secondaryAction:m,onSaveAndContinue:u}){const{active:h,isTestUser:p}=po(),y=!!c&&!h;return f.useEffect(()=>{if(!i||y||d)return;const g=b=>{if(b.key!=="Enter"||b.defaultPrevented||document.querySelector('[role="dialog"], [role="alertdialog"]'))return;const C=b.target;C&&(C.closest('textarea, [contenteditable="true"], [role="listbox"], [role="combobox"][aria-expanded="true"]')||C.closest('button, a, [role="button"], [role="link"], [role="option"], [role="menuitem"]')||(b.preventDefault(),i()))};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[i,y,d]),s.jsx("div",{className:"flex flex-1 flex-col",children:s.jsxs("div",{className:"mx-auto flex w-full max-w-xl flex-1 flex-col justify-center px-5 py-8 duration-500 animate-in fade-in slide-in-from-bottom-3",children:[h&&s.jsx("p",{className:"mb-4 text-xs font-medium text-page-foreground/80",children:p?"Test account â no real ID, bank, or payment check runs.":"Inspect mode â Continue advances without answering. Turn it off in the footer."}),e&&s.jsx("p",{className:"mb-3 text-xs font-semibold uppercase tracking-widest text-page-foreground",children:e}),s.jsx("h1",{className:"text-balance text-2xl font-semibold leading-tight tracking-tight text-page-foreground sm:text-3xl",children:t}),n&&s.jsx("p",{className:"mt-3 text-pretty text-base leading-relaxed text-page-foreground/90",children:n}),o&&s.jsx("div",{className:"mt-7",children:o}),r&&s.jsx("p",{className:"mt-4 text-sm leading-relaxed text-page-foreground/90",children:r}),s.jsxs("div",{className:"mt-9 flex flex-col gap-3 sm:grid sm:grid-cols-[1fr_auto_1fr] sm:items-center",children:[s.jsx("div",{className:"flex flex-wrap items-center gap-3",children:l&&s.jsxs(Z,{type:"button",variant:"ghost",size:"lg",onClick:l,className:"text-page-foreground hover:text-page-foreground hover:bg-white/10",children:[s.jsx(Do,{className:"size-4"})," Back"]})}),s.jsx("div",{className:"flex justify-center",children:!d&&i&&s.jsxs(Z,{type:"button",size:"lg",onClick:i,disabled:y,className:"min-w-32",children:[a," ",s.jsx(zn,{className:"size-4"})]})}),s.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-3",children:[u&&s.jsx(Z,{type:"button",variant:"outline",size:"lg",onClick:u,className:"border-page-foreground/30 bg-page-foreground/10 text-page-foreground hover:bg-page-foreground/20 hover:text-page-foreground",children:"Save & continue later"}),m]})]})]},t)})}function We({options:e,value:t,onChange:n,label:r="Answer options"}){return s.jsx("div",{role:"radiogroup","aria-label":r,className:"flex flex-col gap-3",children:e.map(o=>{const l=t===o.value;return s.jsxs("button",{type:"button",role:"radio","aria-checked":l,"aria-describedby":o.description?`opt-desc-${o.value}`:void 0,onClick:()=>n(o.value),className:Y("group flex items-center justify-between gap-3 rounded-xl border-2 px-4 py-4 text-left text-page-foreground transition-all","hover:border-primary/70 hover:bg-white/15 hover:shadow-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",l?"border-primary bg-primary/15 ring-2 ring-primary/60 shadow-[0_0_0_4px_hsl(var(--primary)/0.15)]":"border-page-foreground/40 bg-white/10"),children:[s.jsxs("span",{children:[s.jsx("span",{className:"block font-semibold text-page-foreground",children:o.label}),o.description&&s.jsx("span",{id:`opt-desc-${o.value}
1`,className:"mt-0.5 block text-sm text-page-foreground/70",children:o.description})]}),s.jsx("span",{className:Y("flex size-6 shrink-0 items-center justify-center rounded-full border-2 transition-colors",l?"border-primary bg-primary text-primary-foreground":"border-page-foreground/40 bg-transparent"),children:l&&s.jsx(Jt,{className:"size-4"})})]},o.value)})})}const Rt=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Rt.displayName="Card";const Vs=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("flex flex-col space-y-1.5 p-6",e),...t}));Vs.displayName="CardHeader";const qs=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("font-semibold leading-none tracking-tight",e),...t}));qs.displayName="CardTitle";const Us=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));Us.displayName="CardDescription";const It=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("p-6 pt-0",e),...t}));It.displayName="CardContent";const Gf=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("flex items-center p-6 pt-0",e),...t}));Gf.displayName="CardFooter";const Zf=oi("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),qn=f.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:Y(Zf({variant:t}),e),...n}));qn.displayName="Alert";const Gs=f.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:Y("mb-1 font-medium leading-none tracking-tight",e),...t}));Gs.displayName="AlertTitle";const Un=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:Y("text-sm [&_p]:leading-relaxed",e),...t}));Un.displayName="AlertDescription";function Kf(e,t=[]){let n=[];function r(l,i){const a=f.createContext(i);a.displayName=l+"Context";const c=n.length;n=[...n,i];const d=u=>{const{scope:h,children:p,...y}=u,g=h?.[e]?.[c]||a,b=f.useMemo(()=>y,Object.values(y));return s.jsx(g.Provider,{value:b,children:p})};d.displayName=l+"Provider";function m(u,h){const p=h?.[e]?.[c]||a,y=f.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${l}\``)}return[d,m]}const o=()=>{const l=n.map(i=>f.createContext(i));return function(a){const c=a?.[e]||l;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Xf(o,...t)]}function Xf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const i=r.reduce((a,{useScope:c,scopeName:d})=>{const u=c(l)[`__scope${d}`];return{...a,...u}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Qf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zs=Qf.reduce((e,t)=>{const n=si(`Primitive.${t}`),r=f.forwardRef((o,l)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...a,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),jr="Progress",kr=100,[Jf]=Kf(jr),[em,tm]=Jf(jr),Ks=f.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:l=nm,...i}=e;(o||o===0)&&!ao(o)&&console.error(rm(`${o}`,"Progress"));const a=ao(o)?o:kr;r!==null&&!io(r,a)&&console.error(om(`${r}`,"Progress"));const c=io(r,a)?r:null,d=an(c)?l(c,a):void 0;return s.jsx(em,{scope:n,value:c,max:a,children:s.jsx(Zs.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":an(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":Js(c,a),"data-value":c??void 0,"data-max":a,...i,ref:t})})});Ks.displayName=jr;var Xs="ProgressIndicator",Qs=f.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=tm(Xs,n);return s.jsx(Zs.div,{"data-state":Js(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Qs.displayName=Xs;function nm(e,t){return`${Math.round(e/t*100)}%`}function Js(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function an(e){return typeof e=="number"}function ao(e){return an(e)&&!isNaN(e)&&e>0}function io(e,t){return an(e)&&!isNaN(e)&&e<=t&&e>=0}function rm(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${kr}\`.`}function om(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 2 - a positive number 3 - less than the value passed to \`max\` (or ${kr} if no \`max\` prop is set) 4 - \`null\` or \`undefined\` if the progress is indeterminate. 5 6Defaulting to \`null\`.`}var ea=Ks,sm=Qs;const ta=f.forwardRef(({className:e,value:t,...n},r)=>s.jsx(ea,{ref:r,className:Y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:s.jsx(sm,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ta.displayName=ea.displayName;const Fn=[{id:"dl",label:"Driver's license",hint:"Front and back"},{id:"state",label:"State ID card",hint:"Front and back"},{id:"passport",label:"Passport",hint:"Photo page"}],am=2200;function im(){return s.jsx("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-page-foreground
6/25 bg-page-foreground/10 px-2.5 py-1 text-[11px] font-semibold uppercase tracking-wide text-page-foreground/80",children:"Simulation â no live Stripe connection"})}function qt({title:e,step:t,children:n}){return s.jsxs("div",{className:"rounded-xl border border-page-foreground/20 bg-white/5 p-5 animate-fade-in",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-page-foreground/70",children:t}),s.jsx(im,{})]}),s.jsx("h2",{className:"mt-2 text-lg font-semibold text-page-foreground",children:e}),s.jsx("div",{className:"mt-4",children:n})]})}function lm({onComplete:e,disabled:t=!1}){const[n,r]=f.useState("start"),[o,l]=f.useState("dl"),[i,a]=f.useState(""),[c,d]=f.useState(""),[m,u]=f.useState(""),[h,p]=f.useState({}),[y,g]=f.useState(0),b=3,C=Fn.find(v=>v.id===o)??Fn[0],w=o==="passport"?["Passport photo page","Selfie"]:["Document front","Document back","Selfie"];if(f.useEffect(()=>{if(n!=="running")return;const v=Date.now(),N=window.setInterval(()=>{const j=Math.min(100,(Date.now()-v)/am*100);g(j),j>=100&&(window.clearInterval(N),e())},100);return()=>window.clearInterval(N)},[n,e]),n==="start")return s.jsxs(Z,{type:"button",size:"lg",disabled:t,onClick:()=>r("type"),className:"h-14 w-full text-base",children:[s.jsx(en,{className:"size-5"})," Verify my identity"]});if(n==="type")return s.jsxs(qt,{step:`Step 1 of ${b}`,title:"Which ID will you present?",children:[s.jsx("div",{className:"space-y-2.5",children:Fn.map(v=>s.jsxs("button",{type:"button",onClick:()=>l(v.id),className:Y("flex w-full items-center gap-3 rounded-lg border p-3.5 text-left transition-colors",o===v.id?"border-success bg-verified text-verified-foreground":"border-page-foreground/25 text-page-foreground hover:bg-white/10"),children:[s.jsx(To,{className:"size-5 shrink-0"}),s.jsxs("span",{className:"flex-1",children:[s.jsx("span",{className:"block font-semibold",children:v.label}),s.jsx("span",{className:"block text-xs opacity-80",children:v.hint})]}),o===v.id&&s.jsx(Jt,{className:"size-5"})]},v.id))}),s.jsxs(Z,{type:"button",size:"lg",className:"mt-5 w-full",onClick:()=>r("details"),children:["Continue ",s.jsx(zn,{className:"size-4"})]})]});if(n==="details"){const v=i.trim().length>=4&&c.trim().length>0;return s.jsxs(qt,{step:`Step 2 of ${b}`,title:`Details from your ${C.label.toLowerCase()}`,children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Ce,{htmlFor:"sim-doc-number",className:"text-page-foreground",children:"Document number"}),s.jsx(it,{id:"sim-doc-number",value:i,onChange:N=>a(N.target.value),placeholder:"e.g. D1234567",maxLength:30,className:"mt-1.5 h-11"})]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx(Ce,{htmlFor:"sim-dob",className:"text-page-foreground",children:"Date of birth"}),s.jsx(it,{id:"sim-dob",type:"date",value:c,onChange:N=>d(N.target.value),className:"mt-1.5 h-11"})]}),s.jsxs("div",{children:[s.jsx(Ce,{htmlFor:"sim-issuer",className:"text-page-foreground",children:o==="passport"?"Issuing country":"Issuing state"}),o==="passport"?s.jsx(it,{id:"sim-issuer",value:m,onChange:N=>u(N.target.value),placeholder:"USA",maxLength:40,className:"mt-1.5 h-11"}):s.jsx("div",{className:"mt-1.5",children:s.jsx(Mo,{id:"sim-issuer",value:m,onChange:u,className:"h-11"})})]})]}),s.jsx("p",{className:"text-xs text-page-foreground/70",children:"These entries are checked and discarded â Gravadee keeps only the verified result, never your document details."})]}),s.jsxs("div",{className:"mt-5 flex gap-2",children:[s.jsx(Z,{type:"button",variant:"ghost",size:"lg",onClick:()=>r("type"),className:"text-page-foreground hover:bg-white/10 hover:text-page-foreground",children:"Back"}),s.jsxs(Z,{type:"button",size:"lg",className:"flex-1",disabled:!v,onClick:()=>r("capture"),children:["Continue ",s.jsx(zn,{className:"size-4"})]})]})]})}if(n==="capture"){const v=w.every(N=>h[N]);return s.jsxs(qt,{step:`Step ${b} of ${b}`,title:"Capture your document and selfie",children:[s.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:w.map(N=>s.jsxs("button",{type:"button",onClick:()=>p(j=>({...j,[N]:!0})),className:Y("flex aspect-[4/3] flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-3 text-center text-sm transition-colors",h[N]?"border-success bg-verified text-verified-foreground":"border-page-foreground
6/30 text-page-foreground hover:bg-white/10"),children:[h[N]?s.jsx(Jt,{className:"size-6"}):s.jsx(Ao,{className:"size-6"}),s.jsx("span",{className:"font-medium",children:N}),s.jsx("span",{className:"text-xs opacity-75",children:h[N]?"Captured":"Tap to capture"})]},N))}),s.jsx(Z,{type:"button",size:"lg",className:"mt-5 w-full",disabled:!v,onClick:()=>r("running"),children:"Submit for Verification"})]})}return s.jsxs(qt,{step:"Checking",title:"Verifying your identityâ¦",children:[s.jsxs("div",{className:"flex items-center gap-2 font-medium text-page-foreground",children:[s.jsx(gt,{className:"size-5 animate-spin"})," Checking document authenticity and selfie match"]}),s.jsx(ta,{value:y,className:"mt-4"}),s.jsxs("p",{className:"mt-1.5 text-xs text-page-foreground/70",children:[Math.round(y),"% complete"]})]})}const Ut="Continued without confirming a photo ID";function cm({legalName:e,legalNameConfirmedAt:t,onNameConfirmed:n,onVerified:r,onDefer:o,done:l=!1,simulated:i=!1,deferred:a=!1,allowRecheck:c=!1}){const d=Xt(Ei),m=Xt(_i),u=Xt(Wi),[h,p]=f.useState("checking"),[y,g]=f.useState(""),[b,C]=f.useState(!1),[w,v]=f.useState(""),[N,j]=f.useState(""),[S,D]=f.useState(!1),[I,E]=f.useState(!1),[_,M]=f.useState(e),[V,H]=f.useState(!1),[z,X]=f.useState(!1),[B,W]=f.useState(0),[P,U]=f.useState(!1),$=l&&!P,de=f.useRef(0),ve=f.useRef(!1),be=f.useRef(!1),fe=f.useRef(null),ge=f.useRef(0),me=ai();f.useEffect(()=>{let k=!0;return d({data:{environment:me}}).then(q=>{if(k){if(q.simulated){p("sim");return}if(q.ready){p("live");return}g(q.problem||"ID verification isn't available on this site yet."),p("blocked")}}).catch(()=>{k&&(g("We couldn't reach the ID verification service. Reload this page and try again."),p("blocked"))}),()=>{k=!1}},[me,d]);const R=f.useCallback(()=>{fe.current&&(clearInterval(fe.current),fe.current=null)},[]);f.useCallback(()=>{R(),fe.current=setInterval(()=>{const k=Math.floor((Date.now()-de.current)/1e3);ge.current=k,W(k)},1e3)},[R]),f.useEffect(()=>{V&&(B<60||z||X(!0))},[B,z,V]);const K=f.useCallback(async()=>{if(!be.current)try{const k=await u({data:{environment:me}});if(be.current)return;if(k.status==="verified"){be.current=!0,ve.current=!1,R(),H(!1),r({simulated:!1});return}if(k.status==="practice_only"){R(),H(!1),j("The ID check on your account was a practice one, so it doesn't count here. Run the real check to continue.");return}(k.status==="canceled"||k.status==="requires_input")&&(ge.current>=30||k.status==="canceled"&&ge.current>=10)&&(R(),H(!1),j(k.status==="canceled"?"The ID check was cancelled before it finished. Start it again and follow the on-screen steps.":"We lost track of that ID check. Start it again and keep this page open until Stripe's window appears."))}catch{}},[u,r,R,me]);f.useEffect(()=>{h==="live"&&($||P||K())},[h,$,P,K]),f.useEffect(()=>{if(h!=="live"||!V)return;K();const k=setInterval(()=>{K()},2500),q=setTimeout(()=>{R(),H(!1),ve.current=!1,j("We didn't get a result back from Stripe in time. Please try again, or continue and confirm your identity later.")},18e4);return()=>{clearInterval(k),clearTimeout(q)}},[K,V,h,R]),f.useEffect(()=>()=>R(),[R]),f.useEffect(()=>{const k=()=>{document.visibilityState==="visible"&&ve.current&&K()};return document.addEventListener("visibilitychange",k),window.addEventListener("focus",k),()=>{document.removeEventListener("visibilitychange",k),window.removeEventListener("focus",k)}},[K]);const ie=async()=>{if(x){C(!0),j("");try{const k=await m({data:{environment:me,returnUrl:`${ii()}/identity-return`}});if(k.error){j(`${k.error} You can continue with your questions now and try the ID check again later.`);return}if(k.simulated){p("sim");return}if(!k.url){j("Stripe didn't return a verification page. Please try again.");return}de.current=Date.now(),ge.current=0,W(0),H(!0),ve.current=!0,v(k.url),window.location.assign(k.url)}catch(k){j(k instanceof Error?k.message:"Couldn't start the ID check.")}finally{C(!1)}}},x=!!t,O=()=>{const k=_.trim();!k||!n||(E(!1),n(k))},T=n?s.jsxs("div",{className:"space-y-2 rounded-lg border border-page-foreground/15 bg-page-foreground
6/5 p-4",children:[s.jsxs("p",{className:"text-sm font-medium text-page-foreground",children:["Name on your application:"," ",s.jsx("span",{className:"font-semibold",children:e.trim()||"Not set"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This must match the name on your photo ID exactly."}),I?s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(it,{value:_,onChange:k=>M(k.target.value),placeholder:"Your full legal name",className:"h-9 max-w-xs bg-background",autoFocus:!0}),s.jsx(Z,{type:"button",size:"sm",className:"h-9",onClick:O,disabled:!_.trim(),children:"Save"}),s.jsx(Z,{type:"button",size:"sm",variant:"ghost",className:"h-9",onClick:()=>{M(e),E(!1)},children:"Cancel"})]}):x?s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-emerald-700",children:[s.jsx(tn,{className:"h-3.5 w-3.5"}),"Confirmed â matches your photo ID."]}),s.jsx(Z,{type:"button",size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>{M(e),E(!0)},children:"Correct it"})]}):s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Z,{type:"button",size:"sm",variant:"outline",className:"h-8",onClick:()=>{const k=e.trim();k?n(k):E(!0)},children:"That's my legal name"}),s.jsx(Z,{type:"button",size:"sm",variant:"ghost",className:"h-8",onClick:()=>{M(e),E(!0)},children:"Correct it"})]})]}):null;return $?s.jsx(Rt,{className:"border-emerald-300/60 bg-emerald-50/50",children:s.jsxs(It,{className:"space-y-2 pt-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(tn,{className:"h-6 w-6 shrink-0 text-emerald-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-emerald-900",children:"Your identity is confirmed"}),s.jsx("p",{className:"text-sm text-emerald-800",children:"Your photo ID has been verified. Your URA shows this as verified."})]})]}),i&&s.jsx("p",{className:"text-xs text-amber-800",children:"This result came from our practice flow, so it is not a real ID confirmation."}),c&&s.jsxs("div",{className:"pt-1",children:[s.jsx(Z,{type:"button",variant:"outline",size:"sm",onClick:()=>U(!0),children:"Run a new ID check"}),s.jsx("p",{className:"mt-1 text-xs text-emerald-800/80",children:"Your confirmed result stays in place until the new check finishes. There is no charge for the ID check."})]})]})}):h==="checking"?s.jsx(Rt,{children:s.jsxs(It,{className:"flex items-center gap-3 pt-6",children:[s.jsx(gt,{className:"h-5 w-5 animate-spin text-brand"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking the ID serviceâ¦"})]})}):h==="sim"?s.jsxs("div",{className:"space-y-3",children:[T,s.jsx("div",{className:x?"":"pointer-events-none opacity-50",children:s.jsx(lm,{onComplete:()=>r({simulated:!0})})}),o&&!S&&s.jsx(Z,{type:"button",variant:"ghost",size:"sm",onClick:()=>D(!0),children:"Not now â continue with my questions"}),S&&s.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-300/70 bg-amber-50/70 p-4",children:[s.jsx("p",{className:"text-sm font-medium text-amber-950",children:"You can continue, but your landlord will see your ID as not yet verified."}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Z,{type:"button",size:"sm",variant:"outline",className:"border-amber-400 text-amber-950 hover:bg-amber-100",onClick:()=>o?.(Ut),children:"Continue without confirming"}),s.jsx(Z,{type:"button",size:"sm",variant:"ghost",onClick:()=>D(!1),children:"Back"})]})]})]}):h==="blocked"?s.jsx(Rt,{className:"border-amber-300/60 bg-amber-50/40",children:s.jsx(It,{className:"space-y-4 pt-6",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(en,{className:"mt-0.5 h-5 w-5 shrink-0 text-amber-600"}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"font-medium text-amber-950",children:"Photo ID confirmation isn't available here right now"}),s.jsx("p",{className:"text-sm text-amber-900",children:y}),s.jsx("p",{className:"text-sm text-amber-900",children:"The ID check must be completed before you can begin your application questions. Try again here when the service is available."})]})]})})}):s.jsxs(Rt,{className:"border-brand/30 bg-gradient-to-br from-brand/5 to-transparent",children:[s.jsxs(Vs,{children:[s.jsxs(qs,{className:"flex items-center gap-2 text-lg",children:[s.jsx(To,{className:"h-5 w-5 text-brand"}),"Confirm your identity"]}),s.jsx(Us,{children:me==="live"?`Gravadee uses Stripe to check a government-issued photo ID and a live selfie against ${e.trim()?e.trim():"the name on your application"}
6. This helps ensure the identity information you submit corresponds with your ID and confirms to a landlord that the application belongs to you.`:"You are on the preview site, so this runs Stripe's practice mode with test documents. Real renters on gravadee.com run the live check."})]}),s.jsxs(It,{className:"space-y-4",children:[s.jsx("p",{className:"rounded-lg border border-page-foreground/15 bg-page-foreground/5 p-3 text-sm leading-relaxed text-muted-foreground",children:"There is no charge for the ID check. If you withdraw before payment, you owe nothing. Payment is required only if you decide to share or distribute your application."}),a&&s.jsx("p",{className:"rounded-lg border border-page-foreground/15 bg-page-foreground/5 p-3 text-xs text-muted-foreground",children:"You continued earlier without confirming your ID. You can do it now, or later from your account page."}),T,V?s.jsxs("div",{className:"space-y-3 rounded-lg border border-brand/30 bg-brand/5 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{className:"h-4 w-4 animate-spin text-brand"}),s.jsx("p",{className:"text-sm font-medium",children:"Stripe's ID check is open in another tab â this page is waiting for it to finish."})]}),s.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(Yi,{className:"h-3 w-3"}),"Waiting ",B<60?`${B} seconds`:`${Math.floor(B/60)} min`,B>=20&&B<45?" â this is normal. Stripe's page can take a minute or two while it reads your document.":"",B>=90&&B%15<2?" â still checking. Keep Stripe's window open, or close it and try again.":""]}),z&&s.jsxs("div",{className:"space-y-2 rounded-md border border-amber-300/70 bg-amber-50/80 p-3",children:[s.jsx("p",{className:"text-xs font-medium text-amber-950",children:"Still nothing after a minute? Finish on the device with your camera."}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Z,{type:"button",size:"sm",className:"h-8",onClick:ie,children:"Get the link for this device"}),s.jsx(Z,{type:"button",size:"sm",variant:"outline",className:"h-8",onClick:()=>{R(),H(!1),ve.current=!1,K()},children:"I've finished â check now"})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Z,{type:"button",size:"sm",variant:"outline",className:"h-8",onClick:()=>{K()},children:"Check again now"}),o&&s.jsx(Z,{type:"button",size:"sm",variant:"ghost",className:"h-8",onClick:()=>o(Ut),children:"Continue without confirming"})]})]}):w?s.jsxs("div",{className:"space-y-3",children:[s.jsx(qn,{children:s.jsx(Un,{children:"If the ID check page didn't open, use the button below. It opens in this same window and brings you back here when you're done."})}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Z,{asChild:!0,className:"gap-2",children:s.jsxs("a",{href:w,children:[s.jsx(Ao,{className:"h-4 w-4"}),"Start the ID check"]})}),s.jsx(Z,{type:"button",variant:"outline",onClick:()=>{K()},children:"I've finished â check now"}),o&&s.jsx(Z,{type:"button",variant:"ghost",onClick:()=>o(Ut),children:"Continue without confirming"})]})]}):s.jsxs("div",{className:"space-y-3",children:[N&&s.jsxs(qn,{variant:"destructive",children:[s.jsx(Bi,{className:"h-4 w-4"}),s.jsx(Gs,{children:"The ID check didn't finish"}),s.jsxs(Un,{className:"space-y-2",children:[s.jsx("p",{children:N}),s.jsxs("p",{className:"text-xs",children:["If it keeps happening, send the message above to"," ",s.jsx("a",{className:"underline underline-offset-2",href:"mailto:[email protected]",children:"[email protected]"})," ","and we'll fix it for you."]})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(Z,{type:"button",onClick:ie,disabled:b||!x,className:"gap-2",children:[b?s.jsx(gt,{className:"h-4 w-4 animate-spin"}):s.jsx(en,{className:"h-4 w-4"}),N?"Try the ID check again":"Verify my identity"]}),o&&s.jsx(Z,{type:"button",variant:"ghost",disabled:b,onClick:()=>D(!0),children:"Not now â continue with my questions"})]}),S&&o&&s.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-300/70 bg-amber-50/70 p-4",children:[s.jsx("p",{className:"text-sm font-medium text-amber-950",children:"You can continue, but your landlord will see your ID as not yet verified."}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Z,{type:"button",size:"sm",variant:"outline",className:"border-amber-400 text-amber-950 hover:bg-amber-100",onClick:()=>o(Ut),children:"Continue without confirming"}),s.jsx(Z,{type:"button",size:"sm",variant:"ghost",onClick:ie,children:"Verify n
6ow instead"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"We check the ID document and your face, and only keep the result â not the photos."})]}),o&&s.jsx("div",{children:s.jsxs(rr,{to:"/home",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[s.jsx(Do,{className:"h-3 w-3"}),"Back to where you started"]})})]})]})}function Gt(){return s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-success/10 px-2 py-0.5 text-xs font-semibold text-success",children:[s.jsx(Oo,{className:"size-3.5"})," Verified"]})}function Yn(){return s.jsx("span",{className:"inline-flex items-center rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:"Pending consent"})}function Ve({icon:e,title:t,badge:n,note:r,children:o}){return s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5 shadow-soft",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"flex size-9 items-center justify-center rounded-lg bg-accent text-accent-foreground",children:e}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"font-semibold text-foreground",children:t}),n]})]}),r?s.jsx("span",{className:"text-xs text-muted-foreground",children:r}):null]}),s.jsx("div",{className:"mt-3 space-y-2.5 pl-[3.1rem] text-sm text-muted-foreground",children:o})]})}function dm({step:e,onEdit:t}){return s.jsxs(Z,{size:"sm",className:"-my-1 h-7 shrink-0 gap-1.5 rounded-md bg-primary px-2.5 font-medium text-primary-foreground shadow-sm hover:bg-primary/90",onClick:()=>t(e),children:[s.jsx(Hi,{className:"size-4"})," Edit"]})}function we({step:e,onEdit:t,children:n}){return s.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-border/60 pb-2.5 last:border-0 last:pb-0",children:[s.jsx("div",{className:"min-w-0 flex-1 space-y-1",children:n}),s.jsx(dm,{step:e,onEdit:t})]})}const oe=({label:e,value:t,emptyLabel:n})=>t||n?s.jsxs("p",{children:[s.jsxs("span",{className:"text-muted-foreground",children:[e,": "]}),t?s.jsx("span",{className:"font-medium text-foreground",children:t}):s.jsx("span",{className:"italic text-muted-foreground",children:n})]}):null;function um({data:e,onEdit:t,onSubmit:n,onBack:r,onSaveAndContinue:o}){const l={renting:"Renting",own:"Own my home",family:"Living with family or friends",other:"Other"},i=li(e),a=[];return e.landlord?.name&&a.push(`${e.landlord.name} (current landlord)`),e.ownerReference?.name&&a.push(`${e.ownerReference.name} (character reference)`),e.tenantReference?.name&&a.push(`${e.tenantReference.name} (tenant reference)`),e.additionalReference?.name&&a.push(`${e.additionalReference.name} (additional)`),s.jsxs("div",{className:"mx-auto w-full max-w-[51rem] px-5 py-10",children:[s.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-widest text-page-foreground",children:"Review"}),s.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-page-foreground sm:text-3xl",children:"Review your application"}),s.jsx("p",{className:"mt-2 text-page-foreground/90",children:"Everything here is yours. Check it over, edit anything, then create your Universal Rental Application."}),s.jsxs("div",{className:"mt-7 space-y-4",children:[s.jsx(Ve,{icon:s.jsx(Oo,{className:"size-5"}),title:"Identity",badge:e.identityVerified?s.jsx(Gt,{}):s.jsx(Yn,{}),children:e.identityVerified?s.jsx("div",{className:"space-y-1",children:s.jsx(oe,{label:"Legal name",value:e.legalName})}):s.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-border/60 pb-2.5 last:border-0 last:pb-0",children:[s.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[s.jsx(oe,{label:"Legal name",value:e.legalName}),s.jsx("p",{children:"Not yet verified â your application will be shared as âidentity not verifiedâ until you complete the ID check on your account page."})]}),s.jsx(Z,{asChild:!0,variant:"ghost",size:"sm",className:"shrink-0 text-primary",children:s.jsx(rr,{to:"/account",hash:"verify",children:"Verify"})})]})}),s.jsxs(Ve,{icon:s.jsx(zi,{className:"size-5"}),title:"Residence",children:[s.jsx(we,{step:"current-address",onEdit:t,children:s.jsx(oe,{label:"Current address",value:pt({street:e.currentAddressStreet,city:e.currentAddressCity,state:e.currentAddressState,zip:e.currentAddressZip})||e.currentAddress})}),s.jsx(we,{step:"time-at-address",onEdit:t,children:s.jsx(oe,{label:"Time there",value:ci(e)})}),i&&s.jsx(we,{step:"prior-address",onEdit:t,children:s.jsx(oe,{label:"Prior address",value:pt({street:e.priorAddressStreet,city:e.priorAddressCity,state:e.priorAddressState,zip:e.priorAddressZip})||e.priorAddress||"Not added"})}),s.jsx(we,{step:"housing-status",onEdit:t,children:s.jsx(oe,{label:"Housing",value:e.housingStatus&&l[e.housingStatus]})}),s.jsxs(we,{step:"references",onEdit:t,children:[s.jsx(oe,{label:"Current rent",value:e.currentRent}),s.jsx(oe,{label:"Payment record",value:di(e.paymentHistory),emptyLabel:"Not verified yet"}),s.jsx(oe,{label:"Rent paid to",value:e.rentPayee}),s.jsx(oe,{label:"How rent is paid",value:e.rentPaymentMethod?ui(e.rentPaymentMethod):void 0,emptyLabel:"Not verified yet"})]}),s.jsx(we,{step:"move-in",onEdit:t,children:s.jsx(oe,{label:"Move-in",value:e.moveInFlexible?"Flexible":e.moveInDate?new Date(e.moveInDate).toLocaleDateString():void 0})})]}),s.jsx(Ve,{icon:s.jsx($i,{className:"size-5"}),title:"Income",badge:e.incomeConnected?s.jsx(Gt,{}):void 0,children:e.incomeConnected?s.jsxs("div",{className:"space-y-1",children:[s.jsx(oe,{label:"Employer",value:e.employer}),s.jsx(oe,{label:"Income band",value:fi(e.incomeBand)}),s.jsx(oe,{label:"Income",value:e.incomeVerifiedAt?`Verified ${new Date(e.incomeVerifiedAt).toLocaleDateString()}`:"Verified"}),e.incomeVerificationToken&&s.jsx(oe,{label:"Verification ref",value:e.incomeVerificationToken}),(e.additionalIncomes??[]).filter(c=>c.verified).map((c,d)=>s.jsx(oe,{label:`Additional income ${d+1}
6`,value:[c.source,"Verified"].filter(Boolean).join(" â ")},c.id))]}):s.jsx(we,{step:"income-type",onEdit:t,children:s.jsx("p",{children:"Connection pending â use Edit to connect your income."})})}),e.savingsVerified&&s.jsx(Ve,{icon:s.jsx(ul,{className:"size-5"}),title:"Additional Financial Info",badge:s.jsx(Gt,{}),children:s.jsx(oe,{label:"Supporting financial info",value:"Verified"})}),s.jsxs(Ve,{icon:s.jsx(Rr,{className:"size-5"}),title:"References",badge:a.length?s.jsx(Yn,{}):void 0,children:[s.jsx(we,{step:"references",onEdit:t,children:a.length?a.map(c=>s.jsx("p",{className:"font-medium text-foreground",children:c},c)):s.jsx("p",{children:"None added"})}),s.jsx(we,{step:"additional-reference",onEdit:t,children:s.jsx(oe,{label:"Additional reference",value:e.additionalReference?.name||"None added"})})]}),s.jsxs(Ve,{icon:s.jsx(Rr,{className:"size-5"}),title:"Household",children:[s.jsxs(we,{step:"occupants",onEdit:t,children:[s.jsx(oe,{label:"Occupants",value:e.occupantsCount}),s.jsx(oe,{label:"Other adults",value:e.otherAdults})]}),s.jsxs(we,{step:"smoking-vehicles",onEdit:t,children:[s.jsx(oe,{label:"Smoking",value:e.smokingHousehold?e.smokingHousehold==="yes"?"Non-smoking":"Smoker in household":void 0}),s.jsx(oe,{label:"Vehicles",value:e.vehicles})]})]}),s.jsx(Ve,{icon:s.jsx(cl,{className:"size-5"}),title:"Pets",children:s.jsx(we,{step:"pets",onEdit:t,children:e.hasPets==="yes"?s.jsx("p",{className:"whitespace-pre-line font-medium text-foreground",children:e.pets||"Has pets"}):s.jsx("p",{children:"No pets"})})}),s.jsxs(Ve,{icon:s.jsx(ml,{className:"size-5"}),title:"Rental fit",children:[s.jsxs(we,{step:"rental-fit",onEdit:t,children:[s.jsx(oe,{label:"Reason for moving",value:e.reasonForMoving}),s.jsx(oe,{label:"Lease term",value:go.find(c=>c.value===e.leaseTerm)?.label}),s.jsx(oe,{label:"Renters insurance",value:e.rentersInsurance?e.rentersInsurance==="yes"?"Willing":"Not willing":void 0})]}),s.jsx(we,{step:"applying-address",onEdit:t,children:s.jsx(oe,{label:"Intended rental",value:e.includeTargetAddress==="yes"?e.targetAddress||pt({street:e.targetAddressStreet,city:e.targetAddressCity,state:e.targetAddressState,zip:e.targetAddressZip}):void 0,emptyLabel:"Not included"})})]}),s.jsxs(Ve,{icon:s.jsx(en,{className:"size-5"}),title:"Screening & consent",badge:e.certified?s.jsx(Gt,{}):s.jsx(Yn,{}),children:[s.jsx(we,{step:"eviction-history",onEdit:t,children:s.jsx(oe,{label:"Eviction / lease-break",value:e.evictionHistory?e.evictionHistory==="yes"?e.evictionNote||"Yes":"None reported":void 0})}),s.jsx(we,{step:"screening-consent",onEdit:t,children:s.jsx(oe,{label:"Certification",value:e.certified?"Self-reported answers certified true and complete to the best of my knowledge":"Not certified"})})]})]}),s.jsxs("div",{className:"mt-9 flex flex-col-reverse gap-3 sm:flex-row sm:items-center",children:[s.jsx(Z,{variant:"ghost",size:"lg",onClick:r,className:"text-page-foreground hover:text-page-foreground hover:bg-white/10",children:"Back"}),s.jsx("div",{className:"hidden flex-1 sm:block"}),o&&s.jsx(Z,{variant:"outline",size:"lg",onClick:o,className:"border-page-foreground/30 bg-page-foreground/10 text-page-foreground hover:bg-page-foreground/20 hover:text-page-foreground",children:"Save & continue later"}),s.jsxs(Z,{size:"lg",onClick:n,className:"w-full py-6 text-lg font-semibold sm:w-auto sm:min-w-[22rem] sm:px-12",children:[s.jsx(pl,{className:"size-5"})," Create my URA"]})]}),!e.certified&&s.jsx("p",{className:"mt-3 text-right text-xs text-page-foreground/80",children:"You can finish without certifying. Certification covers only the answers you entered yourself. Permission for screening is requested separately when you share with a specific landlord."}),s.jsx("div",{className:"h-48","aria-hidden":!0})]})}function lo(e,[t,n]){return Math.min(n,Math.max(t,e))}function fm(e){const t=mm(e),n=f.forwardRef((r,o)=>{const{children:l,...i}=r,a=f.Children.toArray(l),c=a.find(pm);if(c){const d=c.props.children,m=a.map(u=>u===c?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return s.jsx(t,{...i,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,m):null})}return s.jsx(t,{...i,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function mm(e){const t=f.forwardRef((n,r)=>{const{children:o,...l}=n;if(f.isValidElement(o)){const i=xm(o),a=gm(l,o.props);return o.type!==f.Fragment&&(a.ref=r?ho(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hm=Symbol("radix.slottable");function pm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hm}function gm(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...a)=>{const c=l(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}
vendor: 4,387 bytes, line 6
6:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function xm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var na=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ym="VisuallyHidden",vm=f.forwardRef((e,t)=>s.jsx(ye.span,{...e,ref:t,style:{...na,...e.style}}));vm.displayName=ym;var bm=[" ","Enter","ArrowUp","ArrowDown"],wm=[" ","Enter"],ct="Select",[yn,vn,Nm]=Qi(ct),[St]=sr(ct,[Nm,gn]),bn=gn(),[Cm,nt]=St(ct),[Sm,jm]=St(ct),ra=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:i,defaultValue:a,onValueChange:c,dir:d,name:m,autoComplete:u,disabled:h,required:p,form:y}=e,g=bn(t),[b,C]=f.useState(null),[w,v]=f.useState(null),[N,j]=f.useState(!1),S=Xi(d),[D,I]=Bn({prop:r,defaultProp:o??!1,onChange:l,caller:ct}),[E,_]=Bn({prop:i,defaultProp:a,onChange:c,caller:ct}),M=f.useRef(null),V=b?y||!!b.closest("form"):!0,[H,z]=f.useState(new Set),X=Array.from(H).map(B=>B.props.value).join(";");return s.jsx(Ps,{...g,children:s.jsxs(Cm,{required:p,scope:t,trigger:b,onTriggerChange:C,valueNode:w,onValueNodeChange:v,valueNodeHasChildren:N,onValueNodeHasChildrenChange:j,contentId:cn(),value:E,onValueChange:_,open:D,onOpenChange:I,dir:S,triggerPointerDownPosRef:M,disabled:h,children:[s.jsx(yn.Provider,{scope:t,children:s.jsx(Sm,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(B=>{z(W=>new Set(W).add(B))},[]),onNativeOptionRemove:f.useCallback(B=>{z(W=>{const P=new Set(W);return P.delete(B),P})},[]),children:n})}),V?s.jsxs(Da,{"aria-hidden":!0,required:p,tabIndex:-1,name:m,autoComplete:u,value:E,onChange:B=>_(B.target.value),disabled:h,form:y,children:[E===void 0?s.jsx("option",{value:""}):null,Array.from(H)]},X):null]})})};ra.displayName=ct;var oa="SelectTrigger",sa=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,l=bn(n),i=nt(oa,n),a=i.disabled||r,c=Se(t,i.onTriggerChange),d=vn(n),m=f.useRef("touch"),[u,h,p]=Oa(g=>{const b=d().filter(v=>!v.disabled),C=b.find(v=>v.value===i.value),w=Pa(b,g,C);w!==void 0&&i.onValueChange(w.value)}),y=g=>{a||(i.onOpenChange(!0),p()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return s.jsx(Cr,{asChild:!0,...l,children:s.jsx(ye.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ma(i.value)?"":void 0,...o,ref:c,onClick:ue(o.onClick,g=>{g.currentTarget.focus(),m.current!=="mouse"&&y(g)}),onPointerDown:ue(o.onPointerDown,g=>{m.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:ue(o.onKeyDown,g=>{const b=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&bm.includes(g.key)&&(y(),g.preventDefault())})})})});sa.displayName=oa;var aa="SelectValue",ia=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:l,placeholder:i="",...a}=e,c=nt(aa,n),{onValueNodeHasChildrenChange:d}=c,m=l!==void 0,u=Se(t,c.onValueNodeChange);return $e(()=>{d(m)},[d,m]),s.jsx(ye.span,{...a,ref:u,style:{pointerEvents:"none"},children:Ma(c.value)?s.jsx(s.Fragment,{children:i}):l})});ia.displayName=aa;var km="SelectIcon",la=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return s.jsx(ye.span,{"aria-hidden":!0,...o,ref:t,children:r||"â¼"})});la.displayName=km;var Dm="SelectPortal",ca=e=>s.jsx(wo,{asChild:!0,...e});ca.displayName=Dm;var dt="SelectContent",da=f.forwardRef((e,t)=>{const n=nt(dt,e.__scopeSelect),[r,o]=f.useState();if($e(()=>{o(new DocumentFragment)},[]),!n.open){const l=r;return l?nr.createPortal(s.jsx(ua,{scope:e.__scopeSelect,children:s.jsx(yn.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),l):null}return s.jsx(fa,{...e,ref:t})});da.displayName=dt;var Re=10,[ua,rt]=St(dt),Mm="SelectContentImpl",Om=fm("SelectContent.RemoveScroll"),fa=f.forwardRef((e,t)=>
vendor: 15,390 bytes, line 6
6{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:i,side:a,sideOffset:c,align:d,alignOffset:m,arrowPadding:u,collisionBoundary:h,collisionPadding:p,sticky:y,hideWhenDetached:g,avoidCollisions:b,...C}=e,w=nt(dt,n),[v,N]=f.useState(null),[j,S]=f.useState(null),D=Se(t,R=>N(R)),[I,E]=f.useState(null),[_,M]=f.useState(null),V=vn(n),[H,z]=f.useState(!1),X=f.useRef(!1);f.useEffect(()=>{if(v)return No(v)},[v]),So();const B=f.useCallback(R=>{const[K,...ie]=V().map(T=>T.ref.current),[x]=ie.slice(-1),O=document.activeElement;for(const T of R)if(T===O||(T?.scrollIntoView({block:"nearest"}),T===K&&j&&(j.scrollTop=0),T===x&&j&&(j.scrollTop=j.scrollHeight),T?.focus(),document.activeElement!==O))return},[V,j]),W=f.useCallback(()=>B([I,v]),[B,I,v]);f.useEffect(()=>{H&&W()},[H,W]);const{onOpenChange:P,triggerPointerDownPosRef:U}=w;f.useEffect(()=>{if(v){let R={x:0,y:0};const K=x=>{R={x:Math.abs(Math.round(x.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(x.pageY)-(U.current?.y??0))}},ie=x=>{R.x<=10&&R.y<=10?x.preventDefault():v.contains(x.target)||P(!1),document.removeEventListener("pointermove",K),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ie,{capture:!0})}}},[v,P,U]),f.useEffect(()=>{const R=()=>P(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[P]);const[$,de]=Oa(R=>{const K=V().filter(O=>!O.disabled),ie=K.find(O=>O.ref.current===document.activeElement),x=Pa(K,R,ie);x&&setTimeout(()=>x.ref.current.focus())}),ve=f.useCallback((R,K,ie)=>{const x=!X.current&&!ie;(w.value!==void 0&&w.value===K||x)&&(E(R),x&&(X.current=!0))},[w.value]),be=f.useCallback(()=>v?.focus(),[v]),fe=f.useCallback((R,K,ie)=>{const x=!X.current&&!ie;(w.value!==void 0&&w.value===K||x)&&M(R)},[w.value]),ge=r==="popper"?Gn:ma,me=ge===Gn?{side:a,sideOffset:c,align:d,alignOffset:m,arrowPadding:u,collisionBoundary:h,collisionPadding:p,sticky:y,hideWhenDetached:g,avoidCollisions:b}:{};return s.jsx(ua,{scope:n,content:v,viewport:j,onViewportChange:S,itemRefCallback:ve,selectedItem:I,onItemLeave:be,itemTextRefCallback:fe,focusSelectedItem:W,selectedItemText:_,position:r,isPositioned:H,searchRef:$,children:s.jsx(Co,{as:Om,allowPinchZoom:!0,children:s.jsx(jo,{asChild:!0,trapped:w.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:ue(o,R=>{w.trigger?.focus({preventScroll:!0}),R.preventDefault()}),children:s.jsx(ko,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:i,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:s.jsx(ge,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:R=>R.preventDefault(),...C,...me,onPlaced:()=>z(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ue(C.onKeyDown,R=>{const K=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!K&&R.key.length===1&&de(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let x=V().filter(O=>!O.disabled).map(O=>O.ref.current);if(["ArrowUp","End"].includes(R.key)&&(x=x.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const O=R.target,T=x.indexOf(O);x=x.slice(T+1)}setTimeout(()=>B(x)),R.preventDefault()}})})})})})})});fa.displayName=Mm;var Pm="SelectItemAlignedPosition",ma=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,l=nt(dt,n),i=rt(dt,n),[a,c]=f.useState(null),[d,m]=f.useState(null),u=Se(t,D=>m(D)),h=vn(n),p=f.useRef(!1),y=f.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:C,focusSelectedItem:w}=i,v=f.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&d&&g&&b&&C){const D=l.trigger.getBoundingClientRect(),I=d.getBoundingClientRect(),E=l.valueNode.getBoundingClientRect(),_=C.getBoundingClientRect();if(l.dir!=="rtl"){const O=_.left-I.left,T=E.left-O,k=D.left-T,q=D.width+k,Ae=Math.max(q,I.width),ae=window.innerWidth-Re,J=lo(T,[Re,Math.max(Re,ae-Ae)]);a.style.minWidth=q+"px",a.style.left=J+"px"}else{const O=I.right-_.right,T=window.innerWidth-E.right-O,k=window.innerWidth-D.right-T,q=D.width+k,Ae=Math.max(q,I.width),ae=window.innerWidth-Re,J=lo(T,[Re,Math.max(Re,ae-Ae)]);a.style.minWidth=q+"px",a.style.right=J+"px"}const M=h(),V=window.innerHeight-Re*2,H=g.scrollHeight,z=window.getComputedStyle(d),X=parseInt(z.borderTopWidth,10),B=parseInt(z.paddingTop,10),W=parseInt(z.borderBottomWidth,10),P=parseInt(z.paddingBottom,10),U=X+B+H+P+W,$=Math.min(b.offsetHeight*5,U),de=window.getComputedStyle(g),ve=parseInt(de.paddingTop,10),be=parseInt(de.paddingBottom,10),fe=D.top+D.height/2-Re,ge=V-fe,me=b.offsetHeight/2,R=b.offsetTop+me,K=X+B+R,ie=U-K;if(K<=fe){const O=M.length>0&&b===M[M.length-1].ref.current;a.style.bottom="0px";const T=d.clientHeight-g.offsetTop-g.offsetHeight,k=Math.max(ge,me+(O?be:0)+T+W),q=K+k;a.style.height=q+"px"}else{const O=M.length>0&&b===M[0].ref.current;a.style.top="0px";const k=Math.max(fe,X+g.offsetTop+(O?ve:0)+me)+ie;a.style.height=k+"px",g.scrollTop=K-fe+g.offsetTop}a.style.margin=`${Re}px 0`,a.style.minHeight=$+"px",a.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,l.trigger,l.valueNode,a,d,g,b,C,l.dir,r]);$e(()=>v(),[v]);const[N,j]=f.useState();$e(()=>{d&&j(window.getComputedStyle(d).zIndex)},[d]);const S=f.useCallback(D=>{D&&y.current===!0&&(v(),w?.(),y.current=!1)},[v,w]);return s.jsx(Tm,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(ye.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ma.displayName=Pm;var Am="SelectPopperPosition",Gn=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Re,...l}=e,i=bn(n);return s.jsx(As,{...i,...l,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Gn.displayName=Am;var[Tm,Dr]=St(dt,{}),Zn="SelectViewport",ha=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,l=rt(Zn,n),i=Dr(Zn,n),a=Se(t,l.onViewportChange),c=f.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(yn.Slot,{scope:n,children:s.jsx(ye.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ue(o.onScroll,d=>{const m=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=i;if(h?.current&&u){const p=Math.abs(c.current-m.scrollTop);if(p>0){const y=window.innerHeight-Re*2,g=parseFloat(u.style.minHeight),b=parseFloat(u.style.height),C=Math.max(g,b);if(C<y){const w=C+p,v=Math.min(y,w),N=w-v;u.style.height=v+"px",u.style.bottom==="0px"&&(m.scrollTop=N>0?N:0,u.style.justifyContent="flex-end")}}}c.current=m.scrollTop})})})]})});ha.displayName=Zn;var pa="SelectGroup",[Rm,Im]=St(pa),Em=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cn();return s.jsx(Rm,{scope:n,id:o,children:s.jsx(ye.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Em.displayName=pa;var ga="SelectLabel",xa=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Im(ga,n);return s.jsx(ye.div,{id:o.id,...r,ref:t})});xa.displayName=ga;var ln="SelectItem",[_m,ya]=St(ln),va=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:l,...i}=e,a=nt(ln,n),c=rt(ln,n),d=a.value===r,[m,u]=f.useState(l??""),[h,p]=f.useState(!1),y=Se(t,w=>c.itemRefCallback?.(w,r,o)),g=cn(),b=f.useRef("touch"),C=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(_m,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:f.useCallback(w=>{u(v=>v||(w?.textContent??"").trim())},[]),children:s.jsx(yn.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:s.jsx(ye.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:ue(i.onFocus,()=>p(!0)),onBlur:ue(i.onBlur,()=>p(!1)),onClick:ue(i.onClick,()=>{b.current!=="mouse"&&C()}),onPointerUp:ue(i.onPointerUp,()=>{b.current==="mouse"&&C()}),onPointerDown:ue(i.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:ue(i.onPointerMove,w=>{b.current=w.pointerType,o?c.onItemLeave?.():b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ue(i.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(wm.includes(w.key)&&C(),w.key===" "&&w.preventDefault())})})})})});va.displayName=ln;var Et="SelectItemText",ba=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...l}=e,i=nt(Et,n),a=rt(Et,n),c=ya(Et,n),d=jm(Et,n),[m,u]=f.useState(null),h=Se(t,C=>u(C),c.onItemTextChange,C=>a.itemTextRefCallback?.(C,c.value,c.disabled)),p=m?.textContent,y=f.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return $e(()=>(g(y),()=>b(y)),[g,b,y]),s.jsxs(s.Fragment,{children:[s.jsx(ye.span,{id:c.textId,...l,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?nr.createPortal(l.children,i.valueNode):null]})});ba.displayName=Et;var wa="SelectItemIndicator",Na=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ya(wa,n).isSelected?s.jsx(ye.span,{"aria-hidden":!0,...r,ref:t}):null});Na.displayName=wa;var Kn="SelectScrollUpButton",Ca=f.forwardRef((e,t)=>{const n=rt(Kn,e.__scopeSelect),r=Dr(Kn,e.__scopeSelect),[o,l]=f.useState(!1),i=Se(t,r.onScrollButtonChange);return $e(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollTop>0;l(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?s.jsx(ja,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Ca.displayName=Kn;var Xn="SelectScrollDownButton",Sa=f.forwardRef((e,t)=>{const n=rt(Xn,e.__scopeSelect),r=Dr(Xn,e.__scopeSelect),[o,l]=f.useState(!1),i=Se(t,r.onScrollButtonChange);return $e(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollHeight-c.clientHeight,m=Math.ceil(c.scrollTop)<d;l(m)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?s.jsx(ja,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Sa.displayName=Xn;var ja=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,l=rt("SelectScrollButton",n),i=f.useRef(null),a=vn(n),c=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),$e(()=>{a().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),s.jsx(ye.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ue(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(o.onPointerMove,()=>{l.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(o.onPointerLeave,()=>{c()})})}),Wm="SelectSeparator",ka=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(ye.div,{"aria-hidden":!0,...r,ref:t})});ka.displayName=Wm;var Qn="SelectArrow",Fm=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bn(n),l=nt(Qn,n),i=rt(Qn,n);return l.open&&i.position==="popper"?s.jsx(Ts,{...o,...r,ref:t}):null});Fm.displayName=Qn;var Ym="SelectBubbleInput",Da=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),l=Se(r,o),i=Oi(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&m){const u=new Event("change",{bubbles:!0});m.call(a,t),a.dispatchEvent(u)}},[i,t]),s.jsx(ye.select,{...n,style:{...na,...n.style},ref:l,defaultValue:t})});Da.displayName=Ym;function Ma(e){return e===""||e===void 0}function Oa(e){const t=bo(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const a=n.current+i;t(a),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),l=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function Pa(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let i=Bm(e,Math.max(l,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Bm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zm=ra,Aa=sa,$m=ia,Hm=la,Lm=ca,Ta=da,Vm=ha,Ra=xa,Ia=va,qm=ba,Um=Na,Ea=Ca,_a=Sa,Wa=ka;const co=zm,uo=$m,Jn=f.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Aa,{ref:r,className:Y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background cursor-pointer data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(Hm,{asChild:!0,children:s.jsx(or,{className:"h-4 w-4 opacity-50"})})]}));Jn.displayName=Aa.displayName;const Fa=f.forwardRef(({className:e,...t},n)=>s.jsx(Ea,{ref:n,className:Y("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(ki,{className:"h-4 w-4"})}));Fa.displayName=Ea.displayName;const Ya=f.forwardRef(({className:e,...t},n)=>s.jsx(_a,{ref:n,className:Y("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(or,{className:"h-4 w-4"})}));Ya.displayName=_a.displayName;const er=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>s.jsx(Lm,{children:s.jsxs(Ta,{ref:o,className:Y("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
6de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(Fa,{}),s.jsx(Vm,{className:Y("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(Ya,{})]})}));er.displayName=Ta.displayName;const Gm=f.forwardRef(({className:e,...t},n)=>s.jsx(Ra,{ref:n,className:Y("px-2 py-1.5 text-sm font-semibold",e),...t}));Gm.displayName=Ra.displayName;const tr=f.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Ia,{ref:r,className:Y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Um,{children:s.jsx(Jt,{className:"h-4 w-4"})})}),s.jsx(qm,{children:t})]}));tr.displayName=Ia.displayName;const Zm=f.forwardRef(({className:e,...t},n)=>s.jsx(Wa,{ref:n,className:Y("-mx-1 my-1 h-px bg-muted",e),...t}));Zm.displayName=Wa.displayName;const Km=Array.from({length:31},(e,t)=>t),Xm=Array.from({length:12},(e,t)=>t),fo="h-14 w-full rounded-xl border-2 border-page-foreground/30 bg-white/10 px-4 text-base text-page-foreground";function Qm({since:e,onChange:t}){const n=mi(e),[r,o]=f.useState(n!=null?String(Math.min(30,Math.floor(n/12))):""),[l,i]=f.useState(n!=null?String(n%12):"");return f.useEffect(()=>{if(r===""||l==="")return;const a=Number(r),c=Number(l);t(hi(a,c),pi(a*12+c))},[r,l]),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-sm font-semibold text-page-foreground",children:"Years"}),s.jsxs(co,{value:r,onValueChange:o,children:[s.jsx(Jn,{className:fo,"aria-label":"Years",children:s.jsx(uo,{placeholder:"Years"})}),s.jsx(er,{children:Km.map(a=>s.jsx(tr,{value:String(a),children:a===30?"30+":a},a))})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-sm font-semibold text-page-foreground",children:"Months"}),s.jsxs(co,{value:l,onValueChange:i,children:[s.jsx(Jn,{className:fo,"aria-label":"Months",children:s.jsx(uo,{placeholder:"Months"})}),s.jsx(er,{children:Xm.map(a=>s.jsx(tr,{value:String(a),children:a},a))})]})]})]}),s.jsx("p",{className:"text-sm text-page-foreground/75",children:"Your time at this address updates automatically as time passes. If you enter 2 years and 1 month today, your URA will read 2 years and 2 months a month from now."})]})}function Zt(e){return e.replace(/\D/g,"").slice(0,5)}function Jm({startStepOverride:e,returnTo:t,editField:n}={}){const r=gi(),{user:o}=xi(),{active:l,isTestUser:i}=po(),[a,c]=f.useState(kn),[d,m]=f.useState("verify-identity"),[u,h]=f.useState(!1),[p,y]=f.useState(!1),[g,b]=f.useState(!1),[C,w]=f.useState("idle"),[v,N]=f.useState(!1),[j,S]=f.useState(!1),D=f.useRef(null),I=f.useRef(null);f.useEffect(()=>{v&&D.current&&d!==D.current&&N(!1)},[d,v]);const E=f.useMemo(()=>yi(a),[a]);f.useEffect(()=>{let x=!1;const O=Si(),T=[O.first,O.last].filter(Boolean).join(" ").trim();return(async()=>{if(!On()){try{await Promise.race([Po({allowWhenDisabled:!0,force:!0,preferCloud:!0}),new Promise(J=>setTimeout(J,1500))])}catch{}if(x)return}const q=On(),Ae="housing-status",ae=jt(e&&e!=="welcome"?e:q&&(q.done||kt(q.data))?Ae:q?.current&&q.current!=="welcome"?q.current:"verify-identity");if(q){const J=q.data.identityVerified?ae:"verify-identity";if(c(q.data.legalName?.trim()||!T?q.data:{...q.data,legalName:T}),m(J),e&&e!=="welcome"){const le=jt(q.current);I.current=le&&le!=="welcome"&&le!==J?le:null}const xe=!!q.done||kt(q.data);y(xe),!e&&!xe&&J!=="review"&&(D.current=J,N(!0),S(!0))}else{c({...kn,legalName:T,identityVerified:!1}),m("verify-identity");let J=0;const xe=window.setInterval(()=>{J+=1;const le=On();le&&!x?(window.clearInterval(xe),c(le.data.legalName?.trim()||!T?le.data:{...le.data,legalName:T}),y(!!le.done||kt(le.data)),le.data.identityVerified&&!e&&(le.done||kt(le.data)||le.current&&le.current!=="welcome")&&m(le.done||kt(le.data)?Ae:jt(le.current))):(J>12||x)&&window.clearInterval(xe)},750)}b(!0)})(),()=>{x=!0}},[]),f.useEffect(()=>{if(!g||!e||e==="welcome")return;const x=jt(e);m(O=>O===x?O:x),S(!1)},[e,g]);const _=x=>I.current&&x===e?I.current:x;f.useEffect(()=>{if(!g)return;w("saving");const x=window.setTimeout(()=>{w(qi()?"saved-cloud":"saved-local")},600);try{ut({data:a,current:_(d),done:p})}catch{}return()=>window.clearTimeout(x)},[a,d,p,g]),f.useEffect(()=>{window.scrollTo(0,0)},[d,p,u]);const M=x=>c(O=>{const T={...O,...x};try{ut({data:T,current:_(d),done:p},{flushCloudPush:"residencyVerification"in x})}catch{}return T}),V=()=>t==="edit"?{to:"/edit",search:{step:e}}:t==="questions-index"?{to:"/questions-index"}:{to:"/account"},H=!!t&&!!e&&d===e,z=async()=>{try{ut({data:a,current:_(d),done:p}),await Lt()}catch{}r(V())},X=x=>{const O=Dt.indexOf(d);if(O>=0)for(let T=O+x;T>=0&&T<Dt.length;T+=x){const k=Dt[T];if(E.includes(k))return k}return x===1?E[E.length-1]:E[0]},B=x=>
6{if(!l)return!1;const O=Dt.indexOf(d),T=Dt[O+x];return O<0||!T?!1:(m(T),!0)},W=()=>{if(B(1))return;if(H){z();return}if(u){h(!1),m("review");return}const x=E.indexOf(d);if(x<0){m(X(1));return}x<E.length-1&&m(E[x+1])},P=()=>{if(B(-1))return;if(u){h(!1),m("review");return}if(H){r(V());return}const x=E.indexOf(d);if(x<0){m(X(-1));return}x>0&&m(E[x-1])},U=x=>{h(!0),m(jt(x))},$=async()=>{try{ut({data:a,current:d,done:p}),await Lt(),Mn.success("Your progress is saved. Come back anytime to finish.")}catch{Mn.error("We couldn't save your progress. Please check your connection.")}r({to:"/account"})},de=async()=>{try{ut({data:a,current:"review",done:p}),await Lt()}catch{}r({to:"/review-confirmation"})},ve=async()=>{y(!0);try{ut({data:a,current:"review",done:!0}),await Lt()}catch{}Mn.success("Your Universal Rental Application is ready."),r({to:"/account"})},be=async()=>{try{Vi(),await Ui()}catch{}c(kn),m("verify-identity"),y(!1),N(!1),S(!1)},fe=null,{index:ge,total:me}=vi(E,d);if(!g)return s.jsx("div",{className:"flex flex-1 items-center justify-center bg-page px-5",children:s.jsxs("p",{className:"flex items-center gap-3 text-sm text-page-foreground/70",children:[s.jsx(gt,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading your applicationâ¦"]})});const R=l||Li(a)>0;if(j&&!p)return s.jsx("div",{className:"flex flex-1 items-center justify-center bg-page px-5",children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-white/20 bg-card p-7 text-card-foreground shadow-card duration-500 animate-in fade-in zoom-in-95",children:[s.jsxs("h1",{className:"text-2xl font-semibold tracking-tight",children:["Welcome back",o?.firstName?`, ${o.firstName}`:""]}),s.jsxs("p",{className:"mt-3 text-card-foreground/80",children:["Your progress was saved. You left off at ",s.jsx("strong",{children:Dn[d]}),". Do you want to continue answering questions until your application is complete?"]}),s.jsxs("div",{className:"mt-7 flex flex-col gap-2",children:[s.jsx(Z,{size:"lg",onClick:()=>S(!1),children:"Yes, continue where I left off"}),R?s.jsx(Z,{size:"lg",variant:"outline",onClick:()=>r({to:"/account"}),children:"No, go to my account"}):s.jsx("p",{className:"text-sm text-card-foreground/75",children:"Answer at least one question and your account page opens â right now there are no answers saved yet, so there is nothing to show there."})]})]})});if(d==="review")return s.jsxs(s.Fragment,{children:[fe,s.jsx(mo,{index:ge,total:me,saveStatus:C,showResumeBanner:v,resumeStepLabel:Dn[d],userName:o?.firstName,onStartOver:be,children:s.jsx(um,{data:a,onEdit:U,onSubmit:ve,onBack:P,onSaveAndContinue:$})})]});const K=ie();return s.jsxs(s.Fragment,{children:[fe,s.jsx(mo,{index:ge,total:me,saveStatus:C,showResumeBanner:v,resumeStepLabel:Dn[d],userName:o?.firstName,onStartOver:be,children:K})]});function ie(){switch(d){case"current-address":{const x={street:a.currentAddressStreet??"",city:a.currentAddressCity??"",state:a.currentAddressState??"",zip:a.currentAddressZip??""},O=T=>{const k={...x,...T};M({currentAddressStreet:k.street,currentAddressCity:k.city,currentAddressState:k.state,currentAddressZip:k.zip,currentAddress:pt(k)})};return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Identity & Residence",title:"Where do you currently live?",helper:"This can be different from the address on your ID.",onBack:P,onNext:W,nextDisabled:!x.street.trim()||!x.city.trim()||!x.state.trim()||!x.zip.trim(),children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(Uf,{}),s.jsx(ne,{label:"Street address",value:x.street,onChange:T=>O({street:T}),capitalize:!0,placeholder:"e.g. 742 Evergreen Terrace, Apt 5B",autoComplete:"street-address",autoFocus:!0}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(ne,{label:"City",value:x.city,onChange:T=>O({city:T}
6),capitalize:!0,placeholder:"e.g. Springfield",autoComplete:"address-level2"}),s.jsx(Kt,{label:"State",value:x.state,onChange:T=>{O({state:T}),setTimeout(()=>document.getElementById("current-zip")?.focus(),0)}})]}),s.jsx(ne,{label:"ZIP code",id:"current-zip",value:x.zip,onChange:T=>O({zip:T}),placeholder:"e.g. 62704",format:Zt,autoComplete:"postal-code"})]})})}case"time-at-address":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Identity & Residence",title:"How long have you lived there?",onBack:P,onNext:W,nextDisabled:!a.currentAddressSince&&!a.timeAtAddress,children:s.jsx(Qm,{since:a.currentAddressSince,onChange:(x,O)=>M({currentAddressSince:x,timeAtAddress:O})})});case"prior-address":{const x={street:a.priorAddressStreet??"",city:a.priorAddressCity??"",state:a.priorAddressState??"",zip:a.priorAddressZip??""},O=ae=>{const J={...x,...ae};M({priorAddressStreet:J.street,priorAddressCity:J.city,priorAddressState:J.state,priorAddressZip:J.zip,priorAddress:pt(J)})},T=a.additionalPriorAddresses??[],k=(ae,J)=>{const xe=T.map((le,wn)=>wn===ae?{...le,...J}:le);M({additionalPriorAddresses:xe})},q=()=>M({additionalPriorAddresses:[...T,{street:"",city:"",state:"",zip:""}]}),Ae=ae=>M({additionalPriorAddresses:T.filter((J,xe)=>xe!==ae)});return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Identity & Residence",title:"Where did you live before that?",helper:"Landlords usually like to see about two years of history.",onBack:P,onNext:W,nextDisabled:!x.street.trim()||!x.city.trim()||!x.state.trim()||!x.zip.trim(),children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(ne,{label:"Street address",value:x.street,onChange:ae=>O({street:ae}),capitalize:!0,placeholder:"e.g. 1130 Maple Street, Unit 2",autoComplete:"street-address",autoFocus:!0}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(ne,{label:"City",value:x.city,onChange:ae=>O({city:ae}),capitalize:!0,placeholder:"e.g. Shelbyville",autoComplete:"address-level2"}),s.jsx(Kt,{label:"State",value:x.state,onChange:ae=>{O({state:ae}),setTimeout(()=>document.getElementById("prior-zip")?.focus(),0)}})]}),s.jsx(ne,{label:"ZIP code",id:"prior-zip",value:x.zip,onChange:ae=>O({zip:ae}),placeholder:"e.g. 62565",format:Zt,autoComplete:"postal-code"}),T.map((ae,J)=>s.jsxs("div",{className:"space-y-4 rounded-lg border border-page-foreground/20 bg-white/5 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"text-sm font-semibold text-page-foreground",children:["Earlier residence #",J+1]}),s.jsx(Z,{type:"button",variant:"ghost",size:"sm",onClick:()=>Ae(J),className:"text-page-foreground hover:bg-white/10",children:"Remove"})]}),s.jsx(ne,{label:"Street address",value:ae.street??"",onChange:xe=>k(J,{street:xe}),capitalize:!0,placeholder:"Street, unit",autoComplete:"street-address"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(ne,{label:"City",value:ae.city??"",onChange:xe=>k(J,{city:xe}),capitalize:!0,placeholder:"City",autoComplete:"address-level2"}),s.jsx(Kt,{label:"State",value:ae.state??"",onChange:xe=>k(J,{state:xe})})]}),s.jsx(ne,{label:"ZIP code",value:ae.zip??"",onChange:xe=>k(J,{zip:xe}),placeholder:"ZIP",format:Zt,autoComplete:"postal-code"})]},J)),s.jsx(Z,{type:"button",variant:"outline",onClick:q,className:"w-full border-page-foreground/30 bg-white/5 text-page-foreground hover:bg-white/10",children:"+ Add another previous residence"})]})})}case"housing-status":return s.jsxs(he,{onSaveAndContinue:$,eyebrow:"Identity & Residence",title:"Right now, are youâ¦",onBack:P,onNext:W,nextDisabled:!a.housingStatus||a.housingStatus==="other"&&!a.housingStatusOther?.trim(),children:[s.jsx(We,{options:[{value:"renting",label:"Renting"},{value:"own",label:"Own my home"},{value:"family",label:"Living with family or friends"},{value:"other",label:"Other"}],value:a.housingStatus,onChange:x=>M({housingStatus:x})}),a.housingStatus==="other"&&s.jsxs("div",{className:"mt-4 space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:"Please describe your housing situation"}),s.jsx(it,{autoFocus:!0,value:a.housingStatusOther??"",onChange:x=>M({housingStatusOther:xo(x.target.value)}),placeholder:"Tell us moreâ¦",className:"h-12 border-page-foreground
6/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"})]})]});case"move-in":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Identity & Residence",title:"When are you hoping to move in?",onBack:P,onNext:W,nextDisabled:!a.moveInFlexible&&!a.moveInDate,children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Lf,{children:[s.jsx(Vf,{asChild:!0,children:s.jsx("button",{type:"button",disabled:a.moveInFlexible,className:"flex h-13 w-full items-center justify-between rounded-xl border border-page-foreground/30 bg-white/10 px-4 py-3.5 text-left text-base font-normal text-page-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(tl,{className:"size-5 text-foreground/70"}),a.moveInDate?new Date(a.moveInDate).toLocaleDateString(void 0,{weekday:"short",month:"long",day:"numeric",year:"numeric"}):"Pick a date"]})})}),s.jsx(Ls,{className:"w-auto p-0",align:"start",children:s.jsx(du,{mode:"single",selected:a.moveInDate?new Date(a.moveInDate):void 0,onSelect:x=>M({moveInDate:x?x.toISOString():void 0}),initialFocus:!0,className:Y("p-3 pointer-events-auto")})})]}),s.jsxs("label",{className:"flex items-center justify-between rounded-xl border border-page-foreground/30 bg-white/10 px-4 py-3.5 text-page-foreground",children:[s.jsx("span",{className:"font-medium text-page-foreground",children:"I'm flexible"}),s.jsx(Di,{checked:a.moveInFlexible,onCheckedChange:x=>M({moveInFlexible:x,moveInDate:x?void 0:a.moveInDate})})]})]})});case"occupants":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Household & Occupancy",title:"Who will be living in the home?",helper:"Include yourself in the total. List any other adults (co-applicants or occupants) so landlords know who to expect on the lease.",onBack:P,onNext:W,nextDisabled:!a.occupantsCount||a.occupantsCount<1,children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(ne,{label:"Total number of people",value:a.occupantsCount?String(a.occupantsCount):"",onChange:x=>M({occupantsCount:x?Math.max(0,parseInt(x,10)||0):void 0}),placeholder:"e.g. 2",autoFocus:!0}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:"Other adults (name & relationship) â optional"}),s.jsx(Mt,{placeholder:"e.g. Alex Rivera â spouse; Sam Lee â roommate",value:a.otherAdults??"",onChange:x=>M({otherAdults:x.target.value}),rows:3,className:"border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"})]})]})});case"pets":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Household & Occupancy",title:"Do you have any pets?",helper:"Service and assistance animals are not pets and are protected â you can note them here too.",onBack:P,onNext:W,nextDisabled:!a.hasPets||a.hasPets==="yes"&&!a.pets?.trim(),children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(We,{options:[{value:"no",label:"No pets"},{value:"yes",label:"Yes, I have pets"}],value:a.hasPets,onChange:x=>M({hasPets:x})}),a.hasPets==="yes"&&s.jsx("div",{className:"space-y-3 duration-300 animate-in fade-in slide-in-from-top-2",children:s.jsx(Mt,{placeholder:"One per line â type, breed, weight, count (e.g. Dog â Labrador, 65 lbs, 1)",value:a.pets??"",onChange:x=>M({pets:x.target.value}),rows:3,className:"border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"})})]})});case"smoking-vehicles":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Household & Occupancy",title:"A couple more household details",onBack:P,onNext:W,nextDisabled:!a.smokingHousehold,children:s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:"Is this a non-smoking household?"}),s.jsx(We,{options:[{value:"yes",label:"Non-smoking"},{value:"no",label:"Someone smokes"}],value:a.smokingHousehold,onChange:x=>M({smokingHousehold:x})})]}),s.jsx(ne,{label:"Vehicles needing parking",value:a.vehicles??"",onChange:x=>M({vehicles:x}),capitalize:!0,placeholder:"e.g. 1 sedan + 1 motorcycle"})]})});case"verify-identity":return s.jsxs(he,{eyebrow:"Identity",title:"Confirm your identity",onBack:P,onNext:W,nextDisabled:!a.identityVerified,children:[s.jsx("p",{className:"text-sm leading-relaxed text-page-foreground
6/85",children:"Before your questions, you must complete a biometric identity check. You take a photo of your government ID and a live selfie; Stripe Identity confirms the document is genuine and helps ensure the identity information you submit corresponds with your ID. We keep the result and your legal name â never the photos."}),s.jsx("p",{className:"mt-3 text-sm leading-relaxed text-page-foreground/85",children:"The photo-ID check has no charge. If you withdraw before payment, you owe nothing. Payment is required only if you decide to share or distribute your application."}),!Ir(a)&&!a.identityVerified&&!i&&s.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-3 rounded-xl border border-page-foreground/25 bg-white/10 p-4",children:[s.jsx(yo,{checked:!1,onCheckedChange:x=>{x===!0&&M({identityConsent:Zi("checks")})},className:"mt-0.5"}),s.jsxs("span",{className:"text-sm leading-relaxed text-page-foreground/90",children:["I give Gravadee permission to verify my identity with Stripe Identity.",s.jsx("span",{className:"mt-1 block text-xs text-page-foreground/70",children:"The date and time is saved and shown on your account page. Permission for a bank check is asked separately, only if you choose one later."})]})]}),i&&s.jsxs("div",{className:"mt-4 space-y-3 rounded-xl border border-page-foreground/25 bg-white/10 p-4",children:[s.jsx("p",{className:"text-sm text-page-foreground/90",children:"Test account â the ID check below is shown for review only and never runs. Use the button to record a simulated result, or press Continue to move on."}),s.jsx(Z,{type:"button",onClick:()=>{M({identityVerified:!0,identitySimulated:!0,identityVerifiedAt:new Date().toISOString(),identityVerificationToken:Tr("idv"),identityDeferred:!1,identityDeferredAt:void 0,identityFailureReason:void 0})},children:"Record a simulated ID result"})]}),s.jsx("div",{className:`mt-4${!i&&(Ir(a)||a.identityVerified)?"":" pointer-events-none opacity-50"}`,children:s.jsx(cm,{legalName:a.legalName??"",legalNameConfirmedAt:a.legalNameConfirmedAt,allowRecheck:t==="account",onNameConfirmed:x=>{const O=x.trim();if(!O)return;const[T,...k]=O.split(/\s+/);ji({first:T,last:k.join(" ")}),M({legalName:O,legalNameConfirmedAt:new Date().toISOString()})},done:!!a.identityVerified,simulated:a.identitySimulated,onVerified:({simulated:x})=>{M({identityVerified:!0,identitySimulated:x,identityVerifiedAt:new Date().toISOString(),identityVerificationToken:Tr("idv"),identityDeferred:!1,identityDeferredAt:void 0,identityFailureReason:void 0}),W()}})}),a.identityVerified&&s.jsx("p",{className:"mt-4 text-sm text-page-foreground/80",children:t==="account"?"Press Continue to return to your account.":"Press Continue to start your questions."})]});case"income-type":return s.jsxs(he,{onSaveAndContinue:$,eyebrow:"Employment & Income",title:"How would you describe your main source of income?",onBack:P,onNext:W,nextDisabled:!a.incomeType||a.incomeType==="other"&&!a.incomeTypeOther?.trim(),children:[s.jsx(We,{options:[{value:"employed",label:"Employed (W-2)"},{value:"self",label:"Self-employed or contractor"},{value:"student",label:"Student"},{value:"retired",label:"Retired"},{value:"other",label:"Other"}],value:a.incomeType,onChange:x=>M({incomeType:x})}),a.incomeType==="other"&&s.jsx("div",{className:"mt-4",children:s.jsx(ne,{label:"Tell us about your main source of income",value:a.incomeTypeOther,onChange:x=>M({incomeTypeOther:x}),capitalize:!0,placeholder:"e.g. Rental property income, disability benefitsâ¦",autoFocus:!0})})]});case"student-funding":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Employment & Income",title:"How is your housing funded?",onBack:P,onNext:W,nextDisabled:!a.studentFunding,children:s.jsx(We,{options:[{value:"job",label:"Job or income (connect account)"},{value:"aid",label:"Financial aid or savings"},{value:"guarantor",label:"A guarantor / co-signer will help"}],value:a.studentFunding,onChange:x=>M({studentFunding:x})})});case"connect-income":{const x=a.incomeType==="employed",O=n==="jobTitle";return s.jsxs(he,{onSaveAndContinue:$,eyebrow:"Employment & Income",title:O?"Upd
6ate your job title":"Tell us about your income",body:O?"Update the job title shown on your application.":"Enter the information requested below. Your income will be verified after you complete the questions.",onBack:P,onNext:W,nextDisabled:O?!a.jobTitle?.trim():!(Ar(a.statedGrossMonthlyIncome)??0)&&!a.incomeBand,nextLabel:O?"Save":"Continue",children:[s.jsx(nh,{employed:x,data:a,set:M,jobTitleOnly:O}),!O&&s.jsxs("div",{className:"mt-6 space-y-1.5",children:[s.jsx(Ce,{htmlFor:"gross-monthly-income",className:"text-sm text-page-foreground/90",children:"What is your monthly gross income?"}),s.jsx("p",{className:"text-xs text-page-foreground/70",children:"Gross means before taxes and deductions â the figure on the top of your paystub. Landlords use this number to compare your income to the rent."}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-page-foreground/70",children:"$"}),s.jsx(it,{id:"gross-monthly-income",inputMode:"decimal",maxLength:12,placeholder:"e.g. 7,500",value:a.statedGrossMonthlyIncome??"",onChange:T=>{const k=T.target.value.replace(/[^0-9.,]/g,""),q=Ar(k);M({statedGrossMonthlyIncome:k,incomeBand:q&&q>0?bi(q):void 0})},className:"bg-page pl-7 text-page-foreground border-page-foreground/50"})]}),s.jsx("p",{className:"text-xs text-page-foreground/70",children:"per month, before taxes"})]})]})}case"rental-fit":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Rental fit",title:"A few details landlords like to know",onBack:P,onNext:W,nextDisabled:!a.reasonForMoving?.trim()||!a.leaseTerm||!a.rentersInsurance,children:s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs(Ce,{className:"text-sm text-page-foreground/90",children:["Why are you moving? ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(Mt,{required:!0,placeholder:"e.g. Relocating for work; need more space",value:a.reasonForMoving??"",onChange:x=>M({reasonForMoving:x.target.value}),rows:2,className:"border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:"Preferred lease term"}),s.jsx(We,{options:go,value:a.leaseTerm,onChange:x=>M({leaseTerm:x})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:"Willing to carry renters insurance?"}),s.jsx(We,{options:[{value:"yes",label:"Yes"},{value:"no",label:"No"}],value:a.rentersInsurance,onChange:x=>M({rentersInsurance:x})})]})]})});case"references":return s.jsx(oh,{data:a,set:M,onBack:P,onNext:W,onSaveAndContinue:$});case"additional-reference":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"References",title:"Add one more reference?",helper:"Optional. We'll ask their permission before sharing anything.",onBack:P,onNext:W,nextLabel:a.additionalReference?.name?"Continue":"Skip",children:s.jsx(Ba,{value:a.additionalReference,onChange:x=>M({additionalReference:x}),withRelationship:!0})});case"eviction-history":return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Screening & consent",title:"Have you ever been evicted or broken a lease?",helper:"Being upfront helps. You can add context if anything needs explaining.",onBack:P,onNext:W,nextDisabled:!a.evictionHistory,children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(We,{options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],value:a.evictionHistory,onChange:x=>M({evictionHistory:x})}),a.evictionHistory==="yes"&&s.jsx("div",{className:"duration-300 animate-in fade-in slide-in-from-top-2",children:s.jsx(Mt,{placeholder:"Briefly explain the situationâ¦",value:a.evictionNote??"",onChange:x=>M({evictionNote:x.target.value}),rows:3,className:"border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"})})]})});case"applying-address":{const x=a.includeTargetAddress??"",O={street:a.targetAddressStreet??"",city:a.targetAddressCity??"",state:a.targetAddressState??"",zip:a.targetAddressZip??""},T=k=>{const q={...O,...k};M({targetAddressStreet:q.street,targetAddressCity:q.city,targetAddressState:q.state,targetAddressZip:q.zip,targetAddress:pt(q)})};return s.jsx(he,{onSaveAndContinue:$,eyebrow:"Finishing touches",title:"Include the address you're applying for?",body:"If you're applying for a specific place, you can show it on your application. It will appear at the top of the URA, in a section below your name and contact information.",onBack:P,onNext:de,nextLabel:"Continue",nextDisabled:x===""||x==="yes"&&!O.street.trim()&&!O.city.trim(),children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(We,{label:"Include the address you're applying for?",value:x,onChange:k=>M({includeTargetAddress:k,...k==="no"?{targetAddressStreet:"",targetAddressCity:"",targetAddressState:"",targetAddressZip:"",targetAddress:""}:{}}),options:[{value:"yes",label:"Yes â show the address I'm applying for"},{value:"no",label:"No â keep my application general"}]}
6),x===""&&s.jsx("p",{className:"text-sm text-page-foreground/70",children:"Choose Yes or No to continue."}),x==="yes"&&s.jsxs("div",{className:"space-y-4 duration-300 animate-in fade-in",children:[s.jsx(ne,{label:"Street address of the unit",value:O.street,onChange:k=>T({street:k}),capitalize:!0,placeholder:"e.g. 480 Oak Avenue, Apt 5B",autoFocus:!0}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(ne,{label:"City",value:O.city,onChange:k=>T({city:k}),capitalize:!0,placeholder:"e.g. Shelbyville"}),s.jsx(Kt,{label:"State",value:O.state,onChange:k=>T({state:k})})]}),s.jsx(ne,{label:"ZIP code",value:O.zip,onChange:k=>T({zip:k}),placeholder:"e.g. 62565",format:Zt})]}),s.jsxs("div",{className:"space-y-1.5 rounded-xl border border-page-foreground/30 bg-white/10 p-4",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",htmlFor:"landlord-note",children:"Note to the landlord (optional)"}),s.jsx(Mt,{id:"landlord-note",autoFocus:n==="landlordNote",ref:k=>{k&&n==="landlordNote"&&k.scrollIntoView({block:"center"})},value:a.landlordNote??"",onChange:k=>M({landlordNote:k.target.value}),maxLength:1e3,rows:4,placeholder:"Add a short message â steady work history, a long current tenancy, why this place fits.",className:"border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"}),s.jsx("p",{className:"text-xs leading-relaxed text-page-foreground/70",children:"It appears just below the address on your URA, and it's pre-filled for you whenever you send or share your application."})]})]})})}case"screening-consent":return s.jsx(eh,{onSaveAndContinue:$,onBack:P,onConfirm:x=>{M({screeningConsent:!1,...x?Gi(a):{certified:!1,certifiedAt:void 0}}),W()}})}}}function eh({onSaveAndContinue:e,onBack:t,onConfirm:n}){const[r,o]=f.useState(!1);return s.jsx(he,{onSaveAndContinue:e,eyebrow:"Certification",title:"Certify the answers you entered",body:"This covers only the answers you typed in yourself â not anything Gravadee verified for you.",onBack:t,onNext:()=>n(r),nextLabel:"Continue",children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-page-foreground/30 bg-white/10 p-4",children:[s.jsx(yo,{checked:r,onCheckedChange:l=>o(l===!0),className:"mt-0.5"}),s.jsx("span",{className:"text-sm leading-relaxed text-page-foreground/90",children:Ki})]}),s.jsx("p",{className:"rounded-xl border border-page-foreground/20 bg-white/5 p-4 text-xs leading-relaxed text-page-foreground/70",children:"Certification is optional â you can continue without checking the box. The date and time you certify is saved and shown on your account page, and we ask again every 30 days because self-reported answers can change. Permission for a landlord to obtain a credit report, background check, or similar report is requested separately when you choose a specific landlord to receive your URA."})]})})}function th({status:e}){return e==="idle"?null:e==="saving"?s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-page-foreground/70",children:[s.jsx(gt,{className:"size-3.5 animate-spin"})," Savingâ¦"]}):e==="saved-local"?s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-page-foreground/70",children:[s.jsx(tn,{className:"size-3.5"})," Saved on this device"]}):s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-page-foreground/70",children:[s.jsx(al,{className:"size-3.5"})," Saved to your account"]})}function mo({index:e,total:t,saveStatus:n,showResumeBanner:r,resumeStepLabel:o,userName:l,onStartOver:i,notice:a,children:c}){const d=t>0?Math.max(0,(e+1)/t*100):0;return s.jsxs("div",{className:"flex flex-1 flex-col bg-page",children:[s.jsx("div",{className:"sticky top-0 z-10 h-1.5 w-full bg-muted",children:s.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${d}%`}})}),s.jsx("div",{className:"mx-auto max-w-3xl px-4 pt-4 sm:pt-6",children:s.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm",children:[s.jsx("span",{className:"text-page-foreground
6/80",children:e>=0?`Step ${e+1}`:"Extra question"}),s.jsx(th,{status:n})]})}),r&&o&&i&&s.jsx("div",{className:"mx-auto max-w-3xl px-4 pt-4",children:s.jsx("div",{className:"rounded-xl border border-page-foreground/20 bg-page-foreground/10 p-4 text-page-foreground",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(tn,{className:"mt-0.5 size-5 shrink-0 text-success"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("p",{className:"font-medium",children:["Welcome back",l?`, ${l}`:"",". You left off at"," ",s.jsx("strong",{children:o}),"."]}),s.jsx("p",{className:"mt-1 text-sm text-page-foreground/80",children:"Your answers are saved as you go. Continue below or start over."}),s.jsx("button",{onClick:i,className:"mt-2 text-sm font-medium underline underline-offset-4 hover:text-page-foreground/80",children:"Start over"})]})]})})}),a&&s.jsx("div",{className:"mx-auto max-w-3xl px-4 pt-4",children:a}),c]})}function nh({employed:e,data:t,set:n,jobTitleOnly:r}){return r?s.jsx("div",{className:"space-y-4",children:s.jsx(ne,{label:"Your job title",value:t.jobTitle,onChange:o=>n({jobTitle:o}),capitalize:!0,placeholder:"e.g. Operations Manager"})}):s.jsxs("div",{className:"space-y-4",children:[s.jsx(ne,{label:e?"Employer":"Income source",value:t.employer,onChange:o=>n({employer:o}),capitalize:!0,placeholder:e?"e.g. Apple Computer":"e.g. Freelance work, pension, benefits"}),s.jsx(ne,{label:"Your job title",value:t.jobTitle,onChange:o=>n({jobTitle:o}),capitalize:!0,placeholder:"e.g. Operations Manager"}),e&&s.jsx(ne,{label:"Tenure",value:t.tenure,onChange:o=>n({tenure:o}),capitalize:!0,placeholder:"e.g. 2 yr 4 mo"}),s.jsx(rh,{data:t,set:n})]})}function rh({data:e,set:t}){const n=e.additionalIncomes??[],r=(i,a)=>t({additionalIncomes:n.map(c=>c.id===i?{...c,...a}:c)}),o=()=>t({additionalIncomes:[...n,{id:typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`inc-${Date.now()}`,kind:"income",verified:!1}]}),l=i=>t({additionalIncomes:n.filter(a=>a.id!==i)});return s.jsxs("div",{className:"space-y-4 border-t border-page-foreground/15 pt-5",children:[n.map((i,a)=>s.jsxs("div",{className:"space-y-4 rounded-xl border border-page-foreground/20 bg-white/5 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("p",{className:"text-sm font-medium text-page-foreground",children:["Additional income source ",a+1]}),s.jsx(Z,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(i.id),className:"text-page-foreground/80",children:"Remove"})]}),s.jsx(ne,{label:"Income source",value:i.source,onChange:c=>r(i.id,{source:c}),capitalize:!0,placeholder:"e.g. Second job, freelance, benefits"}),s.jsx(ne,{label:"Tenure (optional)",value:i.tenure,onChange:c=>r(i.id,{tenure:c}),capitalize:!0,placeholder:"e.g. 1 yr 2 mo"})]},i.id)),s.jsxs(Z,{type:"button",variant:"outline",size:"lg",onClick:o,className:"w-full text-foreground",children:[s.jsx(Ji,{className:"size-4"})," Add another income source"]})]})}function ne({label:e,value:t,onChange:n,placeholder:r,autoFocus:o,format:l,helper:i,readOnly:a,id:c,capitalize:d,autoComplete:m}){return s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:e}),s.jsx(it,{id:c,autoFocus:o,value:t??"",placeholder:r,readOnly:a,autoComplete:m,onChange:u=>{let h=u.target.value;d&&(h=xo(h)),n(l?l(h):h)},className:Y("h-12 border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50",a&&"cursor-default border-page-foreground/10 bg-page-foreground/5 focus-visible:ring-0")}),i&&s.jsx("p",{className:"text-xs text-page-foreground/70",children:i})]})}function Kt({label:e,value:t,onChange:n}){return s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground/90",children:e}),s.jsx(Mo,{value:t??"",onChange:n,className:"h-12 border-page-foreground/30 bg-white/10 text-page-foreground placeholder:text-page-foreground/50"})]})}function Ba({value:e,onChange:t,withRelationship:n,relationshipFree:r}){const o=e??{name:"",contact:"",relationship:""},l=i=>t({...o,...i});return s.jsxs("div",{className:"space-y-4",children:[s.jsx(ne,{label:"Name",value:o.name,onChange:i=>l({name:i}),capitalize:!0,autoFocus:!0}),s.jsx(ne,{label:"Phone or email",value:o.contact,format:Ai,onChange:i=>l({contact:i})}),n&&(r?s.jsx(ne,{label:"Relationship",value:o.relationship??"",onChange:i=>l({relationship:i}),capitalize:!0}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Ce,{className:"text-sm text-page-foreground
6/90",children:"Relationship"}),s.jsx(We,{options:[{value:"employer",label:"Employer / colleague"},{value:"friend",label:"Friend"},{value:"relative",label:"Relative"},{value:"other",label:"Other"}],value:o.relationship||void 0,onChange:i=>l({relationship:i})}),o.relationship==="other"&&s.jsx(ne,{label:"Describe the relationship",value:o.relationshipOther??"",onChange:i=>l({relationshipOther:i}),capitalize:!0})]}))]})}function oh({data:e,set:t,onBack:n,onNext:r,onSaveAndContinue:o}){const l=e.housingStatus;if(l==="renting"){const i=e.landlord??{name:"",contact:""},a=i.phone==null&&i.email==null?(i.contact??"").split("·").map(u=>u.trim()).filter(Boolean):[],c={...i,phone:i.phone??a.find(u=>!u.includes("@"))??"",email:i.email??a.find(u=>u.includes("@"))??""},d=u=>{const h={...c,...u},p=[h.phone?.trim(),h.email?.trim()].filter(Boolean).join(" · ");h.contact=p||(i.contact??""),t({landlord:h})},m=!!(c.phone?.trim()||c.email?.trim()||c.contact?.trim());return s.jsx(he,{onSaveAndContinue:o,eyebrow:"References",title:"Your landlord â and who you pay",body:"These can be two different parties. Your landlord is the person or company responsible for the lease; who you pay is whoever the rent actually goes to, such as a property manager or payment portal. Naming the payee lets us match rent payments in your bank records. We never share a payment amount.",onBack:n,onNext:r,nextDisabled:!c.name?.trim()||!m,children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("p",{className:"text-sm font-semibold text-page-foreground",children:"Your landlord or property manager"}),s.jsx(ne,{label:"Name",value:c.name,onChange:u=>d({name:u}),capitalize:!0,autoFocus:!0}),s.jsx(ne,{label:"Phone",value:c.phone??"",format:Ti,onChange:u=>d({phone:u}),placeholder:"(415) 555-0134"}),s.jsx(ne,{label:"Email",value:c.email??"",onChange:u=>d({email:u}),placeholder:"[email protected]"}),s.jsx("p",{className:"text-xs text-page-foreground/70",children:"Add at least one â phone or email."})]}),s.jsxs("div",{className:"space-y-4 border-t border-black/10 pt-5",children:[s.jsx("p",{className:"text-sm font-semibold text-page-foreground",children:"Who you pay rent to"}),s.jsx(ne,{label:"Name on your rent payments â landlord, property manager, or portal",value:e.rentPayee??"",onChange:u=>t({rentPayee:u}),capitalize:!0,placeholder:"e.g. Oakwood Property Management"}),s.jsx(ne,{label:"What do you currently pay in rent each month? â optional",value:e.currentRent??"",onChange:u=>t({currentRent:u}),placeholder:"e.g. $2,150"})]})]})})}return l==="own"?s.jsx(he,{onSaveAndContinue:o,eyebrow:"References",title:"You own your home, so there's no rental reference needed",onBack:n,onNext:r,nextLabel:"Continue"}):s.jsx(he,{onSaveAndContinue:o,eyebrow:"References",title:"Add someone who can speak to you as a tenant?",helper:"Optional. We'll ask their permission before sharing anything.",onBack:n,onNext:r,nextLabel:e.tenantReference?.name?"Continue":"Skip",children:s.jsx(Ba,{value:e.tenantReference,onChange:i=>t({tenantReference:i}),withRelationship:!0,relationshipFree:!0})})}function Uh(){const{checked:e,authed:t,userId:n}=Ci(),{step:r,returnTo:o,field:l}=wi.useSearch();return f.useEffect(()=>{n&&Po()},[n]),!e||!t||!n?s.jsxs("div",{className:"flex min-h-dvh flex-col",children:[s.jsx(Er,{}),s.jsx("main",{className:"grid flex-1 place-items-center px-5 py-12",children:s.jsx("p",{className:"text-sm text-page-foreground/75",role:"status",children:"Checking your sign-inâ¦"})})]}):s.jsxs("div",{className:"flex min-h-dvh flex-col",children:[s.jsx(Er,{}),s.jsx(Jm,{startStepOverride:Ni(r)?r:void 0,returnTo:o,editField:l})]})}export{Uh as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.