PageSourceSearch

https://redbarrelsgames.com/wp-content/themes/redbarrelsgames/dist…ton_index_js.8b11e03cd3e2fb2ea6a5.bundle.js

js redbarrelsgames.com collected 2026-10-02 05:06:10 UTC 6,892 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkredbarrelsgames=self.webpackChunkredbarrelsgames||[]).push([["src_js_modules_audio-button_index_js"],{
1"./src/js/core/sfx.js":(t,e,n)=>{n.d(e,{Z:()=>v});var i=n("./node_modules/animejs/lib/anime.es.js"),o=n("./node_modules/eventemitter2/lib/eventemitter2.js"),s=n.n(o),a=n("./src/js/core/emitter.js"),r=n("./src/js/core/windmill.js"),u=n("./src/js/utils/dom.js"),l=n("./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 n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}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"!=((n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof e?d(t):e;var n}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 n,i=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return _(this,n)}}const v=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,n,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")}
1(this,h),(t=s.call(this)).target=null,t.click=(0,u.$)("#sfx-click"),t.rollover=(0,u.$)("#sfx-rollover"),t.menuOpen=(0,u.$)("#sfx-menu-open"),t.menuClose=(0,u.$)("#sfx-menu-close"),t.soundtrack=(0,u.$)("#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,n=[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.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")),r.Z.once("done",this._onReady),(0,l.on)(t,"pointerdown",this._onClick),a.Z.on("SiteVideo.play",this._onSiteVideoPlay),a.Z.on("SiteVideo.oembed",this._onSiteVideoPlay),a.Z.on("SiteVideo.closed",this._onSiteVideoClosed),this.rollover&&(0,l.on)("a, button","mouseenter",this._onRollover)}},{key:"toggle",value:function(){this.muted=!this._muted}},{key:"menu",value:function(){var t,e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!this._muted&&this._interacted&&(n?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,i.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,i.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},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)))}}],n&&c(e.prototype,n),o&&c(e,o),h}(s()))},
1"./src/js/modules/audio-button/index.js":(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var i=n("./src/js/core/sfx.js"),o=n("./src/js/utils/listener.js");function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}const a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this._ariaLabelOn=this.el.dataset.ariaOn,this._ariaLabelOff=this.el.dataset.ariaOff,this._onClick=this._onClick.bind(this),this._onSFXChange=this._onSFXChange.bind(this)}var e,n,a;return e=t,(n=[{key:"init",value:function(){this._bindEvents(),i.Z.muted&&this._onSFXChange()}},{key:"destroy",value:function(){this._unbindEvents(),this.el=null,this._ariaLabelOn=null,this._ariaLabelOff=null,this._onClick=null,this._onSFXChange=null}},{key:"_bindEvents",value:function(){i.Z.on("change",this._onSFXChange),(0,o.on)(this.el,"pointerdown",this._onClick)}},{key:"_unbindEvents",value:function(){(0,o.S1)(this.el,"pointerdown",this._onClick),i.Z.off("change",this._onSFXChange)}},{key:"_onClick",value:function(t){i.Z.toggle(),t&&i.Z.muted&&(t.preventDefault(),t.stopImmediatePropagation())}},{key:"_onSFXChange",value:function(){this.el.classList[i.Z.muted?"add":"remove"]("--muted"),this.el.setAttribute("aria-label",i.Z.muted?this._ariaLabelOff:this._ariaLabelOn)}}])&&s(e.prototype,n),a&&s(e,a),t}()}
1}]);
2//# sourceMappingURL=src_js_modules_audio-button_index_js.8b11e03cd3e2fb2ea6a5.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.