(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["widget"],{"0ed8":function(t,e,a){},"1e2d":function(t,e,a){a("99af");var s=a("ded3"),r=a("4082");t.exports={functional:!0,render:function(t,e){var a=e._c,n=(e._v,e.data),o=e.children,i=void 0===o?[]:o,c=n.class,u=n.staticClass,l=n.style,d=n.staticStyle,p=n.attrs,h=void 0===p?{}:p,g=r(n,["class","staticClass","style","staticStyle","attrs"]);return a("svg",s({class:[c,u],style:[l,d],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 9 10"},h)},g),i.concat([a("path",{attrs:{d:"M4 3a3.87 3.87 0 01.5 0v-.59a.27.27 0 01.25-.28H5V1H3v1.13h.25a.27.27 0 01.25.28V3A4.55 4.55 0 014 3z",fill:"none"}}),a("path",{attrs:{d:"M4.66 2.05A4.21 4.21 0 004 2a3.78 3.78 0 00-4 3.5A3.78 3.78 0 004 9a3.78 3.78 0 004-3.5 3.68 3.68 0 00-3.34-3.45zm1.58 1.72L4 5.8a.27.27 0 01-.17.06.23.23 0 01-.16-.06.18.18 0 010-.25l2.28-2a.26.26 0 01.33 0 .18.18 0 010 .25zM7 2.43l.57.57.43-.43L7.43 2z",fill:"none"}}),a("path",{attrs:{d:"M8.91 1.82l-.72-.73A.34.34 0 007.9 1a.43.43 0 00-.2.11l-.63.63A.24.24 0 007 2c0 .07 0 .1.46.55S8 3 8 3a.24.24 0 00.24-.06l.63-.63A.35.35 0 009 2.1a.32.32 0 00-.09-.28zm-.83.6l-.5-.49.42-.37.5.49zM5.56 4.08l-2.49 2.5a.25.25 0 000 .34.26.26 0 00.36 0l2.49-2.5a.25.25 0 000-.34.25.25 0 00-.36 0z",fill:"#434343"}}),a("path",{attrs:{d:"M4.82 2v-.32H5a.22.22 0 00.21-.21v-1A.42.42 0 004.82 0H3.15a.42.42 0 00-.42.42v1.05a.21.21 0 00.21.21h.21V2A4.07 4.07 0 004 10a4.07 4.07 0 00.82-8zm-1.46-.7h-.21V.42h1.67v.84h-.21a.21.21 0 00-.21.21v.43a3.84 3.84 0 00-.83 0v-.43a.21.21 0 00-.21-.21zM4 9.58A3.61 3.61 0 01.42 5.94 3.61 3.61 0 014 2.3a2.88 2.88 0 01.59.05 3.61 3.61 0 013 3.59A3.61 3.61 0 014 9.58z",fill:"#434343"}})]))}}},"202b":function(t,e,a){},3438:function(t,e,a){},"375c":function(t,e,a){"use strict";var s=a("202b"),r=a.n(s);r.a},"3e4d":function(t,e,a){"use strict";var s=a("564b"),r=a.n(s);r.a},"3e70":function(t,e,a){},4572:function(t,e,a){},"47b1":function(t,e,a){a("99af");var s=a("ded3"),r=a("4082");t.exports={functional:!0,render:function(t,e){var a=e._c,n=(e._v,e.data),o=e.children,i=void 0===o?[]:o,c=n.class,u=n.staticClass,l=n.style,d=n.staticStyle,p=n.attrs,h=void 0===p?{}:p,g=r(n,["class","staticClass","style","staticStyle","attrs"]);return a("svg",s({class:[c,u],style:[l,d],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 11"},h)},g),i.concat([a("path",{staticClass:"a",attrs:{d:"M11.1 8.81L9.15 8A.34.34 0 019 7.81h1.3a2.35 2.35 0 001-.14.59.59 0 00.3-.78.27.27 0 00-.06-.1 6.68 6.68 0 01-1.27-3.33A2.45 2.45 0 007.84 1a2.85 2.85 0 00-1 .17 1.54 1.54 0 00-.3-.49A2.51 2.51 0 004.6 0a2.51 2.51 0 00-2 .71A1.76 1.76 0 002.2 2v1.07a.81.81 0 00-.2.53v.8a.79.79 0 00.3.6A4.24 4.24 0 003 6.47v.66a.53.53 0 01-.28.46l-1.78 1A1.79 1.79 0 000 10.15V11h12v-.74a1.6 1.6 0 00-.9-1.45zM8.8 10.6H.4v-.45a1.41 1.41 0 01.73-1.23L2.92 8a1 1 0 00.48-.82V6.32a3.92 3.92 0 01-.68-1.41v-.08h-.06a.4.4 0 01-.26-.43v-.8a.43.43 0 01.13-.3l.07-.06V2a1.38 1.38 0 01.32-1A2.14 2.14 0 014.6.4a2.14 2.14 0 011.68.6 1.35 1.35 0 01.3.61.77.77 0 010 .15v.11A.42.42 0 006.6 2v1.25l.07.06a.39.39 0 01.13.29v.8a.4.4 0 01-.28.38h-.1v.1a4 4 0 01-.56 1.14 2.46 2.46 0 01-.17.22l-.05.05v.83a.76.76 0 000 .15 1.14 1.14 0 00.09.26.71.71 0 00.1.14v.06a.91.91 0 00.28.27L8 8.94a1.4 1.4 0 01.78 1.25zm2.8 0H9.2v-.41a1.78 1.78 0 00-1-1.61l-1.37-.69a.31.31 0 000-.25.35.35 0 00-.33-.23h-.43v-.07a.68.68 0 010-.14v-.73a4.31 4.31 0 00.73-1.35.79.79 0 00.4-.72v-.8a.81.81 0 00-.2-.53V2a1.55 1.55 0 000-.43 2.39 2.39 0 01.86-.15 2 2 0 012 2A7 7 0 0011.23 7a.19.19 0 01-.05.27 2.07 2.07 0 01-.82.1H9a.36.36 0 00-.37.36.47.47 0 000 .17.9.9 0 00.37.43l1.95.84a1.23 1.23 0 01.67 1.09z"}})]))}}},4997:function(t,e,a){a("99af");var s=a("ded3"),r=a("4082");t.exports={functional:!0,render:function(t,e){var a=e._c,n=(e._v,e.data),o=e.children,i=void 0===o?[]:o,c=n.class,u=n.staticClass,l=n.style,d=n.staticStyle,p=n.attrs,h=void 0===p?{}:p,g=r(n,["class","staticClass","style","staticStyle","attrs"]);return a("svg",s({class:[c,u],style:[l,d],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"150",height:"101",viewBox:"-363 545.1 150 101"},h)},g),i.concat([a("path",{attrs:{fill:"#FFF",d:"M-288.1 564.5v6c-41.4 0-74.9 16.7-74.9 37.2 0 21 33.5 37.9 74.9 37.9 41.5 0 75.1-17.3 75.1-38.7 0-23.4-33.6-42.4-75.1-42.4zm58.5 13.1c2.7 0 4.9-2.2 4.9-4.9s-2.2-4.9-4.9-4.9-4.9 2.2-4.9 4.9 2.2 4.9 4.9 4.9z"}}),a("path",{attrs:{fill:"#00AA14",d:"M-266.7 568.7c-.3.8-.7 1.5-1.2 2.2 10.5 2.3 21.7 6.3 29.7 12.1.3.2 0 .7-.3.5-13.6-7-31.3-10.6-49.6-10.6-38.7 0-70 15.5-70 34.7 0 19.6 31.4 35.4 70 35.4 38.8 0 70.2-16.2 70.2-36.3 0-17.7-20.5-32.8-48.8-38zm37.1 8c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0-7.2c1.7 0 3.1 1.4 3.1 3.2 0 1.8-1.4 3.2-3.1 3.2-1.7 0-3.1-1.4-3.1-3.2 0-1.7 1.4-3.2 3.1-3.2zm-1.5 5.2h.8c.1 0 .1-.1.1-.2v-1.4h.3c.2 0 .4 0 .5.1.1.1.2.3.3.5l.2.7c0 .1 0 .1.1.1l.1.1h1.1v-.1s0-.1-.1-.3l-.2-.7c-.1-.3-.2-.5-.4-.6-.1-.1-.3-.2-.5-.3.3-.1.5-.2.7-.4.2-.2.3-.4.3-.8 0-.2 0-.4-.1-.5-.1-.2-.2-.3-.3-.4-.1-.1-.3-.2-.5-.2s-.4-.1-.7-.1h-1.2c-.2 0-.3 0-.3.1-.1.1-.1.2-.1.4v3.7c-.2.2-.2.3-.1.3zm.9-3.5h.9c.1 0 .2.1.2.1.1 0 .1.1.1.2v.2c0 .2-.1.3-.2.4-.1.1-.3.2-.6.2h-.4v-1.1z"}}),a("path",{attrs:{fill:"#00461B",d:"M-250.4 633.1c.4-.1.6.3.2.5-9.9 4-23.7 6.3-37.9 6.3-34.4 0-62.4-14.4-62.4-32.2s27.9-32.2 62.4-32.2c38.8 0 62.5 16.8 62.4 31.4-.1 12.9-17.3 25.2-52 25.2-14.5 0-32.8-2.7-47.5-8.6-.7-.3-1 .7-.4 1 16.2 8.5 45.3 14.5 75.2 8.6z"}}),a("ellipse",{attrs:{fill:"#00461B",cx:"-288.1",cy:"602.9",rx:"56.5",ry:"26.4"}}),a("path",{attrs:{fill:"#004C1B",d:"M-288.1 625.8c-31.3 0-55.3-10.8-55-24.5.3-13.2 24.5-24.6 55-24.6s54.7 11.5 55 24.6c.3 13.8-23.7 24.5-55 24.5z"}}),a("path",{attrs:{fill:"#00521A",d:"M-288.1 622.4c-31.4 0-54.2-9.7-53.6-22.5.6-11.7 23.7-22.8 53.6-22.8 29.9 0 53 11.1 53.6 22.8.6 12.8-22.2 22.5-53.6 22.5z"}}),a("path",{attrs:{fill:"#00571A",d:"M-288.1 618.9c-31.5 0-53.1-8.6-52.2-20.6.8-10.3 22.9-21 52.2-21 29.3 0 51.4 10.7 52.2 21 .9 12-20.7 20.6-52.2 20.6z"}}),a("path",{attrs:{fill:"#005D1A",d:"M-288.1 615.5c-31.6 0-52.1-7.5-50.8-18.6 1-8.8 22.1-19.1 50.8-19.1s49.7 10.3 50.8 19.1c1.3 11.1-19.2 18.6-50.8 18.6z"}}),a("path",{attrs:{fill:"#006319",d:"M-288.1 612c-31.7 0-51-6.4-49.3-16.7 1.2-7.4 21.3-17.3 49.3-17.3 28 0 48.1 9.9 49.3 17.3 1.7 10.3-17.6 16.7-49.3 16.7z"}}),a("path",{attrs:{fill:"#006919",d:"M-288.1 608.6c31.8 0 50.1-5.3 47.9-14.7-1.4-5.9-20.5-15.5-47.9-15.5s-46.5 9.5-47.9 15.5c-2.2 9.3 16.1 14.7 47.9 14.7z"}}),a("path",{attrs:{fill:"#006919",d:"M-288.1 608.6c31.8 0 50.1-5.3 47.9-14.7-1.4-5.9-20.5-15.5-47.9-15.5s-46.5 9.5-47.9 15.5c-2.2 9.3 16.1 14.7 47.9 14.7z"}}),a("path",{attrs:{fill:"#007018",d:"M-288.1 606.7c31.1 0 47.7-4.7 45.9-13.5-1.2-5.7-19.8-14.4-45.9-14.4-26.1 0-44.8 8.7-45.9 14.4-1.8 8.8 14.8 13.5 45.9 13.5z"}}),a("path",{attrs:{fill:"#007617",d:"M-288.1 604.9c30.5 0 45.4-4.1 43.9-12.3-.9-5.4-19.1-13.3-43.9-13.3s-43 7.9-43.9 13.3c-1.5 8.3 13.4 12.3 43.9 12.3z"}}),a("path",{attrs:{fill:"#007D17",d:"M-288.1 603.1c29.8 0 43-3.4 41.9-11.1-.7-5.1-18.4-12.2-41.9-12.2s-41.2 7.1-41.9 12.2c-1.1 7.7 12.1 11.1 41.9 11.1z"}}),a("path",{attrs:{fill:"#008416",d:"M-288.1 601.3c29.1 0 40.6-2.8 39.9-9.9-.5-4.8-17.7-11.1-39.9-11.1-22.3 0-39.5 6.3-39.9 11.1-.7 7.1 10.8 9.9 39.9 9.9z"}}),a("path",{attrs:{fill:"#008A15",d:"M-288.1 599.5c28.4 0 38.3-2.1 37.9-8.8-.2-4.5-17-10-37.9-10s-37.7 5.5-37.9 10c-.4 6.6 9.5 8.8 37.9 8.8z"}}),a("path",{attrs:{fill:"#009114",d:"M-288.1 597.6c27.8 0 35.9-1.5 35.9-7.6 0-4.3-16.2-9-35.9-9s-35.9 4.7-35.9 9c-.1 6.1 8.1 7.6 35.9 7.6z"}}),a("path",{attrs:{fill:"#009114",d:"M-288.1 597.6c27.8 0 35.9-1.5 35.9-7.6 0-4.3-16.2-9-35.9-9s-35.9 4.7-35.9 9c-.1 6.1 8.1 7.6 35.9 7.6z"}}),a("path",{attrs:{fill:"#009514",d:"M-288.1 595.9c-24.9 0-33.2-1.2-33.2-6.2 0-3.6 15-7.6 33.2-7.6 18.2 0 33.2 4 33.2 7.6 0 5-8.3 6.2-33.2 6.2z"}}),a("path",{attrs:{fill:"#009914",d:"M-288.1 594.1c-22.1 0-30.5-.8-30.5-4.9 0-3 13.7-6.3 30.5-6.3 16.7 0 30.5 3.3 30.5 6.3-.1 4.1-8.4 4.9-30.5 4.9z"}}),a("path",{attrs:{fill:"#009E14",d:"M-288 592.3c-19.3 0-27.8-.5-27.8-3.6 0-2.3 12.5-5 27.7-5s27.7 2.7 27.7 5c0 3.1-8.4 3.6-27.6 3.6z"}}),a("path",{attrs:{fill:"#00A214",d:"M-288 590.5c-16.4 0-25.1-.1-25.1-2.3 0-1.7 11.2-3.7 25-3.7 13.7 0 25 2 25 3.7 0 2.2-8.5 2.3-24.9 2.3z"}}),a("path",{attrs:{fill:"#00A614",d:"M-288 588.7c-13.6 0-22.3.2-22.3-1 0-1.1 10-2.4 22.2-2.4s22.2 1.3 22.2 2.4c0 1.3-8.5 1-22.1 1z"}}),a("path",{attrs:{fill:"#00AA14",d:"M-268.6 587.3c0 .3-8.6-.3-19.4-.3-10.8 0-19.6.6-19.6.3 0-.4 8.7-1.1 19.5-1.1s19.5.7 19.5 1.1z"}}),a("path",{attrs:{fill:"#FFF",d:"M-304.2 620.2c-2.6-4.6-5.3-16.6-8-32-.2-1.1-.4-1.5-1.4-1.5-1.3 0-4.7.4-6.1.9-1 2.5-2.4 4.9-7 11.9-11.7 17.7-12.3 22.5-2 20.9-.2-1.6-.1-4 1.8-7.6 0 0 2.5-1.4 12-1.5 1.8 9.7 3.2 9.8 10.7 8.9zm-20.2-13.2c2.2-4.2 5.4-8.9 7-12.4.3 3.1 1.6 11.7 1.6 11.7-3.7-.1-6.7.3-8.6.7zm40.5-11.1c-3 0-6.8 2.9-9.1 7.7.3-2.2.5-4.8.2-6.2-.1-.5-.4-.9-1.8-.8-1.6.1-3.7.7-5 1.4 0 0 1.1 2.9-1.3 17.5-.7 4.4 2.3 5.7 7.4 4.9-2-2.9 1.6-20.5 9.9-16.9 3.3-5.1 2.4-7.6-.3-7.6zm12 9.5c2.2-11.6 2.8-17.9 2.8-19.9 0-.6-.3-1.4-2.1-1.4-2.4 0-4 .6-5.4 1.3.2.7.8 5.6-3.5 25.7-1.8 8.6-.2 10.5 7 9.2-.5-2.1-.5-6 1.2-14.9zm29.1-4.9c.4-2.2-.2-3.1-2.1-3.6-12.8-3.6-22.4 4.5-22.4 15.6 0 4.2 2.1 8.2 6.7 8.2 3.7 0 7-2.5 9.3-5.4 0 0-.1 1.9.1 3.1.4 2 2.4 3 7 1.5-.8-2.8-.4-9.6 1.4-19.4zm-6.6.6c-.7 7.1-3.5 14.1-7.9 14.1-1.8 0-3.1-1.4-3.1-3.8 0-6 4.8-12.3 11-10.3zM-314.6 565.4c-3.6 2.5-3.4 9.6.8 14.6 4.1 5 10.6 5.8 14.8 3.6-.8 4.7 1.7 9.6 11.3 6.5 9.7-3.1 10.2-9.6 8.2-14.4 5.4.4 11.2-1.9 13-7.5 1.3-4.1.5-9.2-3.8-11.8.2-5.9-7.1-11-14.3-10.9-3.7.1-6 2.4-6.2 5.5-4.8-5.3-11.3-5.4-17.5 0-6 5.2-7.1 12.4-4 15.4-.5-.2-2-.8-2.3-1z"}}),a("radialGradient",{attrs:{id:"a",cx:"-61.459",cy:"2478.02",r:"82.211",gradientTransform:"matrix(.4319 -.0545 .0545 .4319 -409.601 -497.398)",gradientUnits:"userSpaceOnUse"}},[a("stop",{attrs:{offset:"0","stop-color":"#f0e15a"}}),a("stop",{attrs:{offset:".098","stop-color":"#f0dd55"}}),a("stop",{attrs:{offset:".216","stop-color":"#f0d346"}}),a("stop",{attrs:{offset:".3","stop-color":"#f0c837"}}),a("stop",{attrs:{offset:"1","stop-color":"#f0aa00"}})]),a("path",{attrs:{fill:"url(#a)",d:"M-288.6 571.7c4.8-.9 14.4 11.9.2 16.5-16.9 5.4-4.4-15.7-.2-16.5zm18.2-12.7c-1 1.3-3.1 3.1-4.6 3.5 7.4-8.8-3.1-14.9-9.6-14.7-1.9.1-3.5.8-3.9 2.7-1 4.8 3.3 10.4 1.8 17.6-1 4.9 15.3 9.7 18.3-1.2.6-1.9.4-6-2-7.9zm-39.9 21.5c10.1 7.3 17.6-6.3 16.4-7.8-2.7-3.2-.8-8.3 4.8-7.5 2.9.4-.9-16.1-9.9-16.1-8.4 0-20.7 15.2-5.7 20.1-3 .1-7-.2-9.3-1.2-2.1 2.1-.9 9.1 3.7 12.5z"}})]))}}},"4b66":function(t,e,a){},5382:function(t,e,a){"use strict";a.r(e);var s=a("2b0e"),r=(a("d3b7"),a("96cf"),a("1da1")),n="a3beefa9-3ff0-4d68-b497-621ad00f2ba9",o=null,i={trackError:function(t){return Object(r["a"])(regeneratorRuntime.mark((function e(){var s,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.error(t),n){e.next=3;break}return e.abrupt("return");case 3:if(o){e.next=13;break}return e.next=6,a.e("applicationinsights-web").then(a.bind(null,"8b03"));case 6:s=e.sent,r=s.ApplicationInsights,o=new r({config:{instrumentationKey:n}}),o.loadAppInsights(),o.trackException({exception:t}),e.next=14;break;case 13:o.trackException({exception:t});case 14:case"end":return e.stop()}}),e)})))()}};s["default"].config.errorHandler=function(t){i.trackError(t)};var c=i,u=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.state.isWidgetActive?a("div",{staticClass:"arla-widget",on:{keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.closeWidget(e)}}},[a("div",{staticClass:"arla-widget__overlay",on:{click:t.closeWidget}}),a("div",{staticClass:"arla-widget__modal",class:{"is-rounded":t.state.options.roundedModal},style:{padding:t.state.options.modalOffset,width:t.state.options.modalOffset?"calc(100% - "+2*t.state.options.modalOffset+"px)":null,"max-height":t.state.options.maxHeight?t.state.options.maxHeight:null}},[a("Header"),t.state.options.closeOnEscPress?a("button",{staticClass:"arla-widget__close-button",style:{color:t.state.backgroundColor},attrs:{type:"button"},on:{click:t.closeWidget}}):t._e(),t.firstLoad?a("div",{staticClass:"arla-widget__content",class:{"is-rounded":t.state.options.roundedModal}},[a("Loader")],1):t._e(),t.displayWarehouseSelector?a("WarehouseSelector",{class:{"is-rounded":t.state.options.roundedModal}}):t.displayBasket?a("div",{staticClass:"arla-widget__content",class:{"is-rounded":t.state.options.roundedModal}},[a("Basket")],1):t._e(),t.state.options.showFooter?a("Footer"):t._e()],1)]):t._e()},l=[],d=(a("99af"),a("4de4"),a("4160"),a("c975"),a("ac1f"),a("3ca3"),a("841c"),a("159b"),a("ddb0"),a("2b3d"),a("2909")),p=(a("b4b8"),a("5530")),h={state:{ingredientCount:0,matchedCount:0,totalPrice:"-",basket:{},misMatchList:[],recipes:[],loading:!0,isWidgetActive:!0,translations:{header:"Dagligvarer til døren",recipesHeader:"Dine opskrifter",productsHeader:"Din indkøbsliste",warehousesHeader:"Vælg afhentningssted",selectWarehouseButtonText:"Benyt dette afhentningssted"},options:Object(p["a"])({headerFooterBgColor:"#154D11",addRemoveProductButtonColor:"#fff",addRemoveProductButtonBg:"#538b62",footerText:"",logo:"https://via.placeholder.com/113x57",orderButtonBackground:"#fec900",orderButtonColor:"#000",roundedModal:!1,flipLogos:!1,closeOnEscPress:!0,arlaLogoHeight:29,modalOffset:0,maxHeight:0,mobileHeaderHeightAuto:!1,showFooter:!0},window.arlaWidget)}};a("a9e3"),a("9129"),a("5319"),a("1276"),a("2ca0");function g(t,e){var a=t&&parseFloat(t.replace(",","."));return(Number.isNaN(a)?0:a)*e}function f(t){if(t.startsWith("PT")){var e=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,a=e.exec(t),s="-"===a[1]?-1:1,r={h:g(a[6],s),m:g(a[7],s)};return 60*(r.h||0)+(r.m||0)}var n=t.split(":");return 60*+n[0]+ +n[1]}var m=a("bc3a"),v=a.n(m),_="https://api.arla.net/vendor-service/v0/",w="6663d398e58142aca04330bf1cd5a73f",b=v.a.create({baseURL:_,headers:{"Ocp-Apim-Subscription-Key":w}}),k={getBasket:function(t){return Object(r["a"])(regeneratorRuntime.mark((function e(){var a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,b.get("baskets/".concat(t));case 2:return a=e.sent,s=a.data,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)})))()},getWarehouses:function(t,e){return Object(r["a"])(regeneratorRuntime.mark((function a(){var s,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,b.get("".concat(t,"/vendors/").concat(e,"/warehouses"));case 2:return s=a.sent,r=s.data,a.abrupt("return",r.items);case 5:case"end":return a.stop()}}),a)})))()}},C=(a("d81d"),a("13d5"),a("b0c0"),{addVendorData:function(){return Object(r["a"])(regeneratorRuntime.mark((function t(){var e,s,r,n,o,i,c,u;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=h.state.options,s=e.basket,r=s.productGroups.reduce((function(t,e){return t.concat(e.products)}),[]),n=r.map((function(t){return{productId:t.id,amount:t.amount,name:t.name}})),!e.getVendorData){t.next=8;break}t.t0=e,t.next=11;break;case 8:return t.next=10,Promise.all([a.e("chunk-vendors"),a.e("vendor-api-stub")]).then(a.bind(null,"7890"));case 10:t.t0=t.sent.default;case 11:return o=t.t0,i=o.getVendorData,t.next=15,i.call(e,n);case 15:c=t.sent,u=c.products.reduce((function(t,e){return t[e.id]=e,t}),{}),r.forEach((function(t){var e=u[t.id],a=e.imageUrl,s=e.packaging,r=e.price,n=e.pricePerUnit;t.imageUrl=a,t.packaging=s,t.price=r,t.pricePerUnit=n})),s.totalPrice=c.totalPrice;case 19:case"end":return t.stop()}}),t)})))()},addToBasket:function(){return Object(r["a"])(regeneratorRuntime.mark((function t(){var e,a,s,r,n,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=h.state.options,s=a.basket,r=s.productGroups.reduce((function(t,e){return t.concat(e.products)}),[]),n=r.map((function(t){return{productId:t.id,amount:t.amount,name:t.name}})),o=function(t){return new Promise((function(e){console.log(t),console.log("%c%s","color: green; background: yellow; font-size: 24px;","Add to basket has been clicked!"),setTimeout((function(){e()}),2e3)}))},i=null!==(e=a.addToBasket)&&void 0!==e?e:o,t.next=8,i.call(a,n);case 8:case"end":return t.stop()}}),t)})))()},setDeliveryAddress:function(t){return Object(r["a"])(regeneratorRuntime.mark((function e(){var a,s,r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return s=h.state.options,r=function(){return new Promise((function(e){setTimeout((function(){console.log("Set delivery address stub: ".concat(t)),e()}),1e3)}))},n=null!==(a=s.setDeliveryAddress)&&void 0!==a?a:r,e.next=5,n.call(s,t);case 5:case"end":return e.stop()}}),e)})))()},getCheckoutUrl:function(){var t=h.state.options,e=t.basket;return t.getCheckoutUrl?t.getCheckoutUrl.call(t):e.vendor.checkoutPageUrl}}),y="GTM-KBPZ34",x=function(){y&&function(t,e,a,s,r){t[s]=t[s]||[],t[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var n=e.getElementsByTagName(a)[0],o=e.createElement(a),i="dataLayer"!=s?"&l="+s:"";o.async=!0,o.src="https://www.googletagmanager.com/gtm.js?id="+r+i,n.parentNode.insertBefore(o,n)}(window,document,"script","digitalData",y)},P=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__heading",class:{"flip-logos":t.state.options.flipLogos,"height-auto":t.state.options.mobileHeaderHeightAuto},style:{backgroundColor:t.state.options.headerFooterBgColor}},[a("div",{staticClass:"arla-widget__heading-vendor-logo"},[t.state.options.logo?a("img",{attrs:{src:t.state.options.logo,alt:""}}):t._e()]),a("h2",{staticClass:"arla-widget__title"},[t._v(" "+t._s(t.state.translations.header)+" ")]),a("div",{staticClass:"arla-widget__arla-logo-wrap"},[a("ArlaLogo",{staticClass:"arla-widget__arla-logo",style:{height:t.state.options.arlaLogoHeight}})],1)])},B=[],M=a("4997"),z=a.n(M),O={components:{ArlaLogo:z.a},data:function(){return{state:h.state}}},A=O,R=(a("d84a"),a("2877")),S=Object(R["a"])(A,P,B,!1,null,"7086dd36",null),H=S.exports,E=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__content"},[t.state.loading?a("Loader"):t._e(),a("div",{staticClass:"arla-widget__recipes"},[a("h3",{staticClass:"arla-widget__content-title"},[t._v(" "+t._s(t.state.translations.recipesHeader)+" ")]),a("Recipes")],1),a("span",{staticClass:"arla-widget__splitter"}),a("div",{staticClass:"arla-widget__products"},[a("div",[a("h3",{staticClass:"arla-widget__content-title"},[t._v(" "+t._s(t.state.translations.productsHeader)+" ")]),a("Products")],1)])],1)},L=[],I=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("vue-custom-scrollbar",{staticClass:"arla-widget__recipes-list-wrapper"},[a("ul",{staticClass:"arla-widget__recipes-list"},t._l(t.state.recipes,(function(t){return a("li",{key:t.id},[a("Recipe",{attrs:{recipe:t}})],1)})),0)])},j=[],W=a("4b70"),T=a.n(W),D=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__recipe"},[a("div",{staticClass:"arla-widget__recipe-image"},[a("img",{attrs:{src:t.recipe.imageUrl,alt:t.recipe.name}}),a("ArlaLogo",{staticClass:"arla-widget__recipe-logo"}),a("span",{staticClass:"arla-widget__recipe-match",class:{"arla-widget__recipe-match--invalid":t.recipe.matchedCount!==t.recipe.ingredientCount}},[a("span",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:t.hidePopup,expression:"hidePopup"}],on:{click:function(e){t.isMatchingPopupShown=!0}}},[t._v(" "+t._s(t.recipe.matchedCount)+"/"+t._s(t.recipe.ingredientCount)+" ")]),t.recipe.matchedCount!==t.recipe.ingredientCount?a("ingredients-popup",{staticClass:"arla-widget__match-popup--recipes",attrs:{"is-opened":t.isMatchingPopupShown,"mis-match-list":t.recipe.notMatchedIngredients},on:{close:function(e){t.isMatchingPopupShown=!1}}},[t._v(" Vi har desværre ikke; ")]):t._e()],1)],1),a("strong",{staticClass:"arla-widget__recipe-title"},[t._v(t._s(t.recipe.name))]),a("div",{staticClass:"arla-widget__recipe-details"},[a("span",{staticClass:"arla-widget__recipe-cooking-time"},[a("CookingIcon",{staticClass:"arla-widget__recipe-icon"}),t._v(" "+t._s(t.formatCookingTime(t.recipe))+" min ")],1),a("span",{staticClass:"arla-widget__recipe-recipe-portions"},[a("NumberPortionsIcon",{staticClass:"arla-widget__recipe-icon"}),t._v(" "+t._s(t.recipe.portions)+" portioner ")],1)])])},N=[],G=a("c7db"),U=a("1e2d"),$=a.n(U),V=a("47b1"),F=a.n(V),K=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__match-popup",class:{"is-opened":t.isVisible}},[a("div",{staticClass:"arla-widget__match-popup-inner"},[t._t("default"),a("span",{staticClass:"arla-widget__match-popup-mismatch"},[t._v(" "+t._s(t.misMatchList.join(", ").trim())+".")])],2),a("button",{ref:"closeButton",staticClass:"arla-widget__match-popup-close-button",style:{color:t.state.options.addRemoveProductButtonBg},on:{click:t.close}})])},J=[],q={directives:{onClickaway:G["directive"]},props:{misMatchList:{type:Array,default:function(){return[]}},isOpened:{type:Boolean,default:!1}},data:function(){return{state:h.state}},computed:{isVisible:function(){return this.isOpened}},methods:{close:function(){this.$emit("close")}}},X=q,Y=(a("9dc8"),Object(R["a"])(X,K,J,!1,null,"05b9bdff",null)),Z=Y.exports,Q={directives:{onClickaway:G["directive"]},components:{CookingIcon:$.a,NumberPortionsIcon:F.a,ArlaLogo:z.a,IngredientsPopup:Z},props:{recipe:{type:Object,default:function(){return{}}}},data:function(){return{isMatchingPopupShown:!1}},methods:{formatCookingTime:function(t){var e=t.cookingTime;return e>60?"60+":e},hidePopup:function(){this.isMatchingPopupShown=!1}}},tt=Q,et=(a("df6a"),Object(R["a"])(tt,D,N,!1,null,"1ff3aa64",null)),at=et.exports,st={components:{vueCustomScrollbar:T.a,Recipe:at},data:function(){return{state:h.state}}},rt=st,nt=(a("b3a5"),a("3e4d"),Object(R["a"])(rt,I,j,!1,null,"486f94de",null)),ot=nt.exports,it=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__products-container"},[a("vue-custom-scrollbar",{staticClass:"arla-widget__products-group-wrapper",attrs:{swicher:t.swicher,settings:t.settings}},[a("div",t._l(t.state.basket.productGroups,(function(e){return a("div",{key:t.getProductGroupName(e),staticClass:"arla-widget__products-group"},[a("button",{staticClass:"arla-widget__products-group-button",class:{"arla-widget__products-group-button--opened":t.isGroupCollapsed(t.getProductGroupName(e))},attrs:{type:"button"},on:{click:function(a){t.toggleProductGroup(t.getProductGroupName(e))}}},[t._v(" "+t._s(t.getProductGroupName(e))+" "),a("span",{staticClass:"arla-widget__products-group-match",class:{"arla-widget__products-group-match--invalid":e.matchedCount!=e.ingredientCount}},[t._v(" ("+t._s(e.matchedCount)+"/"+t._s(e.ingredientCount)+") ")])]),a("ul",{directives:[{name:"show",rawName:"v-show",value:!t.isGroupCollapsed(t.getProductGroupName(e)),expression:"!isGroupCollapsed(getProductGroupName(productGroup))"}],staticClass:"arla-widget__products-list"},t._l(e.products,(function(t){return a("li",{key:t.id},[a("ProductLine",{attrs:{product:t}})],1)})),0)])})),0)]),a("order-summary")],1)},ct=[],ut=(a("a434"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__product",class:{"arla-widget__product--disabled":0==t.product.amount}},[a("div",{staticClass:"arla-widget__product-scaling"},[a("button",{staticClass:"arla-widget__product-scaling-down",style:{backgroundColor:t.state.options.addRemoveProductButtonBg,borderColor:t.state.options.addRemoveProductButtonBg,color:t.state.options.addRemoveProductButtonColor},on:{mouseenter:t.applyHoverStyles,mouseleave:t.removeHoverStyles,focus:t.applyHoverStyles,blur:t.removeHoverStyles,click:function(e){return t.decreaseAmount()}}},[t._v(" Down ")]),a("input",{directives:[{name:"model",rawName:"v-model.lazy",value:t.product.amount,expression:"product.amount",modifiers:{lazy:!0}}],ref:"input",staticClass:"arla-widget__product-scaling-input",style:{borderColor:t.state.options.addRemoveProductButtonBg},attrs:{type:"text",pattern:"[0-9]*",inputmode:"numeric"},domProps:{value:t.product.amount},on:{keypress:[function(e){return t.isNumber(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.blurInput(e)}],focus:t.selectElement,change:function(e){return t.$set(t.product,"amount",e.target.value)}}}),a("button",{staticClass:"arla-widget__product-scaling-up",style:{backgroundColor:t.state.options.addRemoveProductButtonBg,borderColor:t.state.options.addRemoveProductButtonBg,color:t.state.options.addRemoveProductButtonColor},on:{mouseenter:t.applyHoverStyles,mouseleave:t.removeHoverStyles,focus:t.applyHoverStyles,blur:t.removeHoverStyles,click:function(e){return t.increaseAmount()}}},[t._v(" Up ")])]),a("div",{staticClass:"arla-widget__product-image"},[a("img",{attrs:{src:t.product.imageUrl,alt:t.product.name}})]),a("div",{staticClass:"arla-widget__product-description"},[a("div",{staticClass:"arla-widget__product-name-wrapper"},[a("strong",{staticClass:"arla-widget__product-name"},[t._v(t._s(t.product.name))]),a("span",{staticClass:"arla-widget__product-packaging"},[t._v(t._s(t.product.packaging))])])]),a("div",{staticClass:"arla-widget__product-price-info"},[a("span",{staticClass:"arla-widget__product-price"},[t._v(t._s(t.product.price))]),a("span",{staticClass:"arla-widget__product-price-per-unit"},[t._v(t._s(t.product.pricePerUnit))])]),a("button",{staticClass:"arla-widget__product-toggle-button",style:{color:t.state.options.addRemoveProductButtonBg},on:{mouseenter:t.applyHoverStylesBorderOnly,mouseleave:t.removeHoverStylesBorderOnly,focus:t.applyHoverStylesBorderOnly,blur:t.removeHoverStylesBorderOnly,click:function(e){return t.toggleProduct()}}})])}),lt=[],dt=(a("fb6a"),a("25f0"),{props:{product:{type:Object,required:!0}},data:function(){return{previousNumber:0,state:h.state}},watch:{"product.amount":function(){this.callBasketApi()}},mounted:function(){this.previousNumber=this.product.amount,!1===this.product.selected&&(this.product.amount=0)},methods:{callBasketApi:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.state.loading=!0,e.next=3,C.addVendorData();case 3:t.state.loading=!1,t.state.totalPrice=t.state.basket.totalPrice;case 5:case"end":return e.stop()}}),e)})))()},decreaseAmount:function(){this.product.amount>0?this.product.amount=parseInt(this.product.amount,10)-1:this.product.amount=0},increaseAmount:function(){this.product.amount=parseInt(this.product.amount,10)+1},toggleProduct:function(){this.product.amount>0?(this.previousNumber=parseInt(this.product.amount,10),this.product.amount=0):this.product.amount=this.previousNumber,this.callBasketApi()},blurInput:function(){this.$refs.input.blur()},selectElement:function(){var t=this;setTimeout((function(){t.$refs.input.select(),t.$refs.input.setSelectionRange(0,99999)}),100)},isNumber:function(t){var e=t||window.event,a=e.which?e.which:e.keyCode;return a>31&&(a<48||a>57)&&46!==a&&e.preventDefault(),!0},applyHoverStyles:function(t){t.target.style.backgroundColor=this.lightenDarkenColor(this.state.options.addRemoveProductButtonBg,-20),t.target.style.borderColor=this.lightenDarkenColor(this.state.options.addRemoveProductButtonBg,-20)},applyHoverStylesBorderOnly:function(t){t.target.style.borderColor=this.lightenDarkenColor(this.state.options.addRemoveProductButtonBg,-20)},removeHoverStyles:function(t){t.target.style.backgroundColor=this.state.options.addRemoveProductButtonBg,t.target.style.borderColor=this.state.options.addRemoveProductButtonBg},removeHoverStylesBorderOnly:function(t){t.target.style.borderColor=""},lightenDarkenColor:function(t,e){var a=!1,s=t;"#"==s[0]&&(s=s.slice(1),a=!0);var r=parseInt(s,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);var o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);var i=(255&r)+e;return i>255?i=255:i<0&&(i=0),(a?"#":"")+(i|o<<8|n<<16).toString(16)}}}),pt=dt,ht=(a("9a04"),Object(R["a"])(pt,ut,lt,!1,null,"01a2aa2c",null)),gt=ht.exports,ft=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__summary"},[a("div",{staticClass:"arla-widget__summary-match"},[a("div",{staticClass:"arla-widget__summary-match-count"},[a("strong",{staticClass:"arla-widget__summary-title"},[t._v("Varer:")]),a("span",{staticClass:"arla-widget__summary-match-out-of"},[t._v(" "+t._s(t.state.basket.matchedCount)+" af "+t._s(t.state.basket.ingredientCount)+" "),t.matchingNumber?a("div",{staticClass:"arla-widget__summary-matching-number"},[a("span",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:t.hidePopup,expression:"hidePopup"}],staticClass:"arla-widget__summary-matching-number-text",on:{click:function(e){t.isMissingIngredientsOpened=!0}}},[t._v(" "+t._s(t.matchingNumber)+" ")]),a("ingredients-popup",{staticClass:"arla-widget__match-popup--summary-popup",attrs:{"is-opened":t.isMissingIngredientsOpened,"mis-match-list":t.state.misMatchList},on:{close:t.hidePopup}},[t._v(" Vi har desværre ikke alle ingredienser på hylderne; ")])],1):t._e()])]),a("div",[a("strong",{staticClass:"arla-widget__summary-title"},[t._v("Total:")]),a("span",{staticClass:"arla-widget__summary-price"},[t._v(t._s(t.state.basket.totalPrice))])])]),a("div",{staticClass:"arla-widget__summary-details"},[a("button",{staticClass:"arla-widget__summary-add-to-basket",style:{backgroundColor:t.state.options.orderButtonBackground,color:t.state.options.orderButtonColor},attrs:{type:"button"},on:{click:t.addToBasket}},[t._v(" Føj til kurven ")])])])},mt=[],vt={track:function(t){window.digitalData&&window.digitalData.push(t)},trackPurchase:function(t,e,a){this.track({event:"purchase",eventCategory:"ecommerce",eventAction:"purchase",ecommerce:{purchase:{actionField:{id:e,affiliation:t,revenue:a}}}})}},_t={directives:{onClickaway:G["directive"]},components:{IngredientsPopup:Z},data:function(){return{state:h.state,isMissingIngredientsOpened:!1}},computed:{matchingNumber:function(){return this.state.basket.ingredientCount-this.state.basket.matchedCount}},methods:{addToBasket:function(){return Object(r["a"])(regeneratorRuntime.mark((function t(){var e,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return h.state.loading=!0,e="".concat(h.state.basket.vendor.name,"-").concat(h.state.basket.id),a=h.state.basket.vendor.name,s=h.state.basket.totalPrice,vt.trackPurchase(a,e,parseFloat(s.replace(",","."))),t.next=7,C.addToBasket();case 7:h.state.loading=!1,h.state.isWidgetActive=!1;case 9:case"end":return t.stop()}}),t)})))()},hidePopup:function(){this.isMissingIngredientsOpened=!1}}},wt=_t,bt=(a("f6e3"),Object(R["a"])(wt,ft,mt,!1,null,"36e6337c",null)),kt=bt.exports,Ct={components:{vueCustomScrollbar:T.a,ProductLine:gt,OrderSummary:kt},data:function(){return{collapsedGroups:[],settings:{suppressScrollX:!0},swicher:this.isMatchMobile(),state:h.state}},mounted:function(){var t=this;this.$nextTick((function(){window.addEventListener("resize",t.updateSwitcher)}))},beforeDestroy:function(){window.removeEventListener("resize",this.updateSwitcher)},methods:{toggleProductGroup:function(t){if(this.isGroupCollapsed(t)){var e=this.collapsedGroups.indexOf(t);this.collapsedGroups.splice(e,1)}else this.collapsedGroups.push(t)},isGroupCollapsed:function(t){return this.collapsedGroups.indexOf(t)>-1},updateSwitcher:function(){this.swicher=this.isMatchMobile()},isMatchMobile:function(){return window.matchMedia("(min-width: 768px)").matches},getProductGroupName:function(t){return t.name||t.category}}},yt=Ct,xt=(a("c79e"),Object(R["a"])(yt,it,ct,!1,null,"2c4f5b05",null)),Pt=xt.exports,Bt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__loader"},[a("div",{staticClass:"arla-widget__loader-inner",style:{borderTopColor:t.state.backgroundColor}})])},Mt=[],zt={data:function(){return{state:h.state}}},Ot=zt,At=(a("f832"),Object(R["a"])(Ot,Bt,Mt,!1,null,"53d4c199",null)),Rt=At.exports,St={components:{Recipes:ot,Products:Pt,Loader:Rt},data:function(){return{state:h.state}}},Ht=St,Et=(a("70ea"),Object(R["a"])(Ht,E,L,!1,null,"3b36b88e",null)),Lt=Et.exports,It=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"arla-widget__warehouse__content"},[t.state.loading?a("Loader"):t._e(),a("h3",{staticClass:"content-title arla-widget__warehouse-title"},[a("span",[t._v(t._s(t.state.translations.warehousesHeader))])]),a("span",{staticClass:"ps__rail-y"}),t.warehouses.length?a("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[a("div",{staticClass:"arla-widget__warehouse-container"},[a("vue-custom-scrollbar",{staticClass:"arla-widget__warehouse-list-wrapper",attrs:{swicher:t.scrollIsEnabled}},[a("ul",{staticClass:"arla-widget__warehouse-list"},t._l(t.warehouses,(function(e){return a("li",{key:e.id,staticClass:"arla-widget__warehouse-list-item"},[a("a",{staticClass:"arla-widget__warehouse-radio",class:{"is-active":e.id==t.selectedWarehouseId},attrs:{href:"#"},on:{click:function(a){return t.selectWarehouse(e.id)}}},[a("span",{staticClass:"arla-widget__warehouse-name"},[t._v(" "+t._s(e.name)+" ")]),a("address",{staticClass:"arla-widget__warehouse-address"},[t._v(" "+t._s(e.street)+", "+t._s(e.postalCode)+" "+t._s(e.city)+" ")])])])})),0)])],1),a("div",{staticClass:"arla-widget__warehouse-submit-container"},[a("button",{staticClass:"arla-widget__warehouse-submit",attrs:{type:"submit",disabled:!t.selectedWarehouseId}},[t._v(" "+t._s(t.state.translations.selectWarehouseButtonText)+" ")])])]):t._e()],1)},jt=[],Wt={components:{vueCustomScrollbar:T.a,Loader:Rt},data:function(){return{state:h.state,warehouses:[],selectedWarehouseId:null,scrollIsEnabled:!1,windowWidth:0}},watch:{windowWidth:function(t){this.scrollIsEnabled=t>=769}},created:function(){this.loadWarehouses()},mounted:function(){var t=this;this.$nextTick((function(){window.addEventListener("resize",t.onResize)})),this.onResize()},methods:{loadWarehouses:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.state.basket.instance.name,s=t.state.basket.vendor.name,e.next=4,k.getWarehouses(a,s);case 4:t.warehouses=e.sent,t.state.loading=!1;case 6:case"end":return e.stop()}}),e)})))()},selectWarehouse:function(t){this.selectedWarehouseId=t},submit:function(){this.selectedWarehouseId&&(this.state.basket.warehouseId=this.selectedWarehouseId)},onResize:function(){this.windowWidth=window.innerWidth}}},Tt=Wt,Dt=(a("c6fe"),a("ffd3"),Object(R["a"])(Tt,It,jt,!1,null,"7d01d894",null)),Nt=Dt.exports,Gt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("footer",{staticClass:"arla-widget__footer",style:{backgroundColor:t.state.options.headerFooterBgColor}},[a("p",{staticClass:"arla-widget__footer-text"},[t._v(" "+t._s(t.state.options.footerText)+" ")])])},Ut=[],$t={data:function(){return{state:h.state}}},Vt=$t,Ft=(a("7058"),Object(R["a"])(Vt,Gt,Ut,!1,null,"dd8bb4b8",null)),Kt=Ft.exports,Jt={name:"App",components:{Header:H,Basket:Lt,WarehouseSelector:Nt,Loader:Rt,Footer:Kt},data:function(){return{state:h.state,autoCheckout:!1,displayBasket:!1,displayWarehouseSelector:!1,checkoutPending:!1,firstLoad:!0}},watch:{"state.basket.warehouseId":function(){this.autoCheckout&&(this.firstLoad=!1,this.checkout())}},beforeMount:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a,s,r,n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=new URLSearchParams(window.location.search),s=a.get("vbw-basket"),e.next=4,k.getBasket(s);case 4:if(r=e.sent,t.state.options.basket=r,t.autoCheckout=a.get("vbw-checkout"),!t.autoCheckout){e.next=11;break}return t.state.basket=r,t.checkout(),e.abrupt("return");case 11:return n=r.recipes,o=[],n.forEach((function(t){t.cookingTime=f(t.cookingTime),o=[].concat(Object(d["a"])(o),Object(d["a"])(t.notMatchedIngredients))})),e.next=16,C.addVendorData();case 16:t.state.misMatchList=o.filter((function(t,e){return o.indexOf(t)===e})),t.state.basket=r,t.state.recipes=n,t.state.loading=!1,t.firstLoad=!1,t.displayBasket=!0;case 22:case"end":return e.stop()}}),e)})))()},mounted:function(){var t=this;x(),this.state.options.closeOnEscPress&&document.addEventListener("keydown",(function(e){27==e.keyCode&&t.closeWidget()}))},methods:{closeWidget:function(){this.state.options.closeOnEscPress&&(this.state.isWidgetActive=!1)},checkout:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var a,s,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.checkoutPending){e.next=2;break}return e.abrupt("return");case 2:if(t.checkoutPending=!0,a=t.state.basket,s=a.vendor.features.warehouses,t.state.loading=!0,!s){e.next=16;break}if(!a.warehouseId){e.next=12;break}return e.next=10,C.setDeliveryAddress(a.warehouseId);case 10:e.next=16;break;case 12:return t.displayWarehouseSelector=!0,t.state.loading=!1,t.checkoutPending=!1,e.abrupt("return");case 16:return t.updateUnselectedProducts(a),e.next=19,C.addToBasket();case 19:r=C.getCheckoutUrl(),window.location=r;case 21:case"end":return e.stop()}}),e)})))()},updateUnselectedProducts:function(t){t.productGroups.forEach((function(t){t.products.forEach((function(t){!1===t.selected&&(t.amount=0)}))}))}}},qt=Jt,Xt=(a("375c"),Object(R["a"])(qt,u,l,!1,null,"a7ca6aaa",null)),Yt=Xt.exports;try{s["default"].config.productionTip=!1,new s["default"]({render:function(t){return t(Yt)}}).$mount("#arla-basket-widget")}catch(Zt){c.trackError(Zt)}},"564b":function(t,e,a){},"6e0b":function(t,e,a){},7058:function(t,e,a){"use strict";var s=a("8b8c"),r=a.n(s);r.a},"70ea":function(t,e,a){"use strict";var s=a("ef4d"),r=a.n(s);r.a},7719:function(t,e,a){},"8b8c":function(t,e,a){},"9a04":function(t,e,a){"use strict";var s=a("3e70"),r=a.n(s);r.a},"9dc8":function(t,e,a){"use strict";var s=a("0ed8"),r=a.n(s);r.a},b3a5:function(t,e,a){"use strict";var s=a("4b66"),r=a.n(s);r.a},b4b8:function(t,e,a){a("d3b7"),a("4d63"),a("ac1f"),a("25f0"),a("3ca3"),a("ddb0"),a("2b3d"),window.URLSearchParams=window.URLSearchParams||function(t){var e=this;e.searchString=t,e.get=function(t){var a=new RegExp("[?&]".concat(t,"=([^&#]*)")).exec(e.searchString);return null==a?null:decodeURI(a[1])||0}}},c4e5:function(t,e,a){},c63e:function(t,e,a){},c6fe:function(t,e,a){"use strict";var s=a("3438"),r=a.n(s);r.a},c79e:function(t,e,a){"use strict";var s=a("7719"),r=a.n(s);r.a},d84a:function(t,e,a){"use strict";var s=a("4572"),r=a.n(s);r.a},df6a:function(t,e,a){"use strict";var s=a("c4e5"),r=a.n(s);r.a},ef4d:function(t,e,a){},f6e3:function(t,e,a){"use strict";var s=a("c63e"),r=a.n(s);r.a},f7d3:function(t,e,a){},f832:function(t,e,a){"use strict";var s=a("6e0b"),r=a.n(s);r.a},ffd3:function(t,e,a){"use strict";var s=a("f7d3"),r=a.n(s);r.a}}]); //# sourceMappingURL=widget.71d509b7.js.map