PageSourceSearch

https://www.apollo.lv/build-mm-v6/bundle-21ad0f9f4d88fc4115a2.js

js apollo.lv collected 2026-10-02 07:30:49 UTC 8,361 bytes, 5 lines download raw bytes

1(function(){try{var c=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},e=new c.Error().stack;e&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[e]="5c115211-803e-4c47-bff3-df7ff65646f8",c._sentryDebugIdIdentifier="sentry-dbid-5c115211-803e-4c47-bff3-df7ff65646f8")}catch(t){}})(),(self.webpackChunkmysterious_monoceros=self.webpackChunkmysterious_monoceros||[]).push([[4010],{4010:(c,e,t)=>{"use strict";t.r(e),t.d(e,{default:()=>f});var n=function(){var r=this,s=r._self._c;return s("div",{staticClass:"container"},[s("div",{staticClass:"container-header"},[s("span",{staticClass:"container-header__title"},[r._v("Sast\u0101vda\u013Cas")]),r._v(" "),r.servings?s("div",{staticClass:"recipe--ingredients__servings-block"},[s("meta",{attrs:{itemprop:"recipeYield",content:r.servings}}),r._v(" "),s("div",{staticClass:"recipe--ingredients__servings-block--buttonBox"},[s("div",{staticClass:"portion__container",attrs:{role:"presentation","aria-label":`${r.servingCount} ${r.servingsText}`}},[s("button",{staticClass:"recipe--ingredients__servings-block--buttonBox__circle decrement",attrs:{"aria-label":r.__("Decrease amount")},on:{click:function(u){return r.decrement()}}}),r._v(" "),s("span",{staticClass:"recipe--ingredients__servings-block--buttonBox__count",attrs:{id:"displayServing","data-servings":this.servings,"aria-live":"polite"}},[r._v(r._s(this.servingCount)+"\xA0"),s("span",{staticClass:"hidden-a11y"},[r._v(r._s(r.servingsText))])]),r._v(" "),s("button",{staticClass:"recipe--ingredients__servings-block--buttonBox__circle increment",attrs:{"aria-label":r.__("Increase amount")},on:{click:function(u){return r.increment()}}})]),r._v(" "),s("span",{staticClass:"recipe--ingredients__servings-block__count--text",attrs:{id:"portionTitle"}},[r._v(r._s(this.servingsText))])])]):r._e()]),r._v(" "),r._l(r.ingredientData,function(u){return s("div",{staticClass:"container-ingredient_group"},[u.title?s("span",{staticClass:"ingredient_group__title"},[r._v(r._s(u.title))]):r._e(),r._v(" "),s("ul",{staticClass:"ingredient_group"},r._l(u.ingredients,function(g){return s("div",{staticClass:"container-ingredient"},[s("li",{staticClass:"recipe--ingredients__ingredient"},[s("span",{staticClass:"ingredient__unit",attrs:{itemprop:"recipeIngredient"}},[r._v(`
2            `+r._s(r.generateIngredientText(g))+`
3          `)])])])}),0)])})],2)},i=[];n._withStripped=!0;var a=t(32473),d=t.n(a),m={name:"recipe-ingredients",props:{servings:{type:Number,default:0},ingredientGroups:{type:Array,default:()=>[]},isPreview:{type:Boolean,default:!1}},data(){return{servingCount:this.servings,servingsText:"porcijas",ingredientData:this.ingredientGroups}},created(){this.declensionEnding()},methods:{generateIngredientText(o){const r=this.isPreview?o.quantity:o.displayQuantity,s=o.unit,u=this.getTitleInCorrectDeclension(o);let g="";return r&&(g+=r+" "),s&&(g+=s+" "),u&&(g+=u),g},increment(){this.servingCount<99&&(this.servingCount++,this.updateIngredients(),this.declensionEnding())},decrement(){this.servingCount>1&&(this.servingCount--,this.updateIngredients(),this.declensionEnding())},declensionEnding(){this.servings===1?this.servingsText="porcijai":this.servingsText="porcij\u0101m"},updateIngredients(){this.ingredientData.forEach(o=>{o.ingredients.forEach(r=>{r.displayQuantity=this.calcIngredients(r.quantity,this.servingCount)})})},calcIngredients(o,r){if(!o)return o;if(o.includes("-")){let s=o.split("-");return s.forEach((u,g)=>{const l=u/this.servings*r;l-Math.floor(l)<=.3?s[g]=Math.floor(l*2)/2:l-Math.floor(l)>=.7?s[g]=Math.ceil(l*2)/2:s[g]=Math.round(l*2)/2}),s.join("-")}if(o.includes("/")){let s=Math.round(Number(o)/this.servings*r*100)/100,u=Math.floor(s),g=Math.round((s-u)*100)/100;g=(Math.round(g*10)/10).toFixed(2);let l=new(d())(g);return u?u+" "+(l.numerator?`${l.numerator}/${l.denominator}`:""):`${l.numerator}/${l.denominator}`}return o=o.valueOf(),Math.round(o/this.servings*r*100)/100},getTitleInCorrectDeclension(o){return o.declension?o.unit?o.declension.title_genitive:parseInt(o.displayQuantity)===1?o.declension.title_singular:o.declension.title_plural:o.title}}},h=m,v=t(14486),p=(0,v.A)(h,n,i,!1,null,"119616f2",null),f=p.exports},32473:c=>{var e=function(){this.numerator,this.denominator;var t=0,n=1,i;if(!isNaN(arguments[0])&&!isNaN(arguments[1]))t=Number(arguments[0]),n=Number(arguments[1]);else if(!isNaN(arguments[0]))t=Number(arguments[0]);else if(e.isString(arguments[0])){var a=arguments[0];a.indexOf("/")!=-1?(t=Number(a.substring(0,a.indexOf("/"))),n=Number(a.substring(a.indexOf("/")+1,a.length))):t=a}else throw new Error("Arguments invalid");if((!Number.isInteger(t)||!Number.isInteger(n))&&(Number.isInteger(t)||(t=e.decimalToFraction(t)),Number.isInteger(n)||(n=e.decimalToFraction(n)),i=e.divide(t,n),t=i.numerator,n=i.denominator),n==0)throw new Error("Cannot divide by zero");this.numerator=t,this.denominator=n,this.simplify()};e.prototype.multiply=function(t){return e.correctArgumentLength(1,arguments.length),e.change(this,e.multiply(this,t))},e.prototype.divide=function(t){return e.correctArgumentLength(1,arguments.length),e.change(this,e.divide(this,t))},e.prototype.add=function(t){return e.correctArgumentLength(1,arguments.length),e.change(this,e.add(this,t))},e.prototype.subtract=function(t){return e.correctArgumentLength(1,arguments.length),e.change(this,e.subtract(this,t))},e.prototype.simplify=function(){return e.correctArgumentLength(0,arguments.length),e.change(this,e.simplify(this))},e.prototype.toString=function(){return e.toString(this)},e.prototype.equals=function(t){return e.equals(this,t)},e.prototype.valueOf=function(){return e.valueOf(this)},e.add=function(t,n){e.correctArgumentLength(2,arguments.length),t=e.toFraction(t),n=e.toFraction(n);var i=t;return i.numerator=t.numerator*n.denominator+t.denominator*n.numerator,i.denominator=t.denominator*n.denominator,e.simplify(i)},e.subtract=function(t,n){e.correctArgumentLength(2,arguments.length),t=e.toFraction(t),n=e.toFraction(n);var i=t;return i.numerator=t.numerator*n.denominator-t.denominator*n.numerator,i.denominator=t.denominator*n.denominator,e.simplify(i)},e.multiply=function(t,n){e.correctArgumentLength(2,arguments.length),t=e.toFraction(t),n=e.toFraction(n);var i=t;return i.numerator=t.numerator*n.numerator,i.denominator=t.denominator*n.denominator,e.simplify(i)},e.divide=function(t,n){e.correctArgumentLength(2,arguments.length),t=e.toFraction(t),n=e.toFraction(n);var i=t;return i.numerator=t.numerator*n.denominator,i.denominator=t.denominator*n.numerator,e.simplify(i)},e.simplify=function(t){e.correctArgumentLength(1,arguments.length),t=e.toFraction(t);var n=e.greatestCommonDivisor(t.numerator,t.denominator);return n==1||(t.numerator/=n,t.denominator/=n),t},e.greatestCommonDivisor=function(t,n){var i,a;for(t=Math.abs(t),n=Math.abs(n),i=Math.max(t,n),a=Math.min(t,n);a!=0;){var d=a;a=i%a,i=d}return i},e.toString=function(t){return e.correctArgumentLength(1,arguments.length),t.denominator==1?""+t.numerator:""+t.numerator+"/"+t.denominator},e.equals=function(t,n){return e.correctArgumentLength(2,arguments.length),t=e.toFraction(t),n=e.toFraction(n),t=e.simplify(t),n=e.simplify(n),t.numerator==n.numerator&&t.denominator==n.denominator},e.valueOf=function(t){return e.correctArgumentLength(1,arguments.length),t=e.toFraction(t),t.numerator/t.denominator},e.correctArgumentLength=function(t,n){if(t!=n)throw new Error(""+t+" arguments needed")},e.change=function(t,n){return e.correctArgumentLength(2,arguments.length),t.numerator=n.numerator,t.denominator=n.denominator,t},e.isString=function(t){return typeof t=="string"||typeof t=="object"&&t.constructor==String},e.fromFraction=function(t){return typeof t=="object"&&t.constructor==e},e.toFraction=function(t){return e.fromFraction(t)?t:new e(t)},e.decimalToFraction=function(t){if(e.correctArgumentLength(1,arguments.length),isNaN(t))throw new Error("Argument invalid");t=String(t);var n=t.indexOf(".");if(n!=-1){var i=t.substring(0,n),a=i.indexOf("-")!=-1,d=t.substring(n+1,t.length),m=Math.pow(10,d.length);
3return a?e.subtract(new e(Number(i),1),new e(Number(d),m)):e.add(new e(Number(i),1),new e(Number(d),m))}else return new e(Number(t))},c.exports&&(c.exports=e)}}]);
4
5//# sourceMappingURL=bundle-21ad0f9f4d88fc4115a2.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.