PageSourceSearch

https://finally.me/cdn/shop/t/1/assets/chunk-component-CollectionNav-SnT8bkVh.js

js finally.me collected 2026-10-09 23:26:26 UTC 2,128 bytes, 1 lines download raw bytes

1import{l as h}from"./chunk-vendor-other-CPATiX-4.js";import{C as d,e as p,b as v,w as u,r as m}from"./chunk-vendor-ovee-CfTeiR4R.js";import"./chunk-vendor-vue-Co4JtY-K.js";var g=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(t,e,i,o)=>{for(var s=o>1?void 0:o?f(e,i):e,r=t.length-1,c;r>=0;r--)(c=t[r])&&(s=(o?c(e,i,s):c(s))||s);return o&&s&&g(e,i,s),s};const a="is-active";let l=class extends d{constructor(){super(...arguments),this.navList=this.$element.querySelector("[data-collection-nav-list]"),this.collections=document.querySelectorAll("[data-collection-section]"),this.header=document.querySelector("header"),this.isScrolling=!1,this.anchors=this.navList.querySelectorAll("a")}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}onActiveChange(){this.isScrolling||this.anchors.forEach((t,e)=>{if(this.removeActive(t),t.href.split("#")[1]===this.activeId){this.makeActive(t);const i=this.$element.querySelector(".slider");i&&p(i,"slide:to",e)}})}init(){this.collections.length&&(this.updateActive(),this.scrollToModule=this.$app.getModule("ScrollToModule"),this.scrollListener=h.throttle(this.updateActive,100),this.bind())}bind(){this.anchors.length&&(this.anchors.forEach(t=>{this.$on("click",e=>this.onClick(e),{target:t})}),this.$on("scroll load ajaxload resize-x",this.scrollListener,{target:window}),this.$on("scroll-to:start",this.onScrollStart,{target:window}),this.$on("scroll-to:complete",this.onScrollComplete,{target:window}))}onClick(t){const e=t.target;t.stopPropagation(),t.preventDefault(),this.activeId=e.href.split("#")[1],this.scrollToModule.scrollTo(e,!1)}onScrollStart(){this.isScrolling=!0}onScrollComplete(){this.isScrolling=!1}updateActive(){this.collections.forEach(t=>{const e=t.getBoundingClientRect().top-this.header.getBoundingClientRect().height;if((this.isMobile?e-this.$element.clientHeight:e)<=0){const{id:o}=t;this.activeId=o}})}makeActive(t){t.classList.add(a)}removeActive(t){t.classList.remove(a)}};n([v()],l.prototype,"activeId",2);n([u("activeId",{immediate:!0})],l.prototype,"onActiveChange",1);l=n([m("collection-nav")],l);export{l as CollectionNav};

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.