your-ai-workflow-firebase-os 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Assets-Dd_96avv.js → Assets-COH4Ji57.js} +5 -5
- package/dist/{Assets-CBBNIHrw.cjs → Assets-D7fDckSi.cjs} +1 -1
- package/dist/{Attachments-C6QrTcNt.cjs → Attachments-BMuQ0CD4.cjs} +1 -1
- package/dist/{Attachments-YyjQmhBx.js → Attachments-Co1UkdWB.js} +2 -2
- package/dist/{Billing-B6f49cGH.cjs → Billing-DkuJdls5.cjs} +1 -1
- package/dist/{Billing-BZafAizg.js → Billing-kk4ZMd3z.js} +4 -4
- package/dist/{BookingCalendar-DYsA71vl.cjs → BookingCalendar-BcvJiyaq.cjs} +1 -1
- package/dist/{BookingCalendar-_xoRa2tL.js → BookingCalendar-Bej__mIs.js} +1 -1
- package/dist/{Button-DSldWACF.js → Button-BGN6q7lY.js} +1 -1
- package/dist/{Button-PyTaaoyu.cjs → Button-Ccy4wFZ1.cjs} +1 -1
- package/dist/{ConfirmModal-CQ73WYUg.cjs → ConfirmModal-BUNtss4a.cjs} +1 -1
- package/dist/{ConfirmModal-C1dM-bzk.js → ConfirmModal-BW9e6Y7d.js} +3 -3
- package/dist/{ContactPopup-D5Hh0bfE.cjs → ContactPopup-D8aSSlmS.cjs} +1 -1
- package/dist/{ContactPopup-CL4AMwK9.js → ContactPopup-Fs7wzrOX.js} +7 -7
- package/dist/{CopyLink-BnYpVy6H.cjs → CopyLink-C5lKLyOU.cjs} +1 -1
- package/dist/{CopyLink-rLr_5eNM.js → CopyLink-CNjDLzOl.js} +2 -2
- package/dist/{DashboardNav-B0G943ux.js → DashboardNav-CEd8gGPm.js} +3 -3
- package/dist/{DashboardNav-DOl9gJuu.cjs → DashboardNav-GgEUpyTa.cjs} +1 -1
- package/dist/{EmailAdmin-CWHMMybh.cjs → EmailAdmin-d_gWd48U.cjs} +1 -1
- package/dist/{EmailAdmin-humrSTzI.js → EmailAdmin-pbQ-f9Ge.js} +9 -9
- package/dist/{EventCard-CrPswwyG.js → EventCard-BSGLYD64.js} +2 -2
- package/dist/{EventCard-6eCfvOA-.cjs → EventCard-DAsGsicK.cjs} +1 -1
- package/dist/{FileViewerPopup-DQmhXMSg.cjs → FileViewerPopup-CkLUYCNo.cjs} +1 -1
- package/dist/{FileViewerPopup-Dnl3td2o.js → FileViewerPopup-gqhRT22v.js} +2 -2
- package/dist/{FormNote-BWGLs9lx.js → FormNote-DJ9HBokL.js} +1 -1
- package/dist/{FormNote-CX2rSBDB.cjs → FormNote-DP0GK9ya.cjs} +1 -1
- package/dist/{FormsAdmin-Tg20B0iA.cjs → FormsAdmin-5KTTp6zo.cjs} +1 -1
- package/dist/{FormsAdmin-CHwmKnYU.js → FormsAdmin-BNI63vEk.js} +9 -9
- package/dist/{Inbox-Cgq4MALU.js → Inbox-D9Y5K8Se.js} +9 -9
- package/dist/{Inbox-BPwIiThg.cjs → Inbox-DjslBakx.cjs} +1 -1
- package/dist/{Loader-DP_dL5qC.js → Loader-CVoz1Zf0.js} +1 -1
- package/dist/{Loader-p3eNQDUU.cjs → Loader-QHqQsXLr.cjs} +1 -1
- package/dist/{ManagePlanButton-BRW7Sevd.cjs → ManagePlanButton-Buwfs2bU.cjs} +1 -1
- package/dist/{ManagePlanButton-CNLCxK-o.js → ManagePlanButton-CE4uyh_7.js} +2 -2
- package/dist/{MyBookings-C_pqsSEk.js → MyBookings-B4DndHV6.js} +7 -7
- package/dist/{MyBookings-BC5sn_fE.cjs → MyBookings-CkEioQIj.cjs} +1 -1
- package/dist/{PageTitle-DFGW71q8.js → PageTitle-DCoUQWw6.js} +2 -2
- package/dist/{PageTitle-BWmE74WQ.cjs → PageTitle-DQkvCB11.cjs} +1 -1
- package/dist/PagesAdmin-D0qgoZtW.js +3 -0
- package/dist/{PagesAdmin-jjnDLYmF.js → PagesAdmin-DzLJWKBJ.js} +21 -21
- package/dist/PagesAdmin-KUxCI1Mr.cjs +1 -0
- package/dist/{PagesAdmin-BZZ3by92.cjs → PagesAdmin-YdYgmuEB.cjs} +1 -1
- package/dist/{PaymentsAdmin-CI0zXraR.cjs → PaymentsAdmin-B5l-f0mp.cjs} +1 -1
- package/dist/{PaymentsAdmin-DeBMmFFo.js → PaymentsAdmin-C3cEOeIs.js} +15 -15
- package/dist/{Popup-DmPEk98h.js → Popup-Bi63lzoS.js} +1 -1
- package/dist/{Popup-nq7YNM4N.cjs → Popup-COnHpbrY.cjs} +1 -1
- package/dist/{ProviderMark-DJ5mYjYn.cjs → ProviderMark--adeeajP.cjs} +1 -1
- package/dist/{ProviderMark-CAeOnBsB.js → ProviderMark-BvEMlZAm.js} +1 -1
- package/dist/{PublishApp-mMMwf_in.js → PublishApp-B9Fo6xN0.js} +7 -7
- package/dist/{PublishApp-DI96gX9b.cjs → PublishApp-Bc82Ijkq.cjs} +1 -1
- package/dist/{Said-DAD7Ctp_.js → Said-BvSRaEfZ.js} +1 -1
- package/dist/{Said-DlJOjNMN.cjs → Said-W3KFi5uX.cjs} +1 -1
- package/dist/{ScheduleAdmin-dWj_N_tf.cjs → ScheduleAdmin-Dh_hW6p4.cjs} +1 -1
- package/dist/{ScheduleAdmin-C4W8Ls0D.js → ScheduleAdmin-bk3GgxKP.js} +14 -14
- package/dist/{SchedulePicker-CwKId9JF.cjs → SchedulePicker-CN0755Ek.cjs} +1 -1
- package/dist/{SchedulePicker-BOSJEcfL.js → SchedulePicker-DO4PewPJ.js} +2 -2
- package/dist/{Setup-DcZzh6Xd.cjs → Setup-R4r6_tbV.cjs} +1 -1
- package/dist/{Setup-NOvtplUS.js → Setup-_G-s5y5Q.js} +3 -3
- package/dist/{SetupPayments-DrXK0LQa.js → SetupPayments-CkolcOtv.js} +5 -5
- package/dist/{SetupPayments-CZ0KqXdR.cjs → SetupPayments-CuFk9REC.cjs} +1 -1
- package/dist/{SignInAdmin-CwIUAJrv.cjs → SignInAdmin-B1yLLaQu.cjs} +1 -1
- package/dist/{SignInAdmin-Cb65ChHL.js → SignInAdmin-BLEn0rId.js} +9 -9
- package/dist/{SupportBar-528kXe-Z.js → SupportBar-DI_XbEsG.js} +4 -4
- package/dist/{SupportBar-CNVXSYwT.cjs → SupportBar-DLWruzQb.cjs} +1 -1
- package/dist/{SystemTabContent-EegzTuLd.cjs → SystemTabContent-BWhRHoXx.cjs} +1 -1
- package/dist/{SystemTabContent-C4azXKMs.js → SystemTabContent-CMyT7mDN.js} +2 -2
- package/dist/{TemplateDrive-XDRPkxIj.cjs → TemplateDrive-BJN-ReA_.cjs} +1 -1
- package/dist/{TemplateDrive-CfPXKMKX.js → TemplateDrive-DNBwL0oy.js} +10 -10
- package/dist/{ThemeAdmin-XLbC9fX7.js → ThemeAdmin-Cnqefrz6.js} +6 -6
- package/dist/ThemeAdmin-CoE_c5-P.cjs +1 -0
- package/dist/ThemeAdmin-DI7QaZ-0.js +2 -0
- package/dist/{ThemeAdmin-BrEozdpZ.cjs → ThemeAdmin-DkgmjW3g.cjs} +1 -1
- package/dist/TimeZoneField-Ckn1pKAL.cjs +11 -0
- package/dist/{TimeZoneField-Dv389mAe.js → TimeZoneField-oIMwb5_X.js} +119 -107
- package/dist/{TransactionsAdmin-X-NjI4NB.js → TransactionsAdmin-Brs-CEcG.js} +11 -11
- package/dist/{TransactionsAdmin-DgsG629u.cjs → TransactionsAdmin-C5wQRR1g.cjs} +1 -1
- package/dist/{Trouble-qjWYeKzC.js → Trouble-CtFq7tjk.js} +1 -1
- package/dist/{Trouble-DokPNHQZ.cjs → Trouble-KQZyf6aY.cjs} +1 -1
- package/dist/{Users-BEjl_Vjc.cjs → Users-B16L9cKI.cjs} +1 -1
- package/dist/{Users-BUGb7-Kz.js → Users-CbI4K_Le.js} +15 -15
- package/dist/{VideoPlayer-BVOkrJBR.cjs → VideoPlayer-CggwpVXH.cjs} +1 -1
- package/dist/{VideoPlayer-DB0oz6lM.js → VideoPlayer-QI1Jc3bS.js} +1 -1
- package/dist/appIcons-C90OKlV5.cjs +130 -0
- package/dist/{appIcons-CUXAX_gJ.js → appIcons-CCArfCDe.js} +761 -735
- package/dist/{arrivalRoads-BZk39p8Z.js → arrivalRoads-CGXm9Ntm.js} +0 -0
- package/dist/{arrivalRoads-CD7pt03E.cjs → arrivalRoads-Cc6AZM-d.cjs} +0 -0
- package/dist/{bookingPages-BxqkyZ-M.js → bookingPages-BFSY3Riv.js} +1 -1
- package/dist/{bookingPages-2fn9xPiA.cjs → bookingPages-Dx1ViiwW.cjs} +1 -1
- package/dist/{contentFallback-C6xLwXTs.js → contentFallback-BGGpI1Ts.js} +2 -2
- package/dist/{contentFallback-DLm_iHo9.cjs → contentFallback-DVCrIUvK.cjs} +1 -1
- package/dist/{email-DxxovRtf.js → email-PBHbXXgR.js} +1 -1
- package/dist/{email-DD48BP42.cjs → email-Sya6gl4F.cjs} +1 -1
- package/dist/lib/basket.d.ts +29 -9
- package/dist/lib/recordPrice.d.ts +1 -1
- package/dist/{notices-Cwon5Q0Y.cjs → notices-CKm9-Pqt.cjs} +1 -1
- package/dist/{notices-C4yqYzBw.js → notices-CysS7BLF.js} +1 -1
- package/dist/{ownerMail-CGmDk7aP.cjs → ownerMail-BS9SjJ2u.cjs} +1 -1
- package/dist/{ownerMail-Chzy5Ehy.js → ownerMail-DepG5-Qw.js} +2 -2
- package/dist/{pageFiles-BClshvXs.cjs → pageFiles-Cn0YQ4Ur.cjs} +1 -1
- package/dist/{pageFiles-D-GYqRgZ.js → pageFiles-ZFPSCDZz.js} +1 -1
- package/dist/{paidInFull-KuStok9_.cjs → paidInFull-CZywIs-V.cjs} +1 -1
- package/dist/{paidInFull-D14Eh0QV.js → paidInFull-mBOh9iwN.js} +1 -1
- package/dist/{paidSessions-Cr_93LGa.js → paidSessions-B8e5RHi4.js} +7 -7
- package/dist/{paidSessions-QXv7SHeb.cjs → paidSessions-D-zHC4oG.cjs} +1 -1
- package/dist/{people-D8nPPMlM.cjs → people-BwWVVLfy.cjs} +1 -1
- package/dist/{people-sk2DcHPi.js → people-Wk2opW4G.js} +1 -1
- package/dist/{publishSteps-DB1Hxr6H.js → publishSteps-Cf5pSB_H.js} +1 -1
- package/dist/{publishSteps-CaZRpC3C.cjs → publishSteps-DvWlF0p_.cjs} +1 -1
- package/dist/{recordLock-Dnz61J-_.js → recordLock-CMOiezNC.js} +1 -1
- package/dist/{recordLock-CLUp3QNh.cjs → recordLock-CiulizO1.cjs} +1 -1
- package/dist/{recordsKey-R5BjLoGQ.cjs → recordsKey-C4E2vOti.cjs} +1 -1
- package/dist/{recordsKey-DHJJWWOo.js → recordsKey-Cd216nq1.js} +2 -2
- package/dist/{registrationFields-COv8jW4n.cjs → registrationFields-DHHTptcl.cjs} +1 -1
- package/dist/{registrationFields-CeTZSerx.js → registrationFields-DdHoMPAQ.js} +1 -1
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/{roles-5juCr5sY.cjs → roles-BBDIJzox.cjs} +1 -1
- package/dist/{roles-hzcMnn_M.js → roles-DiwP6-WQ.js} +3 -3
- package/dist/{scheduleData-BpkfnBjP.cjs → scheduleData-BXjNXVHY.cjs} +1 -1
- package/dist/{scheduleData-BLCUm84s.js → scheduleData-DR6A-Q7Z.js} +1 -1
- package/dist/server.cjs.js +1 -1
- package/dist/server.es.js +1 -1
- package/dist/{serviceStatus-5sk8MPjW.js → serviceStatus-C9izcuQz.js} +2 -2
- package/dist/{serviceStatus-1pGLLilF.cjs → serviceStatus-Cde96_OO.cjs} +1 -1
- package/dist/{serviceSwitches-BWnZBooS.js → serviceSwitches-CZHwvVfP.js} +1 -1
- package/dist/{serviceSwitches-Do_pkFCu.cjs → serviceSwitches-mhJbQBrV.cjs} +1 -1
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/dist/your-ai-workflow-firebase-os.cjs.js +8 -8
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +358 -316
- package/package.json +1 -1
- package/src/index.css +41 -6
- package/dist/PagesAdmin-B-XopEi9.js +0 -3
- package/dist/PagesAdmin-nL5ZltFn.cjs +0 -1
- package/dist/ThemeAdmin-CwCiTp2I.js +0 -2
- package/dist/ThemeAdmin-Db5edTYj.cjs +0 -1
- package/dist/TimeZoneField-zR8N2Fj0.cjs +0 -11
- package/dist/appIcons-BNovDw6_.cjs +0 -130
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-CiTBaPhY.cjs`),t=require(`./schedule-BAea6q8_.cjs`),n=require(`./chevron-down-lyDK1rfL.cjs`),r=require(`./x-Ci8c5p6T.cjs`),i=require(`./mediaKind-ButDya5f.cjs`);let a=require(`react`);a=e.a(a,1);let o=require(`react/jsx-runtime`),s=require(`firebase/app`),c=require(`firebase/auth`),l=require(`firebase/firestore`),u=require(`firebase/storage`),d=require(`react-dom`);var f=(0,a.createContext)({});function p({config:e,children:t}){return(0,o.jsx)(f.Provider,{value:e,children:t})}var m=()=>(0,a.useContext)(f),h=null,g=null,_=null,v=null,y=null,b=`https://firebasestorage.googleapis.com`;function x(){if(typeof document>`u`||!document.head||document.head.querySelector(`link[rel="preconnect"][href="${b}"]`))return;let e=document.createElement(`link`);e.rel=`preconnect`,e.href=b,document.head.appendChild(e)}var S={ignoreUndefinedProperties:!0};function C(e){x();let t=e.projectId||``;if((0,s.getApps)().length&&y===t){h=(0,s.getApp)(),g=(0,c.getAuth)(h);try{_=(0,l.initializeFirestore)(h,S)}catch{_=(0,l.getFirestore)(h)}v=(0,u.getStorage)(h);return}if((0,s.getApps)().length&&y!==t)try{(0,s.deleteApp)((0,s.getApp)())}catch{}h=(0,s.initializeApp)(e),y=t,g=(0,c.getAuth)(h);try{_=(0,l.initializeFirestore)(h,S)}catch{_=(0,l.getFirestore)(h)}v=(0,u.getStorage)(h)}function w(e){try{return{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_ADMIN_EMAILS:void 0,VITE_FIREBASE_API_KEY:void 0,VITE_FIREBASE_APP_ID:void 0,VITE_FIREBASE_AUTH_DOMAIN:void 0,VITE_FIREBASE_MESSAGING_SENDER_ID:void 0,VITE_FIREBASE_PROJECT_ID:void 0,VITE_FIREBASE_STORAGE_BUCKET:void 0}?.[e]||``}catch{return``}}var T=[`VITE_FIREBASE_API_KEY`,`VITE_FIREBASE_AUTH_DOMAIN`,`VITE_FIREBASE_PROJECT_ID`,`VITE_FIREBASE_STORAGE_BUCKET`,`VITE_FIREBASE_MESSAGING_SENDER_ID`,`VITE_FIREBASE_APP_ID`],ee={VITE_FIREBASE_API_KEY:`apiKey`,VITE_FIREBASE_AUTH_DOMAIN:`authDomain`,VITE_FIREBASE_PROJECT_ID:`projectId`,VITE_FIREBASE_STORAGE_BUCKET:`storageBucket`,VITE_FIREBASE_MESSAGING_SENDER_ID:`messagingSenderId`,VITE_FIREBASE_APP_ID:`appId`};function E(){let e={};for(let t of T){let n=w(t);if(!n)return null;e[ee[t]]=n}return e}var D=E();D&&!(0,s.getApps)().length&&C(D);var te=`firebase-os:chunk-reloaded`,ne=400,re=()=>{try{return sessionStorage.getItem(te)===`1`}catch{return!0}},O=()=>+!re(),k=e=>{let t=String(e?.message??e??``).toLowerCase();return t.includes(`dynamically imported module`)||t.includes(`error loading dynamically imported module`)||t.includes(`failed to fetch dynamically imported module`)||t.includes(`importing a module script failed`)||t.includes(`loading chunk`)||t.includes(`loading css chunk`)},ie=e=>new Promise(t=>setTimeout(t,e));function A(e){if(re())return!1;try{sessionStorage.setItem(te,`1`)}catch{}return e?e():typeof window<`u`&&window.location.reload(),!0}function j(e,t={}){let n=t.pause??ne;return(0,a.lazy)(async()=>{try{return await e()}catch(r){if(!k(r))throw r;await ie(n);try{return await e()}catch(e){throw k(e)&&A(t.reload)&&await new Promise(()=>{}),e}}})}var M=`Part of the app did not load`,N=`A piece of this page never arrived — usually a connection that dropped, or a new version of your app being published while this tab was open. Reloading picks up the new one.`,ae=e=>{let t=e?.code??e?.error?.code??``;return typeof t==`string`?t.toLowerCase():``},P=e=>{let t=e?.message??e??``;return String(t).toLowerCase()},F=()=>typeof navigator<`u`&&navigator.onLine===!1,I=`A picture here is drawn the slow way`,oe=`A picture on this page is drawn by hand. Paste the message to your assistant.`,se=`firebaseOsHandDrawn`;function L(e){return Object.assign(Error(e),{[se]:!0})}var R=`Something your assistant wrote could not open`,z=`firebaseOsOwnFile`;function ce(e,t){return Object.assign(Error(t),{[z]:!0,firebaseOsShort:e})}var le=`firebaseOsSaid`;function B(e,t=`again`){return Object.assign(Error(e),{[le]:!0,firebaseOsNext:t})}var ue=e=>e?.[le]===!0,de=e=>{if(e?.code)return null;let t=typeof e?.message==`string`?e.message.trim():``;return t.length<20||t.length>220||!/^[A-Z]/.test(t)||!/[.!]$/.test(t)||t.split(/\s+/).length<4||/insufficient permissions|firebase|firestore|storage bucket|quota|websocket/i.test(t)||/\bundefined\b|\bnull\b|\bNaN\b|Error\b|\bfunction\b|=>|[{}<>[\]$_]|\.[a-z]{2,4}\b(?!\s)|https?:\/\/|[a-z]+\/[a-z-]+|\(reading|\bis not a\b/.test(t)?null:t},fe=(e,t)=>e===`auth/network-request-failed`||e===`unavailable`||e===`storage/retry-limit-exceeded`||t.includes(`failed to fetch`)||t.includes(`load failed`)||t.includes(`networkerror`)||t.includes(`network request failed`)||t.includes(`err_internet_disconnected`)||t.includes(`could not be reached`)||t.includes(`the server could not be reached`),pe={kind:`offline`,title:`No connection`,message:`This device is not online just now, so that could not go through. Nothing you have typed has been lost — check your connection, then try again.`,short:`No connection just now — check it, then try again.`,next:`again`},me={kind:`signedOut`,title:`You have been signed out`,message:`Your sign-in ran out while this page was open. Sign in again and you will come straight back to what you were doing.`,short:`Your sign-in ran out. Sign in again to carry on.`,next:`signin`},he={kind:`notAllowed`,title:`Not allowed`,message:`Your account is not allowed to do that here. If you were signed in a moment ago, signing in again usually puts it right — if not, ask whoever runs this app.`,short:`Your account is not allowed to do that here.`,next:`signin`},ge={kind:`unreachable`,title:`Cannot reach the app right now`,message:`The app did not answer. This is almost always a moment on the line rather than anything you did — try again in a moment.`,short:`The app did not answer. Try again in a moment.`,next:`again`},_e={kind:`slow`,title:`That took too long`,message:`No answer came back in time. Nothing has been changed — try again.`,short:`That took too long. Nothing was changed — try again.`,next:`again`},ve={kind:`busy`,title:`Too many tries just now`,message:`This app has been asked for a great deal in a short time. Give it a minute or two, then try again.`,short:`Too many tries just now. Wait a minute, then try again.`,next:`again`},ye={kind:`gone`,title:`That is not there any more`,message:`Whatever this was showing has been removed, or moved somewhere else. Reloading shows what is there now.`,short:`That is not there any more.`,next:`reload`},be={kind:`noRoom`,title:`There is no room left`,message:`This app's storage is full, so the file could not be kept. Trying again will not help — whoever runs this app has to make room first.`,short:`This app's storage is full, so the file could not be kept.`,next:`none`},xe={kind:`notReady`,title:`That is not ready yet`,message:`Something this page needs has not finished being set up. Try again in a moment, and if it keeps happening tell whoever runs this app.`,short:`That is not ready yet. Try again in a moment.`,next:`again`},Se={kind:`stopped`,title:`That stopped part-way`,message:`It did not finish, so nothing was changed. Try again.`,short:`That stopped part-way, so nothing was changed.`,next:`again`},Ce={kind:`tooBig`,title:`That file is too big`,message:`The file is larger than this app can take. A smaller one — or the same picture saved at a lower size — will go through.`,short:`That file is too big for this app. Try a smaller one.`,next:`none`},we={kind:`unknown`,title:`That did not work`,message:`Something went wrong and the app stopped short. Nothing you have typed has been lost — try again, and reload the page if it keeps happening.`,short:`That did not work. Nothing you typed has been lost — try again.`,next:`again`};function Te(e){let t=ae(e),n=P(e);if(e?.[se]===!0)return{kind:`drawnByHand`,title:I,message:String(e?.message||``),short:oe,next:`none`};if(e?.[z]===!0)return{kind:`ownFileBroken`,title:R,message:String(e?.message||``),short:String(e?.firebaseOsShort||``),next:`none`};if(ue(e)){let t=String(e?.message||``);return{kind:`said`,title:`That did not work`,message:t,short:t,next:e?.firebaseOsNext??`again`}}if(k(e))return{kind:`missingPart`,title:M,message:N,short:`Part of this page did not load. Reload the page.`,next:`reload`};let r=de(e);return r?{kind:`said`,title:`That did not work`,message:r,short:r,next:`again`}:F()||fe(t,n)?pe:t===`unauthenticated`||t===`auth/user-token-expired`||t===`auth/user-disabled`||t===`auth/requires-recent-login`||t===`auth/user-signed-out`||t===`auth/invalid-user-token`||t===`auth/null-user`?me:t===`permission-denied`||t===`storage/unauthorized`||t===`storage/unauthenticated`||n.includes(`missing or insufficient permissions`)?he:t===`deadline-exceeded`||n.includes(`timeout`)||n.includes(`timed out`)?_e:t===`resource-exhausted`||t===`auth/too-many-requests`||t===`storage/quota-exceeded`||n.includes(`too many requests`)?t===`storage/quota-exceeded`?be:ve:t===`not-found`||t===`storage/object-not-found`?ye:t===`failed-precondition`||n.includes(`requires an index`)?xe:t===`cancelled`||t===`aborted`||t===`storage/canceled`||n.includes(`aborted`)?Se:n.includes(`exceeds the maximum`)||n.includes(`file is too large`)||n.includes(`payload too large`)?Ce:t===`internal`||t===`unknown`||t===`storage/unknown`||t===`data-loss`?ge:we}function Ee(e,t){let n=Te(e);return t&&n.kind===`unknown`?t:n.short}var De={again:`Try again`,reload:`Reload the page`,signin:`Sign in again`,none:`Reload the page`},Oe=1e4,ke=new Map;function Ae(e,t,n,r){let i=ke.get(e);if(i&&i.refused!==void 0&&Date.now()-i.refusedAt>Oe&&(ke.delete(e),i=void 0),!i){let n={subscribers:new Set,stop:()=>{},last:null,refused:void 0,refusedAt:0};ke.set(e,n),n.stop=(0,l.onSnapshot)(t(),e=>{n.last=e,n.refused=void 0,n.subscribers.forEach(t=>je(()=>t.next(e)))},e=>{n.refused=e,n.refusedAt=Date.now(),n.subscribers.forEach(t=>je(()=>t.fail(e)))}),i=n}let a={next:n,fail:r};return i.subscribers.add(a),i.last?je(()=>n(i.last)):i.refused!==void 0&&je(()=>r(i.refused)),()=>{let t=ke.get(e);!t||!t.subscribers.delete(a)||t.subscribers.size===0&&(t.stop(),ke.delete(e))}}function je(e){try{e()}catch(e){console.error(`A screen could not take a shared Firestore answer`,e)}}var Me=[`user`,`internal`,`admin`],Ne=e=>Me.includes(e),Pe={user:`Members`,internal:`Your team`,admin:`Admins`},Fe={user:`user-round`,internal:`users`,admin:`shield`},Ie=`id-card`,Le=[],Re={},ze={},Be=e=>{Le=e},Ve=()=>Le,He=e=>{Re=e},Ue=e=>{ze=e},We=e=>Ne(e)&&String(ze[e]||``).trim()||``,Ge=e=>Ne(e)&&String(Re[e]||``).trim()||``,Ke=(e,t=Ve())=>t.find(t=>t.id===e)?.name||Ge(e)||(Ne(e)?Pe[e]:``)||e,qe=(e=Ve())=>[...Me.map(t=>({id:t,name:Ke(t,e)})),...e.map(e=>({id:e.id,name:e.name}))],Je=null,Ye=new Set,Xe=null,Ze=0,Qe=!1,$e=0,et=6e4,tt=null,nt=!1,rt=e=>{let t=typeof e==`string`?e.trim().toLowerCase():``;return/^[a-z]{3}$/.test(t)?t:null};function it(e){let t=rt(e?.currency);if(!t&&e?.configured===!0&&ct(),t!==Je){Je=t;for(let e of[...Ye])e()}}function at(){return Je}function ot(){return Je||`usd`}function st(e=!1){if(Xe&&!e)return Xe;let t=++Ze,n=Promise.resolve().then(()=>fetch(`/api/payments/status`)).then(e=>($e=Number(e.status)||0,e.json())).then(e=>(t===Ze&&it(e),e));Xe=n;let r=()=>{Xe===n&&(Xe=null)};return n.then(r,r),n}function ct(){tt||nt||(tt=setTimeout(()=>{tt=null,nt=!0,st(!0).catch(()=>{})},et))}async function lt(){if(!Je)try{await st(!0)}catch{}return Je!==null}var ut=`The prices have just been updated — check them and press Pay again.`;function dt(){Je||Xe||Qe||(Qe=!0,st().catch(e=>{(e instanceof TypeError||$e>=500)&&(Qe=!1)}))}var ft=e=>(Ye.add(e),()=>{Ye.delete(e)});function pt(){return(0,a.useEffect)(dt,[]),(0,a.useSyncExternalStore)(ft,at,at)}var mt=`sys_payments`,ht=`_settings`,gt=()=>({on:!1,amount:``,priceId:``,livePriceId:``}),_t=()=>({name:``,description:``,monthly:{...gt(),on:!0},yearly:gt(),roleId:``}),vt=()=>({name:``,amount:``}),yt=e=>({id:e,name:``,description:``,kind:``,amount:``,items:[],plans:[],how:``,pageIds:[],customNote:``,customPath:``,createdAt:Date.now()}),bt=e=>e.kind===`once`?e.items.length?e.items:e.name.trim()||e.amount.trim()?[{name:e.name,amount:e.amount}]:[]:[],xt=e=>{let t=Number(String(e||``).trim().replace(/[^0-9.]/g,``));return Number.isFinite(t)&&t>0?t:null},St=e=>({on:!!e?.on,amount:String(e?.amount||``),priceId:String(e?.priceId||``),livePriceId:String(e?.livePriceId||``)}),Ct=e=>/^(no|none|nothing|n\/?a|nothing needed|nothing else|-)[.!]*$/i.test(e.trim()),wt=e=>/[.!?]$/.test(e)?e:`${e}.`,Tt=e=>{let t=[],n=String(e?.how||``),r=String(e?.collect||``).trim();r&&!Ct(r)&&t.push(`Before paying, the buyer tells me: ${wt(r)}`);let i=String(e?.after||``).trim();if(i&&t.push(`After they pay: ${wt(i)}`),Array.isArray(e?.plans))for(let n of e.plans){let e=String(n?.name||``).trim()||`The plan`,r=String(n?.features||``).trim(),i=String(n?.sees||``).trim();r&&t.push(`${e} unlocks: ${wt(r)}`),i&&t.push(`Someone on ${e} sees: ${wt(i)}`)}return t.length?[...n.trim()?[wt(n.trim())]:[],...t].join(` `):n},Et=(e,n)=>{let r=n?.kind===`once`||n?.kind===`subscription`?n.kind:``,i=Array.isArray(n?.items)?n.items.map(e=>({name:String(e?.name||``),amount:String(e?.amount||``)})):[],a=String(n?.name||``),o=String(n?.amount||``);return r===`once`&&!i.length&&(a.trim()||o.trim())&&(i=[{name:a,amount:o}],a=``,o=``),{id:e,name:a,description:String(n?.description||``),kind:r,amount:o,items:i,plans:Array.isArray(n?.plans)?n.plans.map(e=>({name:String(e?.name||``),description:String(e?.description||``),monthly:St(e?.monthly),yearly:St(e?.yearly),roleId:t.Dn(e?.roleId)?String(e.roleId):``})):[],how:Tt(n),pageIds:Array.isArray(n?.pageIds)?n.pageIds.map(e=>String(e||``)).filter(Boolean):[],customNote:String(n?.customNote||``),customPath:String(n?.customPath||``),createdAt:typeof n?.createdAt==`number`?n.createdAt:void 0}},Dt=e=>/^price_[A-Za-z0-9]+$/.test(e.trim()),Ot=(e,t=pn())=>t?e.livePriceId:e.priceId;function kt(e,t=pn()){if(!e.kind)return`Say how it is paid — once, or a subscription.`;if(e.kind===`once`){let t=bt(e);if(!t.length)return`Add something to sell — a name and a price.`;for(let e of t){let t=e.name.trim();if(xt(e.amount)===null)return`Give ${t||`it`} a price — just a number, like 25.`;if(!t)return`Give it a name, the way a buyer should read it.`}return``}if(!e.plans.length)return`Add at least one plan.`;for(let n of e.plans){let e=n.name.trim()||`each plan`;if(!n.name.trim())return`Give each plan a name.`;if(!n.monthly.on&&!n.yearly.on)return`Turn on monthly or yearly for ${e}.`;for(let[r,i]of[[`monthly`,n.monthly],[`yearly`,n.yearly]])if(i.on){if(xt(i.amount)===null)return`Give ${e} its ${r} price — just a number.`;if(!Dt(Ot(i,t)))return t?`Paste the live ${r} price id for ${e} — live mode is a fresh Stripe catalogue, so the price is made again there. Your test id is kept.`:`Paste the ${r} price id for ${e} — the steps above say where it comes from in Stripe.`}}return``}var At=(e,t=pn())=>kt(e,t)===``,jt=e=>e.kind===`subscription`&&e.plans.length>0&&e.plans.every(e=>e.name.trim()!==``&&(e.monthly.on||e.yearly.on)&&(!e.monthly.on||xt(e.monthly.amount)!==null)&&(!e.yearly.on||xt(e.yearly.amount)!==null));function Mt(e){let t=e.name.trim();if(t)return t;let n=bt(e).map(e=>e.name.trim()).filter(Boolean);if(n.length===1)return n[0];if(n.length>1){let e=n.slice(0,3),t=n.length>3?`more`:e.pop();return`${e.join(`, `)} and ${t}`}return`this product`}function Nt(e){let t=e.name.trim();if(!e.kind)return t?`${t} — say how it is paid`:`A new product — say how it is paid`;if(e.kind===`once`){let n=bt(e);if(n.length<=1){let e=n[0],r=e?.name.trim()||t,i=e?.amount.trim();return`${r||`A new product`}${i?` — ${i}, paid once`:` — paid once`}`}return`${t||n.map(e=>e.name.trim()).filter(Boolean).slice(0,3).join(`, `)||`A new product`} — ${n.length} things, paid once`}let n=e.plans.length;return`${t||`A new subscription`} — a subscription${n?`, ${n} plan${n===1?``:`s`}`:``}`}function Pt(e,t,n=pn()){let r=e.name.trim(),i=`${t.name.trim()||`this plan`}${r?` — ${r}`:``}`,a=t.description.trim(),o=t.monthly.on&&t.yearly.on,s=t.monthly.on?t.monthly:t.yearly,c=t.monthly.on?`Monthly`:`Yearly`,l=[n?`In your Stripe dashboard, switch Test mode OFF — live mode is its own catalogue, so the plan is made once more there. Then open Product catalogue and click Add product.`:`In your Stripe dashboard, open Product catalogue and click Add product.`,`Name it "${i}"${a?` and paste your one-liner into the Description box: "${a}"`:``}.`,`On the same form, choose Recurring, type ${s.amount.trim()||`…`} as the amount, set the billing period to ${c}, and click Add product to save.`,o?`Click the product you just made, then click its ${c.toLowerCase()} price. The price id — it starts with price_ — sits in the top right corner: copy it and paste it into the ${c.toLowerCase()} box below.`:`Click the product you just made, then click the price inside it. The price id — it starts with price_ — sits in the top right corner: copy it and paste it into the box below.`];return o&&l.push(`Go back to the product. In its Pricing section click + to add a second price: Recurring, ${t.yearly.amount.trim()||`…`} as the amount, billing period Yearly — save it.`,`Click that yearly price, copy its id from the top right corner, and paste it into the yearly box below.`),l}var Ft=e=>e.includes(`'`)?`"${e}"`:`'${e}'`,It=(e=at())=>e?` currency='${e}'`:``,Lt=`Every payment goes through the app's own pieces — a <BuyButton> for one thing bought, a <Basket> for a basket of them — never a checkout, a card form or Stripe code of your own. The button's words, colour and place on the page are yours to design.`,Rt=(e,t=pn())=>{let n=e.name.trim()||`this product`,r=e.description.trim();if(e.kind===`once`){let t=bt(e),r=e=>`<BuyButton amount={${xt(e.amount)??0}}${It()} productName=${Ft(e.name.trim())}>`;if(t.length<=1){let i=t[0]||{name:e.name,amount:e.amount};return[`It sells ${i.name.trim()||n} for ${i.amount.trim()}, paid once: ${r(i)}.`]}let i=e.name.trim();return[`It sells ${t.length} things${i?` under ${i}`:``}, each paid once with its own button:`,...t.map(e=>`${e.name.trim()||`Something`} for ${e.amount.trim()}: ${r(e)}.`)]}let i=[`It sells ${n}${r?` (${r})`:``} as a subscription, and its whole pricing section is ONE piece of my app: <Plans product='${e.id}' /> from 'your-ai-workflow-firebase-os'. It reads the plans, what each includes, the prices and the Stripe ids from my Payments screen as they stand — so type no plan, price or id into the page — offers a monthly/yearly switch where a plan has both, and each plan's button asks who is paying and goes on to Stripe. Add featured='a plan's name' to draw one forward, and phone / address when my words ask for them. The heading over it and the words round it are yours. Only if my words ask for a layout it cannot give, read the same plans with usePlans('${e.id}') and buy each with a <BuyButton>. What it sells, so the words round it are right:`];for(let t of e.plans){let e=t.name.trim()||`Plan`,n=t.description.trim(),r=[];t.monthly.on&&r.push(`${t.monthly.amount.trim()} per month`),t.yearly.on&&r.push(`${t.yearly.amount.trim()} per year`);let a=t.roleId?` Buying it makes the buyer my ${Ke(t.roleId)} role — userRole '${t.roleId}'.`:``;i.push(`${e}${n?` (${n})`:``} — ${r.join(` or `)}.${a}`)}return i},zt=`Who is paying is asked by the button ITSELF: the press of a <BuyButton> from 'your-ai-workflow-firebase-os' opens one small window that says what is being bought, asks who is paying and goes straight on to Stripe. So NEVER a <BuyerDetails> and a <PayButton> put together by you, never a form or a *Form.config.ts to ask who is paying, never a name, email, phone or <AddressField> box of your own, and no delivery step of your own: that asks the buyer twice. It asks a buyer who is not signed in for their name and email, and for a phone number or the address when you pass phone / address on the button (true to require it, 'optional' to offer it — pass them when my words ask for them, and address whenever something is delivered), and makes them an account there and then, signed in on this device; a signed-in buyer is asked only for what is missing, and one the app already knows sees one line saying who is paying and the button. Who they are rides onto the payment by itself and reads beside it on my Transactions screen. Anything else my words ask before paying — a note, a chosen session, a size — is a box or a choice of your own on the page (it is not a form: nothing is sent anywhere) whose answer goes into the button's metadata as a plain string, and disabled on the button holds it back until it is chosen. Never ask for their email twice, and never build a backend of your own for it: the app tells them and me in the bell when the payment happens.`,Bt=`Put what was bought into the button's metadata as well, whenever the page knows more than productName says — a basket, a chosen plan, options, a quantity, hours: items as one line per thing (quantity, name, the options chosen and its price — '2 × Blazer, Noir Black, size M — 240; 1 × Belt — 60', joined with '; '), total as the number charged, and delivery, discount or whatever else made up the amount under a key each. Every value a plain string under 500 characters, never an object or an array. My Transactions screen shows those under What they bought, so a payment there says what the money was for and not only how much.`,Vt=/\b(?:unlock(?:s|ed)?|access|credits?|extra|top[- ]?up|added to (?:their|the) (?:count|balance|account)|download(?:s|able)?|members?hip|premium|lifetime|licen[cs]e|seats?)\b/i,Ht=e=>`What this buyer has already bought is the app's to tell: const mine = useMyPayments() from 'your-ai-workflow-firebase-os' — { loading, active, payments }, each payment with its productName, its amount and when it was paid — so whatever a paid ${e} unlocks, adds or counts is worked out from the payments whose productName is ${e} (how many, and when), shown as words and numbers, and it refreshes by itself the moment <CheckoutReturn> says paid. That is presentation, not protection: anything genuinely paid for — a file, a secret — must come from the server, and nothing is written onto a record by hand to remember a purchase.`,Ut=`Show and hide what a plan unlocks with the app's own useMyPayments() — it returns { loading, active, subscriptions, payments } — and that is presentation, not protection: anything genuinely paid, like a file or a secret, must come from the server.`,Wt=`A plan's role is given the moment the buyer pays and taken back when the subscription ends — the app does both itself, so build neither. What that plan unlocks is what its role opens: a page kept for the role, and anything a page shows to it — read const { userRole } = useAuth() from 'your-ai-workflow-firebase-os' and compare it with the role's word above. Gate that by the role, never with useMyPayments().`,Gt=`This plan gives its buyer a role, and a role belongs to an ACCOUNT — so anybody buying it here needs one. Check with useAuth() from 'your-ai-workflow-firebase-os': for somebody who is not signed in, put a link to /login where the buy button would be, saying they sign in first and come straight back. If you leave the button there for them as well, say beside it that they must use the same email address when they register, or what they have paid for opens nothing. This is only about a plan that gives a role — a one-off payment and a plan without one are bought by anybody, signed in or not.`;function Kt(e,t=``,n=pn()){let r=[...Rt(e,n)],i=e.how.trim();return i&&r.push(`Here is how this payment should work, start to finish: ${i}`),r.push(zt,Bt),e.kind===`once`&&Vt.test(i)&&r.push(Ht(bt(e).map(e=>`'${e.name.trim()}'`).join(` or `))),e.kind===`subscription`&&(e.plans.some(e=>e.roleId)&&r.push(Wt),e.plans.some(e=>!e.roleId)&&r.push(Ut)),r.push(...Jt(t)),r}var qt=`What happens when they come back from paying is my app's own as well: write <CheckoutReturn /> from the same package ONCE near the top of the page, outside any window or step. It asks the server whether the money really moved and only then thanks them; give it orderPath='/billing' — the app's own page where what they bought is — unless my words name another page of mine they go to afterwards, and then that page's address. Never read session_id off the web address, never call confirmPayment, and never build a thank-you, an order confirmation, a receipt or a notification of your own: my app emails the buyer their receipt and me my sale alert by itself, and the bell tells them their order is placed and tells me a payment came in — so nothing about email goes in the button's metadata. Never send them to /login or /register after paying, and never make anybody sign in BEFORE they pay: somebody whose email already has an account pays as a guest and is emailed their way in afterwards.`;function Jt(e){return[`Set each button's successPath to ${e||`the page the button is on`} so the buyer lands back where they paid — that is the page <CheckoutReturn> is on, and the only place the payment is checked.`,qt]}var Yt=e=>e===`internal`||e===`admin`,Xt=e=>Array.isArray(e?.links)?e.links.map(e=>({pageId:String(e?.pageId||``),how:String(e?.how||``)})):[],Zt=(e,t)=>t.find(t=>t.id===e)||t.find(t=>String(t.config?.contentKey||``).trim()===e),Qt=(e,t)=>e===t.id||e===String(t.config?.contentKey||``).trim();function $t(e){return e.how.trim()?``:`Describe how this payment will work.`}var en=(e,t)=>e.pageIds.some(e=>Qt(e,t)),tn=(e,t)=>en(e,t)?e.pageIds.filter(e=>!Qt(e,t)):[...e.pageIds,t.id],nn=`What people paid is mine and my admins' alone: the app refuses everybody else the sales outright, so never call useSales() on this page and never put an amount on it. Show what an admin's own page has recorded about a sale — the name, what they bought, when — and if what I asked for cannot be built without the amounts, say so plainly in your reply: the page has to be kept for Admins for that. This page never sells — no <PayButton> on it.`,rn="Read the sales on it with the app's own useSales() from 'your-ai-workflow-firebase-os' — it returns { loading, charges, subscriptions, error } live from my Stripe account: who paid, for what, when, and each subscription's current status. Show `error` when it is set. Design the list however fits; never write Stripe code, a backend or an export of your own for it. This page never sells — no <PayButton> on it.",an=e=>`/payments?new=subscription&page=${encodeURIComponent(e)}`,on=(e,t)=>`/payments?open=${encodeURIComponent(e)}&page=${encodeURIComponent(t)}`,sn=(e,t)=>`/pages/${encodeURIComponent(e)}?addPayment=${encodeURIComponent(t)}`,cn=[],ln=!1,un=e=>{cn=e},dn=()=>cn,fn=e=>{ln=e},pn=()=>ln;function mn(e){let t=[];for(let n of e)if(n.kind===`subscription`)for(let e of n.plans)for(let[r,i]of[[`monthly`,e.monthly],[`yearly`,e.yearly]]){if(!i.on)continue;let a=i.priceId.trim(),o=i.livePriceId.trim();Dt(o)&&Dt(a)&&a!==o&&t.push({product:n.name.trim()||`a subscription`,plan:e.name.trim()||`its plan`,word:r,from:a,to:o})}return t}function hn(e=dn()){let t=mn(e),n=[`My Stripe account has switched from test mode to live mode. I have already replaced the keys in Secrets — do not touch any keys or write any Stripe code of your own.`];return t.length?n.push(`In my pages, every <BuyButton> or <PayButton> with a priceId still carries a test price id. Swap each one for its live id and change nothing else about the button:`,...t.map(e=>`For ${e.product}, ${e.plan} (${e.word}): replace '${e.from}' with '${e.to}'.`),`Buttons that use amount={…} instead of a priceId need no change, and neither does a pricing section drawn with <Plans> — it reads the live ids itself.`):n.push(`No price id in my pages needs to change — buttons that use amount={…} never had one.`),n.push(`Then rebuild the app so it runs with the live keys and ids.`),n.join(`
|
|
2
|
-
`)}var gn=`admin_keys`,_n=`plans`,vn=()=>({planUntil:(0,l.deleteField)(),planPass:(0,l.deleteField)()}),yn=e=>typeof e?.planUntil==`number`&&e.planUntil>0?e.planUntil:0,bn=e=>yn(e)>0,xn=e=>yn(e);function Sn(e){if(!e)return!1;if(bn(e))return!0;let t=e.role;return t==null||t===`user`||t===`free`}function Cn(e,t=Date.now()){let n=e?.role?String(e.role):`user`,r=yn(e);return r&&t>=r?`user`:n}function wn(e,n){if(!Sn(e))return null;let r=String(n?.role||``);return r?!t.Dn(r)||typeof n?.until!=`number`||typeof n?.pass!=`string`||e.role===r&&e.planUntil===n.until?null:{role:r,planUntil:n.until,planPass:n.pass}:bn(e)?{role:`user`,...vn()}:null}async function Tn(e,n){try{let r=g?.currentUser;if(!r||r.uid!==e||!t.un(r)||typeof fetch!=`function`)return;let i=(0,l.doc)(_,`user_profiles`,e),a=n??(await(0,l.getDoc)(i)).data();if(!Sn(a))return;let o=await r.getIdToken(),s=await fetch(`/api/payments/plan-role`,{headers:{Authorization:`Bearer ${o}`}});if(!s.ok)return;let c=wn(a,await s.json());c&&await(0,l.updateDoc)(i,c)}catch{}}function En(e){let[t,n]=(0,a.useState)(Dn);return(0,a.useEffect)(()=>{let t=!1,r=()=>{t||n(()=>e)},i=setTimeout(r,On);return(async()=>{let e=g?.currentUser;if(!e||typeof fetch!=`function`)return;let n=await fetch(`/api/payments/plan-key`,{headers:{Authorization:`Bearer ${await e.getIdToken()}`}});if(!n.ok||t)return;let r=String((await n.json())?.key||``);if(!r)return;let i=(0,l.doc)(_,gn,_n),a=await(0,l.getDoc)(i);!t&&a.data()?.key!==r&&await(0,l.setDoc)(i,{key:r})})().catch(()=>{}).finally(()=>{clearTimeout(i),r()}),()=>{t=!0,clearTimeout(i)}},[e]),{ready:t===e}}var Dn=Symbol(`not yet`),On=5e3;function kn(e){let t={};for(let n of e)if(n.kind===`subscription`)for(let e of n.plans){if(!e.roleId)continue;let r=e.name.trim()||n.name.trim()||`A plan`,i=t[e.roleId]||=[];i.includes(r)||i.push(r)}return t}function An(){let[e,t]=(0,a.useState)({});return(0,a.useEffect)(()=>Ae(mt,()=>(0,l.collection)(_,mt),e=>{let n=[];e.forEach(e=>{e.id!==`_settings`&&n.push(Et(e.id,e.data()))}),t(kn(n))},()=>{}),[]),e}var jn=null,Mn=null,Nn=`fbos:payment-news`;function Pn(){jn=null,Mn=null,typeof window<`u`&&window.dispatchEvent(new Event(Nn))}async function Fn(){try{return await g?.currentUser?.getIdToken()||null}catch{return null}}function In(e,t){if(e==null||!Number.isFinite(e))return``;let n=String(t||``).toUpperCase();if(!n)return String(e);try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:n}).format(e)}catch{return`${e} ${n}`}}function Ln(e,t=!0){let n=[];return t&&n.push(String(e.name||e.email||``).trim()),n.push(In(e.amount,e.currency)),n.push(String(e.productName||``).trim()),n.filter(Boolean).join(` · `)}function Rn(e){let t=String(e?.id||``);if(!t||e?.paid===!1||e?.refunded===!0)return null;let n=Number(e?.created),r=e?.amount!=null&&Number.isFinite(Number(e.amount))?Number(e.amount):null;return{id:t,at:Number.isFinite(n)?n>0xe8d4a51000?n:n*1e3:0,amount:r,currency:e?.currency?String(e.currency):null,name:e?.name?String(e.name):null,email:e?.email?String(e.email):null,productName:e?.productName||e?.description?String(e.productName||e.description):null,page:e?.page?String(e.page):null}}async function zn(e,t,n){try{let r=await fetch(e,{headers:t?{Authorization:`Bearer ${t}`}:{}});if(!r.ok)return[];let i=await r.json();return(Array.isArray(i?.[n])?i[n]:[]).map(Rn).filter(e=>!!e)}catch{return[]}}var Bn=(e,t)=>!!e&&e.key===t&&Date.now()-e.at<6e4;function Vn(e){if(Bn(jn,e))return jn.promise;let t=Fn().then(e=>e?zn(`/api/payments/recent`,e,`payments`):[]);return jn={key:e,at:Date.now(),promise:t},t}function Hn(e){if(Bn(Mn,e))return Mn.promise;let t=Fn().then(e=>e?zn(`/api/payments/me`,e,`payments`).then(e=>e.filter(e=>e.at>0)):[]);return Mn={key:e,at:Date.now(),promise:t},t}function Un(e,t,n){let[r,i]=(0,a.useState)([]);return(0,a.useEffect)(()=>{if(!t||!n)return;let r=!1,a=0,o=()=>{let n=++a;(e===`sales`?Vn(t):Hn(t)).then(e=>{!r&&n===a&&i(e)})};o();let s=()=>{(typeof document>`u`||document.visibilityState===`visible`)&&o()};return typeof document<`u`&&document.addEventListener(`visibilitychange`,s),typeof window<`u`&&(window.addEventListener(`focus`,s),window.addEventListener(Nn,o)),()=>{r=!0,typeof document<`u`&&document.removeEventListener(`visibilitychange`,s),typeof window<`u`&&(window.removeEventListener(`focus`,s),window.removeEventListener(Nn,o))}},[e,t,n]),t&&n?r:Wn}var Wn=[],Gn=`Could not reach the server. Check your connection and try again.`,Kn={goTo(e){window.location.href=e}},qn=`/api/payments/webhook`,Jn=e=>e?`${e.replace(/\/$/,``)}${qn}`:``;async function Yn(){try{let e=g?.currentUser;if(!e)return null;let t=e.emailVerified===!0&&(await e.getIdTokenResult?.())?.claims?.email_verified!==!0;return await e.getIdToken(t||void 0)}catch{return null}}function Xn(e){return e?{Authorization:`Bearer ${e}`}:{}}async function Zn(e,t){try{let t=await e.json();if(t&&typeof t.error==`string`&&t.error)return t.error}catch{}return t}async function Qn(e){let t=await $n(e);return typeof t==`string`?t:(Kn.goTo(t.url),null)}async function $n(e){try{let t=await Yn(),n=await fetch(`/api/payments/checkout`,{method:`POST`,headers:{"Content-Type":`application/json`,...Xn(t)},body:JSON.stringify({...e,origin:window.location.origin})});if(!n.ok)return await Zn(n,`The payment could not be started. Please try again.`);let r=await n.json();return r?.url?{sessionId:String(r.sessionId||``),url:String(r.url)}:`The payment could not be started. Please try again.`}catch{return Gn}}async function er(){let e=await Yn();if(!e)return`Sign in to manage your plan.`;try{let t=await fetch(`/api/payments/portal`,{method:`POST`,headers:{"Content-Type":`application/json`,...Xn(e)},body:JSON.stringify({origin:window.location.origin})});if(!t.ok)return await Zn(t,`The billing portal could not be opened.`);let n=await t.json();return n?.url?(Kn.goTo(String(n.url)),null):`The billing portal could not be opened.`}catch{return Gn}}var tr=e=>!e.paid&&!e.error&&e.status===`complete`&&e.paymentStatus===`unpaid`;async function nr(e,t={}){let n={paid:!1,paymentStatus:null,amountTotal:null,currency:null,customerEmail:null,metadata:{},error:null};if(!e)return{...n,error:`No payment session to confirm.`};try{let r=await fetch(`/api/payments/session/${encodeURIComponent(e)}`);if(!r.ok)return{...n,error:await Zn(r,`That payment could not be found.`)};let i=await r.json();return i?.paid===!0&&!t.quiet&&(Dr(),Pn()),{paid:i?.paid===!0,paymentStatus:i?.paymentStatus??null,amountTotal:i?.amountTotal??null,currency:i?.currency??null,customerEmail:i?.customerEmail??null,receipt:i?.receipt===!0,receiptLater:i?.receiptLater===!0,metadata:i?.metadata||{},error:null,status:typeof i?.status==`string`?i.status:null,holdPasses:i?.holdPasses&&typeof i.holdPasses==`object`?i.holdPasses:{}}}catch{return{...n,error:Gn}}}var rr={configured:!1,mode:null},ir=5e3,ar=null,or=!1,sr=null,cr=new Set,lr=0,ur=null,dr=(e,t)=>!!e&&e.configured===t.configured&&e.mode===t.mode&&!!e.connected==!!t.connected;function fr(e){if(dr(sr,e)){sr=e;return}sr=e;for(let t of[...cr])t(e)}var pr=e=>({configured:e?.configured===!0&&e?.enabled!==!1,mode:e?.mode===`live`||e?.mode===`test`?e.mode:null,connected:e?.configured===!0});function mr(){if(!ar){let e=or;or=!1;let t=()=>ar||sr||mr(),n=st(e).then(e=>{let r=pr(e);return ar===n?(fr(r),r):t()}).catch(()=>ar===n?(ar=null,fr(rr),rr):t());ar=n}return ar}function hr(){ar=null,cr.size&&mr()}function gr(){ar=null,sr=null,or=!0,cr.size&&mr()}function _r(e){it(e);let t=pr(e);dr(sr,t)||(ar=Promise.resolve(t),fr(t))}var vr=()=>{typeof document<`u`&&document.visibilityState!==`visible`||sr?.configured||hr()};function yr(){ur||=setInterval(()=>{if(!lr||sr?.configured){br();return}typeof document<`u`&&document.visibilityState===`hidden`||hr()},ir)}function br(){ur&&clearInterval(ur),ur=null}function xr(e=!1){let[t,n]=(0,a.useState)(()=>sr?{loading:!1,...sr}:{loading:!0,...rr});return(0,a.useEffect)(()=>{let e=!1,t=t=>{e||n({loading:!1,...t})};return cr.add(t),cr.size===1&&typeof document<`u`&&document.addEventListener(`visibilitychange`,vr),mr().then(t),()=>{e=!0,cr.delete(t),!cr.size&&typeof document<`u`&&document.removeEventListener(`visibilitychange`,vr)}},[]),(0,a.useEffect)(()=>{if(e)return lr+=1,yr(),()=>{--lr,lr||br()}},[e]),t}var Sr=e=>String(e??``).trim(),Cr=e=>{let t={name:Sr(e?.name),phone:Sr(e?.phone),address:Sr(e?.address)};return t.name||t.phone||t.address?t:null};async function wr(){let e={active:!1,subscriptions:[],payments:[],buyer:null},t=await Yn();if(!t)return{...e,error:null};try{let n=await fetch(`/api/payments/me`,{headers:Xn(t)});if(!n.ok)return{...e,error:await Zn(n,`Your payments could not be loaded.`)};let r=await n.json();return{active:r?.active===!0,subscriptions:r?.subscriptions||[],payments:r?.payments||[],buyer:Cr(r?.buyer),error:null}}catch{return{...e,error:Gn}}}var Tr=null,Er=e=>e.subscriptions.length>0||e.payments.length>0;function Dr(){Tr=null}function Or(e){return(!Tr||Tr.uid!==e)&&(Tr={uid:e,promise:wr().then(e=>(e.error&&(Tr=null),{bought:Er(e),buyer:e.buyer,failed:!!e.error}))}),Tr.promise}var kr=e=>Or(e).then(e=>e.bought);async function Ar(e){if(!e||!(await mr()).configured)return null;let t=await Or(e);if(t.failed)throw Error(`The payments could not be read.`);return t.buyer}function jr(e){let[t,n]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(!e)return;let t=!1;return kr(e).then(r=>{t||n({uid:e,bought:r})}),()=>{t=!0}},[e]),e?t?.uid===e?{loading:!1,bought:t.bought}:{loading:!0,bought:!1}:{loading:!1,bought:!1}}var Mr=null,Nr=e=>{if(Mr&&Mr.uid===e)return Mr.promise;let t=wr().finally(()=>{Mr?.promise===t&&(Mr=null)});return Mr={uid:e,promise:t},t};function Pr(){let e=Wa()?.user?.uid||``,[t,n]=(0,a.useState)({loading:!0,active:!1,subscriptions:[],payments:[],error:null});return(0,a.useEffect)(()=>{let t=!1,r=g?.currentUser?.uid||e;return Nr(r).then(e=>{r&&!e.error&&(Tr={uid:r,promise:Promise.resolve({bought:Er(e),buyer:e.buyer,failed:!1})}),t||n({loading:!1,...e})}),()=>{t=!0}},[e]),t}function Fr(){let e=Wa()?.user?.uid||``,[t,n]=(0,a.useState)({loading:!0,charges:[],subscriptions:[],error:null});return(0,a.useEffect)(()=>{let e=!1,t=t=>{e||n({loading:!1,...t})};return(async()=>{let e=await Yn();if(!e)return t({charges:[],subscriptions:[],error:`Please sign in first.`});try{let n=await fetch(`/api/payments/sales`,{headers:Xn(e)});if(!n.ok)return t({charges:[],subscriptions:[],error:await Zn(n,`The sales could not be loaded.`)});let r=await n.json();return t({charges:r?.charges||[],subscriptions:r?.subscriptions||[],error:null})}catch{return t({charges:[],subscriptions:[],error:Gn})}})(),()=>{e=!0}},[e]),t}async function Ir(e){try{let t=await Yn(),n=await fetch(`/api/payments/booking-checkout`,{method:`POST`,headers:{"Content-Type":`application/json`,...Xn(t)},body:JSON.stringify({...e,origin:window.location.origin})});if(!n.ok)return await Zn(n,`The payment could not be started. Please try again.`);let r=await n.json();return r?.url?{sessionId:String(r.sessionId||``),url:String(r.url),amount:Number(r.amount)||0}:`The payment could not be started. Please try again.`}catch{return Gn}}async function Lr(e,t=``){try{let n=await fetch(`/api/payments/booking-hold`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({bookingId:e,sessionId:t})});if(!n.ok)return await Zn(n,`That time could not be checked.`);let r=await n.json(),i=String(r?.state||``);if(i===`paid`||i===`free`){let e=String(r?.pass||``);return e?{state:i,pass:e}:`That time could not be checked.`}return i===`gone`||i===`kept`||i===`open`?{state:i}:`That time could not be checked.`}catch{return Gn}}var Rr=4e3,zr=e=>String(e??``).trim();function Br(e,t){return!t?.email||t.emailVerified!==!0||e?.removed===!0?!1:!zr(e?.displayName)&&!zr(t.displayName)}function Vr(e,t){if(!t||e?.removed===!0)return null;let n={};return t.name&&!zr(e?.displayName)&&(n.displayName=t.name),t.phone&&!zr(e?.phone)&&(n.phone=t.phone),t.address&&!zr(e?.address)&&(n.address=t.address),Object.keys(n).length?n:null}var Hr=`firebase-os:buyer-basics-asked`,Ur=e=>{try{return sessionStorage.getItem(`${Hr}:${e}`)===`1`}catch{return!1}},Wr=e=>{try{sessionStorage.setItem(`${Hr}:${e}`,`1`)}catch{}};async function Gr(e,t){if(Ur(e))return!1;let n=(async()=>{let n=g?.currentUser;if(!n||n.uid!==e||typeof fetch!=`function`)return!1;let r=Vr(t,await Ar(e));return Wr(e),r?(await(0,l.setDoc)((0,l.doc)(_,`user_profiles`,e),r,{merge:!0}),r.displayName&&g.currentUser?.uid===e&&(0,c.updateProfile)(g.currentUser,{displayName:r.displayName}).catch(()=>{}),!!r.displayName):!1})().catch(()=>!1),r=new Promise(e=>setTimeout(()=>e(!1),Rr));return Promise.race([n,r])}var Kr=e=>`fbos_verify_sent_${e}`,qr=e=>{if(!e)return!1;try{return localStorage.getItem(Kr(e))===`1`}catch{return!1}},Jr=e=>{if(e)try{localStorage.setItem(Kr(e),`1`)}catch{}},Yr=e=>{if(e)try{localStorage.removeItem(Kr(e))}catch{}};async function Xr(e){if(!e?.uid||!e.email)return`failed`;if(qr(e.uid))return`already`;try{return await(0,c.sendEmailVerification)(e),Jr(e.uid),`sent`}catch{return`failed`}}var Zr={collection:`sys_configs`,doc:`auth_methods`},Qr=[`Open console.firebase.google.com and pick your project.`,`In the menu on the left open Authentication, then the Sign-in method tab.`],$r=`https://console.firebase.google.com/`;function ei(){try{let e=g;return String(e?.app?.options?.authDomain||e?.config?.authDomain||``)}catch{return``}}var ti=e=>e?`https://${e}/__/auth/handler`:``,ni=()=>{try{let e=typeof window<`u`?String(window.location?.origin||``):``;return/^https?:\/\//.test(e)?e:``}catch{return``}},ri=`This is where your app is running right now. When you publish it to your own domain, come back and change this to that address.`,ii=`Open the Settings tab, find SMS region policy, and allow every country your people might be signing in from — not only your own. A country left off gets no text at all, and the person waiting for the code is told nothing.`,ai=[{id:`password`,label:`Email and password`,description:`A password they choose when they register.`,inSentence:`a password`,kind:`signIn`,defaultOn:!0,needsSetup:!1,providerId:`password`,steps:[`Click Email/Password and switch it on.`]},{id:`emailLink`,label:`Email link, no password`,description:`You email them a link. Nothing to remember, nothing to reset.`,inSentence:`an emailed link`,kind:`signIn`,defaultOn:!0,needsSetup:!0,button:`Email me a link`,providerId:`emailLink`,setupTitle:`Set up passwordless sign-in`,steps:[`Click Email/Password, switch on Email link (passwordless sign-in), and save.`]},{id:`google`,label:`Google`,description:`One tap with a Google account.`,inSentence:`Google`,kind:`signIn`,defaultOn:!0,needsSetup:!1,button:`Continue with Google`,providerId:`google.com`,steps:[`Click Add new provider, choose Google, and follow the steps.`]},{id:`phone`,label:`Phone number`,description:`A code by text, and no email at all.`,inSentence:`a phone number`,kind:`signIn`,defaultOn:!1,needsSetup:!0,button:`Continue with a phone number`,providerId:`phone`,steps:[`Click Add new provider, choose Phone, and enable it.`,ii,`While you are on the Phone provider, open "Phone numbers for testing" and add one: a number and a six-digit code you make up. Signing in with that pair never sends a text, so you can try the whole thing on your own, as often as you like, for nothing.`]},{id:`github`,label:`GitHub`,description:`A GitHub account — for an app your developers use.`,inSentence:`GitHub`,kind:`signIn`,defaultOn:!1,needsSetup:!0,button:`Continue with GitHub`,providerId:`github.com`,steps:[`Click Add new provider, choose GitHub, and paste in the two things below.`],setup:{where:`GitHub`,url:`https://github.com/settings/developers`,asksFor:[`Client ID`,`Client secret`],steps:[{text:`Sign in at github.com and open Settings → Developer settings → OAuth Apps, then click New OAuth App.`},{text:`Give it a name your people will recognise — it is what they see when GitHub asks them to allow it — and put your own app's address in Homepage URL.`,copy:{label:`Homepage URL`,address:`home`,note:ri}},{text:`Paste the address below into Redirect URI, then click Register application.`,copy:{label:`Redirect URI`,address:`callback`,note:`Some GitHub screens call this same box Authorization callback URL.`}},{text:`Copy the Client ID off the page that comes back, then click Generate a new client secret and copy that too. GitHub shows a secret once.`},{text:`Back in Firebase, paste the Client ID and the Client secret into the GitHub panel and click Save.`}]}},{id:`twitter`,label:`X`,description:`An X account, the one that used to be called Twitter.`,inSentence:`X`,kind:`signIn`,defaultOn:!1,needsSetup:!0,button:`Continue with X`,providerId:`twitter.com`,steps:[`Click Add new provider and choose Twitter. Firebase still lists X under its old name, with the old blue bird beside it — that is the right one.`,`Paste in the two things below. Firebase calls them API key and API secret; X calls the same pair the Consumer Key and Consumer Secret, and the steps say where to find them.`],setup:{where:`the X developer portal`,url:`https://developer.x.com/en/portal/dashboard`,asksFor:[`API key`,`API secret`],steps:[{text:`Sign in at developer.x.com and open the developer portal.`},{text:`Click Create an app, give it a name, leave the project as the default one X offers, and create it.`},{text:`X throws a window of credentials at you the moment the app exists. Close it. None of what is in it is what Firebase wants, and the right pair is the last step here.`},{text:`Click the app's name and find User authentication settings, then click Set up. Leave every setting on that screen as X has set it, apart from the two addresses and the one tick below.`},{text:`Website URL is your own app's address.`,copy:{label:`Website URL`,address:`home`,note:ri}},{text:`Callback URI / Redirect URL, on the same screen, is this.`,copy:{label:`Callback URI / Redirect URL`,address:`callback`}},{text:`Tick "Request email from users" before you leave that screen. Leave it off and everybody who signs in with X arrives with no email address at all — no way for you to write to them, and a verification screen that has nothing to send to. X asks for a Terms of service and a Privacy policy address before it will let you tick it.`},{text:`Click Save changes. X answers with a Client ID and a Client Secret. Close that one too — still not the pair Firebase is asking for.`},{text:`Back on the app, open Keys and tokens. Under OAuth 1.0, press Regenerate beside Consumer Key — which X also calls the API Key and API Key Secret. Copy both halves while they are on the screen: X shows them once. Leave the access tokens alone while you are on that page: the Generate button under Access Token is for reading X from your own account, and this app never does that.`},{text:`Back in Firebase, paste the Consumer Key into API key and the Consumer Secret into API secret, then click Save.`}],warning:`X hands you a Client ID and a Client Secret twice before it hands you the right pair — once when the app is made, and again when you save the authentication screen. Both of those are X's newer OAuth 2.0 pair, which Firebase does not use: paste them in and the sign-in fails with "invalid credential" the first time somebody presses the button. The pair Firebase wants is the Consumer Key and Consumer Secret, on Keys and tokens, under OAuth 1.0.`}},{id:`sms2fa`,label:`Two-step sign-in`,description:`After the password, a code by text before they are let in.`,inSentence:`a text code`,kind:`security`,defaultOn:!1,needsSetup:!0,steps:[`In the Advanced section below the providers, find SMS Multi-factor Authentication and click Enable.`,ii]}],oi=e=>ai.find(t=>t.id===e),si=ai.filter(e=>e.kind===`signIn`),ci=e=>e===`internal`||t.Dn(e);function li(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=String(n??``).trim();ci(e)&&!t.includes(e)&&t.push(e)}return t}var ui=()=>{let e={};for(let t of ai)e[t.id]=t.defaultOn;return{on:e,registerAs:{on:!1,roles:[]},twoStepOptional:!1,finishRegistration:{skippable:!0,perRole:!1}}};function di(e){let t=ui(),n=e?.methods&&typeof e.methods==`object`?e.methods:{};for(let e of ai)typeof n[e.id]==`boolean`&&(t.on[e.id]=n[e.id]);let r=e?.registerAs&&typeof e.registerAs==`object`?e.registerAs:{};t.registerAs={on:r.on===!0,roles:li(r.roles)},t.twoStepOptional=e?.twoStepOptional===!0;let i=e?.finishRegistration&&typeof e.finishRegistration==`object`?e.finishRegistration:{};return t.finishRegistration={skippable:i.required!==!0,perRole:i.perRole===!0},t}function fi(e,t){if(!e.registerAs.on)return[];let n=e.registerAs.roles.includes(`internal`)?[{id:`internal`,name:Ke(`internal`,t)}]:[],r=e.registerAs.roles.map(e=>t.find(t=>t.id===e)).filter(e=>!!e).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({id:e.id,name:e.name}));return[...n,...r]}var pi=(e,t,n)=>fi(e,n).find(e=>e.id===String(t??``))??null;function mi(e,t){let n=String(t||e).trim()||e;return e===`internal`?n===Pe.internal?`one of our team`:`one of ${n}`:`${/^[aeiou]/i.test(n)?`an`:`a`} ${n}`}function hi(e){let t=e.map(e=>mi(e.id,e.name).replace(`one of our team`,`one of your team`));return t.length?`People can register as ${t.length===1?t[0]:`${t.slice(0,-1).join(`, `)} or ${t[t.length-1]}`}.`:``}function gi(e){let t=si.filter(t=>e.on[t.id]);return t.length>0?t:si.filter(e=>e.id===`password`)}var _i=e=>gi(e).some(e=>e.id===`password`);function vi(e){let t=gi(e).map(e=>e.inSentence);return t.length===1?t[0]:`${t.slice(0,-1).join(`, `)} and ${t[t.length-1]}`}function yi(e,t){let n=oi(t);return!n||n.kind!==`signIn`||si.filter(n=>n.id!==t&&e.on[n.id]).length>0?``:`Keep at least one way to sign in — switch another one on first, then this one off.`}var bi=e=>`${oi(e)?.label??`This way of signing in`} is not switched on in your Firebase project yet. An admin can switch it on there, on the Sign in screen's own instructions.`,xi=null,Si=null,Ci=null,wi=null;function Ti(e){Ci=e,xi?.forEach(t=>t(e))}var Ei=6e3,Di=null;function Oi(e){Di&&=(clearTimeout(Di),null),wi=e,Ti(e)}function ki(e){let t=!xi;return xi||=new Set,xi.add(e),t?(wi||(Di=setTimeout(()=>{Di=null,wi||Oi(ui())},Ei)),Si=(0,l.onSnapshot)((0,l.doc)(_,Zr.collection,Zr.doc),e=>Oi(di(e.exists()?e.data():null)),()=>{wi||Oi(ui())})):Ci&&e(Ci),()=>{xi?.delete(e),!xi?.size&&(Di&&=(clearTimeout(Di),null),Si?.(),xi=null,Si=null)}}function Ai(){let[e,t]=(0,a.useState)(()=>Ci?{loading:!1,settings:Ci}:{loading:!0,settings:ui()});(0,a.useEffect)(()=>ki(e=>t({loading:!1,settings:e})),[]);let n=()=>Ci??e.settings,r=e=>(0,l.setDoc)((0,l.doc)(_,Zr.collection,Zr.doc),e,{merge:!0}),i=`That could not be saved — check you are still signed in as an admin, then try again.`,o=async(e,t)=>{if(!t){let t=yi(n(),e);if(t)return t}let a=n().on[e];Ti({...n(),on:{...n().on,[e]:t}});try{return await r({methods:{[e]:t}}),null}catch{let t=n(),r=wi?wi.on[e]:a;return Ti({...t,on:{...t.on,[e]:r}}),i}},s=async e=>{let t=n().registerAs,a={on:e.on??t.on,roles:li(e.roles??t.roles)};Ti({...n(),registerAs:a});try{return await r({registerAs:a}),null}catch{return Ti({...n(),registerAs:wi?wi.registerAs:t}),i}},c=async e=>{let t=n().twoStepOptional;Ti({...n(),twoStepOptional:e});try{return await r({twoStepOptional:e}),null}catch{return Ti({...n(),twoStepOptional:wi?wi.twoStepOptional:t}),i}},u=async e=>{let t=n().finishRegistration,a={skippable:e.skippable??t.skippable,perRole:e.perRole??t.perRole};Ti({...n(),finishRegistration:a});try{return await r({finishRegistration:{required:!a.skippable,perRole:a.perRole}}),null}catch{return Ti({...n(),finishRegistration:wi?wi.finishRegistration:t}),i}};return{...e.settings,loading:e.loading,set:o,setRegisterAs:s,setTwoStepOptional:c,setFinishRegistration:u}}var ji=`fbos_register_as`,Mi=[`/register`,`/login`],Ni=()=>{try{return typeof window<`u`?window.sessionStorage:null}catch{return null}};function Pi(e,t=Date.now()){if(ci(e))try{Ni()?.setItem(ji,JSON.stringify({id:e,at:t}))}catch{}}function Fi(){try{Ni()?.removeItem(ji)}catch{}}function Ii(e,t=Date.now()){let n=Ni();if(!n)return``;let r=null;try{r=n.getItem(ji),r!==null&&n.removeItem(ji)}catch{return``}if(!r||!Mi.includes(String(e||``).replace(/\/+$/,``)||`/`))return``;try{let{id:e,at:n}=JSON.parse(r);return typeof n!=`number`||t-n>36e5||t<n?``:ci(e)?String(e):``}catch{return``}}function Li(e,t,n=Date.now()){if(!t||!ci(t)||e?.removed===!0)return null;let r=e?.role;return r&&r!==`user`&&r!==`free`||e?.requestedRole===t?null:{requestedRole:t,requestedRoleAt:new Date(n).toISOString()}}var Ri=()=>({requestedRole:(0,l.deleteField)(),requestedRoleAt:(0,l.deleteField)()});function zi(e){let t=e?.requestedRole;return ci(t)?{role:String(t),at:typeof e?.requestedRoleAt==`string`?e.requestedRoleAt:``}:null}var Bi=(e,t)=>`Register as ${mi(e,t)}`,Vi=(e,t)=>`Asked to be ${mi(e,t)}`,Hi=`Your registration goes to an admin for approval. Until then everything works as usual.`,Ui=`Your registration is pending approval`,Wi=`We'll let you know as soon as it's approved. Everything else works as usual.`,Gi=()=>({title:`Your registration has been approved`,body:`Everything that was waiting on it is open to you now.`,link:`/dashboard`}),Ki=()=>({title:`Your registration was not approved`,body:`You still have your account, and everything works as usual.`,link:`/dashboard`}),qi=()=>{if(!g)throw Error(`Firebase is not initialized. Check your configuration.`);return g};function Ji(e){switch(oi(e)?.providerId){case`google.com`:return new c.GoogleAuthProvider;case`github.com`:return new c.GithubAuthProvider;case`twitter.com`:return new c.TwitterAuthProvider;default:return null}}var Yi=e=>Ji(e)!==null;async function Xi(e){let t=Ji(e);if(!t)throw Error(`${oi(e)?.label??e} is not a one-button sign-in.`);try{return await(0,c.signInWithPopup)(qi(),t),`done`}catch(n){if(n?.code===`auth/popup-blocked`||n?.code===`auth/popup-closed-by-user`||n?.code===`auth/cancelled-popup-request`){let{signInWithRedirect:n}=await import(`firebase/auth`);try{sessionStorage.setItem(ca,e)}catch{}return await n(qi(),t),`redirecting`}throw n}}var Zi=`firebase-os:sign-in-link-email`,Qi=`email`;async function $i(e,t=`/login`){let n=new URL(t,window.location.origin);n.searchParams.set(Qi,e),await(0,c.sendSignInLinkToEmail)(qi(),e,{url:n.toString(),handleCodeInApp:!0});try{localStorage.setItem(Zi,e)}catch{}}function ea(e=window.location.href){try{return(0,c.isSignInWithEmailLink)(qi(),e)}catch{return!1}}function ta(){try{return localStorage.getItem(`firebase-os:sign-in-link-email`)||``}catch{return``}}function na(e=window.location.href){let t=ta();if(t)return t;try{let t=String(new URL(e).searchParams.get(`email`)||``).trim();return/^[^\s@]+@[^\s@]+$/.test(t)?t:``}catch{return``}}async function ra(e,t=window.location.href){let{user:n}=await(0,c.signInWithEmailLink)(qi(),e,t);try{await n.getIdToken(!0)}catch{}try{localStorage.removeItem(Zi)}catch{}}async function ia(e,t){return aa(t,t=>(0,c.signInWithPhoneNumber)(qi(),e,t))}async function aa(e,t){let n=new c.RecaptchaVerifier(qi(),e,{size:`invisible`});try{return await t(n)}finally{try{n.clear()}catch{}}}function oa(e,t){let n=oi(t)?.providerId;try{switch(n){case`google.com`:return c.GoogleAuthProvider.credentialFromError(e);case`github.com`:return c.GithubAuthProvider.credentialFromError(e);case`twitter.com`:return c.TwitterAuthProvider.credentialFromError(e);default:return null}}catch{return null}}var sa=`firebase-os:refused-credential`,ca=`firebase-os:redirecting-with`,la=`firebase-os:redirect-failure`,ua=null;function da(e,t){if(!e)return;let n=String(t||``).trim().toLowerCase();ua={credential:e,email:n};try{let t=typeof e.toJSON==`function`?e.toJSON():null;t&&sessionStorage.setItem(sa,JSON.stringify({email:n,json:t}))}catch{}}var fa=()=>{if(ua)return!0;try{return!!sessionStorage.getItem(sa)}catch{return!1}};function pa(){ua=null;try{sessionStorage.removeItem(sa)}catch{}}async function ma(){if(ua){let e=ua;return pa(),e}let e=null;try{e=sessionStorage.getItem(sa)}catch{return null}if(pa(),!e)return null;try{let{email:t,json:n}=JSON.parse(e),{OAuthCredential:r}=await import(`firebase/auth`),i=r.fromJSON(n);return i?{credential:i,email:String(t||``)}:null}catch{return null}}async function ha(){let e=await ma(),t=g?.currentUser;if(!e||!t)return;let n=String(t.email||``).trim().toLowerCase();e.email&&n&&e.email!==n||await va(e.credential)}function ga(e){let t=null;try{t=sessionStorage.getItem(ca)||null,sessionStorage.removeItem(ca)}catch{}let n=String(e?.code||``);if(!n)return;let r=String(e?.customData?.email||e?.email||``);t&&da(oa(e,t),r);try{sessionStorage.setItem(la,JSON.stringify({id:t||`google`,code:n,email:r}))}catch{}}function _a(){let e=null;try{e=sessionStorage.getItem(la),e&&sessionStorage.removeItem(la)}catch{return null}if(!e)return null;try{let{id:t,code:n,email:r}=JSON.parse(e);return{id:t,err:{code:String(n||``),customData:{email:String(r||``)}}}}catch{return null}}async function va(e){let t=g?.currentUser;if(!(!e||!t))try{await(0,c.linkWithCredential)(t,e)}catch(e){console.warn(`That way in could not be added to the account. The sign-in itself stands.`,e)}}var ya=e=>ai.find(t=>t.providerId===e)?.id;async function ba(e){if(e)try{let t=await(0,c.fetchSignInMethodsForEmail)(qi(),e);for(let e of t){let t=ya(e);if(t)return t}}catch{}}async function xa(e,t,n,r={}){let i=e?.code||``,a=String(e?.message||``);if(i===`auth/operation-not-allowed`)return{text:bi(t)};if(i===`auth/account-exists-with-different-credential`){let n=String(e?.customData?.email||e?.email||r.email||``),i=await ba(n),a=i?oi(i)?.label:``,o=oa(e,t)??void 0;o&&da(o,n);let s=o||fa()?` Both will work after that.`:``;return{text:a?`That email is already yours here — you set it up with ${a}. Sign in with ${a} and you are straight back in.${s}`:`That email is already yours here, set up a different way. Sign in the way you did the first time and you are straight back in.${s}`,tryInstead:i,pending:o}}if(i===`auth/email-already-in-use`){let t=await ba(String(r.email||e?.customData?.email||``)),n=t?oi(t)?.label:``;return{text:n&&t!==`password`?`That email already has an account here — it was set up with ${n}. Sign in with ${n} and you are straight back in.`:`That email already has an account here. Sign in with it instead — and if you have forgotten the password, the sign-in page can reset it.`,tryInstead:t}}return i===`auth/invalid-credential`||i===`auth/user-not-found`||i===`auth/wrong-password`||i===`auth/invalid-login-credentials`?{text:`That email and password do not match. Check both — or, if you first came in with one of the buttons, use that button.`}:i===`auth/user-disabled`?{text:`This account has been switched off. If you think that is a mistake, ask whoever runs the app.`}:i===`auth/invalid-email`?t===`emailLink`?{text:`That is not the address this link was sent to. Type the one you asked us to send it to.`}:{text:`That does not look like an email address. Check it and try again.`}:i===`auth/missing-email`?{text:`Type your email address first.`}:i===`auth/missing-password`?{text:`Type your password first.`}:i===`auth/weak-password`?{text:`That password is too easy to guess. Make it longer, and mix letters and numbers.`}:i===`auth/unauthorized-domain`||a.includes(`requested action is invalid`)?{text:`This app's address is not on your Firebase project's allowed list yet. An admin can add it: Firebase console → Authentication → Settings → Authorized domains.`}:i===`auth/unauthorized-continue-uri`||i===`auth/invalid-continue-uri`?{text:`The link would bring you back to ${(()=>{try{return typeof window>`u`?``:window.location.hostname}catch{return``}})()||`this app's address`}, which this app's Firebase project does not know — so Firebase would not send it. An admin can add it: Firebase console → Authentication → Settings → Authorized domains.`}:i===`auth/invalid-api-key`||i===`auth/app-not-authorized`||i===`auth/configuration-not-found`||i===`auth/api-key-not-valid.-please-pass-a-valid-api-key.`?{text:`This app is not connected to its Firebase project properly. If this app is yours, check the Firebase details on the setup screen.`}:i===`auth/network-request-failed`?{text:`We could not reach the sign-in service. Check your internet connection and try again.`}:i===`auth/invalid-phone-number`?{text:`That does not look like a phone number. Check the country and the digits after it.`}:i===`auth/missing-phone-number`?{text:`Type your phone number first.`}:i===`auth/invalid-verification-code`?{text:`That code is not right. Check the text message and type it again.`}:i===`auth/code-expired`?{text:`That code has expired. Press "Send it again" and a new one will come straight through.`}:i===`auth/captcha-check-failed`?{text:`The check that you are not a robot did not pass. Reload the page and try again.`}:i===`auth/quota-exceeded`?{text:`This app has sent as many text messages as it is allowed to for now. Try again later, or sign in another way.`}:i===`auth/too-many-requests`?{text:`Too many tries from here just now. Wait a few minutes and it will let you through again.`}:i===`auth/invalid-action-code`||i===`auth/expired-action-code`?t===`emailLink`?{text:`That link has been used already, has expired, or was sent to a different address from the one you typed. Ask for a new one and it will come straight through.`}:{text:`That link has been used already, or it has expired. Ask for a new one and it will come straight through.`}:i===`auth/credential-already-in-use`||i===`auth/provider-already-linked`?{text:`That way of signing in already belongs to an account here. Sign in with it directly.`}:i===`auth/user-token-expired`||i===`auth/user-mismatch`||i===`auth/null-user`?{text:`Your sign-in has run out. Sign in again and carry on from there.`}:i===`auth/popup-blocked`||i===`auth/popup-closed-by-user`||i===`auth/cancelled-popup-request`?{text:`The sign-in window was closed before it finished. Press the button again and let it open.`}:i===`auth/requires-recent-login`?{text:`For safety this needs a fresh sign-in. Sign out, sign back in, and set it up straight away.`}:i===`auth/unverified-email`?{text:`Verify your email address first, then come back and set this up — the link is in your inbox.`}:i===`auth/unsupported-first-factor`?{text:`A text code can only be added to an account with a password. The way you signed in has its own checks already.`}:i===`auth/second-factor-already-in-use`?{text:`That number is already the second step on another account here. Use a different one.`}:i===`auth/maximum-second-factor-count-exceeded`?{text:`This account already has as many second steps as Firebase allows. Remove one before adding another.`}:i===`auth/missing-multi-factor-session`||i===`auth/invalid-multi-factor-session`?{text:`That took too long. Start again and the code will come straight through.`}:i===`auth/missing-verification-code`?{text:`Type the code from the text message first.`}:((i||a)&&console.warn(`[signIn] a failure with no words of its own:`,i||a),{text:n})}var Sa=[3e3,6e3,12e3,2e4,3e4,6e4],Ca=900*1e3,wa=`fbos_rules_copied`,Ta=e=>{let t=e?.code;return t===`permission-denied`||t===`not-found`};function Ea(e,t=Date.now()){try{localStorage.setItem(wa,JSON.stringify({emails:e.map(e=>e.trim().toLowerCase()).filter(Boolean),at:t}))}catch{}}function Da(e,t=Date.now()){if(!e)return!1;try{let n=JSON.parse(localStorage.getItem(wa)||`null`);return!n||!Array.isArray(n.emails)||typeof n.at!=`number`||t<n.at||t-n.at>36e5?!1:n.emails.includes(e.trim().toLowerCase())}catch{return!1}}var Oa=`fbos_rules_typed`;function ka(){try{return localStorage.getItem(Oa)||``}catch{return``}}function Aa(e){try{localStorage.setItem(Oa,e)}catch{}}function ja(e=Sa,t=Ca){let n,r,i=0,a=null,o=()=>{n!==void 0&&clearTimeout(n),n=void 0},s=()=>{o();let e=r;r=void 0,e?.()};return{later(c){o(),r=c;let l=Date.now();a===null&&(a=l),!(l-a>=t)&&(n=setTimeout(s,e[Math.min(i,e.length-1)]),i+=1)},now(){r&&s()},stop(){o(),r=void 0,i=0,a=null},get waiting(){return r!==void 0}}}var Ma=(0,a.createContext)({user:null,userRole:null,accessLevel:`free`,isInternal:!1,isAdmin:!1,loading:!0,signOut:async()=>{},registerUser:async()=>{},refreshUser:async()=>{},userInactive:!1,roleResolved:!1,roleConfirmed:!1,requestedRole:null,profile:null,profileReady:!1,activeOrg:null,activeWorkspace:null,checkOrg:async()=>{},workspaceAccess:{},userWorkspaces:[],switchWorkspace:async()=>{},createWorkspace:async()=>{},createOrg:async()=>{}});async function Na(e,{deleteLogin:t=!0}={}){if(t)try{return await(0,c.deleteUser)(e),`deleted`}catch{}try{return await(0,c.signOut)(g),`signed-out`}catch{return`failed`}}function Pa(e,t){if(e?.removed!==!0)return!1;let n=typeof t==`number`?t:Date.parse(String(t||``));return Number.isFinite(n)?n>(Number(e.removedMs)||0):!1}var Fa=/user_avatars(?:\/|%2F)/i;async function Ia(e,t){let n=null;try{n=(await e.getIdTokenResult()).authTime}catch{return`too-early`}if(!Pa(t,n))return`too-early`;let r=Ha(null,{uid:e.uid,email:e.email,displayName:e.displayName,phone:e.phoneNumber});try{await(0,l.setDoc)((0,l.doc)(_,`user_profiles`,e.uid),r)}catch{return`refused`}return Fa.test(e.photoURL||``)&&(0,c.updateProfile)(e,{photoURL:null}).catch(()=>{}),`started`}var La=e=>`fbos_role2_${e}`,Ra=e=>{try{return localStorage.getItem(La(e))}catch{return null}},za=(e,t)=>{try{localStorage.setItem(La(e),t)}catch{}},Ba=e=>{try{localStorage.removeItem(La(e))}catch{}},Va=e=>{try{localStorage.removeItem(`fbos_role_${e}`)}catch{}};function Ha(e,t,n=Date.now()){if(e?.removed===!0)return null;let r=e||{},i=Date.parse(String(r.lastLoginAt||``)),a=Number.isFinite(i)&&n-i<36e5&&i<=n,o=t.email||r.email||null,s=t.phone||r.phone||null;if(e&&r.uid===t.uid&&r.email===o&&(r.phone??null)===s&&r.createdAt&&(!t.displayName||r.displayName===t.displayName)&&a)return null;let c=new Date(n).toISOString();return{uid:t.uid,email:o,phone:s,displayName:t.displayName||r.displayName||``,lastLoginAt:c,createdAt:r.createdAt||c}}function Ua({children:e,onSignedOut:n,onRemoved:r}){let[i,s]=(0,a.useState)(null),[u,d]=(0,a.useState)(null),[f,p]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!0),[v,y]=(0,a.useState)(!1),[b,x]=(0,a.useState)(!1),[S,C]=(0,a.useState)(null),[w,T]=(0,a.useState)(null),[ee,E]=(0,a.useState)(!1),D=a.default.useRef(null),te=a.default.useRef(null),ne=a.default.useRef(null),re=a.default.useRef(``),O=a.default.useRef(null),k=a.default.useRef(n);k.current=n;let ie=a.default.useRef(r);ie.current=r;let A=a.default.useRef(null),j=a.default.useRef(null),M=a.default.useRef(null),N=a.default.useRef(null),ae=a.default.useRef(null),P=a.default.useRef(null),F=a.default.useRef(null),I=a.default.useRef(ja()),oe=a.default.useRef(null),se=a.default.useRef(null),L=a.default.useRef(null),R=(e,{certain:t=!1}={})=>{if(O.current!==e)return;if(t)oe.current=e;else if(oe.current!==e&&!Da(g.currentUser?.email))return;let n=L.current;n?.uid===e&&I.current.later(n.run)},z=a.default.useRef(new Set),ce=e=>(0,l.updateDoc)((0,l.doc)(_,`user_profiles`,e),{role:`admin`}),le=a.default.useRef(new Set),B=async e=>{if(!le.current.has(e)){le.current.add(e);try{await(0,l.updateDoc)((0,l.doc)(_,`user_profiles`,e),{role:`user`})}catch(e){e?.code!==`permission-denied`&&console.error(`Error marking the profile as a member:`,e)}}},ue=async(e,{again:t=!1,mark:n=!1}={})=>{if(!(z.current.has(e)&&!t)){z.current.add(e);try{await ce(e)}catch(t){if(t?.code!==`permission-denied`){console.error(`Error claiming the admin role:`,t);return}try{if(!g.currentUser)return;await g.currentUser.getIdToken(!0),await ce(e)}catch(t){if(t?.code!==`permission-denied`){console.error(`Error claiming the admin role:`,t);return}R(e),n&&await B(e)}}}};return(0,a.useEffect)(()=>{let e,n=I.current;if(!g){h(!1),y(!0),E(!0);return}(0,c.getRedirectResult)(g).then(e=>{e?.user&&ha()}).catch(e=>{e?.code&&ga(e)});let r=(0,c.onAuthStateChanged)(g,async n=>{if(n?.uid===O.current&&v){s(n);return}let r=O.current;if(O.current=n?.uid||null,n){re.current=Ii(typeof window<`u`?window.location.pathname:``),x(!1),n.uid!==r&&(N.current=null,I.current.stop(),oe.current=null,se.current=null),r!==n.uid&&E(!1),Va(n.uid);let i=Ra(n.uid);i?(d(i),y(!0),h(!1)):y(!1),s(n);try{let r=(0,l.doc)(_,`user_profiles`,n.uid),i=e=>{console.error(`[AuthContext] the profile could not be read to the end:`,e),P.current=null,F.current=null,y(!0),x(!0),E(!0),h(!1)},a=(e,{deleteLogin:t})=>{A.current=n.uid,j.current!==n.uid&&(j.current=n.uid,Na(n,{deleteLogin:t}).then(e=>{e===`failed`&&(j.current=null)})),d(null),N.current=null,Ba(n.uid),p(!0),C(null),T(e),y(!0),x(!0),E(!0),h(!1)},o=e=>{try{let i=e.exists()?e.data():null,o=e.metadata?.hasPendingWrites===!0;if(o||(se.current={uid:n.uid,data:i},(i?.role&&!t.zn(i)||i?.removed)&&I.current.stop()),i?.removed===!0){let e=M.current?.uid===n.uid?M.current:null;if(!e){M.current={uid:n.uid,state:`asking`};let e=i;d(null),N.current=null,Ba(n.uid),Ia(n,e).catch(()=>`too-early`).then(t=>{M.current?.uid!==n.uid||O.current!==n.uid||(M.current={uid:n.uid,state:t},t!==`started`&&a(e,{deleteLogin:t===`refused`}))});return}if(e.state===`asking`)return;a(i,{deleteLogin:e.state===`refused`});return}if(o&&M.current?.uid===n.uid&&M.current.state===`asking`)return;let s=null;if(ne.current!==n.uid){ne.current=n.uid;let e=Ha(i,{uid:n.uid,email:n.email,displayName:n.displayName,phone:n.phoneNumber});i&&e&&(s=e);let t=Li(i,re.current);re.current=``,(e||t)&&(i||(P.current=n.uid),(0,l.setDoc)(r,{...e||{},...t||{}},{merge:!0}).catch(e=>{e?.code===`permission-denied`?(console.warn(`This account may not update its own profile — it has been deactivated, or its address is not verified yet.`),R(n.uid)):console.error(`Failed to sync profile:`,e)}).finally(()=>{P.current===n.uid&&(P.current=null,F.current!==n.uid&&E(!0))}));let a={...i||{},...e||{}};Br(a,n)&&(F.current=n.uid,Gr(n.uid,a).finally(()=>{F.current===n.uid&&(F.current=null,P.current!==n.uid&&E(!0))}))}if(i){let e=Cn(i);o?e=N.current??`user`:N.current=e,!o&&te.current!==n.uid&&Sn(i)&&t.un(g.currentUser)&&(te.current=n.uid,Tn(n.uid,i)),!o&&!i.removed&&(t.zn(i)&&g.currentUser?.emailVerified?ue(n.uid,{mark:!i.role}):!i.role&&t.un(g.currentUser)&&B(n.uid)),D.current===null&&(D.current=e),d(e),za(n.uid,e),p(i.inactive===!0),C(zi(i)?.role??null),T(s?{...i,...s}:i)}else d(null),o||(N.current=null),Ba(n.uid),p(!1),C(null),T(null);y(!0),x(!0),(i||P.current!==n.uid)&&F.current!==n.uid&&E(!0),h(!1)}catch(e){i(e)}},s=e=>{y(!0),P.current=null,F.current=null,E(!0),h(!1),Ta(e)&&R(n.uid,{certain:!0})},c=()=>{e&&e(),e=(0,l.onSnapshot)(r,{includeMetadataChanges:!0},o,s)};L.current={uid:n.uid,run:()=>{O.current===n.uid&&(ne.current=null,z.current.delete(n.uid),le.current.delete(n.uid),c())}},c()}catch(e){console.error(`[AuthContext] ERROR in auth resolution:`,e),y(!0),P.current=null,F.current=null,E(!0),h(!1)}}else{if(r){let e=A.current===r;e&&(A.current=null),(e&&ie.current||k.current)?.()}s(null),d(null),p(!1),C(null),T(null),y(!0),x(!1),E(!1),h(!1),D.current=null,N.current=null,ae.current=null,re.current=``,te.current=null,ne.current=null,P.current=null,F.current=null,M.current=null,j.current=null,I.current.stop(),oe.current=null,se.current=null,L.current=null,e&&e()}});return()=>{r(),n.stop(),e&&e()}},[]),(0,a.useEffect)(()=>{if(typeof window>`u`)return;let e=0,n=()=>{if(typeof document<`u`&&document.visibilityState===`hidden`)return;let n=O.current;if(!n||Date.now()-e<2e3)return;let r=I.current;if(r.waiting){e=Date.now(),r.now();return}let i=se.current,a=i?.uid===n&&t.zn(i.data)&&!i.data?.removed,o=L.current;a&&o?.uid===n&&Da(g.currentUser?.email)&&(e=Date.now(),o.run())};return document.addEventListener(`visibilitychange`,n),window.addEventListener(`focus`,n),()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`focus`,n)}},[]),(0,a.useEffect)(()=>{let e=i?.uid??null,n=i?.emailVerified===!0,r=ae.current,a=!!e&&!!r&&r.uid===e&&!r.verified&&n;if(ae.current=e?{uid:e,verified:n}:null,!a||u===`admin`)return;let o=!1;return(0,l.getDoc)((0,l.doc)(_,`user_profiles`,i.uid)).then(e=>{!o&&e.exists()&&t.zn(e.data())&&!e.data().removed&&ue(i.uid,{again:!0,mark:!e.data().role})}).catch(()=>{}),()=>{o=!0}},[i?.uid,i?.emailVerified,u]),(0,o.jsx)(Ma.Provider,{value:{user:i,userRole:u,accessLevel:t.kn(u),isInternal:t.Sn(u),isAdmin:t.wn(u),loading:m,signOut:async()=>{await(0,c.signOut)(g),s(null)},registerUser:async(e,t,n,r)=>{let{createUserWithEmailAndPassword:i}=await import(`firebase/auth`),{user:a}=await i(g,e,t),o=`${n} ${r}`.trim();await(0,c.updateProfile)(a,{displayName:o}).catch(e=>{console.warn(`The name could not be put on the sign-in; the profile carries it.`,e)});try{await a.getIdToken(!0),await(0,l.setDoc)((0,l.doc)(_,`user_profiles`,a.uid),{uid:a.uid,email:a.email,displayName:o,createdAt:new Date().toISOString()},{merge:!0})}catch(e){console.warn(`Could not write public profile on registration.`,e)}try{await(0,c.sendEmailVerification)(a),Jr(a.uid)}catch(e){console.warn(`The verification mail could not be sent at registration; /verify sends it.`,e)}},refreshUser:async()=>{g.currentUser&&(await g.currentUser.reload(),s(Object.assign(Object.create(g.currentUser),{photoURL:g.currentUser.photoURL,displayName:g.currentUser.displayName,email:g.currentUser.email,emailVerified:g.currentUser.emailVerified})))},userInactive:f,roleResolved:v,roleConfirmed:b,requestedRole:S,profile:w,profileReady:ee},children:e})}var Wa=()=>(0,a.useContext)(Ma),Ga={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Ga.node;var Ka=n.n(Ga),qa={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};qa.node;var Ja=n.n(qa),Ya={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Ya.node;var Xa=n.n(Ya),Za={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Za.node;var Qa=n.n(Za),$a={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};$a.node;var eo=n.n($a),to={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};to.node;var no=n.n(to),ro={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};ro.node;var io=n.n(ro),ao=(0,a.createContext)({});function oo(e){let t=(0,a.useRef)(null);return t.current===null&&(t.current=e()),t.current}var so=typeof window<`u`?a.useLayoutEffect:a.useEffect,co=(0,a.createContext)(null);function lo(e,t){e.indexOf(t)===-1&&e.push(t)}function uo(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var fo=(e,t,n)=>n>t?t:n<e?e:n;function po(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var mo=()=>{},ho=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(mo=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(po(t,n))},ho=(e,t,n)=>{if(!e)throw Error(po(t,n))});var go={},_o=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function vo(e){return typeof e==`object`&&!!e}var yo=e=>/^0[^.\s]+$/u.test(e);function bo(e){let t;return()=>(t===void 0&&(t=e()),t)}var xo=e=>e,So=(e,t)=>n=>t(e(n)),Co=(...e)=>e.reduce(So),wo=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},To=class{constructor(){this.subscriptions=[]}add(e){return lo(this.subscriptions,e),()=>uo(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},V=e=>e*1e3,Eo=e=>e/1e3;function Do(e,t){return t?1e3/t*e:0}var Oo=new Set;function ko(e,t,n){e||Oo.has(t)||(console.warn(po(t,n)),Oo.add(t))}var Ao=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jo=1e-7,Mo=12;function No(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ao(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>jo&&++s<Mo);return o}function Po(e,t,n,r){if(e===t&&n===r)return xo;let i=t=>No(t,0,1,e,n);return e=>e===0||e===1?e:Ao(i(e),t,r)}var Fo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Io=e=>t=>1-e(1-t),Lo=Po(.33,1.53,.69,.99),Ro=Io(Lo),zo=Fo(Ro),Bo=e=>e>=1?1:(e*=2)<1?.5*Ro(e):.5*(2-2**(-10*(e-1))),Vo=e=>1-Math.sin(Math.acos(e)),Ho=Io(Vo),Uo=Fo(Vo),Wo=Po(.42,0,1,1),Go=Po(0,0,.58,1),Ko=Po(.42,0,.58,1),qo=e=>Array.isArray(e)&&typeof e[0]!=`number`,Jo=e=>Array.isArray(e)&&typeof e[0]==`number`,Yo={linear:xo,easeIn:Wo,easeInOut:Ko,easeOut:Go,circIn:Vo,circInOut:Uo,circOut:Ho,backIn:Ro,backInOut:zo,backOut:Lo,anticipate:Bo},Xo=e=>typeof e==`string`,Zo=e=>{if(Jo(e)){ho(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Po(t,n,r,i)}else if(Xo(e))return ho(Yo[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),Yo[e];return e},Qo=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],$o={value:null,addProjectionMetrics:null};function es(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&$o.value&&$o.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var ts=40;function ns(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Qo.reduce((e,n)=>(e[n]=es(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=go.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,ts),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Qo.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Qo.length;t++)o[Qo[t]].cancel(e)},state:i,steps:o}}var{schedule:H,cancel:rs,state:U,steps:is}=ns(typeof requestAnimationFrame<`u`?requestAnimationFrame:xo,!0),as;function os(){as=void 0}var ss={now:()=>(as===void 0&&ss.set(U.isProcessing||go.useManualTiming?U.timestamp:performance.now()),as),set:e=>{as=e,queueMicrotask(os)}},cs={layout:0,mainThread:0,waapi:0},ls=e=>t=>typeof t==`string`&&t.startsWith(e),us=ls(`--`),ds=ls(`var(--`),fs=e=>ds(e)?ps.test(e.split(`/*`)[0].trim()):!1,ps=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ms(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var hs={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},gs={...hs,transform:e=>fo(0,1,e)},_s={...hs,default:1},vs=e=>Math.round(e*1e5)/1e5,ys=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bs(e){return e==null}var xs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ss=(e,t)=>n=>!!(typeof n==`string`&&xs.test(n)&&n.startsWith(e)||t&&!bs(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cs=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ys);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ws=e=>fo(0,255,e),Ts={...hs,transform:e=>Math.round(ws(e))},Es={test:Ss(`rgb`,`red`),parse:Cs(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ts.transform(e)+`, `+Ts.transform(t)+`, `+Ts.transform(n)+`, `+vs(gs.transform(r))+`)`};function Ds(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Os={test:Ss(`#`),parse:Ds,transform:Es.transform},ks=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),As=ks(`deg`),js=ks(`%`),W=ks(`px`),Ms=ks(`vh`),Ns=ks(`vw`),Ps={...js,parse:e=>js.parse(e)/100,transform:e=>js.transform(e*100)},Fs={test:Ss(`hsl`,`hue`),parse:Cs(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+js.transform(vs(t))+`, `+js.transform(vs(n))+`, `+vs(gs.transform(r))+`)`},G={test:e=>Es.test(e)||Os.test(e)||Fs.test(e),parse:e=>Es.test(e)?Es.parse(e):Fs.test(e)?Fs.parse(e):Os.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Es.transform(e):Fs.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},Is=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ls(e){return isNaN(e)&&typeof e==`string`&&(e.match(ys)?.length||0)+(e.match(Is)?.length||0)>0}var Rs=`number`,zs=`color`,Bs=`var`,Vs=`var(`,Hs="${}",Us=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ws(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Us,e=>(G.test(e)?(r.color.push(a),i.push(zs),n.push(G.parse(e))):e.startsWith(Vs)?(r.var.push(a),i.push(Bs),n.push(e)):(r.number.push(a),i.push(Rs),n.push(parseFloat(e))),++a,Hs)).split(Hs),indexes:r,types:i}}function Gs(e){return Ws(e).values}function Ks({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Rs?i+=vs(r[a]):e===zs?i+=G.transform(r[a]):i+=r[a]}return i}}function qs(e){return Ks(Ws(e))}var Js=e=>typeof e==`number`?0:G.test(e)?G.getAnimatableNone(e):e,Ys=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Js(e);function Xs(e){let t=Ws(e);return Ks(t)(t.values.map((e,n)=>Ys(e,t.split[n])))}var Zs={test:Ls,parse:Gs,createTransformer:qs,getAnimatableNone:Xs};function Qs(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function $s({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Qs(s,r,e+1/3),a=Qs(s,r,e),o=Qs(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ec(e,t){return n=>n>0?t:e}var K=(e,t,n)=>e+(t-e)*n,tc=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nc=[Os,Es,Fs],rc=e=>nc.find(t=>t.test(e));function ic(e){let t=rc(e);if(mo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===Fs&&(n=$s(n)),n}var ac=(e,t)=>{let n=ic(e),r=ic(t);if(!n||!r)return ec(e,t);let i={...n};return e=>(i.red=tc(n.red,r.red,e),i.green=tc(n.green,r.green,e),i.blue=tc(n.blue,r.blue,e),i.alpha=K(n.alpha,r.alpha,e),Es.transform(i))},oc=new Set([`none`,`hidden`]);function sc(e,t){return oc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cc(e,t){return n=>K(e,t,n)}function lc(e){return typeof e==`number`?cc:typeof e==`string`?fs(e)?ec:G.test(e)?ac:pc:Array.isArray(e)?uc:typeof e==`object`?G.test(e)?ac:dc:ec}function uc(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>lc(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function dc(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=lc(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function fc(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var pc=(e,t)=>{let n=Zs.createTransformer(t),r=Ws(e),i=Ws(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?oc.has(e)&&!i.values.length||oc.has(t)&&!r.values.length?sc(e,t):Co(uc(fc(r,i),i.values),n):(mo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),ec(e,t))};function mc(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?K(e,t,n):lc(e)(e,t)}var hc=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>H.update(t,e),stop:()=>rs(t),now:()=>U.isProcessing?U.timestamp:ss.now()}},gc=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},_c=2e4;function vc(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function yc(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(vc(r),_c);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Eo(i)}}var q={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function bc(e,t){return e*Math.sqrt(1-t*t)}var xc=12;function Sc(e,t,n){let r=n;for(let n=1;n<xc;n++)r-=e(r)/t(r);return r}var Cc=.001;function wc({duration:e=q.duration,bounce:t=q.bounce,velocity:n=q.velocity,mass:r=q.mass}){let i,a;mo(e<=V(q.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=fo(q.minDamping,q.maxDamping,o),e=fo(q.minDuration,q.maxDuration,Eo(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=bc(t,o),c=Math.exp(-i);return Cc-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=bc(t**2,o);return(-i(t)+Cc>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Cc+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Sc(i,a,s);if(e=V(e),isNaN(c))return{stiffness:q.stiffness,damping:q.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Tc=[`duration`,`bounce`],Ec=[`stiffness`,`damping`,`mass`];function Dc(e,t){return t.some(t=>e[t]!==void 0)}function Oc(e){let t={velocity:q.velocity,stiffness:q.stiffness,damping:q.damping,mass:q.mass,isResolvedFromDuration:!1,...e};if(!Dc(e,Ec)&&Dc(e,Tc))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*fo(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:q.mass,stiffness:i,damping:a}}else{let n=wc({...e,velocity:0});t={...t,...n,mass:q.mass},t.isResolvedFromDuration=!0}return t}function kc(e=q.visualDuration,t=q.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Oc({...n,velocity:-Eo(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Eo(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?q.restSpeed.granular:q.restSpeed.default,i||=v?q.restDelta.granular:q.restDelta.default;let y,b,x,S,C,w;if(h<1)x=bc(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>V(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=V(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=V(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(vc(T),_c),t=gc(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}kc.applyToOptions=e=>{let t=yc(e,100,kc);return e.ease=t.ease,e.duration=V(t.duration),e.type=`keyframes`,e};var Ac=5;function jc(e,t,n){let r=Math.max(t-Ac,0);return Do(n-e(r),t-r)}function Mc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=kc({keyframes:[f.value,m(f.value)],velocity:jc(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Nc(e,t,n){let r=[],i=n||go.mix||mc,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Co(Array.isArray(t)?t[n]||xo:t,a)),r.push(a)}return r}function Pc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(ho(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Nc(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=wo(e[r],e[r+1],n);return s[r](i)};return n?t=>l(fo(e[0],e[a-1],t)):l}function Fc(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=wo(0,t,r);e.push(K(n,1,i))}}function Ic(e){let t=[0];return Fc(t,e.length-1),t}function Lc(e,t){return e.map(e=>e*t)}function Rc(e,t){return e.map(()=>t||Ko).splice(0,e.length-1)}function zc({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=qo(r)?r.map(Zo):Zo(r),a={done:!1,value:t[0]},o=Pc(Lc(n&&n.length===t.length?n:Ic(t),e),t,{ease:Array.isArray(i)?i:Rc(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Bc=e=>e!==null;function Vc(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Bc),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Hc={decay:Mc,inertia:Mc,tween:zc,keyframes:zc,spring:kc};function Uc(e){typeof e.type==`string`&&(e.type=Hc[e.type])}var Wc=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Gc=e=>e/100,Kc=class extends Wc{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==ss.now()&&this.tick(ss.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},cs.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Uc(e);let{type:t=zc,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||zc;process.env.NODE_ENV!==`production`&&s!==zc&&ho(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==zc&&typeof o[0]!=`number`&&(this.mixKeyframes=Co(Gc,mc(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=vc(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=fo(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Mc&&(b.value=Vc(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Eo(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Eo(e)}get time(){return Eo(this.currentTime)}set time(e){e=V(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return jc(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(ss.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Eo(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=hc,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(ss.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,cs.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function qc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Jc=e=>e*180/Math.PI,Yc=e=>Zc(Jc(Math.atan2(e[1],e[0]))),Xc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yc,rotateZ:Yc,skewX:e=>Jc(Math.atan(e[1])),skewY:e=>Jc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zc=e=>(e%=360,e<0&&(e+=360),e),Qc=Yc,$c=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),el=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),tl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$c,scaleY:el,scale:e=>($c(e)+el(e))/2,rotateX:e=>Zc(Jc(Math.atan2(e[6],e[5]))),rotateY:e=>Zc(Jc(Math.atan2(-e[2],e[0]))),rotateZ:Qc,rotate:Qc,skewX:e=>Jc(Math.atan(e[4])),skewY:e=>Jc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nl(e){return+!!e.includes(`scale`)}function rl(e,t){if(!e||e===`none`)return nl(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=tl,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Xc,i=t}if(!i)return nl(t);let a=r[t],o=i[1].split(`,`).map(al);return typeof a==`function`?a(o):o[a]}var il=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return rl(n,t)};function al(e){return parseFloat(e.trim())}var ol=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],sl=new Set(ol),cl=e=>e===hs||e===W,ll=new Set([`x`,`y`,`z`]),ul=ol.filter(e=>!ll.has(e));function dl(e){let t=[];return ul.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var fl={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>rl(t,`x`),y:(e,{transform:t})=>rl(t,`y`)};fl.translateX=fl.x,fl.translateY=fl.y;var pl=new Set,ml=!1,hl=!1,gl=!1;function _l(){if(hl){let e=Array.from(pl).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=dl(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}hl=!1,ml=!1,pl.forEach(e=>e.complete(gl)),pl.clear()}function vl(){pl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hl=!0)})}function yl(){gl=!0,vl(),_l(),gl=!1}var bl=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(pl.add(this),ml||(ml=!0,H.read(vl),H.resolveKeyframes(_l))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}qc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pl.delete(this)}cancel(){this.state===`scheduled`&&(pl.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},xl=e=>e.startsWith(`--`);function Sl(e,t,n){xl(t)?e.style.setProperty(t,n):e.style[t]=n}var Cl={};function wl(e,t){let n=bo(e);return()=>Cl[t]??n()}var Tl=wl(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),El=wl(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Dl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ol={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Dl([0,.65,.55,1]),circOut:Dl([.55,0,1,.45]),backIn:Dl([.31,.01,.66,-.59]),backOut:Dl([.33,1.53,.69,.99])};function kl(e,t){if(e)return typeof e==`function`?El()?gc(e,t):`ease-out`:Jo(e)?Dl(e):Array.isArray(e)?e.map(e=>kl(e,t)||Ol.easeOut):Ol[e]}function Al(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=kl(s,i);Array.isArray(d)&&(u.easing=d),$o.value&&cs.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return $o.value&&p.finished.finally(()=>{cs.waapi--}),p}function jl(e){return typeof e==`function`&&`applyToOptions`in e}function Ml({type:e,...t}){return jl(e)&&El()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Nl=class extends Wc{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,ho(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Ml(e);this.animation=Al(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Vc(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Sl(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Eo(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Eo(e)}get time(){return Eo(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=V(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Tl()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),xo):r(this)}},Pl={anticipate:Bo,backInOut:zo,circInOut:Uo};function Fl(e){return e in Pl}function Il(e){typeof e.ease==`string`&&Fl(e.ease)&&(e.ease=Pl[e.ease])}var Ll=10,Rl=class extends Nl{constructor(e){Il(e),Uc(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Kc({...a,autoplay:!1}),s=Math.max(Ll,ss.now()-this.startTime),c=fo(0,Ll,s-Ll),l=o.sample(s).value,{name:u}=this.options;i&&u&&Sl(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},zl=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Zs.test(e)||e===`0`)&&!e.startsWith(`url(`));function Bl(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Vl(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=zl(i,t),s=zl(a,t);return mo(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Bl(e)||(n===`spring`||jl(n))&&r}function Hl(e){e.duration=0,e.type=`keyframes`}var Ul=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Wl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Gl(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Wl.test(e[t]))return!0;return!1}var Kl=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ql=bo(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Jl(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return ql()&&n&&(Ul.has(n)||Kl.has(n)&&Gl(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Yl=40,Xl=class extends Wc{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ss.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||bl)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=ss.now();let u=!0;Vl(e,i,a,o)||(u=!1,(go.instantAnimations||!s)&&l?.(Vc(e,n,t)),e[0]=e[e.length-1],Hl(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Yl?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Jl(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Rl({...d,element:p})}catch{m=new Kc(d)}else m=new Kc(d);m.finished.then(()=>{this.notifyFinished()}).catch(xo),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),yl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Zl(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Ql=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $l(e){let t=Ql.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var eu=4;function tu(e,t,n=1){ho(n<=eu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=$l(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return _o(e)?parseFloat(e):e}return fs(i)?tu(i,t,n+1):i}var nu={type:`spring`,stiffness:500,damping:25,restSpeed:10},ru=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),iu={type:`keyframes`,duration:.8},au={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ou=(e,{keyframes:t})=>t.length>2?iu:sl.has(e)?e.startsWith(`scale`)?ru(t[1]):nu:au;function su(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function cu(e,t){let n=e?.[t]??e?.default??e;return n===e?n:su(n,e)}var lu=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function uu(e){for(let t in e)if(!lu.has(t))return!0;return!1}var du=(e,t,n,r={},i,a)=>o=>{let s=cu(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=V(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};uu(s)||Object.assign(u,ou(e,u)),u.duration&&=V(u.duration),u.repeatDelay&&=V(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Hl(u),u.delay===0&&(d=!0)),(go.instantAnimations||go.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Hl(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Vc(u.keyframes,s);if(e!==void 0){H.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Kc(u):new Xl(u)};function fu(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function pu(e,t,n,r){if(typeof t==`function`){let[i,a]=fu(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=fu(r);t=t(n===void 0?e.custom:n,i,a)}return t}function mu(e,t,n){let r=e.getProps();return pu(r,t,n===void 0?r.custom:n,e)}var hu=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...ol]),gu=30,_u=e=>!isNaN(parseFloat(e)),vu={current:void 0},yu=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=ss.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ss.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=_u(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&ko(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new To);let n=this.events[e].add(t);return e===`change`?()=>{n(),H.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return vu.current&&vu.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=ss.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>gu)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,gu);return Do(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function bu(e,t){return new yu(e,t)}var xu=e=>Array.isArray(e);function Su(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bu(n))}function Cu(e){return xu(e)?e[e.length-1]||0:e}function wu(e,t){let{transitionEnd:n={},transition:r={},...i}=mu(e,t)||{};i={...i,...n};for(let t in i)Su(e,t,Cu(i[t]))}var J=e=>!!(e&&e.getVelocity);function Tu(e){return!!(J(e)&&e.add)}function Eu(e,t){let n=e.getValue(`willChange`);if(Tu(n))return n.add(t);if(!n&&go.WillChange){let n=new go.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Du(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ou=`data-`+Du(`framerAppearId`);function ku(e){return e.props[Ou]}function Au({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ju(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?su(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Au(d,t))continue;let o={delay:n,...cu(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){H.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=ku(e);if(n){let e=window.MotionHandoffAnimation(n,t,H);e!==null&&(o.startTime=e,f=!0)}}Eu(e,t);let p=l??e.shouldReduceMotion;r.start(du(t,r,i,p&&hu.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>H.update(()=>{o&&wu(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Mu(e,t,n={}){let r=mu(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(ju(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Nu(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Nu(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Mu(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Zl(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Pu(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Mu(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Mu(e,t,n);else{let i=typeof t==`function`?mu(e,t,n.custom):t;r=Promise.all(ju(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Fu={test:e=>e===`auto`,parse:e=>e},Iu=e=>t=>t.test(e),Lu=[hs,W,js,As,Ns,Ms,Fu],Ru=e=>Lu.find(Iu(e));function zu(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||yo(e)}var Bu=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Vu(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ys)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Bu.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Hu=/\b([a-z-]*)\(.*?\)/gu,Uu={...Zs,getAnimatableNone:e=>{let t=e.match(Hu);return t?t.map(Vu).join(` `):e}},Wu={...Zs,getAnimatableNone:e=>{let t=Zs.parse(e);return Zs.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Gu={...hs,transform:Math.round},Ku={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:As,rotateX:As,rotateY:As,rotateZ:As,scale:_s,scaleX:_s,scaleY:_s,scaleZ:_s,skew:As,skewX:As,skewY:As,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:gs,originX:Ps,originY:Ps,originZ:W,zIndex:Gu,fillOpacity:gs,strokeOpacity:gs,numOctaves:Gu},qu={...Ku,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:Uu,WebkitFilter:Uu,mask:Wu,WebkitMask:Wu},Ju=e=>qu[e],Yu=new Set([Uu,Wu]);function Xu(e,t){let n=Ju(e);return Yu.has(n)||(n=Zs),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Zu=new Set([`auto`,`none`,`0`]);function Qu(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Zu.has(t)&&Ws(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Xu(n,i)}var $u=class extends bl{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),fs(r))){let i=tu(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!hu.has(n)||e.length!==2)return;let[r,i]=e,a=Ru(r),o=Ru(i);if(ms(r)!==ms(i)&&fl[n]){this.needsMeasurement=!0;return}if(a!==o)if(cl(a)&&cl(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else fl[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||zu(e[t]))&&n.push(t);n.length&&Qu(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fl[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=fl[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function ed(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var td=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function nd(e){return vo(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:rd,cancel:id}=ns(queueMicrotask,!1),ad={x:!1,y:!1};function od(){return ad.x||ad.y}function sd(e){return e===`x`||e===`y`?ad[e]?null:(ad[e]=!0,()=>{ad[e]=!1}):ad.x||ad.y?null:(ad.x=ad.y=!0,()=>{ad.x=ad.y=!1})}function cd(e,t){let n=ed(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ld(e){return!(e.pointerType===`touch`||od())}function ud(e,t,n={}){let[r,i,a]=cd(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!ld(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var dd=(e,t)=>t?e===t?!0:dd(e,t.parentElement):!1,fd=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,pd=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function md(e){return pd.has(e.tagName)||e.isContentEditable===!0}var hd=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function gd(e){return hd.has(e.tagName)||e.isContentEditable===!0}var _d=new WeakSet;function vd(e){return t=>{t.key===`Enter`&&e(t)}}function yd(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var bd=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=vd(()=>{if(_d.has(n))return;yd(n,`down`);let e=vd(()=>{yd(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>yd(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function xd(e){return fd(e)&&!od()}var Sd=new WeakSet;function Cd(e,t,n={}){let[r,i,a]=cd(e,n),o=e=>{let r=e.currentTarget;if(!xd(e)||Sd.has(e))return;_d.add(r),n.stopPropagation&&Sd.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),_d.has(r)&&_d.delete(r),xd(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||dd(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),nd(e)&&(e.addEventListener(`focus`,e=>bd(e,i)),!md(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function wd(e){return vo(e)&&`ownerSVGElement`in e}var Td=new WeakMap,Ed,Dd=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:wd(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Od=Dd(`inline`,`width`,`offsetWidth`),kd=Dd(`block`,`height`,`offsetHeight`);function Ad({target:e,borderBoxSize:t}){Td.get(e)?.forEach(n=>{n(e,{get width(){return Od(e,t)},get height(){return kd(e,t)}})})}function jd(e){e.forEach(Ad)}function Md(){typeof ResizeObserver>`u`||(Ed=new ResizeObserver(jd))}function Nd(e,t){Ed||Md();let n=ed(e);return n.forEach(e=>{let n=Td.get(e);n||(n=new Set,Td.set(e,n)),n.add(t),Ed?.observe(e)}),()=>{n.forEach(e=>{let n=Td.get(e);n?.delete(t),n?.size||Ed?.unobserve(e)})}}var Pd=new Set,Fd;function Id(){Fd=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Pd.forEach(t=>t(e))},window.addEventListener(`resize`,Fd)}function Ld(e){return Pd.add(e),Fd||Id(),()=>{Pd.delete(e),!Pd.size&&typeof Fd==`function`&&(window.removeEventListener(`resize`,Fd),Fd=void 0)}}function Rd(e,t){return typeof e==`function`?Ld(e):Nd(e,t)}function zd(e){return wd(e)&&e.tagName===`svg`}var Bd=[...Lu,G,Zs],Vd=e=>Bd.find(Iu(e)),Hd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ud=()=>({x:Hd(),y:Hd()}),Wd=()=>({min:0,max:0}),Y=()=>({x:Wd(),y:Wd()}),Gd=new WeakMap;function Kd(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function qd(e){return typeof e==`string`||Array.isArray(e)}var Jd=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Yd=[`initial`,...Jd];function Xd(e){return Kd(e.animate)||Yd.some(t=>qd(e[t]))}function Zd(e){return!!(Xd(e)||e.variants)}function Qd(e,t,n){for(let r in t){let i=t[r],a=n[r];if(J(i))e.addValue(r,i);else if(J(a))e.addValue(r,bu(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,bu(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var $d={current:null},ef={current:!1},tf=typeof window<`u`;function nf(){if(ef.current=!0,tf)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>$d.current=e.matches;e.addEventListener(`change`,t),t()}else $d.current=!1}var rf=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],af={};function of(e){af=e}function sf(){return af}var cf=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=ss.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,H.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Xd(t),this.isVariantNode=Zd(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&J(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Gd.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ef.current||nf(),this.shouldReduceMotion=$d.current),process.env.NODE_ENV!==`production`&&ko(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),rs(this.notifyUpdate),rs(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Ul.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Nl({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:V(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=sl.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&H.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in af){let t=af[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<rf.length;t++){let n=rf[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Qd(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=bu(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(_o(n)||yo(n))?n=parseFloat(n):!Vd(n)&&Zs.test(t)&&(n=Xu(e,t)),this.setBaseTarget(e,J(n)?n.get():n)),J(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=pu(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!J(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new To),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){rd.render(this.render)}},lf=class extends cf{constructor(){super(...arguments),this.KeyframeResolver=$u}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},uf=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function df({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ff({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pf(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function mf(e){return e===void 0||e===1}function hf({scale:e,scaleX:t,scaleY:n}){return!mf(e)||!mf(t)||!mf(n)}function gf(e){return hf(e)||_f(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function _f(e){return vf(e.x)||vf(e.y)}function vf(e){return e&&e!==`0%`}function yf(e,t,n){return n+t*(e-n)}function bf(e,t,n,r,i){return i!==void 0&&(e=yf(e,i,r)),yf(e,n,r)+t}function xf(e,t=0,n=1,r,i){e.min=bf(e.min,t,n,r,i),e.max=bf(e.max,t,n,r,i)}function Sf(e,{x:t,y:n}){xf(e.x,t.translate,t.scale,t.originPoint),xf(e.y,n.translate,n.scale,n.originPoint)}var Cf=.999999999999,wf=1.0000000000001;function Tf(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Ef(e.x,-a.scroll.offset.x),Ef(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Sf(e,o)),r&&gf(a.latestValues)&&kf(e,a.latestValues,a.layout?.layoutBox))}t.x<wf&&t.x>Cf&&(t.x=1),t.y<wf&&t.y>Cf&&(t.y=1)}function Ef(e,t){e.min+=t,e.max+=t}function Df(e,t,n,r,i=.5){xf(e,t,n,K(e.min,e.max,i),r)}function Of(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function kf(e,t,n){let r=n??e;Df(e.x,Of(t.x,r.x),t.scaleX,t.scale,t.originX),Df(e.y,Of(t.y,r.y),t.scaleY,t.scale,t.originY)}function Af(e,t){return df(pf(e.getBoundingClientRect(),t))}function jf(e,t,n){let r=Af(e,n),{scroll:i}=t;return i&&(Ef(r.x,i.offset.x),Ef(r.y,i.offset.y)),r}var Mf={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Nf=ol.length;function Pf(e,t,n){let r=``,i=!0;for(let a=0;a<Nf;a++){let o=ol[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=td(s,Ku[o]);if(!c){i=!1;let t=Mf[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ff(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(sl.has(e)){o=!0;continue}else if(us(e)){i[e]=n;continue}else{let t=td(n,Ku[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Pf(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function If(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Lf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Rf={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;return`${Lf(e,t.target.x)}% ${Lf(e,t.target.y)}%`}},zf={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Zs.parse(e);if(i.length>5)return r;let a=Zs.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=K(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Bf={borderRadius:{...Rf,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Rf,borderTopRightRadius:Rf,borderBottomLeftRadius:Rf,borderBottomRightRadius:Rf,boxShadow:zf};function Vf(e,{layout:t,layoutId:n}){return sl.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Bf[e]||e===`opacity`)}function Hf(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(J(r[t])||i&&J(i[t])||Vf(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Uf(e){return window.getComputedStyle(e)}var Wf=class extends lf{constructor(){super(...arguments),this.type=`html`,this.renderInstance=If}readValueFromInstance(e,t){if(sl.has(t))return this.projection?.isProjecting?nl(t):il(e,t);{let n=Uf(e),r=(us(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Af(e,t)}build(e,t,n){Ff(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Hf(e,t,n)}},Gf={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Kf={offset:`strokeDashoffset`,array:`strokeDasharray`};function qf(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Gf:Kf;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Jf=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Yf(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ff(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Jf)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&qf(d,i,a,o,!1)}var Xf=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Zf=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Qf(e,t,n,r){If(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Xf.has(n)?n:Du(n),t.attrs[n])}function $f(e,t,n){let r=Hf(e,t,n);for(let n in e)if(J(e[n])||J(t[n])){let t=ol.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var ep=class extends lf{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(sl.has(t)){let e=Ju(t);return e&&e.default||0}return t=Xf.has(t)?t:Du(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return $f(e,t,n)}build(e,t,n){Yf(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Qf(e,t,n,r)}mount(e){this.isSVGTag=Zf(e.tagName),super.mount(e)}},tp=Yd.length;function np(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&np(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<tp;n++){let r=Yd[n],i=e.props[r];(qd(i)||i===!1)&&(t[r]=i)}return t}function rp(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ip=[...Jd].reverse(),ap=Jd.length;function op(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Pu(e,t,n)))}function sp(e){let t=op(e),n=up(),r=!0,i=!1,a=t=>(n,r)=>{let i=mu(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=np(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<ap;t++){let p=ip[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=qd(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Kd(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=cp(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},ee=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=xu(t)&&xu(n)?!rp(t,n):t!==n,r?t==null?u.add(e):ee(e):t!==void 0&&u.has(e)?ee(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let E=v&&y;b&&(!E||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=mu(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Zl(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=mu(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=up(),i=!0}}}function cp(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!rp(t,e):!1}function lp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function up(){return{animate:lp(!0),whileInView:lp(),whileHover:lp(),whileTap:lp(),whileDrag:lp(),whileFocus:lp(),exit:lp()}}function dp(e,t){e.min=t.min,e.max=t.max}function fp(e,t){dp(e.x,t.x),dp(e.y,t.y)}function pp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var mp=1e-4,hp=1-mp,gp=1+mp,_p=.01,vp=0-_p,yp=0+_p;function bp(e){return e.max-e.min}function xp(e,t,n){return Math.abs(e-t)<=n}function Sp(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=bp(n)/bp(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hp&&e.scale<=gp||isNaN(e.scale))&&(e.scale=1),(e.translate>=vp&&e.translate<=yp||isNaN(e.translate))&&(e.translate=0)}function Cp(e,t,n,r){Sp(e.x,t.x,n.x,r?r.originX:void 0),Sp(e.y,t.y,n.y,r?r.originY:void 0)}function wp(e,t,n,r=0){e.min=(r?K(n.min,n.max,r):n.min)+t.min,e.max=e.min+bp(t)}function Tp(e,t,n,r){wp(e.x,t.x,n.x,r?.x),wp(e.y,t.y,n.y,r?.y)}function Ep(e,t,n,r=0){let i=r?K(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+bp(t)}function Dp(e,t,n,r){Ep(e.x,t.x,n.x,r?.x),Ep(e.y,t.y,n.y,r?.y)}function Op(e,t,n,r,i){return e-=t,e=yf(e,1/n,r),i!==void 0&&(e=yf(e,1/i,r)),e}function kp(e,t=0,n=1,r=.5,i,a=e,o=e){if(js.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=K(a.min,a.max,r);e===a&&(s-=t),e.min=Op(e.min,t,n,s,i),e.max=Op(e.max,t,n,s,i)}function Ap(e,t,[n,r,i],a,o){kp(e,t[n],t[r],t[i],t.scale,a,o)}var jp=[`x`,`scaleX`,`originX`],Mp=[`y`,`scaleY`,`originY`];function Np(e,t,n,r){Ap(e.x,t,jp,n?n.x:void 0,r?r.x:void 0),Ap(e.y,t,Mp,n?n.y:void 0,r?r.y:void 0)}function Pp(e){return e.translate===0&&e.scale===1}function Fp(e){return Pp(e.x)&&Pp(e.y)}function Ip(e,t){return e.min===t.min&&e.max===t.max}function Lp(e,t){return Ip(e.x,t.x)&&Ip(e.y,t.y)}function Rp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zp(e,t){return Rp(e.x,t.x)&&Rp(e.y,t.y)}function Bp(e){return bp(e.x)/bp(e.y)}function Vp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Hp(e){return[e(`x`),e(`y`)]}function Up(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Wp=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Gp=Wp.length,Kp=e=>typeof e==`string`?parseFloat(e):e,qp=e=>typeof e==`number`||W.test(e);function Jp(e,t,n,r,i,a){i?(e.opacity=K(0,n.opacity??1,Xp(r)),e.opacityExit=K(t.opacity??1,0,Zp(r))):a&&(e.opacity=K(t.opacity??1,n.opacity??1,r));for(let i=0;i<Gp;i++){let a=Wp[i],o=Yp(t,a),s=Yp(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||qp(o)===qp(s)?(e[a]=Math.max(K(Kp(o),Kp(s),r),0),(js.test(s)||js.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=K(t.rotate||0,n.rotate||0,r))}function Yp(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Xp=Qp(0,.5,Ho),Zp=Qp(.5,.95,xo);function Qp(e,t,n){return r=>r<e?0:r>t?1:n(wo(e,t,r))}function $p(e,t,n){let r=J(e)?e:bu(e);return r.start(du(``,r,t,n)),r.animation}function em(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var tm=(e,t)=>e.depth-t.depth,nm=class{constructor(){this.children=[],this.isDirty=!1}add(e){lo(this.children,e),this.isDirty=!0}remove(e){uo(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tm),this.isDirty=!1,this.children.forEach(e)}};function rm(e,t){let n=ss.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(rs(r),e(a-t))};return H.setup(r,!0),()=>rs(r)}function im(e){return J(e)?e.get():e}var am=class{constructor(){this.members=[]}add(e){lo(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(uo(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(uo(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},om={hasAnimatedSinceResize:!0,hasEverUpdated:!1},sm={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cm=[``,`X`,`Y`,`Z`],lm=1e3,um=0;function dm(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=ku(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,H,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fm(r)}function pm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=um++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,$o.value&&(sm.nodes=sm.calculatedTargetDeltas=sm.calculatedProjections=0),this.nodes.forEach(gm),this.nodes.forEach(Tm),this.nodes.forEach(Em),this.nodes.forEach(_m),$o.addProjectionMetrics&&$o.addProjectionMetrics(sm)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new nm)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new To),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=wd(t)&&!zd(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;H.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=rm(i,250),om.hasAnimatedSinceResize&&(om.hasAnimatedSinceResize=!1,this.nodes.forEach(wm)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Nm,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!zp(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...cu(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||wm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dm),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(bm),this.nodes.forEach(ym);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Sm),this.nodes.forEach(Cm),this.nodes.forEach(mm),this.nodes.forEach(hm)):this.nodes.forEach(xm),this.clearAllSnapshots();let e=ss.now();U.delta=fo(0,1e3/60,e-U.timestamp),U.timestamp=e,U.isProcessing=!0,is.update.process(U),is.preRender.process(U),is.render.process(U),U.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vm),this.sharedNodes.forEach(Om)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,H.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){H.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bp(this.snapshot.measuredBox.x)&&!bp(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Fp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||gf(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Lm(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Y();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(zm))){let{scroll:e}=this.root;e&&(Ef(t.x,e.offset.x),Ef(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(fp(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&fp(t,e),Ef(t.x,i.offset.x),Ef(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Y();fp(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Ef(r.x,-n.scroll.offset.x),Ef(r.y,-n.scroll.offset.y)),gf(n.latestValues)&&kf(r,n.latestValues,n.layout?.layoutBox)}return gf(this.latestValues)&&kf(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Y();fp(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!gf(n.latestValues))continue;let r;n.instance&&(hf(n.latestValues)&&n.updateSnapshot(),r=Y(),fp(r,n.measurePageBox())),Np(t,n.latestValues,n.snapshot?.layoutBox,r)}return gf(this.latestValues)&&Np(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==U.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=U.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tp(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):fp(this.target,this.layout.layoutBox),Sf(this.target,this.targetDelta)):fp(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),$o.value&&sm.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||hf(this.parent.latestValues)||_f(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Dp(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),fp(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===U.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;fp(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Tf(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Y());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pp(this.prevProjectionDelta.x,this.projectionDelta.x),pp(this.prevProjectionDelta.y,this.projectionDelta.y)),Cp(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Vp(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),$o.value&&sm.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ud(),this.projectionDelta=Ud(),this.projectionDeltaWithTransform=Ud()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Ud();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Y(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Mm));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;km(a.x,e.x,n),km(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dp(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),jm(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Lp(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Y(),fp(d,this.relativeTarget)),s&&(this.animationValues=i,Jp(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(rs(this.pendingAnimation),void 0),this.pendingAnimation=H.update(()=>{om.hasAnimatedSinceResize=!0,cs.layout++,this.motionValue||=bu(0),this.motionValue.jump(0,!1),this.currentAnimation=$p(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{cs.layout--},onComplete:()=>{cs.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(lm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Rm(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=bp(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=bp(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}fp(t,n),kf(t,i),Cp(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new am),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&dm(`z`,e,r,this.animationValues);for(let t=0;t<cm.length;t++)dm(`rotate${cm[t]}`,e,r,this.animationValues),dm(`skew${cm[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=im(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=im(t?.pointerEvents)||``),this.hasProjected&&!gf(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Up(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Bf){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Bf[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?im(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ym),this.root.sharedNodes.clear()}}}function mm(e){e.updateLayout()}function hm(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Hp(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=bp(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;dp(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Rm(i,t.layoutBox,n)&&Hp(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=bp(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ud();Cp(o,n,t.layoutBox);let s=Ud();a?Cp(s,e.applyTransform(r,!0),t.measuredBox):Cp(s,n,t.layoutBox);let c=!Fp(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Y();Dp(s,t.layoutBox,i.layoutBox,o);let c=Y();Dp(c,n,a.layoutBox,o),zp(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gm(e){$o.value&&sm.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function _m(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vm(e){e.clearSnapshot()}function ym(e){e.clearMeasurements()}function bm(e){e.isLayoutDirty=!0,e.updateLayout()}function xm(e){e.isLayoutDirty=!1}function Sm(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Cm(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function wm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Tm(e){e.resolveTargetDelta()}function Em(e){e.calcProjection()}function Dm(e){e.resetSkewAndRotation()}function Om(e){e.removeLeadSnapshot()}function km(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Am(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function jm(e,t,n,r){Am(e.x,t.x,n.x,r),Am(e.y,t.y,n.y,r)}function Mm(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Nm={duration:.45,ease:[.4,0,.1,1]},Pm=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fm=Pm(`applewebkit/`)&&!Pm(`chrome/`)?Math.round:xo;function Im(e){e.min=Fm(e.min),e.max=Fm(e.max)}function Lm(e){Im(e.x),Im(e.y)}function Rm(e,t,n){return e===`position`||e===`preserve-aspect`&&!xp(Bp(t),Bp(n),.2)}function zm(e){return e!==e.root&&e.scroll?.wasRoot}var Bm=pm({attachResizeListener:(e,t)=>em(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Vm={current:void 0},Hm=pm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vm.current){let e=new Bm({});e.mount(window),e.setOptions({layoutScroll:!0}),Vm.current=e}return Vm.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Um=(0,a.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Wm(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Gm(...e){return t=>{let n=!1,r=e.map(e=>{let r=Wm(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Wm(e[t],null)}}}}function Km(...e){return a.useCallback(Gm(...e),e)}var qm=class extends a.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(nd(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=nd(e)&&e.offsetWidth||0,r=nd(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Jm({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:s}){let c=(0,a.useId)(),l=(0,a.useRef)(null),u=(0,a.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=(0,a.useContext)(Um),f=Km(l,e.props?.ref??e?.ref);return(0,a.useInsertionEffect)(()=>{let{width:e,height:a,top:o,left:f,right:p,bottom:m}=u.current;if(t||s===!1||!l.current||!e||!a)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${o}`;l.current.dataset.motionPopId=c;let _=document.createElement(`style`);d&&(_.nonce=d);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
3
|
-
[data-motion-pop-id="${c}"] {
|
|
4
|
-
position: absolute !important;
|
|
5
|
-
width: ${e}px !important;
|
|
6
|
-
height: ${a}px !important;
|
|
7
|
-
${h}px !important;
|
|
8
|
-
${g}px !important;
|
|
9
|
-
}
|
|
10
|
-
`),()=>{l.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,o.jsx)(qm,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:a.cloneElement(e,{ref:f})})}var Ym=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:c,anchorX:l,anchorY:u,root:d})=>{let f=oo(Xm),p=(0,a.useId)(),m=!0,h=(0,a.useMemo)(()=>(m=!1,{id:p,initial:t,isPresent:n,custom:i,onExitComplete:e=>{f.set(e,!0);for(let e of f.values())if(!e)return;r&&r()},register:e=>(f.set(e,!1),()=>f.delete(e))}),[n,f,r]);return s&&m&&(h={...h}),(0,a.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[n]),a.useEffect(()=>{!n&&!f.size&&r&&r()},[n]),e=(0,o.jsx)(Jm,{pop:c===`popLayout`,isPresent:n,anchorX:l,anchorY:u,root:d,children:e}),(0,o.jsx)(co.Provider,{value:h,children:e})};function Xm(){return new Map}function Zm(e=!0){let t=(0,a.useContext)(co);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,o=(0,a.useId)();(0,a.useEffect)(()=>{if(e)return i(o)},[e]);let s=(0,a.useCallback)(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}var Qm=e=>e.key||``;function $m(e){let t=[];return a.Children.forEach(e,e=>{(0,a.isValidElement)(e)&&t.push(e)}),t}var eh=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s=`sync`,propagate:c=!1,anchorX:l=`left`,anchorY:u=`top`,root:d})=>{let[f,p]=Zm(c),m=(0,a.useMemo)(()=>$m(e),[e]),h=c&&!f?[]:m.map(Qm),g=(0,a.useRef)(!0),_=(0,a.useRef)(m),v=oo(()=>new Map),y=(0,a.useRef)(new Set),[b,x]=(0,a.useState)(m),[S,C]=(0,a.useState)(m);so(()=>{g.current=!1,_.current=m;for(let e=0;e<S.length;e++){let t=Qm(S[e]);h.includes(t)?(v.delete(t),y.current.delete(t)):v.get(t)!==!0&&v.set(t,!1)}},[S,h.length,h.join(`-`)]);let w=[];if(m!==b){let e=[...m];for(let t=0;t<S.length;t++){let n=S[t],r=Qm(n);h.includes(r)||(e.splice(t,0,n),w.push(n))}return s===`wait`&&w.length&&(e=w),C($m(e)),x(m),null}process.env.NODE_ENV!==`production`&&s===`wait`&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:T}=(0,a.useContext)(ao);return(0,o.jsx)(o.Fragment,{children:S.map(e=>{let a=Qm(e),b=c&&!f?!1:m===S||h.includes(a);return(0,o.jsx)(Ym,{isPresent:b,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:d,onExitComplete:b?void 0:()=>{if(y.current.has(a))return;if(v.has(a))y.current.add(a),v.set(a,!0);else return;let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(T?.(),C(_.current),c&&p?.(),r&&r())},anchorX:l,anchorY:u,children:e},a)})})},th=(0,a.createContext)({strict:!1}),nh={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},rh=!1;function ih(){if(rh)return;let e={};for(let t in nh)e[t]={isEnabled:e=>nh[t].some(t=>!!e[t])};of(e),rh=!0}function ah(){return ih(),sf()}function oh(e){let t=ah();for(let n in e)t[n]={...t[n],...e[n]};of(t)}var sh=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ch(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||sh.has(e)}var lh=e.r({default:()=>uh}),uh,dh=e.n((()=>{throw uh={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),fh=e=>!ch(e);function ph(e){typeof e==`function`&&(fh=t=>t.startsWith(`on`)?!ch(t):e(t))}try{ph((dh(),e.i(lh)).default)}catch{}function mh(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||J(e[i])||(fh(i)||n===!0&&ch(i)||!t&&!ch(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var hh=(0,a.createContext)({});function gh(e,t){if(Xd(e)){let{initial:t,animate:n}=e;return{initial:t===!1||qd(t)?t:void 0,animate:qd(n)?n:void 0}}return e.inherit===!1?{}:t}function _h(e){let{initial:t,animate:n}=gh(e,(0,a.useContext)(hh));return(0,a.useMemo)(()=>({initial:t,animate:n}),[vh(t),vh(n)])}function vh(e){return Array.isArray(e)?e.join(` `):e}var yh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bh(e,t,n){for(let r in t)!J(t[r])&&!Vf(r,n)&&(e[r]=t[r])}function xh({transformTemplate:e},t){return(0,a.useMemo)(()=>{let n=yh();return Ff(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Sh(e,t){let n=e.style||{},r={};return bh(r,n,e),Object.assign(r,xh(e,t)),r}function Ch(e,t){let n={},r=Sh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var wh=()=>({...yh(),attrs:{}});function Th(e,t,n,r){let i=(0,a.useMemo)(()=>{let n=wh();return Yf(n,t,Zf(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};bh(t,e.style,e),i.style={...t,...i.style}}return i}var Eh=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Dh(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Eh.indexOf(e)>-1||/[A-Z]/u.test(e))}function Oh(e,t,n,{latestValues:r},i,o=!1,s){let c=(s??Dh(e)?Th:Ch)(t,r,i,e),l=mh(t,typeof e==`string`,o),u=e===a.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,a.useMemo)(()=>J(d)?d.get():d,[d]);return(0,a.createElement)(e,{...u,children:f})}function kh({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ah(n,r,i,e),renderState:t()}}function Ah(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=im(a[e]);let{initial:o,animate:s}=e,c=Xd(e),l=Zd(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Kd(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=pu(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var jh=e=>(t,n)=>{let r=(0,a.useContext)(hh),i=(0,a.useContext)(co),o=()=>kh(e,t,r,i);return n?o():oo(o)},Mh=jh({scrapeMotionValuesFromProps:Hf,createRenderState:yh}),Nh=jh({scrapeMotionValuesFromProps:$f,createRenderState:wh}),Ph=Symbol.for(`motionComponentSymbol`);function Fh(e,t,n){let r=(0,a.useRef)(n);(0,a.useInsertionEffect)(()=>{r.current=n});let i=(0,a.useRef)(null);return(0,a.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var Ih=(0,a.createContext)({});function Lh(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Rh(e,t,n,r,i,o){let{visualElement:s}=(0,a.useContext)(hh),c=(0,a.useContext)(th),l=(0,a.useContext)(co),u=(0,a.useContext)(Um),d=u.reducedMotion,f=u.skipAnimations,p=(0,a.useRef)(null),m=(0,a.useRef)(!1);r||=c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,g=(0,a.useContext)(Ih);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&zh(p.current,n,i,g);let _=(0,a.useRef)(!1);(0,a.useInsertionEffect)(()=>{h&&_.current&&h.update(n,l)});let v=n[Ou],y=(0,a.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return so(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,a.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function zh(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Bh(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Lh(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Bh(e){if(e)return e.options.allowProjection===!1?Bh(e.parent):e.projection}function Vh(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&oh(r);let s=n?n===`svg`:Dh(e),c=s?Nh:Mh;function l(n,l){let u,d={...(0,a.useContext)(Um),...n,layoutId:Hh(n)},{isStatic:f}=d,p=_h(n),m=c(n,f);if(!f&&typeof window<`u`){Uh(d,r);let t=Wh(d);u=t.MeasureLayout,p.visualElement=Rh(e,m,d,i,t.ProjectionNode,s)}return(0,o.jsxs)(hh.Provider,{value:p,children:[u&&p.visualElement?(0,o.jsx)(u,{visualElement:p.visualElement,...d}):null,Oh(e,n,Fh(m,p.visualElement,l),m,f,t,s)]})}l.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let u=(0,a.forwardRef)(l);return u[Ph]=e,u}function Hh({layoutId:e}){let t=(0,a.useContext)(ao).id;return t&&e!==void 0?t+`-`+e:e}function Uh(e,t){let n=(0,a.useContext)(th).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?mo(!1,t,`lazy-strict-mode`):ho(!1,t,`lazy-strict-mode`)}}function Wh(e){let{drag:t,layout:n}=ah();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Gh(e,t){if(typeof Proxy>`u`)return Vh;let n=new Map,r=(n,r)=>Vh(n,r,e,t);return new Proxy((e,t)=>(process.env.NODE_ENV!==`production`&&ko(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t)),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Vh(a,void 0,e,t)),n.get(a))})}var Kh=(e,t)=>t.isSVG??Dh(e)?new ep(t):new Wf(t,{allowProjection:e!==a.Fragment}),qh=class extends uf{constructor(e){super(e),e.animationState||=sp(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Kd(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Jh=0,Yh={animation:{Feature:qh},exit:{Feature:class extends uf{constructor(){super(...arguments),this.id=Jh++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=mu(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Xh(e){return{point:{x:e.pageX,y:e.pageY}}}var Zh=e=>t=>fd(t)&&e(t,Xh(t));function Qh(e,t,n,r){return em(e,t,Zh(n),r)}var $h=({current:e})=>e?e.ownerDocument.defaultView:null,eg=(e,t)=>Math.abs(e-t);function tg(e,t){let n=eg(e.x,t.x),r=eg(e.y,t.y);return Math.sqrt(n**2+r**2)}var ng=new Set([`auto`,`scroll`]),rg=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ig(this.lastRawMoveEventInfo,this.transformPagePoint));let e=og(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=tg(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=U;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ig(t,this.transformPagePoint),H.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=og(e.type===`pointercancel`?this.lastMoveEventInfo:ig(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!fd(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=ig(Xh(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=U;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,og(s,this.history)),this.removeListeners=Co(Qh(this.contextWindow,`pointermove`,this.handlePointerMove),Qh(this.contextWindow,`pointerup`,this.handlePointerUp),Qh(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ng.has(e.overflowX)||ng.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),H.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),rs(this.updatePoint)}};function ig(e,t){return t?{point:t(e.point)}:e}function ag(e,t){return{x:e.x-t.x,y:e.y-t.y}}function og({point:e},t){return{point:e,delta:ag(e,cg(t)),offset:ag(e,sg(t)),velocity:lg(t,.1)}}function sg(e){return e[0]}function cg(e){return e[e.length-1]}function lg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=cg(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>V(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>V(t)*2&&(r=e[1]);let a=Eo(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ug(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function dg(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function fg(e,{top:t,left:n,bottom:r,right:i}){return{x:dg(e.x,n,i),y:dg(e.y,t,r)}}function pg(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function mg(e,t){return{x:pg(e.x,t.x),y:pg(e.y,t.y)}}function hg(e,t){let n=.5,r=bp(e),i=bp(t);return i>r?n=wo(t.min,t.max-r,e.min):r>i&&(n=wo(e.min,e.max-i,t.min)),fo(0,1,n)}function gg(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var _g=.35;function vg(e=_g){return e===!1?e=0:e===!0&&(e=_g),{x:yg(e,`left`,`right`),y:yg(e,`top`,`bottom`)}}function yg(e,t,n){return{min:bg(e,t),max:bg(e,n)}}function bg(e,t){return typeof e==`number`?e:e[t]||0}var xg=new WeakMap,Sg=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Xh(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sd(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Hp(e=>{let t=this.getAxisMotionValue(e).get()||0;if(js.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=bp(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&H.update(()=>i(e,t),!1,!0),Eu(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Eg(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&H.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new rg(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$h(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&H.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Tg(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ug(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Lh(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=fg(n.layoutBox,e):this.constraints=!1,this.elastic=vg(t),r!==this.constraints&&!Lh(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Hp(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=gg(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Lh(e))return!1;let n=e.current;ho(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=jf(n,r.root,this.visualElement.getTransformPagePoint()),a=mg(r.layout.layoutBox,i);if(t){let e=t(ff(a));this.hasMutatedConstraints=!!e,e&&(a=df(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Hp(o=>{if(!Tg(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Eu(this.visualElement,e),n.start(du(e,n,0,t,this.visualElement,!1))}stopAnimation(){Hp(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Hp(t=>{let{drag:n}=this.getProps();if(!Tg(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-K(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Lh(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Hp(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=hg({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Hp(t=>{if(!Tg(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(K(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;xg.set(this.visualElement,this);let e=this.visualElement.current,t=Qh(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&gd(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Lh(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=wg(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),H.read(r);let o=em(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Hp(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=_g,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Cg(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wg(e,t,n){let r=Rd(e,Cg(n)),i=Rd(t,Cg(n));return()=>{r(),i()}}function Tg(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Eg(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Dg=class extends uf{constructor(e){super(e),this.removeGroupControls=xo,this.removeListeners=xo,this.controls=new Sg(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xo}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Og=e=>(t,n)=>{e&&H.update(()=>e(t,n),!1,!0)},kg=class extends uf{constructor(){super(...arguments),this.removePointerDownListener=xo}onPointerDown(e){this.session=new rg(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$h(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Og(e),onStart:Og(t),onMove:Og(n),onEnd:(e,t)=>{delete this.session,r&&H.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Qh(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Ag=!1,jg=class extends a.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Ag&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),om.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Ag=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||H.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),rd.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ag=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Mg(e){let[t,n]=Zm(),r=(0,a.useContext)(ao);return(0,o.jsx)(jg,{...e,layoutGroup:r,switchLayoutGroup:(0,a.useContext)(Ih),isPresent:t,safeToRemove:n})}var Ng={pan:{Feature:kg},drag:{Feature:Dg,ProjectionNode:Hm,MeasureLayout:Mg}};function Pg(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&H.postRender(()=>i(t,Xh(t)))}var Fg=class extends uf{mount(){let{current:e}=this.node;e&&(this.unmount=ud(e,(e,t)=>(Pg(this.node,t,`Start`),e=>Pg(this.node,e,`End`))))}unmount(){}},Ig=class extends uf{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Co(em(this.node.current,`focus`,()=>this.onFocus()),em(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Lg(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&H.postRender(()=>i(t,Xh(t)))}var Rg=class extends uf{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Cd(e,(e,t)=>(Lg(this.node,t,`Start`),(e,{success:t})=>Lg(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},zg=new WeakMap,Bg=new WeakMap,Vg=e=>{let t=zg.get(e.target);t&&t(e)},Hg=e=>{e.forEach(Vg)};function Ug({root:e,...t}){let n=e||document;Bg.has(n)||Bg.set(n,{});let r=Bg.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hg,{root:e,...t})),r[i]}function Wg(e,t,n){let r=Ug(t);return zg.set(e,n),r.observe(e),()=>{zg.delete(e),r.unobserve(e)}}var Gg={some:0,all:1},Kg=class extends uf{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Gg[r]};this.stopObserver=Wg(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(qg(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function qg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Jg={inView:{Feature:Kg},tap:{Feature:Rg},focus:{Feature:Ig},hover:{Feature:Fg}},Yg={layout:{ProjectionNode:Hm,MeasureLayout:Mg}},Xg=Gh({...Yh,...Jg,...Ng,...Yg},Kh);function Zg(){!ef.current&&nf();let[e]=(0,a.useState)($d.current);return process.env.NODE_ENV!==`production`&&ko(e!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),e}var Qg=`60dvh`,$g=(0,a.createContext)(!1);function e_(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=e_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function t_(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=e_(e))&&(r&&(r+=` `),r+=t);return r}var n_=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},r_=(e,t)=>({classGroupId:e,validator:t}),i_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),a_=`-`,o_=[],s_=`arbitrary..`,c_=e=>{let t=d_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return u_(e);let n=e.split(a_);return l_(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?n_(i,t):t:i||o_}return n[e]||o_}}},l_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=l_(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(a_):e.slice(t).join(a_),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},u_=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?s_+r:void 0})(),d_=e=>{let{theme:t,classGroups:n}=e;return f_(n,t)},f_=(e,t)=>{let n=i_();for(let r in e){let i=e[r];p_(i,n,r,t)}return n},p_=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];m_(i,t,n,r)}},m_=(e,t,n,r)=>{if(typeof e==`string`){h_(e,t,n);return}if(typeof e==`function`){g_(e,t,n,r);return}__(e,t,n,r)},h_=(e,t,n)=>{let r=e===``?t:v_(t,e);r.classGroupId=n},g_=(e,t,n,r)=>{if(y_(e)){p_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(r_(n,e))},__=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];p_(o,v_(t,a),n,r)}},v_=(e,t)=>{let n=e,r=t.split(a_),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=i_(),n.nextPart.set(t,i)),n=i}return n},y_=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,b_=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},x_=`!`,S_=`:`,C_=[],w_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),T_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===S_){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(x_)?(c=s.slice(0,-1),l=!0):s.startsWith(x_)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return w_(t,l,c,u)};if(t){let e=t+S_,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):w_(C_,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},E_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},D_=e=>({cache:b_(e.cacheSize),parseClassName:T_(e),sortModifiers:E_(e),...c_(e)}),O_=/\s+/,k_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(O_),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+x_:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},A_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=j_(n))&&(i&&(i+=` `),i+=r);return i},j_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=j_(e[r]))&&(n&&(n+=` `),n+=t);return n},M_=(e,...t)=>{let n,r,i,a,o=o=>(n=D_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=k_(e,n);return i(e,a),a};return a=o,(...e)=>a(A_(...e))},N_=[],X=e=>{let t=t=>t[e]||N_;return t.isThemeGetter=!0,t},P_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,L_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,z_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,B_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,V_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,H_=e=>I_.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),U_=e=>!!e&&Number.isInteger(Number(e)),W_=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),G_=e=>L_.test(e),K_=()=>!0,q_=e=>R_.test(e)&&!z_.test(e),J_=()=>!1,Y_=e=>B_.test(e),X_=e=>V_.test(e),Z_=e=>!Q(e)&&!$(e),Q_=e=>pv(e,_v,J_),Q=e=>P_.test(e),$_=e=>pv(e,vv,q_),ev=e=>pv(e,yv,Z),tv=e=>pv(e,xv,K_),nv=e=>pv(e,bv,J_),rv=e=>pv(e,hv,J_),iv=e=>pv(e,gv,X_),av=e=>pv(e,Sv,Y_),$=e=>F_.test(e),ov=e=>mv(e,vv),sv=e=>mv(e,bv),cv=e=>mv(e,hv),lv=e=>mv(e,_v),uv=e=>mv(e,gv),dv=e=>mv(e,Sv,!0),fv=e=>mv(e,xv,!0),pv=(e,t,n)=>{let r=P_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},mv=(e,t,n=!1)=>{let r=F_.exec(e);return r?r[1]?t(r[1]):n:!1},hv=e=>e===`position`||e===`percentage`,gv=e=>e===`image`||e===`url`,_v=e=>e===`length`||e===`size`||e===`bg-size`,vv=e=>e===`length`,yv=e=>e===`number`,bv=e=>e===`family-name`,xv=e=>e===`number`||e===`weight`,Sv=e=>e===`shadow`,Cv=M_(()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[H_,`full`,`auto`,...w()],ee=()=>[U_,`none`,`subgrid`,$,Q],E=()=>[`auto`,{span:[`full`,U_,$,Q]},U_,$,Q],D=()=>[U_,`auto`,$,Q],te=()=>[`auto`,`min`,`max`,`fr`,$,Q],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],O=()=>[`auto`,...w()],k=()=>[H_,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[H_,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],A=()=>[H_,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[e,$,Q],M=()=>[...b(),cv,rv,{position:[$,Q]}],N=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,lv,Q_,{size:[$,Q]}],P=()=>[W_,ov,$_],F=()=>[``,`none`,`full`,l,$,Q],I=()=>[``,Z,ov,$_],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[Z,W_,cv,rv],R=()=>[``,`none`,m,$,Q],z=()=>[`none`,Z,$,Q],ce=()=>[`none`,Z,$,Q],le=()=>[Z,$,Q],B=()=>[H_,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[G_],breakpoint:[G_],color:[K_],container:[G_],"drop-shadow":[G_],ease:[`in`,`out`,`in-out`],font:[Z_],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[G_],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[G_],shadow:[G_],spacing:[`px`,Z],text:[G_],"text-shadow":[G_],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,H_,Q,$,g]}],container:[`container`],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[U_,`auto`,$,Q]}],basis:[{basis:[H_,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,H_,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[U_,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:k()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...A()]}],"min-block-size":[{"min-block":[`auto`,...A()]}],"max-block-size":[{"max-block":[`none`,...A()]}],w:[{w:[s,`screen`,...k()]}],"min-w":[{"min-w":[s,`screen`,`none`,...k()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...k()]}],h:[{h:[`screen`,`lh`,...k()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...k()]}],"max-h":[{"max-h":[`screen`,`lh`,...k()]}],"font-size":[{text:[`base`,n,ov,$_]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,fv,tv]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,W_,Q]}],"font-family":[{font:[sv,nv,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,ev]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,$_]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},U_,$,Q],radial:[``,$,Q],conic:[U_,$,Q]},uv,iv]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,ov,$_]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`none`,u,dv,av]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,dv,av]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Z,$_]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,dv,av]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:R()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,dv,av]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":[`translate-none`],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[Z,ov,$_,ev]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function wv(...e){return Cv(t_(e))}var Tv=a.default.forwardRef(function({className:e=``,onInput:t,...n},r){let i=(0,a.useRef)(null),{value:s,placeholder:c}=n,l=(0,a.useCallback)(e=>{i.current=e,typeof r==`function`?r(e):r&&(r.current=e)},[r]),u=(0,a.useCallback)(()=>{let e=i.current;if(!e)return;e.style.height=`auto`;let t=e.scrollHeight;!e.value&&e.placeholder&&(e.value=e.placeholder,t=Math.max(t,e.scrollHeight),e.value=``),e.style.height=`${t+(e.offsetHeight-e.clientHeight)}px`},[]);return(0,a.useLayoutEffect)(u,[u,s,c]),(0,a.useEffect)(()=>{let e=i.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(u);return e.parentElement&&t.observe(e.parentElement),()=>t.disconnect()},[u]),(0,o.jsx)(`textarea`,{ref:l,...n,onInput:e=>{u(),t?.(e)},className:`${e} resize-none overflow-hidden`,rows:n.rows||1})}),Ev=()=>typeof document>`u`?null:document.querySelector(`.firebase-os`)||document.body,Dv=e=>{let t=``;return e.childNodes.forEach(e=>{e.nodeType===Node.TEXT_NODE?t+=e.textContent||``:e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`aria-hidden`)!==`true`&&(t+=Dv(e))}),t},Ov=e=>Dv(e).replace(/\s+/g,` `).trim().toLowerCase(),kv=e=>e.find(e=>e.getAttribute(`aria-selected`)===`true`)??e[0];function Av({value:e=``,options:t,onChange:r,label:i,disabled:s,variant:c=`default`,multiple:l=!1,values:u,placeholder:f,footer:p,compact:m=!1,dense:h=!1,direction:g,portal:_,empty:v=`Nothing to choose from yet`,ariaLabel:y,className:b=``}){let x=(0,a.useContext)($g),S=g??(x?`auto`:`up`),C=_??x,[w,T]=(0,a.useState)(!1),[ee,E]=(0,a.useState)(S===`down`?`down`:`up`),[D,te]=(0,a.useState)(null),ne=(0,a.useRef)(null),re=(0,a.useRef)(null),O=(0,a.useRef)(null),k=(0,a.useId)(),ie=`${k}-list`,[A,j]=(0,a.useState)(``),M=(0,a.useRef)({text:``,at:0});(0,a.useEffect)(()=>{function e(e){let t=e.target;ne.current?.contains(t)||O.current?.contains(t)||T(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,a.useLayoutEffect)(()=>{if(!w)return;let e=()=>{let e=re.current;if(!e)return;let t=e.getBoundingClientRect();if(te({top:t.top,left:t.left,width:t.width,height:t.height}),S===`auto`){let e=(typeof window<`u`?window.innerHeight:0)-t.bottom;E(e<260&&t.top>e?`up`:`down`)}else E(S)};return e(),window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[w,S]);let N=l&&u||[],ae=t=>l?N.includes(t):e===t,P=t.find(t=>t.value===e)||(f==null?t[0]:void 0),F=t.filter(e=>N.includes(e.value)).map(e=>e.label),I=l?F.length?F.map((e,t)=>(0,o.jsxs)(a.default.Fragment,{children:[t>0?`, `:``,e]},t)):f:P?.label??f,oe=!s,se=!t.some(e=>e.value!==``&&!e.disabled),L=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!w)return;let e=L.current,t=e?.querySelector(`[aria-selected="true"]`);!e||!t||(e.scrollTop=t.offsetTop-e.clientHeight/2+t.clientHeight/2)},[w]);let R=()=>{let e=Array.from(O.current?.querySelectorAll(`[role="option"]`)??[]).filter(e=>e.getAttribute(`aria-disabled`)!==`true`);return e.forEach((e,t)=>{e.id||=`${k}-row${t}`}),e},z=e=>{let t=Date.now(),n=t-M.current.at<700?M.current.text+e:e;M.current={text:n,at:t};let r=[...n].every(e=>e===n[0]),i=r?n[0]:n;return(e,t)=>{let n=t>=0?t:e.findIndex(e=>e.getAttribute(`aria-selected`)===`true`),a=r?n+1:Math.max(n,0);for(let t=0;t<e.length;t++){let n=e[(a+t)%e.length];if(Ov(n).startsWith(i))return n}}},ce=e=>{if(!oe)return;let{key:t}=e;if(t===`Tab`){w&&T(!1);return}if(t===`Escape`){w&&(e.preventDefault(),T(!1));return}if(t===`Enter`||t===` `){e.preventDefault();let t=w&&A?document.getElementById(A):null;if(t&&O.current?.contains(t)&&t.getAttribute(`aria-disabled`)!==`true`){t.click();return}if(w){T(!1);return}}let n=t.length===1&&t!==` `&&!e.ctrlKey&&!e.metaKey&&!e.altKey?t.toLowerCase():``,r=t===`ArrowDown`?(e,t)=>t<0?kv(e):e[Math.min(t+1,e.length-1)]:t===`ArrowUp`?(e,t)=>t<0?kv(e):e[Math.max(t-1,0)]:t===`Home`?e=>e[0]:t===`End`?e=>e[e.length-1]:t===`Enter`||t===` `?kv:n?z(n):null;if(!r)return;e.preventDefault(),w||(0,d.flushSync)(()=>T(!0));let i=R(),a=r(i,w?i.findIndex(e=>e.id===A):-1);a&&j(a.id)},le=(0,a.useRef)(``);(0,a.useLayoutEffect)(()=>{let e=O.current;if(!w||!e){le.current=``;return}let t=null;for(let n of Array.from(e.querySelectorAll(`[role="option"]`))){let e=A!==``&&n.id===A;n.toggleAttribute(`data-active`,e),e&&(t=n)}let n=L.current;if(!t||!n||le.current===A)return;le.current=A;let r=parseFloat(getComputedStyle(n).paddingTop)||0,i=n.getBoundingClientRect(),a=t.getBoundingClientRect();a.top<i.top+r?n.scrollTop-=i.top+r-a.top:a.bottom>i.bottom-r&&(n.scrollTop+=a.bottom-(i.bottom-r))});let B=(0,o.jsx)(Xg.div,{ref:O,id:ie,role:`listbox`,"aria-label":y||i,"aria-multiselectable":l||void 0,initial:{opacity:0,y:ee===`up`?5:-5,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:ee===`up`?5:-5,scale:.98},transition:{duration:.15},className:`z-[99999] glass-popover overflow-hidden ${C?`fixed`:`absolute left-0 w-full ${ee===`up`?`bottom-[calc(100%+8px)]`:`top-[calc(100%+8px)]`}`}`,style:{borderRadius:`var(--input-radius, 0.75rem)`,...C&&D?(()=>{let e=Math.max(D.width,m?180:0),t=(typeof window<`u`?window.innerWidth:D.left+e)-e-8;return{left:Math.max(8,Math.min(D.left,t)),width:e,...ee===`up`?{bottom:(typeof window<`u`?window.innerHeight:0)-D.top+8}:{top:D.top+D.height+8}}})():{}},children:(0,o.jsxs)(`div`,{ref:L,className:`max-h-60 overflow-y-auto no-scrollbar p-1 [&_[role=option][data-active]:not([aria-selected=true])]:bg-foreground/5`,onMouseMove:e=>{if(!A)return;let t=e.target.closest(`[role="option"]`);t?.id&&t.id!==A&&t.getAttribute(`aria-disabled`)!==`true`&&j(t.id)},children:[t.map((e,t)=>(0,o.jsxs)(`div`,{id:`${k}-${t}`,role:`option`,"aria-selected":ae(e.value),"aria-disabled":e.disabled||void 0,onClick:()=>{e.disabled||(r(e.value),l||T(!1))},className:`flex items-center justify-between gap-3 px-3 py-2.5 transition-colors font-medium ${h?`text-[13.5px]`:`text-[13px]`} ${e.disabled?`text-foreground/30 cursor-default`:ae(e.value)?`bg-accent/10 text-accent font-bold cursor-pointer`:`text-foreground/80 hover:bg-foreground/5 hover:text-foreground data-[active]:text-foreground cursor-pointer`}`,style:{borderRadius:`calc(var(--input-radius, 0.75rem) - 0.25rem)`},children:[(0,o.jsx)(`span`,{className:`truncate`,children:e.label}),ae(e.value)&&!e.disabled&&(0,o.jsx)(Xa,{className:`w-3.5 h-3.5 shrink-0 text-accent`})]},e.value)),se&&!p&&(0,o.jsx)(`div`,{className:`px-3 py-2.5 text-foreground/50 ${h?`text-[13.5px]`:`text-[13px]`}`,children:v}),p]})}),ue=C?Ev():null,de=(0,o.jsx)(eh,{children:w&&B});return(0,o.jsxs)(`div`,{className:`flex flex-col relative ${m?`w-auto`:`w-full`} ${s?`opacity-50 pointer-events-none`:``} ${b}`,ref:ne,children:[i&&(0,o.jsx)(`label`,{className:`text-[13px] font-medium text-foreground/70 select-none mb-2`,children:i}),(0,o.jsxs)(`div`,{className:`relative ${m?`w-auto`:`w-full`}`,children:[(0,o.jsxs)(`div`,{ref:re,role:`button`,tabIndex:s?-1:0,"aria-haspopup":`listbox`,"aria-expanded":w,"aria-label":y||i,"aria-disabled":s||void 0,"aria-controls":w?ie:void 0,"aria-activedescendant":w&&A?A:void 0,onClick:()=>{oe&&(j(``),T(!w))},onKeyDown:ce,className:`text-foreground transition-all duration-300 flex items-center justify-between outline-none ${m?`h-9 px-3 gap-2 text-[12.5px] font-semibold`:h?`w-full h-11 px-4 text-[14px] font-medium`:`w-full h-12 px-4 text-[15px]`} ${oe?`cursor-pointer`:`cursor-default`} ${c===`ghost`?`hover:bg-foreground/5 bg-transparent focus-visible:ring-2 focus-visible:ring-accent/40`:`border glass-panel ${m?``:`shadow-sm`} ${w?`border-accent select-open`:`border-[var(--panel-border)]`}`}`,style:{borderRadius:`var(--input-radius, 0.75rem)`},children:[(0,o.jsx)(`span`,{className:`truncate`,children:I}),(0,o.jsx)(n.t,{className:`w-4 h-4 text-foreground/50 shrink-0 transition-transform duration-300 ${w?`rotate-180`:``}`})]}),!(C&&ue)&&de]}),C&&ue?(0,d.createPortal)(de,ue):null]})}var jv=e=>!!(e.width||e.height||e.size||e.bg),Mv=32,Nv=32,Pv=24;function Fv(e,t){if(!e||e.length<t*t*4||t<3)return{};let n=(e,n)=>(n*t+e)*4,r=[];for(let e=0;e<t;e++)r.push(n(e,0),n(e,t-1));for(let e=1;e<t-1;e++)r.push(n(0,e),n(t-1,e));if(r.filter(t=>e[t+3]<Nv).length>r.length/2)return{bg:`clear`};let i=r.filter(t=>e[t+3]>=Nv);if(!i.length)return{};let a=[0,1,2].map(t=>i.reduce((n,r)=>n+e[r+t],0)/i.length);return Math.max(...i.map(t=>Math.max(...[0,1,2].map(n=>Math.abs(e[t+n]-a[n])))))>Pv?{bg:`busy`}:{bg:`plain`,bgColour:Iv(a[0],a[1],a[2])}}function Iv(e,t,n){let r=Math.max(e,t,n),i=Math.min(e,t,n),a=(r+i)/2/255,o=(r-i)/255,s=o===0||a===0||a===1?0:o/(1-Math.abs(2*a-1));if(o<.08||s<.12)return a>.92?`white`:a>.72?`light grey`:a>.4?`grey`:a>.14?`dark grey`:`black`;let c=r-i,l=(60*(r===e?((t-n)/c+6)%6:r===t?(n-e)/c+2:(e-t)/c+4)+360)%360,u=l<15?`red`:l<45?`orange`:l<70?`yellow`:l<165?`green`:l<200?`teal`:l<255?`blue`:l<290?`purple`:l<335?`pink`:`red`;if(u===`orange`||u===`yellow`){if(a<.4)return`brown`;if(a>.82)return`cream`}return a>.78?`pale ${u}`:a<.3?`dark ${u}`:u}var Lv=[[21,9],[16,9],[3,2],[5,4],[4,3],[1,1],[3,4],[4,5],[2,3],[9,16]];function Rv(e,t){if(!e||!t)return``;let n=e/t,r=n>1.06?`wide`:n<.94?`tall`:`square`,i=Lv.find(([e,t])=>e!==t&&Math.abs(n-e/t)<=e/t*.03);return i?`${r} ${i[0]}:${i[1]}`:r}function zv(e){if(!e||e<0)return``;if(e<1024)return`${Math.round(e)} bytes`;let t=e/1024;if(t<1024)return`${Math.round(t)} KB`;let n=t/1024;return`${n<10?Number(n.toFixed(1)):Math.round(n)} MB`}function Bv(e){return e.bg===`clear`?`see-through background`:e.bg===`plain`?e.bgColour?`plain ${e.bgColour} background`:`plain background`:e.bg===`busy`?`picture to the edges`:``}function Vv(e){return[e.width&&e.height?`${e.width} × ${e.height}`:``,Rv(e.width,e.height),zv(e.size),Bv(e)].filter(Boolean).join(`, `)}function Hv(e){return[e.width&&e.height?`${e.width} × ${e.height}`:``,zv(e.size)].filter(Boolean).join(` · `)}var Uv=async e=>{if(typeof createImageBitmap==`function`){let t=await createImageBitmap(e);return{source:t,width:t.width,height:t.height,done:()=>t.close?.()}}let t=URL.createObjectURL(e);try{let e=await Wv(t);return{source:e,width:e.naturalWidth,height:e.naturalHeight,done:()=>URL.revokeObjectURL(t)}}catch(e){throw URL.revokeObjectURL(t),e}},Wv=(e,t)=>new Promise((n,r)=>{let i=new Image;t&&(i.crossOrigin=t),i.onload=()=>n(i),i.onerror=()=>r(Error(`That picture could not be read.`)),i.src=e}),Gv=e=>{try{if(typeof document>`u`)return{};let t=document.createElement(`canvas`);t.width=Mv,t.height=Mv;let n=t.getContext(`2d`,{willReadFrequently:!0});return!n||typeof n.getImageData!=`function`?{}:(n.drawImage(e,0,0,Mv,Mv),Fv(n.getImageData(0,0,Mv,Mv).data,Mv))}catch{return{}}},Kv=(e,t,n)=>t&&n?{width:t,height:n,...Gv(e)}:{},qv=4e3,Jv={},Yv=(e,t)=>new Promise(n=>{let r=!1,i=e=>{r||(r=!0,n(e))},a=setTimeout(()=>i(t),qv),o=e=>{clearTimeout(a),i(e)};e.then(o,()=>o(t))}),Xv=async e=>{let{source:t,width:n,height:r,done:i}=await Uv(e);try{return Kv(t,n,r)}finally{i()}},Zv=async(e,t)=>{let n=await Wv(e,t);return Kv(n,n.naturalWidth,n.naturalHeight)};async function Qv(e){let t=e?.size?{size:e.size}:{};return!e||!/^image\//i.test(e.type||``)?t:{...t,...await Yv(Xv(e),{})}}async function $v(e){return!e||!/^image\//i.test(e.type||``)||typeof createImageBitmap!=`function`?{}:Yv((async()=>{let t=await createImageBitmap(e),{width:n,height:r}=t;return t.close?.(),n&&r?{width:n,height:r}:{}})(),{})}async function ey(e){if(!e||typeof Image>`u`)return{};let t=await Yv(Zv(e,`anonymous`),Jv);return t===Jv?{}:jv(t)?t:Yv(Zv(e),{})}var ty=3600*24*365,ny=3600,ry=/^user_avatars\//,iy=/^pub_/;function ay(e){let t=iy.test(e.replace(/^\/+/,``))?`public`:`private`;return ry.test(e.replace(/^\/+/,``))?`${t}, max-age=${ny}`:`${t}, max-age=${ty}, immutable`}function oy(e,t){return{cacheControl:ay(e),...t?{customMetadata:t}:{}}}var sy=`pub_files`,cy=(e,t={})=>`${Date.now()}_${i.g(t.width,t.height)}${(e||`file`).replace(/[^a-zA-Z0-9.-]/g,`_`)}`;async function ly(e,t,n){let r=async(e,r)=>{try{if(!e)return``;let i=await r(t);if(!i)return``;let a=(0,u.ref)(v,e);return await(0,u.uploadBytes)(a,i,oy(e,n)),await(0,u.getDownloadURL)(a)}catch{return``}},a=await r(i.p(e),i.m),o=await r(i.y(e),i.b);return{...o?{small:o}:{},...a?{medium:a}:{}}}async function uy(e){e&&await Promise.all([i.y(e),i.p(e)].filter(Boolean).map(async e=>{try{await(0,u.deleteObject)((0,u.ref)(v,e))}catch{}}))}async function dy(e,t){if(!t)throw Error(`Sign in again before uploading.`);let n=await i._(e),r=`${sy}/${cy(n.name,await $v(n))}`,a=(0,u.ref)(v,r);await(0,u.uploadBytes)(a,n,oy(r,{ownerId:t.uid}));let o=await(0,u.getDownloadURL)(a),s=await ly(r,n,{ownerId:t.uid});return await(0,l.addDoc)((0,l.collection)(_,sy),{fileName:n.name,fileType:n.type||`unknown`,fileSize:n.size,downloadURL:o,...s.small?{smallURL:s.small}:{},...s.medium?{mediumURL:s.medium}:{},storagePath:r,uid:t.uid,uploaderEmail:t.email||``,createdAt:(0,l.serverTimestamp)()}),{url:o,file:n,...s}}var fy=async(e,t)=>(await dy(e,t)).url,py=`pub_form_uploads`;async function my(e,t){let n=await i._(e);if(n.size>=10485760)throw Error(`That file is over 10 MB. Try a smaller one.`);let r=Math.random().toString(36).slice(2,8),a=`${py}/${Date.now()}_${r}_${(n.name||`file`).replace(/[^a-zA-Z0-9.-]/g,`_`)}`,o=(0,u.ref)(v,a);return await(0,u.uploadBytes)(o,n,oy(a,t?{ownerId:t.uid}:void 0)),(0,u.getDownloadURL)(o)}var hy=e=>typeof e==`string`?e.split(/\s+/).filter(Boolean):[],gy=e=>e.join(`
|
|
11
|
-
`),_y=e=>/^https?:\/\/\S+$/.test(e)&&RegExp(`(/|%2F)pub_form_uploads(/|%2F)`,`i`).test(e),vy=e=>{let t=hy(e);return t.length>0&&t.every(_y)};function yy(e){try{let t=new URL(e);return i.x(decodeURIComponent(t.pathname.split(`/o/`)[1]||t.pathname).split(`/`).pop()||``).replace(/^\d+_[a-z0-9]+_/,``)||t.hostname||`Attached file`}catch{return`Attached file`}}var by=e=>e?.code===`storage/unauthorized`?`You do not have permission to upload here.`:Ee(e,`That upload did not work. Try again.`),xy=(e,t)=>{let n=String(t||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(!n.length)return!0;let r=(e.type||``).toLowerCase(),i=(e.name||``).toLowerCase();return n.some(e=>e.startsWith(`.`)?i.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r===e)},Sy=e=>Array.from(e.dataTransfer?.types||[]).includes(`Files`);function Cy({onFiles:e,onReject:t,accept:n,multiple:r=!1,disabled:i=!1}){let[o,s]=(0,a.useState)(!1),c=(0,a.useRef)(0);return{over:o&&!i,dropProps:{onDragEnter:e=>{i||!Sy(e)||(e.preventDefault(),c.current+=1,s(!0))},onDragOver:e=>{i||!Sy(e)||e.preventDefault()},onDragLeave:e=>{Sy(e)&&(c.current=Math.max(0,c.current-1),c.current===0&&s(!1))},onDrop:a=>{if(c.current=0,s(!1),i||!Sy(a))return;a.preventDefault();let o=Array.from(a.dataTransfer.files||[]),l=o.filter(e=>xy(e,n)),u=o.filter(e=>!xy(e,n));u.length&&t?.(u);let d=r?l:l.slice(0,1);d.length&&e(d)}}}}var wy=16,Ty=64,Ey=40,Dy=new Set,Oy=-1/0,ky=null,Ay=null,jy=()=>typeof performance<`u`&&performance.now?performance.now():Date.now(),My=(e,t)=>{Ay&&clearTimeout(Ay),Ay=setTimeout(()=>{Ay=null,Iy()},Math.max(0,e-t))},Ny=e=>{Dy.delete(e),e.show()},Py=e=>{if(e.width<=0&&e.height<=0)return!1;let t=window.innerHeight||document.documentElement.clientHeight||0,n=window.innerWidth||document.documentElement.clientWidth||0;return e.bottom>=0&&e.top<=t&&e.right>=0&&e.left<=n},Fy=e=>{let t=[...e].sort((e,t)=>e.r.top-t.r.top),n=[],r=[],i=0,a=0,o=()=>{r.sort((e,t)=>e.r.left-t.r.left).forEach(e=>n.push(e.place)),r=[]};for(let e of t)r.length&&e.r.top-i>a&&o(),r.length||(i=e.r.top,a=Math.min(Ey,Math.max(1,e.r.height/2))),r.push(e);return o(),n};function Iy(){if(Ay&&=(clearTimeout(Ay),null),Dy.size)try{let e=jy(),t=[];for(let e of[...Dy]){if(!e.el.isConnected){Dy.delete(e);continue}let n=e.el.getBoundingClientRect(),r=n.width<=Ty&&n.height<=Ty;Py(n)&&!r?t.push({place:e,r:n}):e.landedAt!==null&&Ny(e)}let n=Fy(t),r=[];for(let t of n)t.landedAt===null?t.passed||r.push(t):e-t.landedAt>=700&&(r.forEach(e=>{e.passed=!0}),r=[]);let i=n.filter(e=>e.landedAt!==null);if(!i.length){ky=null;return}let a=n.find(e=>e.landedAt!==null||!e.passed);if(!a||a.landedAt===null){My(Math.min(...i.map(e=>e.landedAt+700)),e);return}if(ky=Math.min(ky??50,Math.max(wy,Math.floor(400/i.length))),e-Oy<ky){My(Oy+ky,e);return}Ny(a),Oy=e,i.length>1?My(e+ky,e):ky=null}catch{for(let e of[...Dy])e.landedAt!==null&&Ny(e)}}function Ly(e,t){let n={el:e,show:t,landedAt:null,passed:!1};return Dy.add(n),{landed(){!Dy.has(n)||n.landedAt!==null||(n.landedAt=jy(),Iy())},leave(){Dy.delete(n)&&Dy.size&&My(jy(),jy())}}}var Ry=new Set,zy=e=>!!e&&Ry.has(e),By=e=>{e&&Ry.add(e)},Vy=new Map,Hy=e=>e?Vy.get(e)||i.h(Wy(e)||e):void 0,Uy=(e,t,n)=>{e&&t>0&&n>0&&Vy.set(e,{width:t,height:n})},Wy=e=>{try{let t=new URL(e).pathname.split(`/o/`)[1];return t?decodeURIComponent(t):``}catch{return``}},Gy=(e,t)=>{let n=Wy(e);if(!n)return``;let r=n.lastIndexOf(`/`);return`${r>=0?n.slice(0,r+1):``}${t(n.slice(r+1))}`},Ky=e=>Gy(e,i.v),qy=e=>Gy(e,i.f),Jy=(e,t)=>t===`sm`?Ky(e):t===`md`?qy(e):Wy(e);function Yy(e,t){if(!e||t===`full`||!i.l(e))return``;let n=Wy(e);if(!n.startsWith(`pub_`))return``;let r=Jy(e,t);if(!r||r===n)return``;try{let t=new URL(e);return t.pathname=`${t.pathname.split(`/o/`)[0]}/o/${encodeURIComponent(r)}`,t.search=`?alt=media`,t.toString()}catch{return``}}var Xy=`none`,Zy=new Map,Qy=new Map,$y=`fbos_small_pictures`,eb=()=>{try{let e=JSON.parse(sessionStorage.getItem($y)||`{}`)||{},t={};for(let[n,r]of Object.entries(e))t[n]=typeof r==`string`?{sm:r}:r||{};return t}catch{return{}}},tb=e=>{let t=Zy.get(e);if(t)return t;let n=eb()[e]||{};return Zy.set(e,n),n},nb=(e,t,n)=>{if(t===`full`)return;let r={...tb(e),[t]:n};Zy.set(e,r);try{let t=eb();t[e]=r,sessionStorage.setItem($y,JSON.stringify(t))}catch{}};function rb(e,t){if(!e||t===`full`)return``;let n=tb(e)[t];return n===void 0?Yy(e,t):n===Xy?``:n}var ib=(e,t)=>!!e&&t!==`full`&&tb(e)[t]!==void 0,ab=(e,t)=>ib(e,t)&&!rb(e,t),ob=(e,t)=>{e&&t!==`full`&&nb(e,t,Xy)};async function sb(e,t){if(t===`full`)return e;if(!e||!i.l(e)||i.d(e))return``;if(ib(e,t))return rb(e,t);let n=Yy(e,t);if(n)return n;let r=`${t}|${e}`,a=Qy.get(r);if(a)return a;let o=Jy(e,t);if(!o||!v)return``;let s;try{s=(0,u.getDownloadURL)((0,u.ref)(v,o)).then(n=>(nb(e,t,n),n)).catch(()=>(nb(e,t,Xy),``)).finally(()=>{Qy.delete(r)})}catch{return nb(e,t,Xy),``}return Qy.set(r,s),s}var cb=[],lb=0,ub=()=>{for(;lb<3&&cb.length;){let e=cb.shift();if(zy(e))continue;lb++;let t=new Image,n=()=>{lb--,ub()};t.decoding=`async`,t.onload=()=>{By(e),Uy(e,t.naturalWidth,t.naturalHeight),n()},t.onerror=n,t.src=e}};function db(e){if(!(typeof Image>`u`)){for(let t of e)!t||zy(t)||cb.includes(t)||cb.push(t);ub()}}var fb={sm:400,md:800,full:1/0},pb=[`sm`,`md`,`full`],mb=e=>pb[pb.indexOf(e)+1]??null,hb=e=>pb.indexOf(e)>0?pb[pb.indexOf(e)-1]:null,gb=(e,t)=>pb.indexOf(e)>=pb.indexOf(t)?e:t;function _b(e,t,n){let r=Math.max(0,e?.width||0),i=Math.max(0,e?.height||0),a=Math.min(2,Number.isFinite(n)&&n>0?n:1),o;if(t&&t.width>0&&t.height>0){let e=Math.max(r/t.width,i/t.height);o=Math.max(t.width,t.height)*e}else o=Math.max(r,i);return o*=a,pb.find(e=>fb[e]>=o)??`full`}var vb=260,yb={width:`fit-content`,height:`auto`},bb={display:`block`,visibility:`hidden`,width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`inherit`},xb=e=>!!e&&e.complete&&e.naturalWidth>0,Sb=e=>{let t=Wy(e);return!t||/^pub_files\/[^/]+$/.test(t)?!1:/^(?:[a-z0-9_]*_files|pub_form_uploads)\//.test(t)},Cb=e=>/(^|\s)(?:inset-0|size-full)(\s|$)/.test(e)||/(^|\s)h-full(\s|$)/.test(e)&&/(^|\s)w-full(\s|$)/.test(e),wb=e=>{let t=(typeof getComputedStyle==`function`?getComputedStyle(e).aspectRatio:``)||``,n=/([\d.]+)\s*(?:\/\s*([\d.]+))?\s*$/.exec(t);if(!n)return 0;let r=Number(n[1]),i=n[2]?Number(n[2]):1;return r>0&&i>0?r/i:0},Tb=(e,t,n)=>{if(n&&wb(e))return e;let r=!n||Cb(t);for(let t=e,i=0;r&&i<3;i++){let i=t.parentElement;if(!i||!n&&t===e&&i.childElementCount!==1)return null;if(wb(i))return i;t=i,r=Cb(typeof i.className==`string`?i.className:``)}return null},Eb=e=>{let t=e.getBoundingClientRect(),n=new Set;for(let r of e.querySelectorAll(`*`)){if(r.closest(`[data-picture]`))continue;let e=r.getBoundingClientRect();!e.width||!e.height||(e.top<t.top-1||e.bottom>t.bottom+1||e.left<t.left-1||e.right>t.right+1)&&n.add(r)}return n},Db=e=>{let t=e.getBoundingClientRect();if(!t.height)return 0;let n=0;for(let r of e.querySelectorAll(`*`)){if(r.closest(`[data-picture]`))continue;let e=r.getBoundingClientRect();!e.width||!e.height||e.width>=t.width-2&&e.height>=t.height-2||(n=Math.max(n,e.height))}return n/t.height},Ob=e=>{let t=e.parentElement;if(!t||typeof getComputedStyle!=`function`)return!1;let n=getComputedStyle(t);return!/flex/.test(n.display)||/column/.test(n.flexDirection)?!1:[...t.children].some(t=>t!==e&&!!t.textContent?.trim())},kb=120,Ab=.8;function jb({src:e,alt:t=``,small:n,medium:r,width:s,height:c,ratio:l,className:u=``,imgClassName:d=``,fit:f=`cover`,priority:p=!1,preload:m,tint:h,onClick:g,draggable:_,fallback:v,onError:y}){let b=(0,a.useRef)(null),x=(0,a.useRef)(null),[S,C]=(0,a.useState)(null),[w,T]=(0,a.useState)(``),[ee,E]=(0,a.useState)(``),[D,te]=(0,a.useState)(!1),ne=(0,a.useContext)($g),[re,O]=(0,a.useState)(!1),k=(0,a.useRef)(null),ie=(e,t)=>!e||!t?``:t===`full`?e:t===`sm`&&n?n:t===`md`&&r?r:rb(e,t),A=typeof e!=`string`||!e.trim(),[j,M]=(0,a.useState)(()=>({src:e,rung:null,link:``,ready:!1,under:``,failed:A,covered:!1})),N=!re&&!j.under&&!j.covered&&!j.failed&&!ne&&!p;if(j.src!==e||j.rung!==S){let t=ie(e,S),n=!!t&&zy(t);M({src:e,rung:S,link:t,ready:n,under:A||n?``:j.ready&&!j.failed&&!N?j.link:j.under,failed:A,covered:n})}let ae=/(^|\s)w-auto(\s|$)/.test(u),P=/(^|\s)(h-|min-h-)(?!(auto|fit|min|max|0)(\s|$))/.test(u),F=/(^|\s)(aspect-|inset-0|absolute)/.test(u)||!ae&&P,I=(0,a.useCallback)(()=>{let t=b.current;if(!t)return;let n=t.getBoundingClientRect();n.width>0&&te(!0),F&&n.width>0&&n.height<1&&T(u),ae&&P&&n.width<1&&n.height<1&&t.getClientRects().length>0&&E(u);let r=Hy(e)||(s&&c?{width:s,height:c}:void 0),i=typeof window>`u`?1:window.devicePixelRatio||1,a=n.width>0||n.height>0?_b({width:n.width,height:n.height},r,i):`full`;for(;ab(e,a);){let e=mb(a);if(!e)break;a=e}C(e=>e?gb(e,a):a)},[e,s,c,F,ae,P,u]),oe=(0,a.useCallback)(e=>{if(b.current=e,x.current?.disconnect(),x.current=null,!e||(I(),typeof ResizeObserver>`u`))return;let t=new ResizeObserver(()=>I());t.observe(e),x.current=t},[I]),se=(0,a.useCallback)(e=>{C(t=>gb(t??e,mb(e)??e))},[]);(0,a.useEffect)(()=>{if(!S||j.link||j.src!==e||j.rung!==S)return;let t=!0;return sb(e,S).then(n=>{t&&(n?M(t=>t.src===e&&t.rung===S&&!t.link?{...t,link:n,ready:zy(n)}:t):se(S))}).catch(()=>{t&&se(S)}),()=>{t=!1}},[e,S,j.link,j.src,j.rung,se]);let L=S?hb(S):null,R=`${S}|${e}`,[z,ce]=(0,a.useState)({key:``,rung:null,link:``,ready:!1});if(z.key!==R){let t=ie(e,L);ce({key:R,rung:L,link:t,ready:!!t&&zy(t)})}(0,a.useEffect)(()=>{if(z.key!==R||!z.rung||z.link)return;let t=!0,n=z.rung;return sb(e,n).then(e=>{!t||!e||ce(t=>t.key===R&&!t.link?{...t,link:e,ready:zy(e)}:t)}).catch(()=>{}),()=>{t=!1}},[e,R,z.key,z.rung,z.link]);let le=(m||[]).filter(Boolean).join(`|`);(0,a.useEffect)(()=>{if(!le||!S)return;let e=setTimeout(()=>{let e=le.split(`|`);Promise.all(e.map(e=>sb(e,S).catch(()=>``))).then(t=>db(t.map((t,n)=>t||e[n]))).catch(()=>{})},250);return()=>clearTimeout(e)},[le,S]);let B=Hy(e)||(s&&c?{width:s,height:c}:void 0),ue=F&&w!==u,de=ue?0:l||(B?B.width/B.height:0),fe=f===`contain`?`object-contain`:`object-cover`,pe=`absolute inset-0 w-full h-full ${fe} ${d}`,me=i.h(Wy(e)||e)||(s&&c?{width:s,height:c}:void 0)||(Wy(e)?void 0:B),he=l||(B?B.width/B.height:0),ge=me||(he?{width:2e3,height:Math.round(2e3/he)}:void 0),_e=ae&&!F&&(!P||ee===u)&&!!ge,ve=(0,a.useId)(),ye=Sb(e),be=B?B.width/B.height:l||0;(0,a.useLayoutEffect)(()=>{let e=b.current;if(!e||!ye||!be||/(^|\s)rounded-full(\s|$)/.test(u)||e.closest(`[data-fbos-own]`))return;let t=Tb(e,u,ue);if(!t||t.dataset.fbosWhole&&t.dataset.fbosWhole!==ve||Math.abs(wb(t)/be-1)<.03)return;let n=t.getBoundingClientRect();if(n.width<kb||Ob(t))return;if(t!==e){let t=e.getBoundingClientRect();if(Math.abs(t.width-n.width)>2||Math.abs(t.height-n.height)>2)return}let r=typeof window>`u`?0:window.innerHeight;if(r&&n.width/be>Math.max(r*Ab,n.height))return;let i=t.style.aspectRatio,a=Eb(t),o=Db(t);t.style.aspectRatio=B?`${B.width} / ${B.height}`:String(be);let s=t.style.aspectRatio,c=Db(t);if(Math.abs(t.getBoundingClientRect().width-n.width)>1||[...Eb(t)].some(e=>!a.has(e))||c>.5&&c>o){t.style.aspectRatio=i;return}return t.dataset.fbosWhole=ve,()=>{t.dataset.fbosWhole===ve&&delete t.dataset.fbosWhole,t.style.aspectRatio===s&&(t.style.aspectRatio=i)}},[ye,be,B?.width,B?.height,u,ue,ve,D]);let xe=!F&&!ae&&!/(^|\s)max-h-/.test(u),Se=ne&&xe,Ce=Se?de?{maxWidth:`calc(${Qg} * ${de})`,marginInline:`auto`}:{maxHeight:Qg,marginInline:`auto`}:void 0,we=Se&&!de?{maxHeight:Qg,width:`auto`,marginInline:`auto`}:void 0,Te=(t,n)=>{let r={width:n.naturalWidth,height:n.naturalHeight},i=()=>{By(t),Uy(e,r.width,r.height),M(e=>e.link===t?{...e,ready:!0}:e)},a=n.decode?.();a&&typeof a.then==`function`?a.then(i,i):i()},Ee=de||ue?``:j.under||j.link,De=j.failed,Oe=!j.covered&&!De&&!j.under,ke=Oe&&!!z.link&&z.key===R,Ae=j.ready&&!N,je=Ae&&(f===`contain`||!!j.under);(0,a.useEffect)(()=>{let e=b.current;if(!N||!e)return;let t=Ly(e,()=>O(!0));return k.current=t,()=>{t.leave(),k.current===t&&(k.current=null)}},[N]);let Me=N&&!De&&(j.ready||ke&&z.ready);(0,a.useEffect)(()=>{Me&&k.current?.landed()},[Me]);let Ne=(0,a.useCallback)(e=>{M(t=>t.link===e&&t.ready&&!t.covered?{...t,covered:!0,under:``}:t)},[]);(0,a.useEffect)(()=>{if(!Ae||j.covered)return;let e=j.link,t=setTimeout(()=>Ne(e),vb+90);return()=>clearTimeout(t)},[Ae,j.covered,j.link,Ne]);let Pe=/(^|\s)(absolute|fixed|sticky)(\s|$)/.test(u);return(0,o.jsxs)(`span`,{ref:oe,onClick:g,"data-picture":Ae?`ready`:`loading`,"data-ratio":de?String(de):void 0,"data-rung":S||void 0,className:`${Pe?``:`relative`} block overflow-hidden isolate ${u}`,style:_e?yb:de||Ce?{...de?{aspectRatio:String(de)}:null,...Ce}:void 0,children:[_e&&ge&&(0,o.jsx)(`canvas`,{"aria-hidden":`true`,width:ge.width,height:ge.height,style:bb}),Oe&&(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`fbos-picture-tint fbos-picture-under absolute inset-0 ${je?`fbos-picture-leaving opacity-0`:``}`,style:h?{background:h}:void 0}),ke&&(0,o.jsx)(`img`,{src:z.link,alt:``,"aria-hidden":`true`,draggable:!1,decoding:`async`,loading:p?`eager`:`lazy`,fetchPriority:p?`high`:void 0,ref:e=>{xb(e)&&!z.ready&&ce(e=>e.link===z.link?{...e,ready:!0}:e)},onLoad:()=>ce(e=>e.link===z.link?{...e,ready:!0}:e),onError:()=>{let t=z.rung;t&&ob(e,t),ce(e=>e.key===R?{key:R,rung:t?hb(t):null,link:``,ready:!1}:e)},className:`fbos-picture-standin ${pe} ${je?`fbos-picture-leaving`:``} ${z.ready&&!N&&!je?`opacity-100`:`opacity-0`}`},`stand-${z.link}`),j.under&&j.under!==j.link&&(0,o.jsx)(`img`,{src:j.under,alt:``,"aria-hidden":`true`,draggable:!1,className:`fbos-picture-under ${Ee===j.under?`block w-full h-auto ${fe} ${d}`:pe} ${je?`fbos-picture-leaving opacity-0`:``}`,style:Ee===j.under?we:void 0},j.under),!De&&!!j.link&&(0,o.jsx)(`img`,{ref:e=>{e&&xb(e)&&!j.ready&&Te(j.link,e)},src:j.link,alt:t,draggable:_,loading:p?`eager`:`lazy`,fetchPriority:p?`high`:void 0,decoding:`async`,onLoad:e=>Te(j.link,e.currentTarget),onTransitionEnd:e=>{e.propertyName===`opacity`&&Ae&&Ne(j.link)},onError:()=>{if(j.rung&&j.rung!==`full`){ob(e,j.rung),se(j.rung);return}M(t=>t.src===e?{...t,failed:!0}:t),y?.()},className:`fbos-picture-img ${Ee===j.link?`block w-full h-auto ${fe} ${d}`:pe} ${Ae?`opacity-100`:`opacity-0`}`,style:Ee===j.link?we:void 0},j.link),De&&!j.under&&(0,o.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center px-2 text-center text-[11px] font-semibold text-foreground/35`,children:v??(t||`Picture unavailable`)})]})}var Mb=[.16,1,.3,1],Nb={duration:.3,ease:Mb},Pb={opacity:0,y:24},Fb={opacity:1,y:0},Ib=`0px 0px -20% 0px`,Lb=.98,Rb=700;function zb(){let[e,t]=(0,a.useState)(null),[n,r]=(0,a.useState)(()=>typeof IntersectionObserver>`u`);return(0,a.useEffect)(()=>{if(!e||n)return;let t,i=()=>r(!0),a=(e,t)=>{try{return new IntersectionObserver(e,{root:document,...t})}catch{return new IntersectionObserver(e,t)}},o=a(e=>{e.some(e=>e.isIntersecting)&&i()},{rootMargin:Ib}),s=a(e=>{let n=e[e.length-1];if(n){if(n.intersectionRatio>=Lb)return i();clearTimeout(t),n.isIntersecting&&(t=setTimeout(i,Rb))}},{threshold:[0,Lb]});return o.observe(e),s.observe(e),()=>{o.disconnect(),s.disconnect(),clearTimeout(t)}},[e,n]),[t,n]}var Bb=(0,a.createContext)(!1),Vb=({children:e,as:t=`div`,delay:n=0,className:r,id:i})=>{let a=Zg(),[s,c]=zb(),l=Xg[t];return(0,o.jsx)(l,{ref:s,id:i,className:r,initial:a?!1:Pb,animate:a||c?Fb:Pb,transition:{duration:.7,ease:Mb,delay:Math.min(Math.max(n,0),.5)},children:(0,o.jsx)(Bb.Provider,{value:!0,children:e})})};Vb.displayName=`Reveal`;var Hb=({children:e,className:t,itemClassName:n,as:r=`div`})=>(0,o.jsx)(r,{className:t,children:a.Children.toArray(e).map((e,t)=>(0,o.jsx)(Ub,{li:r!==`div`,className:n,index:t,children:e},e?.key??t))});Hb.displayName=`RevealList`;var Ub=({children:e,li:t,className:n,index:r})=>{let i=Zg(),s=(0,a.useContext)(Bb),[c,l]=zb();return(0,o.jsx)(t?Xg.li:Xg.div,{ref:c,className:n,initial:i||s?!1:Pb,animate:i||s||l?Fb:Pb,transition:{duration:.6,ease:Mb,delay:r%8*.06},children:e})},Wb=({show:e,children:t,className:n})=>Zg()?(0,o.jsx)(`div`,{className:n,children:t}):(0,o.jsx)(eh,{mode:`wait`,initial:!1,children:(0,o.jsx)(Xg.div,{className:n,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2,ease:Mb},children:t},String(e))});Wb.displayName=`Swap`;var Gb=`rounded-2xl border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-colors hover:border-accent/40`,Kb=`inline-flex items-center justify-center gap-1.5 h-8 px-2.5 sm:h-9 sm:px-3 shrink-0 whitespace-nowrap rounded-[var(--btn-radius,0.75rem)] text-[12.5px] font-semibold border border-[var(--panel-border)] bg-transparent text-foreground/60 hover:text-foreground hover:border-accent/40 hover:bg-foreground/[0.04] active:scale-[0.98] transition-all cursor-pointer disabled:opacity-40 disabled:pointer-events-none`,qb=`w-full h-11 px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] text-[14px] text-foreground outline-none transition-all duration-300 placeholder:text-foreground/35 hover:border-accent/40 focus:border-accent disabled:opacity-50 disabled:cursor-not-allowed console-field`,Jb=`w-full h-11 flex items-center px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-all duration-300 hover:border-accent/40 focus-within:border-accent console-field`,Yb=`flex-1 min-w-0 h-full bg-transparent border-none outline-none shadow-none text-[14px] text-foreground placeholder:text-foreground/35 disabled:cursor-not-allowed`,Xb=`text-[12.5px] sm:text-[13px] font-medium text-foreground/50 select-none`,Zb=`text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug`;function Qb({label:e=`cog`}){return(0,o.jsx)(io,{role:`img`,"aria-label":e,className:`inline-block w-[1.1em] h-[1.1em] align-[-0.18em] mx-[0.08em] text-foreground/85`})}function $b({children:e,tone:t=`quiet`}){return(0,o.jsx)(`p`,{className:`text-[12.5px] font-medium leading-relaxed px-1 ${t===`error`?`text-red-500`:`text-foreground/50`}`,children:e})}function ex({state:e=`saved`,label:t}){return(0,o.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[11.5px] font-semibold text-foreground/50 whitespace-nowrap shrink-0`,children:[e===`saving`?(0,o.jsx)(r.r,{className:`w-3 h-3 animate-spin text-foreground/40 shrink-0`}):(0,o.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full shrink-0 ${e===`saved`?`bg-emerald-500`:e===`error`?`bg-red-500`:`bg-foreground/25`}`}),t]})}function tx({icon:e,children:t,onClick:n,disabled:i,busy:a,tone:s=`default`,className:c=``,title:l,compact:u}){return(0,o.jsxs)(`button`,{type:`button`,title:l,onClick:n,disabled:i||a,className:`${Kb} ${s===`danger`?`hover:text-red-500 hover:border-red-500/40 hover:bg-red-500/[0.06]`:``} ${u?`max-sm:w-8 max-sm:px-0 max-sm:gap-0 max-sm:border-transparent max-sm:hover:border-transparent max-sm:hover:bg-foreground/[0.06]`:``} ${c}`,children:[a?(0,o.jsx)(r.r,{className:`w-3.5 h-3.5 animate-spin shrink-0`}):e?(0,o.jsx)(e,{className:`w-3.5 h-3.5 shrink-0`}):null,u?(0,o.jsx)(`span`,{className:`max-sm:hidden sm:inline-flex items-center gap-1.5`,children:t}):t]})}function nx({to:e,title:t,children:n,className:r=``}){return(0,o.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,title:t,onClick:e=>e.stopPropagation(),className:`${Kb} max-sm:w-8 max-sm:px-0 max-sm:gap-0 max-sm:border-transparent max-sm:hover:border-transparent max-sm:hover:bg-foreground/[0.06] ${r}`,children:[(0,o.jsx)(eo,{className:`w-3.5 h-3.5 shrink-0`}),(0,o.jsx)(`span`,{className:`max-sm:hidden`,children:n})]})}var rx=`w-6 h-6 rounded-md flex items-center justify-center text-inherit outline-none hover:text-foreground hover:bg-foreground/[0.07] focus-visible:text-foreground focus-visible:ring-2 focus-visible:ring-accent transition-colors cursor-pointer disabled:opacity-25 disabled:pointer-events-none`;function ix({label:e,canUp:t=!0,canDown:n=!0,onMove:r,hideOnPhone:i,className:a=``}){let s=(t,n)=>(0,o.jsx)(`button`,{type:`button`,title:t===`up`?`Move up`:`Move down`,"aria-label":`Move ${e} ${t}`,disabled:!n,onClick:()=>r(t),className:rx,children:t===`up`?(0,o.jsx)(Ja,{className:`w-3 h-3`}):(0,o.jsx)(Ka,{className:`w-3 h-3`})});return(0,o.jsxs)(`div`,{className:`${i?`max-sm:hidden sm:flex`:`flex`} items-center shrink-0 text-foreground/40 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity duration-150 `+a,onClick:e=>e.stopPropagation(),children:[s(`up`,t),s(`down`,n)]})}function ax({icon:e,title:t,description:r,actions:i,children:s,defaultOpen:c=!0,collapsible:l=!0}){let[u,d]=(0,a.useState)(c),f=l?u:!0,p=typeof i==`function`?i({open:()=>d(!0)}):i;return(0,o.jsxs)(`div`,{className:`fbos-section rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015] overflow-hidden transition-all`,children:[(0,o.jsxs)(`div`,{className:`w-full px-4 sm:px-5 py-4 grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-x-3 sm:gap-x-3.5 gap-y-0.5 text-left`,children:[e&&(0,o.jsx)(`div`,{className:`row-start-1 col-start-1 row-span-2 self-center w-10 h-10 rounded-2xl flex items-center justify-center shrink-0 border border-[var(--panel-border)]/50 bg-accent/10 text-accent`,children:(0,o.jsx)(e,{className:`w-5 h-5`})}),(0,o.jsx)(`span`,{className:`row-start-1 col-start-2 min-w-0 text-[15px] font-bold text-foreground tracking-tight leading-tight truncate self-end`,children:t}),p&&(0,o.jsx)(`div`,{className:`row-start-1 row-span-2 col-start-3 self-center justify-self-end flex items-center gap-1 sm:gap-2 shrink-0`,children:p}),l&&(0,o.jsx)(`button`,{type:`button`,onClick:()=>d(e=>!e),"aria-expanded":f,"aria-label":f?`Collapse ${t}`:`Expand ${t}`,className:`row-start-1 col-start-4 row-span-2 self-center w-8 h-8 rounded-xl border border-[var(--panel-border)]/60 hover:border-accent/40 flex items-center justify-center text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-all cursor-pointer justify-self-end`,children:(0,o.jsx)(n.t,{className:`w-4 h-4 transition-transform duration-200 ${f?`rotate-180`:``}`})}),r&&(0,o.jsx)(`span`,{className:`row-start-2 col-start-2 min-w-0 text-[12px] text-foreground/50 font-normal leading-snug truncate self-start`,children:r})]}),(0,o.jsx)(eh,{initial:!1,children:f&&(0,o.jsx)(Xg.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:Nb,className:`overflow-hidden`,children:(0,o.jsx)(`div`,{className:`border-t border-[var(--panel-border)]/40 p-4 sm:p-5 flex flex-col gap-5 bg-background/30`,children:s})})})]})}function ox({icon:e,title:t,description:n,chip:r,enabled:i,onChange:a,label:s,children:c}){return(0,o.jsxs)(`div`,{className:`rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015] overflow-hidden`,children:[(0,o.jsxs)(`div`,{className:`w-full px-4 sm:px-5 py-4 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 sm:gap-x-3.5 gap-y-0.5`,children:[(0,o.jsx)(`div`,{className:`row-start-1 col-start-1 row-span-2 self-center w-10 h-10 rounded-2xl flex items-center justify-center shrink-0 border border-[var(--panel-border)]/50 bg-accent/10 text-accent`,children:(0,o.jsx)(e,{className:`w-5 h-5`})}),(0,o.jsx)(`span`,{className:`row-start-1 col-start-2 min-w-0 text-[15px] font-bold text-foreground tracking-tight leading-tight truncate self-end`,children:t}),(0,o.jsx)(`span`,{className:`row-start-2 col-start-2 min-w-0 text-[12px] text-foreground/50 font-normal leading-snug truncate self-start`,children:n}),(0,o.jsxs)(`div`,{className:`row-start-1 row-span-2 col-start-3 self-center justify-self-end flex items-center gap-2 sm:gap-3 shrink-0`,children:[r&&(0,o.jsx)(`span`,{className:`max-sm:hidden`,children:(0,o.jsx)(ex,{state:r.state,label:r.label})}),i!==null&&(0,o.jsx)(fx,{enabled:i,onChange:a,label:s||t})]})]}),c&&(0,o.jsx)(`div`,{className:`border-t border-[var(--panel-border)]/40 p-4 sm:p-5 flex flex-col gap-4 bg-background/30`,children:c})]})}function sx({label:e,hint:t,action:n,children:r,error:i}){return(0,o.jsxs)(`div`,{className:`flex flex-col w-full`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mb-1 sm:mb-1.5 ml-1`,children:[(0,o.jsx)(`label`,{className:Xb,children:e}),n]}),r,t&&!i&&(0,o.jsx)(`span`,{className:`text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug mt-1 sm:mt-1.5 px-1`,children:t}),i&&(0,o.jsx)(`span`,{className:`text-[11.5px] font-semibold text-red-500 leading-snug mt-1 sm:mt-1.5 px-1`,children:i})]})}function cx({label:e,hint:t,value:n,onChange:r,onBlur:i,placeholder:a,prefix:s,error:c,disabled:l,action:u}){return(0,o.jsx)(sx,{label:e,hint:t,error:c,action:u,children:s?(0,o.jsxs)(`div`,{className:`${Jb} ${c?`is-invalid border-red-500/60`:``} ${l?`opacity-50`:``}`,children:[(0,o.jsx)(`span`,{className:`mr-0.5 text-[14px] font-semibold text-foreground/40 select-none shrink-0`,children:s}),(0,o.jsx)(`input`,{type:`text`,value:n??``,disabled:l,placeholder:a,onChange:e=>r(e.target.value),onBlur:i,"aria-label":e,className:`${Yb} no-glow`})]}):(0,o.jsx)(`input`,{type:`text`,value:n??``,disabled:l,placeholder:a,onChange:e=>r(e.target.value),onBlur:i,"aria-label":e,className:`${qb} ${c?`is-invalid border-red-500/60`:``}`})})}function lx({label:e,hint:t,value:n,onChange:r,onBlur:i,placeholder:a,rows:s,error:c}){return(0,o.jsx)(sx,{label:e,hint:t,error:c,children:(0,o.jsx)(Tv,{value:n??``,placeholder:a,rows:s,onChange:e=>r(e.target.value),onBlur:i,"aria-label":e,className:`${qb.replace(`h-11 `,``)} min-h-11 py-2.5 leading-5 ${c?`is-invalid border-red-500/60`:``}`})})}function ux({label:e,hint:t,value:n,onChange:r,options:i,placeholder:a=`None`,allowEmpty:s=!0,disabled:c}){let l=[...s?[{value:``,label:a}]:[],...i.filter(e=>e.value!==``)];return(0,o.jsx)(sx,{label:e,hint:t,children:(0,o.jsx)(Av,{ariaLabel:e,value:n??``,options:l,onChange:r,disabled:c,className:`console-select`,dense:!0,portal:!0,direction:`auto`})})}function dx({label:e,hint:t,enabled:n,onChange:r,disabled:i,hintWideOnly:a}){return(0,o.jsxs)(`div`,{className:`flex items-center justify-between gap-4 w-full`,children:[(0,o.jsxs)(`div`,{className:`flex flex-col gap-0.5 min-w-0 ml-1`,children:[(0,o.jsx)(`span`,{className:`text-[13px] font-medium text-foreground/80`,children:e}),t&&(0,o.jsx)(`span`,{className:`text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug${a?` max-sm:hidden`:``}`,children:t})]}),(0,o.jsx)(fx,{enabled:n,onChange:r,disabled:i,label:e})]})}function fx({enabled:e,onChange:t,disabled:n,label:r}){return(0,o.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":r,disabled:n,onClick:n=>{n.stopPropagation(),t(!e)},className:`relative w-10 h-6 rounded-full transition-colors shrink-0 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed ${e?`bg-accent`:`bg-foreground/15`}`,children:(0,o.jsx)(`span`,{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-[var(--button-fg,#fff)] shadow transition-transform ${e?`translate-x-4`:`translate-x-0`}`})})}function px({saving:e,savedAt:t,error:n}){return n?(0,o.jsx)(ex,{state:`error`,label:n}):e?(0,o.jsx)(ex,{state:`saving`,label:`Saving`}):t?(0,o.jsx)(ex,{state:`saved`,label:`Saved`}):null}function mx({label:e=`Time zone`,hint:n,value:i,onChange:s,compact:c}){let[l,u]=(0,a.useState)(``),d=t.et(),f=(i||``).trim(),p=(0,a.useMemo)(()=>t.Ut(l),[l]),m=l.trim().length>0,h=n??(f===d?`Detected from your browser.`:`Your browser is in ${t.nn(d)}.`),g=(0,o.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,o.jsxs)(`div`,{className:Jb,children:[f&&!m?(0,o.jsxs)(`span`,{className:`inline-flex items-center gap-2 mr-2.5 shrink-0 min-w-0 text-accent`,children:[(0,o.jsx)(no,{className:`w-4 h-4 shrink-0`}),(0,o.jsx)(`span`,{className:`text-[13px] font-semibold truncate`,children:t.nn(f)}),(0,o.jsx)(Xa,{className:`w-3.5 h-3.5 shrink-0`})]}):(0,o.jsx)(r.n,{className:`w-4 h-4 mr-2.5 text-foreground/30 shrink-0`}),(0,o.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:f?`Type a city to change it`:`Type a city, e.g. Rome`,"aria-label":`Search time zones`,className:`${Yb} no-glow`})]}),m&&(0,o.jsx)(`div`,{className:`rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] p-1.5 max-h-56 overflow-y-auto`,children:p.length>0?(0,o.jsx)(`div`,{className:`flex flex-col`,children:p.map(e=>(0,o.jsxs)(`button`,{type:`button`,"aria-pressed":e===f,onClick:()=>{s(e),u(``)},className:`w-full text-left px-2.5 py-1.5 rounded-lg text-[13px] font-medium transition-colors cursor-pointer ${e===f?`bg-accent text-[var(--button-fg,#fff)]`:`text-foreground/70 hover:text-foreground hover:bg-foreground/[0.06]`}`,children:[t.nn(e),e===d?` · detected`:``]},e))}):(0,o.jsx)(`span`,{className:`block px-2 py-2 text-[12px] font-medium text-foreground/45`,children:`Nothing close to that. Try a big city near you, like London or Chicago.`})})]});return c?g:(0,o.jsx)(sx,{label:e,hint:h,children:g})}Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return wv}}),Object.defineProperty(exports,`$n`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`$r`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`$t`,{enumerable:!0,get:function(){return Gi}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return Cy}}),Object.defineProperty(exports,`An`,{enumerable:!0,get:function(){return nr}}),Object.defineProperty(exports,`Ar`,{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,`At`,{enumerable:!0,get:function(){return Xa}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return my}}),Object.defineProperty(exports,`Bn`,{enumerable:!0,get:function(){return Fr}}),Object.defineProperty(exports,`Br`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`Bt`,{enumerable:!0,get:function(){return ea}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return nx}}),Object.defineProperty(exports,`Cn`,{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(exports,`Cr`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Wb}}),Object.defineProperty(exports,`Dn`,{enumerable:!0,get:function(){return ir}}),Object.defineProperty(exports,`Dr`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return no}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Hb}}),Object.defineProperty(exports,`En`,{enumerable:!0,get:function(){return Jr}}),Object.defineProperty(exports,`Er`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return uo}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return uy}}),Object.defineProperty(exports,`Fn`,{enumerable:!0,get:function(){return Qn}}),Object.defineProperty(exports,`Fr`,{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,`Ft`,{enumerable:!0,get:function(){return Wa}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return jv}}),Object.defineProperty(exports,`Gn`,{enumerable:!0,get:function(){return Cn}}),Object.defineProperty(exports,`Gr`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`Gt`,{enumerable:!0,get:function(){return ia}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return dy}}),Object.defineProperty(exports,`Hn`,{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(exports,`Hr`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`Ht`,{enumerable:!0,get:function(){return Yi}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return vy}}),Object.defineProperty(exports,`In`,{enumerable:!0,get:function(){return tr}}),Object.defineProperty(exports,`Ir`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`It`,{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return ey}}),Object.defineProperty(exports,`Jn`,{enumerable:!0,get:function(){return En}}),Object.defineProperty(exports,`Jr`,{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,`Jt`,{enumerable:!0,get:function(){return _a}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return Qv}}),Object.defineProperty(exports,`Kn`,{enumerable:!0,get:function(){return xn}}),Object.defineProperty(exports,`Kr`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`Kt`,{enumerable:!0,get:function(){return xa}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return gy}}),Object.defineProperty(exports,`Ln`,{enumerable:!0,get:function(){return jr}}),Object.defineProperty(exports,`Lr`,{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,`Lt`,{enumerable:!0,get:function(){return Aa}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return sy}}),Object.defineProperty(exports,`Mn`,{enumerable:!0,get:function(){return _r}}),Object.defineProperty(exports,`Mr`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`Mt`,{enumerable:!0,get:function(){return Ka}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return yy}}),Object.defineProperty(exports,`Nn`,{enumerable:!0,get:function(){return er}}),Object.defineProperty(exports,`Nr`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`Nt`,{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return jb}}),Object.defineProperty(exports,`On`,{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(exports,`Or`,{enumerable:!0,get:function(){return un}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return eo}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return hy}}),Object.defineProperty(exports,`Pn`,{enumerable:!0,get:function(){return gr}}),Object.defineProperty(exports,`Pr`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`Pt`,{enumerable:!0,get:function(){return La}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return Tv}}),Object.defineProperty(exports,`Qn`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`Qr`,{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,`Qt`,{enumerable:!0,get:function(){return Ui}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return ly}}),Object.defineProperty(exports,`Rn`,{enumerable:!0,get:function(){return Pr}}),Object.defineProperty(exports,`Rr`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`Rt`,{enumerable:!0,get:function(){return ka}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return dx}}),Object.defineProperty(exports,`Sn`,{enumerable:!0,get:function(){return vi}}),Object.defineProperty(exports,`Sr`,{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return qo}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return Vb}}),Object.defineProperty(exports,`Tn`,{enumerable:!0,get:function(){return Yr}}),Object.defineProperty(exports,`Tr`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return ho}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return ty}}),Object.defineProperty(exports,`Un`,{enumerable:!0,get:function(){return Un}}),Object.defineProperty(exports,`Ur`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`Ut`,{enumerable:!0,get:function(){return na}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return fy}}),Object.defineProperty(exports,`Vn`,{enumerable:!0,get:function(){return Jn}}),Object.defineProperty(exports,`Vr`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`Vt`,{enumerable:!0,get:function(){return ra}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return oy}}),Object.defineProperty(exports,`Wn`,{enumerable:!0,get:function(){return vn}}),Object.defineProperty(exports,`Wr`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`Wt`,{enumerable:!0,get:function(){return $i}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return Hv}}),Object.defineProperty(exports,`Xn`,{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,`Xr`,{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,`Xt`,{enumerable:!0,get:function(){return Hi}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return $v}}),Object.defineProperty(exports,`Yn`,{enumerable:!0,get:function(){return An}}),Object.defineProperty(exports,`Yr`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`Yt`,{enumerable:!0,get:function(){return aa}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return Av}}),Object.defineProperty(exports,`Zn`,{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,`Zr`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`Zt`,{enumerable:!0,get:function(){return Wi}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return ex}}),Object.defineProperty(exports,`_n`,{enumerable:!0,get:function(){return _i}}),Object.defineProperty(exports,`_r`,{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return Ic}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Kb}}),Object.defineProperty(exports,`ai`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`an`,{enumerable:!0,get:function(){return Bi}}),Object.defineProperty(exports,`ar`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return ep}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return cx}}),Object.defineProperty(exports,`bn`,{enumerable:!0,get:function(){return fi}}),Object.defineProperty(exports,`br`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return yc}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return qb}}),Object.defineProperty(exports,`ci`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`cn`,{enumerable:!0,get:function(){return Qr}}),Object.defineProperty(exports,`cr`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return Gd}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return ix}}),Object.defineProperty(exports,`di`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`dn`,{enumerable:!0,get:function(){return ni}}),Object.defineProperty(exports,`dr`,{enumerable:!0,get:function(){return hn}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return wd}}),Object.defineProperty(exports,`ei`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`en`,{enumerable:!0,get:function(){return Vi}}),Object.defineProperty(exports,`er`,{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return $g}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Yb}}),Object.defineProperty(exports,`fi`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`fn`,{enumerable:!0,get:function(){return oi}}),Object.defineProperty(exports,`fr`,{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return ed}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return ux}}),Object.defineProperty(exports,`gn`,{enumerable:!0,get:function(){return ei}}),Object.defineProperty(exports,`gr`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return jl}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return $b}}),Object.defineProperty(exports,`hn`,{enumerable:!0,get:function(){return gi}}),Object.defineProperty(exports,`hr`,{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return bu}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return sx}}),Object.defineProperty(exports,`ii`,{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,`in`,{enumerable:!0,get:function(){return zi}}),Object.defineProperty(exports,`ir`,{enumerable:!0,get:function(){return sn}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return $p}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return py}}),Object.defineProperty(exports,`jn`,{enumerable:!0,get:function(){return Ir}}),Object.defineProperty(exports,`jr`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`jt`,{enumerable:!0,get:function(){return Ja}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return Hy}}),Object.defineProperty(exports,`kn`,{enumerable:!0,get:function(){return Lr}}),Object.defineProperty(exports,`kr`,{enumerable:!0,get:function(){return fn}}),Object.defineProperty(exports,`kt`,{enumerable:!0,get:function(){return Qa}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Jb}}),Object.defineProperty(exports,`li`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`ln`,{enumerable:!0,get:function(){return $r}}),Object.defineProperty(exports,`lr`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return ax}}),Object.defineProperty(exports,`mi`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`mn`,{enumerable:!0,get:function(){return ci}}),Object.defineProperty(exports,`mr`,{enumerable:!0,get:function(){return dn}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Qb}}),Object.defineProperty(exports,`ni`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`nn`,{enumerable:!0,get:function(){return Ki}}),Object.defineProperty(exports,`nr`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Xg}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return tx}}),Object.defineProperty(exports,`oi`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`on`,{enumerable:!0,get:function(){return Pi}}),Object.defineProperty(exports,`or`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return Wf}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return px}}),Object.defineProperty(exports,`pi`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`pn`,{enumerable:!0,get:function(){return ti}}),Object.defineProperty(exports,`pr`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return ju}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return Vv}}),Object.defineProperty(exports,`qn`,{enumerable:!0,get:function(){return bn}}),Object.defineProperty(exports,`qr`,{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,`qt`,{enumerable:!0,get:function(){return Xi}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Gb}}),Object.defineProperty(exports,`ri`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`rn`,{enumerable:!0,get:function(){return Fi}}),Object.defineProperty(exports,`rr`,{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return eh}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Zb}}),Object.defineProperty(exports,`si`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`sn`,{enumerable:!0,get:function(){return ai}}),Object.defineProperty(exports,`sr`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return cf}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return mx}}),Object.defineProperty(exports,`ti`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`tn`,{enumerable:!0,get:function(){return Ri}}),Object.defineProperty(exports,`tr`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return Zg}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Xb}}),Object.defineProperty(exports,`ui`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`un`,{enumerable:!0,get:function(){return si}}),Object.defineProperty(exports,`ur`,{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return zd}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return ox}}),Object.defineProperty(exports,`vn`,{enumerable:!0,get:function(){return hi}}),Object.defineProperty(exports,`vr`,{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return Fc}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Nb}}),Object.defineProperty(exports,`wn`,{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(exports,`wr`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return wo}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return fx}}),Object.defineProperty(exports,`xn`,{enumerable:!0,get:function(){return mi}}),Object.defineProperty(exports,`xr`,{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return lx}}),Object.defineProperty(exports,`yn`,{enumerable:!0,get:function(){return pi}}),Object.defineProperty(exports,`yr`,{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return kc}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return by}}),Object.defineProperty(exports,`zn`,{enumerable:!0,get:function(){return xr}}),Object.defineProperty(exports,`zr`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`zt`,{enumerable:!0,get:function(){return ha}});
|