PageSourceSearch

https://morrillgrocery.com/assets/ColorPage-v8KFcD2s.js

js morrillgrocery.com collected 2026-10-08 23:35:19 UTC 6,323 bytes, 1 lines download raw bytes

1import{aF as T,r as j,j as e,M as $,aW as H,k as M,d as D,aX as P,aY as k,a_ as B,aZ as A,aw as G,b1 as W,H as U,aG as R,aE as X,aH as S}from"./index-C6Icb2Tt.js";import{s as z,a as O}from"./ProduceColorsAside-B_9llZ36.js";import{T as V,g as Y,a as Z,c as F,t as q,E as J,b as K,d as Q,e as ee}from"./TransitionWrapper-qcguF1gp.js";import{H as L,a as se}from"./InSeasonBlurbAside-jMXO5BRU.js";import{F as oe}from"./FoodsSidebar-CLkoHhre.js";import"./ArticlesAside-BKUXVvdN.js";import"./GlossaryTermsAside-dlmNIe8q.js";function b(...s){return s.filter(o=>o!=null).reduce((o,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return o===null?t:function(...n){o.apply(this,n),t.apply(this,n)}},null)}const te={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function le(s,o){const t=`offset${s[0].toUpperCase()}${s.slice(1)}`,l=o[t],n=te[s];return l+parseInt(F(o,n[0]),10)+parseInt(F(o,n[1]),10)}const ae={[ee]:"collapse",[Q]:"collapsing",[K]:"collapsing",[J]:"collapse show"},I=T.forwardRef(({onEnter:s,onEntering:o,onEntered:t,onExit:l,onExiting:n,className:g,children:m,dimension:p="height",in:d=!1,timeout:x=300,mountOnEnter:u=!1,unmountOnExit:f=!1,appear:r=!1,getDimensionValue:h=le,...c},_)=>{const a=typeof p=="function"?p():p,N=j.useMemo(()=>b(i=>{i.style[a]="0"},s),[a,s]),C=j.useMemo(()=>b(i=>{const w=`scroll${a[0].toUpperCase()}${a.slice(1)}`;i.style[a]=`${i[w]}px`},o),[a,o]),E=j.useMemo(()=>b(i=>{i.style[a]=null},t),[a,t]),v=j.useMemo(()=>b(i=>{i.style[a]=`${h(a,i)}px`,q(i)},l),[l,h,a]),y=j.useMemo(()=>b(i=>{i.style[a]=null},n),[a,n]);return e.jsx(V,{ref:_,addEndListener:Z,...c,"aria-expanded":c.role?d:null,onEnter:N,onEntering:C,onEntered:E,onExit:v,onExiting:y,childRef:Y(m),in:d,timeout:x,mountOnEnter:u,unmountOnExit:f,appear:r,children:(i,w)=>T.cloneElement(m,{...w,className:$(g,m.props.className,ae[i],a==="width"&&"collapse-horizontal")})})});I.displayName="Collapse";function ne({item:s,colorSlug:o,expanded:t,onToggle:l,getFoodsTipByName:n,getFoodBlurb:g,getInSeasonHeaderForFood:m,navigate:p}){const d=n(s.name),x=g(s.name),u=m(s.name),f=d!=null&&d.trivia!=="",r=f||x!=null,h=[];return e.jsx("li",{className:"food-list-item mb-4",children:e.jsx("section",{className:"food-summary","aria-labelledby":`food-title-${s.id}`,children:e.jsxs("div",{className:"row g-3 align-items-start",children:[e.jsx("div",{className:"col-12 col-sm-auto",children:e.jsx("img",{src:`https://files.mschost.net/health_wellness/images/produce/${s.id}.jpg`,alt:s.name,className:"img-fluid food-summary__image d-block"})}),e.jsxs("div",{className:"col",children:[e.jsx("h3",{className:"text-theme-header",id:`food-title-${s.id}`,children:s.name}),e.jsx("div",{className:"food-summary__description",dangerouslySetInnerHTML:{__html:s.description}}),r&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"btn button_color bg-theme-button text-white mt-3",type:"button",onClick:l,"aria-expanded":t,"aria-controls":`food-details-${s.id}`,children:"More Details..."}),e.jsx(I,{in:t,children:e.jsx("div",{className:"more-details mt-3",id:`food-details-${s.id}`,children:e.jsxs("div",{className:"p-3 border rounded",children:[f&&e.jsxs(e.Fragment,{children:[e.jsx(S,{title:"Trivia"}),e.jsx("div",{dangerouslySetInnerHTML:{__html:d.trivia.replaceAll("|","</p><p>")}})]}),x!=null&&e.jsx("div",{dangerouslySetInnerHTML:{__html:x}}),u!=null&&u.length>0&&e.jsx(S,{title:u,class:"mt-3"}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(S,{title:"RECIPES"}),e.jsxs("div",{className:"recipeDetai",children:[h.map((c,_)=>e.jsx("li",{},`color_recipe_detail_link_${_}`)),e.jsx("a",{onClick:()=>p(`/recipes/search/${o}`),className:"recMore",children:`>>> find more ${o.replaceAll("-"," ")} recipes`})]})]})]})})})]})]})]})})})}function re({colors:s,navigate:o,onColorsClick:t}){return e.jsxs("div",{className:"col-12 text-start",children:[e.jsx(L,{parentLabel:"Colors",onParentClick:t,currentLabel:void 0}),e.jsxs("article",{className:"health-wellness-article",role:"contentinfo","aria-labelledby":"produce_color_index_title",children:[e.jsx(U,{title:"Produce Color",id:"produce_color_index_title"}),e.jsx("p",{children:"Produce that share color often share health benefits. Learn about eating b
1y color!"}),e.jsx("ul",{className:"produce-colors-list",children:s?.map(l=>e.jsx("li",{className:l,children:e.jsx("a",{onClick:()=>o(`/health_wellness/colors/${l}`),className:"text-decoration-none",children:R(l)})},`product_main_colors_${l}`))})]})]})}function ie({colorSlug:s,title:o,blurb:t,produceFoods:l,navigate:n,getFoodsTipByName:g,getFoodBlurb:m,getInSeasonHeaderForFood:p}){const[d,x]=j.useState(()=>new Set),u=()=>n("/health_wellness/colors"),f=r=>{x(h=>{const c=new Set(h);return c.has(r)?c.delete(r):c.add(r),c})};return e.jsxs("div",{className:"col-12 text-start",children:[e.jsx(L,{parentLabel:"Colors",onParentClick:u,currentLabel:R(s)}),e.jsxs("article",{className:"health-wellness-article",role:"contentinfo","aria-labelledby":"produce_color_detail_title",children:[e.jsx(X,{title:o??null,id:"produce_color_detail_title"}),e.jsx("p",{dangerouslySetInnerHTML:{__html:t??""}})]}),e.jsx("ul",{className:"foods-list list-unstyled p-0 m-0",children:l?.map(r=>e.jsx(ne,{item:r,colorSlug:s,expanded:d.has(r.id),onToggle:()=>f(r.id),getFoodsTipByName:g,getFoodBlurb:m,getInSeasonHeaderForFood:p,navigate:n},r.id))}),e.jsx(se,{label:"Return To Colors",onReturn:u})]})}function fe(){H();const{name:s}=M(),o=D(),{getRandomArticles:t}=P(),{getDistinctFoodColors:l,getProduceColorHeaderByColor:n,getProduceColors:g}=k(),{getInSeasonByName:m,getInSeasonHeaderForFood:p,getFoodBlurb:d}=B(),{getRandomNutritionGlossaries:x}=A(),{getSeasonalRecipes:u}=G(),{getFoodsTipByName:f}=W(),r=new Date().toLocaleDateString("en-US",{month:"long"}),h=z(s),c=n(h),_=g()?.filter(y=>y.color===h&&y.type==="food"),a=s===void 0,N=!a,C=N?c?.name:void 0,E=N?c?.description:void 0,v=()=>o("/health_wellness/colors");return e.jsxs(O,{sidebar:e.jsx(oe,{inSeasonBlurb:m(r)?.blurb,articles:t(5),recipes:u(),colors:l(),glossaryTerms:x(10),navigate:o}),children:[a&&e.jsx(re,{colors:l(),navigate:o,onColorsClick:v}),N&&s&&e.jsx(ie,{colorSlug:s,title:C,blurb:E,produceFoods:_,navigate:o,getFoodsTipByName:f,getFoodBlurb:d,getInSeasonHeaderForFood:p})]})}export{fe 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.