PageSourceSearch

https://skogma.se/1894d7502e523b2cc18093f6549a088634977ef8/assets/grube/js/55.app.js

js skogma.se collected 2026-09-26 13:43:43 UTC 8,348 bytes, 1 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{723:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"home-page-slider-v2"},[i("div",{key:e.generatedDisplayKey,ref:"carousel",staticClass:"carousel-2",attrs:{"data-flickity":{wrapAround:!0},tabindex:"0"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.goToActiveSlide(t)}}},[e._l(e.slides,(function(t,n){return i("a",{key:"cell-"+n,staticClass:"carousel-cell",attrs:{title:t.image.title,"aria-label":t.alt,href:t.link?t.link.url:null,target:t.link&&t.link.openLinkInNewWindow?"_blank":"_self",tabindex:e.tabIndexFor(n)},on:{click:function(e){e.preventDefault(),e.stopPropagation()}}},[i("img",{staticClass:"carousel-cell-image",attrs:{src:e.imageUrl(n),alt:t.alt}})])})),e._v(" "),e.brands.length?i("div",{staticClass:"brands-list"},[i("wn-list",{attrs:{items:e.brands,"is-images":"","is-click-bar":"","variable-link":"brandFilter","variable-image":"imageLink"}})],1):e._e()],2)])};n._withStripped=!0;var r=i(38),o=i(4),s=i(16),a=i(180),l=i.n(a);function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",r=i.toStringTag||"@@toStringTag";function o(i,n,r,o){var l=n&&n.prototype instanceof a?n:a,c=Object.create(l.prototype);return u(c,"_invoke",function(i,n,r){var o,a,l,c=0,u=r||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,i){return o=t,a=0,l=e,f.n=i,s}};function h(i,n){for(a=i,l=n,t=0;!d&&c&&!r&&t<u.length;t++){var r,o=u[t],h=f.p,v=o[2];i>3?(r=v===n)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((r=i<2&&h<o[1])?(a=0,f.v=n,f.n=o[1]):h<v&&(r=i<3||o[0]>n||n>v)&&(o[4]=i,o[5]=n,f.n=v,a=0))}if(r||i>1)return s;throw d=!0,n}return function(r,u,v){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,v),a=u,l=v;(t=a<2?e:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e}else if((t=(d=f.n<0)?l:i.call(n,f))!==s)break}catch(t){o=e,a=1,l=t}finally{c=1}}return{value:t,done:d}}}(i,r,o),!0),c}var s={};function a(){}function l(){}function d(){}t=Object.getPrototypeOf;var f=[][n]?t(t([][n]())):(u(t={},n,(function(){return this})),t),h=d.prototype=a.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=d,u(h,"constructor",d),u(d,"constructor",l),l.displayName="GeneratorFunction",u(d,r,"GeneratorFunction"),u(h),u(h,r,"Generator"),u(h,n,(function(){return this})),u(h,"toString",(function(){return"[object Generator]"})),(c=function(){return{w:o,m:v}})()}function u(e,t,i,n){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}(u=function(e,t,i,n){function o(t,i){u(e,t,(function(e){return this._invoke(t,i,e)}))}t?r?r(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(o("next",0),o("throw",1),o("return",2))})(e,t,i,n)}function d(e,t,i,n,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}function f(e){return function(){var t=this,i=arguments;return new Promise((function(n,r){var o=e.apply(t,i);function s(e){d(o,n,r,s,a,"next",e)}function a(e){d(o,n,r,s,a,"throw",e)}s(void 0)}))}}var h={name:"home-page-slider-v2",mixins:[o.a],components:{wnList:r.default},props:{slides:{type:Array,default:function(){return[]}}},data:function(){return{activeSlide:null,isMobile:window.innerWidth<s.a.tablet,flickityInstance:null,generatedDisplayKey:window.innerWidth,headerSet:!1,lastClientTouchCoordinates:{x:0,y:0}}},computed:{brands:function(){return this.$store&&this.pageModel.headerBrandsModel&&this.pageModel.headerBrandsModel.brands?this.pageModel.headerBrandsModel.brands:[]}},mounted:function(){var e,t=this;if(1===this.slides.length&&null!==(e=this.$store)&&void 0!==e&&e.commit){var i,n=this.isMobile&&null!==(i=this.slides[0].imageMobile)&&void 0!==i&&i.shopImagePath?this.slides[0].imageMobile.shopImagePath:this.slides[0].image.shopImagePath;
1this.$store.commit("updateShopHeaderBackground",n),this.headerSet=!0}this.slides&&this.slides.length&&(this.activeSlide=0),this.slides.length>1&&this.$nextTick(f(c().m((function e(){return c().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,t.waitForFirstImage();case 1:t.initFlickity(),t.$nextTick((function(){t.flickityInstance&&(t.flickityInstance.resize(),t.updateNeighborClasses())}));case 2:return e.a(2)}}),e)})))),window.addEventListener("resize",this.onWindowResize)},beforeDestroy:function(){window.removeEventListener("resize",this.onWindowResize),this.destroyFlickity()},methods:{waitForFirstImage:function(){var e=this;return new Promise((function(t){var i=e.$refs.carousel;if(!i)return t();var n=i.querySelector(".carousel-cell img");if(!n)return t();if(n.complete&&n.naturalWidth>0)return t();var r=function(){n.removeEventListener("load",r),n.removeEventListener("error",r),t()};n.addEventListener("load",r),n.addEventListener("error",r),setTimeout(t,800)}))},onWindowResize:function(){var e=this;this.isMobile=window.innerWidth<s.a.tablet,this._resizeT&&clearTimeout(this._resizeT),this._resizeT=setTimeout((function(){e.flickityInstance&&(e.flickityInstance.resize(),e.updateNeighborClasses())}),100)},imageUrl:function(e){var t;return this.isMobile&&null!==(t=this.slides[e].imageMobile)&&void 0!==t&&t.shopImagePath?this.slides[e].imageMobile.shopImagePath:this.slides[e].image.shopImagePath},initFlickity:function(){var e=this;this.$refs.carousel&&(this.flickityInstance&&this.flickityInstance.destroy&&(this.flickityInstance.destroy(),this.flickityInstance=null),this.flickityInstance=new l.a(this.$refs.carousel,{cellSelector:".carousel-cell",wrapAround:!0,draggable:">1",imagesLoaded:!0}),this.flickityInstance.on("change",(function(t){var i;e.activeSlide=t,e.headerSet&&null!==(i=e.$store)&&void 0!==i&&i.commit&&e.$store.commit("updateShopHeaderBackground",e.imageUrl(t)),e.$nextTick((function(){return e.updateNeighborClasses()}))})),this.flickityInstance.on("settle",(function(){var t,i;if(!e.headerSet&&null!==(t=e.$store)&&void 0!==t&&t.commit&&e.flickityInstance){var n,r=null!==(n=e.flickityInstance.selectedIndex)&&void 0!==n?n:0;e.$store.commit("updateShopHeaderBackground",e.imageUrl(r)),e.headerSet=!0}e.flickityInstance&&(e.activeSlide=null!==(i=e.flickityInstance.selectedIndex)&&void 0!==i?i:0);e.$nextTick((function(){return e.updateNeighborClasses()}))})),this.flickityInstance.on("staticClick",(function(t,i,n,r){null!=r&&(e.flickityInstance&&"number"==typeof r&&r!==e.flickityInstance.selectedIndex?e.flickityInstance.select(r):e.goToUrl(e.slides[r]))})),this.$nextTick((function(){e.updateNeighborClasses(),e.flickityInstance&&e.flickityInstance.resize()})))},updateNeighborClasses:function(){var e,t,i,n=this.$refs.carousel;if(n){var r=Array.from(n.querySelectorAll(".carousel-cell"));if(r.length&&(r.forEach((function(e){return e.classList.remove("is-neighbor-prev","is-neighbor-next")})),this.flickityInstance)){var o=null!==(e=this.flickityInstance.selectedIndex)&&void 0!==e?e:0,s=r.length;if(!(s<2)){var a=(o+1)%s;null===(t=r[(o-1+s)%s])||void 0===t||t.classList.add("is-neighbor-prev"),null===(i=r[a])||void 0===i||i.classList.add("is-neighbor-next")}}}},tabIndexFor:function(e){return this.activeSlide===e?0:-1},destroyFlickity:function(){this.flickityInstance&&this.flickityInstance.destroy&&(this.flickityInstance.destroy(),this.flickityInstance=null)},goToUrl:function(e){if(e&&e.link&&e.link.url){var t=e.link.openLinkInNewWindow?"_blank":"_self";window.open(e.link.url,t)}},goToActiveSlide:function(){if(null!==this.activeSlide&&this.activeSlide>-1){var e=this.slides[this.activeSlide];if(!e||!e.link||!e.link.url)return;var t=e.link.openLinkInNewWindow?"_blank":"_self";window.open(e.link.url,t)}}}},v=i(1),p=Object(v.a)(h,n,[],!1,null,null,null);p.options.__file="src/grube/components/homePageSliderV2/homePageSliderV2.vue";t.default=p.exports}}]);

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.