PageSourceSearch

https://realmealsco.com/chunk-IWV3TV2M.js

js realmealsco.com collected 2026-10-10 00:17:48 UTC 1,953 bytes, 1 lines download raw bytes

1import{Ta as s,cb as f}from"./chunk-QWCWCML6.js";import{I as d}from"./chunk-PDPZQQLO.js";function m(e,t){return e<=0&&t>0}function A(e,t){return e?.allowAdditionsWithoutMealItems??t?.allow_additions_without_meal_items??!1}function P(e,t,n){return e!==!0&&m(t,n)}function M(e,t,n,i){return b(e,n)?i===!0&&m(e,t):!0}function T(e,t){return e.reduce((n,i)=>{let o=Number(i.product_id);return i.mpextra===!0||t.has(o)||f(i)?n:n+i.qty},0)}function k(e,t){return e!=null&&Number.isFinite(e)?e:t}function b(e,t){return!Number.isFinite(t)||t<=0?!1:e<t}function _(e){return e.filter(t=>t.id!==s).map(t=>d(t.name).trim()).filter(t=>t.length>0)}function q(e){if(!e?.length)return[];let t=new Set;for(let n of e)Number.isFinite(n.id)&&n.id>0&&t.add(Math.trunc(n.id));return[...t]}function p(e){return e.length===0?"main categories":e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}function w(e){let n=`Additions cannot be purchased from this plan without adding items from the ${p(e.mainCategoryTitles)}`;return e.suggestedPlanTitle?`${n} please switch your plan to ${d(e.suggestedPlanTitle)}`:`${n}.`}function C(e,t,n,i){if(n.length===0)return null;let o=new Set(n),u=null,r=0;for(let a of e){if(i!=null&&a.id===i)continue;let c=t.get(a.id)??[],l=0;for(let y of c)o.has(y)&&(l+=1);l>r&&(r=l,u=a)}return r>0?u:null}function I(e){let t=new Map;for(let n of e)t.set(n.id,(t.get(n.id)??0)+n.quantity);return t}function $(e,t){if(e.length===0)return[];let n=e.reduce((r,a)=>r+a.quantity,0),i=t-n;if(t<=0)return e.map(r=>({type:"remove",key:r.key}));if(i===0)return[];if(i>0){let r=e[0];return[{type:"update",key:r.key,quantity:r.quantity+i}]}let o=-i,u=[];for(let r of e){if(o<=0)break;r.quantity<=o?(o-=r.quantity,u.push({type:"remove",key:r.key})):(u.push({type:"update",key:r.key,quantity:r.quantity-o}),o=0)}return u}export{A as a,P as b,M as c,T as d,k as e,b as f,_ as g,q as h,w as i,C as j,I as k,$ as l};

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.