var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
"use strict";(globalThis.webpackChunkextract_css=globalThis.webpackChunkextract_css||[]).push([["93081"],{966522:function(r){r.exports={}},656397:function(r,u,n){var _=n(868796),d=n(966522),m=n.n(d);YUI.add("squarespace-image-zoom",function(o){o.namespace("Squarespace");var s=o.Squarespace.ImageZoom=o.Base.create("image-zoom",o.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(s.CSS_PREFIX).removeClass(s.CSS_PREFIX+"--behavior-"+this.get("behavior")),this.get("dropzone").setStyle("position","").removeClass(s.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=o.one(window).on("resize",this._refresh,this)},_shouldInitialize:function(){return!o.UA.mobile&&window.Modernizr.csstransforms},_initializeZoom:function(){var e=this.get("host"),t=e.one("img"),i=this.get("dropzone");e.addClass(s.CSS_PREFIX),e.addClass(s.CSS_PREFIX+"--behavior-"+this.get("behavior")),i.addClass(s.CSS_PREFIX+"-dropzone"),i.getStyle("position")==="static"&&i.setStyle("position","relative"),t.getAttribute("src")?(this._appendZoomedNode(),this._bindUI()):t.once("load",function(){this._appendZoomedNode(),this._bindUI()},this)},_appendZoomedNode:function(){var e=this.get("host").one("img"),t=e.getAttribute("data-src");if(!t)return null;var i=e.getAttribute("data-image-dimensions");i||(i=e.get("clientWidth")+"x"+e.get("clientHeight"));var h=e.getAttribute("data-image-focal-point");h||(h="0.5,0.5");var a=o.Node.create('<div class="'+s.CSS_PREFIX+'-duplicate"><img src="'+t+"?format="+this._getSquarespaceSizeForWidth()+'" data-image-dimensions="'+i+'" aria-hidden="true" data-image-focal-point="'+h+'"></div>');a.setStyle("transform","scale("+this.get("zoom")+")"),a.one("img").plug(o.Squarespace.Loader2,{load:!0,mode:"fill"}),this.set("zoomedNode",a),this.get("dropzone").append(a)},_refresh:function(){var e=this.get("host").one("img").getAttribute("data-src"),t=this.get("zoomedNode").one("img");t.setAttribute("src",e+"?format="+this._getSquarespaceSizeForWidth()),t.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 t=Math.max((e.pageX-this.get("host").getX())/this.get("host").get("clientWidth")*100,0),i=Math.max((e.pageY-this.get("host").getY())/this.get("host").get("clientHeight")*100,0);this.get("zoomedNode").setStyle("transformOrigin",t+"% "+i+"%")}},_getSquarespaceSizeForWidth:function(){var e=this.get("host").one("img").get("clientWidth");return _.zU(e*this.get("zoom"))}},{CSS_PREFIX:"sqs-image-zoom",ATTRS:{host:{value:null,validator:function(e){var t=o.one(e);return o.instanceOf(t,o.Node)&&t.one("img")&&t.all("img").size()<2},writeOnce:!0},dropzone:{valueFn:function(){return this.get("host")},validator:function(e){return o.instanceOf(o.one(e),o.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"]})},121661:function(r,u,n){var _=n(656397)},868796:function(r,u,n){n.d(u,{m_:()=>s,zU:()=>o});function _(e,t,i){return e/t*i}function d(e,t,i){return t/e*i}function m(e){const t=e.getAttribute("data-image-dimensions");if(typeof t=="string"){const[i,h]=t.split("x").map(a=>Number(a));return{width:i,height:h}}return{width:null,height:null}}function o(e){return window.devicePixelRatio&&(e*=window.devicePixelRatio),e>1500?"2500w":e>1e3?"1500w":e>750?"1000w":e>500?"750w":e>300?"500w":e>100?"300w":"100w"}function s(e,t,i){return`/universal/images-v6/icons/icon-${e}-${t}-${i}.png`}}},function(r){var u=function(_){return r(r.s=_)},n=u(121661)}]);

//# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/sourcemaps/34b80e51efaccfc8/image-zoom-48fa25f53a8051bf-min.en-US.js.map
}