!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="53afa4c9-0cbb-4999-8e19-b1064a35dc62",e._sentryDebugIdIdentifier="sentry-dbid-53afa4c9-0cbb-4999-8e19-b1064a35dc62")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{85356:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return a(44961)}])},36393:function(e,t,a){"use strict";var n=a(52322),s=a(45847),o=a.n(s),r=a(64954),i=a(40808),l=a(86564),c=a(62911);let Wrapper=e=>{let{children:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Q,{}),(0,n.jsx)(o(),{id:"segment",dangerouslySetInnerHTML:{__html:(0,r.w)("9AXppxupYYlAb8xFD1CbnAVVRYmqJcR4")}}),t]})};t.Z=e=>{let{children:t,...a}=e;return(0,n.jsx)(Wrapper,{children:(0,n.jsx)(i.Z,{...a,children:(0,n.jsx)(c.T,{children:t})})})}},21655:function(e,t,a){"use strict";a.d(t,{B:function(){return DesktopQRModal}});var n=a(52322),s=a(13796),o=a(70783),r=a(91839),i=a(67066),l=a(28646);let DesktopQRModal=e=>{let{launchProgramID:t="3a3ee0d8-e817-4c06-8620-351a27da67f1",title:a="GET THE LADDER APP",description:c="Scan to download the Ladder iOS app!"}=e,{showQRModal:d,toggleShowQRModal:u}=(0,l.o)(),{deepLink:h}=(0,i.V)(t,"GET THE APP"),{shortUrl:p,error:m}=(0,r.o)(d&&h);return(0,n.jsx)(s.Vq,{open:d,onOpenChange:u,children:(0,n.jsxs)(s.cZ,{overlay:!0,className:" px-4 pt-5 pb-6 overflow-hidden text-left align-bottom transition-all transform border shadow-xl bg-dark-slanted-gradient rounded-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:pt-6 sm:px-12 sm:pb-12",children:[(0,n.jsx)("h1",{className:"py-6 mb-2 text-4xl tracking-wide text-center text-foreground uppercase 2xl:text-5xl font-display",children:a}),(0,n.jsx)("div",{className:"flex items-center justify-center p-6 mx-auto transition-transform duration-150 ease-in-out bg-white border border-black shadow-2xl rounded-3xl",style:{width:330,height:330},children:m?"Something went wrong. Please refresh and try again.":p?(0,n.jsx)(o.s,{size:280,logoSize:0,value:p}):"Loading..."}),(0,n.jsx)("div",{className:"pt-3 pb-3 space-x-2 text-xl font-bold text-center 2xl:text-2xl text-primary",children:c})]})})}},70783:function(e,t,a){"use strict";a.d(t,{s:function(){return QRCode}});var n=a(52322),s=a(38001);a(2784);let QRCode=e=>{let{value:t="QR Code",size:a}=e;return(0,n.jsx)(s.ZP,{value:t,size:a})}},91839:function(e,t,a){"use strict";a.d(t,{o:function(){return useShortDeeplink}});var n=a(2784),s=a(92086);let useShortDeeplink=e=>{let[t,a]=(0,n.useState)(),[o,r]=(0,n.useState)(!1),i=(0,s.dD)();return(0,n.useEffect)(()=>{!i&&e&&(t||fetch("/api/url-shortener",{method:"POST",body:JSON.stringify({url:e})}).then(e=>e.json()).then(e=>{let{key:t}=e;if(!t)throw Error("missing shortened url key");let n=new URL("/quiz/qr-deeplink/redirect",window.location.origin);n.searchParams.set("key",t),a(n.href),r(!1)}).catch(e=>{console.log({error:e}),r(!0)}))},[e,t,i]),{deepLink:e,shortUrl:t,error:o}}},67066:function(e,t,a){"use strict";a.d(t,{V:function(){return useHandleClickCTA}});var n=a(92086),s=a(28646),o=a(50283),r=a(24443);let useHandleClickCTA=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"SEE MORE WORKOUTS",a=(0,n.Ce)(),{toggleShowQRModal:i}=(0,s.o)(),l=new URL("https://ladder.page.link?ibi=com.ladder.bootcamp&isi=1502936453&ius=ladderteams"),c=new URL("https://joinladder.com".concat(e?"?launchProgramID=".concat(e):"")),d=(0,r.m2)(c,"_appdirect"),u=new URL(l);u.searchParams.set("link",d);let h=a?(0,r.m2)("https://offers.joinladder.com/survey","_homepagesurvey"):u;return{handleClickCta:()=>{var e;(0,o.e)({category:"workout",action:"workout_cta_clicked",label:t,value:a?"Show QR Modal":null==h?void 0:null===(e=h.toString)||void 0===e?void 0:e.call(h)}),a?i(!0):window.open(h,"_blank")},deepLink:u,href:h}}},44961:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Home}});var n=a(52322),s=a(5632),o=a(2784),r=a(62202),i=a(66404),l=a(31955),c=a(2679),d=a(40385),u=a(17912),h=a(39559),p=a(752),m=a(13796),f=a(42485),g=a(17459),x=a(54150),w=a(43985),y=a(82457);let b=o.memo(()=>{let e=(0,p.Dv)(y.BC),{notifications:t}=(0,h.s)(),{messages:a,isLoading:s}=(0,y.Qc)(),[r,i]=(0,o.useState)(!1),l=(0,g.aS)();return(0,o.useEffect)(()=>{l&&i(!1);let e=setTimeout(()=>i(!0),2500);return()=>clearTimeout(e)},[l]),(0,n.jsx)(f.pn,{children:(0,n.jsxs)(f.u,{open:r,onOpenChange:i,children:[(0,n.jsx)(f.aJ,{asChild:!0,children:(0,n.jsx)(m.hg,{asChild:!0,children:(0,n.jsx)("div",{className:"fixed z-50 bottom-4 right-4",children:(0,n.jsxs)(d.E.button,{initial:{y:50,x:-50,opacity:0},animate:{y:0,x:0,opacity:1},transition:{delay:2.5},className:"group flex items-center justify-center relative rounded-full bg-neutral-600 text-3xl p-3 w-16 h-16 shadow-button",children:[t?(0,n.jsx)("span",{className:"text-black bg-primary p-1 w-5 h-5 center text-sm rounded-full absolute top-0 left-0",children:t}):null,(0,n.jsx)("span",{className:(0,u.cn)("block transition-all scale-100 group-hover:scale-125 group-hover:wave",{wave:t||r}),children:"\uD83D\uDC4B"})]})})})}),(0,n.jsx)(f._v,{children:(0,n.jsx)("p",{children:s||e?(0,n.jsx)(w.c,{}):t&&a.length?"".concat(t," new ").concat((0,x._6)(t,"message")):"Hi! How can I help you?"})})]})})});var k=a(50283),j=a(97324);let v={role:"assistant",content:"Hi! Before we begin, are you new to Ladder?",id:"initialMessage"},_={initial:[{user:"Yes, I'm new to Ladder.",assistant:"Welcome! How can we help?",newUser:!0},{user:"No, I have the app and an account with Ladder.",assistant:"That's great! How can we help?",newUser:!1}],newUser:[{user:"How is Ladder different from other fitness apps?",assistant:"Ladder is built for strength training and specifically for busy people who are already motivated to workout. This isn't just a library of random workout content. Ladder gives you a complete workout plan to help you maximize your workouts and achieve real results.\n\nWith Ladder you'll know exactly what workout to do, with a daily workout plan that's programmed by an expert coach and new each week.\n\n✅ Results in less time\n✅ New workouts every week\n✅ A training plan that's always with you\n✅ Real coaching\n\nThe Ladder app is specifically built for progressive strength training, with in-ear coaching, video demonstrations, and precise pacing. It seamlessly integrates with Spotify and Apple Music, so you can use your own playlists during workouts."},{user:"Do I need to give a credit card to start a trial?",assistant:"Nope! Ladder offers a 7 day, completely free trial to find your plan and try as many workouts as you would like on your schedule. Ladder will not ask for a credit card to start a trial. No payment info is collected until AFTER the free trial ends."},{user:"How do I find the right team/fitness plan?",assistant:"To find the right team/fitness plan, we recommend taking the [team quiz](https://www.joinladder.com/quiz?utm_medium=organic&utm_source=website&utm_campaign=homepage&utm_term=cs_chatbot). This quiz will connect you with the best coach/team based on your goals and preferences."}],existingUser:[{user:"When are new workouts published?",assistant:"New workouts are published every week to keep things fresh and challenging. You can expect to see new workouts dropped **every Sunday at 10 PM Eastern time.**"},{user:"Can I track reps and weights in the app?",assistant:"Yes! We have developed Ladder Journal to help track results so you can actually measure your results and remember what you did last time to level-up."},{user:"How do I connect my Apple Watch?",assistant:"Great question! To ensure your Apple Watch is paired correctly, please follow these instructions [here](https://www.notion.so/bengammon1/Ladder-x-Apple-Watch-Syncing-56194f8f489d473e85be9bc0c7a8696b)."},{user:"How do I change teams?",assistant:'To change teams, follow these steps:\n1. Open the Ladder app and click on the "Teams" tab in the navigation bar.\n2. Browse through the available teams and use the filters to narrow down your choices based on your preferences.\n3. Click on a team card to learn more about it, including the coach, welcome workout, training style, equipment, workout length, skill level, and core movements explained.\n4. Once you\'ve found a team you like, click "Try Team" to switch to that team.\nIf you need any help, our Member Success Team will also be available to assist you in finding your perfect program!'}]},C="USER_BLOCKED_BY_ARNIE";var ai_chat_bot=()=>{let e=(0,o.useRef)(!1),[t,a]=(0,o.useState)(0),[s,r]=(0,o.useState)(null),[d,u]=(0,o.useState)(()=>!!l.Z.get(C)),[h,p]=(0,o.useState)(null);(0,o.useEffect)(()=>{u(!!l.Z.get(C))},[]);let m=(0,i.RJ)({api:"/api/arnie",headers:{"Content-Type":"application/json"},initialMessages:[v],body:{toolFilter:["reportAndBlock","searchKnowledgeBase"]},maxToolRoundtrips:2,async onToolCall(e){let{toolCall:t}=e,a=(0,j.R)(t.toolName,"env"),n=(0,j.R)(t.toolName,"toolInUseText");if(n&&"string"==typeof n&&p(n),"server"!==a){let e=await (0,j.aN)(t.toolName,t.args);return e}},async onFinish(e){p(null),(0,k.e)({category:"cs_chatbot",action:"chatbot_responded",modelName:"gpt-4o",value:e.content})}}),f=(0,o.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(e=>e+1),(0,k.e)({category:"cs_chatbot",action:"user_asked_question",value:e,...t})},[]),g=(0,o.useCallback)(async e=>("boolean"==typeof e.newUser&&r(e.newUser),a(e=>e+1),(0,k.e)({category:"cs_chatbot",action:"user_asked_question",value:e.user,hardcoded:!0}),(0,k.e)({category:"cs_chatbot",action:"chatbot_responded",value:e.assistant,hardcoded:!0}),{data:e.assistant}),[]);(0,o.useEffect)(()=>{e.current=!(0,x.tq)()},[]);let w=(0,o.useMemo)(()=>t?s?_.newUser:_.existingUser:_.initial,[t,s]);return(0,n.jsx)(c.k,{forcedDisabled:d,initialPlaceholder:d?"You've been blocked":"Type a message...",chatProps:m,variant:"bottomRight",toolInUse:h,onExampleClicked:g,onSubmit:f,autoFocus:e.current,examples:w,examplesLabel:t?(0,n.jsxs)("span",{children:["Popular Questions ",(0,n.jsx)("span",{className:"text-xs animate-bounce",children:"\uD83D\uDC47"})]}):" ",onOpenChange:e=>{e?(0,k.e)({category:"cs_chatbot",action:"Chatbot_Opened"}):(0,k.e)({category:"cs_chatbot",action:"Chatbot_Closed"})},children:(0,n.jsx)(b,{})})},N=a(96511),D=a(86564),S=a(49919),I=a(36393),E=a(28646),R=a(21655),T=a(79858),L=a(32843),A=a(89709),O=a(86413);let Content=()=>{let{query:e,isReady:t}=(0,s.useRouter)(),{toggleShowQRModal:a}=(0,E.o)();return(0,o.useEffect)(()=>{t&&e.showAppDownloadQR&&a()},[e,t,a]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L.Z,{}),(0,n.jsx)(T.Z,{showWWOD:!0}),(0,n.jsxs)("div",{className:"h-full max-w-full overflow-hidden",children:[(0,n.jsx)(S.Ol,{}),(0,n.jsx)(N.$,{})]})]})},M="https://ladder.page.link/?ibi=com.ladder.bootcamp&isi=1502936453&ius=ladderteams&link=https://".concat(O.r8?"dev.":"","joinladder.com");function Home(){let{query:e}=(0,s.useRouter)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D.Q,{title:"Ladder | Your Daily Workout Plan"}),(0,n.jsx)(r.x7,{position:"top-center",toastOptions:{className:"",duration:5e3}}),(0,n.jsx)(A.I,{children:(0,n.jsxs)(E.$,{children:[(0,n.jsx)(R.B,{title:"Download the app!",description:"Scan the QR code start your workout",deepLink:M}),(0,n.jsx)(Content,{}),(0,n.jsx)(ai_chat_bot,{})]})})]})}Home.Layout=I.Z},2679:function(e,t,a){"use strict";a.d(t,{k:function(){return ChatBotUIDialog}});var n=a(52322),s=a(70241),o=a(17912),r=a(88724),i=a(2784),l=a(13796),c=a(82457),d=a(55320),u=a(58449);let ChatBotHeader=()=>(0,n.jsxs)("div",{className:"p-4 rounded-t-xl flex flex-row items-center space-x-1 border-b border-neutral-700 bg-secondary lg:rounded-t-lg shadow-lg h-[50px]",children:[(0,n.jsx)("div",{className:"w-8 h-8 bg-background rounded-full flex center",children:(0,n.jsx)("h3",{className:"text-base text-muted-foreground heading",children:"\uD83E\uDD16"})}),(0,n.jsx)("span",{style:{backgroundImage:"linear-gradient(128.99deg, #6AD3F4 -52.29%, #6AF478 18.9%, #D2FF51 108.52%)",backgroundClip:"text"},className:"text-transparent bg-clip-text",children:"Arnie AI"}),(0,n.jsx)("span",{className:"text-muted-foreground leading-none",children:"(beta)"})]});var h=a(14907),p=a(39559),m=a(70980);let f=i.forwardRef((e,t)=>{let{className:a,children:i,...c}=e;return(0,n.jsx)(l.PK,{children:(0,n.jsxs)(s.VY,{ref:t,className:(0,o.cn)("animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 fixed z-50 flex flex-col w-full gap-4 p-6","dark:bg-background",a),...c,children:[i,(0,n.jsxs)(s.x8,{className:"absolute rounded-full top-2 right-4 shadow-button opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900 dark:bg-secondary p-2",children:[(0,n.jsx)(r.Z,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})})}),ChatBotUIDialogComponents=e=>{let{children:t,onOpenChange:a}=e,{open:o,setOpen:r,variant:i,overlay:c}=(0,p.s)(),d=(0,m.fV)();return(0,n.jsxs)(l.Vq,{open:o,onOpenChange:e=>{r(e),null==a||a(e)},children:[(0,n.jsx)(l.hg,{asChild:!0,children:t}),(0,n.jsxs)(s.h_,{children:[c?(0,n.jsx)(l.t9,{}):null,(0,n.jsx)("div",{children:(0,n.jsxs)(f,{style:{maxHeight:d},className:(0,m.wS)({variant:i}),children:[(0,n.jsx)(ChatBotHeader,{}),(0,n.jsx)(u.j,{}),(0,n.jsxs)(l.cN,{className:"relative flex-col sm:flex-col p-4",children:[(0,n.jsx)(h.M,{}),(0,n.jsxs)("div",{className:"text-xs text-center text-muted-foreground pt-1",children:["ArnieAI (Beta) may provide inaccurate information. Please contact support"," ",(0,n.jsx)("a",{href:"https://airtable.com/shrrrXxt1CKpOkSme",target:"_blank",rel:"noreferrer",className:"text-royal-400",children:"here"})," ","for more help."]})]})]})})]})]})},ChatBotUIDialog=e=>{let{children:t,onOpenChange:a,chatProps:s,...o}=e;return(0,n.jsx)(c._W,{initialState:{chatProps:s},children:(0,n.jsx)(p.M,{initialState:o,children:(0,n.jsx)(d.P,{children:(0,n.jsx)(ChatBotUIDialogComponents,{onOpenChange:a,children:t})})})})}},17188:function(e,t,a){"use strict";a.d(t,{Ce:function(){return useIsDesktop},dD:function(){return useIsMobile}});var n=a(2784);let s="(min-width: 1024px)";function useMediaQuery(e){let[t,a]=n.useState(()=>{{let t=window.matchMedia(e);return t.matches}});return n.useEffect(()=>{function onChange(e){a(e.matches)}let t=matchMedia(e);return t.addEventListener("change",onChange),a(t.matches),()=>t.removeEventListener("change",onChange)},[e]),t}let useIsMobile=()=>{let e=useMediaQuery(s);return!e},useIsDesktop=()=>{let e=useMediaQuery(s);return e}}},function(e){e.O(0,[5338,9097,6031,3481,8001,301,6167,5686,8241,9380,6548,6577,7981,8183,7970,9858,2344,4167,6082,9919,9774,2888,179],function(){return e(e.s=85356)}),_N_E=e.O()}]);
//# sourceMappingURL=index-5c30af443ee41433.js.map