1import{b1 as $,cy as W,aK as X,b0 as E,aO as p,aP as t,aT as w,aX as s,aY as h,cz as Z,bz as c,aU as u,aV as C,aQ as l,bB as j,bv as x,c2 as J,cA as Q,cB as ee,bL as G,cC as te,cD as re,cE as F,bw as ae,b4 as S,b5 as R,bA as se,bt as _,cv as ne,cF as oe,b9 as ie,bV as ce,bn as q,by as pe,bW as le,cG as me,cH as de,bx as ue}from"./v7.12-VpakeqIi.js";import{y as he,p as _e,A as ve,a as ge,F as fe,b as Ae,S as ye,c as ke,C as Se}from"./v7.12-Bz7WNEUn.js";import{R as be}from"./v7.12-Xacy3Gy4.js";import{A as Ce}from"./v7.12-BSx-oKmB.js";import{u as L}from"./v7.12-C5Gqy1Z6.js";import{g as Re}from"./v7.12-BM5KuIZ1.js";import{A as we,g as $e}from"./v7.12-7AxlIuMm.js";import{R as Ee}from"./v7.12-DJpcugQB.js";import{T as Ie}from"./v7.12-DxYLfnPW.js";import{A as V}from"./v7.12-CRnohmQJ.js";import{s as Y,p as K}from"./v7.12-JJiUUO-X.js";import{g as Te}from"./v7.12-DT71Msqd.js";import{p as Ne,a as Me}from"./v7.12-BMIDyJyx.js";import"./v7.12-BsT3Etlf.js";import"./v7.12-G9eflHxN.js";import"./v7.12-Bl_k0Vwn.js";import"./v7.12-DB9tyOqw.js";import"./v7.12-DbAV-6r6.js";import"./v7.12-ooEGvYt4.js";import"./v7.12-COY1hD19.js";const Pe=$({name:"RecipeReactions",props:{id:{type:Number,required:!0}},setup(){L("amp-script")},computed:{REACTIONS_API_URL:()=>W,reactionScriptSrc(){return`${X}/js/amp/reactions.js`}}},"$zm175tX6W5"),Oe=["data-post-id","data-api-url"];function Ue(e,r,a,o,d,m){return t(),p(h("amp-script"),{sandbox:"allow-forms",layout:"fixed-height",height:"32",src:e.reactionScriptSrc},{default:w(()=>[s("div",{id:"amp-reactions-container",class:"recipe-reaction-container","data-type":"recipe","data-post-id":e.id,"data-api-url":e.REACTIONS_API_URL},[...r[0]||(r[0]=[s("button",{"data-vars-reaction":"like",class:"recipe-reaction recipe-reaction_like js-recipe-amp-reaction","aria-label":"ÐоÑÑавиÑÑ ÑеÑепÑÑ Ð»Ð°Ð¹Ðº"},[s("svg",{class:"icon js-icon",fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"m13.8595 4.85648c-.0736-.01246-3.5202 0-3.5202 0l.4814-1.31337c.3322-.90711.1171-2.29215-.8045-2.78456-.30014-.160344-.71944-.240871-1.05749-.155777-.19386.048781-.36424.177133-.4658.349098-.11678.197779-.10473.428639-.14632.647939-.10546.55623-.36829 1.08508-.7753 1.48203-.70963.6921-2.91406 2.68875-2.91406 2.68875v7.31311h7.61777c1.0279.0006 1.7016-1.1473 1.1946-2.0439.6043-.3871.811-1.20234.4571-1.8283.6043-.38705.811-1.2023.4571-1.82826 1.0427-.66782.6941-2.32069-.5243-2.52676z"}),s("path",{d:"m3.28534 4.85742h-1.82826c-.25135 0-.45708.2047-.45708.45705l-.000001 8.22723c0 .2522.204831.457.457081.457h1.82826c.25225 0 .45708-.2048.45708-.457v-8.22723c0-.25235-.20576-.45705-.45708-.45705z"})]),s("span",{class:"count js-count"},"0")],-1),s("button",{"data-vars-reaction":"dislike",class:"recipe-reaction recipe-reaction_dislike js-recipe-amp-reaction","aria-label":"ÐоÑÑавиÑÑ ÑеÑепÑÑ Ð´Ð¸Ð·Ð»Ð°Ð¹Ðº"},[s("svg",{class:"icon js-icon",fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"m2.14146 11.4267c.0736.0125 3.52021 0 3.52021 0l-.48141 1.3134c-.33218.9071-.11712 2.2921.80456 2.7846.3001.1603.71939.2408 1.05744.1557.19387-.0488.36425-.1771.46581-.3491.11678-.1977.10472-.4286.14631-.6479.10547-.5562.3683-1.0851.77531-1.482.70963-.6921 2.91411-2.6888 2.91411-2.6888v-7.31308h-7.61785c-1.02791-.0006-1.70155 1.14729-1.19457 2.04392-.60433.38705-.81102 1.20231-.45708 1.82826-.60435.38705-.81102 1.20231-.45708 1.82826-1.042731.66782-.694124 2.32074.52424 2.52674z"}),s("path",{d:"m12.7147 11.4258h1.8282c.2514 0 .4571-.2047.4571-.4571v-8.22719c0-.25225-.2048-.457-.4571-.457h-1.8282c-.2523 0-.4571.20478-.4571.457v8.22719c0 .2524.2057.4571.4571.4571z"})]),s("span",{class:"count js-count"},"0")],-1)])],8,Oe)]),_:1},8,["src"])}const De=E(Pe,[["render",Ue],["__scopeId","data-v-5908afba"]]),Le=e=>{const o=Math.floor(e/1440),d=e-o*1440,m=Math.floor(d/60),i=Math.floor(d-m*60);return`P${o?o+"D":""}T${m?m+"H":""}${i}M`},Be=$({name:"RecipeCardAmp",components:{AuthorsExperts:Ce,RecipeReactions:De},props:{id:{type:Number,required:!0},title:{type:String,required:!0},author:{type:Object,default:null},expert:{type:Object,default:null},cookingTime:{type:Number,required:!0},cover:{type:Object,required:!0},titleTagName:{type:String,default:()=>"h1"}},computed:{coverSrc(){return this.cover.retina||this.cover.normal},coverSrcSet(){return Re(this.cover.normal,this.cover.retina)??""}},methods:{getPrepTimeFormattedSimplified:Z,getDuration:Le}},"$rd45t3fZvC"),ze={class:"recipe-card"},He={class:"recipe-card__meta"},je=["datetime","textContent"];function Fe(e,r,a,o,d,m){const i=c("RecipeReactions"),v=c("AuthorsExperts");return t(),u("div",ze,[e.coverSrc?(t(),p(h("amp-img"),{key:0,class:"recipe-card__cover",layout:"responsive",width:"2",height:"1",src:e.coverSrc,srcset:e.coverSrcSet,alt:`Ðбложка ÑÑаÑÑи ${e.title}`},null,8,["src","srcset","alt"])):C("",!0),s("div",He,[l(i,{id:e.id},null,8,["id"]),s("time",{class:"recipe-card__cooking-time",datetime:e.getDuration(e.cookingTime),textContent:j(e.getPrepTimeFormattedSimplified(e.cookingTime))},null,8,je)]),(t(),p(h(e.titleTagName),{class:"recipe-card__title"},{default:w(()=>
1[x(j(e.title),1)]),_:1})),l(v,{class:"recipe-card__authors",amp:"",author:e.author,expert:e.expert},null,8,["author","expert"])])}const qe=E(Be,[["render",Fe]]),Ve=$({name:"RecipeAnalytics",setup(){L("amp-analytics");const e=G();return{metrikaScripts:[te,re,F].map(a=>{const o={vars:{counterId:a},triggers:{}};return a===F?he(o,ae(e.fullPath)):JSON.stringify(o)})}},methods:{getGTAGScript(e){return`{"vars" : {"gtag_id": "${e}", "config" : {"${e}": { "groups": "default" }}}}`},getTopMailScript(){return`{"vars": {"id": "${ee}"}}`},getSnowPlowScript(){return`{ 2 "vars": { 3 "collectorHost": "a.lifehacker.ru", 4 "appId": "lh-snowplow-amp" 5 }, 6 "linkers": { 7 "enabled": "true" 8 }, 9 "requests": { 10 "pageView": "https://a.lifehacker.ru/lifehacker/i?p=web&tv=amp-1.1.0&e=ue" 11 }, 12 "triggers": { 13 "trackPageview": { 14 "on": "visible", 15 "request": "pageView" 16 }, 17 "trackClickOnHeader_picture" : { 18 "on": "click", 19 "selector": ".content img", 20 "request": "structEvent", 21 "vars": { 22 "structEventCategory": "ui-pics", 23 "structEventAction": "header-click" 24 } 25 }, 26 "trackClickOnHeader_link" : { 27 "on": "click", 28 "selector": ".content a", 29 "request": "structEvent", 30 "vars": { 31 "structEventCategory": "article", 32 "structEventAction": "click_url" 33 } 34 }, 35 "trackSelfDescribingEvent" : { 36 "on": "click", 37 "selector": "a", 38 "request": "selfDescribingEvent", 39 "vars": { 40 "customEventSchemaName": "ÐолнÑй URL загÑÑжаемой ÑÑÑаниÑÑ", 41 "customEventSchemaVersion": "1-0-1", 42 "customEventSchemaData": "{\\"targetUrl\\":\\"${J((this._.provides[Q]||this.$route).fullPath)}\\",\\"linkurl\\":\\"\${linkHref}\\"}"} 43 } 44 } 45 }`}}},"$7GhZta4pDg");function Ge(e,r,a,o,d,m){return t(),u("div",null,[(t(!0),u(S,null,R(e.metrikaScripts,i=>(t(),p(h("amp-analytics"),{key:i,type:"metrika"},{default:w(()=>[(t(),p(h("script"),{"data-amp-keep":"",type:"application/json",innerHTML:i},null,8,["innerHTML"]))]),_:2},1024))),128)),(t(),p(h("amp-analytics"),{type:"snowplow_v2",id:"snowplowAnalytics"},{default:w(()=>[(t(),p(h("script"),{type:"application/json","data-amp-keep":"",innerHTML:e.getSnowPlowScript()},null,8,["innerHTML"]))]),_:1})),(t(),p(h("amp-analytics"),{id:"topmailru",type:"topmailru"},{default:w(()=>[(t(),p(h("script"),{type:"application/json","data-amp-keep":"",innerHTML:e.getTopMailScript()},null,8,["innerHTML"]))]),_:1}))])}const Ye=E(Ve,[["render",Ge]]),Ke=$({name:"PrintButtonAmp",props:{link:{type:String,required:!0}}},"$XhcJL3WY9h"),We=["href","data-vars-link-href"];function Xe(e,r,a,o,d,m){return t(),u("a",{class:"print-button",href:e.link,"data-vars-link-href":e.$isAMP?e.link:void 0,"aria-label":"ÐапеÑаÑаÑÑ ÑеÑепÑ"},[...r[0]||(r[0]=[se('<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-v-0cdadfb2><clipPath id="a" data-v-0cdadfb2><path d="m2 3h20v18h-20z" data-v-0cdadfb2></path></clipPath><g clip-path="url(#a)" stroke="#969698" stroke-width="2" data-v-0cdadfb2><path d="m21.0932 10.0117v4.9299c0 .9437-.7891 1.7022-1.7597 1.7022h-1.814v-3.1573h-11.03858v3.1573h-1.81406c-.97052 0-1.75963-.7585-1.75963-1.7022v-4.9299c0-.94365.78911-1.71092 1.75963-1.71092h14.66664c.9706 0 1.7597.76727 1.7597 1.71092z" data-v-0cdadfb2></path><path d="m17.519 8.30026v-3.98628c0-.23812-.1995-.43214-.4444-.43214h-10.14969c-.24489 0-.44444.19402-.44444.43214v3.98628z" data-v-0cdadfb2></path><path d="m17.519 13.4873v6.1999c0 .2381-.1995.4321-.4444.4321h-10.14969c-.24489 0-.44444-.194-.44444-.4321v-6.1999z" data-v-0cdadfb2></path></g></svg><span data-v-0cdadfb2>ÐеÑÑÐ¸Ñ Ð´Ð»Ñ Ð¿ÐµÑаÑи</span>',2)])],8,We)}const Ze=E(Ke,[["render",Xe],["__scopeId","data-v-0cdadfb2"]]),xe=e=>{const r=_([]),a=_([]),o=_(!1),d=_([]),m="ampFullscreenGalleryId";return ne(()=>{const i=Y(K(e,!0)),{content:v,refsContents:A,galleryExists:y,galleryImages:k}=_e(i,m);r.value=v,a.value=A,o.value=y,d.value=k}),{processedAmpContent:r,ampRefContent:a,gallery:{id:m,exists:o,images:d}}}
45,Je=$({name:"TheRecipeAmp",amp:"only",components:{RecipeCardAmp:qe,CommentsContainerAmp:Se,RecommendedPostsContainer:be,AmpMessage:ke,ShareBlock:ye,ArticleNote:we,RecipeCategoryLink:Ee,RecipeAnalytics:Ye,PrintButton:Ze,TheContent:Ie,AmpError:Ae,FullScreenGallery:fe,AmpActionSheet:ge,AdsAmp:ve},async setup(){var N,b,n,f,B,z;let e,r;L("amp-geo");const a=_(null),o=ie(),d=G(),m=ce(d.params.slug),i=_(),v=_(),A=_(),y=_(""),k=q(()=>y.value+"#toPrint"),{data:g,status:M,error:I}=([e,r]=pe(()=>ue(()=>o.$recipesApi.fetchRecipe(m),"$9lBRvfFaga")),e=await e,r(),e);if(I.value||!((N=g.value)!=null&&N.item))throw le(I.value);A.value=M,v.value=(b=g.value)==null?void 0:b.meta;const{gallery:P,ampRefContent:T,processedAmpContent:O}=xe(((n=g.value)==null?void 0:n.item.parsedContent)??[]);(f=g.value)!=null&&f.item&&(i.value={...(B=g.value)==null?void 0:B.item,parsedContent:O.value});const U=Ne(Me,(z=g.value)==null?void 0:z.seo);y.value=me(U.canonical),de({bodyAttrs:{class:"amp-geo-pending"}});const D=q(()=>{var H;return Y(K((H=i==null?void 0:i.value)==null?void 0:H.excerpt,!0))});return{recipe:i,recipeMeta:v,errorCode:a,state:A,recipeUrl:y,toPrintUrl:k,gallery:P,ampRefContent:T,sanitizedDescription:D}},computed:{cover(){var r,a;if(!this.recipe)return{normal:"",retina:""};const e=oe([V.L.width,V.L.width*2],this.recipe.image.sizes);return{normal:((r=e[0])==null?void 0:r.url)??"",retina:((a=e[1])==null?void 0:a.url)??""}},notes(){if(!this.recipeMeta)return[];const{source:e,coverSource:r,customAuthors:a}=this.recipeMeta;return $e(e,r,a,"Ðад ÑеÑепÑом ÑабоÑали: ")}},methods:{getRefId:Te}},"$X7_xuOsduw"),Qe={key:0,class:"the-recipe-amp-error"},et={key:1,class:"the-recipe-amp"},tt={class:"the-recipe-amp__main"},rt={class:"the-recipe-amp__article"},at={key:0,class:"the-recipe-amp__description"},st={class:"the-recipe-amp__content-container"},nt={class:"the-recipe-amp__categories"},ot={class:"the-recipe-amp__categories-wrapper"};function it(e,r,a,o,d,m){var b;const i=c("AmpError"),v=c("RecipeCardAmp"),A=c("TheContent"),y=c("PrintButton"),k=c("AdsAmp"),g=c("RecipeCategoryLink"),M=c("ArticleNote"),I=c("AmpMessage"),P=c("ShareBlock"),T=c("RecommendedPostsContainer"),O=c("CommentsContainerAmp"),U=c("RecipeAnalytics"),D=c("FullScreenGallery"),N=c("AmpActionSheet");return e.errorCode===503?(t(),u("div",Qe,[l(i)])):e.recipe?(t(),u("div",et,[(t(),p(h("amp-geo"),{layout:"nodisplay"})),s("main",tt,[l(v,{id:e.recipe.id,author:e.recipe.author,"cooking-time":e.recipe.totalTime,cover:e.cover,expert:e.recipe.expert,title:e.recipe.title,class:"the-recipe-amp__card"},null,8,["id","author","cooking-time","cover","expert","title"]),s("section",rt,[e.recipe.excerpt?(t(),u("section",at,[(t(!0),u(S,null,R(e.sanitizedDescription,n=>(t(),p(A,{key:n.id,elem:n},null,8,["elem"]))),128))])):C("",!0),l(y,{link:e.toPrintUrl,class:"the-recipe-amp__print-button"},null,8,["link"]),s("div",st,[(t(!0),u(S,null,R(e.recipe.parsedContent,(n,f)=>(t(),u(S,{key:n.id},[l(A,{elem:n},null,8,["elem"]),f===1?(t(),p(k,{key:0,class:"the-recipe-amp__ad the-recipe-amp__ad_large-margin"})):C("",!0)],64))),128))])]),s("div",nt,[s("div",ot,[(t(!0),u(S,null,R(e.recipe.breadcrumb,(n,f)=>(t(),p(g,{key:n.title+f,link:n.url,text:n.title+(n.own==="kitchen"?" кÑÑ Ð½Ñ":"")},null,8,["link","text"]))),128))])]),l(M,{notes:e.notes,class:"the-recipe-amp__notes"},null,8,["notes"]),l(I,{link:e.recipeUrl,class:"the-recipe-amp__message"},null,8,["link"]),l(P,{class:"the-recipe-amp__share-block",type:"recipe"})]),l(T,{id:e.recipe.id,recipes:(b=e.recipe.similarPosts)==null?void 0:b.slice(0,4),"show-title":!1,class:"the-recipe-amp__recommended-recipes similar","next-page-hide":""},null,8,["id","recipes"]),l(k,{class:"the-recipe-amp__ad the-recipe-amp__ad_large-margin"}),l(O,{id:e.recipe.id,"article-url":e.recipeUrl,class:"the-recipe-amp__comments"},null,8,["id","article-url"]),l(T,{id:e.recipe.id,class:"the-recipe-amp__recommended-recipes recommended","next-page-hide":""},null,8,["id"]),l(U),e.gallery.exists?(t(),p(D,{key:0,id:e.gallery.id,images:e.gallery.images.value},null,8,["id","images"])):C("",!0),(t(!0),u(S,null,R(e.ampRefContent,(n,f)=>(t(),p(N,{id:e.getRefId(n.parentId),key:n.parentId+f,"ref-content":n.content},null,8,["id","ref-content"]))),128))])):C("",!0)}const Et=E(Je,[["render",it],["__scopeId","data-v-ba67d7af"]]);export{Et as default}; 46//# sourceMappingURL=v7.12-Oo6ixWiE.js.map
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.