PageSourceSearch

https://intoleran-fodmap.vercel.app/_next/static/chunks/45-29c8a628a4fb4d94.js

js intoleran-fodmap.vercel.app collected 2026-10-03 07:08:02 UTC 46,362 bytes, 107 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[45],{30:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))})},256:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))})},1182:(e,t,a)=>{a.d(t,{NavigationProvider:()=>s,c:()=>i});var r=a(5155),n=a(2115);let l=(0,n.createContext)(void 0);function s({children:e}){let[t,a]=(0,n.useState)(!0);return(0,r.jsx)(l.Provider,{value:{isNavOpen:t,setIsNavOpen:a},children:e})}function i(){let e=(0,n.useContext)(l);if(void 0===e)throw Error("useNavigation must be used within a NavigationProvider");return e}},1267:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))})},2593:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))})},3800:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))})},4486:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.
1095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"}))})},6850:(e,t,a)=>{a.d(t,{A:()=>d});var r=a(5155),n=a(2115),l=a(910);let s=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M12 18.75H4.5a2.25 2.25 0 0 1-2.25-2.25V9m12.841 9.091L16.5 19.5m-1.409-1.409c.407-.407.659-.97.659-1.591v-9a2.25 2.25 0 0 0-2.25-2.25h-9c-.621 0-1.184.252-1.591.659m12.182 12.182L2.909 5.909M1.5 4.5l1.409 1.409"}))});var i=a(8508);let o=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3-3-3m0 0-3 3m3-3V15"}))});function d({onCapture:e,disabled:t=!1}){let a=(0,l.c)("camera"),[d,c]=(0,n.useState)(null),[u,m]=(0,n.useState)(!0),p=(0,n.useRef)(null),g=(0,n.useRef)(null),h=(0,n.useRef)(null),f=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=!0;return(async()=>{m(!0),c(null);let t=null;for(let e of[{video:{facingMode:"environment",width:{ideal:1080},height:{ideal:1440}}},{video:{facingMode:"environment",width:{ideal:720},height:{ideal:1280}}},{video:{facingMode:"environment"}},{video:{facingMode:"user"}}])try{if(t=await navigator.mediaDevices.getUserMedia(e))break}catch(t){console.warn("Mislukt om camera te starten met:",e)}e&&t?(f.current=t,p.current&&(p.current.srcObject=t)):e&&(c(a("errorBody")),m(!1))})(),()=>{e=!1,f.current&&f.current.getTracks().forEach(e=>e.stop())}},[]),(0,r.jsxs)("div",{className:"w-full max-w-2xl mx-auto p-4 bg-white rounded-2xl shadow-soft text-center",children:[(0,r.jsx)("input",{type:"file",accept:"image/*",onChange:t=>{let a=t.target.files?.[0];if(a){let t=new FileReader;t.onload=t=>{e(t.target?.result,a)},t.readAsDataURL(a)}},ref:h,className:"hidden"}),(0,r.jsxs)("div",{className:"relative w-full aspect-[3/4] sm:aspect-video bg-gray-900 rounded-lg overflow-hidden",children:[u&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-white",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-white mb-4"}),(0,r.jsx)("p",{children:a("starting")})]}),d&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-white p-4",children:[(0,r.jsx)(s,{className:"w-16 h-16 text-red-400 mb-4"}),(0,r.jsx)("p",{className:"font-semibold",children:a("errorTitle")}),(0,r.jsx)("p",{className:"text-sm text-gray-300",children:d})]}),(0,r.jsx)("video",{ref:p,autoPlay:!0,playsInline:!0,muted:!0,onCanPlay:()=>{m(!1)},className:`w-full h-full object-contain transition-opacity duration-300 ${u||d?"opacity-0":"opacity-100"}`}),(0,r.jsx)("canvas",{ref:g,className:"hidden"})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,r.jsxs)("button",{onClick:()=>{if(!p.current||!g.current)return;let t=p.current,a=g.current,r=a.getContext("2d");if(!r)return;a.width=t.videoWidth,a.height=t.videoHeight,r.drawImage(t,0,0,a.width,a.height);let n=a.toDataURL("image/jpeg",.9);a.toBlob(t=>{t?e(n,t):(console.error("Kon geen blob van canvas maken."),e(n,new Blob([])))}
1,"image/jpeg",.9),f.current&&f.current.getTracks().forEach(e=>e.stop())},disabled:u||!!d,className:"w-full sm:w-auto flex items-center justify-center gap-2 px-6 py-3 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors font-semibold disabled:bg-gray-400",children:[(0,r.jsx)(i.A,{className:"w-6 h-6"}),a("takePhoto")]}),(0,r.jsxs)("button",{onClick:()=>h.current?.click(),className:"w-full sm:w-auto flex items-center justify-center gap-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors text-sm",children:[(0,r.jsx)(o,{className:"w-5 h-5"}),a("uploadFile")]})]})]})}},8189:(e,t,a)=>{a.d(t,{A:()=>I});var r=a(5155),n=a(2115),l=a(910),s=a(5510);let i=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{d:"M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z"}))}),o=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}),d=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"}))});var c=a(4486);let u=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3.001 3.001 0 0 0 3.75-.615A2.993 2.993 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a2.993 2.993 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.015a3.001 3.001 0 0 0 3.75.614m-16.5 0a3.004 3.004 0 0 1-.621-4.72l1.189-1.19A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75Z"}))});var m=a(256),p=a(3800),g=a(2593);let h=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))});var f=a(8508);let x=n.forwardRef(function({title:e,titleId:t,...a},r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"}))});var b=a(30),w=a(8500),v=a.n(w);function j({content:e,className:t="",variant:a="light"}){let n,l;return(0,r.jsx)("div",{className:`prose prose-sm max-w-none ${"dark"===a?"text-white":"text-gray-800"} ${t}`,dangerouslySetInnerHTML:{__html:(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/Veilig\s*\(Groen\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-green-500 inline-block"></span><span class="font-semibold text-green-600">
1Veilig</span></span>')).replace(/Let op\s*\(Oranje\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-orange-500 inline-block"></span><span class="font-semibold text-orange-600">Let op</span></span>')).replace(/Vermijden\s*\(Rood\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-red-500 inline-block"></span><span class="font-semibold text-red-600">Vermijden</span></span>')).replace(/Groen\s*\([^)]*[Vv]eilig[^)]*\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-green-500 inline-block"></span><span class="font-semibold text-green-600">Veilig</span></span>')).replace(/Geel\s*\([^)]*\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-yellow-500 inline-block"></span><span class="font-semibold text-yellow-600">Let op</span></span>')).replace(/Oranje\s*\([^)]*\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-orange-500 inline-block"></span><span class="font-semibold text-orange-600">Let op</span></span>')).replace(/Rood\s*\([^)]*\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-red-500 inline-block"></span><span class="font-semibold text-red-600">Vermijden</span></span>')).replace(/\(Groen\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-green-500 inline-block"></span><span class="text-green-600">Groen</span></span>')).replace(/\(Geel\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-yellow-500 inline-block"></span><span class="text-yellow-600">Geel</span></span>')).replace(/\(Oranje\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-orange-500 inline-block"></span><span class="text-orange-600">Oranje</span></span>')).replace(/\(Rood\)/gi,'<span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-red-500 inline-block"></span><span class="text-red-600">Rood</span></span>')).replace(/:\s*groen\b/gi,': <span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-green-500 inline-block"></span><span class="text-green-600">groen</span></span>')).replace(/:\s*geel\b/gi,': <span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-yellow-500 inline-block"></span><span class="text-yellow-600">geel</span></span>')).replace(/:\s*oranje\b/gi,': <span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-orange-500 inline-block"></span><span class="text-orange-600">oranje</span></span>')).replace(/:\s*rood\b/gi,': <span class="inline-flex items-center gap-1"><span class="w-3 h-3 rounded-full bg-red-500 inline-block"></span><span class="text-red-600">rood</span></span>'),l="dark"===a?"text-white":"text-gray-800",(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace(/^### (.*$)/gm,`<h3 class="text-lg font-semibold ${l} mt-4 mb-2">$1</h3>`)).replace(/^## (.*$)/gm,`<h2 class="text-xl font-bold ${l} mt-6 mb-3">$1</h2>`)).replace(/^# (.*$)/gm,`<h1 class="text-2xl font-bold ${l} mt-6 mb-4">$1</h1>`)).replace(/\*\*(.*?)\*\*/g,'<strong class="font-bold">$1</strong>')).replace(/__(.*?)__/g,'<strong class="font-bold">$1</strong>')).replace(/\*([^*\n]+)\*/g,'<em class="italic">$1</em>')).replace(/_([^_\n]+)_/g,'<em class="italic">$1</em>')).replace(/```([\s\S]*?)```/g,`<pre class="${"dark"===a?"bg-purple-400/30":"bg-gray-100"} p-3 rounded-lg my-2 overflow-x-auto"><code class="text-sm">$1</code></pre>`)).replace(/`([^`]+)`/g,`<code class="${"dark"===a?"bg-purple-400/30":"bg-gray-100"} px-1 py-0.5 rounded text-sm font-mono">$1</code>`)).replace(/\[([^\]]+)\]\(([^)]+)\)/g,`<a href="$2" class="${"dark"===a?"text-purple-200 hover:text-white":"text-purple-600 hover:text-purple-800"} underline" target="_blank" rel="noopener noreferrer">$1</a>`)).replace(/^[-*] (.+)$/gm,'<li class="ml-4 mb-1">• $1</li>')).replace(/^\d+\. (.+)$/gm,'<li class="ml-4 mb-1 list-decimal list-inside">$1</li>')).replace(/((?:<li class="ml-4 mb-1">• .+<\/li>\s*)+)/g,'<ul class="my-2">$1</ul>')).replace(/((?:<li class="ml-4 mb-1 list-decimal list-inside">.+<\/li>\s*)+)/g,'<ol class="my-2">$1</ol>')).replace(/\n\s*\n/g,'</p><p class="mb-3">')).replace(/\n/g,"<br />")).startsWith("<h")||n.startsWith("<pre")||n.startsWith("<ul")||n.startsWith("<ol")||(n='<p class="mb-3">'+n+"</p>"),n)}})}var y=a(6850),k=a(5772),N=a(9326),A=a(1182);let E=`Je bent 'AI-Lisa', de virtuele FODMAP-di\xebtist van Intoleran. Je bent een gespecialiseerde, vriendelijke en behulpzame AI-assistent.
2
3**TAALREGEL (HOOGSTE PRIORITEIT):**
4Antwoord ALTIJD in het Nederlands. Dit geldt zelfs als de gebruiker een vraag in een andere taal stelt, een afbeelding met buitenlandse tekst stuurt, of een productlabel in een andere taal toont. Vertaal indien nodig productnamen of ingredi\xebnten in je antwoord, maar je hele antwoord blijft Nederlands.
5
6**HOE DE DATABASE WERKT:**
7Je krijgt automatisch zoekresultaten uit onze FODMAP database meegestuurd wanneer een gebruiker vraagt over voedingsmiddelen. Deze informatie verschijnt tussen "--- DATABASE INFORMATIE ---" tags.
8
9**KRITISCHE REGELS OVER BRONVERMELDING:**
101. Als je database informatie ontvangt over een product → gebruik ALLEEN deze informatie en zeg: "Volgens onze database..."
112. Als een product NIET in de database gevonden is → zeg ALTIJD: "⚠️ Let op: [product] staat niet in onze database. Het volgende advies is gebaseerd op algemene FODMAP-kennis."
123. NOOIT doen alsof iets uit de database komt als het daar niet in staat
134. Bij twijfel: wees eerlijk dat je het niet zeker weet
14
15**Hoe om te gaan met database informatie:**
16- Vermeld de specifieke portiegrootte (Klein/Middel/Groot) bij je advies
17- De kleuren in de database betekenen: green=laag FODMAP, yellow=matig, red=hoog
18- Gebruik ALTIJD deze emoji's bij FODMAP-niveaus: 🟢 Laag (veilig), 🟡 Matig (let op portie), 🔴 Hoog (vermijd)
19- Zet ALTIJD het woord achter de emoji (bijv. "🟢 Laag FODMAP" of "🔴 Hoog in fructose"), nooit alleen een emoji of alleen tekst
20
21**Jouw Persoonlijkheid en Toon:**
22- Deskundig maar toegankelijk - gebruik eenvoudige taal
23- Vriendelijk en empathisch - gebruik 'je' en 'jij', soms een passende emoji
24- Ondersteunend en positief - focus op wat w\xe9l kan
25
26**Jouw Kerntaken:**
271. Analyseer ingredi\xebntenlijsten met behulp van database informatie
282. Beantwoord vragen over voedingsmiddelen en het FODMAP-dieet
293. Geef suggesties voor FODMAP-vriendelijke maaltijden en recepten
304. Geef praktische tips voor boodschappen en uit eten
31
32**Absolute Regels:**
33- GEEN MEDISCH ADVIES - je bent geen arts
34- ALTIJD DOORVERWIJZEN bij medische vragen
35- EERLIJK over je bronnen - database vs. algemene kennis`,L=`
36
37**ANTWOORDSTIJL:**
38De gebruiker heeft gekozen voor KORTE antwoorden. Houd je daarom aan deze regels:
39- Geef beknopte, to-the-point antwoorden
40- Maximaal 2-3 zinnen per onderwerp
41- Geen lange uitweidingen of achtergrondverhalen
42- Direct naar de conclusie: veilig, let op, of vermijd
43- Alleen essenti\xeble informatie`,O=`You are 'AI-Lisa', the virtual FODMAP dietitian of Intoleran. You are a specialized, friendly and helpful AI assistant.
44
45**LANGUAGE RULE (HIGHEST PRIORITY):**
46ALWAYS respond in English. This applies even if the user asks a question in another language, sends an image with text in another language, or shows a product label in another language. Translate product names or ingredients in your reply if needed, but your entire response stays in English.
47
48**HOW THE DATABASE WORKS:**
49You automatically receive search results from our FODMAP database whenever a user asks about foods. This information appears between "--- DATABASE INFORMATION ---" tags.
50
51**CRITICAL RULES ABOUT SOURCE ATTRIBUTION:**
521. If you receive database information about a product → use ONLY this information and say: "According to our database..."
532. If a product is NOT found in the database → ALWAYS say: "⚠️ Note: [product] is not in our database. The following advice is based on general FODMAP knowledge."
543. NEVER pretend something is from the database if it isn't
554. When in doubt: be honest that you're not sure
56
57**How to handle database information:**
58- Mention the specific serving size (Small/Medium/Large) in your advice
59- The colors in the database mean: green=low FODMAP, yellow=moderate, red=high
60- ALWAYS use these emojis with FODMAP levels: 🟢 Low (safe), 🟡 Moderate (mind portion), 🔴 High (avoid)
61- ALWAYS put the word after the emoji (e.g. "🟢 Low FODMAP" or "🔴 High in fructose"), never just an emoji or just text
62
63**Your Personality and Tone:**
64- Knowledgeable but approachable - use simple language
65- Friendly and empathetic - use "you", sometimes a fitting emoji
66- Supportive and positive - focus on what IS possible
67
68**Your Core Tasks:**
691. Analyze ingredient lists using database information
702. Answer questions about foods and the FODMAP diet
713. Suggest FODMAP-friendly meals and recipes
724. Give practical tips for shopping and eating out
73
74**Absolute Rules:**
75- NO MEDICAL ADVICE - you are not a doctor
76- ALWAYS REFER for medical questions
77- HONEST about your sources - database vs. general knowledge`,S=`
78
79**RESPONSE STYLE:**
80The user has chosen SHORT answers. Therefore stick to these rules:
81- Give concise, to-the-point answers
82- Maximum 2-3 sentences per topic
83- No long elaborations or background stories
84- Direct to the conclusion: safe, caution, or avoid
85- Only essential information`,M=e=>"en"===e?"Analyze this image and tell me whether this product or ingredient list is FODMAP-friendly.":"Analyseer deze afbeelding en vertel me of dit product of deze ingredi\xebntenlijst FODMAP-vriendelijk is.",R=[{key:"pasta",icon:o,color:"bg-green-100 text-green-700 hover:bg-green-200"},{key:"alternatives",icon:d,color:"bg-blue-100 text-blue-700 hover:bg-blue-200"},{key:"dinner",icon:c.A,color:"bg-purple-100 text-purple-700 hover:bg-purple-200"},{key:"outAndAbout",icon:u,color:"bg-orange-100 text-orange-700 hover:bg-orange-200"}],D="intoleran-chat-session",T=e=>{for(let{pattern:t,platform:a}of[{pattern:/instagram\.com|instagr\.am/i,platform:"Instagram"},{pattern:/tiktok\.com/i,platform:"TikTok"},{pattern:/facebook\.com|fb\.watch/i,platform:"Facebook"},{pattern:/youtube\.com|youtu\.be/i,platform:"YouTube"},{pattern:/pinterest\.com|pin\.it/i,platform:"Pinterest"},{pattern:/twitter\.com|x\.com/i,platform:"X/Twitter"}])if(t.test(e))return{hasUrl:!0,platform:a};return/https?:\/\/[^\s]+/i.test(e)?{hasUrl:!0,platform:null}:{hasUrl:!1,platform:null}},I=({initialImage:e,initialQuestion:t})=>{let a,o=(0,l.c)("chatbot"),d=(0,l.c)("intolerances"),u=(0,s.Ym)(),{profile:w,loaded:I,hasIntolerances:$,getProfileDescription:C}=(0,N.s)(),{isNavOpen:P}=(0,A.c)(),[F,z]=(0,n.useState)(()=>{if(e)return[];{let e=sessionStorage.getItem(D);if(e)try{return JSON.parse(e)}catch{}}return[]}),[W,B]=(0,n.useState)(""),[H,G]=(0,n.useState)(!1),[V,J]=(0,n.use
85State)(null),[Y,U]=(0,n.useState)(null),[_,Z]=(0,n.useState)(!1),[K,q]=(0,n.useState)(!1),[X,Q]=(0,n.useState)(()=>{if(e||t)return!1;{let e=sessionStorage.getItem(D);if(e)try{return JSON.parse(e).length>0}catch{}}return!1}),[ee,et]=(0,n.useState)(()=>{if(e||t)return!1;{let e=sessionStorage.getItem(D);if(e)try{let t=JSON.parse(e);return 0===t.length}catch{}}return!0}),ea=(0,n.useRef)(null),er=(0,n.useRef)(null),en=(0,n.useRef)(!1),el=(0,n.useRef)(!1);(0,n.useEffect)(()=>{F.length>0&&sessionStorage.setItem(D,JSON.stringify(F))},[F]);let es=F.length>=28,ei=()=>{z([]),sessionStorage.removeItem(D),et(!0),J(null)},eo=(0,n.useCallback)(()=>{let e="en"===u?O:E;if("kort"===w.responseStyle&&(e+="en"===u?S:L),$){var t;let a=C(),r=w.intolerances.join(", ");e+=(t=w.name,"en"===u?`
86
87**USER PROFILE:**
88${a}
89The user has the following intolerances set: ${r}.
90
91**IMPORTANT:**
92- ALWAYS take these intolerances into account in your answers
93- Proactively warn if a product/ingredient may be problematic for these specific intolerances
94- If the user asks whether they can have something, check specifically against the intolerances in their profile
95- Personalize your advice: "Since you're ${r.split(",")[0].trim()}-intolerant, I would recommend..."
96${t?`- Address the user as "${t}" when it feels natural`:""}`:`
97
98**GEBRUIKERSPROFIEL:**
99${a}
100De gebruiker heeft de volgende intoleranties ingesteld: ${r}.
101
102**BELANGRIJK:**
103- Houd ALTIJD rekening met deze intoleranties bij je antwoorden
104- Waarschuw proactief als een product/ingredi\xebnt problematisch kan zijn voor deze specifieke intoleranties
105- Als de gebruiker vraagt of iets mag, check specifiek op de intoleranties uit hun profiel
106- Personaliseer je advies: "Omdat je ${r.split(",")[0].trim()}-intolerant bent, zou ik aanraden..."
107${t?`- Spreek de gebruiker aan met "${t}" als dat natuurlijk aanvoelt`:""}`)}return e},[u,$,C,w.intolerances,w.name,w.responseStyle]),ed=(0,n.useCallback)(async e=>{let t=e||(W.trim()?{role:"user",parts:[{type:"text",content:W}],id:`user-${Date.now()}`}:void 0);if(!t)return;et(!1),G(!0),J(null),B("");let a=[...F,t];z(a),setTimeout(()=>void(ea.current&&(ea.current.scrollTop=ea.current.scrollHeight)),50);let r=a.slice(0,-1).slice(-12).map(e=>({role:e.role,content:e.parts.filter(e=>"text"===e.type).map(e=>e.content).join("\n").slice(0,4e3)})).filter(e=>e.content.trim().length>0),n=a[a.length-1],l=n.parts.find(e=>"image"===e.type)?.content||null,s=n.parts.find(e=>"text"===e.type)?.content||"";try{let e=await fetch("/api/chat-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:s,image:l,history:r,systemPrompt:eo(),locale:u})});if(!e.ok||!e.body){let t=await e.text();try{let a=JSON.parse(t);throw Error(a.error||o("errors.serverGeneric",{status:e.status}))}catch(e){throw Error(`Server response error: ${t}`)}}let t=e.body.getReader(),a=new TextDecoder,n="",i=`model-${Date.now()}`;for(z(e=>[...e,{role:"model",parts:[{type:"text",content:""}],id:i}]),U(i);;){let{done:e,value:r}=await t.read();if(e)break;for(let e of a.decode(r,{stream:!0}).split("\n").filter(e=>""!==e.trim()))if(e.startsWith("data:")){let t=e.substring(5).trim();if("[DONE]"===t)break;try{let e=JSON.parse(t);if(e.token)n+=e.token;else if(e.error)throw Error(e.message)}catch(e){console.warn("Could not parse JSON chunk, treating as raw text:",t),n+=t}}else n+=e;z(e=>e.map(e=>e.id===i?{...e,parts:[{type:"text",content:n}]}:e))}}catch(e){J(o("errors.fetchPrefix",{message:e.message})),t.id.startsWith("user-")&&B(t.parts.find(e=>"text"===e.type)?.content||"")}finally{G(!1),U(null)}},[W,F,eo]),ec=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=F.filter(e=>"model"===e.role).pop();e&&e.id!==ec.current&&e.parts[0]?.content.length>0&&(ec.current=e.id,setTimeout(()=>{if(er.current&&ea.current){let e=ea.current,t=er.current,a=e.getBoundingClientRect(),r=t.getBoundingClientRect().top-a.top+e.scrollTop-8;e.scrollTo({top:r,behavior:"smooth"})}},300))},[F]),(0,n.useEffect)(()=>{if(!(F.length>0)){if(e){if(en.current)return;en.current=!0,et(!1),ed({role:"user",parts:[{type:"image",content:e},{type:"text",content:"en"===u?"Analyze this image and tell me whether this product or ingredient list is FODMAP-friendly. Give a clear conclusion (low, medium, or high FODMAP) and explain why.":"Analyseer deze afbeelding en vertel me of dit product of deze ingredi\xebntenlijst FODMAP-vriendelijk is. Geef een duidelijke conclusie (laag, gemiddeld, of hoog FODMAP) en leg uit waarom."}],id:`user-${Date.now()}`})}else if(t){if(el.current)return;el.current=!0,et(!1),ed({role:"user",parts:[{type:"text",content:t}],id:`user-${Date.now()}`})}}},[e,t,F.length,ed]);let eu=async e=>{let t=e.target.files?.[0];if(!t)return;let a=t.type.startsWith("image/");if(a&&t.size>0xa00000){alert(o("errors.imageTooLarge",{size:(t.size/1024/1024).toFixed(1)})),e.target.value="";return}if(!a&&t.size>5242880){alert(o("errors.fileTooLarge",{size:(t.size/1024/1024).toFixed(1)})),e.target.value="";return}if(a){let e=new FileReader;e.onload=e=>{let t={role:"user",parts:[{type:"image",content:e.target?.result},{type:"text",content:M(u)}],id:`user-${Date.now()}`};q(!1),ed(t)}
107,e.readAsDataURL(t)}else try{let a=new FormData;a.append("file",t);let r=await fetch("/api/upload-docx",{method:"POST",body:a}),n=await r.json();if(!r.ok){alert(n.error||o("errors.uploadFailed")),e.target.value="";return}let l=n.content||"",s="";l.length>1e4&&(l=l.substring(0,1e4),s=o("documentTruncated",{max:1e4,total:n.characterCount}));let i={role:"user",parts:[{type:"text",content:o("documentMessage",{filename:t.name,content:l,truncatedNote:s})}],id:`user-${Date.now()}`};q(!1),ed(i)}catch{alert(o("errors.fileFormat")),e.target.value=""}e.target.value=""},em=(0,n.useRef)(null);return(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)("div",{ref:ea,className:`flex-1 overflow-y-auto px-3 pt-3 sm:px-6 sm:pt-6 ${P?"pb-40":"pb-12"}`,children:ee&&0===F.length?(0,r.jsxs)("div",{className:"flex flex-col items-center pt-6 text-center px-4",children:[(0,r.jsx)("div",{className:"w-20 h-20 sm:w-24 sm:h-24 rounded-full mb-4 shadow-lg ring-4 ring-white overflow-hidden",children:(0,r.jsx)(k.default,{src:"/ai-lisa-v2.png",alt:"AI-Lisa",width:96,height:96,className:"w-full h-full object-cover object-top"})}),(0,r.jsx)("h2",{className:"text-xl sm:text-2xl font-bold text-gray-800 mb-2",children:w.name?o("welcome.greetingNamed",{name:w.name}):o("welcome.greeting")}),(0,r.jsxs)("p",{className:"text-gray-600 mb-2 max-w-md text-sm sm:text-base",children:[o("welcome.intro")," ",(0,r.jsx)("strong",{children:o("welcome.introBoldProducts")}),o("welcome.introSuffix")]}),$&&(0,r.jsx)("div",{className:"mb-4 px-4 py-2 bg-pink-50 border border-pink-200 rounded-full",children:(0,r.jsxs)("p",{className:"text-sm text-pink-700 flex items-center gap-2",children:[(0,r.jsx)(m.A,{className:"w-4 h-4"}),(0,r.jsxs)("span",{children:[1===w.intolerances.length?o("welcome.profileBadgeOne"):o("welcome.profileBadgeMany")," ",(0,r.jsx)("strong",{children:w.intolerances.map(e=>d(`${e}.label`)).join(", ")})]})]})}),!$&&I&&(0,r.jsxs)(v(),{href:"/mijn-profiel",className:"mb-4 px-4 py-2 bg-gray-50 border border-gray-200 rounded-full text-sm text-gray-600 hover:bg-gray-100 flex items-center gap-2",children:[(0,r.jsx)(m.A,{className:"w-4 h-4"}),o("welcome.noProfileHint")]}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-6 max-w-sm",children:o("welcome.tip")}),(0,r.jsx)("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-3 max-w-lg",children:R.map(e=>{let t=e.icon,a=o(`quickActions.${e.key}`);return(0,r.jsxs)("button",{onClick:()=>{B(a),et(!1),ed({role:"user",parts:[{type:"text",content:a}],id:`user-${Date.now()}`})},className:`flex items-center gap-2 px-3 sm:px-4 py-2 rounded-full text-xs sm:text-sm font-medium transition-all duration-200 ${e.color} shadow-sm hover:shadow-md`,children:[(0,r.jsx)(t,{className:"w-4 h-4"}),(0,r.jsx)("span",{children:a})]},e.key)})}),(0,r.jsx)("p",{className:"text-[10px] sm:text-xs text-gray-400 mt-6 max-w-sm",children:o("welcome.disclaimerMedical")}),(0,r.jsx)("p",{className:"text-[10px] sm:text-xs text-gray-400 mt-2 max-w-sm",children:o("welcome.disclaimerPrivacy")})]}):(0,r.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(a=F.filter(e=>"model"===e.role).pop()?.id,F.map(e=>(0,r.jsxs)("div",{ref:e.id===a?er:null,className:`flex flex-col ${"user"===e.role?"items-end":"items-start"}`,children:[(0,r.jsxs)("div",{className:`flex items-center gap-2 mb-1 px-1 ${"user"===e.role?"flex-row-reverse":""}`,children:["model"===e.role&&(0,r.jsx)("div",{className:"w-7 h-7 rounded-full overflow-hidden ring-2 ring-white shadow-sm",children:(0,r.jsx)(k.default,{src:"/ai-lisa-v2.png",alt:"AI-Lisa",width:28,height:28,className:"w-full h-full object-cover object-top"})}),(0,r.jsx)("span",{className:"text-xs font-medium text-gray-500",children:"user"===e.role?o("labels.you"):o("labels.aiLisa")})]}),(0,r.jsx)("div",{className:`max-w-[95%] sm:max-w-[90%] rounded-2xl p-3 sm:p-4 ${"user"===e.role?"bg-gradient-to-br from-purple-500 to-purple-600":"bg-white text-gray-800 shadow-md border border-gray-100"}`,children:e.parts.map((t,a)=>"image"===t.type?(0,r.jsx)(k.default,{src:t.content,alt:o("labels.analyzedImage"),width:300,height:300,className:"rounded-lg mb-2 max-w-full h-auto"},a):"text"===t.type?(0,r.jsx)(j,{content:t.content,variant:"user"===e.role?"dark":"light"},a):null)})]},e.id))),H&&!Y&&(0,r.jsxs)("div",{className:"flex flex-col items-start",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1 px-1",children:[(0,r.jsx)("div",{className:"w-7 h-7 rounded-full overflow-hidden ring-2 ring-white shadow-sm animate-pulse",children:(0,r.jsx)(k.default,{src:"/ai-lisa-v2.png",alt:"AI-Lisa",width:28,height:28,className:"w-full h-full object-cover object-top"})}),(0,r.jsx)("span",{className:"text-xs font-medium text-gray-500",children:o("labels.aiLisa")})]}),(0,r.jsx)("div",{className:"bg-white rounded-2xl p-4 shadow-md border border-gray-100",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-purple-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),(0,r.jsx)("div",{className:"w-2 h-2 bg-purple-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),(0,r.jsx)("div",{className:"w-2 h-2 bg-purple-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),(0,r.jsx)("span",{className:"text-sm text-gray-500",children:o("labels.thinking")})]})})]}),V&&(0,r.jsx)("div",{className:"text-red-600 bg-red-50 p-3 rounded-lg text-sm border border-red-200",children:V}),es&&(0,r.jsxs)("div",{className:"bg-purple-50 border border-purple-200 rounded-2xl p-5 text-center",children:[(0,r.jsx)("div",{className:"w-12 h-12 mx-auto mb-3 bg-purple-100 rounded-full flex items-center justify-center",children:(0,r.jsx)(p.A,{className:"w-6 h-6 text-purple-600"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold text-purple-800 mb-2",children:o("limit.title")}),(0,r.jsx)("p",{className:"text-sm text-purple-700 mb-4",children:o("limit.body")}),(0,r.jsxs)("button",{onClick:ei,className:"inline-flex items-center gap-2 px-5 py-3 bg-purple-600 hover:bg-purple-700 text-white font-medium rounded-full transition-colors shadow-md",children:[(0,r.jsx)(g.A,{className:"w-5 h-5"}),o("limit.newChat")]})]})]})}),(0,r.jsxs)("div",{className:`fixed left-0 right-0 p-3 sm:p-4 bg-white/90 backdrop-blur-sm z-40 transition-all duration-300 ${P?"bottom-[
107120px]":"bottom-[16px]"}`,children:[es?(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)("button",{onClick:ei,className:"inline-flex items-center gap-2 px-5 py-3 bg-purple-600 hover:bg-purple-700 text-white font-medium rounded-full transition-colors shadow-md",children:[(0,r.jsx)(g.A,{className:"w-5 h-5"}),o("limit.newChat")]})}):(0,r.jsxs)(r.Fragment,{children:[T(W).hasUrl&&(0,r.jsxs)("div",{className:"mb-3 p-3 bg-amber-50 border border-amber-200 rounded-xl flex items-start gap-3",children:[(0,r.jsx)(h,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsxs)("p",{className:"font-medium text-amber-800",children:[o("urlWarning.platformPrefix")," ",T(W).platform||o("urlWarning.webFallback")," ",o("urlWarning.platformSuffix")]}),(0,r.jsx)("p",{className:"text-amber-700 mt-1",children:o("urlWarning.body")})]})]}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),ed()},className:"flex items-center gap-2 w-full",children:[(0,r.jsxs)("div",{className:"flex-shrink-0 flex items-center gap-1",children:[F.length>0&&(0,r.jsx)("button",{type:"button",onClick:ei,disabled:H,className:"p-3 min-w-[44px] min-h-[44px] text-purple-600 hover:bg-purple-50 rounded-full transition-all duration-200 disabled:text-gray-300 disabled:hover:bg-transparent flex items-center justify-center","aria-label":o("input.newConversation"),title:o("input.newConversation"),children:(0,r.jsx)(g.A,{className:"w-6 h-6"})}),(0,r.jsx)("button",{type:"button",onClick:()=>Z(!0),disabled:H,className:"p-3 min-w-[44px] min-h-[44px] text-purple-600 hover:bg-purple-50 rounded-full transition-all duration-200 disabled:text-gray-300 disabled:hover:bg-transparent flex items-center justify-center","aria-label":o("input.takePhoto"),title:o("input.takePhoto"),children:(0,r.jsx)(f.A,{className:"w-6 h-6"})}),(0,r.jsx)("button",{type:"button",onClick:()=>em.current?.click(),disabled:H,className:"p-3 min-w-[44px] min-h-[44px] text-purple-600 hover:bg-purple-50 rounded-full transition-all duration-200 disabled:text-gray-300 disabled:hover:bg-transparent flex items-center justify-center","aria-label":o("input.uploadFile"),title:o("input.uploadFile"),children:(0,r.jsx)(x,{className:"w-6 h-6"})}),(0,r.jsx)("input",{ref:em,type:"file",accept:"image/*,.pdf,.docx,.txt",onCh
107ange:eu,className:"hidden"})]}),(0,r.jsx)("input",{type:"text",value:W,onChange:e=>B(e.target.value),placeholder:o("input.placeholder"),className:"flex-1 min-w-0 px-4 py-3 text-base border-2 border-gray-200 rounded-full focus:outline-none focus:ring-2 focus:ring-purple-400 focus:border-transparent transition-all duration-200 bg-gray-50 focus:bg-white relative z-50",disabled:H}),(0,r.jsx)("button",{type:"submit",disabled:H||!W.trim(),className:"flex-shrink-0 p-3 bg-gradient-to-r from-purple-500 to-purple-600 text-white rounded-full disabled:from-gray-300 disabled:to-gray-300 transition-all duration-200 hover:from-purple-600 hover:to-purple-700 shadow-md hover:shadow-lg disabled:shadow-none","aria-label":o("input.send"),title:o("input.sendTitle"),children:(0,r.jsx)(i,{className:"w-5 h-5"})})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-1.5 mt-2 text-xs text-gray-500",children:[(0,r.jsx)("span",{children:o("serviceDisclaimer")}),(0,r.jsxs)("a",{href:"https://wa.me/31302272172",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 px-2 py-1 bg-green-100 hover:bg-green-200 text-green-700 rounded-full font-medium transition-colors","aria-label":o("whatsapp"),children:[(0,r.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),(0,r.jsx)("span",{children:"WhatsApp"})]})]})]}),X&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:(0,r.jsxs)("div",{className:"bg-white rounded-2xl p-6 max-w-sm w-full shadow-xl text-center",children:[(0,r.jsx)("div",{className:"w-12 h-12 mx-auto mb-3 bg-purple-100 rounded-full flex items-center justify-center",children:(0,r.jsx)(c.A,{className:"w-6 h-6 text-purple-600"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:o("resume.title")}),(0,r.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:o("resume.body")}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("button",{onClick:()=>{Q(!1),ei()},className:"w-full px-4 py-3 bg-purple-600 hover:bg-purple-700 text-white font-medium rounded-full transition-colors",children:o("resume.newChat")}),(0,r.jsx)("button",{onClick:()=>Q(!1),className:"w-full px-4 py-3 border border-purple-200 text-purple-600 font-medium rounded-full hover:bg-purple-50 transition-colors",children:o("resume.continue")})]})]})}),_&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:(0,r.jsxs)("div",{className:"bg-white rounded-2xl p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:o("cameraModal.title")}),(0,r.jsx)("button",{onClick:()=>Z(!1),className:"p-3 min-w-[44px] min-h-[44px] hover:bg-gray-100 rounded-full transition-colors flex items-center justify-center","aria-label":o("cameraModal.close"),children:(0,r.jsx)(b.A,{className:"w-6 h-6"})})]}),(0,r.jsx)(y.A,{onCapture:(e,t)=>
107{let a={role:"user",parts:[{type:"image",content:e},{type:"text",content:M(u)}],id:`user-${Date.now()}`};Z(!1),ed(a)}})]})})]})}},8481:(e,t,a)=>{a.d(t,{default:()=>d});var r=a(5155),n=a(2115),l=a(3321),s=a(910),i=a(5772),o=a(1267);function d({title:e,subtitle:t,showBackButton:a=!1,onBackClick:d,titleColor:c="text-intoleran-red"}){let u=(0,s.c)("header"),m=(0,l.useRouter)(),[p,g]=(0,n.useState)(!0),[h,f]=(0,n.useState)(0);(0,n.useEffect)(()=>{let e=()=>{let e=window.scrollY;e<50?g(!0):e>h?g(!1):g(!0),f(e)};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[h]);let x=d||(()=>m.back());return(0,r.jsx)("header",{className:`sticky top-0 z-40 shadow-sm border-b border-gray-200 transition-transform duration-300 ${p?"translate-y-0":"-translate-y-full"}`,style:{backgroundColor:"#FFF9F7"},children:(0,r.jsx)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"flex items-center justify-between h-14",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[a&&(0,r.jsx)("button",{onClick:x,className:"p-3 -ml-2 rounded-full hover:bg-gray-200 transition-colors min-w-[44px] min-h-[44px] flex items-center justify-center","aria-label":u("backButton"),children:(0,r.jsx)(o.A,{className:"h-6 w-6 text-intoleran-grey"})}),(0,r.jsxs)("h1",{className:`text-base sm:text-lg font-bold ${c} truncate flex items-center gap-1.5`,children:[e,(0,r.jsx)("span",{className:"inline-flex items-center bg-intoleran-red text-white text-[10px] sm:text-xs font-semibold px-1.5 py-0.5 rounded-full leading-none uppercase tracking-wide",children:u("betaBadge")})]})]}),(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)(i.default,{src:"/images/intoleran-logo.png",alt:u("logoAlt"),width:120,height:36,className:"w-[120px] h-auto",priority:!0})})]})})})}},8508:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(2115);let n=r.forwardRef(function({title:e,titleId:t,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z"}))})},9326:(e,t,a)=>{a.d(t,{s:()=>s});var r=a(2115);let n="fodmap-user-profile",l={name:"",intolerances:[],responseStyle:"kort"};function s(){let[e,t]=(0,r.useState)(l),[a,s]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=localStorage.getItem(n);if(e)try{let a=JSON.parse(e);a.responseStyle||(a.responseStyle="kort"),t(a)}catch(e){console.error("Error parsing saved profile:",e)}s(!0)},[]);let i=e.intolerances.length>0,o={fructose:"Fructose",lactose:"Lactose",mannitol:"Mannitol",sorbitol:"Sorbitol",gos:"GOS",fructan:"Fructanen",csid:"Zetmeel (CSID)"},d=()=>e.intolerances.map(e=>o[e]);return{profile:e,loaded:a,hasIntolerances:i,saveProfile:e=>{t(e),localStorage.setItem(n,JSON.stringify(e))},getIntoleranceLabels:d,getProfileDescription:()=>{if(!i)return"";let t=d(),a=e.name?`${e.name} heeft`:"De gebruiker heeft";if(1===t.length)return`${a} een ${t[0].toLowerCase()}-intolerantie.`;let r=t.pop();return`${a} intoleranties voor ${t.join(", ")} en ${r}.`}}}}}]);

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.