PageSourceSearch

https://velvet-tees.com/cdn/shop/t/1390/assets/template.page.locations.js?v=78271005818088779911790616643

js velvet-tees.com collected 2026-10-02 04:14:56 UTC 13,489 bytes, 2 lines download raw bytes

1(function(t){function e(e2){for(var n2,s2,a2=e2[0],c2=e2[1],l2=e2[2],d=0,m=[];d<a2.length;d++)s2=a2[d],Object.prototype.hasOwnProperty.call(r,s2)&&r[s2]&&m.push(r[s2][0]),r[s2]=0;for(n2 in c2)Object.prototype.hasOwnProperty.call(c2,n2)&&(t[n2]=c2[n2]);for(u&&u(e2);m.length;)m.shift()();return i.push.apply(i,l2||[]),o()}function o(){for(var t2,e2=0;e2<i.length;e2++){for(var o2=i[e2],n2=!0,a2=1;a2<o2.length;a2++){var c2=o2[a2];r[c2]!==0&&(n2=!1)}n2&&(i.splice(e2--,1),t2=s(s.s=o2[0]))}return t2}var n={},r={20:0},i=[];function s(e2){if(n[e2])return n[e2].exports;var o2=n[e2]={i:e2,l:!1,exports:{}};return t[e2].call(o2.exports,o2,o2.exports,s),o2.l=!0,o2.exports}s.m=t,s.c=n,s.d=function(t2,e2,o2){s.o(t2,e2)||Object.defineProperty(t2,e2,{enumerable:!0,get:o2})},s.r=function(t2){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t2,"__esModule",{value:!0})},s.t=function(t2,e2){if(1&e2&&(t2=s(t2)),8&e2||4&e2&&typeof t2=="object"&&t2&&t2.__esModule)return t2;var o2=Object.create(null);if(s.r(o2),Object.defineProperty(o2,"default",{enumerable:!0,value:t2}),2&e2&&typeof t2!="string")for(var n2 in t2)s.d(o2,n2,function(e3){return t2[e3]}.bind(null,n2));return o2},s.n=function(t2){var e2=t2&&t2.__esModule?function(){return t2.default}:function(){return t2};return s.d(e2,"a",e2),e2},s.o=function(t2,e2){return Object.prototype.hasOwnProperty.call(t2,e2)},s.p="";var a=window.shopifySlateJsonp=window.shopifySlateJsonp||[],c=a.push.bind(a);a.push=e,a=a.slice();for(var l=0;l<a.length;l++)e(a[l]);var u=c;i.push([236,1,2]),o(),console.log(i),console.log("********************")})({236:function(t,e,o){"use strict";o.r(e),o(95);var n=o(2),r=o(52),i=o(53),s=o(17),a=o(54),c=o(55),l=o(56),u=o(43),d=o.n(u),m=o(0);o(41);var p=function t2(e2,o2){console.log(t2);var n2=this;(function(t3,e3){if(!(t3 instanceof e3))throw new TypeError("Cannot call a class as a function")})(this,t2),this.destroy=function(){n2.zoomBtn.removeEventListener("click",n2.onZoomClick),n2.closeBtn.removeEventListener("click",n2.resetAllZoom),n2.modalUnderlay.removeEventListener("click",n2.resetAllZoom),n2.extraZoomContainer.removeEventListener("click",n2.closeExtraZoom),Object(m.a)(n2.cells,function(t3){t3.removeEventListener("click",n2.onCellClick)}),n2.carousel&&n2.carousel.destroy()},this.resetAllZoom=function(){Object(m.a)(n2.zoomedImages,function(t3){t3.classList.contains("dn")||t3.classList.add("dn")}),n2.closeExtraZoom()},this.closeExtraZoom=function(){n2.extraZoomContainer.classList.contains("dn")||(n2.extraZoomContainer.classList.add("dn"),n2.extraZoom.src="")},this.onCellClick=function(t3){var e3=t3.currentTarget.querySelector("img").src;n2.extraZoomContainer.classList.toggle("dn"),n2.extraZoom.src=e3},this.onZoomClick=function(t3){n2.carousel.resize(),n2.carousel.select(n2.originCarousel.selectedIndex,!1,!0)},this.el=e2,this.originCarousel=o2,this.zoomBtn=document.querySelector(t2.zoomBtnSelector),this.cells=e2.querySelectorAll(t2.cellSelector),this.zoomedImages=e2.querySelectorAll(t2.zoomImageSelector),this.closeBtn=document.querySelector(t2.closeBtnSelector),this.modalUnderlay=document.querySelector(t2.modalUnderlaySelector),this.extraZoomContainer=document.querySelector(t2.extraZoomContainerSelector),this.extraZoom=document.querySelector(t2.extraZoomSelector),this.el.childElementCount>1&&(this.carousel=new d.a(this.el,{imagesLoaded:!0,cellAlign:"left",cellSelector:t2.cellSelector,contain:!1,wrapAround:!0,prevNextButtons:!0,dragThreshold:1,pageDots:!1,arrowShape:"M67.1423563,20.7684428 C66.0612938,19.755346 64.3574043,19.7471815 63.2663835,20.7249786 L63.1557561,20.8296464 L33,50.9418397 L63.2200785,79.2325437 C64.3389823,80.2800121 66.123829,80.2517123 67.2066452,79.1693344 C68.2533675,78.1230358 68.2609213,76.4747646 67.2495602,75.4198682 L67.1413028,75.3129066 L40.9755305,50.816818 L67.2056252,24.624903 C68.2529099,23.5791312 68.2613499,21.930864 67.2505561,20.8754588 L67.1423563,20.7684428 Z"})),this.zoomBtn.addEventListener("click",this.onZoomClick),this.closeBtn.addEventListener("click",this.resetAllZoom),this.modalUnderlay.addEventListener("click",this.resetAllZoom),this.extraZoomContainer.addEventListener("click",this.closeExtraZoom),Object(m.a)(this.cells,function(t3){t3.addEventListener("click",n2.onCellClick)}),this.carousel.on("change",this.resetAllZoom)};p.domSelector=".mobile-image-zoom",p.imageSelector=".mobile-image-zoom__variant-image",p.zoomBtnSelector=".mobile-image-zoom-trigger",p.cellSelector=".mobile-image-zoom__slide-visible",p.zoomImageSelector=".mobile-image__zoomed",p.closeBtnSelector=".mobile-image-zoom__modal .modal__close",p.modalUnderlaySelector=".mobile-image-zoom__modal-underlay",p.extraZoomContainerSelector=".mobile-image-zoom__extra-zoom-container",p.extraZoomSelector=".mobile-image-zoom__extra-zoom",p.processVariantImages=function(t2){var e2=document.querySelectorAll(p.imageSelector);Object(m.a)(e2,function(e3){e3.dataset.variants.indexOf(t2)>-1?(e3.classList.add(p.cellSelector.replace(".","")),e3.classList.remove("dn")):(e3.classList.remove(p.cellSelector.replace(".","")),e3.classList.add("dn"))})};var h=p,f=o(5),v=o.n(f),g=o(7),S=o.n(g),y=o(88),b=function t2(e2,o2){(function(t3,e3){if(!(t3 instanceof e3))throw new TypeError("Cannot call a class as a function")})(this,t2),console.log(this),L.call(this),this.el=e2,console.log(this.el),console.log("==========="),this.inputEl=e2.querySelector(t2.inputSelector),this.submitButton=e2.querySelector(t2.submitSelector),this.submitButton.disabled=!0,this.el.addEventListener("submit",this.onSubmit),this.variantId=o2,this.locationsDiv=e2.querySelector(t2.locationsSelector),this.displayLoading(),this.processLocations();var n2=null;try{n2=localStorage.getItem("zip")}catch(t3){console.error(t3)}n2?this.inputEl.value=n2:this.getCurrentPosition(),this.processLocations(),this.inputEl.value&&this.inputEl.parentNode.classList.add("is-floating")};b.domSelector=".inventory-form",b.locationsSelector=".inventory-form-locations",b.inputSelector="input[name=zip_code]",b.submitSelector="button[type=submit]";var L=function(){var t2=this;this.processLocations=function(){t2.displayLoading(),y.b(t2.variantId).then(function(e2){t2.locations=e2.locations.filter(function(t3){return!INVENTORY.hiddenLocationNames.includes(t3.name.toLowerCase().trim())}),t2.variantLocationIds=e2.variantLocationIds,t2.submitButton.disabled=!1,t2.inputEl.value&&t2.onSubmit()})},this.displayLocations=function(e2){if(e2){t2.displayLoading(),console.log(t2),console.log("====");var o2=t2.locations.filter(function(t3){var o3=(function(t4,e3,o4,n2){var r2=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"M";if(t4==o4&&e3==n2)return 0;var i2=Math.PI*t4/180,s2=Math.PI*o4/180,a2=e3-n2,c2=Math.PI*a2/180,l2=Math.sin(i2)*Math.sin(s2)+Math.cos(i2)*Math.cos(s2)*Math.cos(c2);return l2>1&&(l2=1),l2=60*(l2=180*(l2=Math.acos(l2))/Math.PI)*1.1515,r2=="K"&&(l2*=1.609344),r2=="N"&&(l2*=.8684),l2})(e2.location.lat,e2.location.lng,t3.gmaps.location.lat,t3.gmaps.location.lng);return t3.distance=Math.round(o3),o3<=100});console.log(o2),o2.length>0?(t2.locationsDiv.innerHTML="",o2.sort(function(t3,e3){return t3.distance-e3.distance}
1).forEach(function(e3){console.log(e3);var o3="https://maps.google.com/?daddr="+e3.gmaps.location.lat+","+e3.gmaps.location.lng+"&ll=",n2=document.createElement("div");n2.className="inventory-location",n2.innerHTML='\n					<h3 class="fw--900 uppercase">\n						'+e3.name+"\n					</h3>\n					<address>\n						"+e3.address1+"\n						<br>\n						"+e3.city+", "+e3.province_code+" "+e3.zip+"\n					</address>\n					<p>\n						"+e3.distance+" "+(e3.distance==1?"mile":"miles")+' away\n					</p>\n					<a\n						class="link--target-no-hover"\n						href="'+o3+'"\n						target="_blank"\n					>\n						<span class="link__target">\n							Directions\n						</span>\n					</a>\n				',t2.variantLocationIds.find(function(t3){return t3==e3.id})?n2.innerHTML+='\n						<p class="fw--900">\n							<svg width="15px" height="11px" viewBox="0 0 15 11" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n								<g id="PDP:-In-Store-Locations" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n									<g id="Desktop-/-PDP-/-Search-Stores-Pop-up" transform="translate(-598.000000, -491.000000)">\n										<g id="Modal" transform="translate(307.000000, 118.000000)">\n											<g id="Group-13" transform="translate(243.000000, 266.000000)" fill-rule="nonzero" stroke="#000000" stroke-linecap="square" stroke-width="1.5">\n												<polyline id="Path-5" points="49 111.713401 53.5073118 116.220713 61.7280249 108"></polyline>\n											</g>\n										</g>\n									</g>\n								</g>\n							</svg>\n							Available for in-store pickup today\n						</p>\n					':n2.innerHTML+='\n						<p class="fw--900">\n							Unavailable at this location\n						</p>\n					',t2.locationsDiv.appendChild(n2)})):t2.locationsDiv.innerHTML='\n				<label class="fw--900 db tc">\n					No locations found in an 100 miles radius.\n				</label>\n			'}else t2.locationsDiv.innerHTML="<b>Zip code invalid</b>"},this.getCurrentPosition=function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(e2){y.a(e2.coords.latitude,e2.coords.longitude).then(function(e3){e3&&(t2.inputEl.value=e3.zip)})})},this.onSubmit=function(e2){e2&&e2.preventDefault(),console.log(e2);try{localStorage.setItem("zip",t2.inputEl.value)}catch(t3){console.error(t3)}t2.displayLoading(),y.c(t2.inputEl.value).then(function(e3){t2.displayLocations(e3)})},this.displayLoading=function(){t2.locationsDiv.innerHTML='<label class="fw--900 pulsing">Fetching Inventory</label>'}},I=b,w=function t2(e2,o2,n2,r2){var i2=this;(function(t3,e3){if(!(t3 instanceof e3))throw new TypeError("Cannot call a class as a function")})(this,t2),C.call(this),this.el=e2,this.appStore=r2,this.underlay=o2,this.close=e2.querySelectorAll(t2.closeSelector),this.triggers=n2,this.underlay.addEventListener("click",this.onClose),Object(m.a)(this.close,function(t3){t3.addEventListener("click",i2.onClose)}),Object(m.a)(this.triggers,function(t3){t3.addEventListener("click",i2.onOpen)})};w.domSelector=".inventory-modal__container",w.underlaySelector=".modal__underlay",w.closeSelector=".modal__close",w.triggerSelector=".modal__trigger",w.appearTimeout=5e3,w.transitionTimeout=300;var C=function(){var t2=this;this.destroy=function(){Object(m.a)(t2.close,function(e2){e2.removeEventListener("click",t2.onClose)}),t2.close.removeEventListener("click",t2.onClose),t2.underlay.removeEventListener("click",t2.onClose)},this.onOpen=function(){t2.el.classList.remove("dn"),t2.underlay.classList.remove("dn"),document.documentElement.classList.add("of--hidden"),setTimeout(function(){t2.el.classList.add("active"),t2.underlay.classList.add("active")},50),t2.inventoryForm=new I(t2.el.querySelector(I.domSelector),t2.appStore.getState().activeProductVariantId)},this.onClose=function(){t2.el.classList.remove("active"),t2.underlay.classList.remove("active"),document.documentElement.classList.remove("of--hidden"),setTimeout(function(){t2.el.classList.add("dn"),t2.underlay.classList.add("dn")},w.transitionTimeout)}},E=w,O=document.querySelector(r.a.domSelector),A=window,j=A.HYDRATE_PRODUCT_ID,x=A.HYDRATE_VARIANT_ID,V=A.PRODUCT_VARIANT_OPTIONS,k=A.PRODUCT_FIT_URL,_=S.a.parse(window.location.search),T=Number(_.variant||x);n.a.store.setActiveVariantId(T),n.a.inventoryModals=[],Object(m.a)(document.querySelectorAll(E.domSelector),function(t2){var e2=document.querySelector(E.underlaySelector+'[data-modal="'+t2.dataset.modal+'"]'),o2=document.querySelectorAll(E.triggerSelector+'[data-modal="'+t2.dataset.modal+'"]');e2&&o2.length>0&&n.a.inventoryModals.push(new E(t2,e2,o2,n.a.store))}),n.a.productFitGuide=new c.a(document.querySelector(c.a.domSelector),k),n.a.productForm=new i.a(document.querySelector(i.a.domSelector),V,n.a.store),n.a.backInStockForm=new r.a(O,j,n.a.store),n.a.zoomImages=Object(m.a)(document.querySelectorAll(l.a.domSelector),function(t2){return new l.a(t2)}),v()(V,{id:n.a.store.getState().activeProductVariantId}).isAvailable?O.classList.add("dn"):O.classList.remove("dn"),n.a.recommendations=new a.a(document.querySelector(a.a.domSelector)),s.a.processVariantImages(T),n.a.productHeroCarousel=new s.a(document.querySelector(s.a.domSelector)),h.processVariantImages(T),n.a.mobileZoomComponent=new h(document.querySelector(h.domSelector),n.a.productHeroCarousel.carousel),n.a.store.listen(function(t2,e2){if(t2.activeProductVariantId!==e2.activeProductVariantId){n.a.productHeroCarousel.destroy(),n.a.mobileZoomComponent.destroy(),s.a.processVariantImages(t2.activeProductVariantId),h.processVariantImages(t2.activeProductVariantId),delete n.a.productHeroCarousel,n.a.productHeroCarousel=new s.a(document.querySelector(s.a.domSelector)),n.a.productHeroCarousel.carousel.resize(),delete n.a.mobileZoomComponent,n.a.mobileZoomComponent=new h(document.querySelector(h.domSelector),n.a.productHeroCarousel.carousel),n.a.mobileZoomComponent.carousel.resize(),window.history&&window.history.replaceState&&window.history.replaceState({},window.title,window.location.pathname+"?variant="+t2.activeProductVariantId);var o2=v()(V,{id:t2.activeProductVariantId});n.a.backInStockForm.reset(),o2.isAvailable?O.classList.add("dn"):O.classList.remove("dn")}})}});
2//# sourceMappingURL=/cdn/shop/t/1390/assets/template.page.locations.js.map?v=78271005818088779911790616643

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.