PageSourceSearch

https://www.theclub.ee/_next/static/chunks/3589-149759403ab3856b.js

js theclub.ee collected 2026-10-02 00:38:15 UTC 36,256 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3589],{8088:(e,t,a)=>{a.d(t,{A:()=>h,v:()=>y});var s=a(95155),n=a(12115),o=a(75662),r=a(12834),l=a(76907),i=a(35299),c=a(52056),d=a(86948),p=a(5835),u=a(80160),x=a(90093),m=a(72400),f=a(27048);function h(){var e,t;let{t:a}=(0,o.Bd)("common"),{data:n}=(0,p.rq)(),r=(0,u.cp)(),i=r.enabled&&"ready"!==r.phase;return(0,s.jsx)(d.Zp,{"data-slot":"access-qr-card","data-presence":null!=(t=null==n?void 0:n.state)?t:"unknown",children:(0,s.jsxs)(d.Wu,{className:"flex flex-col items-center gap-3 py-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[(0,s.jsx)(l.A,{className:"size-4 text-primary"}),a("app.access.title","Door access")]}),i?(0,s.jsx)(x.h,{variant:"plain",phase:r.phase,distanceMeters:r.distanceMeters,gymName:null==(e=r.closestGym)?void 0:e.name,city:r.city,onRetry:r.retry}):(0,s.jsxs)(s.Fragment,{children:[f.Ph&&(0,s.jsx)(b,{}),(0,s.jsx)(m.m,{}),!f.Ph&&(0,s.jsx)("p",{className:"text-center text-xs text-muted-foreground",children:a("app.access.doors_only_hint","Tap the turnstile you're standing at and it opens.")})]})]})})}function b(){let{t:e}=(0,o.Bd)("common"),{data:t,isLoading:a,isError:n,refetch:r}=(0,p.Th)(),l=(0,p.vD)();return(0,s.jsxs)(s.Fragment,{children:[a||!t?(0,s.jsx)("div",{className:"flex h-[256px] w-[256px] items-center justify-center rounded-xl border border-dashed border-border bg-muted/30",children:(0,s.jsx)(i.A,{className:"size-5 animate-spin text-muted-foreground"})}):n?(0,s.jsxs)("div",{className:"flex h-[256px] w-[256px] flex-col items-center justify-center gap-2 rounded-xl border border-destructive/30 bg-destructive/5 p-4 text-center text-xs text-destructive",children:[(0,s.jsx)(c.A,{className:"size-5"}),e("app.access.error","Couldn't generate your code. Tap to retry."),(0,s.jsx)("button",{onClick:()=>r(),className:"mt-1 rounded-md border border-destructive/40 px-2 py-1 text-[11px] font-medium hover:bg-destructive/10",children:e("app.access.retry","Retry")})]}):l?(0,s.jsx)("div",{"data-slot":"qr-suppressed",className:"flex h-[256px] w-[256px] items-center justify-center rounded-xl border border-dashed border-border bg-muted/30 p-6 text-center text-xs text-muted-foreground",children:e("app.access.closed_qr_hidden","Your QR code comes back when the club opens.")}):(0,s.jsx)(y,{token:t.token,expiresAt:t.expires_at}),!l&&!n&&(0,s.jsx)("p",{className:"text-center text-xs text-muted-foreground",children:e("app.access.description","Hold this code up to the reader, or tap a door below.")})]})}function y(e){let{token:t,expiresAt:a}=e,{t:l}=(0,o.Bd)("common"),[i,c]=(0,n.useState)(()=>g(a));(0,n.useEffect)(()=>{c(g(a));let e=setInterval(()=>c(g(a)),500);return()=>clearInterval(e)},[a]);let d=i<=0;return(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsx)("div",{className:"rounded-xl border bg-white p-3 shadow-sm transition-opacity ".concat(d?"opacity-40":""),children:(0,s.jsx)(r.h,{value:t,size:256,level:"Q",marginSize:4,bgColor:"#ffffff",fgColor:"#000000"})}),d?(0,s.jsx)("span",{className:"text-xs text-amber-600",children:l("app.access.refreshing","Refreshing…")}):(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:l("app.access.refresh_in","Refreshes in {{n}}s",{n:i})})]})}function g(e){return Math.max(0,Math.ceil((new Date(e).getTime()-Date.now())/1e3))}},13541:(e,t,a)=>{a.d(t,{ZQ:()=>k});var s=a(95155),n=a(75662),o=a(52056),r=a(17181),l=a(35299),i=a(23664),c=a(65229),d=a(20243),p=a(12115),u=a(20063),x=a(60919),m=a(64269),f=a(84804),h=a(38742),b=a(91881),y=a(71122);let g="text-espresso";function v(){let{t:e}=(0,n.Bd)("common"),{data:t=[]}=(0,b.Pm)(),a=(0,h.ky)(),o=(0,h.aI)(),[r,i]=(0,p.useState)(!1),[d,u]=(0,p.useState)(""),[m,f]=(0,p.useState)(!1),[v,j]=(0,p.useState)("idle"),[_,N]=(0,p.useState)(null),w=function(e){if(!e)return null;for(let s of e){var t,a;if("active"===s.status){for(let e of null!=(t=s.feature_usage)?t:[])if(!e.is_unlimited&&e.allotted_count&&!(e.allotted_count<=0)&&/guest pass/i.test(e.feature_name))return{used_count:null!=(a=e.used_count)?a:0,allotted_count:e.allotted_count,member_feature_usage_id:e.id}}}return null}(t);if(!w)return null;if(y.g)return(0,s.jsx)("button",{type:"button","data-slot":"send-guest-pass-action","data-status":"launch-gated",disabled:!0,className:"inline-flex w-fit items-center justify-center rounded-full border border-espresso/40 bg-warm-cream px-[18px] py-[11px] font-[family-name:var
1(--font-body)] text-[15px] font-medium text-warm-taupe",children:e("app.mobile.dashboard.sendGuestPassLaunchGated","Guest passes — available after launch")});let E=w.allotted_count?Math.max(0,w.allotted_count-w.used_count):0;if(0===E)return null;let k=async t=>{if(t.preventDefault(),N(null),!d.trim()||!m)return;let s=null;try{let e=await a.mutateAsync();s=e.id,await o.mutateAsync({id:e.id,recipient_email:d.trim(),attestation_14_plus:m}),j("success"),u(""),f(!1),window.setTimeout(()=>{j("idle"),i(!1)},1800)}catch(t){N(function(e,t,a){var s,n,o;let r;switch(e instanceof x.pe?null==(o=e.response)||null==(n=o.data)||null==(s=n.error)?void 0:s.code:void 0){case"QUOTA_EXHAUSTED":r=a("app.mobile.dashboard.sendGuestPassQuota","you've used all this month's guest passes.");break;case"DUPLICATE_OPEN_VOUCHER":r=a("app.mobile.dashboard.sendGuestPassDuplicate","that friend already has a live voucher from you.");break;case"NO_GUEST_PASS_QUOTA":r=a("app.mobile.dashboard.sendGuestPassNoQuota","your current pass doesn't include guest passes.");break;case"VOUCHER_SELF_REDEEM_NOT_ALLOWED":r=a("app.mobile.vouchers.error_self_redeem","A guest pass has to go to someone else — enter your guest's email, not your own.");break;default:r=a("app.mobile.dashboard.sendGuestPassGeneric","couldn't send. please try again.")}return t?r+" "+a("app.mobile.dashboard.sendGuestPassOrphan","your voucher is waiting in the guest passes screen — retry from there."):r}(t,null!==s,e)),j("error"),window.setTimeout(()=>j("idle"),5e3)}},A=a.isPending||o.isPending;return r?(0,s.jsxs)("form",{onSubmit:k,"data-slot":"send-guest-pass-form",className:"flex flex-col gap-[10px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] font-medium text-[14px] leading-[17px] ".concat(g),children:e("app.mobile.dashboard.sendGuestPassTitle","Send a guest pass")}),(0,s.jsx)("button",{type:"button","aria-label":e("app.mobile.dashboard.sendGuestPassClose","Close"),onClick:()=>{i(!1),u(""),f(!1),N(null)},className:"rounded-full p-1 ".concat(g),children:(0,s.jsx)(c.A,{className:"size-[14px]"})})]}),(0,s.jsx)("input",{type:"email",inputMode:"email",autoComplete:"email",placeholder:e("app.mobile.dashboard.sendGuestPassEmail","friend's email"),value:d,onChange:e=>u(e.target.value),required:!0,className:"rounded-[8px] border ".concat("border-espresso"," bg-white px-[10px] py-[8px] font-[family-name:var(--font-body)] text-[14px] ").concat(g)}),(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] opacity-70 ".concat(g),children:e("app.mobile.dashboard.sendGuestPassHint","if they have an account, the pass appears right away. otherwise they get an email with a link — no account needed, they just show the QR at the door.")}),(0,s.jsxs)("label",{className:"flex items-start gap-[8px] font-[family-name:var(--font-body)] text-[12px] leading-[15px] ".concat(g),children:[(0,s.jsx)("input",{type:"checkbox",checked:m,onChange:e=>f(e.target.checked),"data-slot":"guest-pass-attestation",className:"mt-[2px] size-[14px] shrink-0 accent-primary"}),(0,s.jsx)("span",{children:e("app.mobile.dashboard.sendGuestPassAttest14","I confirm my guest is 14 years or older.")})]}),_&&(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] text-[#cc3b2b]",children:_}),(0,s.jsxs)("button",{type:"submit",disabled:A||!d.trim()||!m,"data-feedback":v,className:"inline-flex items-center justify-center gap-[6px] rounded-[20px] bg-primary px-[16px] py-[8px] font-[family-name:var(--font-body)] font-semibold text-[14px] text-warm-cream disabled:opacity-50",style:"success"===v?{backgroundColor:"var(--accent)"}:"error"===v?{backgroundColor:"#cc3b2b"}:void 0,children:[A&&(0,s.jsx)(l.A,{className:"size-[12px] animate-spin"}),"success"===v?e("app.mobile.dashboard.sendGuestPassSent","Sent!"):"error"===v?e("app.mobile.dashboard.sendGuestPassFailed","couldn't send"):e("app.mobile.dashboard.sendGuestPassSubmit","Send pass")]})]}):(0,s.jsx)("button",{type:"button","data-slot":"send-guest-pass-action","data-remaining":E,onClick:()=>i(!0),className:"inline-flex w-fit items-center justify-center gap-[6px] rounded-full bg-primary px-[18px] py-[11px] font-[family-name:var
1(--font-body)] text-[15px] font-medium text-warm-cream transition-colors hover:bg-primary/90",children:e("app.mobile.dashboard.sendGuestPass","Send guest pass ({{n}} left)",{n:E})})}let j="text-espresso",_="text-warm-taupe",N="border-espresso",w="font-[family-name:var(--font-heading)] text-[22px] leading-[24px] text-espresso",E="h-px w-full bg-espresso/10";function k(){let{t:e}=(0,n.Bd)("common"),{data:t=[],isLoading:a}=(0,h.l8)();return a?(0,s.jsxs)("div",{className:"flex w-full flex-col gap-[28px] pt-[12px]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(d.E,{className:"h-[22px] w-[200px] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"h-[16px] w-[64px] rounded-[6px]"})]}),(0,s.jsx)(d.E,{className:"h-[14px] w-[80%] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"mt-[4px] h-[40px] w-[170px] rounded-full"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(d.E,{className:"h-[22px] w-[160px] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"h-[18px] w-[72px] rounded-[6px]"})]}),(0,s.jsx)(d.E,{className:"h-[14px] w-[85%] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"mt-[4px] h-[40px] w-[150px] rounded-full"})]}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-[8px]",children:[(0,s.jsx)(d.E,{className:"h-[22px] w-[180px] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"h-[14px] w-[75%] rounded-[6px]"}),(0,s.jsx)("div",{className:"flex w-full flex-col",children:[0,1,2].map(e=>(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-[8px] py-[16px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(d.E,{className:"h-[17px] w-[110px] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"h-[18px] w-[80px] rounded-full"})]}),(0,s.jsx)(d.E,{className:"h-[13px] w-[60%] rounded-[6px]"}),(0,s.jsx)(d.E,{className:"h-[13px] w-[40%] rounded-[6px]"})]}),e<2&&(0,s.jsx)("div",{className:E})]},e))})]})]}):(0,s.jsxs)("div",{className:"flex w-full flex-col gap-[28px] pt-[12px]",children:[(0,s.jsx)(A,{}),(0,s.jsx)(v,{}),(0,s.jsx)(T,{}),(0,s.jsxs)("section",{className:"flex w-full flex-col gap-[8px]",children:[(0,s.jsx)("p",{className:w,children:e("app.mobile.vouchers.list_title","Your guest passes")}),(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[14px] leading-[16.8px] ".concat(_),children:e("app.mobile.vouchers.hint","guest passes you've claimed. send one to a friend's email or use it on your own account.")}),0===t.length?(0,s.jsx)("p",{className:"pt-[6px] font-[family-name:var(--font-body)] text-[14px] leading-[18px] ".concat(_),children:e("app.mobile.vouchers.empty","No guest passes yet — buy one and send it to a friend.")}):(0,s.jsx)("div",{className:"flex w-full flex-col",children:t.map((e,a)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(S,{voucher:e}),a<t.length-1&&(0,s.jsx)("div",{className:E})]},e.id))})]})]})}function A(){let{t:e}=(0,n.Bd)("common"),{data:t,isLoading:a}=(0,h.xW)();return a?(0,s.jsx)(d.E,{"data-slot":"free-guest-passes-skeleton",className:"h-[48px] w-full rounded-[8px]"}):!t||t.free_allotted<=0?null:(0,s.jsxs)("section",{"data-slot":"free-guest-passes",className:"flex flex-col gap-[4px]",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-[12px]",children:[(0,s.jsx)("p",{className:w,children:e("app.mobile.vouchers.free_title","Free guest passes")}),(0,s.jsx)("span",{className:"shrink-0 font-[family-name:var(--font-body)] font-semibold text-[15px] text-accent",children:e("app.mobile.vouchers.free_left_count","{{n}} of {{total}} left",{n:t.free_remaining,total:t.free_allotted})})]}),(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[14px] leading-[16.8px] ".concat(_),children:e("app.mobile.vouchers.free_included","Included with your membership — {{n}} every month. Send one to a friend below.",{n:t.free_allotted})})]})}function T(){let{t:e,i18n:t}=(0,n.Bd)("common"),a=(0,u.useRouter)(),{data:o,isLoading:r}=(0,h.xW)();if(r)return(0,s.jsx)(d.E,{"data-slot":"buy-guest-pass-skeleton",className:"h-[9
16px] w-full rounded-[15px]"});if(!o||!o.can_buy)return null;let l=new Intl.NumberFormat("et"===t.language?"et-EE":"en-GB",{style:"currency",currency:o.currency||"EUR"}).format(o.unit_price),i=null!==o.paid_remaining&&void 0!==o.paid_remaining&&o.paid_remaining<=0;return(0,s.jsxs)("section",{"data-slot":"buy-guest-pass",className:"flex flex-col gap-[8px]",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-[12px]",children:[(0,s.jsx)("p",{className:w,children:e("app.mobile.vouchers.buy_title","Buy a guest pass")}),(0,s.jsx)("span",{className:"shrink-0 font-[family-name:var(--font-body)] font-semibold text-[18px] ".concat(j),children:l})]}),(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[14px] leading-[16.8px] ".concat(_),children:null!=o.discount_percent?e("app.mobile.vouchers.buy_subtitle","{{pct}}% Of a single visit. bring a friend — valid alongside your membership.",{pct:Math.round(o.discount_percent)}):e("app.mobile.vouchers.buy_subtitle_plain","Bring a friend — valid alongside your membership.")}),null!==o.paid_remaining&&void 0!==o.paid_remaining&&(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[13px] leading-[15.6px] ".concat(_),children:e("app.mobile.vouchers.paid_left","{{n}} Of {{cap}} buys left",{n:o.paid_remaining,cap:o.monthly_cap})}),i?(0,s.jsxs)("p",{"data-slot":"buy-guest-pass-cap",className:"pt-[2px] font-[family-name:var(--font-body)] text-[14px] leading-[16.8px] ".concat(_),children:[e("app.mobile.vouchers.buy_cap_reached","Monthly limit reached")," — ",e("app.mobile.vouchers.buy_cap_resets","resets next month.")]}):(0,s.jsx)("button",{type:"button",onClick:()=>{let e=o.voucher_product_id;e&&a.push("/shop/checkout?guestpass=".concat(e))},className:"mt-[4px] inline-flex w-fit items-center justify-center gap-[6px] rounded-full bg-primary px-[18px] py-[11px] font-[family-name:var(--font-body)] font-medium text-[15px] text-warm-cream transition-colors hover:bg-primary/90",children:e("app.mobile.vouchers.buy_cta","Buy for {{price}}",{price:l})}),(0,s.jsx)("p",{"data-slot":"buy-guest-pass-validity-note",className:"pt-[2px] font-[family-name:var(--font-body)] text-[13px] leading-[15.6px] ".concat(_),children:e("app.mobile.vouchers.buy_validity_note","Valid {{days}} days from purchase — one entry. The clock starts when you buy, not when you send or redeem it.",{days:o.val
1idity_days})})]})}function S(e){let{voucher:t}=e,{t:a,i18n:r}=(0,n.Bd)("common");return(0,s.jsxs)("div",{"data-slot":"voucher-card","data-status":t.status,"data-email-failed":t.email_failed_at?"true":"false",className:"flex flex-col gap-[8px] py-[16px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-[8px]",children:[(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] font-medium text-[15px] leading-[18px] ".concat(j),children:a("app.mobile.vouchers.title","Guest pass")}),(0,s.jsx)(R,{status:t.status})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-[2px] font-[family-name:var(--font-body)] text-[13px] leading-[15.6px] ".concat(_),children:[t.recipient_email&&(0,s.jsx)("p",{children:a("app.mobile.vouchers.sent_to","Sent to {{email}}",{email:t.recipient_email})}),(0,s.jsx)("p",{children:a("app.mobile.vouchers.expires","Expires {{date}}",{date:function(e,t){let a=new Date(e);if(Number.isNaN(a.getTime()))return e;try{return new Intl.DateTimeFormat(t,{timeZone:f.ig,year:"numeric",month:"2-digit",day:"2-digit"}).format(a)}catch(e){return new Intl.DateTimeFormat("sv-SE",{timeZone:f.ig}).format(a)}}(t.expires_at,r.language)})})]}),t.email_failed_at&&!t.redeemed_at&&(0,s.jsxs)("div",{className:"flex items-start gap-[6px] rounded-[10px] border border-[#cc3b2b]/30 bg-[#cc3b2b]/5 p-[10px]",children:[(0,s.jsx)(o.A,{className:"mt-[1px] size-[14px] shrink-0 text-[#cc3b2b]"}),(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[12px] leading-[15px] text-[#cc3b2b]",children:a("app.mobile.vouchers.delivery_failed","Delivery may have failed. you can copy the redeem link and share manually.")})]}),"unsent"===t.status&&(0,s.jsx)(P,{voucher:t}),"sent"===t.status&&(0,s.jsx)(C,{voucher:t})]})}function C(e){var t;let{voucher:a}=e,{t:o}=(0,n.Bd)("common"),d=(0,h.Rh)(),[u,x]=(0,p.useState)(!1),[m,f]=(0,p.useState)(null!=(t=a.recipient_email)?t:""),[b,y]=(0,p.useState)(!1),[g,v]=(0,p.useState)(null);return u?(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),v(null),m.trim()&&b&&d.mutate({id:a.id,recipient_email:m.trim(),attestation_14_plus:b},{onError:e=>v(D(e,o)),onSuccess:()=>{x(!1),y(!1)}})},className:"flex flex-col gap-[6px]",children:[(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] opacity-70 ".concat(j),children:o("app.mobile.vouchers.resend_hint","Sends a fresh link to this address — the previous link stops working.")}),(0,s.jsxs)("div",{className:"flex gap-[6px]",children:[(0,s.jsx)("input",{type:"email",inputMode:"email",autoComplete:"email",value:m,onChange:e=>f(e.target.value),required:!0,className:"min-w-0 flex-1 rounded-[8px] border ".concat(N," bg-white px-[10px] py-[6px] font-[family-name:var(--font-body)] text-[13px] ").concat(j)}),(0,s.jsxs)("button",{type:"submit",disabled:d.isPending||!m.trim()||!b,className:"inline-flex items-center gap-[4px] rounded-[8px] bg-primary px-[12px] py-[6px] font-[family-name:var(--font-body)] font-medium text-[13px] text-warm-cream disabled:opacity-50",children:[d.isPending?(0,s.jsx)(l.A,{className:"size-[12px] animate-spin"}):(0,s.jsx)(i.A,{className:"size-[12px]"}),o("app.mobile.vouchers.resend_submit","Resend")]}),(0,s.jsx)("button",{type:"button","aria-label":o("app.mobile.vouchers.cancel","Cancel"),onClick:()=>{var e;x(!1),f(null!=(e=a.recipient_email)?e:""),y(!1),v(null)},className:"rounded-[8px] border ".concat(N," px-[8px] py-[6px] ").concat(j),children:(0,s.jsx)(c.A,{className:"size-[12px]"})})]}),(0,s.jsxs)("label",{className:"flex items-start gap-[6px] font-[family-name:var(--font-body)] text-[11px] leading-[14px] ".concat(j),children:[(0,s.jsx)("input",{type:"checkbox",checked:b,onChange:e=>y(e.target.checked),"data-slot":"guest-pass-attestation",className:"mt-[1px] size-[13px] shrink-0 accent-primary"}),(0,s.jsx)("span",{children:o("app.mobile.dashboard.sendGuestPassAttest14","I confirm my guest is 14 years or older.")})]}),g&&(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] text-[#cc3b2b]",children:g})]}):(0,s.jsxs)("button",{type:"button","data-slot":"voucher-resend-trigger",onClick:()=>
1x(!0),className:"self-start inline-flex items-center gap-[4px] rounded-[20px] border ".concat(N," px-[12px] py-[6px] font-[family-name:var(--font-body)] font-medium text-[13px] ").concat(j),children:[(0,s.jsx)(r.A,{className:"size-[12px]"}),o("app.mobile.vouchers.resend","Wrong address? Resend")]})}function P(e){let{voucher:t}=e,{t:a}=(0,n.Bd)("common"),o=(0,h.aI)(),[d,u]=(0,p.useState)(!1),[x,m]=(0,p.useState)(""),[f,b]=(0,p.useState)(!1),[y,g]=(0,p.useState)(null),v=o.isPending;return d?(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),g(null),x.trim()&&f&&o.mutate({id:t.id,recipient_email:x.trim(),attestation_14_plus:f},{onError:e=>g(D(e,a)),onSuccess:()=>{m(""),b(!1),u(!1)}})},className:"flex flex-col gap-[6px]",children:[(0,s.jsxs)("div",{className:"flex gap-[6px]",children:[(0,s.jsx)("input",{type:"email",inputMode:"email",autoComplete:"email",placeholder:a("app.mobile.vouchers.recipient_email","friend's email"),value:x,onChange:e=>m(e.target.value),required:!0,className:"min-w-0 flex-1 rounded-[8px] border ".concat(N," bg-white px-[10px] py-[6px] font-[family-name:var(--font-body)] text-[13px] ").concat(j)}),(0,s.jsxs)("button",{type:"submit",disabled:v||!x.trim()||!f,className:"inline-flex items-center gap-[4px] rounded-[8px] bg-primary px-[12px] py-[6px] font-[family-name:var(--font-body)] font-medium text-[13px] text-warm-cream disabled:opacity-50",children:[o.isPending?(0,s.jsx)(l.A,{className:"size-[12px] animate-spin"}):(0,s.jsx)(i.A,{className:"size-[12px]"}),a("app.mobile.vouchers.send","Send")]}),(0,s.jsx)("button",{type:"button","aria-label":a("app.mobile.vouchers.cancel","Cancel"),onClick:()=>{u(!1),m(""),g(null)},className:"rounded-[8px] border ".concat(N," px-[8px] py-[6px] ").concat(j),children:(0,s.jsx)(c.A,{className:"size-[12px]"})})]}),(0,s.jsxs)("label",{className:"flex items-start gap-[6px] font-[family-name:var(--font-body)] text-[11px] leading-[14px] ".concat(j),children:[(0,s.jsx)("input",{type:"checkbox",checked:f,onChange:e=>b(e.target.checked),"data-slot":"guest-pass-attestation",className:"mt-[1px] size-[13px] shrink-0 accent-primary"}),(0,s.jsx)("span",{children:a("app.mobile.dashboard.sendGuestPassAttest14","I confirm my guest is 14 years or older.")})]}),y&&(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] text-[#cc3b2b]",children:y})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-[6px]",children:[(0,s.jsx)("div",{className:"flex gap-[6px]",children:(0,s.jsxs)("button",{type:"button",onClick:()=>u(!0),disabled:v,className:"inline-flex items-center gap-[4px] rounded-[20px] bg-primary px-[12px] py-[6px] font-[family-name:var(--font-body)] font-medium text-[13px] text-warm-cream disabled:opacity-50",children:[(0,s.jsx)(r.A,{className:"size-[12px]"}),a("app.mobile.vouchers.send_to_friend","Send to friend")]})}),(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] ".concat(_),children:a("app.mobile.vouchers.guest_only_hint","Guest passes are for guests — send it to someone else's email.")}),y&&(0,s.jsx)("p",{className:"font-[family-name:var(--font-body)] text-[11px] leading-[14px] text-[#cc3b2b]",children:y})]})}function D(e,t){let a=null;if(e instanceof x.pe){var s,n,o;let t=null==(o=e.response)||null==(n=o.data)||null==(s=n.error)?void 0:s.code;t&&["QUOTA_EXHAUSTED","DUPLICATE_OPEN_VOUCHER","VOUCHER_ALREADY_SENT","VOUCHER_ALREADY_REDEEMED","NO_GUEST_PASS_QUOTA","VOUCHER_SELF_REDEEM_NOT_ALLOWED"].includes(t)&&(a=t)}switch(a){case"QUOTA_EXHAUSTED":return t("app.mobile.vouchers.error_quota_exhausted","you've used all this month's guest passes. quota resets next month.");case"DUPLICATE_OPEN_VOUCHER":return t("app.mobile.vouchers.error_duplicate_recipient","That friend already has a live voucher from you — wait for it to expire or be claimed.");case"VOUCHER_ALREADY_SENT":return t("app.mobile.vouchers.error_already_sent","This voucher has already been sent.");case"VOUCHER_ALREADY_REDEEMED":return t("app.mobile.vouchers.error_already_redeemed","This voucher has already been claimed.");case"NO_GUEST_PASS_QUOTA":return t("app.mobile.vouchers.error_no_quota","your current pass doesn't include guest passes.");case"VOUCHER_SELF_REDEEM_NOT_ALLOWED":return t("app.mobile.vouchers.error_self_redeem","A guest pass has to go to someone else — enter your guest's email, not your own.");default:return t("app.mobile.vouchers.error_generic","Something went wrong. please try again.")}}function R(e){let{status:t}=e,{t:a}=(0,n.Bd)("common"),o={unsent:a("app.mobile.vouchers.status_unsent","Unsent"),sent:a("app.mobile.vouchers.status_sent","Sent"),claimed:a("app.mobile.vouchers.status_claimed","Claimed"),expired:a("app.mobile.vouchers.status_expired","Expired")};return(0,s.jsx)("span",{className:(0,m.cn)("inline-flex shrink-0 items-center rounded-full px-[10px] py-[3px] font-[family-name:var
1(--font-body)] font-medium text-[10px] uppercase tracking-[0.08em]",{unsent:"bg-espresso/8 text-espresso",sent:"bg-primary/12 text-primary",claimed:"bg-accent/12 text-accent",expired:"bg-warm-taupe/15 text-warm-taupe"}[t]),children:o[t]})}},14836:(e,t,a)=>{a.d(t,{s:()=>n});var s=a(12115);function n(e){let t=(0,s.useCallback)(()=>{if(!e)return null;let t=new Date(e).getTime()-Date.now();if(t<=0)return null;let a=Math.floor(t/1e3),s=Math.floor(a/3600),n=Math.floor(a%3600/60),o=[];return s>0&&o.push("".concat(s,"h")),(n>0||s>0)&&o.push("".concat(n,"m")),o.push("".concat(a%60,"s")),o.join(" ")},[e]),[a,n]=(0,s.useState)(t);return(0,s.useEffect)(()=>{if(!e)return void n(null);n(t());let a=setInterval(()=>{let e=t();n(e),null===e&&clearInterval(a)},1e3);return()=>clearInterval(a)},[e,t]),a}},20243:(e,t,a)=>{a.d(t,{E:()=>o});var s=a(95155),n=a(64269);function o(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-muted",t),...a})}},59285:(e,t,a)=>{a.d(t,{D:()=>i,F:()=>c});var s=a(53455),n=a(99776),o=a(80549),r=a(12466),l=a(18019);let i=e=>{let{orgSlug:t}=(0,l.I)();return(0,s.I)({queryKey:["company-coverage",t],queryFn:async()=>{let{data:e}=await r.Ay.get("/api/v1/org/".concat(t,"/me/company-coverage"));return e.data},enabled:!!t&&e,staleTime:6e4})},c=()=>{let{orgSlug:e}=(0,l.I)(),t=(0,n.jE)();return(0,o.n)({mutationFn:async t=>{let{data:a}=await r.Ay.post("/api/v1/org/".concat(e,"/me/company-coverage/redeem"),t);return a.data},onSuccess:()=>{t.invalidateQueries({queryKey:["company-coverage",e]}),t.invalidateQueries({queryKey:["my-memberships"]}),t.invalidateQueries({queryKey:["member-passes"]})}})}},71122:(e,t,a)=>{a.d(t,{g:()=>s});let s=!1},72400:(e,t,a)=>{a.d(t,{m:()=>c,z:()=>d});var s=a(95155),n=a(12115),o=a(75662),r=a(35299),l=a(5835);let i={enterBg:"var(--primary)",enterFg:"var(--warm-cream)",exitBorder:"var(--primary)",helperText:"var(--warm-taupe)",errorText:"#cc3b2b"};function c(e){var t;let{colors:a=i}=e,{data:n}=(0,l.rq)(),{data:o}=(0,l.M0)(),r=(0,l.IZ)();return(0,s.jsx)(d,{colors:a,presence:n,entry:o,isPending:r.isPending,isError:r.isError,pendingController:null==(t=r.variables)?void 0:t.controller,onOpen:(e,t,a)=>r.mutate({controller:e,direction:t},{onSuccess:a})})}function d(e){let{colors:t=i,presence:a,entry:c,isPending:d,isError:p,pendingController:u,onOpen:x}=e,{t:m}=(0,o.Bd)("common"),f=(null==a?void 0:a.state)==="in",[h,b]=(0,n.useState)(null);(0,n.useEffect)(()=>{b(null)},[null==a?void 0:a.state]);let y="enter"===(null!=h?h:f?"exit":"enter"),g=y?"in":"out",v=y?[{side:"left",controller:l.fq},{side:"right",controller:l.o_}]:[{side:"left",controller:l.o_},{side:"right",controller:l.fq}],j=y?m("app.access.verb_enter","Enter"):m("app.access.verb_exit","Exit"),_=y&&(null==c?void 0:c.allow)===!1,N=()=>(null==c?void 0:c.closed_today)?m("app.access.closed_today","The club is closed today."):(null==c?void 0:c.reason)==="outside_opening_hours"?c.opens_at&&c.closes_at?m("app.access.closed_now_hours","The club is closed — open {{from}}–{{to}}.",{from:c.opens_at,to:c.closes_at}):m("app.access.closed_now","The club is closed right now."):m("app.access.entry_unavailable","Entry isn't available right now. Check your membership or ask at reception."),w=m("app.access.open_failed","Couldn't open the door. Try again, or ask at reception."),E=a?y?m("app.access.not_in_club","Not in the club"):a.since&&f?m("app.access.in_club","In the club \xb7 {{duration}}",{duration:function(e){let t=Math.max(0,Math.floor((Date.now()-new Date(e).getTime())/6e4));if(t<60)return"".concat(t,"m");let a=Math.floor(t/60),s=t%60;return 0===s?"".concat(a,"h"):"".concat(a,"h ").concat(s,"m")}(a.since)}):m("app.access.in_club_plain","In the club"):null,k=p?w:_?N():[E,y?m("app.access.mode_enter","Entry buttons shown."):m("app.access.mode_exit","Exit buttons shown.")].filter(Boolean).join(". "),A=(0,n.useId)();return(0,s.jsxs)("div",{"data-slot":"door-access-buttons",className:"flex w-full flex-col gap-[10px]",children:[(0,s.jsx)("div",{"data-slot":"presence-status","data-presence":a?y?"out":"in":"unknown","data-action":y?"entering":"leaving","aria-hidden":"true",className:"flex min-h-[18px] items-center justify-center gap-[6px] font-[family-name:var
1(--font-body)] text-[13px] font-bold leading-[18px]",style:{color:t.helperText},children:E&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"size-[7px] shrink-0 rounded-full",style:y?{border:"1.5px solid ".concat(t.helperText),opacity:.8}:{backgroundColor:t.helperText}}),E]})}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-[10px]",children:v.map(e=>{let{side:a,controller:n}=e,o=d&&u===n;return(0,s.jsx)("button",{type:"button",disabled:d||_,"aria-label":y?"left"===a?m("app.access.enter_left","Enter — Left"):m("app.access.enter_right","Enter — Right"):"left"===a?m("app.access.exit_left","Exit — Left"):m("app.access.exit_right","Exit — Right"),"aria-describedby":_?A:void 0,onClick:()=>x(n,g,()=>b(null)),"data-direction":g,"data-side":a,className:"flex h-[72px] flex-col items-center justify-center gap-[1px] rounded-full px-[8px] font-[family-name:var(--font-body)] transition-opacity disabled:opacity-60",style:y?{backgroundColor:t.enterBg,color:t.enterFg}:{border:"1.5px solid ".concat(t.exitBorder),color:t.exitBorder},children:o?(0,s.jsx)(r.A,{className:"size-[24px] animate-spin"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[11px] font-medium uppercase leading-[14px] tracking-[0.1em] opacity-75",children:j}),(0,s.jsx)("span",{className:"text-[22px] font-semibold leading-[28px]",children:"left"===a?m("app.access.side_left","Left"):m("app.access.side_right","Right")})]})},a)})}),(0,s.jsx)("button",{type:"button",onClick:()=>b(y?"exit":"enter"),className:"text-center text-[13px] underline underline-offset-2 opacity-80 transition-opacity hover:opacity-100",style:{color:t.helperText},children:y?m("app.access.already_inside","Already inside?"):m("app.access.missed_entrance","Missed entrance?")}),(0,s.jsx)("p",{id:A,role:"status","aria-live":"polite",className:"sr-only",children:k}),_&&(0,s.jsx)("p",{"aria-hidden":"true","data-slot":"entry-blocked-reason",className:"text-center text-[13px]",style:{color:t.helperText},children:N()}),p&&(0,s.jsx)("p",{"aria-hidden":"true",className:"text-center text-[13px]",style:{color:t.errorText},children:w})]})}},86948:(e,t,a)=>{a.d(t,{BT:()=>i,Wu:()=>c,ZB:()=>l,Zp:()=>o,aR:()=>r});var s=a(95155);a(12115);var n=a(64269);function o(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card",className:(0,n.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...a})}function r(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,n.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function l(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,n.cn)("leading-none font-semibold",t),...a})}function i(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,n.cn)("text-sm text-muted-foreground",t),...a})}function c(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,n.cn)("px-6",t),...a})}},90093:(e,t,a)=>{a.d(t,{h:()=>p});var s=a(95155),n=a(75662),o=a(35299),r=a(70749),l=a(21873),i=a(32587),c=a(83712);function d(e){return e<1e3?"".concat(10*Math.round(e/10)," m"):"".concat((e/1e3).toFixed(+(e<1e4))," km")}function p(e){let t,a,{phase:p,distanceMeters:u,gymName:x,city:m,onRetry:f,variant:h="plain",colors:b}=e,{t:y}=(0,n.Bd)("common"),g="card"===h,v="loading"===p?o.A:"denied"===p?r.A:l.A;switch(p){case"loading":t=y("app.location.checkingTitle","Checking you're at the club…"),a=y("app.location.checkingBody","Just a moment while we confirm your location.");break;case"denied":t=y("app.location.deniedTitle","Turn on location access"),a="ios"===i.Ii.getPlatform()?y("app.location.deniedBodyIos","We check you're at the club before opening the door. Tap “Allow location” below — if nothing happens, open Settings › Privacy & Security › Location Services › The Club. and choose “While Using the App”, then try again."):"android"===i.Ii.getPlatform()?y("app.location.deniedBodyAndroid","We check you're at the club before opening the door. Tap “Allow location” below — if nothing happens, open Settings › Apps › The Club. › Permissions › Location and choose “Allow only while using the app”, then try again."):y("app.location.deniedBody","We check you're at the club before opening the door. Allow location for this site in your browser, then try again.");break;case"unavailable":t=y("app.location.unavailableTitle","We can't read your location"),a=y("app.location.unavailableBody","Your permission is fine, but your device couldn't get a position. Check that Location Services are on and you're not in airplane mode, then try again — stepping near a window or outside can help.");break;default:t=y("app.location.tooFarTitle","You're not at the club yet"),a=null!=u&&x?u>=2e3?y("app.location.tooFarBodyDistant","You appear to be about {{distance}} from {{gym}}. The door opens once you're at the club.",{distance:d(u),gym:x}):y("app.location.tooFarBodyNamed","You appear to be about {{distance}} from {{gym}}. Come closer to open the door.",{distance:d(u),gym:x}):y("app.location.tooFarBody","You appear to be too far from the club to open the door.")}let j="out_of_range"===p&&(null==u||u<2e3),_=g&&b?{color:b.text}:void 0,N=g&&b?{color:b.muted}:void 0,w=g&&b?{color:b.icon}:void 0,E=g?"mt-[2px] rounded-[8px] border border-current px-[14px] py-[8px] font-[family-name:var
1(--font-body)] text-[14px] font-semibold":"mt-1 rounded-md border border-border px-3 py-1.5 text-xs font-medium hover:bg-muted",k=g?"mt-[2px] font-[family-name:var(--font-body)] text-[13px] underline underline-offset-[3px] opacity-90":"mt-1 text-xs underline underline-offset-2 text-muted-foreground hover:text-foreground",A="denied"!==p;return(0,s.jsxs)("div",{"data-slot":"location-gate-notice","data-phase":p,className:g?"flex w-full flex-col items-center gap-[10px] rounded-[12px] border border-dashed px-[16px] py-[18px] text-center":"flex w-full flex-col items-center gap-2 rounded-xl border border-dashed border-border px-4 py-5 text-center",style:g&&b?{borderColor:b.border}:void 0,children:[(0,s.jsx)(v,{className:(g?"size-[24px]":"size-5")+("loading"===p?" animate-spin":""),style:w}),(0,s.jsx)("p",{className:g?"font-[family-name:var(--font-heading)] text-[18px] leading-[22px]":"text-sm font-medium text-foreground",style:_,children:t}),(0,s.jsx)("p",{className:g?"font-[family-name:var(--font-body)] text-[14px] leading-[18px]":"text-xs text-muted-foreground",style:_,children:a}),"loading"!==p&&(0,s.jsxs)(s.Fragment,{children:[j&&(0,s.jsx)("p",{className:g?"font-[family-name:var(--font-body)] text-[12px] leading-[16px]":"text-[11px] leading-4 text-muted-foreground",style:N,children:y("app.location.vpnHint","Using a VPN can change your detected location — turn it off if you're at the club.")}),m&&"out_of_range"===p&&(0,s.jsxs)("p",{className:g?"font-[family-name:var(--font-body)] text-[11px] leading-[15px] opacity-80":"text-[10px] leading-[14px] text-muted-foreground/80",style:N,children:[y("app.location.approxLabel","Detected location:")," ",m]}),"denied"===p&&(0,s.jsx)("button",{type:"button","data-slot":"location-gate-allow",onClick:()=>{(0,c.xe)().then(e=>{if("granted"===e)return void f();(0,c.vx)()||f()})},className:E,style:_,children:y("app.location.allow","Allow location")}),(0,s.jsx)("button",{type:"button",onClick:f,"data-slot":"location-gate-retry",className:A?E:k,style:A?_:N,children:y("app.location.retry","Try again")})]})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.