"use strict";(self.webpackChunk_roots_bud_sage=self.webpackChunk_roots_bud_sage||[]).push([[77],{jquery:function(e){e.exports=window.jQuery},"../node_modules/@roots/bud-client/lib/dom-ready.js":function(e,t){t.Z=e=>{window.requestAnimationFrame(async function t(){document.body?await e():window.requestAnimationFrame(t)})}},"./scripts/single-collection.js":function(e,t,n){var o=n("../node_modules/@roots/bud-client/lib/dom-ready.js"),s=n("jquery");(0,o.Z)(async()=>{!function(e){let t=e(".layout-section");e("#collection-tags"),e(".col-read-more").on("click",function(){e(this).closest(".sc-content-max-cont").addClass("active"),e(this).remove()}),e(window).on("load",function(){e(".sc-content-max-cont").height()<230&&(e(".sc-content-max-cont").removeClass("max-h-[230px]").removeClass("overflow-hidden"),e(".col-read-more").remove())}),function(){if("undefined"!=typeof collection){let n=t.data("order"),s=Object.values(collection);if(s.length>0){let o=[];s.forEach(e=>{if(n)for(let i=0;i<n.length;i++){let s=Object.values(e.tags).filter(e=>n.includes(e)),t=n.length;s.length>0&&(t=Object.values(n).indexOf(s[0]));let a=`
              <a href="${e.url}" data-post="${e.id}" data-tags="${s.join(",")}">
                <div class="sc-cont flex justify-center items-center w-full lg:min-h-[440px] object-center object-cover ">
                  ${e.image}
                </div>
              </a>`;if(null==o[t.toString()]){o[t.toString()]=[],o[t.toString()].push(a);break}o[t.toString()].push(a);break}else o.push(`
              <a href="${e.url}" data-post="${e.id}" data-tags="">
                <div class="sc-cont flex justify-center items-center w-full lg:min-h-[440px] object-center object-cover ">
                  ${e.image}
                </div>
              </a>`)}),o.flat(1).forEach(e=>{t.append(e)}),"true"==e("#collection-tags").attr("data-first")&&e("#collection-tags a:first-of-type").trigger("click")}}}();const n=function(){e(".single-collection-title, .ms-post-title-cont").length<=0&&e(window).off("scroll");let n=550,o=280;e(".single-collection-title").length>0&&(n=400,o=190);let t=s(window).scrollTop();if(t<=n){let n=1-75e-5*t;n>1&&(n=1),n<.65&&(n=.65);let s=0+.4*t;s<0&&(s=0),s>20&&(s=20),e(".single-collection-title, .ms-post-title-cont").css({opacity:o-t+"%",transform:"scale("+n+") translateY(-"+s+"px)",pointerEvents:"auto"})}else e(".single-collection-title, .ms-post-title-cont").css({opacity:"0%",pointerEvents:"none"})};e(window).on("scroll",n),e(window).on("load",function(){n()}),e(document).on("ready",function(){e(".single-coll-cont-sec").css({paddingTop:e(".single-collection-title").height()+"px"}),e(".story-cont > article").css({paddingTop:e(".ms-post-title-cont").height()-e(".story-cont > header").height()+"px"})})}(s)})}},function(e){var t="./scripts/single-collection.js";e(e.s=t)}])