PageSourceSearch

https://recipefix.app/assets/Index-DJchA--d.js

js recipefix.app collected 2026-10-02 00:43:06 UTC 25,753 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingProductJourney-loqs4x7q.js","assets/vendor-react-C-Rhcy9l.js","assets/RecipeOutputCard-CvjcEH3l.js","assets/sheet-XYyCB8K3.js","assets/vendor-radix-BbNWnRsY.js","assets/vendor-supabase-DqPyHwfE.js","assets/vendor-shell-bqSPdd6N.js","assets/index-Uyq2MISY.js","assets/vendor-query-T8ArSuAU.js","assets/vendor-icons-DLRaz07-.js","assets/index-BgI_MQ-V.css","assets/shoppingRecipes-C6OumqL-.js","assets/pantryMatch-JESAgN5Y.js","assets/shoppingList-ClLnRe4V.js","assets/serverNutrition-0oGCVpc2.js","assets/limits-Dzy3Zzx1.js","assets/serving-scaler-DQECVKuJ.js","assets/bottom-sheet-B9GkhYpz.js","assets/vendor-ui-Bh2wS-nQ.js","assets/shoppingListAdd-DLGj3JyB.js","assets/diet-evaluator-DCJ2WbaC.js","assets/diet-compliance-DQ2ZHjNi.js","assets/recipeTypography-c8xx0oK0.js","assets/cookTime-VOcH_GxO.js","assets/fixRequest-CbNOVvSL.js","assets/KitchenMatchCard-D2t3v4Dv.js","assets/RecipeCard-C0tbukGr.js","assets/GroceryAislesView-B2bDQ1Kp.js","assets/stepDuration-DMldUbuk.js","assets/Plan-CWiLI2zx.js","assets/AppShell-DLZtuWsT.js","assets/Navbar-VX_zB2Ux.js","assets/SiteHeaderFrame-D7p_dbGx.js","assets/localHistoryOwner-CRTJasIC.js","assets/useDialogA11y-B-cDHUW5.js","assets/pricing-BFvuj6yd.js","assets/iapAuth-D8kGqiTn.js","assets/recipefix-icon-H8EuKnHi.js","assets/Footer-i-0BdJZd.js","assets/seoTitle-B_iRM_id.js","assets/PlusGate-BlGBRdr8.js","assets/useMealPlan-D-ZXmBAd.js","assets/groceryQuantity-BsGJnGrp.js","assets/useCookbook-B2ThqXEz.js","assets/useKitchen-CIjq-UlS.js","assets/cookingHistory-C2eDs1Ex.js","assets/planDay-B5zOoGth.js","assets/foodSearch-DSOiHpr4.js","assets/foodIntent-BIN9rluz.js","assets/tasteSignals-CGEqdsF7.js","assets/foodMention-vr804Wcw.js","assets/adaptStream-C-VMWNNl.js","assets/savedRecipeRow-Emp_wdAP.js","assets/savedRecipeSource-BsMabHq1.js","assets/useFoodProfile-D8fG-u1o.js","assets/FirstRunExamples-C7TWOi3E.js","assets/MoveMeal-DrHdKSn0.js","assets/usePlanDrag-ChWR8gHx.js","assets/useMinWidth-v3EhOJXC.js","assets/ExtensionPromo-DBrxY3f8.js","assets/extensionPromo-DVvlB-IF.js","assets/recipefixOriginalCatalog-DIwrrjcc.js","assets/recipefixOriginals-BHraAuZh.js"])))=>i.map(i=>d[i]);
2import{g as C,c as b,A as U,i as $,h as H,j as B,a as W,s as E,k as A,l as G,P as q,_ as K}from"./index-Uyq2MISY.js";import{b as D,r as i,j as e,L as k,u as V}from"./vendor-react-C-Rhcy9l.js";import{b as Y}from"./vendor-shell-bqSPdd6N.js";import{H as X}from"./HomepageNav-CQaYPKlO.js";import{d as J,e as Z,f as Q,R as ee,g as te,h as re,i as ne,M as se,j as ae,k as ie,A as R,l as oe,m as ce,n as le}from"./vendor-icons-DLRaz07-.js";import{R as de}from"./RecipeWorkspaceHero-C1-UG2vW.js";import{R as pe}from"./RecipeReader-BnRiIBFM.js";import{E as F,a as me}from"./ExtensionPromo-DBrxY3f8.js";import{o as I,R as T}from"./recipefixOriginals-BHraAuZh.js";import{F as xe}from"./Footer-i-0BdJZd.js";import{getDeviceId as he}from"./useUsage-pdVfeI1i.js";import{A as ue}from"./SiteHeaderFrame-D7p_dbGx.js";import{f as z,a as fe}from"./seoTitle-B_iRM_id.js";import{P as L}from"./pageMeta-B9B1e0i8.js";import"./vendor-radix-BbNWnRsY.js";import"./vendor-supabase-DqPyHwfE.js";import"./vendor-query-T8ArSuAU.js";import"./recipefix-icon-H8EuKnHi.js";import"./extensionPromo-DVvlB-IF.js";import"./limits-Dzy3Zzx1.js";import"./localHistoryOwner-CRTJasIC.js";import"./bottom-sheet-B9GkhYpz.js";import"./vendor-ui-Bh2wS-nQ.js";import"./useDialogA11y-B-cDHUW5.js";function ge(t){try{const r=new URL(t);return r.protocol==="https:"?r:null}catch{return null}}function be({className:t="",source:r="landing",autoFocus:n=!1}){const a=D(),s=r==="landing",[l,m]=i.useState(""),[g,N]=i.useState(!1),h=p=>{p?.preventDefault();const u=l.trim();if(N(!0),!u)return;C("light");const y=ge(u);if(y){b("universal_start_submitted",{source:r,kind:"url"}),a(`/adapt?url=${encodeURIComponent(y.toString())}`);return}b("universal_start_submitted",{source:r,kind:"search"}),a(`/adapt?q=${encodeURIComponent(u)}`,{state:{heroMode:"search"}})},j=p=>{C("light"),b("universal_start_secondary_clicked",{source:r,mode:p}),a("/adapt",{state:{heroMode:p}})};return e.jsxs("div",{className:t,children:[e.jsxs("form",{onSubmit:h,className:s?"group rounded-2xl border border-border/90 bg-card p-1.5 transition-colors duration-150 focus-within:border-foreground
2/30":"group rounded-[20px] border border-border bg-card p-2 shadow-[var(--shadow-elevated)] transition-[transform,box-shadow,border-color] duration-200 motion-reduce:transform-none motion-reduce:transition-none focus-within:-translate-y-0.5 focus-within:border-primary/40",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(J,{size:19,strokeWidth:1.8,"aria-hidden":"true",className:"ml-2 shrink-0 text-primary-readable md:ml-3"}),e.jsx("input",{value:l,onChange:p=>{m(p.target.value),g&&N(!1)},autoFocus:n,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-label":"Search recipes or paste a recipe link",placeholder:s?"Search or paste a recipe":"Search recipes or paste a recipe link",className:"h-[52px] min-w-0 flex-1 bg-transparent px-1 font-body text-[16px] text-foreground outline-none placeholder:text-muted-foreground/65 md:h-[54px] md:px-2 md:text-[17px]"}),e.jsxs("button",{type:"submit",className:`h-11 shrink-0 items-center gap-1.5 rounded-full px-4 font-body text-[14px] font-semibold transition-opacity ${s?"inline-flex bg-foreground text-background hover:opacity-90":"hidden bg-primary text-primary-foreground hover:opacity-90 sm:inline-flex"}`,children:["Go ",e.jsx("span",{"aria-hidden":"true",children:"→"})]})]}),s?null:e.jsx("button",{type:"submit",className:"mt-1 h-12 w-full rounded-full bg-primary font-body text-[15px] font-semibold text-primary-foreground sm:hidden",children:"Go →"})]}),g&&!l.trim()?e.jsx("p",{className:"px-2 pt-1.5 font-body text-[12px] text-destructive",children:"Type a dish or paste a recipe link."}):null,e.jsxs("div",{className:s?"mt-3 grid grid-cols-3 gap-1 sm:flex sm:items-center sm:gap-5":"mt-3 grid grid-cols-3 gap-2 sm:flex sm:items-center sm:gap-2.5",children:[e.jsxs("button",{type:"button",onClick:()=>j("photo"),className:s?"inline-flex min-h-10 items-center justify-center gap-1.5 whitespace-nowrap px-1 font-body text-[12.5px] font-medium text-foreground/70 transition-colors hover:text-foreground sm:px-0":"inline-flex min-h-11 items-center justify-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-2 font-body text-[12.5px] font-medium text-foreground transition-colors hover:border-primary/35 hover:text-primary-readable sm:px-3",children:[e.jsx(Z,{size:14,strokeWidth:1.8}),e.jsx("span",{children:"Photo"})]}),e.jsxs("button",{type:"button",onClick:()=>j("text"),className:s?"inline-flex min-h-10 items-center justify-center gap-1.5 whitespace-nowrap px-1 font-body text-[12.5px] font-medium text-foreground/70 transition-colors hover:text-foreground sm:px-0":"inline-flex min-h-11 items-center justify-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-2 font-body text-[12.5px] font-medium text-foreground transition-colors hover:border-primary/35 hover:text-primary-readable sm:px-3",children:[e.jsx(Q,{size:14,strokeWidth:1.8}),e.jsx("span",{children:"Paste text"})]}),e.jsxs("button",{type:"button",onClick:()=>{C("light"),b("universal_start_secondary_clicked",{source:r,mode:"kitchen"}),a("/what-can-i-make")},className:s?"inline-flex min-h-10 items-center justify-center gap-1.5 whitespace-nowrap px-1 font-body text-[12.5px] font-medium text-foreground/70 transition-colors hover:text-foreground sm:px-0":"inline-flex min-h-11 items-center justify-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-2 font-body text-[12.5px] font-medium text-foreground transition-colors hover:border-primary/35 hover:text-primary-readable sm:px-3",children:[e.jsx(ee,{size:14,strokeWidth:1.8}),e.jsx("span",{children:"My kitchen"})]})]}),e.jsx("div",{className:"sr-only","aria-hidden":"true",children:e.jsx(te,{})})]})}const P=T.find(t=>t.id==="creamy-tuscan-chicken"),je="(min-width: 1024px) 50vw, 100vw",ye=P?I(P,800):null,we=P?[400,800,1200,1600].map(t=>`${I(P,t)} ${t}w`).join(", "):void 0,ve=[{title:null,items:F.ingredients.slice(0,3).map(t=>t.adapted)}],ke=F.steps.filter(t=>typeof t!="string").slice(0,2).map((t,r)=>({index:r+1,text:t.instruction,note:t.updated_note?e.jsx("span",{children:t.updated_note}):void 0})),Ne=()=>e.jsxs("div",{"aria-label":"RecipeFix adapted recipe example",className:"overflow-hidden rounded-[24px] border border-border bg-card shadow-[var(--shadow-elevated)]",children:[e.jsx(de,{imageUrl:ye,imageAlt:"Creamy Tuscan chicken with spinach and sun-dried tomatoes",imageSrcSet:we,imageSizes:je,imageEager:!0,eyebrow:"Example · RecipeFix version",title:"Creamy Tuscan Chicken",meta:e.jsxs(e.Fragment,{children:["Serves ",F.servings,e.jsx("span",{children:"·"}),e.jsx("span",{children:"Dairy-free"})]})}),e.jsx("div",{className:"border-t border-border/70 px-4 pb-5 pt-4 sm:px-5",children:e.jsx(pe,{ingredientGroups:ve,steps:ke,layout:"stack",headingLevel:3,idPrefix:"landing-hero-recipe"})})]});function _e(){return e.jsx("section",{className:"bg-background","data-landing-section":"hero",children:e.jsxs("div",{className:"mx-auto grid max-w-[1320px] items-center gap-9 px-5 pb-14 pt-8 md:px-8 md:pb-20 md:pt-12 lg:grid-cols-[0.92fr_1.08fr] lg:gap-12 lg:px-10 lg:pb-24 lg:pt-16",children:[e.jsxs("div",{className:"max-w-[620px]",children:[e.jsxs("h1",{className:"font-heading text-[2.7rem] leading-[0.98] tracking-[-0.035em] text-foreground sm:text-[3.7rem] md:text-[4.45rem] lg:text-[4.35rem] xl:text-[5rem]",children:["Cook what you want.",e.jsx("br",{}),e.jsx("em",{className:"font-normal text-primary-readable",children:"Make it work for you."})]}),e.jsx("p",{className:"mt-5 max-w-[540px] font-body text-[15.5px] leading-relaxed text-foreground
2/70 md:mt-6 md:text-[18px]",children:"Bring a recipe or find dinner here. RecipeFix changes the ingredients and method together, then keeps that recipe with you through planning, shopping and cooking."}),e.jsx(be,{className:"mt-6 max-w-[620px] md:mt-8",source:"landing"})]}),e.jsx(Ne,{})]})})}const Se=()=>e.jsx("section",{className:"bg-secondary/40","data-landing-section":"proof",children:e.jsxs("div",{className:"mx-auto grid max-w-[1320px] gap-8 px-5 py-12 md:grid-cols-[1fr_auto] md:items-end md:px-8 md:py-16 lg:px-10",children:[e.jsxs("blockquote",{className:"max-w-[820px]",children:[e.jsxs("p",{className:"font-heading text-[30px] leading-[1.08] tracking-tight text-foreground md:text-[46px]",children:[e.jsx("span",{className:"text-primary-readable",children:"“"}),"Makes vegetarian and high-protein cooking so easy!",e.jsx("span",{className:"text-primary-readable",children:"”"})]}),e.jsxs("footer",{className:"mt-4 font-body text-[14px] text-muted-foreground",children:["mermen_of_carnage ·"," ",e.jsx("a",{href:U,target:"_blank",rel:"noopener noreferrer",className:"underline-offset-2 hover:underline",children:"App Store review"})]})]}),!$()&&e.jsxs("div",{className:"flex flex-col items-start gap-2 md:items-end",children:[e.jsxs("a",{href:U,target:"_blank",rel:"noopener noreferrer","aria-label":"Download RecipeFix on the App Store",className:"inline-flex items-center gap-3 rounded-xl bg-foreground px-5 py-3 text-background transition-opacity hover:opacity-90",children:[e.jsx("svg",{viewBox:"0 0 24 24",width:"26",height:"26",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M16.365 1.43c0 1.14-.493 2.27-1.177 3.08-.744.9-1.99 1.57-2.987 1.57-.12 0-.23-.02-.3-.03-.01-.06-.04-.22-.04-.39 0-1.15.572-2.27 1.206-2.98.804-.94 2.142-1.64 3.248-1.68.03.13.05.28.05.43zm4.565 15.71c-.03.07-.463 1.58-1.518 3.12-.945 1.34-1.94 2.71-3.43 2.71-1.517 0-1.9-.88-3.63-.88-1.698 0-2.302.91-3.67.91-1.377 0-2.332-1.26-3.428-2.8-1.287-1.82-2.323-4.63-2.323-7.28 0-4.28 2.797-6.55 5.552-6.55 1.448 0 2.675.95 3.6.95.865 0 2.222-1.01 3.902-1.01.613 0 2.886.06 4.374 2.19-.13.09-2.383 1.37-2.383 4.19 0 3.26 2.854 4.42 2.955 4.45z"})}),e.jsxs("span",{className:"flex flex-col items-start leading-tight",children:[e.jsx("span",{className:"text-[10px] font-light uppercase tracking-wider",children:"Download on the"}),e.jsx("span",{className:"font-heading text-lg font-semibold",children:"App Store"})]})]}),e.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"RecipeFix for iPhone and iPad"})]})]})}),Re=[{title:"Gluten-free",body:"Keep the dish. Replace what actually contains gluten.",link:"/gluten-free-recipe-converter",icon:ne},{title:"Dairy-free",body:"Replace dairy by the job it was doing in the recipe.",link:"/dairy-free-recipe-converter",icon:se},{title:"Vegan",body:"Rewrite protein, fat, binding and technique together.",link:"/vegan-recipe-converter",icon:ae},{title:"High-protein",body:"Push protein higher without turning dinner into diet food.",link:"/high-protein-recipe-converter",icon:ie}],Ie=[{title:"Keto",link:"/keto-recipe-converter"},{title:"Nut-Free",link:"/nut-free-recipe-converter"},{title:"Paleo",link:"/paleo-recipe-converter"},{title:"Whole30",link:"/whole30-recipe-converter"},{title:"Low-FODMAP",link:"/low-fodmap-recipe-converter"},{title:"Low-Carb",link:"/low-carb-recipe-converter"},{title:"Low-Sodium",link:"/low-sodium-recipe-converter"},{title:"High-Fiber",link:"/high-fiber-recipe-converter"}],Pe=[{title:"Italian · Gluten-Free",link:"/italian-gluten-free-recipes"},{title:"Mexican · Vegan",link:"/mexican-vegan-recipes"},{title:"Indian · Dairy-Free",link:"/indian-dairy-free-recipes"},{title:"Asian · Gluten-Free",link:"/asian-gluten-free-recipes"},{title:"Mediterranean · Keto",link:"/mediterranean-keto-recipes"}],Ce=[{title:"Scale a recipe",link:"/recipe-serving-size-calculator",icon:oe},{title:"Multiply or divide",link:"/recipe-multiplier-divider",icon:ce},{title:"Find a substitute",link:"/substitutes",icon:le}],Ee=[{title:"Half a Recipe",link:"/half-a-recipe"},{title:"Double a Recipe",link:"/double-a-recipe"},{title:"Kitchen Measurements",link:"/kitchen-measurement-converter"},{title:"Slow Cooker → Instant Pot",link:"/slow-cooker-to-instant-pot-converter"}],M="flex min-h-10 items-center border-b border-border/60 font-body text-[13.5px] text-foreground
2/85 hover:text-primary-readable",O="font-body text-[12.5px] font-semibold text-muted-foreground",Ae=()=>{const[t,r]=i.useState(!1);return e.jsx("section",{className:"border-t border-border/70 bg-background",children:e.jsxs("div",{className:"mx-auto max-w-[1320px] px-5 py-10 md:px-8 md:py-14 lg:px-10",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[e.jsx("h2",{className:"font-heading text-[24px] leading-tight text-foreground md:text-[28px]",children:"Tools & guides"}),e.jsxs("button",{type:"button","aria-expanded":t,onClick:()=>r(n=>!n),className:"inline-flex min-h-11 items-center gap-1.5 font-body text-[13.5px] font-semibold text-primary-readable",children:[t?"Show less":"Browse all",e.jsx(re,{size:14,className:`transition-transform duration-150 ${t?"rotate-180":""}`})]})]}),e.jsxs("div",{className:"mt-5 grid gap-8 md:grid-cols-[2fr_1fr] md:gap-12",children:[e.jsxs("div",{children:[e.jsx("p",{className:O,children:"Diet converters"}),e.jsx("div",{className:"mt-1 grid gap-x-8 sm:grid-cols-2",children:Re.map(n=>e.jsxs(k,{to:n.link,className:`${M} justify-between gap-3 py-2`,children:[e.jsx("span",{className:"font-semibold text-foreground",children:n.title}),e.jsx(R,{size:13,className:"shrink-0 text-muted-foreground"})]},n.title))})]}),e.jsxs("div",{children:[e.jsx("p",{className:O,children:"Kitchen tools"}),e.jsx("div",{className:"mt-1",children:Ce.map(n=>e.jsxs(k,{to:n.link,className:`${M} justify-between`,children:[n.title,e.jsx(R,{size:13,className:"text-muted-foreground"})]},n.title))})]})]}),t?e.jsx("div",{className:"mt-8 grid gap-8 md:grid-cols-3 md:gap-12",children:[["More diets & goals",Ie],["Recipe collections",Pe],["More tools",Ee]].map(([n,a])=>e.jsxs("div",{children:[e.jsx("p",{className:O,children:n}),e.jsx("div",{className:"mt-1",children:a.map(s=>e.jsxs(k,{to:s.link,className:`${M} justify-between`,children:[s.title,e.jsx(R,{size:12,className:"text-muted-foreground"})]},s.title))})]},n))}):null]})})},Le=t=>{const r=T.find(n=>n.id===t);if(!r)throw new Error(`Unknown RecipeFix Original: ${t}`);return r},Me=({id:t,alt:r,className:n="",sizes:a,eager:s=!1})=>{const l=Le(t);return e.jsx("img",{src:I(l,800),srcSet:[400,800,1200,1600].map(m=>`${I(l,m)} ${m}w`).join(", "),sizes:a,alt:r,width:800,height:600,loading:s?"eager":"lazy",decoding:s?"sync":"async",...s?{fetchpriority:"high"}:{},className:`h-auto object-cover ${n}`})},Oe=()=>e.jsx("section",{className:"bg-background","data-landing-section":"final",children:e.jsxs("div",{className:"mx-auto grid max-w-[1320px] items-center gap-8 px-5 py-14 md:grid-cols-2 md:gap-14 md:px-8 md:py-24 lg:px-10",children:[e.jsx("div",{className:"overflow-hidden rounded-[20px] md:order-2",children:e.jsx(Me,{id:"roasted-butternut-squash-soup",alt:"Roasted butternut squash soup with toasted pumpkin seeds",sizes:"(min-width: 768px) 50vw, 100vw",className:"aspect-[4/3] w-full"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"font-heading text-[40px] leading-[1.0] tracking-tight text-foreground md:text-[64px]",children:["Bring the recipe.",e.jsx("br",{}),e.jsx("em",{className:"font-normal text-primary-readable",children:"We'll make it work."})]}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-x-6 gap-y-4",children:[e.jsxs(k,{to:"/adapt",onClick:()=>b("landing_primary_cta_clicked",{section:"final"}),className:"inline-flex min-h-12 items-center gap-1.5 rounded-full bg-foreground px-7 font-body text-[16px] font-semibold text-background hover:opacity-90",children:["Adapt a recipe ",e.jsx(R,{size:16})]}),e.jsx(k,{to:"/discover",className:"font-body text-[15px] font-medium text-foreground underline-offset-4 hover:underline",children:"Explore recipes"})]})]})]})});function Fe(){const t=V();i.useEffect(()=>{const r=localStorage.getItem("rf_ref");if(!r)return;const n=new URL(window.location.href);n.searchParams.get("ref")!==r&&(n.searchParams.set("ref",r),window.history.replaceState({},"",n.toString()))},[t.pathname,t.search])}function Ue(t,r,n){const a=r&&!H(r)?r.id:null;if(t===void 0)return{go:!1,seen:a};if(!a||a===t)return{go:!1,seen:a};const s=new URLSearchParams(n.search),l=n.hash??"";return{go:!(s.has("home")||l==="#how-it-works"||l.includes("access_token")||l.includes("refresh_token")||s.has("code")||s.has("ref")||s.has("ref_code")),seen:a}}const ze=i.lazy(()=>K(()=>import("./LandingProductJourney-loqs4x7q.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62]))),lt=()=>{const t=D(),r=B(),{user:n,isLoading:a}=W(),[s,l]=i.useState(!1),[m,g]=i.useState(!1),[N,h]=i.useState(!1);Fe(),i.useEffect(()=>{const o=new URLSearchParams(window.location.search),c=o.get("ref"),x=o.get("ref_code"),f=o.get("oauth_return");if(o.get("signin")==="1"){h(!0);const d=new URL(window.location.href);d.searchParams.delete("signin"),window.history.replaceState({},"",d.toString())}if(f==="true"&&x){localStorage.setItem("rf_ref",x),sessionStorage.setItem("rf_ref_session",x);const d=new URL(window.location.href);d.searchParams.delete("ref_code"),d.searchParams.delete("oauth_return"),window.history.replaceState({},"",d.toString())}c&&c.length>=6&&(async()=>{try{const{data:d}=await E.from("referrals").select("total_uses").eq("referral_code",c).maybeSingle();if(d&&(d.total_uses??0)>=3){l(!0),localStorage.setItem("rf_ref_maxed","true");return}g(!0),localStorage.setItem("rf_ref",c),sessionStorage.setItem("rf_ref_session",c),localStorage.setItem("recipefix-ref",c);const _=await he();localStorage.removeItem("rf_device_fingerprint"),E.functions.invoke("log-referral-visit",{body:{referral_code:c,device_fingerprint_hash:_}}).catch(()=>{})}catch{localStorage.setItem("rf_ref",c),localStorage.setItem("recipefix-ref",c)}})()},[]),i.useEffect(()=>{!r||a||!n||new URLSearchParams(window.location.search).has("home")||window.location.hash==="#how-it-works"||(localStorage.setItem("rf_has_opened_before","true"),A(t))},[r,n,a,t]),i.useEffect(()=>{if(r)return;const o=new URLSearchParams(window.location.search);if(o.has("home")||window.location.hash==="#how-it-works")return;const c=window.location.hash,x=window.location.search;
2c.includes("access_token")||c.includes("refresh_token")||new URLSearchParams(x).has("code")||o.has("ref")||o.has("ref_code")||o.has("signin")||E.auth.getSession().then(({data:{session:f}})=>{f?.user&&A(t)})},[t,r]);const j=i.useRef(void 0);i.useEffect(()=>{if(r||a)return;const o=Ue(j.current,n,window.location);j.current=o.seen,o.go&&A(t)},[n,a,r,t]),i.useEffect(()=>{document.title=z(L.home.title)},[]),i.useEffect(()=>{if(typeof IntersectionObserver>"u")return;const o=new Set(["hero","change","kitchen","plan","grocery","cook","plus","proof","final"]),c=new Set,x=new WeakSet,f=new IntersectionObserver(w=>{for(const S of w){if(!S.isIntersecting||S.intersectionRatio<.35)continue;const v=S.target.dataset.landingSection??"";!o.has(v)||c.has(v)||(c.add(v),b("landing_section_impression",{section:v}),G("landing_section_impression",{section:v}),f.unobserve(S.target))}},{threshold:[.35]}),d=()=>{document.querySelectorAll("[data-landing-section]").forEach(w=>{x.has(w)||(x.add(w),f.observe(w))})};d();const _=new MutationObserver(d);return _.observe(document.body,{childList:!0,subtree:!0}),()=>{_.disconnect(),f.disconnect()}},[]);const p=L.home.title,u=L.home.description,y=()=>{l(!1),localStorage.removeItem("rf_ref_maxed")};return r&&a?e.jsx(q,{}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs(Y,{children:[e.jsx("title",{children:z(p)}),e.jsx("meta",{name:"description",content:fe(u)}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:"https://recipefix.app/"}),e.jsx("meta",{property:"og:title",content:p}),e.jsx("meta",{property:"og:description",content:u}),e.jsx("meta",{property:"og:image",content:"https://recipefix.app/og-image.png"}),e.jsx("meta",{property:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{property:"twitter:title",content:p}),e.jsx("meta",{property:"twitter:description",content:u}),e.jsx("meta",{property:"twitter:image",content:"https://recipefix.app/og-image.png"}),e.jsx("link",{rel:"canonical",href:"https://recipefix.app/"})]}),e.jsx(X,{}),(s||m&&!s)&&e.jsxs("div",{className:"fixed top-20 left-1/2 -translate-x-1/2 z-40 w-full max-w-md px-4",children:[s&&e.jsxs("div",{className:"relative rounded-lg border border-border bg-card px-4 py-3 shadow-lg",children:[e.jsx("button",{onClick:y,className:"absolute right-0 top-0 min-h-[44px] min-w-[44px] flex items-center justify-center text-muted-foreground","aria-label":"Dismiss",children:"✕"}),e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("span",{className:"text-base",children:"🔒"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-body text-sm text-foreground",children:"This referral link has reached its limit."}),e.jsx("p",{className:"font-body text-[13px] mt-0.5 text-muted-foreground",children:"You can still create an account and use RecipeFix normally."}),e.jsx("button",{onClick:()=>{y(),h(!0)},className:"font-body text-[13px] hover:underline mt-1 font-medium text-primary-readable",children:"Create account →"})]})]})]}),m&&!s&&e.jsxs("div",{className:"relative rounded-lg border border-border bg-card px-4 py-3 shadow-lg",children:[e.jsx("button",{onClick:()=>g(!1),className:"absolute right-0 top-0 min-h-[44px] min-w-[44px] flex items-center justify-center text-muted-foreground","aria-label":"Dismiss",children:"✕"}),e.jsxs("div",{className:"flex flex-col items-center text-center py-2",children:[e.jsx("span",{className:"text-2xl mb-2",children:"🎁"}),e.jsx("p",{className:"font-body text-[15px] font-semibold text-foreground",children:"You've been invited to RecipeFix"}),e.jsx("p",{className:"font-body text-sm mt-1 text-muted-foreground",children:"Your invite includes a 7-day Plus trial after your first adaptation."}),e.jsx("button",{onClick:()=>{g(!1),h(!0)},className:"mt-3 w-full h-[52px] rounded-full bg-primary font-body text-sm font-semibold text-primary-foreground transition-colors",children:"Accept invite →"}),e.jsx("p",{className:"font-body text-[11px] mt-2 text-muted-foreground/60",children:"Offer applies to new accounts only."})]})]})]}),e.jsxs("main",{children:[e.jsx(_e,{}),e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"mx-auto h-32 max-w-[1320px] animate-pulse bg-secondary/25","aria-hidden":"true"}),children:e.jsx(ze,{})}),e.jsx(Se,{}),e.jsx(Oe,{}),e.jsx(Ae,{}),e.jsx("div",{className:"mx-auto max-w-[760px] px-4 pb-10 md:px-6",children:e.jsx(me,{})})]}),e.jsx(xe,{}),e.jsx(ue,{open:N,onOpenChange:h,defaultTab:"signup",context:"guest_home"}),r&&!n&&!a&&!localStorage.getItem("rf_has_opened_before")&&e.jsxs("div",{className:"fixed bottom-0 left-0 right-0 z-[60] border-t border-border bg-background px-5 pt-3",style:{paddingBottom:"calc(var(--safe-bottom, 0px) + 12px)"},children:[e.jsx("button",{onClick:()=>{localStorage.setItem("rf_has_opened_before","true"),t("/adapt")},className:"w-full h-[52px] rounded-full bg-primary font-body text-base font-semibold text-primary-foreground",children:"Adapt a recipe →"}),e.jsx("div",{className:"flex justify-center mt-2.5 mb-1",children:e.jsxs("button",{onClick:()=>h(!0),className:"font-body text-sm text-muted-foreground",children:["Already have an account? ",e.jsx("span",{className:"text-primary-readable font-medium",children:"Sign In"})]})})]})]})};export{lt as default};

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.