PageSourceSearch

https://www.better.at/_expo/static/js/web/coaching-c34717dd567ecf64b88e398c812109b3.js

js better.at collected 2026-09-24 13:29:58 UTC 53,636 bytes, 4 lines download raw bytes

1__d(function(g,r,i,_a,m,e,d){var t=r(d[0]).default,o=r(d[1]).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){const t=(0,r(d[12]).useRouter)(),{user:o,isGuest:c,capabilities:F}=(0,r(d[13]).useAuth)(),B=!!o&&!c,[v,z]=(0,n.useState)(!1),[D,A]=(0,n.useState)(!0),[W,H]=(0,n.useState)(!1);(0,n.useEffect)(()=>{!(async function(){if(!o?.id)return void A(!1);const t=await r(d[14]).coachStrategyService.getCoachProfileByUserId(o.id);z(!!t),A(!1)})()},[o?.id]);const{data:P=[],isLoading:M,error:E,refetch:V}=(0,r(d[15]).useUpcomingCoachSessions)(8),{data:q=[],isLoading:U,error:N,refetch:G}=(0,r(d[15]).useRecentCoachSessions)(6),{data:$=[],isLoading:K,error:Y,refetch:Q}=(0,r(d[15]).useCoachSpotlights)({minRating:4,availability:'next_30_days'}),{data:Z,isLoading:J}=(0,r(d[15]).useCoachMetrics)(),{data:X=[]}=(0,r(d[15]).useCoachResources)(),ee=M||U||K||J,te=E||N||Y,oe=P.length>0?P:p,ne=q.length>0?q:P.length>0?P:p,ie=$.length>0?$.map(t=>Object.assign({},t,{hourly_rate_usd:t.hourly_rate??null,rating:t.average_rating??null})):S,se=[...P,...q],re=(0,n.useMemo)(()=>(oe||[]).filter(t=>['scheduled','confirmed','pending'].includes((t.status||'').toLowerCase())).sort((t,o)=>R(t).getTime()-R(o).getTime()).slice(0,4),[oe]),ae=(0,n.useMemo)(()=>{const t=(ne||[]).filter(t=>'completed'===(t.status||'').toLowerCase());return 0===t.length?C:t.map(t=>({id:t.id,coach:t.coach?.display_name||'Coach',sailor:t.sailor?.full_name||t.sailor?.email||'Sailor',sessionType:I(t.session_type||''),summary:t.session_notes||'Feedback shared with sailor.',rating:t.feedback?.rating??5,date:(0,r(d[11]).format)(w(t),'MMM d')})).slice(0,2)},[ne]),le=(0,n.useMemo)(()=>{if(Z)return[{label:'Upcoming',value:`${Z.upcomingSessions||0}`,helper:'sessions'},{label:'Coaches',value:`${Z.activeClients||0}`,helper:'active'},{label:'Rating',value:Z.averageRating?Z.averageRating.toFixed(1):'\u2014',helper:'avg'},{label:'Sessions',value:`${Z.sessionsThisMonth||0}`,helper:'this month'}];if(!se||0===se.length)return _;const t=re.length,o=new Set(se.map(t=>t.coach?.id||t.coach_id).filter(Boolean)).size,n=se.reduce((t,o)=>t+(o.duration_minutes||0),0),s=se.filter(t=>t.feedback?.rating).map(t=>t.feedback?.rating||0),a=s.length>0?(s.reduce((t,o)=>t+o,0)/s.length).toFixed(1):'\u2014';return[{label:'Upcoming',value:`${t}`,helper:'sessions'},{label:'Coaches',value:`${Math.max(o,1)}`,helper:'active'},{label:'Rating',value:a,helper:'avg'},{label:'Hours',value:`${(n/60).toFixed(1)}`,helper:'this month'}]},[Z,se,re]);if(!B)return(0,r(d[16]).jsx)(j,{coaches:ie,loading:K,onSignUp:()=>t.push('/(auth)/signup'),onLogIn:()=>t.push('/(auth)/login'),onBecomeCoach:()=>t.push('/(auth)/coach-onboarding-welcome'),onCoachPress:o=>t.push(`/coach/${o}`)});if(D)return(0,r(d[16]).jsx)(b.default.View,{entering:(0,r(d[17]).fadeIn)(),exiting:(0,r(d[17]).fadeOut)(),style:L.loadingContainer,children:(0,r(d[16]).jsx)(s.default,{size:"large",color:r(d[18]).IOS_COLORS.blue})});if(v)return(0,r(d[16]).jsx)(r(d[19]).CoachDashboard,{});if(ee&&!W)return(0,r(d[16]).jsxs)(b.default.View,{entering:(0,r(d[17]).fadeIn)(),exiting:(0,r(d[17]).fadeOut)(),style:L.loadingContainer,children:[(0,r(d[16]).jsx)(s.default,{size:"large",color:r(d[18]).IOS_COLORS.blue}),(0,r(d[16]).jsx)(u.default,{style:L.loadingText,children:"Loading coaching workspace\u2026"})]});return(0,r(d[16]).jsx)(f.default,{style:L.container,children:(0,r(d[16]).jsxs)(l.default,{style:L.scrollView,contentContainerStyle:L.scrollContent,refreshControl:(0,r(d[16]).jsx)(a.default,{refreshing:W,onRefresh:async()=>{H(!0),await Promise.all([V(),G(),Q()]),H(!1)},tintColor:r(d[18]).IOS_COLORS.blue}),children:[(0,r(d[16]).jsxs)(f.default,{style:L.header,children:[(0,r(d[16]).jsx)(u.default,{style:L.headerTitle,children:"Coaching"}),(0,r(d[16]).jsx)(u.default,{style:L.headerSubtitle,children:"Book sessions with world-class coaches"})]}),te&&(0,r(d[16]).jsx)(f.default,{style:L.errorBanner,children:(0,r(d[16]).jsx)(u.default,{style:L.errorText,children:"Showing sample data while reconnecting\u2026"})}),(0,r(d[16]).jsx)(f.default,{style:L.metricsRow,children:le.map(t=>(0,r(d[16]).jsxs)(f.default,{style:L.metricItem,children:[(0,r(d[16]).jsx)(u.default,{style:L.metricValue,children:t.value}),(0,r(d[16]).jsx)(u.default,{style:L.metricLabel,children:t.label}),(0,r(d[16]).jsx)(u.default,{style:L.metricHelper,children:t.helper})]},t.label))}),(0,r(d[16]).jsx)(O,{title:"QUICK ACTIONS",action:"Manage",onActionPress:()=>t.push('/coach/my-bookings'),children:(0,r(d[16]).jsxs)(f.default,{style:L.quickActionsContainer,children:[(0,r(d[16]).jsxs)(h.default,{style:L.quickActionRow,onPress:()=>t.push('/coach/discover'),children:[(0,r(d[16]).jsxs)(f.default,{style:L.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"search-outline",size:18,color:r(d[18]).IOS_COLORS.secondaryLabel}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionLabel,children:"Discover coaches"})]}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(h.default,{style:L.quickActionRow,onPress:()=>t.push('/coach/my-bookings'),children:[(0,r(d[16]).jsxs)(f.default,{style:L.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"clipboard-outline",size:18,color:r(d[18]).IOS_COLORS.secondaryLabel}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionLabel,children:"Manage sessions"})]}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(h.default,{style:L.quickActionRow,onPress:()=>t.push('/coach/book'),children:[(0,r(d[16]).jsxs)(f.default,{style:L.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"cloud-upload-outline",size:18,color:r(d[18]).IOS_COLORS.secondaryLabel}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionLabel,children:"Upload race video"})]}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(h.default,{style:L.quickActionRow,onPress:()=>t.push('/coach/confirmation'),children:[(0,r(d[16]).jsxs)(f.default,{style:L.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"chatbubbles-outline",size:18,color:r(d[18]).IOS_COLORS.secondaryLabel}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionLabel,children:"Share feedback"})]}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(h.default,{style:[L.quickActionRow,L.quickActionRowLast],onPress:()=>t.push('/coach/profile-edit'),children:[(0,r(d[16]).jsxs)(f.default,{style:L.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"person-circle-outline",size:18,color:r(d[18]).IOS_COLORS.secondaryLabel}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionLabel,children:"Edit Profile"})]}),(0,r(d[16]).jsx)(u.default,{style:L.quickActionChevron,children:"\u203a"})]})]})}),(0,r(d[16]).jsx)(O,{title:"UPCOMING SESSIONS",action:"Calendar",onActionPress:()=>t.push('/coach/my-bookings'),children:(0,r(d[16]).jsxs)(f.default,{style:L.sessionsContainer,children:[re.map((o,n)=>(0,r(d[16]).jsx)(x,{session:o,onPress:()=>t.push('/coach/my-bookings'),isLast:n===re.length-1},o.id)),0===re.length&&(0,r(d[16]).jsx)(f.default,{style:L.emptyState,children:(0,r(d[16]).jsx)(u.default,{style:L.emptyText,children:"No upcoming sessions"})})]})}),(0,r(d[16]).jsx)(O,{title:"FEATURED COACHES",action:"See all",onActionPress:()=>
1t.push('/coach/discover-enhanced'),children:(0,r(d[16]).jsx)(f.default,{style:L.coachesContainer,children:ie.slice(0,4).map((o,n)=>(0,r(d[16]).jsx)(r(d[21]).TufteCoachRow,{name:o.display_name||'Coach',bio:o.bio,specialties:o.specialties,rating:o.average_rating,totalSessions:o.total_sessions,hourlyRate:o.hourly_rate,currency:o.currency,location:o.based_at||o.available_locations?.[0],onPress:()=>t.push(`/coach/${o.id}`),onContact:()=>t.push(`/coach/${o.id}?action=book`),isLast:n===Math.min(ie.length,4)-1},o.id))})}),(0,r(d[16]).jsx)(O,{title:"RECENT FEEDBACK",children:(0,r(d[16]).jsx)(f.default,{style:L.feedbackContainer,children:ae.map((t,o)=>(0,r(d[16]).jsx)(T,{feedback:t,isLast:o===ae.length-1},t.id))})}),(0,r(d[16]).jsx)(O,{title:"RESOURCES",action:"Library",onActionPress:()=>t.push('/coach/discover-enhanced'),children:(0,r(d[16]).jsx)(f.default,{style:L.resourcesContainer,children:(X.length>0?X:y).map((t,o,n)=>(0,r(d[16]).jsx)(k,{resource:t,isLast:o===n.length-1},t.id))})}),!F?.hasCoaching&&(0,r(d[16]).jsx)(O,{title:"BECOME A COACH",children:(0,r(d[16]).jsx)(f.default,{style:L.becomeCoachContainer,children:(0,r(d[16]).jsxs)(f.default,{style:L.becomeCoachContent,children:[(0,r(d[16]).jsx)(u.default,{style:L.becomeCoachTitle,children:"Share Your Expertise"}),(0,r(d[16]).jsx)(u.default,{style:L.becomeCoachDescription,children:"Turn your sailing knowledge into income. Coach sailors worldwide, set your own rates, and build your reputation on BetterAt."}),(0,r(d[16]).jsxs)(h.default,{style:L.becomeCoachButton,onPress:()=>t.push('/(auth)/coach-onboarding-welcome'),children:[(0,r(d[16]).jsx)(u.default,{style:L.becomeCoachButtonText,children:"Get Started"}),(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"arrow-forward",size:16,color:"#FFFFFF"})]})]})})}),(0,r(d[16]).jsx)(f.default,{style:{height:100}})]})})};var n=o(r(d[2])),s=t(r(d[3])),a=t(r(d[4])),l=t(r(d[5])),c=t(r(d[6])),u=t(r(d[7])),h=t(r(d[8])),f=t(r(d[9])),b=t(r(d[10]));const p=[{id:'mock-session-1',coach_id:'coach_emily',sailor_id:'sailor_ava',session_type:'strategy',duration_minutes:75,scheduled_at:new Date(Date.now()+936e5).toISOString(),status:'confirmed',location_notes:'Royal HKYC \u2022 Dock C',focus_areas:['start_line','wind_shifts','mark_rounding'],goals:'Build pre-start routine for oscillating breeze',currency:'USD',paid:!0,fee_amount:22e3,created_at:(new Date).toISOString(),updated_at:(new Date).toISOString(),coach:{id:'coach_emily',display_name:'Emily Carter',profile_photo_url:null}},{id:'mock-session-2',coach_id:'coach_luke',sailor_id:'sailor_mateo',session_type:'video_review',duration_minutes:60,scheduled_at:new Date(Date.now()+1944e5).toISOString(),status:'scheduled',location_notes:'Zoom',focus_areas:['downwind_modes','overtaking'],homework:'Pull mark rounding clips',currency:'USD',paid:!1,created_at:(new Date).toISOString(),updated_at:(new Date).toISOString(),coach:{id:'coach_luke',display_name:'Luke Anders',profile_photo_url:null}},{id:'mock-session-3',coach_id:'coach_sophia',sailor_id:'sailor_hannah',session_type:'boat_setup',duration_minutes:90,scheduled_at:new Date(Date.now()+18e6).toISOString(),status:'pending',location_notes:'Dockside tuning',focus_areas:['rig_tension','mast_rake'],goals:'Baseline rig tune for 18-22kt',currency:'USD',paid:!0,created_at:(new Date).toISOString(),updated_at:(new Date).toISOString(),coach:{id:'coach_sophia',display_name:'Sophia Lin',profile_photo_url:null}}],S=[{id:'coach_emily',user_id:'user_emily',display_name:'Emily Carter',profile_photo_url:null,bio:'Olympic strategist \xb7 Match racing specialist',specialties:['pre-starts','match_racing','race_strategy'],experience_years:12,certifications:['World Sailing L3 Coach'],available_for_sessions:!0,hourly_rate:24e3,currency:'USD',based_at:'Hong Kong',available_locations:['Asia Pacific'],total_sessions:318,total_clients:64,average_rating:4.9,verified:!0,created_at:(new Date).toISOString(),updated_at:(new Date).toISOString(),hourly_rate_usd:24e3,rating:4.9},{id:'coach_luke',user_id:'user_luke',display_name:'Luke Anders',profile_photo_url:null,bio:'AC40 flight controller \xb7 Downwind VMG specialist',specialties:['downwind_modes','foiling','video_analysis'],experience_years:8,certifications:['US Sailing L2 Coach'],available_for_sessions:!0,hourly_rate:2e4,currency:'USD',based_at:'San Francisco',available_locations:['Remote','San Francisco'],total_sessions:204,total_clients:51,average_rating:4.8,verified:!0,created_at:(new Date).toISOString(),updated_at:(new Date).toISOString(),hourly_rate_usd:2e4,rating:4.8},{id:'coach_sophia',user_id:'user_sophia',display_name:'Sophia Lin',profile_photo_url:null,bio:'Former Volvo Ocean Race \xb7 Rig tuning expert',specialties:['boat_speed','rig_tune','
1sail_shape'],experience_years:15,certifications:['RYA High Performance'],available_for_sessions:!0,hourly_rate:22e3,currency:'USD',based_at:'Hong Kong',available_locations:['Hong Kong','Singapore'],total_sessions:412,total_clients:83,average_rating:5,verified:!0,created_at:(new Date).toISOString(),updated_at:(new Date).toISOString(),hourly_rate_usd:22e3,rating:5}],C=[{id:'feedback-1',coach:'Emily Carter',sailor:'Ava Thompson',sessionType:'Race Strategy',summary:'Shift recognition routine locked in during practice.',rating:5,date:(0,r(d[11]).format)(new Date(Date.now()-2592e5),'MMM d')},{id:'feedback-2',coach:'Luke Anders',sailor:'Mateo Ruiz',sessionType:'Video Review',summary:'Downwind mode selection breakthrough.',rating:4,date:(0,r(d[11]).format)(new Date(Date.now()-5184e5),'MMM d')}],y=[{id:'resource-1',title:'Five drills to teach start line time-on-distance intuition',category:'Training Plans',readTime:'7 min'},{id:'resource-2',title:'Using polar overlays to accelerate heavy-air coaching blocks',category:'Analytics',readTime:'5 min'}],_=[{label:'Upcoming',value:'3',helper:'sessions'},{label:'Coaches',value:'6',helper:'active'},{label:'Rating',value:'4.8',helper:'avg'},{label:'Hours',value:'11.5',helper:'this month'}];function O({title:t,action:o,onActionPress:n,children:s}){return(0,r(d[16]).jsxs)(f.default,{style:L.section,children:[(0,r(d[16]).jsxs)(f.default,{style:L.sectionHeader,children:[(0,r(d[16]).jsx)(u.default,{style:L.sectionTitle,children:t}),o&&n&&(0,r(d[16]).jsx)(h.default,{onPress:n,hitSlop:{top:8,bottom:8,left:8,right:8},children:(0,r(d[16]).jsx)(u.default,{style:L.sectionAction,children:o})})]}),s]})}function x({session:t,onPress:o,isLast:n}){const s=R(t),a=t.coach?.display_name||'Coach pending',l=I(t.session_type||''),c=t.location_notes||'',b='confirmed'===t.status?r(d[18]).IOS_COLORS.green:'pending'===t.status?r(d[18]).IOS_COLORS.orange:r(d[18]).IOS_COLORS.blue;return(0,r(d[16]).jsxs)(h.default,{style:[L.sessionRow,n&&L.sessionRowLast],onPress:o,activeOpacity:.6,children:[(0,r(d[16]).jsx)(f.default,{style:L.sessionLeft,children:(0,r(d[16]).jsxs)(f.default,{style:L.sessionDateBox,children:[(0,r(d[16]).jsx)(u.default,{style:L.sessionDateDay,children:(0,r(d[11]).format)(s,'d')}),(0,r(d[16]).jsx)(u.default,{style:L.sessionDateMonth,children:(0,r(d[11]).format)(s,'MMM')})]})}),(0,r(d[16]).jsxs)(f.default,{style:L.sessionContent,children:[(0,r(d[16]).jsxs)(f.default,{style:L.sessionTopRow,children:[(0,r(d[16]).jsx)(u.default,{style:L.sessionCoach,children:a}),(0,r(d[16]).jsx)(f.default,{style:[L.statusDot,{backgroundColor:b}]})]}),(0,r(d[16]).jsx)(u.default,{style:L.sessionType,children:l}),(0,r(d[16]).jsxs)(u.default,{style:L.sessionMeta,children:[(0,r(d[11]).format)(s,'h:mm a'),c?` \xb7 ${c}`:'']})]}),(0,r(d[16]).jsx)(u.default,{style:L.sessionChevron,children:"\u203a"})]})}function T({feedback:t,isLast:o}){return(0,r(d[16]).jsxs)(f.default,{style:[L.feedbackRow,o&&L.feedbackRowLast],children:[(0,r(d[16]).jsxs)(f.default,{style:L.feedbackTop,children:[(0,r(d[16]).jsx)(u.default,{style:L.feedbackCoach,children:t.coach}),(0,r(d[16]).jsxs)(f.default,{style:L.feedbackRating,children:[(0,r(d[16]).jsxs)(u.default,{style:L.feedbackRatingText,children:["\u2605 ",t.rating.toFixed(1)]}),(0,r(d[16]).jsx)(u.default,{style:L.feedbackDate,children:t.date})]})]}),(0,r(d[16]).jsx)(u.default,{style:L.feedbackType,children:t.sessionType}),(0,r(d[16]).jsx)(u.default,{style:L.feedbackSummary,numberOfLines:2,children:t.summary})]})}function k({resource:t,isLast:o}){return(0,r(d[16]).jsxs)(h.default,{style:[L.resourceRow,o&&L.resourceRowLast],activeOpacity:.6,children:[(0,r(d[16]).jsxs)(f.default,{style:L.resourceContent,children:[(0,r(d[16]).jsx)(u.default,{style:L.resourceCategory,children:t.category}),(0,r(d[16]).jsx)(u.default,{style:L.resourceTitle,numberOfLines:2,children:t.title})]}),(0,r(d[16]).jsxs)(f.default,{style:L.resourceRight,children:[(0,r(d[16]).jsx)(u.default,{style:L.resourceTime,children:t.readTime}),(0,r(d[16]).jsx)(u.default,{style:L.resourceChevron,children:"\u203a"})]})]})}function j({coaches:t,loading:o,onSignUp:n,onLogIn:a,onBecomeCoach:c,onCoachPress:b}){const p=[{icon:'videocam-outline',text:'Video analysis & race debriefs'},{icon:'boat-outline',text:'On-water & remote sessions'},{icon:'shield-checkmark-outline',text:'Secure payments & scheduling'},{icon:'star-outline',text:'Verified coach reviews'}
1];return(0,r(d[16]).jsx)(f.default,{style:L.container,children:(0,r(d[16]).jsxs)(l.default,{style:L.scrollView,contentContainerStyle:L.guestScrollContent,children:[(0,r(d[16]).jsxs)(f.default,{style:L.guestHero,children:[(0,r(d[16]).jsx)(f.default,{style:L.guestHeroIcon,children:(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"school",size:48,color:r(d[18]).IOS_COLORS.blue})}),(0,r(d[16]).jsx)(u.default,{style:L.guestHeroTitle,children:"Find Your Perfect Coach"}),(0,r(d[16]).jsx)(u.default,{style:L.guestHeroSubtitle,children:"Connect with Olympic coaches, match racing pros, and foiling experts for personalized training sessions."})]}),(0,r(d[16]).jsx)(O,{title:"FEATURED COACHES",children:(0,r(d[16]).jsx)(f.default,{style:L.coachesContainer,children:o?(0,r(d[16]).jsxs)(f.default,{style:L.guestLoadingCoaches,children:[(0,r(d[16]).jsx)(s.default,{size:"small",color:r(d[18]).IOS_COLORS.blue}),(0,r(d[16]).jsx)(u.default,{style:L.guestLoadingText,children:"Loading coaches..."})]}):t.slice(0,3).map((o,n)=>(0,r(d[16]).jsxs)(h.default,{style:[L.guestCoachRow,n===Math.min(t.length,3)-1&&L.guestCoachRowLast],onPress:()=>b(o.id),activeOpacity:.6,children:[(0,r(d[16]).jsx)(f.default,{style:L.guestCoachAvatar,children:(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"person",size:24,color:r(d[18]).IOS_COLORS.secondaryLabel})}),(0,r(d[16]).jsxs)(f.default,{style:L.guestCoachInfo,children:[(0,r(d[16]).jsxs)(f.default,{style:L.guestCoachNameRow,children:[(0,r(d[16]).jsx)(u.default,{style:L.guestCoachName,children:o.display_name}),o.average_rating&&(0,r(d[16]).jsxs)(u.default,{style:L.guestCoachRating,children:["\u2605 ",o.average_rating.toFixed(1)]})]}),(0,r(d[16]).jsx)(u.default,{style:L.guestCoachBio,numberOfLines:1,children:o.bio}),(0,r(d[16]).jsxs)(u.default,{style:L.guestCoachMeta,children:[o.based_at," \xb7 ",o.total_sessions||0," sessions"]})]}),(0,r(d[16]).jsx)(u.default,{style:L.guestCoachChevron,children:"\u203a"})]},o.id))})}),(0,r(d[16]).jsx)(O,{title:"WHY REGATTAFLOW COACHING",children:(0,r(d[16]).jsx)(f.default,{style:L.guestBenefitsContainer,children:p.map((t,o)=>(0,r(d[16]).jsxs)(f.default,{style:[L.guestBenefitRow,o===p.length-1&&L.guestBenefitRowLast],children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:t.icon,size:20,color:r(d[18]).IOS_COLORS.blue}),(0,r(d[16]).jsx)(u.default,{style:L.guestBenefitText,children:t.text})]},t.text))})}),(0,r(d[16]).jsxs)(f.default,{style:L.guestCTAContainer,children:[(0,r(d[16]).jsx)(h.default,{style:L.guestPrimaryButton,onPress:n,children:(0,r(d[16]).jsx)(u.default,{style:L.guestPrimaryButtonText,children:"Sign Up to Get Started"})}),(0,r(d[16]).jsx)(h.default,{style:L.guestSecondaryButton,onPress:a,children:(0,r(d[16]).jsx)(u.default,{style:L.guestSecondaryButtonText,children:"Already have an account? Log In"})})]}),(0,r(d[16]).jsx)(f.default,{style:L.guestBecomeCoachSection,children:(0,r(d[16]).jsxs)(f.default,{style:L.guestBecomeCoachContent,children:[(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"trophy-outline",size:28,color:r(d[18]).IOS_COLORS.blue,style:{marginBottom:12}}),(0,r(d[16]).jsx)(u.default,{style:L.guestBecomeCoachTitle,children:"Are you a coach?"}),(0,r(d[16]).jsx)(u.default,{style:L.guestBecomeCoachDescription,children:"Share your expertise and earn money coaching sailors worldwide on BetterAt."}),(0,r(d[16]).jsxs)(h.default,{style:L.guestBecomeCoachButton,onPress:c,children:[(0,r(d[16]).jsx)(u.default,{style:L.guestBecomeCoachButtonText,children:"Become a Coach"}),(0,r(d[16]).jsx)(r(d[20]).Ionicons,{name:"arrow-forward",size:16,color:r(d[18]).IOS_COLORS.blue})]})]})}),(0,r(d[16]).jsx)(f.default,{style:{height:100}})]})})}const L=c.default.create({container:{flex:1,backgroundColor:r(d[18]).TUFTE_BACKGROUND},scrollView:{flex:1},scrollContent:{paddingBottom:40},loadingContainer:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:r(d[18]).TUFTE_BACKGROUND},loadingText:{marginTop:12,fontSize:14,color:r(d[18]).IOS_COLORS.secondaryLabel},header:{paddingTop:16,paddingBottom:20,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,backgroundColor:'#FFFFFF',borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.color},headerTitle:{fontSize:28,fontWeight:'700',color:r(d[18]).IOS_COLORS.label,marginBottom:4},headerSubtitle:{fontSize:15,color:r(d[18]).IOS_COLORS.secondaryLabel},errorBanner:{paddingVertical:8,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,backgroundColor:'#FEF3C7',borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:'#FDE68A'},errorText:{fontSize:13,color:'#92400E'},metricsRow:{flexDirection:'row',paddingVertical:16,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,backgroundColor:'#FFFFFF',borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.color},metricItem:{flex:1,alignItems:'center'},metricValue:{fontSize:24,fontWeight:'600',color:r(d[18]).IOS_COLORS.label},metricLabel:{fontSize:12,fontWeight:'500',color:r(d[18]).IOS_COLORS.secondaryLabel,marginTop:2}
1,metricHelper:{fontSize:10,color:r(d[18]).IOS_COLORS.tertiaryLabel,marginTop:1},section:{marginTop:24},sectionHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'baseline',paddingBottom:8,paddingHorizontal:r(d[22]).TufteTokens.spacing.section},sectionTitle:{fontSize:11,fontWeight:'600',color:r(d[18]).IOS_COLORS.secondaryLabel,textTransform:'uppercase',letterSpacing:1.2},sectionAction:{fontSize:13,fontWeight:'500',color:r(d[18]).IOS_COLORS.blue},quickActionsContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},quickActionRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingVertical:12,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.colorSubtle,minHeight:44},quickActionRowLast:{borderBottomWidth:0},quickActionLeft:{flexDirection:'row',alignItems:'center',gap:12},quickActionLabel:{fontSize:15,color:r(d[18]).IOS_COLORS.label},quickActionChevron:{fontSize:18,color:r(d[18]).IOS_COLORS.gray3},sessionsContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},sessionRow:{flexDirection:'row',alignItems:'center',paddingVertical:12,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.colorSubtle,minHeight:72},sessionRowLast:{borderBottomWidth:0},sessionLeft:{marginRight:12},sessionDateBox:{width:40,alignItems:'center'},sessionDateDay:{fontSize:20,fontWeight:'600',color:r(d[18]).IOS_COLORS.label},sessionDateMonth:{fontSize:11,fontWeight:'500',color:r(d[18]).IOS_COLORS.secondaryLabel,textTransform:'uppercase'},sessionContent:{flex:1,gap:2},sessionTopRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'},sessionCoach:{fontSize:15,fontWeight:'500',color:r(d[18]).IOS_COLORS.label},statusDot:{width:6,height:6,borderRadius:3},sessionType:{fontSize:13,color:r(d[18]).IOS_COLORS.blue},sessionMeta:{fontSize:12,color:r(d[18]).IOS_COLORS.tertiaryLabel},sessionChevron:{fontSize:18,color:r(d[18]).IOS_COLORS.gray3,marginLeft:8},coachesContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},feedbackContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},feedbackRow:{paddingVertical:12,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.colorSubtle},feedbackRowLast:{borderBottomWidth:0},feedbackTop:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginBottom:4},feedbackCoach:{fontSize:14,fontWeight:'500',color:r(d[18]).IOS_COLORS.label},feedbackRating:{flexDirection:'row',alignItems:'center',gap:8},feedbackRatingText:{fontSize:12,fontWeight:'500',color:'#F59E0B'},feedbackDate:{fontSize:11,color:r(d[18]).IOS_COLORS.tertiaryLabel},feedbackType:{fontSize:11,fontWeight:'600',color:r(d[18]).IOS_COLORS.blue,textTransform:'uppercase',letterSpacing:.5,marginBottom:4},feedbackSummary:{fontSize:13,color:r(d[18]).IOS_COLORS.secondaryLabel,lineHeight:18},resourcesContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},resourceRow:{flexDirection:'row',alignItems:'center',paddingVertical:12,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.colorSubtle,minHeight:56},resourceRowLast:{borderBottomWidth:0},resourceContent:{flex:1,gap:2},resourceCategory:{fontSize:11,fontWeight:'600',color:r(d[18]).IOS_COLORS.blue,textTransform:'uppercase',letterSpacing:.5},resourceTitle:{fontSize:14,color:r(d[18]).IOS_COLORS.label,lineHeight:18},resourceRight:{flexDirection:'row',alignItems:'center',gap:8,marginLeft:12},resourceTime:{fontSize:12,color:r(d[18]).IOS_COLORS.tertiaryLabel},resourceChevron:{fontSize:18,color:r(d[18]).IOS_COLORS.gray3},emptyState:{paddingVertical:24,alignItems:'center'},emptyText:{fontSize:14,color:r(d[18]).IOS_COLORS.tertiaryLabel},guestScrollContent:{paddingBottom:40},guestHero:{alignItems:'center',paddingTop:40,paddingBottom:32,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,backgroundColor:'#FFFFFF',borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.color},guestHeroIcon:{width:80,height:80,borderRadius:40,backgroundColor:'#EBF5FF',justifyContent:'center',alignItems:'center',marginBottom:20},guestHeroTitle:{fontSize:26,fontWeight:'700',color:r(d[18]).IOS_COLORS.label,textAlign:'center',marginBottom:12},guestHeroSubtitle:{fontSize:16,color:r(d[18]).IOS_COLORS.secondaryLabel,textAlign:'center',lineHeight:22,maxWidth:320},guestLoadingCoaches:{flexDirection:'row',alignItems:'center',justifyContent:'center',paddingVertical:24,gap:8},guestLoadingText:{fontSize:14,color:r(d[18]).IOS_COLORS.secondaryLabel},guestCoachRow:{flexDirection:'row',alignItems:'center',paddingVertical:14,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.colorSubtle},guestCoachRowLast:{borderBottomWidth:0},guestCoachAvatar:{width:48,height:48,borderRadius:24,backgroundColor:'#F3F4F6',justifyContent:'center',alignItems:'center',marginRight:12},guestCoachInfo:{flex:1,gap:2},guestCoachNameRow:{flexDirection:'row',alignItems:'center',gap:8},guestCoachName:{fontSize:16,fontWeight:'600',color:r(d[18]).IOS_COLORS.label},guestCoachRating:{fontSize:13,fontWeight:'500',color:'#F59E0B'},guestCoachBio:{fontSize:14,color:r(d[18]).IOS_COLORS.secondaryLabel},guestCoachMeta:{fontSize:12,color:r(d[18]).IOS_COLORS.tertiaryLabel},guestCoachChevron:{fontSize:20,color:r(d[18]).IOS_COLORS.gray3,marginLeft:8},guestBenefitsContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},guestBenefitRow:{flexDirection:'row',alignItems:'center',paddingVertical:14,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomColor:r(d[22]).TufteTokens.borders.colorSubtle,gap:12},guestBenefitRowLast:{borderBottomWidth:0},guestBenefitText:{fontSize:15,color:r(d[18]).IOS_COLORS.label},guestCTAContainer:{paddingVertical:32,paddingHorizontal:r(d[22]).TufteTokens.spacing.section,gap:12},guestPrimaryButton:{backgroundColor:r(d[18]).IOS_COLORS.blue,paddingVertical:16,borderRadius:12,alignItems:'center'},guestPrimaryButtonText:{fontSize:17,fontWeight:'600',color:'#FFFFFF'},guestSecondaryButton:{paddingVertical:12,alignItems:'center'},guestSecondaryButtonText:{fontSize:15,color:r(d[18]).IOS_COLORS.blue},guestBecomeCoachSection:{marginHorizontal:r(d[22]).TufteTokens.spacing.section,backgroundColor:'#F8FAFC',borderRadius:12,borderWidth:1,borderColor:r(d[22]).TufteTokens.borders.color,overflow:'hidden'},guestBecomeCoachContent:{alignItems:'center',paddingVertical:24,paddingHorizontal:20},guestBecomeCoachTitle:{fontSize:18,fontWeight:'600',color:r(d[18]).IOS_COLORS.label,marginBottom:8},guestBecomeCoachDescription:{fontSize:14,color:r(d[18]).IOS_COLORS.secondaryLabel,textAlign:'center',lineHeight:20,marginBottom:16},guestBecomeCoachButton:{flexDirection:'row',alignItems:'center',gap:6,paddingVertical:10,paddingHorizontal:20,backgroundColor:'#FFFFFF',borderRadius:20,borderWidth:1,borderColor:r(d[18]).IOS_COLORS.blue},guestBecomeCoachButtonText:{fontSize:15,fontWeight:'600',color:r(d[18]).IOS_COLORS.blue},becomeCoachContainer:{backgroundColor:'#FFFFFF',borderTopWidth:r(d[22]).TufteTokens.borders.hairline,borderBottomWidth:r(d[22]).TufteTokens.borders.hairline,borderColor:r(d[22]).TufteTokens.borders.color},becomeCoachContent:{paddingVertical:20,paddingHorizontal:r(d[22]).TufteTokens.spacing.section},becomeCoachTitle:{fontSize:17,fontWeight:'600',color:r(d[18]).IOS_COLORS.label,marginBottom:8},becomeCoachDescription:{fontSize:14,color:r(d[18]).IOS_COLORS.secondaryLabel,lineHeight:20,marginBottom:16},becomeCoachButton:{flexDirection:'row',alignItems:'center',alignSelf:'flex-start',gap:6,paddingVertical:10,paddingHorizontal:20,backgroundColor:r(d[18]).IOS_COLORS.blue,borderRadius:20},becomeCoachButtonText:{fontSize:15,fontWeight:'600',color:'#FFFFFF'}}),R=t=>t.scheduled_at?new Date(t.scheduled_at):t.start_time?new Date(t.start_time):t.session_date?new Date(t.session_date):new Date,w=t=>t.completed_at?new Date(t.completed_at):t.updated_at?new Date(t.updated_at):R(t),I=t=>({on_water:'On-Water Training',video_review:'Video Review',strategy:'Race Strategy',boat_setup:'Boat Setup',fitness:'Fitness Coaching',mental_coaching:'Mental Coaching',one_on_one:'One-on-One',group:'Group Session',race_debrief:'Race Debrief'}[t]||t.replace(/_/g,' ').replace(/\b\w/g,t=>t.toUpperCase()))},1216,[2,4,7,722,108,109,29,164,724,22,281,1868,1681,1680,1865,1869,914,1821,1788,1866,1727,1867,1792]);
2__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.coachStrategyService=void 0;const t=(0,r(d[0]).createLogger)('CoachStrategyService');e.coachStrategyService=new class{async getSharedStrategies(s){try{t.info('Fetching shared strategies for coach:',s);const{data:c,error:o}=await r(d[1],"./supabase").supabase.from('sailor_race_preparation').select("\n          *,\n          sailor:sailor_profiles!sailor_id (\n            id,\n            user_id,\n            user:users!user_id (\n              email\n            )\n          ),\n          race:race_events!race_event_id (\n            id,\n            name,\n            start_date,\n            metadata\n          )\n        ").eq('coach_id',s).eq('shared_with_coach',!0).order('shared_at',{ascending:!1});if(o)throw t.error('Error fetching shared strategies:',o),o;const n=(c||[]).map(t=>({id:t.id,race_event_id:t.race_event_id,sailor_id:t.sailor_id,sailor_name:t.sailor?.user?.email?.split('@')[0]||'Sailor',sailor_email:t.sailor?.user?.email||'',race_name:t.race?.name||'Race',race_date:t.race?.start_date||'',venue_name:t.race?.metadata?.venue_name,rig_tuning_strategy:t.rig_tuning_strategy,prestart_strategy:t.prestart_strategy,start_strategy:t.start_strategy,upwind_strategy:t.upwind_strategy,windward_mark_strategy:t.windward_mark_strategy,downwind_strategy:t.downwind_strategy,leeward_mark_strategy:t.leeward_mark_strategy,finish_strategy:t.finish_strategy,shared_with_coach:t.shared_with_coach,coach_id:t.coach_id,shared_at:t.shared_at,coach_feedback:t.coach_feedback,coach_reviewed_at:t.coach_reviewed_at}));return t.info(`Found ${n.length} shared strategies`),n}catch(s){return t.error('Failed to fetch shared strategies:',s),[]}}async addCoachFeedback(s,c,o){try{const{error:n}=await r(d[1],"./supabase").supabase.from('sailor_race_preparation').update({coach_feedback:o,coach_reviewed_at:(new Date).toISOString()}).eq('id',s).eq('coach_id',c);if(n)throw t.error('Error adding coach feedback:',n),n;return t.info('Coach feedback added successfully'),!0}catch(s){return t.error('Failed to add coach feedback:',s),!1}}async markAsReviewed(s,c){try{const{error:o}=await r(d[1],"./supabase").supabase.from('sailor_race_preparation').update({coach_reviewed_at:(new Date).toISOString()}).eq('id',s).eq('coach_id',c);if(o)throw t.error('Error marking strategy as reviewed:',o),o;return t.info('Strategy marked as reviewed'),!0}catch(s){return t.error('Failed to mark strategy as reviewed:',s),!1}}async getCoachProfileByUserId(s){try{const{data:c,error:o}=await r(d[1],"./supabase").supabase.from('coach_profiles').select('*').eq('user_id',s).maybeSingle();return o?('PGRST116'!==o.code&&t.error('Error fetching coach profile:',o),null):c}catch(s){return t.error('Failed to fetch coach profile:',s),null}}}},1865,[1688,1682]);
3__d(function(g,r,i,a,m,e,d){var t=r(d[0]).default,o=r(d[1]).default;Object.defineProperty(e,"__esModule",{value:!0}),e.CoachDashboard=function(){const{user:t}=(0,r(d[11]).useAuth)(),o=(0,r(d[12]).useRouter)(),h=(0,r(d[13]).useUnreadMessageCount)(t?.id),[F,k]=(0,n.useState)(!0),[b,C]=(0,n.useState)(!1),[B,S]=(0,n.useState)(null),[I,z]=(0,n.useState)([]),[A,T]=(0,n.useState)(null);(0,n.useEffect)(()=>{v()},[t?.id]);const v=async()=>{if(t?.id)try{k(!0);const o=await r(d[14],"../../services/CoachStrategyService").coachStrategyService.getCoachProfileByUserId(t.id);if(S(o),o){const t=await r(d[14]).coachStrategyService.getSharedStrategies(o.id);z(t)}}catch(t){x.error('Error loading coach data:',t)}finally{k(!1)}else k(!1)},_=(0,n.useCallback)(async()=>{C(!0),await v(),C(!1)},[t?.id]),M=t=>{T(t)},D=()=>{T(null)},q=async t=>{const o=window?.prompt?.('Provide feedback on this pre-race strategy:',t.coach_feedback||'');if(null==o)return;if(!o.trim()||!B?.id)return;await r(d[14]).coachStrategyService.addCoachFeedback(t.id,B.id,o)?((0,r(d[15]).showAlert)('Success','Feedback saved successfully'),await v()):(0,r(d[15]).showAlert)('Error','Failed to save feedback')},R=async t=>{if(!B?.id)return;await r(d[14]).coachStrategyService.markAsReviewed(t.id,B.id)?((0,r(d[15]).showAlert)('Success','Strategy marked as reviewed'),await v()):(0,r(d[15]).showAlert)('Error','Failed to mark as reviewed')};if(F)return(0,r(d[16]).jsx)(l.default,{style:w.container,children:(0,r(d[16]).jsxs)(l.default,{style:w.loadingContainer,children:[(0,r(d[16]).jsx)(y.default,{size:"large",color:"#3B82F6"}),(0,r(d[16]).jsx)(s.default,{style:w.loadingText,children:"Loading coaching dashboard..."})]})});if(!B)return(0,r(d[16]).jsx)(l.default,{style:w.container,children:(0,r(d[16]).jsxs)(l.default,{style:w.emptyContainer,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"account-off",size:64,color:"#CBD5E1"}),(0,r(d[16]).jsx)(s.default,{style:w.emptyTitle,children:"Not a Coach"}),(0,r(d[16]).jsx)(s.default,{style:w.emptyText,children:"This account is not registered as a coach. Please contact support if you believe this is an error."})]})});if(A)return(0,r(d[16]).jsx)(p,{strategy:A,coachProfile:B,onBack:D,onAddFeedback:q,onMarkReviewed:R});return(0,r(d[16]).jsxs)(l.default,{style:w.container,children:[(0,r(d[16]).jsxs)(l.default,{style:w.header,children:[(0,r(d[16]).jsxs)(l.default,{children:[(0,r(d[16]).jsx)(s.default,{style:w.headerTitle,children:"Coaching Dashboard"}),(0,r(d[16]).jsxs)(s.default,{style:w.headerSubtitle,children:["Welcome back, ",B.display_name]})]}),(0,r(d[16]).jsxs)(l.default,{style:w.statsRow,children:[(0,r(d[16]).jsxs)(l.default,{style:w.statBadge,children:[(0,r(d[16]).jsx)(s.default,{style:w.statValue,children:I.length}),(0,r(d[16]).jsx)(s.default,{style:w.statLabel,children:"Shared"})]}),(0,r(d[16]).jsxs)(l.default,{style:w.statBadge,children:[(0,r(d[16]).jsx)(s.default,{style:w.statValue,children:I.filter(t=>!t.coach_reviewed_at).length}),(0,r(d[16]).jsx)(s.default,{style:w.statLabel,children:"New"})]})]})]}),(0,r(d[16]).jsxs)(l.default,{style:w.quickActionsContainer,children:[(0,r(d[16]).jsxs)(u.default,{style:w.quickActionRow,onPress:()=>o.push('/coach/messages'),children:[(0,r(d[16]).jsxs)(l.default,{style:w.quickActionLeft,children:[(0,r(d[16]).jsxs)(l.default,{children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"chatbubbles-outline",size:18,color:"#6366F1"}),h>0&&(0,r(d[16]).jsx)(l.default,{style:w.quickActionBadge,children:(0,r(d[16]).jsx)(s.default,{style:w.quickActionBadgeText,children:h>9?'9+':h})})]}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionLabel,children:h>0?`Messages (${h})`:'Messages'})]}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(u.default,{style:w.quickActionRow,onPress:()=>o.push('/coach/profile-edit'),children:[(0,r(d[16]).jsxs)(l.default,{style:w.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"person-circle-outline",size:18,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionLabel,children:"Edit Profile"})]}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(u.default,{style:w.quickActionRow,onPress:()=>o.push('/coach/my-bookings'),children:[(0,r(d[16]).jsxs)(l.default,{style:w.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"calendar-outline",size:18,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionLabel,children:"Manage Sessions"})]}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(u.default,{style:w.quickActionRow,onPress:()=>o.push('/coach/pricing'),children:[(0,r(d[16]).jsxs)(l.default,{style:w.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"pricetag-outline",size:18,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionLabel,children:"Manage Pricing"})]}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionChevron,children:"\u203a"})]}),(0,r(d[16]).jsxs)(u.default,{style:[w.quickActionRow,w.quickActionRowLast],onPress:()=>o.push('/coach/availability'),children:[(0,r(d[16]).jsxs)(l.default,{style:w.quickActionLeft,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"time-outline",size:18,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionLabel,children:"Manage Availability"})]}),(0,r(d[16]).jsx)(s.default,{style:w.quickActionChevron,children:"\u203a"})]})]}),(0,r(d[16]).jsx)(c.default,{style:w.scrollView,refreshControl:(0,r(d[16]).jsx)(f.default,{refreshing:b,onRefresh:_}),children:0===I.length?(0,r(d[16]).jsxs)(l.default,{style:w.emptyContainer,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"clipboard-text-off",size:64,color:"#CBD5E1"}),(0,r(d[16]).jsx)(s.default,{style:w.emptyTitle,children:"No Shared Strategies"}),(0,r(d[16]).jsx)(s.default,{style:w.emptyText,children:"When sailors share their pre-race strategies with you, they'll appear here."})]}):(0,r(d[16]).jsx)(l.default,{style:w.strategiesList,children:I.map(t=>(0,r(d[16]).jsx)(j,{strategy:t,onPress:()=>M(t)},t.id))})})]})};var n=o(r(d[2])),l=t(r(d[3])),s=t(r(d[4])),c=t(r(d[5])),u=t(r(d[6])),f=t(r(d[7])),h=t(r(d[8])),y=t(r(d[9]));const x=(0,r(d[10]).createLogger)('CoachDashboard');function j({strategy:t,onPress:o}){const n=!!t.coach_reviewed_at,c=!!t.coach_feedback,f=[t.start_strategy,t.upwind_strategy,t.downwind_strategy,t.windward_mark_strategy,t.leeward_mark_strategy].filter(
3Boolean).length;return(0,r(d[16]).jsxs)(u.default,{style:w.strategyCard,onPress:o,children:[(0,r(d[16]).jsxs)(l.default,{style:w.strategyHeader,children:[(0,r(d[16]).jsxs)(l.default,{style:w.strategyTitleRow,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"sail-boat",size:24,color:"#3B82F6"}),(0,r(d[16]).jsxs)(l.default,{style:w.strategyInfo,children:[(0,r(d[16]).jsx)(s.default,{style:w.strategyRace,children:t.race_name}),(0,r(d[16]).jsxs)(s.default,{style:w.strategySailor,children:["Sailor: ",t.sailor_name]})]})]}),!n&&(0,r(d[16]).jsx)(l.default,{style:w.newBadge,children:(0,r(d[16]).jsx)(s.default,{style:w.newBadgeText,children:"NEW"})})]}),(0,r(d[16]).jsxs)(l.default,{style:w.strategyMeta,children:[(0,r(d[16]).jsxs)(l.default,{style:w.metaItem,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"calendar",size:16,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.metaText,children:new Date(t.race_date).toLocaleDateString()})]}),t.venue_name&&(0,r(d[16]).jsxs)(l.default,{style:w.metaItem,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"map-marker",size:16,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.metaText,children:t.venue_name})]}),(0,r(d[16]).jsxs)(l.default,{style:w.metaItem,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"file-document",size:16,color:"#64748B"}),(0,r(d[16]).jsxs)(s.default,{style:w.metaText,children:[f," sections"]})]})]}),(0,r(d[16]).jsxs)(l.default,{style:w.strategyFooter,children:[(0,r(d[16]).jsxs)(l.default,{style:w.statusIndicators,children:[c&&(0,r(d[16]).jsxs)(l.default,{style:w.statusBadge,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"comment-check",size:14,color:"#10B981"}),(0,r(d[16]).jsx)(s.default,{style:w.statusText,children:"Feedback Added"})]}),n&&(0,r(d[16]).jsxs)(l.default,{style:w.statusBadge,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"check-circle",size:14,color:"#3B82F6"}),(0,r(d[16]).jsx)(s.default,{style:w.statusText,children:"Reviewed"})]})]}),(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"chevron-right",size:24,color:"#94A3B8"})]})]})}function p({strategy:t,coachProfile:o,onBack:n,onAddFeedback:f,onMarkReviewed:h}){const y=!!t.coach_reviewed_at,x=[{title:'Start Strategy',content:t.start_strategy,icon:'flag-checkered'},{title:'Upwind Strategy',content:t.upwind_strategy,icon:'arrow-up-bold'},{title:'Windward Mark',content:t.windward_mark_strategy,icon:'flag-triangle'},{title:'Downwind Strategy',content:t.downwind_strategy,icon:'arrow-down-bold'},{title:'Leeward Mark',content:t.leeward_mark_strategy,icon:'flag-variant'}].filter(t=>t.content);return(0,r(d[16]).jsxs)(l.default,{style:w.container,children:[(0,r(d[16]).jsxs)(l.default,{style:w.detailHeader,children:[(0,r(d[16]).jsx)(u.default,{onPress:n,style:w.backButton,children:(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"arrow-left",size:24,color:"#0F172A"})}),(0,r(d[16]).jsxs)(l.default,{style:w.detailHeaderInfo,children:[(0,r(d[16]).jsx)(s.default,{style:w.detailRaceName,children:t.race_name}),(0,r(d[16]).jsxs)(s.default,{style:w.detailSailorName,children:["by ",t.sailor_name]})]})]}),(0,r(d[16]).jsxs)(c.default,{style:w.detailScrollView,children:[(0,r(d[16]).jsxs)(l.default,{style:w.detailMeta,children:[(0,r(d[16]).jsxs)(l.default,{style:w.detailMetaItem,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"calendar",size:20,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.detailMetaText,children:new Date(t.race_date).toLocaleDateString('en-US',{weekday:'long',year:'numeric',month:'long',day:'numeric'})})]}),t.venue_name&&(0,r(d[16]).jsxs)(l.default,{style:w.detailMetaItem,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"map-marker",size:20,color:"#64748B"}),(0,r(d[16]).jsx)(s.default,{style:w.detailMetaText,children:t.venue_name})]}),(0,r(d[16]).jsxs)(l.default,{style:w.detailMetaItem,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"clock-outline",size:20,color:"#64748B"}),(0,r(d[16]).jsxs)(s.default,{style:w.detailMetaText,children:["Shared ",new Date(t.shared_at).toLocaleDateString()]})]})]}),x.map((t,o)=>(0,r(d[16]).jsxs)(l.default,{style:w.phaseCard,children:[(0,r(d[16]).jsxs)(l.default,{style:w.phaseHeader,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:t.icon,size:20,color:"#3B82F6"}),(0,r(d[16]).jsx)(s.default,{style:w.phaseTitle,children:t.title})]}),(0,r(d[16]).jsx)(s.default,{style:w.phaseContent,children:t.content})]},o)),t.coach_feedback&&(0,r(d[16]).jsxs)(l.default,{style:w.feedbackCard,children:[(0,r(d[16]).jsxs)(l.default,{style:w.feedbackHeader,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"comment-text",size:20,color:"#10B981"}),(0,r(d[16]).jsx)(s.default,{style:w.feedbackTitle,children:"Your Feedback"})]}),(0,r(d[16]).jsx)(s.default,{style:w.feedbackContent,children:t.coach_feedback}),t.coach_reviewed_at&&(0,r(d[16]).jsxs)(s.default,{style:w.feedbackTimestamp,children:["Added ",new Date(t.co
3ach_reviewed_at).toLocaleDateString()]})]}),(0,r(d[16]).jsxs)(l.default,{style:w.actionButtons,children:[(0,r(d[16]).jsxs)(u.default,{style:w.feedbackButton,onPress:()=>f(t),children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"comment-edit",size:20,color:"white"}),(0,r(d[16]).jsx)(s.default,{style:w.feedbackButtonText,children:t.coach_feedback?'Edit Feedback':'Add Feedback'})]}),!y&&(0,r(d[16]).jsxs)(u.default,{style:w.reviewedButton,onPress:()=>h(t),children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"check-circle",size:20,color:"white"}),(0,r(d[16]).jsx)(s.default,{style:w.reviewedButtonText,children:"Mark as Reviewed"})]}),y&&(0,r(d[16]).jsxs)(l.default,{style:w.reviewedIndicator,children:[(0,r(d[16]).jsx)(r(d[17]).MaterialCommunityIcons,{name:"check-circle",size:20,color:"#10B981"}),(0,r(d[16]).jsxs)(s.default,{style:w.reviewedIndicatorText,children:["Reviewed on ",new Date(t.coach_reviewed_at).toLocaleDateString()]})]})]})]})]})}const w=h.default.create({container:{flex:1,backgroundColor:'#F8FAFC'},loadingContainer:{flex:1,justifyContent:'center',alignItems:'center'},loadingText:{marginTop:16,fontSize:16,color:'#64748B'},header:{backgroundColor:'#FFFFFF',padding:20,borderBottomWidth:1,borderBottomColor:'#E2E8F0'},headerTitle:{fontSize:24,fontWeight:'700',color:'#0F172A'},headerSubtitle:{fontSize:14,color:'#64748B',marginTop:4},statsRow:{flexDirection:'row',gap:12,marginTop:16},statBadge:{backgroundColor:'#EFF6FF',paddingHorizontal:16,paddingVertical:8,borderRadius:8},statValue:{fontSize:20,fontWeight:'700',color:'#3B82F6'},statLabel:{fontSize:12,color:'#64748B',marginTop:2},quickActionsContainer:{backgroundColor:'#FFFFFF',marginTop:1,borderBottomWidth:1,borderBottomColor:'#E2E8F0'},quickActionRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingHorizontal:20,paddingVertical:14,borderBottomWidth:h.default.hairlineWidth,borderBottomColor:'#F1F5F9'},quickActionRowLast:{borderBottomWidth:0},quickActionLeft:{flexDirection:'row',alignItems:'center',gap:12},quickActionLabel:{fontSize:15,color:'#0F172A'},quickActionChevron:{fontSize:20,color:'#94A3B8',fontWeight:'300'},quickActionBadge:{position:'absolute',top:-5,right:-8,backgroundColor:'#EF4444',borderRadius:7,minWidth:14,height:14,paddingHorizontal:3,justifyContent:'center',alignItems:'center'},quickActionBadgeText:{color:'#FFFFFF',fontSize:9,fontWeight:'700'},scrollView:{flex:1},strategiesList:{padding:16},strategyCard:{backgroundColor:'#FFFFFF',borderRadius:12,padding:16,marginBottom:12,borderWidth:1,borderColor:'#E2E8F0'},strategyHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'flex-start',marginBottom:12},strategyTitleRow:{flexDirection:'row',alignItems:'flex-start',gap:12,flex:1},strategyInfo:{flex:1},strategyRace:{fontSize:16,fontWeight:'700',color:'#0F172A'},strategySailor:{fontSize:14,color:'#64748B',marginTop:2},newBadge:{backgroundColor:'#FEE2E2',paddingHorizontal:8,paddingVertical:4,borderRadius:4},newBadgeText:{fontSize:10,fontWeight:'700',color:'#DC2626'},strategyMeta:{flexDirection:'row',flexWrap:'wrap',gap:12,marginBottom:12},metaItem:{flexDirection:'row',alignItems:'center',gap:4},metaText:{fontSize:13,color:'#64748B'},strategyFooter:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',paddingTop:12,borderTopWidth:1,borderTopColor:'#F1F5F9'},statusIndicators:{flexDirection:'row',gap:8},statusBadge:{flexDirection:'row',alignItems:'center',gap:4},statusText:{fontSize:12,color:'#64748B'},emptyContainer:{flex:1,justifyContent:'center',alignItems:'center',paddingVertical:64},emptyTitle:{fontSize:20,fontWeight:'700',color:'#0F172A',marginTop:16},emptyText:{fontSize:14,color:'#64748B',textAlign:'center',marginTop:8,paddingHorizontal:32},detailHeader:{backgroundColor:'#FFFFFF',padding:16,borderBottomWidth:1,borderBottomColor:'#E2E8F0',flexDirection:'row',alignItems:'center',gap:12},backButton:{padding:8},detailHeaderInfo:{flex:1},detailRaceName:{fontSize:18,fontWeight:'700',color:'#0F172A'},detailSailorName:{fontSize:14,color:'#64748B',marginTop:2},detailScrollView:{flex:1},detailMeta:{backgroundColor:'#FFFFFF',padding:16,marginBottom:2},detailMetaItem:{flexDirection:'row',alignItems:'center',gap:8,marginBottom:8},detailMetaText:{fontSize:14,color:'#64748B'},phaseCard:{backgroundColor:'#FFFFFF',padding:16,marginBottom:2},phaseHeader:{flexDirection:'row',alignItems:'center',gap:8,marginBottom:12},phaseTitle:{fontSize:16,fontWeight:'700',color:'#0F172A'},phaseContent:{fontSize:14,color:'#475569',lineHeight:22},feedbackCard:{backgroundColor:'#F0FDF4',padding:16,marginTop:8,marginBottom:2},feedbackHeader:{flexDirection:'row',alignItems:'center',gap:8,marginBottom:12},feedbackTitle:{fontSize:16,fontWeight:'700',color:'#0F172A'},feedbackContent:{fontSize:14,color:'#475569',lineHeight:22},feedbackTimestamp:{fontSize:12,color:'#64748B',marginTop:8},actionButtons:{padding:16,gap:12},feedbackButton:{backgroundColor:'#3B82F6',flexDirection:'row',alignItems:'center',justifyContent:'center',gap:8,paddingVertical:14,paddingHorizontal:20,borderRadius:12},feedbackButtonText:{color:'#FFFFFF',fontSize:16,fontWeight:'600'},reviewedButton:{backgroundColor:'#10B981',flexDirection:'row',alignItems:'center',justifyContent:'center',gap:8,paddingVertical:14,paddingHorizontal:20,borderRadius:12},reviewedButtonText:{color:'#FFFFFF',fontSize:16,fontWeight:'600'},reviewedIndicator:{flexDirection:'row',alignItems:'center',justifyContent:'center',gap:8,paddingVertical:14,paddingHorizontal:20,backgroundColor:'#F0FDF4',borderRadius:12},reviewedIndicatorText:{fontSize:14,color:'#10B981',fontWeight:'600'}})},1866,[2,4,7,22,164,109,724,108,29,722,1688,1680,1681,1769,1865,1707,914,1727]);
4__d(function(g,r,i,a,m,_e,d){var t=r(d[0]).default;
4Object.defineProperty(_e,"__esModule",{value:!0}),_e.TufteCoachRow=l,_e.default=void 0;t(r(d[1]));var e=t(r(d[2])),o=t(r(d[3])),n=t(r(d[4]));function l({name:t,bio:l,specialties:c=[],rating:f,totalSessions:u,hourlyRate:h,currency:O="USD",location:x,onPress:y,onContact:S,isLast:b=!1}){const p=c.slice(0,2).map(t=>t.replace(/_/g,' ')).join(' \xb7 '),j=h?`$${Math.round(h/100)}/hr`:null,C=t.split(' ').map(t=>t[0]).join('').slice(0,2).toUpperCase();return(0,r(d[6]).jsxs)(n.default,{style:[s.row,b&&s.rowLast],onPress:y,disabled:!y,activeOpacity:y?.6:1,children:[(0,r(d[6]).jsx)(e.default,{style:s.avatar,children:(0,r(d[6]).jsx)(o.default,{style:s.avatarText,children:C})}),(0,r(d[6]).jsxs)(e.default,{style:s.content,children:[(0,r(d[6]).jsx)(o.default,{style:s.name,numberOfLines:1,children:t}),(0,r(d[6]).jsx)(o.default,{style:s.subtitle,numberOfLines:1,children:l||p||'Performance coach'}),(0,r(d[6]).jsxs)(e.default,{style:s.statsRow,children:[void 0!==f&&(0,r(d[6]).jsxs)(o.default,{style:s.rating,children:["\u2605 ",f.toFixed(1),void 0!==u&&(0,r(d[6]).jsxs)(o.default,{style:s.sessionCount,children:[" (",u,")"]})]}),j&&(0,r(d[6]).jsx)(o.default,{style:s.price,children:j}),x&&(0,r(d[6]).jsx)(o.default,{style:s.location,numberOfLines:1,children:x})]})]}),S&&(0,r(d[6]).jsx)(n.default,{style:s.contactButton,onPress:t=>{t.stopPropagation?.(),S()},children:(0,r(d[6]).jsx)(o.default,{style:s.contactText,children:"Contact"})})]})}const s=t(r(d[5])).default.create({row:{flexDirection:'row',alignItems:'center',paddingVertical:12,paddingHorizontal:16,backgroundColor:'#FFFFFF',borderBottomWidth:.5,borderBottomColor:'#E5E7EB',minHeight:72},rowLast:{borderBottomWidth:0},avatar:{width:36,height:36,borderRadius:18,backgroundColor:'#EFF6FF',alignItems:'center',justifyContent:'center',marginRight:12},avatarText:{fontSize:13,fontWeight:'600',color:'#007AFF'},content:{flex:1,gap:2},name:{fontSize:15,fontWeight:'500',color:r(d[7]).IOS_COLORS.label},subtitle:{fontSize:13,color:r(d[7]).IOS_COLORS.secondaryLabel},statsRow:{flexDirection:'row',alignItems:'center',gap:12,marginTop:2},rating:{fontSize:12,fontWeight:'500',color:'#F59E0B'},sessionCount:{color:r(d[7]).IOS_COLORS.tertiaryLabel,fontWeight:'400'},price:{fontSize:12,fontWeight:'600',color:r(d[7]).IOS_COLORS.blue},location:{fontSize:12,color:r(d[7]).IOS_COLORS.tertiaryLabel,flex:1},contactButton:{paddingHorizontal:12,paddingVertical:6},contactText:{fontSize:14,fontWeight:'500',color:r(d[7]).IOS_COLORS.blue}});_e.default=l},1867,[2,7,22,164,724,29,914,1788]);

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.