1import { a as autobind } from './bundled-index.js'; 2import { D as Directive } from './bundled-Directive.js'; 3import { H as HostAttr } from './bundled-HostAttr.js'; 4import './bundled-app.js'; 5 6function e(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}function t(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}class CollapsingHeader extends Directive{init(){this.bindEvents(),this.check();}bindEvents(){window.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.check);}onScroll(){this.RAF||(this.RAF=window.requestAnimationFrame(this.startRAF)),clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(this.stopRAF,100);}startRAF(){this.RAF&&(this.check(),window.requestAnimationFrame(this.startRAF));}stopRAF(){this.RAF&&(window.cancelAnimationFrame(this.RAF),this.RAF=null);}check(){let{threshold:e}=this;window.scrollY>=e?this.host.setAttribute("collapsing-header","collapsed"):this.host.setAttribute("collapsing-header","");}constructor(e){super(e),this.host=e,this.threshold=32,this.init();}}CollapsingHeader.selector="[collapsing-header]",e([HostAttr("#collapsing-threshold"),t("design:type",Number)],CollapsingHeader.prototype,"threshold",void 0),e([autobind,t("design:type",Function),t("design:paramtypes",[]),t("design:returntype",void 0)],CollapsingHeader.prototype,"onScroll",null),e([autobind,t("design:type",Function),t("design:paramtypes",[]),t("design:returntype",void 0)],CollapsingHeader.prototype,"startRAF",null),e([autobind,t("design:type",Function),t("design:paramtypes",[]),t("design:returntype",void 0)],CollapsingHeader.prototype,"stopRAF",null),e([autobind,t("design:type",Function),t("design:paramtypes",[]),t("design:returntype",void 0)],CollapsingHeader.prototype,"check",null); 7 8export { CollapsingHeader };
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.