"use strict";(self.webpackChunkextract_css=self.webpackChunkextract_css||[]).push([["37565"],{966522:function(a){a.exports={}},842186:function(a){a.exports={}},652736:function(a,h,r){var l=r(788372),d=r(966522),p=r.n(d);YUI.add("squarespace-image-zoom",function(t){t.namespace("Squarespace");var u=t.Squarespace.ImageZoom=t.Base.create("image-zoom",t.Base,[],{initializer:function(){this._shouldInitialize()&&this.get("host")&&this._initializeZoom()},destructor:function(){if(this._shouldInitialize()){var e=this.get("zoomedNode");e&&e.remove(!0),this.get("host").removeClass(u.CSS_PREFIX).removeClass(u.CSS_PREFIX+"--behavior-"+this.get("behavior")),this.get("dropzone").setStyle("position","").removeClass(u.CSS_PREFIX+"-dropzone"),this._zoomTriggerEvent&&this._zoomTriggerEvent.detach(),this._mouseMoveEvent&&this._mouseMoveEvent.detach(),this._mouseOutEvent&&this._mouseOutEvent.detach(),this._resizeEvent&&this._resizeEvent.detach(),this._zoomTriggerEvent=null,this._mouseMoveEvent=null,this._mouseOutEvent=null,this._resizeEvent=null}},_bindUI:function(){var e=this.get("host");this._zoomTriggerEvent=e.on(this.get("behavior"),this._toggleZoom,this),this._mouseMoveEvent=e.on("mousemove",this._trackMovement,this),this._mouseOutEvent=e.on("mouseout",this._zoomOut,this),this._resizeEvent=t.one(window).on("resize",this._refresh,this)},_shouldInitialize:function(){return!t.UA.mobile&&window.Modernizr.csstransforms},_initializeZoom:function(){var e=this.get("host"),o=e.one("img"),c=this.get("dropzone");e.addClass(u.CSS_PREFIX),e.addClass(u.CSS_PREFIX+"--behavior-"+this.get("behavior")),c.addClass(u.CSS_PREFIX+"-dropzone"),c.getStyle("position")==="static"&&c.setStyle("position","relative"),o.getAttribute("src")?(this._appendZoomedNode(),this._bindUI()):o.once("load",function(){this._appendZoomedNode(),this._bindUI()},this)},_appendZoomedNode:function(){var e=this.get("host").one("img"),o=e.getAttribute("data-src");if(!o)return null;var c=e.getAttribute("data-image-dimensions");c||(c=e.get("clientWidth")+"x"+e.get("clientHeight"));var g=e.getAttribute("data-image-focal-point");g||(g="0.5,0.5");var m=t.Node.create('

');m.setStyle("transform","scale("+this.get("zoom")+")"),m.one("img").plug(t.Squarespace.Loader2,{load:!0,mode:"fill"}),this.set("zoomedNode",m),this.get("dropzone").append(m)},_refresh:function(){var e=this.get("host").one("img").getAttribute("data-src"),o=this.get("zoomedNode").one("img");o.setAttribute("src",e+"?format="+this._getSquarespaceSizeForWidth()),o.fire("refresh")},_toggleZoom:function(e){this.get("_isZoomedIn")?this._zoomOut():this._zoomIn(e),e.stopPropagation()},_zoomIn:function(e){this.get("host").addClass("is-zoomed"),this.set("_isZoomedIn",!0),this._trackMovement(e)},_zoomOut:function(){this.get("host").removeClass("is-zoomed"),this.set("_isZoomedIn",!1)},_trackMovement:function(e){if(this.get("_isZoomedIn")){var o=Math.max((e.pageX-this.get("host").getX())/this.get("host").get("clientWidth")*100,0),c=Math.max((e.pageY-this.get("host").getY())/this.get("host").get("clientHeight")*100,0);this.get("zoomedNode").setStyle("transformOrigin",o+"% "+c+"%")}},_getSquarespaceSizeForWidth:function(){var e=this.get("host").one("img").get("clientWidth");return l.zU(e*this.get("zoom"))}},{CSS_PREFIX:"sqs-image-zoom",ATTRS:{host:{value:null,validator:function(e){var o=t.one(e);return t.instanceOf(o,t.Node)&&o.one("img")&&o.all("img").size()<2},writeOnce:!0},dropzone:{valueFn:function(){return this.get("host")},validator:function(e){return t.instanceOf(t.one(e),t.Node)},writeOnce:!0},behavior:{value:"hover",validator:function(e){return!(e!=="hover"&&e!=="click")},writeOnce:!0},zoom:{value:1.5,validator:function(e){return typeof e!="number"||e<=1||e>5,!0},writeOnce:!0},_isZoomedIn:{value:!1}}})},"1.0",{requires:["base","event","node","squarespace-image-loader","yui-base"]})},944275:function(a,h,r){var l=r(982012),d=r(652736)},982012:function(a,h,r){var l=r(714605),d=r(842186),p=r.n(d);YUI.add("squarespace-products-collection-list-v2",function(t){t.namespace("Squarespace.SystemCollections.Products").ListV2=t.Base.create("systemCollectionsProductsListV2",t.Base,[],{initializer:function(){this._loadImages(),this._bindUI(),this._syncUI()},destructor:function(){this._resizeEvent&&this._resizeEvent.detach(),this._tweakChangeEvent&&this._tweakChangeEvent.detach(),this._tweakResetEvent&&this._tweakResetEvent.detach(),t.Array.each(this._onImageLoadEvents,function(e){e.detach()}),this._resizeEvent=null,this._tweakChangeEvent=null,this._tweakResetEvent=null,this._onImageLoadEvents=null},_loadImages:function(){this._onImageLoadEvents=[],this.get("images").each(function(e){e.plug(t.Squarespace.Loader2,{load:!0,mode:"fill"}),this._onImageLoadEvents.push(e.on("load",function(){e.hasClass("ProductList-image--primary")&&e.ancestor(".ProductList-item").addClass("image-is-loaded")}))},this)},_bindUI:function(){this._resizeEvent=t.on("resize",function(){this._syncUI()},t.config.win,this),this._tweakChangeEvent=t.Global.on("tweak:change",this._tweakChangeHandler,this),this._tweakResetEvent=t.Global.on("tweak:reset",this._syncUI,this),window.SQUARESPACE_LOGIN&&window.SQUARESPACE_LOGIN.isLoggedIn()&&t.on("beforeunload",function(){this.destroy(!0)},this)},_syncUI:function(){this._adjustSubPixelValues(),this.get("images").each(function(e){e.fire("refresh")})},_adjustSubPixelValues:function(){var e=this.get("host").all(".ProductList-item");e&&(e.setStyle("width",""),e.setStyle("width",Math.floor(parseInt(e.getStyle("width")[0],10))+"px"))},_tweakChangeHandler:function(e){var o=e.getName(),c=e.getValue();o==="tweak-product-list-image-aspect-ratio"||o==="tweak-product-list-item-spacing"||o==="tweak-product-list-filter-display"||o==="tweak-product-list-filter-width"?this._syncUI():o==="tweak-product-list-items-per-row"?(this._previewTweakChangeItemsPerRow(),this._syncUI()):o==="tweak-product-list-item-hover-behavior"&&c===(0,l.t)("Mostrar una imagen alternativa",null,{project:"scripts-v6.system-collections"})&&(this._loadImages(),this._previewTweakChangeItemHoverBehavior())},_previewTweakChangeItemsPerRow:function(){var e=parseInt(t.Squarespace.Template.getTweakValue("tweak-product-list-items-per-row"),10);this.get("host").all(".ProductList-item").setStyle("clear","none"),this.get("host").all(".ProductList-item:nth-child("+e+"n+1)").setStyle("clear","left"),this.get("host").one(".ProductList-grid").setAttribute("data-items-per-row",e)},_previewTweakChangeItemHoverBehavior:function(){var e=this.get("host").one(".ProductList-image--alt"),o=function(){e.setStyle("opacity",1),t.later(1e3,this,function(){e.setStyle("opacity","")})};e.hasClass("loaded")?o():e.once("load",function(){o()})}},{ATTRS:{host:{value:null,validator:function(e){var o=t.one(e);return t.instanceOf(o,t.Node)},writeOnce:!0},images:{getter:function(){var e=t.one(".tweak-product-list-item-hover-behavior-show-alternate-image")&&t.one(".tweak-product-list-meta-position-under");return e&&!t.UA.mobile?this.get("host").all(".ProductList-image[data-src]"):this.get("host").all(".ProductList-image--primary[data-src]")}}}});var u=[];t.config.win.Squarespace.onInitialize(t,function(){t.all(".ProductList.products-collection-v2").each(function(e){var o=t.config.win.Static.SQUARESPACE_CONTEXT.tweakJSON["tweak-product-list-items-per-row"];e.one(".ProductList-grid").getDOMNode().dataset.itemsPerRow=o,u.push(new t.Squarespace.SystemCollections.Products.ListV2({host:e}))})}),t.config.win.Squarespace.onDestroy(t,function(){u.forEach(function(e){e.destroy()}),u.length=0})},"1.0",{requires:["base","node","squarespace-beforeunload","squarespace-image-loader","squarespace-image-zoom","squarespace-public-api"]})},788372:function(a,h,r){r.d(h,{m_:()=>y,zU:()=>m});function l(i,n){(n==null||n>i.length)&&(n=i.length);for(var s=0,_=new Array(n);sNumber(v)),2),_=s[0],f=s[1];return{width:_,height:f}}return{width:null,height:null}}function m(i){return window.devicePixelRatio&&(i*=window.devicePixelRatio),i>1500?"2500w":i>1e3?"1500w":i>750?"1000w":i>500?"750w":i>300?"500w":i>100?"300w":"100w"}function y(i,n,s){return"/universal/images-v6/icons/icon-".concat(i,"-").concat(n,"-").concat(s,".png")}},392338:function(a){a.exports=void 0}},function(a){var h=function(l){return a(a.s=l)};a.O(0,["96135","98338"],function(){return h(944275)});var r=a.O()}]);
//# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/sourcemaps/e38d8bb51240a646/products-collection-list-v2-746c7677008bfa74-min.es-419.js.map