PageSourceSearch

https://www.prettygreen.com/cdn/shop/t/261/assets/pg-header-component.min.js?v=149909650873327284851788364646

js prettygreen.com collected 2026-09-25 19:38:26 UTC 23,313 bytes, 3 lines download raw bytes

vendor: 4,877 bytes, lines 1-2
1/*! For license information please see pg-header-component.min.js.LICENSE.txt */
2(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";t=function(){return i};var n,i={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function h(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(n){h=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var r=t&&t.prototype instanceof b?t:b,o=Object.create(r.prototype),s=new _(i||[]);return a(o,"_invoke",{value:B(e,n,s)}),o}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}i.wrap=d;var f="suspendedStart",m="suspendedYield",p="executing",y="completed",g={};function b(){}function L(){}function S(){}var w={};h(w,c,(function(){return this}));var M=Object.getPrototypeOf,k=M&&M(M(A([])));k&&k!==r&&o.call(k,c)&&(w=k);var E=S.prototype=b.prototype=Object.create(w);function x(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function O(t,n){function i(r,a,s,c){var u=v(t[r],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==e(h)&&o.call(h,"__await")?n.resolve(h.__await).then((function(e){i("next",e,s,c)}),(function(e){i("throw",e,s,c)})):n.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){return i("throw",e,s,c)}))}c(u.arg)}var r;a(this,"_invoke",{value:function(e,t){function o(){return new n((function(n,r){i(e,t,n,r)}))}return r=r?r.then(o,o):o()}})}function B(e,t,i){var r=f;return function(o,a){if(r===p)throw Error("Generator is already running");if(r===y){if("throw"===o)throw a;return{value:n,done:!0}}for(i.method=o,i.arg=a;;){var s=i.delegate;if(s){var c=q(s,i);if(c){if(c===g)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===f)throw r=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=p;var u=v(e,t,i);if("normal"===u.type){if(r=i.done?y:m,u.arg===g)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(r=y,i.method="throw",i.arg=u.arg)}}}function q(e,t){var i=t.method,r=e.iterator[i];if(r===n)return t.delegate=null,"throw"===i&&e.iterator.return&&(t.method="return",t.arg=n,q(e,t),"throw"===t.method)||"return"!==i&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+i+"' method")),g;var o=v(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,g;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function A(t){if(t||""===t){var i=t[c];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}throw new TypeError(e(t)+" is not iterable")}return L.prototype=S,a(E,"constructor",{value:S,configurable:!0}),a(S,"constructor",{value:L,configurable:!0}),L.displayName=h(S,l,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===L||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,h(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},i.awrap=function(e){return{__await:e}},x(O.prototype),h(O.prototype,u,(function(){return this})),i.AsyncIterator=O,i.async=function(e,t,n,r,o){void 0===o&&(o=Promise);var a=new O(d(e,t,n,r),o);return i.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(E),h(E,l,"Generator"),h(E,c,(function(){return this})),h(E,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},i.values=A,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEac
vendor: 4,277 bytes, line 2
2h(P),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,r){return s.type="throw",s.arg=e,t.next=i,r&&(t.method="next",t.arg=n),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;P(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:A(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=n),g}},i}function n(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function s(t,n,i){return n=d(n),function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,l()?Reflect.construct(n,i||[],d(t).constructor):n.apply(t,i))}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function u(e){var t="function"==typeof Map?new Map:void 0;return u=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var r=new(e.bind.apply(e,i));return n&&h(r,n.prototype),r}(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,e)},u(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}
2function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var v="music-open",f=function(e){function t(){var e;return i(this,t),(e=s(this,t)).announcementBar=e.querySelector(".announcement-bar"),e.header=e.querySelector(".mega-menu"),e.headerState="inactive",e.megaMenuState="inactive",e.searchState="inactive",e.menuItems=e.querySelectorAll("[data-mega-menu]"),e.megaMenuContainer=e.querySelector(".mega-menu-container"),e.megaMenus=e.querySelectorAll("[data-for-menu]"),e.menuLinks=e.querySelectorAll(".menu-link"),e.overlay=e.querySelector(".mega-menu-overlay"),e.musicButton=e.querySelector(".music-button"),e.searchBtn=e.querySelector(".search.desktop-only"),e.searchResultsContainer=document.querySelector(".predictive-search-container"),e.headerSearchInput=document.querySelector(".predictive-search-container #header-search"),e}
2return c(t,e),o(t,[{key:"connectedCallback",value:function(){var e=this;"enabled"===this.header.dataset.scroll&&this.attachScrollEvent(),this.menuItems.forEach((function(t,n){t.addEventListener("mouseenter",(function(){var n;return e.onMenuItemHover(null==t||null===(n=t.dataset)||void 0===n?void 0:n.megaMenu)})),t.addEventListener("click",(function(){var i;return e.onMenuItemClick({dataset:null==t||null===(i=t.dataset)||void 0===i?void 0:i.megaMenu,index:n})}))})),this.menuLinks.forEach((function(t){t.addEventListener("mouseenter",(function(){e.setHeaderState("inactive"),e.setSearchMenu("inactive")}))})),this.overlay.addEventListener("click",(function(){e.setHeaderState("inactive"),e.setSearchMenu("inactive")})),this.overlay.addEventListener("mouseenter",(function(){e.setHeaderState("inactive"),e.setSearchMenu("inactive")})),this.searchBtn.addEventListener("click",(function(){return e.setSearchMenu()})),this.musicButton&&this.musicButton.addEventListener("click",this.onMusicClick.bind(this)),this.onMatchMedia()}},{key:"setHeaderState",value:function(e){if("active"===e||"inactive"===e){var t,n;if("active"===e)this.header.classList.add("active"),"active"===this.searchState?this.megaMenuContainer.classList.add("active","instant"):this.megaMenuContainer.classList.add("active"),this.overlay.classList.add("active"),null===(t=this.announcementBar)||void 0===t||t.classList.add("active");else this.setMegaMenu("inactive"),this.header.classList.remove("active"),this.overlay.classList.remove("active"),null===(n=this.announcementBar)||void 0===n||n.classList.remove("active");this.headerState=e}else console.error("Invalid state. State must be either 'active' or 'inactive'.")}},{key:"onMenuItemClick",value:function(e){var t,n=e.dataset,i=e.index;null!==(t=this.menuItems[i])&&void 0!==t&&t.classList.contains("active")?this.setHeaderState("inactive"):("inactive"===this.headerState&&this.setHeaderState("active"),this.setSearchMenu("inactive"),this.setMegaMenu(n))}},{key:"onMenuItemHover",value:function(e){this.setHeaderState("active"),this.setSearchMenu("inactive"),this.setMegaMenu(e)}},{key:"setMegaMenu",value:function(e){if("inactive"===e)return this.megaMenuContainer.classList.remove("active","instant"),this.menuItems.forEach((function(e){return e.classList.remove("active")})),this.megaMenus.forEach((function(e){return e.classList.remove("active")})),void(this.megaMenuState="inactive");this.megaMenuState="active",this.menuItems.forEach((function(t){t.dataset.megaMenu===e?t.classList.add("active"):t.classList.remove("active")})),this.megaMenus.forEach((function(t){t.dataset.forMenu===e?t.classList.add("active"):t.classList.remove("active")}))}},{key:"setSearchMenu",value:function(e){"inactive"===e||void 0===e&&this.searchResultsContainer.classList.contains("active")?(this.searchResultsContainer.classList.remove("active","instant"),window.scrollY<=32&&this.header.classList.contains("should-use-transparency")&&"active"!==this.headerState&&this.header.classList.add("transparent"),this.searchState="inactive",this.headerSearchInput.value=""):(this.header.classList.remove("transparent"),this.overlay.classList.add("active"),"active"===this.megaMenuState?this.searchResultsContainer.classList.add("active","instant"):this.searchResultsContainer.classList.add("active"),this.setMegaMenu("inactive"),this.searchState="active",this.headerSearchInput.focus())}},{key:"onMatchMedia",value:function(){var e=this;this.mql=window.matchMedia("(max-width: 1199.98px)"),this.mql.onchange=function(t){t.matches&&(e.setHeaderState("inactive"),e.setSearchMenu("inactive"))}}},{key:"attachScrollEvent",value:function(){window.addEventListener("scroll",this.onScroll.bind(this))}},{key:"onScroll",value:function(){this.searchResultsContainer.classList.contains("active")?this.header.classList.remove("transparent"):this.announcementBar?window.scrollY<=32?this.header.classList.add("transparent"):this.header.classList.remove("transparent"):this.header.classList.toggle("transparent",0===window.scrollY)}},{key:"onMusicClick",value:function(){document.dispatchEvent(new CustomEvent(v))}}])}(u(HTMLElement)),m=function(e){function t(){var e;return i(this,t),(e=s(this,t)).header=e.querySelector(".mega-menu"),e.announcementBar=e.querySelector(".announcement-bar"),e.headerState="inactive",e.isMenuOpen=!1,e.openBtn=e.querySelector(".menu-open-btn"),e.closeBtn=e.querySelector(".menu-close-btn"),e.menu=e.querySelector(".mobile-menu-container"),e.isSearchOpen=!1,e.searchBtn=e.querySelector(".search.mobile-only"),e.searchMenu=document.querySelector(".predictive-search-container"),e.headerSearchInput=document.querySelector(".predictive-search-container #header-search"),e.megaMenuControls=e.querySelector(".mega-menu-control
2s"),e.menuLogo=e.querySelector(".menu-logo-container"),e.menuTabsWrapper=e.querySelector(".mobile-top-links-wrapper"),e.menuItems=e.querySelectorAll(".mobile-menu-item"),e.menuButtons=e.querySelectorAll(".mobile-menu-expand-btn"),e.submenuToggles=e.querySelectorAll("[data-mobile-submenu-toggle]"),e.submenuTriggers=e.querySelectorAll("[data-mobile-submenu-trigger]"),e}return c(t,e),o(t,[{key:"connectedCallback",value:function(){var e=this;this.openBtn.addEventListener("click",this.toggleMenu.bind(this)),this.searchBtn.addEventListener("click",this.toggleSearch.bind(this)),this.closeBtn.addEventListener("click",(function(){e.closeMenu(),e.closeSearch()})),this.menuButtons.forEach((function(t){t.addEventListener("click",(function(){e.toggleExpandMenu(t.dataset.index,t.offsetHeight)}))})),this.submenuToggles.forEach((function(t){t.addEventListener("click",(function(){return e.toggleSubmenu(t)}))})),this.submenuTriggers.forEach((function(t){t.addEventListener("click",(function(n){return e.handleSubmenuTriggerClick(n,t)}))})),this.onMatchMedia()}},{key:"toggleMenu",value:function(){this.isMenuOpen?this.closeMenu():this.openMenu()}},{key:"toggleSearch",value:function(){this.isSearchOpen?this.closeSearch():this.openSearch()}},{key:"openMenu",value:function(){var e;this.openBtn.classList.remove("active"),this.closeBtn.classList.add("active"),this.megaMenuControls.classList.add("hidden"),this.menuLogo.classList.add("mobile-active"),this.setHeaderState("active"),this.menu.classList.add("active"),null===(e=this.announcementBar)||void 0===e||e.classList.add("mobile-active"),this.isMenuOpen=!0,this.updateBodyScrollLock()}},{key:"closeMenu",value:function(){var e;this.openBtn.classList.add("active"),this.closeBtn.classList.remove("active"),this.menu.classList.remove("active"),this.setHeaderState("inactive"),this.megaMenuControls.classList.remove("hidden"),this.menuLogo.classList.remove("mobile-active"),null===(e=this.announcementBar)||void 0===e||e.classList.remove("mobile-active"),this.isMenuOpen=!1,this.closeAllSubmenus(),this.resetMobileAccordionLayout(),this.updateBodyScrollLock()}},{key:"openSearch",value:function(){var e;this.openBtn.classList.remove("active"),this.closeBtn.classList.add("active"),this.searchBtn.classList.add("active"),this.megaMenuControls.classList.add("hidden"),this.menuLogo.classList.add("mobile-active"),this.setHeaderState("active"),this.searchMenu.classList.add("active"),null===(e=this.announcementBar)||void 0===e||e.classList.add("mobile-active"),this.isSearchOpen=!0,this.updateBodyScrollLock(),this.headerSearchInput.focus()}},{key:"closeSearch",value:function(){var e;this.openBtn.classList.add("active"),this.closeBtn.classList.remove("active"),this.searchBtn.classList.remove("active"),this.searchMenu.classList.remove("active"),this.setHeaderState("inactive"),this.megaMenuControls.classList.remove("hidden"),this.menuLogo.classList.remove("mobile-active"),null===(e=this.announcementBar)||void 0===e||e.classList.remove("mobile-active"),this.isSearchOpen=!1,this.headerSearchInput.value="",this.closeAllSubmenus(),this.updateBodyScrollLock()}},{key:"updateBodyScrollLock",value:function(){this.isMenuOpen||this.isSearchOpen?document.body.style.overflow="hidden":document.body.style.removeProperty("overflow")}},{key:"resetMobileAccordionLayout",value:function(){this.querySelectorAll(".mobile-menu-item.as-tab").forEach((function(e){e.classList.remove("active"),e.style.removeProperty("max-height")})),this.querySelectorAll(".mobile-menu-expand-btn").forEach((function(e){e.setAttribute("aria-expanded","false")})),this.querySelectorAll("[data-mobile-submenu-content]").forEach((function(e){e.style.removeProperty("max-height")}))}},{key:"setHeaderState",value:function(e){"active"===e||"inactive"===e?("active"===e?this.header.classList.add("active"):this.header.classList.remove("active"),this.headerState=e):console.error("Invalid state. State must be either 'active' or 'inactive'.")}},{key:"onMatchMedia",value:function(){var e=this;this._mql=window.matchMedia("(max-width: 1199.98px)"),this._boundOnResize||(this._boundOnResize=this.onResize.bind(this));var t=function(){e._mql.matches?window.addEventListener("resize",e._boundOnResize):window.removeEventListener("resize",e._boundOnResize)};t(),this._mql.addEventListener("change",(function(n){n.matches||(e.closeMenu(),e.closeSearch()),t()}))}},{key:"onResize",value:function(){this.menuTabsWrapper.querySelectorAll(".mobile-menu-item.as-tab.active").forEach((function(e){e.style.maxHeight="".concat(e.scrollHeight,"px")}))}},{key:"toggleExpandMenu",value:function(e,t){this.menuItems.forEac
2h((function(n){n.dataset.index===e?n.classList.contains("active")?(n.style.maxHeight="".concat(t,"px"),n.classList.remove("active")):(n.style.maxHeight="".concat(n.scrollHeight,"px"),n.classList.add("active")):(n.classList.remove("active"),n.style.maxHeight="".concat(t,"px"))}))}},{key:"handleSubmenuTriggerClick",value:function(e,t){var n=t.closest("[data-mobile-submenu]");if(n){var i=n.querySelector("[data-mobile-submenu-toggle]");if(i){if(!n.classList.contains("open"))return e.preventDefault(),void this.toggleSubmenu(i);"A"!==t.tagName&&(e.preventDefault(),this.toggleSubmenu(i))}}}},{key:"toggleSubmenu",value:function(e){var t=e.closest("[data-mobile-submenu]");if(t){var n=t.querySelector("[data-mobile-submenu-content]");if(n){var i=!("true"===e.getAttribute("aria-expanded"));e.setAttribute("aria-expanded","".concat(i)),t.classList.toggle("open",i),n.setAttribute("aria-hidden","".concat(!i)),i?n.removeAttribute("hidden"):n.setAttribute("hidden","hidden")}}}},{key:"closeAllSubmenus",value:function(){this.submenuToggles&&this.submenuToggles.forEach((function(e){e.setAttribute("aria-expanded","false");var t=e.closest("[data-mobile-submenu]"),n=null==t?void 0:t.querySelector("[data-mobile-submenu-content]");null==t||t.classList.remove("open"),n&&(n.setAttribute("aria-hidden","true"),n.setAttribute("hidden","hidden"))}))}}])}(u(HTMLElement)),p=function(e){function r(){var e;return i(this,r),(e=s(this,r)).musicEvents={open:v,close:"music-close"},e.musicContainer=e.querySelector(".pretty-green-music"),e.closeBtn=e.querySelector(".close-music-btn"),e.shouldShowMusicPanel=!0,e.initializeMusicPanelCookie(),e}return c(r,e),o(r,[{key:"connectedCallback",value:function(){var e=this;this.musicContainer.classList.contains("open-automatically")&&0!=this.shouldShowMusicPanel&&this.automaticOpen(),this.closeBtn.addEventListener("click",this.closePanel.bind(this)),document.addEventListener(this.musicEvents.open,(function(){e.openPanel()})),document.addEventListener(this.musicEvents.close,(function(){e.closePanel()}))}},{key:"automaticOpen",value:(a=t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:this.openPanel();case 3:case"end":return e.stop()}}),e,this)})),u=function(){var e=this,t=arguments;return new Promise((function(i,r){var o=a.apply(e,t);function s(e){n(o,i,r,s,c,"next",e)}function c(e){n(o,i,r,s,c,"throw",e)}s(void 0)}))},function(){return u.apply(this,arguments)})},{key:"closePanel",value:function(){this.musicContainer.classList.remove("active"),this.closeMusicPanelCookie()}},{key:"openPanel",value:function(){this.musicContainer.classList.add("active")}},{key:"initializeMusicPanelCookie",value:function(){var e=this.getCookie("pgm-should-show");this.shouldShowMusicPanel="true"===e||null===e,null===e&&(this.shouldShowMusicPanel=!0,this.setCookie("pgm-should-show",this.shouldShowMusicPanel,30))}},{key:"closeMusicPanelCookie",value:function(){this.shouldShowMusicPanel=!1,this.setCookie("pgm-should-show",this.shouldShowMusicPanel,30)}},{key:"setCookie",value:function(e,t,n){var i=new Date(Date.now()+864e5*n).toUTCString();document.cookie="".concat(e,"=").concat(t,"; expires=").concat(i,"; path=/")}},{key:"getCookie",value:function(e){var t="; ".concat(document.cookie).split("; ".concat(e,"="));return 2===t.length?t.pop().split(";").shift():null}}]);var a,u}(u(HTMLElement));window.customElements.get("header-component")||window.customElements.define("header-component",f),window.customElements.get("mobile-menu")||window.customElements.define("mobile-menu",m),window.customElements.get("music-panel")||window.customElements.define("music-panel",p)})();
3//# sourceMappingURL=pg-header-component.min.js.map

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.