https://arolsen-archives.org/content/themes/arolsen-archives-theme/dist/vendors-macy.js?v=1790771662
1!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.Macy=n()}(this,(function(){"use strict";function t(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(window.Promise)return h(t,n,e);t.recalculate(!0,!0)}function n(t){var n=t.useContainerForBreakpoints?t.container.clientWidth:window.innerWidth,e={columns:t.columns};v(t.margin)?e.margin={x:t.margin.x,y:t.margin.y}:e.margin={x:t.margin,y:t.margin};var r=Object.keys(t.breakAt);return t.mobileFirst?function(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=0;s<r.length;s++){var a=parseInt(r[s],10);o>=a&&(i=n.breakAt[a],d(i,e))}return e}({options:t,responsiveOptions:e,keys:r,docWidth:n}):function(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=r.length-1;s>=0;s--){var a=parseInt(r[s],10);o<=a&&(i=n.breakAt[a],d(i,e))}return e}({options:t,responsiveOptions:e,keys:r,docWidth:n})}function e(t){return n(t).columns}function r(t){return n(t).margin}function o(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e(t),i=r(t).x,s=100/o;if(!n)return s;if(1===o)return"100%";var a="px";if("string"==typeof i){var c=parseFloat(i);a=i.replace(c,""),i=c}return i=(o-1)*i/o,"%"===a?s-i+"%":"calc("+s+"% - "+i+a+")"}function i(t,n){var i,s=e(t.options),a=0,c=void 0;if(1==++n)return 0;var u="px";if("string"==typeof(c=r(t.options).x)){var l=parseFloat(c,10);u=c.replace(l,""),c=l}return i=(c-(s-1)*c/s)*(n-1),a+=o(t.options,!1)*(n-1),"%"===u?a+i+"%":"calc("+a+"% + "+i+u+")"}function s(t){var n=0,e=t.container,r=t.rows;c(r,(function(t){n=t>n?t:n})),e.style.height=n+"px"}var a=function t(n,e){if(!(this instanceof t))return new t(n,e);if(n&&n.nodeName)return n;if(n=n.replace(/^\s*/,"").replace(/\s*$/,""),e)return this.byCss(n,e);for(var r in this.selectors)if(e=r.split("/"),new RegExp(e[1],e[2]).test(n))return this.selectors[r](n);return this.byCss(n)};a.prototype.byCss=function(t,n){return(n||document).querySelectorAll(t)},a.prototype.selectors={},a.prototype.selectors[/^\.[\w\-]+$/]=function(t){return document.getElementsByClassName(t.substring(1))},a.prototype.selectors[/^\w+$/]=function(t){return document.getElementsByTagName(t)},a.prototype.selectors[/^\#[\w\-]+$/]=function(t){return document.getElementById(t.substring(1))};var c=function(t,n){for(var e=t.length,r=e;e--;)n(t[r-e-1])},u=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.running=!1,this.events=[],this.add(t)};u.prototype.run=function(){if(!this.running&&this.events.length>0){var t=this.events.shift();this.running=!0,t(),this.running=!1,this.run()}},u.prototype.add=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!!n&&(Array.isArray(n)?c(n,(function(n){return t.add(n)})):(this.events.push(n),void this.run()))},u.prototype.clear=function(){this.events=[]};var l=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.instance=t,this.data=n,this},p=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.events={},this.instance=t};p.prototype.on=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!t||!n)&&(Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(n))},p.prototype.emit=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!Array.isArray(this.events[t]))return!1;var e=new l(this.instance,n);c(this.events[t],(function(t){return t(e)}))};var f=function(t){return!("naturalHeight"in t&&t.naturalHeight+t.naturalWidth===0)||t.width+t.height!==0},h=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Promise.all(function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(t,n){for(var e=t.length,r=e,o=[];e--;)o.push(n(t[r-e-1]));return o}(n,(function(n){return function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(t,e){if(n.complete)return f(n)?t(n):e(n);n.addEventListener("load",(function(){return f(n)?t(n):e(n)})),n.addEventListener("error",(function(){return e(n)}))})).then((function(n){e&&t.emit(t.constants.EVENT_IMAGE_LOAD,{img:n})})).catch((function(n){return t.emit(t.constants.EVENT_IMAGE_ERROR,{img:n})}))}(t,n,e)}))}(t,n,e)).then((function(){t.emit(t.constants.EVENT_IMAGE_COMPLETE)}
1))},m=function(n){(function(t){if(t.container=a(t.options.container),t.container instanceof a||!t.container)return!!t.options.debug&&console.error("Error: Container not found");t.container.length&&(t.container=t.container[0]),t.options.container=t.container,t.container.style.position="relative"})(n),function(t){var n;t.queue=new u,t.events=new p(t),t.rows=[],t.resizer=(n=t,function(t,n){var e=void 0;return function(){e&&clearTimeout(e),e=setTimeout(t,100)}}((function(){n.emit(n.constants.EVENT_RESIZE),n.queue.add((function(){return n.recalculate(!0,!0)}))})))}(n),function(n){var e=a("img",n.container);window.addEventListener("resize",n.resizer),n.on(n.constants.EVENT_IMAGE_LOAD,(function(){return n.recalculate(!1,!1)})),n.on(n.constants.EVENT_IMAGE_COMPLETE,(function(){return n.recalculate(!0,!0)})),n.options.useOwnImageLoader||t(n,e,!n.options.waitForImages),n.emit(n.constants.EVENT_INITIALIZED)}(n)},v=function(t){return t===Object(t)&&"[object Array]"!==Object.prototype.toString.call(t)},d=function(t,n){v(t)||(n.columns=t),v(t)&&t.columns&&(n.columns=t.columns),v(t)&&t.margin&&!v(t.margin)&&(n.margin={x:t.margin,y:t.margin}),v(t)&&t.margin&&v(t.margin)&&t.margin.x&&(n.margin.x=t.margin.x),v(t)&&t.margin&&v(t.margin)&&t.margin.y&&(n.margin.y=t.margin.y)},y=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.lastcol||(t.lastcol=0),t.rows.length<1&&(e=!0),e){t.rows=[],t.cols=[],t.lastcol=0;for(var r=n-1;r>=0;r--)t.rows[r]=0,t.cols[r]=i(t,r)}else if(t.tmpRows)for(t.rows=[],r=n-1;r>=0;r--)t.rows[r]=t.tmpRows[r];else for(t.tmpRows=[],r=n-1;r>=0;r--)t.tmpRows[r]=t.rows[r]},g=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=n?t.container.children:a(':scope > *:not([data-macy-complete="1"])',t.container);u=Array.from(u).filter((function(t){return null!==t.offsetParent}));var l=o(t.options);return c(u,(function(t){n&&(t.dataset.macyComplete=0),t.style.width=l})),t.options.trueOrder?(function(t,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=e(t.options),u=r(t.options).y;y(t,a,o),c(n,(function(n){t.lastcol===a&&(t.lastcol=0);var e=function(t,n){window.getComputedStyle(t,null).getPropertyValue(n)}(n,"height");e=parseInt(n.offsetHeight,10),isNaN(e)||(n.style.position="absolute",n.style.top=t.rows[t.lastcol]+"px",n.style.left=""+t.cols[t.lastcol],t.rows[t.lastcol]+=isNaN(e)?0:e+u,t.lastcol+=1,i&&(n.dataset.macyComplete=1))})),i&&(t.tmpRows=null),s(t)}(t,u,n,i),t.emit(t.constants.EVENT_RECALCULATED)):(function(t,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=e(t.options),u=r(t.options).y;y(t,a,o),c(n,(function(n){var e=0,r=parseInt(n.offsetHeight,10);isNaN(r)||(t.rows.forEach((function(n,r){n<t.rows[e]&&(e=r)})),n.style.position="absolute",n.style.top=t.rows[e]+"px",n.style.left=""+t.cols[e],t.rows[e]+=isNaN(r)?0:r+u,i&&(n.dataset.macyComplete=1))})),i&&(t.tmpRows=null),s(t)}(t,u,n,i),t.emit(t.constants.EVENT_RECALCULATED))},E=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};Array.from||(Array.from=function(t){for(var n=0,e=[];n<t.length;)e.push(t[n++]);return e});var w={columns:4,margin:2,trueOrder:!1,waitForImages:!1,useImageLoader:!0,breakAt:{},useOwnImageLoader:!1,onInit:!1,cancelLegacy:!1,useContainerForBreakpoints:!1};!function(){try{document.createElement("a").querySelector(":scope *")}catch(t){!function(){function t(t){return function(e){if(e&&n.test(e)){var r=this.getAttribute("id");r||(this.id="q"+Math.floor(9e6*Math.random())+1e6),arguments[0]=e.replace(n,"#"+this.id);var o=t.apply(this,arguments);return null===r?this.removeAttribute("id"):r||(this.id=r),o}return t.apply(this,arguments)}}var n=/:scope\b/gi,e=t(Element.prototype.querySelector);Element.prototype.querySelector=function(t){return e.apply(this,arguments)};var r=t(Element.prototype.querySelectorAll);Element.prototype.querySelectorAll=function(t){return r.apply(this,arguments)}}()}}();var A=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;if(!(this instanceof t))return new t(n);this.options={},E(this.options,w,n),this.options.cancelLegacy&&!window.Promise||m(this)};return A.init=function(t){return console.warn("Depreciated: Macy.init will be removed in v3.0.0 opt to use Macy directly like so Macy({ /*options here*/ }) "),new A(t)},A.prototype.recalculateOnImageLoad=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t(this,a("img",this.container),!n)},A.prototype.runOnImageLoad=function(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=a("img",this.container);return this.on(this.constants.EVENT_IMAGE_COMPLETE,n),e&&this.on(this.constants.EVENT_IMAGE_LOAD,n),t(this,r,e)},A.prototype.recalculate=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.queue.clear(),this.queue.add((function(){return g(t,n,e)}))},A.prototype.remove=function(){window.removeEventListener("resize",this.resizer),c(this.container.children,(function(t){t.removeAttribute("data-macy-complete"),t.removeAttribute("style")})),this.container.removeAttribute("style")},A.prototype.reInit=function(){this.recalculate(!0,!0),this.emit
1(this.constants.EVENT_INITIALIZED),window.addEventListener("resize",this.resizer),this.container.style.position="relative"},A.prototype.on=function(t,n){this.events.on(t,n)},A.prototype.emit=function(t,n){this.events.emit(t,n)},A.constants={EVENT_INITIALIZED:"macy.initialized",EVENT_RECALCULATED:"macy.recalculated",EVENT_IMAGE_LOAD:"macy.image.load",EVENT_IMAGE_ERROR:"macy.image.error",EVENT_IMAGE_COMPLETE:"macy.images.complete",EVENT_RESIZE:"macy.resize"},A.prototype.constants=A.constants,A}));
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.