PageSourceSearch

https://www.kaufmann.dk/theme/a559456b45a3af2891380e867bedf52f/js/…/wexo-creator-universe.js?1790057350

js kaufmann.dk collected 2026-09-24 09:57:28 UTC 6,968 bytes, 1 lines download raw bytes

1(()=>{"use strict";class e{registerAlpineGlobal(){window.Alpine?this.initAlpine():document.addEventListener("alpine:init",()=>{this.initAlpine()})}initAlpine(){"function"==typeof this.registerAlpineInstance&&this.registerAlpineInstance()}constructor(){this.registerAlpineGlobal()}}class t extends e{registerAlpineInstance(){!this.constructor.COMPONENT_NAME||Alpine.rawData&&Alpine.rawData[this.constructor.COMPONENT_NAME]||"function"!=typeof this.registerStore||this.registerStore()}}class s extends t{registerStore(){Alpine.store(s.COMPONENT_NAME,{images:[],selectedGalleryIndex:0,setup(e){this.images=e||[],this.selectedGalleryIndex=0},getSelectedImage(){return this.images[this.selectedGalleryIndex]||{}},reset(){this.images=[],this.selectedGalleryIndex=0}})}}s.COMPONENT_NAME="creatorLookStore";class o extends e{registerAlpineInstance(){this.constructor.COMPONENT_NAME&&"function"==typeof this.registerComponent&&this.registerComponent()}}class r extends o{registerComponent(){Alpine.data(r.COMPONENT_NAME,()=>({zoomOnMouseOver:!0,isOpen:!1,init(){this.shouldZoomOnMouseOver(),this.$watch("selected",()=>{this.shouldZoomOnMouseOver()})},get selected(){return Alpine.store("creatorLookStore").getSelectedImage()},get maxIndex(){return Alpine.store("creatorLookStore").images.length-1},up(){let e=Alpine.store("creatorLookStore").images.shift();Alpine.store("creatorLookStore").images.push(e),this.previous()},down(){let e=Alpine.store("creatorLookStore").images.pop();Alpine.store("creatorLookStore").images.unshift(e),this.next()},next(){this.getSelectedIndex()===this.maxIndex?this.setSelectedIndex(0):Alpine.store("creatorLookStore").selectedGalleryIndex++},previous(){0===this.getSelectedIndex()?this.setSelectedIndex(this.maxIndex):Alpine.store("creatorLookStore").selectedGalleryIndex--},selectIndex(e){this.setSelectedIndex(e)},openLightbox(){this.isOpen=!0,this.$dispatch("show-overlay")},closeLightbox(){this.isOpen=!1,this.$dispatch("hide-overlay")},zoom(e){let t,s,o,r;var i=e.currentTarget;void 0!==e.offsetX&&void 0!==e.offsetY?(t=e.offsetX,s=e.offsetY):e.touches&&e.touches.length&&(t=e.touches[0].pageX,s=e.touches[0].pageY),o=t/i.offsetWidth*100,r=s/i.offsetHeight*100,i.style.backgroundPosition=o+"% "+r+"%"},shouldZoomOnMouseOver(){let e,t;let s=this,o=new Image;o.src=this.selected.full_src,o.onload=function(){s.zoomOnMouseOver=!1,e=this.width,t=this.height,e>1e3&&t>1e3&&(s.zoomOnMouseOver=!0)}},getSelectedIndex:()=>Alpine.store("creatorLookStore").selectedGalleryIndex,setSelectedIndex(e){Alpine.store("creatorLookStore").selectedGalleryIndex=e}}))}}r.COMPONENT_NAME="creatorLookGalleryDesktop";class i extends o{registerComponent(){Alpine.data(i.COMPONENT_NAME,()=>({isOpen:!1,currentSlide:0,slidesCount:0,init(){this.slidesCount=Alpine.store("creatorLookStore").images.length},onScroll(e){let t=(null==e?void 0:e.target)||this.$refs.slider||this.$refs.sliderLightbox;if(!t)return;let s=t.offsetWidth,o=t.scrollLeft;this.currentSlide=Math.round(o/s)},gotoSlide(e){let t=this.$refs.slider,s=this.$refs.sliderLightbox;if(t){let s=t.offsetWidth;t.scrollTo({left:s*e,behavior:"smooth"})}s&&(s.scrollLeft=s.scrollWidth/this.slidesCount*e),this.currentSlide=e}
1,getSelectedSlide(){return this.currentSlide},openLightbox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.isOpen=!0,this.$dispatch("show-overlay"),setTimeout(()=>{null!==e?this.$dispatch("mobile-image-carousel-goto-index",e):this.$dispatch("mobile-image-carousel-goto-index",this.currentSlide)},25),this.changeThemeColor("#DADADA")},closeLightbox(e){this.isOpen=!1,this.$dispatch("hide-overlay"),this.$dispatch("mobile-image-carousel-goto-index",e),this.changeThemeColor("#15191C")},next(){let e=Alpine.store("creatorLookStore").images.length-1;Alpine.store("creatorLookStore").selectedGalleryIndex===e?Alpine.store("creatorLookStore").selectedGalleryIndex=0:Alpine.store("creatorLookStore").selectedGalleryIndex++},previous(){let e=Alpine.store("creatorLookStore").images.length-1;0===Alpine.store("creatorLookStore").selectedGalleryIndex?Alpine.store("creatorLookStore").selectedGalleryIndex=e:Alpine.store("creatorLookStore").selectedGalleryIndex--},get selected(){return Alpine.store("creatorLookStore").getSelectedImage()},changeThemeColor(e){let t=document.getElementById("theme-color-meta");t&&t.setAttribute("content",e)}}))}}i.COMPONENT_NAME="creatorLookGalleryMobile";class n{get(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",o=this._createPreparedRequest("GET",e,s);return this._sendRequest(o,null,t)}post(e,t,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";o=this._getContentType(t,o);let r=this._createPreparedRequest("POST",e,o);return this._sendRequest(r,t,s)}delete(e,t,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";o=this._getContentType(t,o);let r=this._createPreparedRequest("DELETE",e,o);return this._sendRequest(r,t,s)}patch(e,t,s){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";o=this._getContentType(t,o);let r=this._createPreparedRequest("PATCH",e,o);return this._sendRequest(r,t,s)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn("the request to ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,s){return this._registerOnLoaded(e,s),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,s){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),s&&this._request.setRequestHeader("Content-type",s),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}class l extends o{registerComponent(){Alpine.data(l.COMPONENT_NAME,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{products:e,allProductSizes:{},httpClient:null,init(){this.$nextTick(()=>{this.fetchProductSizes()})},async fetchProductSizes(){if(!this.products||0===this.products.length)return;let e={products:this.products.reduce((e,t)=>(e[t.productNumber]={productId:t.id},e),{})};this.httpClient||(this.httpClient=new n),this.httpClient.post(l.GET_PRODUCT_SIZES_ENDPOINT,JSON.stringify(e),e=>{let t=JSON.parse(e);t&&[200,202,204].includes(t.status)&&(this.allProductSizes=t.products)})}}})}}l.COMPONENT_NAME="creatorLookProducts",l.GET_PRODUCT_SIZES_ENDPOINT=window.router["frontend.product.product-sizes"],new s,new r,new i,new l})();

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.