PageSourceSearch

https://shop.primefoods.ru/build/assets/RecipesPage-Yt2rXRXv.js

js primefoods.ru collected 2026-10-07 23:49:23 UTC 6,990 bytes, 1 lines download raw bytes

1import{z as H,D as M,Y as r,az as X,d as G,R as L,k as y,r as K,c as d,o as l,e as _,i as h,b as i,w as u,t as p,u as a,h as Q,a as n,a3 as N,l as D,g as b,aK as W,W as Y,F as q,M as J,ar as O,X as I,_ as Z}from"./app-DFGEcP7D.js";import{_ as ee}from"./RecipeCard.vue_vue_type_script_setup_true_lang-DFr57lqz.js";import{_ as te}from"./AddToFavorite.vue_vue_type_script_setup_true_lang-vbEV6RoM.js";import{I as se}from"./IconCircleCross-ELF2hwdL.js";import{m as ae}from"./makePageHrefBuilder-D1qCe8cX.js";import{_ as ie}from"./EmptyPlug.vue_vue_type_script_setup_true_lang-Ba_VXVUW.js";import{_ as oe}from"./VPagination.vue_vue_type_script_setup_true_lang-CdN5OV71.js";import{_ as re}from"./VShare.vue_vue_type_style_index_0_lang-CAwQuc5R.js";import{_ as le}from"./SelectButton.vue_vue_type_script_setup_true_lang-Dqm0HNVV.js";import"./IconChefHat-BxXtf1xc.js";import"./IconClockOutline-DhU4KB0_.js";import"./getFormattedTime-Cy-yl88P.js";const ne=["content"],ce=["content"],me={ref:"recipes-page"},ue={class:"rounded-20 catalog-banner mb-4 h-50 bg-gray-100 mask-[url(../../images/masks/for_catalog_mobile.svg)] mask-size-[100%_auto] mask-bottom-left mask-no-repeat px-4 pt-4 min-[425px]:mask-[url(../../images/masks/for_catalog.svg)] min-[425px]:mask-size-[auto_100%] lg:h-65 lg:px-8 lg:pt-8"},pe={class:"flex h-42 max-w-1/2 flex-col justify-end gap-4 pb-8 lg:h-47 lg:justify-between"},de={class:"font-vast text-vast-mob-title-bold lg:text-vast-title-bold text-white"},_e={class:"flex flex-col justify-between gap-2 lg:flex-row lg:items-center"},ge={class:"inline-flex gap-2"},fe={key:0,class:"bg-input text-subsidiary-reg inline-flex max-w-full items-center gap-2 self-start rounded-[50px] px-3 py-2"},he={class:"truncate"},xe={key:1,class:"bg-light-gray mx-auto mt-16 max-w-[1200px] rounded-[40px] md:mt-30"},ye={class:"flex flex-col items-center gap-8 px-4 py-8 md:gap-15 lg:flex-row lg:px-48"},be={key:3,class:"mt-8 grid grid-cols-2 gap-2 md:grid-cols-4 md:gap-8"},v=16,ve=H({__name:"RecipesPage",props:{recipes:{},recipeCategories:{},seoData:{},h1:{},selectedSelectionIds:{},selectionPath:{}},setup(F){var S,C,V;const{isDesktop:k}=M(),w=[{label:"Главная",route:r("main-page")},{label:"Рецепты",route:r("recipe.index")}],R=X("recipes-page"),c=F,o=G({selection_id:(c.selectedSelectionIds??((S=r().queryParams)==null?void 0:S.selection_id)??[]).map(String),recipe_search:((C=r().queryParams)==null?void 0:C.recipe_search)??void 0});L(()=>c.selectedSelectionIds,t=>{o.selection_id=(t??[]).map(String)});const $=y(()=>c.h1||"Рецепты"),x=y(()=>[...c.recipeCategories]),E=t=>x.value.filter(s=>t.includes(String(s.id))&&!!s.slug).sort((s,e)=>{const m=s.url_priority??Number.MAX_SAFE_INTEGER,f=e.url_priority??Number.MAX_SAFE_INTEGER;return m!==f?m-f:Number(s.id)-Number(e.id)}),T=t=>t.length===0?!1:t.every(s=>{const e=x.value.find(m=>String(m.id)===String(s));return!!(e!=null&&e.slug)}),P=(t,s)=>{const e={};if(s&&(e.recipe_search=s),t.length>0&&T(t)){const m=E(t).map(f=>f.slug).join("/");return{url:r("recipe.selection",{selectionPath:m}),query:e}}return t.length>0&&(e.selection_id=t),{url:r("recipe.index"),query:e}},U=()=>{o.recipe_search="";const{url:t,query:s}=P(o.selection_id.map(String));I.get(t,s,{only:["recipes","recipeCategories","seoData","h1","selectedSelectionIds","selectionPath","canonicalUrl"],preserveScroll:!0})},z=async()=>{var t;(t=R.value)==null||t.scrollIntoView({behavior:"smooth"})},g=K((V=r().queryParams)!=null&&V.page?Number(r().queryParams.page):1),B=ae(c.selectionPath?"recipe.selection":"recipe.index",{params:()=>c.selectionPath?{selectionPath:c.selectionPath}:{},query:()=>{const t={...r().queryParams||{}};return delete t.selection_id,o.recipe_search?t.recipe_search=o.recipe_search:delete t.recipe_search,t}}),j=y(()=>{const t=(g.value-1)*v,s=t+v;return c.recipes.slice(t,s)}),A=()=>new Promise(t=>{g.value=1;const{url:s,query:e}=P(o.selection_id.map(String),o.recipe_search||void 0);I.get(s,e,{only:["recipes","recipeCategories","seoData","h1","selectedSelectionIds","selectionPath","canonicalUrl"],preserveScroll:!0,onFinish:()=>t()})});return(t,s)=>(l(),d(q,null,[t.seoData?(l(),_(a(Q),{key:0},{default:u(()=>
1[i("title",null,p(t.seoData.seo_title),1),i("meta",{name:"description",content:t.seoData.seo_description},null,8,ne),i("meta",{name:"keywords",content:t.seoData.seo_keywords},null,8,ce)]),_:1})):h("",!0),i("div",me,[n(a(O),{class:"flex flex-col px-6 sm:px-8"},{default:u(()=>[a(k)?h("",!0):(l(),_(N,{key:0,model:w,class:"mb-4 bg-white px-0!"},{item:u(({item:e})=>[n(a(D),{class:"text-complimentary-reg hover:text-additional flex items-center transition-colors duration-200",href:e.route},{default:u(()=>[b(p(e.label),1)]),_:2},1032,["href"])]),_:1})),i("div",ue,[i("div",pe,[a(k)?(l(),_(N,{key:0,model:w},{item:u(({item:e})=>[n(a(D),{class:"text-complimentary-reg hover:text-additional flex items-center transition-colors duration-200",href:e.route},{default:u(()=>[b(p(e.label),1)]),_:2},1032,["href"])]),_:1})):h("",!0),i("h1",de,p($.value),1)])]),i("div",_e,[n(le,{modelValue:a(o).selection_id,"onUpdate:modelValue":s[0]||(s[0]=e=>a(o).selection_id=e),options:x.value,"option-label":"title","option-value":"id",multiple:"",onValueChange:A},{option:u(({option:e})=>[i("span",ge,[b(p(e.title)+" ",1),n(a(se),{class:"group-p-checked:inline hidden"})])]),_:1},8,["modelValue","options"]),a(o).recipe_search?(l(),d("div",fe,[i("span",he,"Поиск: «"+p(a(o).recipe_search)+"»",1),i("button",{type:"button",class:"text-default shrink-0 cursor-pointer","aria-label":"Сбросить поиск",onClick:U},[n(a(W),{class:"rotate-45"})])])):h("",!0)]),a(o).recipe_search&&t.recipes.length===0?(l(),d("div",xe,[i("div",ye,[n(a(Y),{src:"/images/test-images/image_exclamation.webp",alt:"восклицание",class:"-mt-20 max-w-[120px] lg:max-w-[200px]"}),s[2]||(s[2]=i("p",{class:"text-mob-small-medium md:text-heavy-medium max-md:text-center xl:max-w-[540px]"}," К сожалению, по заданным параметрам ничего не найдено ",-1))])])):t.recipes.length===0?(l(),_(a(ie),{key:2,class:"mx-auto mt-16 md:mt-30"})):(l(),d("section",be,[(l(!0),d(q,null,J(j.value,e=>(l(),_(a(ee),{id:e.id,key:e.id,title:e.title,description:e.mini_description,image:e.image.path,"cook-time":e.cooking_time_minutes,portions:e.number_of_persons,difficulty:e.difficult,"is-favorite":e.is_wishlist},{actions:u(({isFavorite:m})=>[n(a(te),{id:e.id,"initial-value":m,"item-type":"recipe"},null,8,["id","initial-value"]),n(a(re),{url:a(r)("recipe.show",{recipe:e.id})},null,8,["url"])]),_:2},1032,["id","title","description","image","cook-time","portions","difficulty","is-favorite"]))),128))])),n(a(oe),{modelValue:g.value,"onUpdate:modelValue":[s[1]||(s[1]=e=>g.value=e),z],"per-page":v,"total-count":t.recipes.length,"href-builder":a(B),class:"mx-auto mt-4 md:mt-8"},null,8,["modelValue","total-count","href-builder"])]),_:1})],512)],64))}}),$e=Z(ve,[["__scopeId","data-v-cd842eff"]]);export{$e 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.