PageSourceSearch

https://assets.foodi.de/_nuxt/CjVc4fYj.js

js foodi.de collected 2026-09-24 13:25:45 UTC 4,609 bytes, 1 lines download raw bytes

1import{d as b,u as w,e as g,f as p,g as m,t as h,h as d,q as L,k as u,_ as A,as as N,o as F,aK as C,G as B,s as I}from"./Deum5oGV.js";const T=80;function E(t,e){return t>5?!0:t>=2&&e!=null?e>=T:!1}function W(t){return!t.reviewAllowed||t.isNew?!1:E(t.reviewCount,t.avg)}function Y(t){return Math.round(t/20*10)/10}const D=10,x=3,R=25,k=3;function s(t){const e=typeof t=="string"?parseFloat(t):t??0;return Number.isFinite(e)?e:0}function Z(t){return new Set(t.filter(e=>s(e.item_orders_week)>=R).sort((e,n)=>{const i=s(n.item_orders_week)-s(e.item_orders_week);return i!==0?i:s(e.id)-s(n.id)}).slice(0,x).map(e=>s(e.id)))}function q(t){return s(t.item_orders_30min)>=k}function z(t){const e=s(t);return e>=D?e:null}function H(t){const e=String(t.getHours()).padStart(2,"0"),n=String(t.getMinutes()).padStart(2,"0");return`${e}:${n}`}let f;function Q(t){try{if(f===void 0&&(f=new Intl.DateTimeFormat("de-DE",{timeZone:"Europe/Berlin",hour:"2-digit",minute:"2-digit",hourCycle:"h23"})),f){const e=/(\d{1,2})[:.](\d{2})/.exec(f.format(t)),n=e?.[1],i=e?.[2];if(n&&i)return`${n.padStart(2,"0")}:${i}`}}catch{f=null}return H(t)}function X(t,e){if(!Array.isArray(t))return null;let n=null;for(const i of t){const o=typeof i?.open=="string"?i.open.trim().slice(0,5):"";/^\d{2}:\d{2}$/.test(o)&&(o<e||(n===null||o<n)&&(n=o))}return n}function tt(t){if(t==null)return!1;const e=typeof t=="number"?t:Number(String(t).trim());return Number.isFinite(e)&&e>0}function et(t){return t.unavailable?!0:t.openNow?!1:!t.opensAgainToday}function _(t){if(typeof t!="string")return"";const e=/^(\d{1,2}):(\d{2})/.exec(t.trim()),n=e?.[1],i=e?.[2];return!n||!i?"":`${n.padStart(2,"0")}:${i}`}function nt(t){const e=_(t);return e!==""&&e<="05:00"}function rt(t){if(!t||typeof t!="object")return{state:"closedToday",time:""};const e=t.isOpen;return e===!0||e===1||typeof e=="string"&&e.trim()!==""&&e.trim()!=="0"?{state:"openUntil",time:_(t.close)}:{state:"opensAt",time:_(t.open)}}const M=["aria-label"],$={class:"ui-rating__value"},U={key:0,class:"ui-rating__count"},P=b({__name:"UiRatingBadge",props:{rating:{},count:{default:null}},setup(t){const e=t,{t:n}=w(),i=u(()=>typeof e.rating=="number"?e.rating.toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1}):e.rating),o=u(()=>{const r=e.count;return typeof r=="number"&&Number.isFinite(r)&&r>0?r:null}),a=u(()=>{const r=o.value;return r===null?null:n("common.reviewsCount",{count:r.toLocaleString("de-DE")})}),c=u(()=>{const r=o.value;return r===null?n("a11y.ratingBadge",{rating:i.value}):n("a11y.ratingBadgeWithCount",{rating:i.value,count:r.toLocaleString("de-DE")},r)});return(r,l)=>(g(),p("span",{class:"ui-rating",role:"img","aria-label":d(c)},[l[0]||(l[0]=m("span",{class:"ui-rating__star","aria-hidden":"true"},"★",-1)),m("span",$,h(d(i)),1),d(a)?(g(),p("span",U,h(d(a)),1)):L("",!0)],8,M))}}),it=Object.assign(A(P,[["__scopeId","data-v-2b13ab9f"]]),{__name:"UiRatingBadge"}),O="foodi:favorites";let y=!1;function G(){try{const t=window.localStorage.getItem(O);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.length>0):[]}catch{return[]}}function S(t){try{window.localStorage.setItem(O,JSON.stringify(t))}catch{}}function V(){const t=N("favorites",()=>[]);function e(){y||(y=!0,t.value=G())}F(e);function n(r){return t.value.includes(r)}function i(r){!r||t.value.includes(r)||(t.value=[...t.value,r],S(t.value))}function o(r){t.value.includes(r)&&(t.value=t.value.filter(l=>l!==r),S(t.value))}function a(r){r&&(t.value.includes(r)?o(r):i(r))}const c=u(()=>t.value.length);return{favorites:C(t),count:c,isFavorite:n,add:i,remove:o,toggle:a,ensureHydrated:e}}const j=["aria-pressed","aria-label","title"],K=b({__name:"FavoriteButton",props:{slug:{}},setup(t){const e=t,{t:n}=w(),{isFavorite:i,toggle:o}=V(),a=u(()=>!!e.slug&&i(e.slug)),c=u(()=>a.value?n("favorites.remove"):n("favorites.add"));function r(){e.slug&&o(e.slug)}return(l,v)=>(g(),p("button",{type:"button",class:I(["fav-btn",{"is-active":a.value}]),"aria-pressed":a.value,"aria-label":c.value,title:c.value,onClick:B(r,["stop","prevent"])},[...v[0]||(v[0]=[m("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true"},[m("path",{d:"M12 20.35 10.55 19C5.4 14.36 2 11.28 2 7.5 2 4.42 4.42 2 7.5 2c1.74 0 3.41.81 4.5 2.09C13.09 2.81 14.76 2 16.5 2 19.58 2 22 4.42 22 7.5c0 3.78-3.4 6.86-8.55 11.5L12 20.35Z"})],-1)])],10,j))}}),ot=Object.assign(A(K,[["__scopeId","data-v-776256a9"]]),{__name:"HostFavoriteButton"});export{ot as F,it as U,nt as a,et as b,_ as c,tt as d,Q as e,q as i,rt as m,X as n,z as o,Z as p,Y as r,W as s,V as u};

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.