PageSourceSearch

https://redbarrelsgames.com/wp-content/themes/redbarrelsgames/dist…nav_index_js.ac2db306845a4f883a62.bundle.js

js redbarrelsgames.com collected 2026-10-02 05:07:02 UTC 9,652 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkredbarrelsgames=self.webpackChunkredbarrelsgames||[]).push([["src_js_ui_site-nav_index_js"],{
1"./src/js/core/sfx.js":(t,e,i)=>{i.d(e,{Z:()=>m});var n=i("./node_modules/animejs/lib/anime.es.js"),o=i("./node_modules/eventemitter2/lib/eventemitter2.js"),s=i.n(o),r=i("./src/js/core/emitter.js"),l=i("./src/js/core/windmill.js"),a=i("./src/js/utils/dom.js"),u=i("./src/js/utils/listener.js");function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function _(t,e){return!e||"object"!=((i=e)&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)&&"function"!=typeof e?d(t):e;var i}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=h(t);if(e){var o=h(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return _(this,i)}}const m=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(h,t);var e,i,o,s=p(h);function h(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(t=s.call(this)).target=null,t.click=(0,a.$)("#sfx-click"),t.rollover=(0,a.$)("#sfx-rollover"),t.menuOpen=(0,a.$)("#sfx-menu-open"),t.menuClose=(0,a.$)("#sfx-menu-close"),t.soundtrack=(0,a.$)("#sfx-soundtrack"),t.click&&(t.click.volume=.1),t.soundtrack&&(t.soundtrack.volume=1),t._interacted=!1,t._muted=!0,t._playing=!1,t._ready=!1,t._volume={volume:1},t._siteVideoOpened=!1,t._onClick=t._onClick.bind(d(t)),t._onRollover=t._onRollover.bind(d(t)),t._onReady=t._onReady.bind(d(t)),t._onFadeUpdate=t._onFadeUpdate.bind(d(t)),t._onFadeOutCompleted=t._onFadeOutCompleted.bind(d(t)),t._onSiteVideoPlay=t._onSiteVideoPlay.bind(d(t)),t._onSiteVideoClosed=t._onSiteVideoClosed.bind(d(t)),t}return e=h,i=[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.d1;this._muted||(this.click&&this.click.setAttribute("preload","auto"),this.rollover&&this.rollover.setAttribute("preload","auto"),this.menuOpen&&this.menuOpen.setAttribute("preload","auto"),this.menuClose&&this.menuClose.setAttribute("preload","auto"),this.soundtrack&&this.soundtrack.setAttribute("preload","auto")),l.Z.once("done",this._onReady),(0,u.on)(t,"pointerdown",this._onClick),r.Z.on("SiteVideo.play",this._onSiteVideoPlay),r.Z.on("SiteVideo.oembed",this._onSiteVideoPlay),r.Z.on("SiteVideo.closed",this._onSiteVideoClosed),this.rollover&&(0,u.on)("a, button","mouseenter",this._onRollover)}},{key:"toggle",value:function(){this.muted=!this._muted}},{key:"menu",value:function(){var t,e,i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!this._muted&&this._interacted&&(i?null===(t=this.menuOpen)||void 0===t||t.play():null===(e=this.menuClose)||void 0===e||e.play())}},{key:"_startSoundtrack",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.soundtrack&&(t&&(0,n.Z)({targets:this._volume,volume:1,duration:3e3,easing:"linear",begin:this._onFadeUpdate,update:this._onFadeUpdate}),this._playing||this.soundtrack.play(),this._playing=!0)}},{key:"_stopSoundtrack",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.soundtrack&&(t?(0,n.Z)({targets:this._volume,volume:0,duration:2e3,easing:"linear",update:this._onFadeUpdate,complete:this._onFadeOutCompleted}):this._onFadeOutCompleted())}},{key:"_onClick",value:function(t){this._muted||(this._interacted=!0,t&&t.target.hasAttribute("data-sfx-prevent")||(this.click&&this.click.play(),this._ready&&this._startSoundtrack()))}},{key:"_onRollover",value:function(){!this._muted&&this._interacted&&this.rollover&&this.rollover.play()}},{key:"_onReady",value:function(){this._ready=!0,!this._muted&&this.soundtrack&&this._interacted&&this._startSoundtrack()}},{key:"_onFadeUpdate",value:function(){this.soundtrack&&(this.soundtrack.volume=this._volume.volume)}},{key:"_onFadeOutCompleted",value:function(){this.soundtrack&&this.soundtrack.pause(),this._playing=!1}},{key:"_onSiteVideoPlay",value:function(){this._muted||this._siteVideoOpened||(this._siteVideoOpened=!0,this._stopSoundtrack(!0))}},{key:"_onSiteVideoClosed",value:function(){!this._muted&&this._siteVideoOpened&&(this._startSoundtrack(!0),this._siteVideoOpened=!1)}},{key:"muted",get:function(){return this._muted}
1,set:function(t){t!==this._muted&&(this._muted=t,this.emit("change"),this._ready&&this._interacted&&this.soundtrack&&(this._muted?this._stopSoundtrack(!0):this._startSoundtrack(!0)))}}],i&&c(e.prototype,i),o&&c(e,o),h}(s()))},
1"./src/js/ui/site-nav/index.js":(t,e,i)=>{i.r(e),i.d(e,{CLASSNAME:()=>d,CLOSING_CLASSNAME:()=>c,default:()=>h});var n=i("./src/js/core/sfx.js"),o=i("./src/js/core/state.js"),s=i("./src/js/utils/dom.js"),r=i("./src/js/utils/listener.js");function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d="--js-site-nav-opened",c="--js-site-nav-closing";const h=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.emitter=i,this.bg=(0,s.$)(".site-nav__bg",this.el),this.triggers=u((0,s.$$)('[aria-controls="'.concat(this.el.id,'"]'))),this._isChildOfWindmill=!!this.el.closest('[data-windmill="container"]'),this._opened=!1,this._scrollY=0,this._handleTriggers=this._handleTriggers.bind(this),this._handleKeyDown=this._handleKeyDown.bind(this),this._onCloseCompleted=this._onCloseCompleted.bind(this),this._bindEvents()}var e,i,l;return e=t,(i=[{key:"destroy",value:function(){s.d1.classList.remove(d),this.el=null,this.emitter=null,this.bg=null,this.triggers=null,this._isChildOfWindmill=null,this._opened=!1,this._scrollY=0,this._handleTriggers=null,this._handleKeyDown=null,this._onCloseCompleted=null}},{key:"stop",value:function(){this._isChildOfWindmill&&this._unbindEvents()}},{key:"_bindEvents",value:function(){this.triggers&&(0,r.on)(this.triggers,"click",this._handleTriggers),this.el&&(0,r.on)(window,"keydown",this._handleKeyDown),this.emitter&&this.emitter.on("SiteNav.toggle",this._handleTriggers)}},{key:"_unbindEvents",value:function(){this.triggers&&(0,r.S1)(this.triggers,"click",this._handleTriggers),this.el&&(0,r.S1)(window,"keydown",this._handleKeyDown),this.emitter&&this.emitter.off("SiteNav.toggle",this._handleTriggers)}},{key:"open",value:function(){!0!==this._opened&&(this._opened=!0,o.e.dispatch("SITE_NAV",this._opened),this._scrollY=window.scrollY,this.bg&&(0,r.S1)(this.bg,"transitionend",this._onCloseCompleted),s.d1.classList.contains(c)?(s.d1.classList.remove(c),setTimeout((function(){return s.d1.classList.add(d)}),1)):s.d1.classList.add(d),this.emitter.emit("SiteScroll.stop",!0),this.emitter.emit("SiteNav.open"),this.triggers.forEach((function(t){t.setAttribute("aria-expanded",!0),t.classList.add("is-active")})),this.el.setAttribute("aria-hidden",!1),n.Z.menu(!0))}},{key:"close",value:function(){!1!==this._opened&&(this._opened=!1,o.e.dispatch("SITE_NAV",this._opened),this.triggers.forEach((function(t){t.setAttribute("aria-expanded",!1),t.classList.remove("is-active")})),this.bg&&((0,r.S1)(this.bg,"transitionend",this._onCloseCompleted),(0,r.on)(this.bg,"transitionend",this._onCloseCompleted)),s.d1.classList.remove(d),s.d1.classList.add(c),window.scrollTo({top:this._scrollY,behavior:"auto"}),this.emitter.emit("SiteScroll.update"),this.emitter.emit("SiteNav.close"),n.Z.menu(!1))}},{key:"toggle",value:function(){!0===this._opened?this.close():this.open()}},{key:"_handleTriggers",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.toggle()}},{key:"_handleKeyDown",value:function(t){!0!==this._opened||"Escape"!==t.key&&"Esc"!==t.key||this.close()}},{key:"_onCloseCompleted",value:function(){!0!==this._opened&&(this.emitter.emit("SiteScroll.start"),s.d1.classList.remove(c),this.el.setAttribute("aria-hidden",!0))}},{key:"opened",get:function(){return this._opened}}
1])&&a(e.prototype,i),l&&a(e,l),t}()}
1}]);
2//# sourceMappingURL=src_js_ui_site-nav_index_js.ac2db306845a4f883a62.bundle.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.