!function(){"use strict";var t={d:function(e,s){for(var r in s)t.o(s,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:s[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{BrockmanMogrify:function(){return s}});class s{constructor({urls:t,resolutions:e=[1,1.5,1.75,2,3],max:s=8192}){this.urls=t||{},this.resolutions=e,this.max=s}resize(t,e,s,r){const o=this.resolutions.map((o=>[o,this._url(...this._scale(o,t,e),s,r)]));return[o.shift()[1],o.map((([t,e])=>`${e} ${t}x`)).join(", ")]}autosize(t=document){const e=t.querySelectorAll("img[data-uri][data-autosize]");for(const t of e)this._processImage(t)}delayedAutosize(t){setTimeout((()=>requestAnimationFrame((()=>this.autosize(t)))))}_processImage(t){const e=t.clientWidth,s=t.clientHeight;if(!e||!s)return;const{uri:r,autosize:o}=t.dataset,[i,a]=this.resize(e,s,r,o);t.srcset=a,t.src=i,delete t.dataset.autosize}_url(t,e,s,r="crop_lossy"){return this.urls[r]?.(t,e,s)||""}_scale(t,e,s){const r=e/s,o=Math.ceil(e*t),i=Math.ceil(s*t);return o<=this.max&&i<=this.max?[o,i]:r>1?[this.max,Math.round(this.max/r)]:[Math.round(this.max*r),this.max]}}var r=self;for(var o in e)r[o]=e[o];e.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})}();
//# sourceMappingURL=mogrify.min.js.map