@sticky-studio-npm/ui-core 0.1.100 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,7 @@ declare class BaseSoundService {
19
19
  muteMusic(): void;
20
20
  unmuteMusic(): void;
21
21
  playSound(key: string, loop?: boolean): number | undefined;
22
+ playSoundOnce(key: string, loop?: boolean): number | undefined;
22
23
  stopSound(key: string): void;
23
24
  muteSounds(): void;
24
25
  unmuteSounds(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSoundService.d.ts","sourceRoot":"","sources":["../../src/services/BaseSoundService.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,cAAM,gBAAgB;IACpB,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,GAAG,CAAgC;IAC3C,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IAEzB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAC9D,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAoB3E,OAAO,CAAC,oBAAoB;IAe5B,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,SAAI;IAW7D,WAAW,IAAI,IAAI;IACnB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAc7B,WAAW,IAAI,IAAI;IACnB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAS7B,SAAS;IAKT,WAAW;IAKX,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,MAAM,GAAG,SAAS;IAQjE,SAAS,CAAC,GAAG,EAAE,MAAM;IAMrB,UAAU;IAKV,YAAY;IAIZ,eAAe,CAAC,MAAM,EAAE,MAAM;IAgB9B,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAQlD,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAQpD,OAAO;IAKP,SAAS;IAOT,OAAO,CAAC,KAAK;CAGd;AAED,eAAO,MAAM,YAAY,kBAAyB,CAAC"}
1
+ {"version":3,"file":"BaseSoundService.d.ts","sourceRoot":"","sources":["../../src/services/BaseSoundService.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,cAAM,gBAAgB;IACpB,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,GAAG,CAAgC;IAC3C,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IAEzB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAC9D,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAoB3E,OAAO,CAAC,oBAAoB;IAe5B,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,SAAI;IAW7D,WAAW,IAAI,IAAI;IACnB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAc7B,WAAW,IAAI,IAAI;IACnB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAS7B,SAAS;IAKT,WAAW;IAKX,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,MAAM,GAAG,SAAS;IAQjE,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,MAAM,GAAG,SAAS;IASrE,SAAS,CAAC,GAAG,EAAE,MAAM;IAMrB,UAAU;IAKV,YAAY;IAIZ,eAAe,CAAC,MAAM,EAAE,MAAM;IAgB9B,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAQlD,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAQpD,OAAO;IAKP,SAAS;IAOT,OAAO,CAAC,KAAK;CAGd;AAED,eAAO,MAAM,YAAY,kBAAyB,CAAC"}
@@ -4561,6 +4561,12 @@ class wa {
4561
4561
  if (r)
4562
4562
  return r.loop(t), r.play();
4563
4563
  }
4564
+ playSoundOnce(n, t = !1) {
4565
+ if (this.allMuted || this.sfxMuted) return;
4566
+ const r = this.sfx.get(n);
4567
+ if (r && !r.playing())
4568
+ return r.loop(t), r.play();
4569
+ }
4564
4570
  stopSound(n) {
4565
4571
  const t = this.sfx.get(n);
4566
4572
  t && t.stop();
@@ -28,7 +28,7 @@ The target is already observable of different type.
28
28
  Extending builtins is not supported.`),e;process.env.NODE_ENV!=="production"&&!Object.isExtensible(e)&&A("Cannot make the designated object observable; it is not extensible");var r=(t=n?.name)!=null?t:process.env.NODE_ENV!=="production"?(H(e)?"ObservableObject":e.constructor.name)+"@"+ne():"ObservableObject",o=new nn(e,new Map,String(r),qi(n));return Xe(e,S,o),e}var Go=Ne("ObservableObjectAdministration",nn);function hr(e){return pr[e]||(pr[e]={get:function(){return this[S].getObservablePropValue_(e)},set:function(t){return this[S].setObservablePropValue_(e,t)}})}function Ge(e){return _t(e)?Go(e[S]):!1}function br(e,n,t){var r;process.env.NODE_ENV!=="production"&&(e.appliedAnnotations_[t]=n),(r=e.target_[j])==null||delete r[t]}function mr(e,n,t){if(process.env.NODE_ENV!=="production"&&!Cr(n)&&A("Cannot annotate '"+e.name_+"."+t.toString()+"': Invalid annotation."),process.env.NODE_ENV!=="production"&&!bt(n)&&X(e.appliedAnnotations_,t)){var r=e.name_+"."+t.toString(),o=e.appliedAnnotations_[t].annotationType_,s=n.annotationType_;A("Cannot apply '"+s+"' to '"+r+"':"+(`
29
29
  The field is already annotated with '`+o+"'.")+`
30
30
  Re-annotating fields is not allowed.
31
- Use 'override' annotation for methods overridden by subclass.`)}}var Ro=yr(0),qo=(function(){var e=!1,n={};return Object.defineProperty(n,"0",{set:function(){e=!0}}),Object.create(n)[0]=1,e===!1})(),rn=0,gr=function(){};function Ko(e,n){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,n):e.prototype.__proto__!==void 0?e.prototype.__proto__=n:e.prototype=n}Ko(gr,Array.prototype);var on=(function(e){function n(r,o,s,u){var d;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableArray@"+ne():"ObservableArray"),u===void 0&&(u=!1),d=e.call(this)||this,Oe(function(){var c=new tn(s,o,u,!0);c.proxy_=d,wn(d,S,c),r&&r.length&&d.spliceWithArray(0,0,r),qo&&Object.defineProperty(d,"0",Ro)}),d}Tn(n,e);var t=n.prototype;return t.concat=function(){this[S].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),s.map(function(d){return xt(d)?d.slice():d}))},t[Symbol.iterator]=function(){var r=this,o=0;return sn({next:function(){return o<r.length?{value:r[o++],done:!1}:{done:!0,value:void 0}}})},He(n,[{key:"length",get:function(){return this[S].getArrayLength_()},set:function(o){this[S].setArrayLength_(o)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(gr);Object.entries(Dt).forEach(function(e){var n=e[0],t=e[1];n!=="concat"&&Xe(on.prototype,n,t)});function yr(e){return{enumerable:!1,configurable:!0,get:function(){return this[S].get_(e)},set:function(t){this[S].set_(e,t)}}}function Wo(e){se(on.prototype,""+e,yr(e))}function Ar(e){if(e>rn){for(var n=rn;n<e+100;n++)Wo(n);rn=e}}Ar(1e3);function Xo(e,n,t){return new on(e,n,t)}function Re(e,n){if(typeof e=="object"&&e!==null){if(xt(e))return n!==void 0&&A(23),e[S].atom_;if(ce(e))return e.atom_;if(Ae(e)){if(n===void 0)return e.keysAtom_;var t=e.data_.get(n)||e.hasMap_.get(n);return t||A(25,n,Bt(e)),t}if(Ge(e)){if(!n)return A(26);var r=e[S].values_.get(n);return r||A(27,n,Bt(e)),r}if(Ft(e)||Ot(e)||Ct(e))return e}else if(P(e)&&Ct(e[S]))return e[S];A(28)}function Or(e,n){if(e||A(29),Ft(e)||Ot(e)||Ct(e)||Ae(e)||ce(e))return e;if(e[S])return e[S];A(24,e)}function Bt(e,n){var t;if(n!==void 0)t=Re(e,n);else{if(Le(e))return e.name;Ge(e)||Ae(e)||ce(e)?t=Or(e):t=Re(e)}return t.name_}function Oe(e){var n=Ve(),t=Gt(!0);z();try{return e()}finally{J(),Rt(t),he(n)}}var Sr=ft.toString;function wr(e,n,t){return t===void 0&&(t=-1),an(e,n,t)}function an(e,n,t,r,o){if(e===n)return e!==0||1/e===1/n;if(e==null||n==null)return!1;if(e!==e)return n!==n;var s=typeof e;if(s!=="function"&&s!=="object"&&typeof n!="object")return!1;var u=Sr.call(e);if(u!==Sr.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:+e==0?1/+e===1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=Er(e),n=Er(n);var d=u==="[object Array]";if(!d){if(typeof e!="object"||typeof n!="object")return!1;var c=e.constructor,p=n.constructor;if(c!==p&&!(P(c)&&c instanceof c&&P(p)&&p instanceof p)&&"constructor"in e&&"constructor"in n)return!1}if(t===0)return!1;t<0&&(t=-1),r=r||[],o=o||[];for(var m=r.length;m--;)if(r[m]===e)return o[m]===n;if(r.push(e),o.push(n),d){if(m=e.length,m!==n.length)return!1;for(;m--;)if(!an(e[m],n[m],t-1,r,o))return!1}else{var i=Object.keys(e),a=i.length;if(Object.keys(n).length!==a)return!1;for(var l=0;l<a;l++){var f=i[l];if(!(X(n,f)&&an(e[f],n[f],t-1,r,o)))return!1}}return r.pop(),o.pop(),!0}function Er(e){return xt(e)?e.slice():je(e)||Ae(e)||pe(e)||ce(e)?Array.from(e.entries()):e}var Nr,Zo=((Nr=lt().Iterator)==null?void 0:Nr.prototype)||{};function sn(e){return e[Symbol.iterator]=Yo,Object.assign(Object.create(Zo),e)}function Yo(){return this}function Cr(e){return e instanceof Object&&typeof e.annotationType_=="string"&&P(e.make_)&&P(e.extend_)}if(["Symbol","Map","Set"].forEach(function(e){var n=lt();typeof n[e]>"u"&&A("MobX requires global '"+e+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:_o,extras:{getDebugName:Bt},$mobx:S}),!E.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Qt)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function zo(e){e()}function Jo(e){e||(e=zo,process.env.NODE_ENV!=="production"&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),Co({reactionScheduler:e})}function Qo(e){return ir(e)}var ea=1e4,ta=1e4,na=(function(){function e(n){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=ea),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var o=Date.now();t.registrations.forEach(function(s,u){o-s.registeredAt>=r&&(t.finalize(s.value),t.registrations.delete(u))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(n){this.registrations.delete(n)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,ta))}}),e})(),ra=typeof FinalizationRegistry<"u"?FinalizationRegistry:na,un=new ra(function(e){var n;(n=e.reaction)===null||n===void 0||n.dispose(),e.reaction=null}),it=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lt={exports:{}},ln={};var Tr;function ia(){if(Tr)return ln;Tr=1;var e=E;function n(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function d(i,a){var l=a(),f=r({inst:{value:l,getSnapshot:a}}),h=f[0].inst,b=f[1];return s(function(){h.value=l,h.getSnapshot=a,c(h)&&b({inst:h})},[i,l,a]),o(function(){return c(h)&&b({inst:h}),i(function(){c(h)&&b({inst:h})})},[i]),u(l),l}function c(i){var a=i.getSnapshot;i=i.value;try{var l=a();return!t(i,l)}catch{return!0}}function p(i,a){return a()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return ln.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,ln}var cn={};var Dr;function oa(){return Dr||(Dr=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}function n(l,f){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=f();if(!i){var b=f();s(h,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),i=!0)}b=u({inst:{value:h,getSnapshot:f}});var _=b[0].inst,y=b[1];return c(function(){_.value=h,_.getSnapshot=f,t(_)&&y({inst:_})},[l,h,f]),d(function(){return t(_)&&y({inst:_}),l(function(){t(_)&&y({inst:_})})},[l]),p(h),h}function t(l){var f=l.getSnapshot;l=l.value;try{var h=f();return!s(l,h)}catch{return!0}}function r(l,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,s=typeof Object.is=="function"?Object.is:e,u=o.useState,d=o.useEffect,c=o.useLayoutEffect,p=o.useDebugValue,m=!1,i=!1,a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:n;cn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:a,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),cn}var xr;function aa(){return xr||(xr=1,process.env.NODE_ENV==="production"?Lt.exports=ia():Lt.exports=oa()),Lt.exports}var sa=aa();function Vr(e){e.reaction=new be("observer".concat(e.name),function(){var n;e.stateVersion=Symbol(),(n=e.onStoreChange)===null||n===void 0||n.call(e)})}function ua(e,n){n===void 0&&(n="observed");var t=E.useRef(null);if(!t.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:n,subscribe:function(d){return un.unregister(r),r.onStoreChange=d,r.reaction||(Vr(r),r.stateVersion=Symbol()),function(){var c;r.onStoreChange=null,(c=r.reaction)===null||c===void 0||c.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};t.current=r}var o=t.current;o.reaction||(Vr(o),un.register(t,o,o)),E.useDebugValue(o.reaction,Qo),sa.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot);var s,u;if(o.reaction.track(function(){try{s=e()}catch(d){u=d}}),u)throw u;return s}var fn,dn,la=!0,Br=!0,Lr=typeof Symbol=="function"&&Symbol.for,ca=(dn=(fn=Object.getOwnPropertyDescriptor(function(){},"name"))===null||fn===void 0?void 0:fn.configurable)!==null&&dn!==void 0?dn:!1,Mr=Lr?Symbol.for("react.forward_ref"):typeof E.forwardRef=="function"&&E.forwardRef(function(e){return null}).$$typeof,Pr=Lr?Symbol.for("react.memo"):typeof E.memo=="function"&&E.memo(function(e){return null}).$$typeof;function K(e,n){var t;if(process.env.NODE_ENV,Pr&&e.$$typeof===Pr)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(t=void 0)!==null&&t!==void 0?t:!1,o=e,s=e.displayName||e.name;if(Mr&&e.$$typeof===Mr&&(r=!0,o=e.render,typeof o!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var u=function(d,c){return ua(function(){return o(d,c)},s)};return u.displayName=e.displayName,ca&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,process.env.NODE_ENV!=="production"&&Br&&(Br=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(u=E.forwardRef(u)),u=E.memo(u),da(e,u),process.env.NODE_ENV!=="production"&&Object.defineProperty(u,"contextTypes",{set:function(){var d,c;throw new Error("[mobx-react-lite] `".concat(this.displayName||((d=this.type)===null||d===void 0?void 0:d.displayName)||((c=this.type)===null||c===void 0?void 0:c.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),u}var fa={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function da(e,n){Object.keys(e).forEach(function(t){fa[t]||Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}process.env.NODE_ENV;var _n;Jo(zr.unstable_batchedUpdates),_n=un.finalizeAllImmediately;const _a=({onClick:e,disabled:n=!1,imagePath:t,isAnteBet:r,isBonus:o})=>{const s=E.useMemo(()=>o?"Active":r?"Disable":"Buy Bonus",[o,r]);return v.jsxs("div",{className:"buy-bonus-wrap","aria-hidden":n?"true":"false",children:[t&&v.jsx("div",{className:"bonus-thumb",role:"img","aria-label":"bonus thumbnail",style:{backgroundImage:`url(${t})`}}),v.jsx("button",{className:`buy-bonus ${n?"disabled":""}`,onClick:e,disabled:n,"aria-pressed":n,children:s})]})},Ir=({label:e,value:n})=>v.jsxs("div",{className:"info",children:[v.jsx("span",{className:"label",children:e}),v.jsx("span",{className:"value",children:n})]}),F={bet:"bet",autoplay:"autoplay",settings:"settings",history:"history",buyBonus:"buy_bonus",payTable:"pay_table"},kr={insufficientFunds:"insufficient funds"},pn={primary:{background:"#FBDE38",color:"#1C1B1E"},secondary:{background:"#1C1B1E",color:"#FFFFFF"}},jr=[{name:kr.insufficientFunds,title:"Insufficient Funds",imagePath:"/img_1.png",message:"Your balance is low, please make a deposit",buttons:[{text:"Back",configs:pn.secondary},{text:"Ok",configs:pn.primary}]}],Mt={ante:"ante",buy:"buy"},ot={SKIP_INTRO:"SKIP_INTRO",SOUND_ON:"SOUND_ON",MUSIC_ON:"MUSIC_ON"},vn={Click:"click",BuyBonusClick:"buyBonusClick"};var hn={};var Fr;function pa(){return Fr||(Fr=1,(function(e){(function(){var n=function(){this.init()};n.prototype={init:function(){var i=this||t;return i._counter=1e3,i._html5AudioPool=[],i.html5PoolSize=10,i._codecs={},i._howls=[],i._muted=!1,i._volume=1,i._canPlayEvent="canplaythrough",i._navigator=typeof window<"u"&&window.navigator?window.navigator:null,i.masterGain=null,i.noAudio=!1,i.usingWebAudio=!0,i.autoSuspend=!0,i.ctx=null,i.autoUnlock=!0,i._setup(),i},volume:function(i){var a=this||t;if(i=parseFloat(i),a.ctx||m(),typeof i<"u"&&i>=0&&i<=1){if(a._volume=i,a._muted)return a;a.usingWebAudio&&a.masterGain.gain.setValueAtTime(i,t.ctx.currentTime);for(var l=0;l<a._howls.length;l++)if(!a._howls[l]._webAudio)for(var f=a._howls[l]._getSoundIds(),h=0;h<f.length;h++){var b=a._howls[l]._soundById(f[h]);b&&b._node&&(b._node.volume=b._volume*i)}return a}return a._volume},mute:function(i){var a=this||t;a.ctx||m(),a._muted=i,a.usingWebAudio&&a.masterGain.gain.setValueAtTime(i?0:a._volume,t.ctx.currentTime);for(var l=0;l<a._howls.length;l++)if(!a._howls[l]._webAudio)for(var f=a._howls[l]._getSoundIds(),h=0;h<f.length;h++){var b=a._howls[l]._soundById(f[h]);b&&b._node&&(b._node.muted=i?!0:b._muted)}return a},stop:function(){for(var i=this||t,a=0;a<i._howls.length;a++)i._howls[a].stop();return i},unload:function(){for(var i=this||t,a=i._howls.length-1;a>=0;a--)i._howls[a].unload();return i.usingWebAudio&&i.ctx&&typeof i.ctx.close<"u"&&(i.ctx.close(),i.ctx=null,m()),i},codecs:function(i){return(this||t)._codecs[i.replace(/^x-/,"")]},_setup:function(){var i=this||t;if(i.state=i.ctx&&i.ctx.state||"suspended",i._autoSuspend(),!i.usingWebAudio)if(typeof Audio<"u")try{var a=new Audio;typeof a.oncanplaythrough>"u"&&(i._canPlayEvent="canplay")}catch{i.noAudio=!0}else i.noAudio=!0;try{var a=new Audio;a.muted&&(i.noAudio=!0)}catch{}return i.noAudio||i._setupCodecs(),i},_setupCodecs:function(){var i=this||t,a=null;try{a=typeof Audio<"u"?new Audio:null}catch{return i}if(!a||typeof a.canPlayType!="function")return i;var l=a.canPlayType("audio/mpeg;").replace(/^no$/,""),f=i._navigator?i._navigator.userAgent:"",h=f.match(/OPR\/(\d+)/g),b=h&&parseInt(h[0].split("/")[1],10)<33,_=f.indexOf("Safari")!==-1&&f.indexOf("Chrome")===-1,y=f.match(/Version\/(.*?) /),w=_&&y&&parseInt(y[1],10)<15;return i._codecs={mp3:!!(!b&&(l||a.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!l,opus:!!a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(a.canPlayType('audio/wav; codecs="1"')||a.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!a.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!a.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(a.canPlayType("audio/x-m4b;")||a.canPlayType("audio/m4b;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(a.canPlayType("audio/x-mp4;")||a.canPlayType("audio/mp4;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!w&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!w&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!a.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(a.canPlayType("audio/x-flac;")||a.canPlayType("audio/flac;")).replace(/^no$/,"")},i},_unlockAudio:function(){var i=this||t;if(!(i._audioUnlocked||!i.ctx)){i._audioUnlocked=!1,i.autoUnlock=!1,!i._mobileUnloaded&&i.ctx.sampleRate!==44100&&(i._mobileUnloaded=!0,i.unload()),i._scratchBuffer=i.ctx.createBuffer(1,1,22050);var a=function(l){for(;i._html5AudioPool.length<i.html5PoolSize;)try{var f=new Audio;f._unlocked=!0,i._releaseHtml5Audio(f)}catch{i.noAudio=!0;break}for(var h=0;h<i._howls.length;h++)if(!i._howls[h]._webAudio)for(var b=i._howls[h]._getSoundIds(),_=0;_<b.length;_++){var y=i._howls[h]._soundById(b[_]);y&&y._node&&!y._node._unlocked&&(y._node._unlocked=!0,y._node.load())}i._autoResume();var w=i.ctx.createBufferSource();w.buffer=i._scratchBuffer,w.connect(i.ctx.destination),typeof w.start>"u"?w.noteOn(0):w.start(0),typeof i.ctx.resume=="function"&&i.ctx.resume(),w.onended=function(){w.disconnect(0),i._audioUnlocked=!0,document.removeEventListener("touchstart",a,!0),document.removeEventListener("touchend",a,!0),document.removeEventListener("click",a,!0),document.removeEventListener("keydown",a,!0);for(var O=0;O<i._howls.length;O++)i._howls[O]._emit("unlock")}};return document.addEventListener("touchstart",a,!0),document.addEventListener("touchend",a,!0),document.addEventListener("click",a,!0),document.addEventListener("keydown",a,!0),i}},_obtainHtml5Audio:function(){var i=this||t;if(i._html5AudioPool.length)return i._html5AudioPool.pop();var a=new Audio().play();return a&&typeof Promise<"u"&&(a instanceof Promise||typeof a.then=="function")&&a.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(i){var a=this||t;return i._unlocked&&a._html5AudioPool.push(i),a},_autoSuspend:function(){var i=this;if(!(!i.autoSuspend||!i.ctx||typeof i.ctx.suspend>"u"||!t.usingWebAudio)){for(var a=0;a<i._howls.length;a++)if(i._howls[a]._webAudio){for(var l=0;l<i._howls[a]._sounds.length;l++)if(!i._howls[a]._sounds[l]._paused)return i}return i._suspendTimer&&clearTimeout(i._suspendTimer),i._suspendTimer=setTimeout(function(){if(i.autoSuspend){i._suspendTimer=null,i.state="suspending";var f=function(){i.state="suspended",i._resumeAfterSuspend&&(delete i._resumeAfterSuspend,i._autoResume())};i.ctx.suspend().then(f,f)}},3e4),i}},_autoResume:function(){var i=this;if(!(!i.ctx||typeof i.ctx.resume>"u"||!t.usingWebAudio))return i.state==="running"&&i.ctx.state!=="interrupted"&&i._suspendTimer?(clearTimeout(i._suspendTimer),i._suspendTimer=null):i.state==="suspended"||i.state==="running"&&i.ctx.state==="interrupted"?(i.ctx.resume().then(function(){i.state="running";for(var a=0;a<i._howls.length;a++)i._howls[a]._emit("resume")}),i._suspendTimer&&(clearTimeout(i._suspendTimer),i._suspendTimer=null)):i.state==="suspending"&&(i._resumeAfterSuspend=!0),i}};var t=new n,r=function(i){var a=this;if(!i.src||i.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}a.init(i)};r.prototype={init:function(i){var a=this;return t.ctx||m(),a._autoplay=i.autoplay||!1,a._format=typeof i.format!="string"?i.format:[i.format],a._html5=i.html5||!1,a._muted=i.mute||!1,a._loop=i.loop||!1,a._pool=i.pool||5,a._preload=typeof i.preload=="boolean"||i.preload==="metadata"?i.preload:!0,a._rate=i.rate||1,a._sprite=i.sprite||{},a._src=typeof i.src!="string"?i.src:[i.src],a._volume=i.volume!==void 0?i.volume:1,a._xhr={method:i.xhr&&i.xhr.method?i.xhr.method:"GET",headers:i.xhr&&i.xhr.headers?i.xhr.headers:null,withCredentials:i.xhr&&i.xhr.withCredentials?i.xhr.withCredentials:!1},a._duration=0,a._state="unloaded",a._sounds=[],a._endTimers={},a._queue=[],a._playLock=!1,a._onend=i.onend?[{fn:i.onend}]:[],a._onfade=i.onfade?[{fn:i.onfade}]:[],a._onload=i.onload?[{fn:i.onload}]:[],a._onloaderror=i.onloaderror?[{fn:i.onloaderror}]:[],a._onplayerror=i.onplayerror?[{fn:i.onplayerror}]:[],a._onpause=i.onpause?[{fn:i.onpause}]:[],a._onplay=i.onplay?[{fn:i.onplay}]:[],a._onstop=i.onstop?[{fn:i.onstop}]:[],a._onmute=i.onmute?[{fn:i.onmute}]:[],a._onvolume=i.onvolume?[{fn:i.onvolume}]:[],a._onrate=i.onrate?[{fn:i.onrate}]:[],a._onseek=i.onseek?[{fn:i.onseek}]:[],a._onunlock=i.onunlock?[{fn:i.onunlock}]:[],a._onresume=[],a._webAudio=t.usingWebAudio&&!a._html5,typeof t.ctx<"u"&&t.ctx&&t.autoUnlock&&t._unlockAudio(),t._howls.push(a),a._autoplay&&a._queue.push({event:"play",action:function(){a.play()}}),a._preload&&a._preload!=="none"&&a.load(),a},load:function(){var i=this,a=null;if(t.noAudio){i._emit("loaderror",null,"No audio support.");return}typeof i._src=="string"&&(i._src=[i._src]);for(var l=0;l<i._src.length;l++){var f,h;if(i._format&&i._format[l])f=i._format[l];else{if(h=i._src[l],typeof h!="string"){i._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}f=/^data:audio\/([^;,]+);/i.exec(h),f||(f=/\.([^.]+)$/.exec(h.split("?",1)[0])),f&&(f=f[1].toLowerCase())}if(f||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),f&&t.codecs(f)){a=i._src[l];break}}if(!a){i._emit("loaderror",null,"No codec support for selected audio sources.");return}return i._src=a,i._state="loading",window.location.protocol==="https:"&&a.slice(0,5)==="http:"&&(i._html5=!0,i._webAudio=!1),new o(i),i._webAudio&&u(i),i},play:function(i,a){var l=this,f=null;if(typeof i=="number")f=i,i=null;else{if(typeof i=="string"&&l._state==="loaded"&&!l._sprite[i])return null;if(typeof i>"u"&&(i="__default",!l._playLock)){for(var h=0,b=0;b<l._sounds.length;b++)l._sounds[b]._paused&&!l._sounds[b]._ended&&(h++,f=l._sounds[b]._id);h===1?i=null:f=null}}var _=f?l._soundById(f):l._inactiveSound();if(!_)return null;if(f&&!i&&(i=_._sprite||"__default"),l._state!=="loaded"){_._sprite=i,_._ended=!1;var y=_._id;return l._queue.push({event:"play",action:function(){l.play(y)}}),y}if(f&&!_._paused)return a||l._loadQueue("play"),_._id;l._webAudio&&t._autoResume();var w=Math.max(0,_._seek>0?_._seek:l._sprite[i][0]/1e3),O=Math.max(0,(l._sprite[i][0]+l._sprite[i][1])/1e3-w),D=O*1e3/Math.abs(_._rate),V=l._sprite[i][0]/1e3,de=(l._sprite[i][0]+l._sprite[i][1])/1e3;_._sprite=i,_._ended=!1;var _e=function(){_._paused=!1,_._seek=w,_._start=V,_._stop=de,_._loop=!!(_._loop||l._sprite[i][2])};if(w>=de){l._ended(_);return}var B=_._node;if(l._webAudio){var Wr=function(){l._playLock=!1,_e(),l._refreshBuffer(_);var Ke=_._muted||l._muted?0:_._volume;B.gain.setValueAtTime(Ke,t.ctx.currentTime),_._playStart=t.ctx.currentTime,typeof B.bufferSource.start>"u"?_._loop?B.bufferSource.noteGrainOn(0,w,86400):B.bufferSource.noteGrainOn(0,w,O):_._loop?B.bufferSource.start(0,w,86400):B.bufferSource.start(0,w,O),D!==1/0&&(l._endTimers[_._id]=setTimeout(l._ended.bind(l,_),D)),a||setTimeout(function(){l._emit("play",_._id),l._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?Wr():(l._playLock=!0,l.once("resume",Wr),l._clearTimer(_._id))}else{var Xr=function(){B.currentTime=w,B.muted=_._muted||l._muted||t._muted||B.muted,B.volume=_._volume*t.volume(),B.playbackRate=_._rate;try{var Ke=B.play();if(Ke&&typeof Promise<"u"&&(Ke instanceof Promise||typeof Ke.then=="function")?(l._playLock=!0,_e(),Ke.then(function(){l._playLock=!1,B._unlocked=!0,a?l._loadQueue():l._emit("play",_._id)}).catch(function(){l._playLock=!1,l._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),_._ended=!0,_._paused=!0})):a||(l._playLock=!1,_e(),l._emit("play",_._id)),B.playbackRate=_._rate,B.paused){l._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}i!=="__default"||_._loop?l._endTimers[_._id]=setTimeout(l._ended.bind(l,_),D):(l._endTimers[_._id]=function(){l._ended(_),B.removeEventListener("ended",l._endTimers[_._id],!1)},B.addEventListener("ended",l._endTimers[_._id],!1))}catch(Ya){l._emit("playerror",_._id,Ya)}};B.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(B.src=l._src,B.load());var Za=window&&window.ejecta||!B.readyState&&t._navigator.isCocoonJS;if(B.readyState>=3||Za)Xr();else{l._playLock=!0,l._state="loading";var Zr=function(){l._state="loaded",Xr(),B.removeEventListener(t._canPlayEvent,Zr,!1)};B.addEventListener(t._canPlayEvent,Zr,!1),l._clearTimer(_._id)}}return _._id},pause:function(i){var a=this;if(a._state!=="loaded"||a._playLock)return a._queue.push({event:"pause",action:function(){a.pause(i)}}),a;for(var l=a._getSoundIds(i),f=0;f<l.length;f++){a._clearTimer(l[f]);var h=a._soundById(l[f]);if(h&&!h._paused&&(h._seek=a.seek(l[f]),h._rateSeek=0,h._paused=!0,a._stopFade(l[f]),h._node))if(a._webAudio){if(!h._node.bufferSource)continue;typeof h._node.bufferSource.stop>"u"?h._node.bufferSource.noteOff(0):h._node.bufferSource.stop(0),a._cleanBuffer(h._node)}else(!isNaN(h._node.duration)||h._node.duration===1/0)&&h._node.pause();arguments[1]||a._emit("pause",h?h._id:null)}return a},stop:function(i,a){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"stop",action:function(){l.stop(i)}}),l;for(var f=l._getSoundIds(i),h=0;h<f.length;h++){l._clearTimer(f[h]);var b=l._soundById(f[h]);b&&(b._seek=b._start||0,b._rateSeek=0,b._paused=!0,b._ended=!0,l._stopFade(f[h]),b._node&&(l._webAudio?b._node.bufferSource&&(typeof b._node.bufferSource.stop>"u"?b._node.bufferSource.noteOff(0):b._node.bufferSource.stop(0),l._cleanBuffer(b._node)):(!isNaN(b._node.duration)||b._node.duration===1/0)&&(b._node.currentTime=b._start||0,b._node.pause(),b._node.duration===1/0&&l._clearSound(b._node))),a||l._emit("stop",b._id))}return l},mute:function(i,a){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"mute",action:function(){l.mute(i,a)}}),l;if(typeof a>"u")if(typeof i=="boolean")l._muted=i;else return l._muted;for(var f=l._getSoundIds(a),h=0;h<f.length;h++){var b=l._soundById(f[h]);b&&(b._muted=i,b._interval&&l._stopFade(b._id),l._webAudio&&b._node?b._node.gain.setValueAtTime(i?0:b._volume,t.ctx.currentTime):b._node&&(b._node.muted=t._muted?!0:i),l._emit("mute",b._id))}return l},volume:function(){var i=this,a=arguments,l,f;if(a.length===0)return i._volume;if(a.length===1||a.length===2&&typeof a[1]>"u"){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?f=parseInt(a[0],10):l=parseFloat(a[0])}else a.length>=2&&(l=parseFloat(a[0]),f=parseInt(a[1],10));var _;if(typeof l<"u"&&l>=0&&l<=1){if(i._state!=="loaded"||i._playLock)return i._queue.push({event:"volume",action:function(){i.volume.apply(i,a)}}),i;typeof f>"u"&&(i._volume=l),f=i._getSoundIds(f);for(var y=0;y<f.length;y++)_=i._soundById(f[y]),_&&(_._volume=l,a[2]||i._stopFade(f[y]),i._webAudio&&_._node&&!_._muted?_._node.gain.setValueAtTime(l,t.ctx.currentTime):_._node&&!_._muted&&(_._node.volume=l*t.volume()),i._emit("volume",_._id))}else return _=f?i._soundById(f):i._sounds[0],_?_._volume:0;return i},fade:function(i,a,l,f){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"fade",action:function(){h.fade(i,a,l,f)}}),h;i=Math.min(Math.max(0,parseFloat(i)),1),a=Math.min(Math.max(0,parseFloat(a)),1),l=parseFloat(l),h.volume(i,f);for(var b=h._getSoundIds(f),_=0;_<b.length;_++){var y=h._soundById(b[_]);if(y){if(f||h._stopFade(b[_]),h._webAudio&&!y._muted){var w=t.ctx.currentTime,O=w+l/1e3;y._volume=i,y._node.gain.setValueAtTime(i,w),y._node.gain.linearRampToValueAtTime(a,O)}h._startFadeInterval(y,i,a,l,b[_],typeof f>"u")}}return h},_startFadeInterval:function(i,a,l,f,h,b){var _=this,y=a,w=l-a,O=Math.abs(w/.01),D=Math.max(4,O>0?f/O:f),V=Date.now();i._fadeTo=l,i._interval=setInterval(function(){var de=(Date.now()-V)/f;V=Date.now(),y+=w*de,y=Math.round(y*100)/100,w<0?y=Math.max(l,y):y=Math.min(l,y),_._webAudio?i._volume=y:_.volume(y,i._id,!0),b&&(_._volume=y),(l<a&&y<=l||l>a&&y>=l)&&(clearInterval(i._interval),i._interval=null,i._fadeTo=null,_.volume(l,i._id),_._emit("fade",i._id))},D)},_stopFade:function(i){var a=this,l=a._soundById(i);return l&&l._interval&&(a._webAudio&&l._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(l._interval),l._interval=null,a.volume(l._fadeTo,i),l._fadeTo=null,a._emit("fade",i)),a},loop:function(){var i=this,a=arguments,l,f,h;if(a.length===0)return i._loop;if(a.length===1)if(typeof a[0]=="boolean")l=a[0],i._loop=l;else return h=i._soundById(parseInt(a[0],10)),h?h._loop:!1;else a.length===2&&(l=a[0],f=parseInt(a[1],10));for(var b=i._getSoundIds(f),_=0;_<b.length;_++)h=i._soundById(b[_]),h&&(h._loop=l,i._webAudio&&h._node&&h._node.bufferSource&&(h._node.bufferSource.loop=l,l&&(h._node.bufferSource.loopStart=h._start||0,h._node.bufferSource.loopEnd=h._stop,i.playing(b[_])&&(i.pause(b[_],!0),i.play(b[_],!0)))));return i},rate:function(){var i=this,a=arguments,l,f;if(a.length===0)f=i._sounds[0]._id;else if(a.length===1){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?f=parseInt(a[0],10):l=parseFloat(a[0])}else a.length===2&&(l=parseFloat(a[0]),f=parseInt(a[1],10));var _;if(typeof l=="number"){if(i._state!=="loaded"||i._playLock)return i._queue.push({event:"rate",action:function(){i.rate.apply(i,a)}}),i;typeof f>"u"&&(i._rate=l),f=i._getSoundIds(f);for(var y=0;y<f.length;y++)if(_=i._soundById(f[y]),_){i.playing(f[y])&&(_._rateSeek=i.seek(f[y]),_._playStart=i._webAudio?t.ctx.currentTime:_._playStart),_._rate=l,i._webAudio&&_._node&&_._node.bufferSource?_._node.bufferSource.playbackRate.setValueAtTime(l,t.ctx.currentTime):_._node&&(_._node.playbackRate=l);var w=i.seek(f[y]),O=(i._sprite[_._sprite][0]+i._sprite[_._sprite][1])/1e3-w,D=O*1e3/Math.abs(_._rate);(i._endTimers[f[y]]||!_._paused)&&(i._clearTimer(f[y]),i._endTimers[f[y]]=setTimeout(i._ended.bind(i,_),D)),i._emit("rate",_._id)}}else return _=i._soundById(f),_?_._rate:i._rate;return i},seek:function(){var i=this,a=arguments,l,f;if(a.length===0)i._sounds.length&&(f=i._sounds[0]._id);else if(a.length===1){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?f=parseInt(a[0],10):i._sounds.length&&(f=i._sounds[0]._id,l=parseFloat(a[0]))}else a.length===2&&(l=parseFloat(a[0]),f=parseInt(a[1],10));if(typeof f>"u")return 0;if(typeof l=="number"&&(i._state!=="loaded"||i._playLock))return i._queue.push({event:"seek",action:function(){i.seek.apply(i,a)}}),i;var _=i._soundById(f);if(_)if(typeof l=="number"&&l>=0){var y=i.playing(f);y&&i.pause(f,!0),_._seek=l,_._ended=!1,i._clearTimer(f),!i._webAudio&&_._node&&!isNaN(_._node.duration)&&(_._node.currentTime=l);var w=function(){y&&i.play(f,!0),i._emit("seek",f)};if(y&&!i._webAudio){var O=function(){i._playLock?setTimeout(O,0):w()};setTimeout(O,0)}else w()}else if(i._webAudio){var D=i.playing(f)?t.ctx.currentTime-_._playStart:0,V=_._rateSeek?_._rateSeek-_._seek:0;return _._seek+(V+D*Math.abs(_._rate))}else return _._node.currentTime;return i},playing:function(i){var a=this;if(typeof i=="number"){var l=a._soundById(i);return l?!l._paused:!1}for(var f=0;f<a._sounds.length;f++)if(!a._sounds[f]._paused)return!0;return!1},duration:function(i){var a=this,l=a._duration,f=a._soundById(i);return f&&(l=a._sprite[f._sprite][1]/1e3),l},state:function(){return this._state},unload:function(){for(var i=this,a=i._sounds,l=0;l<a.length;l++)a[l]._paused||i.stop(a[l]._id),i._webAudio||(i._clearSound(a[l]._node),a[l]._node.removeEventListener("error",a[l]._errorFn,!1),a[l]._node.removeEventListener(t._canPlayEvent,a[l]._loadFn,!1),a[l]._node.removeEventListener("ended",a[l]._endFn,!1),t._releaseHtml5Audio(a[l]._node)),delete a[l]._node,i._clearTimer(a[l]._id);var f=t._howls.indexOf(i);f>=0&&t._howls.splice(f,1);var h=!0;for(l=0;l<t._howls.length;l++)if(t._howls[l]._src===i._src||i._src.indexOf(t._howls[l]._src)>=0){h=!1;break}return s&&h&&delete s[i._src],t.noAudio=!1,i._state="unloaded",i._sounds=[],i=null,null},on:function(i,a,l,f){var h=this,b=h["_on"+i];return typeof a=="function"&&b.push(f?{id:l,fn:a,once:f}:{id:l,fn:a}),h},off:function(i,a,l){var f=this,h=f["_on"+i],b=0;if(typeof a=="number"&&(l=a,a=null),a||l)for(b=0;b<h.length;b++){var _=l===h[b].id;if(a===h[b].fn&&_||!a&&_){h.splice(b,1);break}}else if(i)f["_on"+i]=[];else{var y=Object.keys(f);for(b=0;b<y.length;b++)y[b].indexOf("_on")===0&&Array.isArray(f[y[b]])&&(f[y[b]]=[])}return f},once:function(i,a,l){var f=this;return f.on(i,a,l,1),f},_emit:function(i,a,l){for(var f=this,h=f["_on"+i],b=h.length-1;b>=0;b--)(!h[b].id||h[b].id===a||i==="load")&&(setTimeout((function(_){_.call(this,a,l)}).bind(f,h[b].fn),0),h[b].once&&f.off(i,h[b].fn,h[b].id));return f._loadQueue(i),f},_loadQueue:function(i){var a=this;if(a._queue.length>0){var l=a._queue[0];l.event===i&&(a._queue.shift(),a._loadQueue()),i||l.action()}return a},_ended:function(i){var a=this,l=i._sprite;if(!a._webAudio&&i._node&&!i._node.paused&&!i._node.ended&&i._node.currentTime<i._stop)return setTimeout(a._ended.bind(a,i),100),a;var f=!!(i._loop||a._sprite[l][2]);if(a._emit("end",i._id),!a._webAudio&&f&&a.stop(i._id,!0).play(i._id),a._webAudio&&f){a._emit("play",i._id),i._seek=i._start||0,i._rateSeek=0,i._playStart=t.ctx.currentTime;var h=(i._stop-i._start)*1e3/Math.abs(i._rate);a._endTimers[i._id]=setTimeout(a._ended.bind(a,i),h)}return a._webAudio&&!f&&(i._paused=!0,i._ended=!0,i._seek=i._start||0,i._rateSeek=0,a._clearTimer(i._id),a._cleanBuffer(i._node),t._autoSuspend()),!a._webAudio&&!f&&a.stop(i._id,!0),a},_clearTimer:function(i){var a=this;if(a._endTimers[i]){if(typeof a._endTimers[i]!="function")clearTimeout(a._endTimers[i]);else{var l=a._soundById(i);l&&l._node&&l._node.removeEventListener("ended",a._endTimers[i],!1)}delete a._endTimers[i]}return a},_soundById:function(i){for(var a=this,l=0;l<a._sounds.length;l++)if(i===a._sounds[l]._id)return a._sounds[l];return null},_inactiveSound:function(){var i=this;i._drain();for(var a=0;a<i._sounds.length;a++)if(i._sounds[a]._ended)return i._sounds[a].reset();return new o(i)},_drain:function(){var i=this,a=i._pool,l=0,f=0;if(!(i._sounds.length<a)){for(f=0;f<i._sounds.length;f++)i._sounds[f]._ended&&l++;for(f=i._sounds.length-1;f>=0;f--){if(l<=a)return;i._sounds[f]._ended&&(i._webAudio&&i._sounds[f]._node&&i._sounds[f]._node.disconnect(0),i._sounds.splice(f,1),l--)}}},_getSoundIds:function(i){var a=this;if(typeof i>"u"){for(var l=[],f=0;f<a._sounds.length;f++)l.push(a._sounds[f]._id);return l}else return[i]},_refreshBuffer:function(i){var a=this;return i._node.bufferSource=t.ctx.createBufferSource(),i._node.bufferSource.buffer=s[a._src],i._panner?i._node.bufferSource.connect(i._panner):i._node.bufferSource.connect(i._node),i._node.bufferSource.loop=i._loop,i._loop&&(i._node.bufferSource.loopStart=i._start||0,i._node.bufferSource.loopEnd=i._stop||0),i._node.bufferSource.playbackRate.setValueAtTime(i._rate,t.ctx.currentTime),a},_cleanBuffer:function(i){var a=this,l=t._navigator&&t._navigator.vendor.indexOf("Apple")>=0;if(!i.bufferSource)return a;if(t._scratchBuffer&&i.bufferSource&&(i.bufferSource.onended=null,i.bufferSource.disconnect(0),l))try{i.bufferSource.buffer=t._scratchBuffer}catch{}return i.bufferSource=null,a},_clearSound:function(i){var a=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);a||(i.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var o=function(i){this._parent=i,this.init()};o.prototype={init:function(){var i=this,a=i._parent;return i._muted=a._muted,i._loop=a._loop,i._volume=a._volume,i._rate=a._rate,i._seek=0,i._paused=!0,i._ended=!0,i._sprite="__default",i._id=++t._counter,a._sounds.push(i),i.create(),i},create:function(){var i=this,a=i._parent,l=t._muted||i._muted||i._parent._muted?0:i._volume;return a._webAudio?(i._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),i._node.gain.setValueAtTime(l,t.ctx.currentTime),i._node.paused=!0,i._node.connect(t.masterGain)):t.noAudio||(i._node=t._obtainHtml5Audio(),i._errorFn=i._errorListener.bind(i),i._node.addEventListener("error",i._errorFn,!1),i._loadFn=i._loadListener.bind(i),i._node.addEventListener(t._canPlayEvent,i._loadFn,!1),i._endFn=i._endListener.bind(i),i._node.addEventListener("ended",i._endFn,!1),i._node.src=a._src,i._node.preload=a._preload===!0?"auto":a._preload,i._node.volume=l*t.volume(),i._node.load()),i},reset:function(){var i=this,a=i._parent;return i._muted=a._muted,i._loop=a._loop,i._volume=a._volume,i._rate=a._rate,i._seek=0,i._rateSeek=0,i._paused=!0,i._ended=!0,i._sprite="__default",i._id=++t._counter,i},_errorListener:function(){var i=this;i._parent._emit("loaderror",i._id,i._node.error?i._node.error.code:0),i._node.removeEventListener("error",i._errorFn,!1)},_loadListener:function(){var i=this,a=i._parent;a._duration=Math.ceil(i._node.duration*10)/10,Object.keys(a._sprite).length===0&&(a._sprite={__default:[0,a._duration*1e3]}),a._state!=="loaded"&&(a._state="loaded",a._emit("load"),a._loadQueue()),i._node.removeEventListener(t._canPlayEvent,i._loadFn,!1)},_endListener:function(){var i=this,a=i._parent;a._duration===1/0&&(a._duration=Math.ceil(i._node.duration*10)/10,a._sprite.__default[1]===1/0&&(a._sprite.__default[1]=a._duration*1e3),a._ended(i)),i._node.removeEventListener("ended",i._endFn,!1)}};var s={},u=function(i){var a=i._src;if(s[a]){i._duration=s[a].duration,p(i);return}if(/^data:[^;]+;base64,/.test(a)){for(var l=atob(a.split(",")[1]),f=new Uint8Array(l.length),h=0;h<l.length;++h)f[h]=l.charCodeAt(h);c(f.buffer,i)}else{var b=new XMLHttpRequest;b.open(i._xhr.method,a,!0),b.withCredentials=i._xhr.withCredentials,b.responseType="arraybuffer",i._xhr.headers&&Object.keys(i._xhr.headers).forEach(function(_){b.setRequestHeader(_,i._xhr.headers[_])}),b.onload=function(){var _=(b.status+"")[0];if(_!=="0"&&_!=="2"&&_!=="3"){i._emit("loaderror",null,"Failed loading audio file with status: "+b.status+".");return}c(b.response,i)},b.onerror=function(){i._webAudio&&(i._html5=!0,i._webAudio=!1,i._sounds=[],delete s[a],i.load())},d(b)}},d=function(i){try{i.send()}catch{i.onerror()}},c=function(i,a){var l=function(){a._emit("loaderror",null,"Decoding audio data failed.")},f=function(h){h&&a._sounds.length>0?(s[a._src]=h,p(a,h)):l()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(i).then(f).catch(l):t.ctx.decodeAudioData(i,f,l)},p=function(i,a){a&&!i._duration&&(i._duration=a.duration),Object.keys(i._sprite).length===0&&(i._sprite={__default:[0,i._duration*1e3]}),i._state!=="loaded"&&(i._state="loaded",i._emit("load"),i._loadQueue())},m=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var i=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),a=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),l=a?parseInt(a[1],10):null;if(i&&l&&l<9){var f=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!f&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};e.Howler=t,e.Howl=r,typeof it<"u"?(it.HowlerGlobal=n,it.Howler=t,it.Howl=r,it.Sound=o):typeof window<"u"&&(window.HowlerGlobal=n,window.Howler=t,window.Howl=r,window.Sound=o)})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var r=this;if(!r.ctx||!r.ctx.listener)return r;for(var o=r._howls.length-1;o>=0;o--)r._howls[o].stereo(t);return r},HowlerGlobal.prototype.pos=function(t,r,o){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(r=typeof r!="number"?s._pos[1]:r,o=typeof o!="number"?s._pos[2]:o,typeof t=="number")s._pos=[t,r,o],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(t,r,o,s,u,d){var c=this;if(!c.ctx||!c.ctx.listener)return c;var p=c._orientation;if(r=typeof r!="number"?p[1]:r,o=typeof o!="number"?p[2]:o,s=typeof s!="number"?p[3]:s,u=typeof u!="number"?p[4]:u,d=typeof d!="number"?p[5]:d,typeof t=="number")c._orientation=[t,r,o,s,u,d],typeof c.ctx.listener.forwardX<"u"?(c.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),c.ctx.listener.forwardY.setTargetAtTime(r,Howler.ctx.currentTime,.1),c.ctx.listener.forwardZ.setTargetAtTime(o,Howler.ctx.currentTime,.1),c.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),c.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),c.ctx.listener.upZ.setTargetAtTime(d,Howler.ctx.currentTime,.1)):c.ctx.listener.setOrientation(t,r,o,s,u,d);else return p;return c},Howl.prototype.init=(function(t){return function(r){var o=this;return o._orientation=r.orientation||[1,0,0],o._stereo=r.stereo||null,o._pos=r.pos||null,o._pannerAttr={coneInnerAngle:typeof r.coneInnerAngle<"u"?r.coneInnerAngle:360,coneOuterAngle:typeof r.coneOuterAngle<"u"?r.coneOuterAngle:360,coneOuterGain:typeof r.coneOuterGain<"u"?r.coneOuterGain:0,distanceModel:typeof r.distanceModel<"u"?r.distanceModel:"inverse",maxDistance:typeof r.maxDistance<"u"?r.maxDistance:1e4,panningModel:typeof r.panningModel<"u"?r.panningModel:"HRTF",refDistance:typeof r.refDistance<"u"?r.refDistance:1,rolloffFactor:typeof r.rolloffFactor<"u"?r.rolloffFactor:1},o._onstereo=r.onstereo?[{fn:r.onstereo}]:[],o._onpos=r.onpos?[{fn:r.onpos}]:[],o._onorientation=r.onorientation?[{fn:r.onorientation}]:[],t.call(this,r)}})(Howl.prototype.init),Howl.prototype.stereo=function(t,r){var o=this;if(!o._webAudio)return o;if(o._state!=="loaded")return o._queue.push({event:"stereo",action:function(){o.stereo(t,r)}}),o;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof r>"u")if(typeof t=="number")o._stereo=t,o._pos=[t,0,0];else return o._stereo;for(var u=o._getSoundIds(r),d=0;d<u.length;d++){var c=o._soundById(u[d]);if(c)if(typeof t=="number")c._stereo=t,c._pos=[t,0,0],c._node&&(c._pannerAttr.panningModel="equalpower",(!c._panner||!c._panner.pan)&&n(c,s),s==="spatial"?typeof c._panner.positionX<"u"?(c._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),c._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),c._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):c._panner.setPosition(t,0,0):c._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),o._emit("stereo",c._id);else return c._stereo}return o},Howl.prototype.pos=function(t,r,o,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"pos",action:function(){u.pos(t,r,o,s)}}),u;if(r=typeof r!="number"?0:r,o=typeof o!="number"?-.5:o,typeof s>"u")if(typeof t=="number")u._pos=[t,r,o];else return u._pos;for(var d=u._getSoundIds(s),c=0;c<d.length;c++){var p=u._soundById(d[c]);if(p)if(typeof t=="number")p._pos=[t,r,o],p._node&&((!p._panner||p._panner.pan)&&n(p,"spatial"),typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(o,Howler.ctx.currentTime)):p._panner.setPosition(t,r,o)),u._emit("pos",p._id);else return p._pos}return u},Howl.prototype.orientation=function(t,r,o,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"orientation",action:function(){u.orientation(t,r,o,s)}}),u;if(r=typeof r!="number"?u._orientation[1]:r,o=typeof o!="number"?u._orientation[2]:o,typeof s>"u")if(typeof t=="number")u._orientation=[t,r,o];else return u._orientation;for(var d=u._getSoundIds(s),c=0;c<d.length;c++){var p=u._soundById(d[c]);if(p)if(typeof t=="number")p._orientation=[t,r,o],p._node&&(p._panner||(p._pos||(p._pos=u._pos||[0,0,-.5]),n(p,"spatial")),typeof p._panner.orientationX<"u"?(p._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),p._panner.orientationY.setValueAtTime(r,Howler.ctx.currentTime),p._panner.orientationZ.setValueAtTime(o,Howler.ctx.currentTime)):p._panner.setOrientation(t,r,o)),u._emit("orientation",p._id);else return p._orientation}return u},Howl.prototype.pannerAttr=function(){var t=this,r=arguments,o,s,u;if(!t._webAudio)return t;if(r.length===0)return t._pannerAttr;if(r.length===1)if(typeof r[0]=="object")o=r[0],typeof s>"u"&&(o.pannerAttr||(o.pannerAttr={coneInnerAngle:o.coneInnerAngle,coneOuterAngle:o.coneOuterAngle,coneOuterGain:o.coneOuterGain,distanceModel:o.distanceModel,maxDistance:o.maxDistance,refDistance:o.refDistance,rolloffFactor:o.rolloffFactor,panningModel:o.panningModel}),t._pannerAttr={coneInnerAngle:typeof o.pannerAttr.coneInnerAngle<"u"?o.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof o.pannerAttr.coneOuterAngle<"u"?o.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof o.pannerAttr.coneOuterGain<"u"?o.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof o.pannerAttr.distanceModel<"u"?o.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof o.pannerAttr.maxDistance<"u"?o.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof o.pannerAttr.refDistance<"u"?o.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof o.pannerAttr.rolloffFactor<"u"?o.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof o.pannerAttr.panningModel<"u"?o.pannerAttr.panningModel:t._panningModel});else return u=t._soundById(parseInt(r[0],10)),u?u._pannerAttr:t._pannerAttr;else r.length===2&&(o=r[0],s=parseInt(r[1],10));for(var d=t._getSoundIds(s),c=0;c<d.length;c++)if(u=t._soundById(d[c]),u){var p=u._pannerAttr;p={coneInnerAngle:typeof o.coneInnerAngle<"u"?o.coneInnerAngle:p.coneInnerAngle,coneOuterAngle:typeof o.coneOuterAngle<"u"?o.coneOuterAngle:p.coneOuterAngle,coneOuterGain:typeof o.coneOuterGain<"u"?o.coneOuterGain:p.coneOuterGain,distanceModel:typeof o.distanceModel<"u"?o.distanceModel:p.distanceModel,maxDistance:typeof o.maxDistance<"u"?o.maxDistance:p.maxDistance,refDistance:typeof o.refDistance<"u"?o.refDistance:p.refDistance,rolloffFactor:typeof o.rolloffFactor<"u"?o.rolloffFactor:p.rolloffFactor,panningModel:typeof o.panningModel<"u"?o.panningModel:p.panningModel};var m=u._panner;m||(u._pos||(u._pos=t._pos||[0,0,-.5]),n(u,"spatial"),m=u._panner),m.coneInnerAngle=p.coneInnerAngle,m.coneOuterAngle=p.coneOuterAngle,m.coneOuterGain=p.coneOuterGain,m.distanceModel=p.distanceModel,m.maxDistance=p.maxDistance,m.refDistance=p.refDistance,m.rolloffFactor=p.rolloffFactor,m.panningModel=p.panningModel}return t},Sound.prototype.init=(function(t){return function(){var r=this,o=r._parent;r._orientation=o._orientation,r._stereo=o._stereo,r._pos=o._pos,r._pannerAttr=o._pannerAttr,t.call(this),r._stereo?o.stereo(r._stereo):r._pos&&o.pos(r._pos[0],r._pos[1],r._pos[2],r._id)}})(Sound.prototype.init),Sound.prototype.reset=(function(t){return function(){var r=this,o=r._parent;return r._orientation=o._orientation,r._stereo=o._stereo,r._pos=o._pos,r._pannerAttr=o._pannerAttr,r._stereo?o.stereo(r._stereo):r._pos?o.pos(r._pos[0],r._pos[1],r._pos[2],r._id):r._panner&&(r._panner.disconnect(0),r._panner=void 0,o._refreshBuffer(r)),t.call(this)}})(Sound.prototype.reset);var n=function(t,r){r=r||"spatial",r==="spatial"?(t._panner=Howler.ctx.createPanner(),t._panner.coneInnerAngle=t._pannerAttr.coneInnerAngle,t._panner.coneOuterAngle=t._pannerAttr.coneOuterAngle,t._panner.coneOuterGain=t._pannerAttr.coneOuterGain,t._panner.distanceModel=t._pannerAttr.distanceModel,t._panner.maxDistance=t._pannerAttr.maxDistance,t._panner.refDistance=t._pannerAttr.refDistance,t._panner.rolloffFactor=t._pannerAttr.rolloffFactor,t._panner.panningModel=t._pannerAttr.panningModel,typeof t._panner.positionX<"u"?(t._panner.positionX.setValueAtTime(t._pos[0],Howler.ctx.currentTime),t._panner.positionY.setValueAtTime(t._pos[1],Howler.ctx.currentTime),t._panner.positionZ.setValueAtTime(t._pos[2],Howler.ctx.currentTime)):t._panner.setPosition(t._pos[0],t._pos[1],t._pos[2]),typeof t._panner.orientationX<"u"?(t._panner.orientationX.setValueAtTime(t._orientation[0],Howler.ctx.currentTime),t._panner.orientationY.setValueAtTime(t._orientation[1],Howler.ctx.currentTime),t._panner.orientationZ.setValueAtTime(t._orientation[2],Howler.ctx.currentTime)):t._panner.setOrientation(t._orientation[0],t._orientation[1],t._orientation[2])):(t._panner=Howler.ctx.createStereoPanner(),t._panner.pan.setValueAtTime(t._stereo,Howler.ctx.currentTime)),t._panner.connect(t._node),t._paused||t._parent.pause(t._id,!0).play(t._id,!0)}})()})(hn)),hn}var qe=pa();const bn="default";class va{bgMusic=new Map;bgBaseVolumes=new Map;sfx=new Map;sfxBaseVolumes=new Map;masterVolume=1;musicMuted=!1;sfxMuted=!1;allMuted=!1;registerBgMusic(n,t,r){if(Array.isArray(n)){const s=typeof t=="number"?t:.5;this.registerBgMusicTrack(bn,n,s);return}if(t===void 0||typeof t=="number"){const s=typeof t=="number"?t:.5;this.registerBgMusicTrack(bn,n,s);return}const o=typeof r=="number"?r:.5;this.registerBgMusicTrack(n,t,o)}registerBgMusicTrack(n,t,r){if(this.bgMusic.has(n))return;const o=this.clamp(r);this.bgBaseVolumes.set(n,o),qe.Howler.volume(1),this.bgMusic.set(n,new qe.Howl({src:Array.isArray(t)?t:[t],loop:!0,volume:o*this.masterVolume}))}registerSound(n,t,r=1){if(this.sfx.has(n))return;const o=this.clamp(r);this.sfxBaseVolumes.set(n,o);const s=new qe.Howl({src:Array.isArray(t)?t:[t],volume:o*this.masterVolume});this.sfx.set(n,s)}playBgMusic(n){if(this.allMuted||this.musicMuted)return;const t=r=>{r.playing()||r.play()};if(n!==void 0){const r=this.bgMusic.get(n);r&&t(r);return}this.bgMusic.forEach(t)}stopBgMusic(n){if(n!==void 0){this.bgMusic.get(n)?.stop();return}this.bgMusic.forEach(t=>t.stop())}muteMusic(){this.musicMuted=!0,this.bgMusic.forEach(n=>n.pause())}unmuteMusic(){this.musicMuted=!1,this.allMuted||this.playBgMusic()}playSound(n,t=!1){if(this.allMuted||this.sfxMuted)return;const r=this.sfx.get(n);if(r)return r.loop(t),r.play()}stopSound(n){const t=this.sfx.get(n);t&&t.stop()}muteSounds(){this.sfxMuted=!0,this.sfx.forEach(n=>n.pause())}unmuteSounds(){this.sfxMuted=!1}setMasterVolume(n){let t=n/100;t=this.clamp(t),this.masterVolume=t,qe.Howler.volume(1),!this.allMuted&&(this.bgMusic.forEach((r,o)=>{const s=this.bgBaseVolumes.get(o)??1;r.volume(s*this.masterVolume)}),this.sfx.forEach((r,o)=>{const s=this.sfxBaseVolumes.get(o)??1;r.volume(s*this.masterVolume)}))}setSoundBaseVolume(n,t){const r=this.sfx.get(n);if(!r)return;const o=this.clamp(t);this.sfxBaseVolumes.set(n,o),r.volume(o*this.masterVolume)}setBgMusicBaseVolume(n,t){const r=this.bgMusic.get(n);if(!r)return;const o=this.clamp(t);this.bgBaseVolumes.set(n,o),r.volume(o*this.masterVolume)}muteAll(){this.allMuted=!0,qe.Howler.mute(!0)}unmuteAll(){this.allMuted=!1,qe.Howler.mute(!1),this.setMasterVolume(this.masterVolume),this.musicMuted||this.playBgMusic()}clamp(n){return Math.max(0,Math.min(1,n))}}const Se=new va;function M(){Se.playSound(vn.Click)}const ha=({onClick:e,disabled:n=!1,value:t,currency:r,highlighted:o=!1})=>v.jsxs("div",{className:`bet-amount ${n?"disabled":""} ${o?"ante-color":""}`,onClick:e&&!n?()=>{M(),e()}:void 0,children:[v.jsx("div",{className:"bet-amount-icon"}),v.jsxs("label",{className:"bet-amount-text",children:[t," ",r]})]}),Hr=({onClick:e,disabled:n=!1,className:t})=>v.jsx("button",{className:`${t} ${n?"disabled":""}`,onClick:e?()=>{n||(M(),e())}:void 0});class ba{activePopup=null;constructor(){Pe(this)}open(n){this.activePopup=n}close(){this.activePopup=null}get isOpen(){return this.activePopup!==null}}const k=new ba;class ma{dialogs=jr;activeDialog=null;constructor(){Pe(this)}add(n){this.dialogs.push(n)}open(n){const t=this.dialogs.find(r=>n===r.name);t?this.activeDialog=t:console.error(`Couldn't find dialog named ${n}`)}close(){this.activeDialog=null}get isOpen(){return this.activeDialog!==null}}const at=new ma;class ga{balance=1e4;betAmount=10;betIndex=0;betAmountRange=[10,20,50,100,500,1e3,5e3,1e4,25e3,5e5,65e3,8e4,1e5,15e4,2e5];maxBetAmount=this.betAmountRange[0];minBetAmount=this.betAmountRange[this.betAmountRange.length-1];displayCurrency="FUN";constructor(){Pe(this)}setBet(n){this.betAmount=n,this.betIndex=this.betAmountRange.indexOf(n)}setNextBetAmount(){if(this.betIndex===this.betAmountRange.length-1)return console.error("Bet Index must be less than BetStore.betAmountRange.length");this.betIndex+=1,this.betAmount=this.betAmountRange[this.betIndex]}setPrevBetAmount(){if(this.betIndex<1)return console.error("Bet Index must be more than 0");this.betIndex-=1,this.betAmount=this.betAmountRange[this.betIndex]}setBetAmountRange(n){this.betAmountRange=n,n.length>0&&(this.maxBetAmount=n[0],this.minBetAmount=n[n.length-1])}setDisplayCurrency(n){this.displayCurrency=n}setBalance(n){this.balance=n}}const W=new ga;class ya{countRange=[10,25,50,70,100,500,1e3];limitsRange=[10,20,50];count=0;specialFeatureSwitcherOn=!1;lossLimit=null;winLimit=null;currentWinLimit=0;currentLossLimit=0;isStarted=!1;constructor(){Pe(this)}setCount(n){this.count=n}setIsStarted(n){this.isStarted=n}setLimitsRange(n){this.limitsRange=n}setCountRange(n){this.countRange=n}setSpecialFeatureSwitcher(n){this.specialFeatureSwitcherOn=n}setLossLimit(n){this.lossLimit=n}setCurrentLossLimit(n){this.currentLossLimit=n}setWinLimit(n){this.winLimit=n}setCurrentWinLimit(n){this.currentWinLimit=n}}const we=new ya;class Aa{anteBets=[];inReelFeatures=[];bonusFeatures=[];activeAnteBet=null;activeBonusFeature=null;activeInReelFeature=null;freeSpinsCount=0;handler;handlerSet=!1;constructor(){Qt(this,{anteBets:C,inReelFeatures:C,bonusFeatures:C,activeAnteBet:C,activeBonusFeature:C,activeInReelFeature:C,freeSpinsCount:C,isActiveBonus:Te,isActiveInReelFeature:Te,isActiveAnteBet:Te,setAnteBets:L,setActiveAnteBet:L,setActiveBonusFeature:L,setActiveInReelFeature:L,setInReelFeatures:L,setBonusFeatures:L,setHandlerOnce:L,buyHandler:L})}setAnteBets(n){this.anteBets=n}setActiveAnteBet(n){n!==null?this.activeAnteBet=this.anteBets.find(t=>t.id===n)||null:this.activeAnteBet=null}setFreeSpinsCount(n){this.freeSpinsCount=n}setActiveBonusFeature(n){this.activeBonusFeature=n}setActiveInReelFeature(n){this.activeInReelFeature=n}setInReelFeatures(n){this.inReelFeatures=n}setBonusFeatures(n){this.bonusFeatures=n}get isActiveBonus(){return!!this.activeBonusFeature}get isActiveInReelFeature(){return!!this.activeInReelFeature}get isActiveAnteBet(){return!!this.activeAnteBet}setHandlerOnce(n){if(this.handlerSet){console.error("[BuyBonus] handler already set");return}this.handler=n,this.handlerSet=!0}buyHandler(n){this.handler?.(n)}}const fe=new Aa;class Oa{introSkip=JSON.parse(localStorage.getItem(ot.SKIP_INTRO))||!1;spaceToSpin=!1;spaceToSkip=!1;isTurbo=!1;volume=50;musicOn=!0;soundsOn=!0;constructor(){Pe(this)}setMusicOn(n){this.musicOn=n,localStorage.setItem(ot.MUSIC_ON,n.toString()),n?Se.unmuteMusic():Se.muteMusic()}toggleMute(){this.volume>0?this.setVolume(0):this.setVolume(50)}setVolume(n){this.volume=n,Se.setMasterVolume(n)}setIsTurbo(n){this.isTurbo=n}setSoundsOn(n){this.soundsOn=n,localStorage.setItem(ot.SOUND_ON,n.toString()),n?Se.unmuteSounds():Se.muteSounds()}setIntroSkip(n){this.introSkip=n,localStorage.setItem(ot.SKIP_INTRO,n.toString())}setSpaceToSpin(n){this.spaceToSpin=n}setSpaceToSkip(n){this.spaceToSkip=n}}const te=new Oa;class Sa{data=[{date:"26.11.2024 00:16",betAmount:1011,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:1,winAmount:2e4,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"}];constructor(){Pe(this)}setData(n){this.data=n}}const $r=new Sa;class wa{isRunning=!1;isDisabled=!1;isSlamStop=!1;isUIVisible=!1;isAutoPlayDisabled=!1;isBuyBonusDisabled=!1;isBetAmountLabelsDisabled=!1;handler;handlerSet=!1;constructor(){Qt(this,{isRunning:C,isDisabled:C,isSlamStop:C,isUIVisible:C,isAutoPlayDisabled:C,isBuyBonusDisabled:C,isBetAmountLabelsDisabled:C,setIsSpinRunning:L,setIsSpinDisabled:L,setIsSlamStop:L,setHandlerOnce:L,setIsUIVisible:L,setIsAutoplayDisabled:L,setIsBuyBonusDisabled:L,setIsBetAmountLabelsDisabled:L,clickHandler:L})}setHandlerOnce(n){if(this.handlerSet){console.error("[SpinButton] handler already set");return}this.handler=n,this.handlerSet=!0}setIsUIVisible(n){this.isUIVisible=n}setIsAutoplayDisabled(n){this.isAutoPlayDisabled=n}setIsBetAmountLabelsDisabled(n){this.isBetAmountLabelsDisabled=n}setIsSpinDisabled(n){this.isDisabled=n}setIsBuyBonusDisabled(n){this.isBuyBonusDisabled=n}clickHandler(){M(),this.handler?.()}setIsSpinRunning(n){this.isRunning=n}setIsSlamStop(n){this.isSlamStop=n}}const st=new wa;class Ea{lastResult={};isBonus=!1;lastWinAmount=0;constructor(){Pe(this)}setLastResult(n){this.lastResult=n}setIsBonus(n){this.isBonus=n}setLastWinAmount(n){this.lastWinAmount=n}}const Ur=new Ea,Na=K(()=>{const{isDisabled:e,isRunning:n,clickHandler:t}=st,{count:r,isStarted:o}=we,{freeSpinsCount:s}=fe;return v.jsx("button",{className:`spin-btn
31
+ Use 'override' annotation for methods overridden by subclass.`)}}var Ro=yr(0),qo=(function(){var e=!1,n={};return Object.defineProperty(n,"0",{set:function(){e=!0}}),Object.create(n)[0]=1,e===!1})(),rn=0,gr=function(){};function Ko(e,n){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,n):e.prototype.__proto__!==void 0?e.prototype.__proto__=n:e.prototype=n}Ko(gr,Array.prototype);var on=(function(e){function n(r,o,s,u){var d;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableArray@"+ne():"ObservableArray"),u===void 0&&(u=!1),d=e.call(this)||this,Oe(function(){var c=new tn(s,o,u,!0);c.proxy_=d,wn(d,S,c),r&&r.length&&d.spliceWithArray(0,0,r),qo&&Object.defineProperty(d,"0",Ro)}),d}Tn(n,e);var t=n.prototype;return t.concat=function(){this[S].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),s.map(function(d){return xt(d)?d.slice():d}))},t[Symbol.iterator]=function(){var r=this,o=0;return sn({next:function(){return o<r.length?{value:r[o++],done:!1}:{done:!0,value:void 0}}})},He(n,[{key:"length",get:function(){return this[S].getArrayLength_()},set:function(o){this[S].setArrayLength_(o)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(gr);Object.entries(Dt).forEach(function(e){var n=e[0],t=e[1];n!=="concat"&&Xe(on.prototype,n,t)});function yr(e){return{enumerable:!1,configurable:!0,get:function(){return this[S].get_(e)},set:function(t){this[S].set_(e,t)}}}function Wo(e){se(on.prototype,""+e,yr(e))}function Ar(e){if(e>rn){for(var n=rn;n<e+100;n++)Wo(n);rn=e}}Ar(1e3);function Xo(e,n,t){return new on(e,n,t)}function Re(e,n){if(typeof e=="object"&&e!==null){if(xt(e))return n!==void 0&&A(23),e[S].atom_;if(ce(e))return e.atom_;if(Ae(e)){if(n===void 0)return e.keysAtom_;var t=e.data_.get(n)||e.hasMap_.get(n);return t||A(25,n,Bt(e)),t}if(Ge(e)){if(!n)return A(26);var r=e[S].values_.get(n);return r||A(27,n,Bt(e)),r}if(Ft(e)||Ot(e)||Ct(e))return e}else if(P(e)&&Ct(e[S]))return e[S];A(28)}function Or(e,n){if(e||A(29),Ft(e)||Ot(e)||Ct(e)||Ae(e)||ce(e))return e;if(e[S])return e[S];A(24,e)}function Bt(e,n){var t;if(n!==void 0)t=Re(e,n);else{if(Le(e))return e.name;Ge(e)||Ae(e)||ce(e)?t=Or(e):t=Re(e)}return t.name_}function Oe(e){var n=Ve(),t=Gt(!0);z();try{return e()}finally{J(),Rt(t),he(n)}}var Sr=ft.toString;function wr(e,n,t){return t===void 0&&(t=-1),an(e,n,t)}function an(e,n,t,r,o){if(e===n)return e!==0||1/e===1/n;if(e==null||n==null)return!1;if(e!==e)return n!==n;var s=typeof e;if(s!=="function"&&s!=="object"&&typeof n!="object")return!1;var u=Sr.call(e);if(u!==Sr.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:+e==0?1/+e===1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=Er(e),n=Er(n);var d=u==="[object Array]";if(!d){if(typeof e!="object"||typeof n!="object")return!1;var c=e.constructor,p=n.constructor;if(c!==p&&!(P(c)&&c instanceof c&&P(p)&&p instanceof p)&&"constructor"in e&&"constructor"in n)return!1}if(t===0)return!1;t<0&&(t=-1),r=r||[],o=o||[];for(var m=r.length;m--;)if(r[m]===e)return o[m]===n;if(r.push(e),o.push(n),d){if(m=e.length,m!==n.length)return!1;for(;m--;)if(!an(e[m],n[m],t-1,r,o))return!1}else{var i=Object.keys(e),a=i.length;if(Object.keys(n).length!==a)return!1;for(var l=0;l<a;l++){var f=i[l];if(!(X(n,f)&&an(e[f],n[f],t-1,r,o)))return!1}}return r.pop(),o.pop(),!0}function Er(e){return xt(e)?e.slice():je(e)||Ae(e)||pe(e)||ce(e)?Array.from(e.entries()):e}var Nr,Zo=((Nr=lt().Iterator)==null?void 0:Nr.prototype)||{};function sn(e){return e[Symbol.iterator]=Yo,Object.assign(Object.create(Zo),e)}function Yo(){return this}function Cr(e){return e instanceof Object&&typeof e.annotationType_=="string"&&P(e.make_)&&P(e.extend_)}if(["Symbol","Map","Set"].forEach(function(e){var n=lt();typeof n[e]>"u"&&A("MobX requires global '"+e+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:_o,extras:{getDebugName:Bt},$mobx:S}),!E.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Qt)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function zo(e){e()}function Jo(e){e||(e=zo,process.env.NODE_ENV!=="production"&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),Co({reactionScheduler:e})}function Qo(e){return ir(e)}var ea=1e4,ta=1e4,na=(function(){function e(n){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=ea),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var o=Date.now();t.registrations.forEach(function(s,u){o-s.registeredAt>=r&&(t.finalize(s.value),t.registrations.delete(u))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(n){this.registrations.delete(n)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,ta))}}),e})(),ra=typeof FinalizationRegistry<"u"?FinalizationRegistry:na,un=new ra(function(e){var n;(n=e.reaction)===null||n===void 0||n.dispose(),e.reaction=null}),it=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lt={exports:{}},ln={};var Tr;function ia(){if(Tr)return ln;Tr=1;var e=E;function n(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function d(i,a){var l=a(),f=r({inst:{value:l,getSnapshot:a}}),h=f[0].inst,b=f[1];return s(function(){h.value=l,h.getSnapshot=a,c(h)&&b({inst:h})},[i,l,a]),o(function(){return c(h)&&b({inst:h}),i(function(){c(h)&&b({inst:h})})},[i]),u(l),l}function c(i){var a=i.getSnapshot;i=i.value;try{var l=a();return!t(i,l)}catch{return!0}}function p(i,a){return a()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return ln.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,ln}var cn={};var Dr;function oa(){return Dr||(Dr=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}function n(l,f){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=f();if(!i){var b=f();s(h,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),i=!0)}b=u({inst:{value:h,getSnapshot:f}});var _=b[0].inst,y=b[1];return c(function(){_.value=h,_.getSnapshot=f,t(_)&&y({inst:_})},[l,h,f]),d(function(){return t(_)&&y({inst:_}),l(function(){t(_)&&y({inst:_})})},[l]),p(h),h}function t(l){var f=l.getSnapshot;l=l.value;try{var h=f();return!s(l,h)}catch{return!0}}function r(l,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,s=typeof Object.is=="function"?Object.is:e,u=o.useState,d=o.useEffect,c=o.useLayoutEffect,p=o.useDebugValue,m=!1,i=!1,a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:n;cn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:a,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),cn}var xr;function aa(){return xr||(xr=1,process.env.NODE_ENV==="production"?Lt.exports=ia():Lt.exports=oa()),Lt.exports}var sa=aa();function Vr(e){e.reaction=new be("observer".concat(e.name),function(){var n;e.stateVersion=Symbol(),(n=e.onStoreChange)===null||n===void 0||n.call(e)})}function ua(e,n){n===void 0&&(n="observed");var t=E.useRef(null);if(!t.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:n,subscribe:function(d){return un.unregister(r),r.onStoreChange=d,r.reaction||(Vr(r),r.stateVersion=Symbol()),function(){var c;r.onStoreChange=null,(c=r.reaction)===null||c===void 0||c.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};t.current=r}var o=t.current;o.reaction||(Vr(o),un.register(t,o,o)),E.useDebugValue(o.reaction,Qo),sa.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot);var s,u;if(o.reaction.track(function(){try{s=e()}catch(d){u=d}}),u)throw u;return s}var fn,dn,la=!0,Br=!0,Lr=typeof Symbol=="function"&&Symbol.for,ca=(dn=(fn=Object.getOwnPropertyDescriptor(function(){},"name"))===null||fn===void 0?void 0:fn.configurable)!==null&&dn!==void 0?dn:!1,Mr=Lr?Symbol.for("react.forward_ref"):typeof E.forwardRef=="function"&&E.forwardRef(function(e){return null}).$$typeof,Pr=Lr?Symbol.for("react.memo"):typeof E.memo=="function"&&E.memo(function(e){return null}).$$typeof;function K(e,n){var t;if(process.env.NODE_ENV,Pr&&e.$$typeof===Pr)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(t=void 0)!==null&&t!==void 0?t:!1,o=e,s=e.displayName||e.name;if(Mr&&e.$$typeof===Mr&&(r=!0,o=e.render,typeof o!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var u=function(d,c){return ua(function(){return o(d,c)},s)};return u.displayName=e.displayName,ca&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,process.env.NODE_ENV!=="production"&&Br&&(Br=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(u=E.forwardRef(u)),u=E.memo(u),da(e,u),process.env.NODE_ENV!=="production"&&Object.defineProperty(u,"contextTypes",{set:function(){var d,c;throw new Error("[mobx-react-lite] `".concat(this.displayName||((d=this.type)===null||d===void 0?void 0:d.displayName)||((c=this.type)===null||c===void 0?void 0:c.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),u}var fa={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function da(e,n){Object.keys(e).forEach(function(t){fa[t]||Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}process.env.NODE_ENV;var _n;Jo(zr.unstable_batchedUpdates),_n=un.finalizeAllImmediately;const _a=({onClick:e,disabled:n=!1,imagePath:t,isAnteBet:r,isBonus:o})=>{const s=E.useMemo(()=>o?"Active":r?"Disable":"Buy Bonus",[o,r]);return v.jsxs("div",{className:"buy-bonus-wrap","aria-hidden":n?"true":"false",children:[t&&v.jsx("div",{className:"bonus-thumb",role:"img","aria-label":"bonus thumbnail",style:{backgroundImage:`url(${t})`}}),v.jsx("button",{className:`buy-bonus ${n?"disabled":""}`,onClick:e,disabled:n,"aria-pressed":n,children:s})]})},Ir=({label:e,value:n})=>v.jsxs("div",{className:"info",children:[v.jsx("span",{className:"label",children:e}),v.jsx("span",{className:"value",children:n})]}),F={bet:"bet",autoplay:"autoplay",settings:"settings",history:"history",buyBonus:"buy_bonus",payTable:"pay_table"},kr={insufficientFunds:"insufficient funds"},pn={primary:{background:"#FBDE38",color:"#1C1B1E"},secondary:{background:"#1C1B1E",color:"#FFFFFF"}},jr=[{name:kr.insufficientFunds,title:"Insufficient Funds",imagePath:"/img_1.png",message:"Your balance is low, please make a deposit",buttons:[{text:"Back",configs:pn.secondary},{text:"Ok",configs:pn.primary}]}],Mt={ante:"ante",buy:"buy"},ot={SKIP_INTRO:"SKIP_INTRO",SOUND_ON:"SOUND_ON",MUSIC_ON:"MUSIC_ON"},vn={Click:"click",BuyBonusClick:"buyBonusClick"};var hn={};var Fr;function pa(){return Fr||(Fr=1,(function(e){(function(){var n=function(){this.init()};n.prototype={init:function(){var i=this||t;return i._counter=1e3,i._html5AudioPool=[],i.html5PoolSize=10,i._codecs={},i._howls=[],i._muted=!1,i._volume=1,i._canPlayEvent="canplaythrough",i._navigator=typeof window<"u"&&window.navigator?window.navigator:null,i.masterGain=null,i.noAudio=!1,i.usingWebAudio=!0,i.autoSuspend=!0,i.ctx=null,i.autoUnlock=!0,i._setup(),i},volume:function(i){var a=this||t;if(i=parseFloat(i),a.ctx||m(),typeof i<"u"&&i>=0&&i<=1){if(a._volume=i,a._muted)return a;a.usingWebAudio&&a.masterGain.gain.setValueAtTime(i,t.ctx.currentTime);for(var l=0;l<a._howls.length;l++)if(!a._howls[l]._webAudio)for(var f=a._howls[l]._getSoundIds(),h=0;h<f.length;h++){var b=a._howls[l]._soundById(f[h]);b&&b._node&&(b._node.volume=b._volume*i)}return a}return a._volume},mute:function(i){var a=this||t;a.ctx||m(),a._muted=i,a.usingWebAudio&&a.masterGain.gain.setValueAtTime(i?0:a._volume,t.ctx.currentTime);for(var l=0;l<a._howls.length;l++)if(!a._howls[l]._webAudio)for(var f=a._howls[l]._getSoundIds(),h=0;h<f.length;h++){var b=a._howls[l]._soundById(f[h]);b&&b._node&&(b._node.muted=i?!0:b._muted)}return a},stop:function(){for(var i=this||t,a=0;a<i._howls.length;a++)i._howls[a].stop();return i},unload:function(){for(var i=this||t,a=i._howls.length-1;a>=0;a--)i._howls[a].unload();return i.usingWebAudio&&i.ctx&&typeof i.ctx.close<"u"&&(i.ctx.close(),i.ctx=null,m()),i},codecs:function(i){return(this||t)._codecs[i.replace(/^x-/,"")]},_setup:function(){var i=this||t;if(i.state=i.ctx&&i.ctx.state||"suspended",i._autoSuspend(),!i.usingWebAudio)if(typeof Audio<"u")try{var a=new Audio;typeof a.oncanplaythrough>"u"&&(i._canPlayEvent="canplay")}catch{i.noAudio=!0}else i.noAudio=!0;try{var a=new Audio;a.muted&&(i.noAudio=!0)}catch{}return i.noAudio||i._setupCodecs(),i},_setupCodecs:function(){var i=this||t,a=null;try{a=typeof Audio<"u"?new Audio:null}catch{return i}if(!a||typeof a.canPlayType!="function")return i;var l=a.canPlayType("audio/mpeg;").replace(/^no$/,""),f=i._navigator?i._navigator.userAgent:"",h=f.match(/OPR\/(\d+)/g),b=h&&parseInt(h[0].split("/")[1],10)<33,_=f.indexOf("Safari")!==-1&&f.indexOf("Chrome")===-1,y=f.match(/Version\/(.*?) /),w=_&&y&&parseInt(y[1],10)<15;return i._codecs={mp3:!!(!b&&(l||a.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!l,opus:!!a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(a.canPlayType('audio/wav; codecs="1"')||a.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!a.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!a.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(a.canPlayType("audio/x-m4b;")||a.canPlayType("audio/m4b;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(a.canPlayType("audio/x-mp4;")||a.canPlayType("audio/mp4;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!w&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!w&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!a.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(a.canPlayType("audio/x-flac;")||a.canPlayType("audio/flac;")).replace(/^no$/,"")},i},_unlockAudio:function(){var i=this||t;if(!(i._audioUnlocked||!i.ctx)){i._audioUnlocked=!1,i.autoUnlock=!1,!i._mobileUnloaded&&i.ctx.sampleRate!==44100&&(i._mobileUnloaded=!0,i.unload()),i._scratchBuffer=i.ctx.createBuffer(1,1,22050);var a=function(l){for(;i._html5AudioPool.length<i.html5PoolSize;)try{var f=new Audio;f._unlocked=!0,i._releaseHtml5Audio(f)}catch{i.noAudio=!0;break}for(var h=0;h<i._howls.length;h++)if(!i._howls[h]._webAudio)for(var b=i._howls[h]._getSoundIds(),_=0;_<b.length;_++){var y=i._howls[h]._soundById(b[_]);y&&y._node&&!y._node._unlocked&&(y._node._unlocked=!0,y._node.load())}i._autoResume();var w=i.ctx.createBufferSource();w.buffer=i._scratchBuffer,w.connect(i.ctx.destination),typeof w.start>"u"?w.noteOn(0):w.start(0),typeof i.ctx.resume=="function"&&i.ctx.resume(),w.onended=function(){w.disconnect(0),i._audioUnlocked=!0,document.removeEventListener("touchstart",a,!0),document.removeEventListener("touchend",a,!0),document.removeEventListener("click",a,!0),document.removeEventListener("keydown",a,!0);for(var O=0;O<i._howls.length;O++)i._howls[O]._emit("unlock")}};return document.addEventListener("touchstart",a,!0),document.addEventListener("touchend",a,!0),document.addEventListener("click",a,!0),document.addEventListener("keydown",a,!0),i}},_obtainHtml5Audio:function(){var i=this||t;if(i._html5AudioPool.length)return i._html5AudioPool.pop();var a=new Audio().play();return a&&typeof Promise<"u"&&(a instanceof Promise||typeof a.then=="function")&&a.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(i){var a=this||t;return i._unlocked&&a._html5AudioPool.push(i),a},_autoSuspend:function(){var i=this;if(!(!i.autoSuspend||!i.ctx||typeof i.ctx.suspend>"u"||!t.usingWebAudio)){for(var a=0;a<i._howls.length;a++)if(i._howls[a]._webAudio){for(var l=0;l<i._howls[a]._sounds.length;l++)if(!i._howls[a]._sounds[l]._paused)return i}return i._suspendTimer&&clearTimeout(i._suspendTimer),i._suspendTimer=setTimeout(function(){if(i.autoSuspend){i._suspendTimer=null,i.state="suspending";var f=function(){i.state="suspended",i._resumeAfterSuspend&&(delete i._resumeAfterSuspend,i._autoResume())};i.ctx.suspend().then(f,f)}},3e4),i}},_autoResume:function(){var i=this;if(!(!i.ctx||typeof i.ctx.resume>"u"||!t.usingWebAudio))return i.state==="running"&&i.ctx.state!=="interrupted"&&i._suspendTimer?(clearTimeout(i._suspendTimer),i._suspendTimer=null):i.state==="suspended"||i.state==="running"&&i.ctx.state==="interrupted"?(i.ctx.resume().then(function(){i.state="running";for(var a=0;a<i._howls.length;a++)i._howls[a]._emit("resume")}),i._suspendTimer&&(clearTimeout(i._suspendTimer),i._suspendTimer=null)):i.state==="suspending"&&(i._resumeAfterSuspend=!0),i}};var t=new n,r=function(i){var a=this;if(!i.src||i.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}a.init(i)};r.prototype={init:function(i){var a=this;return t.ctx||m(),a._autoplay=i.autoplay||!1,a._format=typeof i.format!="string"?i.format:[i.format],a._html5=i.html5||!1,a._muted=i.mute||!1,a._loop=i.loop||!1,a._pool=i.pool||5,a._preload=typeof i.preload=="boolean"||i.preload==="metadata"?i.preload:!0,a._rate=i.rate||1,a._sprite=i.sprite||{},a._src=typeof i.src!="string"?i.src:[i.src],a._volume=i.volume!==void 0?i.volume:1,a._xhr={method:i.xhr&&i.xhr.method?i.xhr.method:"GET",headers:i.xhr&&i.xhr.headers?i.xhr.headers:null,withCredentials:i.xhr&&i.xhr.withCredentials?i.xhr.withCredentials:!1},a._duration=0,a._state="unloaded",a._sounds=[],a._endTimers={},a._queue=[],a._playLock=!1,a._onend=i.onend?[{fn:i.onend}]:[],a._onfade=i.onfade?[{fn:i.onfade}]:[],a._onload=i.onload?[{fn:i.onload}]:[],a._onloaderror=i.onloaderror?[{fn:i.onloaderror}]:[],a._onplayerror=i.onplayerror?[{fn:i.onplayerror}]:[],a._onpause=i.onpause?[{fn:i.onpause}]:[],a._onplay=i.onplay?[{fn:i.onplay}]:[],a._onstop=i.onstop?[{fn:i.onstop}]:[],a._onmute=i.onmute?[{fn:i.onmute}]:[],a._onvolume=i.onvolume?[{fn:i.onvolume}]:[],a._onrate=i.onrate?[{fn:i.onrate}]:[],a._onseek=i.onseek?[{fn:i.onseek}]:[],a._onunlock=i.onunlock?[{fn:i.onunlock}]:[],a._onresume=[],a._webAudio=t.usingWebAudio&&!a._html5,typeof t.ctx<"u"&&t.ctx&&t.autoUnlock&&t._unlockAudio(),t._howls.push(a),a._autoplay&&a._queue.push({event:"play",action:function(){a.play()}}),a._preload&&a._preload!=="none"&&a.load(),a},load:function(){var i=this,a=null;if(t.noAudio){i._emit("loaderror",null,"No audio support.");return}typeof i._src=="string"&&(i._src=[i._src]);for(var l=0;l<i._src.length;l++){var f,h;if(i._format&&i._format[l])f=i._format[l];else{if(h=i._src[l],typeof h!="string"){i._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}f=/^data:audio\/([^;,]+);/i.exec(h),f||(f=/\.([^.]+)$/.exec(h.split("?",1)[0])),f&&(f=f[1].toLowerCase())}if(f||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),f&&t.codecs(f)){a=i._src[l];break}}if(!a){i._emit("loaderror",null,"No codec support for selected audio sources.");return}return i._src=a,i._state="loading",window.location.protocol==="https:"&&a.slice(0,5)==="http:"&&(i._html5=!0,i._webAudio=!1),new o(i),i._webAudio&&u(i),i},play:function(i,a){var l=this,f=null;if(typeof i=="number")f=i,i=null;else{if(typeof i=="string"&&l._state==="loaded"&&!l._sprite[i])return null;if(typeof i>"u"&&(i="__default",!l._playLock)){for(var h=0,b=0;b<l._sounds.length;b++)l._sounds[b]._paused&&!l._sounds[b]._ended&&(h++,f=l._sounds[b]._id);h===1?i=null:f=null}}var _=f?l._soundById(f):l._inactiveSound();if(!_)return null;if(f&&!i&&(i=_._sprite||"__default"),l._state!=="loaded"){_._sprite=i,_._ended=!1;var y=_._id;return l._queue.push({event:"play",action:function(){l.play(y)}}),y}if(f&&!_._paused)return a||l._loadQueue("play"),_._id;l._webAudio&&t._autoResume();var w=Math.max(0,_._seek>0?_._seek:l._sprite[i][0]/1e3),O=Math.max(0,(l._sprite[i][0]+l._sprite[i][1])/1e3-w),D=O*1e3/Math.abs(_._rate),V=l._sprite[i][0]/1e3,de=(l._sprite[i][0]+l._sprite[i][1])/1e3;_._sprite=i,_._ended=!1;var _e=function(){_._paused=!1,_._seek=w,_._start=V,_._stop=de,_._loop=!!(_._loop||l._sprite[i][2])};if(w>=de){l._ended(_);return}var B=_._node;if(l._webAudio){var Wr=function(){l._playLock=!1,_e(),l._refreshBuffer(_);var Ke=_._muted||l._muted?0:_._volume;B.gain.setValueAtTime(Ke,t.ctx.currentTime),_._playStart=t.ctx.currentTime,typeof B.bufferSource.start>"u"?_._loop?B.bufferSource.noteGrainOn(0,w,86400):B.bufferSource.noteGrainOn(0,w,O):_._loop?B.bufferSource.start(0,w,86400):B.bufferSource.start(0,w,O),D!==1/0&&(l._endTimers[_._id]=setTimeout(l._ended.bind(l,_),D)),a||setTimeout(function(){l._emit("play",_._id),l._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?Wr():(l._playLock=!0,l.once("resume",Wr),l._clearTimer(_._id))}else{var Xr=function(){B.currentTime=w,B.muted=_._muted||l._muted||t._muted||B.muted,B.volume=_._volume*t.volume(),B.playbackRate=_._rate;try{var Ke=B.play();if(Ke&&typeof Promise<"u"&&(Ke instanceof Promise||typeof Ke.then=="function")?(l._playLock=!0,_e(),Ke.then(function(){l._playLock=!1,B._unlocked=!0,a?l._loadQueue():l._emit("play",_._id)}).catch(function(){l._playLock=!1,l._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),_._ended=!0,_._paused=!0})):a||(l._playLock=!1,_e(),l._emit("play",_._id)),B.playbackRate=_._rate,B.paused){l._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}i!=="__default"||_._loop?l._endTimers[_._id]=setTimeout(l._ended.bind(l,_),D):(l._endTimers[_._id]=function(){l._ended(_),B.removeEventListener("ended",l._endTimers[_._id],!1)},B.addEventListener("ended",l._endTimers[_._id],!1))}catch(Ya){l._emit("playerror",_._id,Ya)}};B.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(B.src=l._src,B.load());var Za=window&&window.ejecta||!B.readyState&&t._navigator.isCocoonJS;if(B.readyState>=3||Za)Xr();else{l._playLock=!0,l._state="loading";var Zr=function(){l._state="loaded",Xr(),B.removeEventListener(t._canPlayEvent,Zr,!1)};B.addEventListener(t._canPlayEvent,Zr,!1),l._clearTimer(_._id)}}return _._id},pause:function(i){var a=this;if(a._state!=="loaded"||a._playLock)return a._queue.push({event:"pause",action:function(){a.pause(i)}}),a;for(var l=a._getSoundIds(i),f=0;f<l.length;f++){a._clearTimer(l[f]);var h=a._soundById(l[f]);if(h&&!h._paused&&(h._seek=a.seek(l[f]),h._rateSeek=0,h._paused=!0,a._stopFade(l[f]),h._node))if(a._webAudio){if(!h._node.bufferSource)continue;typeof h._node.bufferSource.stop>"u"?h._node.bufferSource.noteOff(0):h._node.bufferSource.stop(0),a._cleanBuffer(h._node)}else(!isNaN(h._node.duration)||h._node.duration===1/0)&&h._node.pause();arguments[1]||a._emit("pause",h?h._id:null)}return a},stop:function(i,a){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"stop",action:function(){l.stop(i)}}),l;for(var f=l._getSoundIds(i),h=0;h<f.length;h++){l._clearTimer(f[h]);var b=l._soundById(f[h]);b&&(b._seek=b._start||0,b._rateSeek=0,b._paused=!0,b._ended=!0,l._stopFade(f[h]),b._node&&(l._webAudio?b._node.bufferSource&&(typeof b._node.bufferSource.stop>"u"?b._node.bufferSource.noteOff(0):b._node.bufferSource.stop(0),l._cleanBuffer(b._node)):(!isNaN(b._node.duration)||b._node.duration===1/0)&&(b._node.currentTime=b._start||0,b._node.pause(),b._node.duration===1/0&&l._clearSound(b._node))),a||l._emit("stop",b._id))}return l},mute:function(i,a){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"mute",action:function(){l.mute(i,a)}}),l;if(typeof a>"u")if(typeof i=="boolean")l._muted=i;else return l._muted;for(var f=l._getSoundIds(a),h=0;h<f.length;h++){var b=l._soundById(f[h]);b&&(b._muted=i,b._interval&&l._stopFade(b._id),l._webAudio&&b._node?b._node.gain.setValueAtTime(i?0:b._volume,t.ctx.currentTime):b._node&&(b._node.muted=t._muted?!0:i),l._emit("mute",b._id))}return l},volume:function(){var i=this,a=arguments,l,f;if(a.length===0)return i._volume;if(a.length===1||a.length===2&&typeof a[1]>"u"){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?f=parseInt(a[0],10):l=parseFloat(a[0])}else a.length>=2&&(l=parseFloat(a[0]),f=parseInt(a[1],10));var _;if(typeof l<"u"&&l>=0&&l<=1){if(i._state!=="loaded"||i._playLock)return i._queue.push({event:"volume",action:function(){i.volume.apply(i,a)}}),i;typeof f>"u"&&(i._volume=l),f=i._getSoundIds(f);for(var y=0;y<f.length;y++)_=i._soundById(f[y]),_&&(_._volume=l,a[2]||i._stopFade(f[y]),i._webAudio&&_._node&&!_._muted?_._node.gain.setValueAtTime(l,t.ctx.currentTime):_._node&&!_._muted&&(_._node.volume=l*t.volume()),i._emit("volume",_._id))}else return _=f?i._soundById(f):i._sounds[0],_?_._volume:0;return i},fade:function(i,a,l,f){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"fade",action:function(){h.fade(i,a,l,f)}}),h;i=Math.min(Math.max(0,parseFloat(i)),1),a=Math.min(Math.max(0,parseFloat(a)),1),l=parseFloat(l),h.volume(i,f);for(var b=h._getSoundIds(f),_=0;_<b.length;_++){var y=h._soundById(b[_]);if(y){if(f||h._stopFade(b[_]),h._webAudio&&!y._muted){var w=t.ctx.currentTime,O=w+l/1e3;y._volume=i,y._node.gain.setValueAtTime(i,w),y._node.gain.linearRampToValueAtTime(a,O)}h._startFadeInterval(y,i,a,l,b[_],typeof f>"u")}}return h},_startFadeInterval:function(i,a,l,f,h,b){var _=this,y=a,w=l-a,O=Math.abs(w/.01),D=Math.max(4,O>0?f/O:f),V=Date.now();i._fadeTo=l,i._interval=setInterval(function(){var de=(Date.now()-V)/f;V=Date.now(),y+=w*de,y=Math.round(y*100)/100,w<0?y=Math.max(l,y):y=Math.min(l,y),_._webAudio?i._volume=y:_.volume(y,i._id,!0),b&&(_._volume=y),(l<a&&y<=l||l>a&&y>=l)&&(clearInterval(i._interval),i._interval=null,i._fadeTo=null,_.volume(l,i._id),_._emit("fade",i._id))},D)},_stopFade:function(i){var a=this,l=a._soundById(i);return l&&l._interval&&(a._webAudio&&l._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(l._interval),l._interval=null,a.volume(l._fadeTo,i),l._fadeTo=null,a._emit("fade",i)),a},loop:function(){var i=this,a=arguments,l,f,h;if(a.length===0)return i._loop;if(a.length===1)if(typeof a[0]=="boolean")l=a[0],i._loop=l;else return h=i._soundById(parseInt(a[0],10)),h?h._loop:!1;else a.length===2&&(l=a[0],f=parseInt(a[1],10));for(var b=i._getSoundIds(f),_=0;_<b.length;_++)h=i._soundById(b[_]),h&&(h._loop=l,i._webAudio&&h._node&&h._node.bufferSource&&(h._node.bufferSource.loop=l,l&&(h._node.bufferSource.loopStart=h._start||0,h._node.bufferSource.loopEnd=h._stop,i.playing(b[_])&&(i.pause(b[_],!0),i.play(b[_],!0)))));return i},rate:function(){var i=this,a=arguments,l,f;if(a.length===0)f=i._sounds[0]._id;else if(a.length===1){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?f=parseInt(a[0],10):l=parseFloat(a[0])}else a.length===2&&(l=parseFloat(a[0]),f=parseInt(a[1],10));var _;if(typeof l=="number"){if(i._state!=="loaded"||i._playLock)return i._queue.push({event:"rate",action:function(){i.rate.apply(i,a)}}),i;typeof f>"u"&&(i._rate=l),f=i._getSoundIds(f);for(var y=0;y<f.length;y++)if(_=i._soundById(f[y]),_){i.playing(f[y])&&(_._rateSeek=i.seek(f[y]),_._playStart=i._webAudio?t.ctx.currentTime:_._playStart),_._rate=l,i._webAudio&&_._node&&_._node.bufferSource?_._node.bufferSource.playbackRate.setValueAtTime(l,t.ctx.currentTime):_._node&&(_._node.playbackRate=l);var w=i.seek(f[y]),O=(i._sprite[_._sprite][0]+i._sprite[_._sprite][1])/1e3-w,D=O*1e3/Math.abs(_._rate);(i._endTimers[f[y]]||!_._paused)&&(i._clearTimer(f[y]),i._endTimers[f[y]]=setTimeout(i._ended.bind(i,_),D)),i._emit("rate",_._id)}}else return _=i._soundById(f),_?_._rate:i._rate;return i},seek:function(){var i=this,a=arguments,l,f;if(a.length===0)i._sounds.length&&(f=i._sounds[0]._id);else if(a.length===1){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?f=parseInt(a[0],10):i._sounds.length&&(f=i._sounds[0]._id,l=parseFloat(a[0]))}else a.length===2&&(l=parseFloat(a[0]),f=parseInt(a[1],10));if(typeof f>"u")return 0;if(typeof l=="number"&&(i._state!=="loaded"||i._playLock))return i._queue.push({event:"seek",action:function(){i.seek.apply(i,a)}}),i;var _=i._soundById(f);if(_)if(typeof l=="number"&&l>=0){var y=i.playing(f);y&&i.pause(f,!0),_._seek=l,_._ended=!1,i._clearTimer(f),!i._webAudio&&_._node&&!isNaN(_._node.duration)&&(_._node.currentTime=l);var w=function(){y&&i.play(f,!0),i._emit("seek",f)};if(y&&!i._webAudio){var O=function(){i._playLock?setTimeout(O,0):w()};setTimeout(O,0)}else w()}else if(i._webAudio){var D=i.playing(f)?t.ctx.currentTime-_._playStart:0,V=_._rateSeek?_._rateSeek-_._seek:0;return _._seek+(V+D*Math.abs(_._rate))}else return _._node.currentTime;return i},playing:function(i){var a=this;if(typeof i=="number"){var l=a._soundById(i);return l?!l._paused:!1}for(var f=0;f<a._sounds.length;f++)if(!a._sounds[f]._paused)return!0;return!1},duration:function(i){var a=this,l=a._duration,f=a._soundById(i);return f&&(l=a._sprite[f._sprite][1]/1e3),l},state:function(){return this._state},unload:function(){for(var i=this,a=i._sounds,l=0;l<a.length;l++)a[l]._paused||i.stop(a[l]._id),i._webAudio||(i._clearSound(a[l]._node),a[l]._node.removeEventListener("error",a[l]._errorFn,!1),a[l]._node.removeEventListener(t._canPlayEvent,a[l]._loadFn,!1),a[l]._node.removeEventListener("ended",a[l]._endFn,!1),t._releaseHtml5Audio(a[l]._node)),delete a[l]._node,i._clearTimer(a[l]._id);var f=t._howls.indexOf(i);f>=0&&t._howls.splice(f,1);var h=!0;for(l=0;l<t._howls.length;l++)if(t._howls[l]._src===i._src||i._src.indexOf(t._howls[l]._src)>=0){h=!1;break}return s&&h&&delete s[i._src],t.noAudio=!1,i._state="unloaded",i._sounds=[],i=null,null},on:function(i,a,l,f){var h=this,b=h["_on"+i];return typeof a=="function"&&b.push(f?{id:l,fn:a,once:f}:{id:l,fn:a}),h},off:function(i,a,l){var f=this,h=f["_on"+i],b=0;if(typeof a=="number"&&(l=a,a=null),a||l)for(b=0;b<h.length;b++){var _=l===h[b].id;if(a===h[b].fn&&_||!a&&_){h.splice(b,1);break}}else if(i)f["_on"+i]=[];else{var y=Object.keys(f);for(b=0;b<y.length;b++)y[b].indexOf("_on")===0&&Array.isArray(f[y[b]])&&(f[y[b]]=[])}return f},once:function(i,a,l){var f=this;return f.on(i,a,l,1),f},_emit:function(i,a,l){for(var f=this,h=f["_on"+i],b=h.length-1;b>=0;b--)(!h[b].id||h[b].id===a||i==="load")&&(setTimeout((function(_){_.call(this,a,l)}).bind(f,h[b].fn),0),h[b].once&&f.off(i,h[b].fn,h[b].id));return f._loadQueue(i),f},_loadQueue:function(i){var a=this;if(a._queue.length>0){var l=a._queue[0];l.event===i&&(a._queue.shift(),a._loadQueue()),i||l.action()}return a},_ended:function(i){var a=this,l=i._sprite;if(!a._webAudio&&i._node&&!i._node.paused&&!i._node.ended&&i._node.currentTime<i._stop)return setTimeout(a._ended.bind(a,i),100),a;var f=!!(i._loop||a._sprite[l][2]);if(a._emit("end",i._id),!a._webAudio&&f&&a.stop(i._id,!0).play(i._id),a._webAudio&&f){a._emit("play",i._id),i._seek=i._start||0,i._rateSeek=0,i._playStart=t.ctx.currentTime;var h=(i._stop-i._start)*1e3/Math.abs(i._rate);a._endTimers[i._id]=setTimeout(a._ended.bind(a,i),h)}return a._webAudio&&!f&&(i._paused=!0,i._ended=!0,i._seek=i._start||0,i._rateSeek=0,a._clearTimer(i._id),a._cleanBuffer(i._node),t._autoSuspend()),!a._webAudio&&!f&&a.stop(i._id,!0),a},_clearTimer:function(i){var a=this;if(a._endTimers[i]){if(typeof a._endTimers[i]!="function")clearTimeout(a._endTimers[i]);else{var l=a._soundById(i);l&&l._node&&l._node.removeEventListener("ended",a._endTimers[i],!1)}delete a._endTimers[i]}return a},_soundById:function(i){for(var a=this,l=0;l<a._sounds.length;l++)if(i===a._sounds[l]._id)return a._sounds[l];return null},_inactiveSound:function(){var i=this;i._drain();for(var a=0;a<i._sounds.length;a++)if(i._sounds[a]._ended)return i._sounds[a].reset();return new o(i)},_drain:function(){var i=this,a=i._pool,l=0,f=0;if(!(i._sounds.length<a)){for(f=0;f<i._sounds.length;f++)i._sounds[f]._ended&&l++;for(f=i._sounds.length-1;f>=0;f--){if(l<=a)return;i._sounds[f]._ended&&(i._webAudio&&i._sounds[f]._node&&i._sounds[f]._node.disconnect(0),i._sounds.splice(f,1),l--)}}},_getSoundIds:function(i){var a=this;if(typeof i>"u"){for(var l=[],f=0;f<a._sounds.length;f++)l.push(a._sounds[f]._id);return l}else return[i]},_refreshBuffer:function(i){var a=this;return i._node.bufferSource=t.ctx.createBufferSource(),i._node.bufferSource.buffer=s[a._src],i._panner?i._node.bufferSource.connect(i._panner):i._node.bufferSource.connect(i._node),i._node.bufferSource.loop=i._loop,i._loop&&(i._node.bufferSource.loopStart=i._start||0,i._node.bufferSource.loopEnd=i._stop||0),i._node.bufferSource.playbackRate.setValueAtTime(i._rate,t.ctx.currentTime),a},_cleanBuffer:function(i){var a=this,l=t._navigator&&t._navigator.vendor.indexOf("Apple")>=0;if(!i.bufferSource)return a;if(t._scratchBuffer&&i.bufferSource&&(i.bufferSource.onended=null,i.bufferSource.disconnect(0),l))try{i.bufferSource.buffer=t._scratchBuffer}catch{}return i.bufferSource=null,a},_clearSound:function(i){var a=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);a||(i.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var o=function(i){this._parent=i,this.init()};o.prototype={init:function(){var i=this,a=i._parent;return i._muted=a._muted,i._loop=a._loop,i._volume=a._volume,i._rate=a._rate,i._seek=0,i._paused=!0,i._ended=!0,i._sprite="__default",i._id=++t._counter,a._sounds.push(i),i.create(),i},create:function(){var i=this,a=i._parent,l=t._muted||i._muted||i._parent._muted?0:i._volume;return a._webAudio?(i._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),i._node.gain.setValueAtTime(l,t.ctx.currentTime),i._node.paused=!0,i._node.connect(t.masterGain)):t.noAudio||(i._node=t._obtainHtml5Audio(),i._errorFn=i._errorListener.bind(i),i._node.addEventListener("error",i._errorFn,!1),i._loadFn=i._loadListener.bind(i),i._node.addEventListener(t._canPlayEvent,i._loadFn,!1),i._endFn=i._endListener.bind(i),i._node.addEventListener("ended",i._endFn,!1),i._node.src=a._src,i._node.preload=a._preload===!0?"auto":a._preload,i._node.volume=l*t.volume(),i._node.load()),i},reset:function(){var i=this,a=i._parent;return i._muted=a._muted,i._loop=a._loop,i._volume=a._volume,i._rate=a._rate,i._seek=0,i._rateSeek=0,i._paused=!0,i._ended=!0,i._sprite="__default",i._id=++t._counter,i},_errorListener:function(){var i=this;i._parent._emit("loaderror",i._id,i._node.error?i._node.error.code:0),i._node.removeEventListener("error",i._errorFn,!1)},_loadListener:function(){var i=this,a=i._parent;a._duration=Math.ceil(i._node.duration*10)/10,Object.keys(a._sprite).length===0&&(a._sprite={__default:[0,a._duration*1e3]}),a._state!=="loaded"&&(a._state="loaded",a._emit("load"),a._loadQueue()),i._node.removeEventListener(t._canPlayEvent,i._loadFn,!1)},_endListener:function(){var i=this,a=i._parent;a._duration===1/0&&(a._duration=Math.ceil(i._node.duration*10)/10,a._sprite.__default[1]===1/0&&(a._sprite.__default[1]=a._duration*1e3),a._ended(i)),i._node.removeEventListener("ended",i._endFn,!1)}};var s={},u=function(i){var a=i._src;if(s[a]){i._duration=s[a].duration,p(i);return}if(/^data:[^;]+;base64,/.test(a)){for(var l=atob(a.split(",")[1]),f=new Uint8Array(l.length),h=0;h<l.length;++h)f[h]=l.charCodeAt(h);c(f.buffer,i)}else{var b=new XMLHttpRequest;b.open(i._xhr.method,a,!0),b.withCredentials=i._xhr.withCredentials,b.responseType="arraybuffer",i._xhr.headers&&Object.keys(i._xhr.headers).forEach(function(_){b.setRequestHeader(_,i._xhr.headers[_])}),b.onload=function(){var _=(b.status+"")[0];if(_!=="0"&&_!=="2"&&_!=="3"){i._emit("loaderror",null,"Failed loading audio file with status: "+b.status+".");return}c(b.response,i)},b.onerror=function(){i._webAudio&&(i._html5=!0,i._webAudio=!1,i._sounds=[],delete s[a],i.load())},d(b)}},d=function(i){try{i.send()}catch{i.onerror()}},c=function(i,a){var l=function(){a._emit("loaderror",null,"Decoding audio data failed.")},f=function(h){h&&a._sounds.length>0?(s[a._src]=h,p(a,h)):l()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(i).then(f).catch(l):t.ctx.decodeAudioData(i,f,l)},p=function(i,a){a&&!i._duration&&(i._duration=a.duration),Object.keys(i._sprite).length===0&&(i._sprite={__default:[0,i._duration*1e3]}),i._state!=="loaded"&&(i._state="loaded",i._emit("load"),i._loadQueue())},m=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var i=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),a=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),l=a?parseInt(a[1],10):null;if(i&&l&&l<9){var f=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!f&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};e.Howler=t,e.Howl=r,typeof it<"u"?(it.HowlerGlobal=n,it.Howler=t,it.Howl=r,it.Sound=o):typeof window<"u"&&(window.HowlerGlobal=n,window.Howler=t,window.Howl=r,window.Sound=o)})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var r=this;if(!r.ctx||!r.ctx.listener)return r;for(var o=r._howls.length-1;o>=0;o--)r._howls[o].stereo(t);return r},HowlerGlobal.prototype.pos=function(t,r,o){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(r=typeof r!="number"?s._pos[1]:r,o=typeof o!="number"?s._pos[2]:o,typeof t=="number")s._pos=[t,r,o],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(t,r,o,s,u,d){var c=this;if(!c.ctx||!c.ctx.listener)return c;var p=c._orientation;if(r=typeof r!="number"?p[1]:r,o=typeof o!="number"?p[2]:o,s=typeof s!="number"?p[3]:s,u=typeof u!="number"?p[4]:u,d=typeof d!="number"?p[5]:d,typeof t=="number")c._orientation=[t,r,o,s,u,d],typeof c.ctx.listener.forwardX<"u"?(c.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),c.ctx.listener.forwardY.setTargetAtTime(r,Howler.ctx.currentTime,.1),c.ctx.listener.forwardZ.setTargetAtTime(o,Howler.ctx.currentTime,.1),c.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),c.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),c.ctx.listener.upZ.setTargetAtTime(d,Howler.ctx.currentTime,.1)):c.ctx.listener.setOrientation(t,r,o,s,u,d);else return p;return c},Howl.prototype.init=(function(t){return function(r){var o=this;return o._orientation=r.orientation||[1,0,0],o._stereo=r.stereo||null,o._pos=r.pos||null,o._pannerAttr={coneInnerAngle:typeof r.coneInnerAngle<"u"?r.coneInnerAngle:360,coneOuterAngle:typeof r.coneOuterAngle<"u"?r.coneOuterAngle:360,coneOuterGain:typeof r.coneOuterGain<"u"?r.coneOuterGain:0,distanceModel:typeof r.distanceModel<"u"?r.distanceModel:"inverse",maxDistance:typeof r.maxDistance<"u"?r.maxDistance:1e4,panningModel:typeof r.panningModel<"u"?r.panningModel:"HRTF",refDistance:typeof r.refDistance<"u"?r.refDistance:1,rolloffFactor:typeof r.rolloffFactor<"u"?r.rolloffFactor:1},o._onstereo=r.onstereo?[{fn:r.onstereo}]:[],o._onpos=r.onpos?[{fn:r.onpos}]:[],o._onorientation=r.onorientation?[{fn:r.onorientation}]:[],t.call(this,r)}})(Howl.prototype.init),Howl.prototype.stereo=function(t,r){var o=this;if(!o._webAudio)return o;if(o._state!=="loaded")return o._queue.push({event:"stereo",action:function(){o.stereo(t,r)}}),o;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof r>"u")if(typeof t=="number")o._stereo=t,o._pos=[t,0,0];else return o._stereo;for(var u=o._getSoundIds(r),d=0;d<u.length;d++){var c=o._soundById(u[d]);if(c)if(typeof t=="number")c._stereo=t,c._pos=[t,0,0],c._node&&(c._pannerAttr.panningModel="equalpower",(!c._panner||!c._panner.pan)&&n(c,s),s==="spatial"?typeof c._panner.positionX<"u"?(c._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),c._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),c._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):c._panner.setPosition(t,0,0):c._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),o._emit("stereo",c._id);else return c._stereo}return o},Howl.prototype.pos=function(t,r,o,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"pos",action:function(){u.pos(t,r,o,s)}}),u;if(r=typeof r!="number"?0:r,o=typeof o!="number"?-.5:o,typeof s>"u")if(typeof t=="number")u._pos=[t,r,o];else return u._pos;for(var d=u._getSoundIds(s),c=0;c<d.length;c++){var p=u._soundById(d[c]);if(p)if(typeof t=="number")p._pos=[t,r,o],p._node&&((!p._panner||p._panner.pan)&&n(p,"spatial"),typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(o,Howler.ctx.currentTime)):p._panner.setPosition(t,r,o)),u._emit("pos",p._id);else return p._pos}return u},Howl.prototype.orientation=function(t,r,o,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"orientation",action:function(){u.orientation(t,r,o,s)}}),u;if(r=typeof r!="number"?u._orientation[1]:r,o=typeof o!="number"?u._orientation[2]:o,typeof s>"u")if(typeof t=="number")u._orientation=[t,r,o];else return u._orientation;for(var d=u._getSoundIds(s),c=0;c<d.length;c++){var p=u._soundById(d[c]);if(p)if(typeof t=="number")p._orientation=[t,r,o],p._node&&(p._panner||(p._pos||(p._pos=u._pos||[0,0,-.5]),n(p,"spatial")),typeof p._panner.orientationX<"u"?(p._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),p._panner.orientationY.setValueAtTime(r,Howler.ctx.currentTime),p._panner.orientationZ.setValueAtTime(o,Howler.ctx.currentTime)):p._panner.setOrientation(t,r,o)),u._emit("orientation",p._id);else return p._orientation}return u},Howl.prototype.pannerAttr=function(){var t=this,r=arguments,o,s,u;if(!t._webAudio)return t;if(r.length===0)return t._pannerAttr;if(r.length===1)if(typeof r[0]=="object")o=r[0],typeof s>"u"&&(o.pannerAttr||(o.pannerAttr={coneInnerAngle:o.coneInnerAngle,coneOuterAngle:o.coneOuterAngle,coneOuterGain:o.coneOuterGain,distanceModel:o.distanceModel,maxDistance:o.maxDistance,refDistance:o.refDistance,rolloffFactor:o.rolloffFactor,panningModel:o.panningModel}),t._pannerAttr={coneInnerAngle:typeof o.pannerAttr.coneInnerAngle<"u"?o.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof o.pannerAttr.coneOuterAngle<"u"?o.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof o.pannerAttr.coneOuterGain<"u"?o.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof o.pannerAttr.distanceModel<"u"?o.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof o.pannerAttr.maxDistance<"u"?o.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof o.pannerAttr.refDistance<"u"?o.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof o.pannerAttr.rolloffFactor<"u"?o.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof o.pannerAttr.panningModel<"u"?o.pannerAttr.panningModel:t._panningModel});else return u=t._soundById(parseInt(r[0],10)),u?u._pannerAttr:t._pannerAttr;else r.length===2&&(o=r[0],s=parseInt(r[1],10));for(var d=t._getSoundIds(s),c=0;c<d.length;c++)if(u=t._soundById(d[c]),u){var p=u._pannerAttr;p={coneInnerAngle:typeof o.coneInnerAngle<"u"?o.coneInnerAngle:p.coneInnerAngle,coneOuterAngle:typeof o.coneOuterAngle<"u"?o.coneOuterAngle:p.coneOuterAngle,coneOuterGain:typeof o.coneOuterGain<"u"?o.coneOuterGain:p.coneOuterGain,distanceModel:typeof o.distanceModel<"u"?o.distanceModel:p.distanceModel,maxDistance:typeof o.maxDistance<"u"?o.maxDistance:p.maxDistance,refDistance:typeof o.refDistance<"u"?o.refDistance:p.refDistance,rolloffFactor:typeof o.rolloffFactor<"u"?o.rolloffFactor:p.rolloffFactor,panningModel:typeof o.panningModel<"u"?o.panningModel:p.panningModel};var m=u._panner;m||(u._pos||(u._pos=t._pos||[0,0,-.5]),n(u,"spatial"),m=u._panner),m.coneInnerAngle=p.coneInnerAngle,m.coneOuterAngle=p.coneOuterAngle,m.coneOuterGain=p.coneOuterGain,m.distanceModel=p.distanceModel,m.maxDistance=p.maxDistance,m.refDistance=p.refDistance,m.rolloffFactor=p.rolloffFactor,m.panningModel=p.panningModel}return t},Sound.prototype.init=(function(t){return function(){var r=this,o=r._parent;r._orientation=o._orientation,r._stereo=o._stereo,r._pos=o._pos,r._pannerAttr=o._pannerAttr,t.call(this),r._stereo?o.stereo(r._stereo):r._pos&&o.pos(r._pos[0],r._pos[1],r._pos[2],r._id)}})(Sound.prototype.init),Sound.prototype.reset=(function(t){return function(){var r=this,o=r._parent;return r._orientation=o._orientation,r._stereo=o._stereo,r._pos=o._pos,r._pannerAttr=o._pannerAttr,r._stereo?o.stereo(r._stereo):r._pos?o.pos(r._pos[0],r._pos[1],r._pos[2],r._id):r._panner&&(r._panner.disconnect(0),r._panner=void 0,o._refreshBuffer(r)),t.call(this)}})(Sound.prototype.reset);var n=function(t,r){r=r||"spatial",r==="spatial"?(t._panner=Howler.ctx.createPanner(),t._panner.coneInnerAngle=t._pannerAttr.coneInnerAngle,t._panner.coneOuterAngle=t._pannerAttr.coneOuterAngle,t._panner.coneOuterGain=t._pannerAttr.coneOuterGain,t._panner.distanceModel=t._pannerAttr.distanceModel,t._panner.maxDistance=t._pannerAttr.maxDistance,t._panner.refDistance=t._pannerAttr.refDistance,t._panner.rolloffFactor=t._pannerAttr.rolloffFactor,t._panner.panningModel=t._pannerAttr.panningModel,typeof t._panner.positionX<"u"?(t._panner.positionX.setValueAtTime(t._pos[0],Howler.ctx.currentTime),t._panner.positionY.setValueAtTime(t._pos[1],Howler.ctx.currentTime),t._panner.positionZ.setValueAtTime(t._pos[2],Howler.ctx.currentTime)):t._panner.setPosition(t._pos[0],t._pos[1],t._pos[2]),typeof t._panner.orientationX<"u"?(t._panner.orientationX.setValueAtTime(t._orientation[0],Howler.ctx.currentTime),t._panner.orientationY.setValueAtTime(t._orientation[1],Howler.ctx.currentTime),t._panner.orientationZ.setValueAtTime(t._orientation[2],Howler.ctx.currentTime)):t._panner.setOrientation(t._orientation[0],t._orientation[1],t._orientation[2])):(t._panner=Howler.ctx.createStereoPanner(),t._panner.pan.setValueAtTime(t._stereo,Howler.ctx.currentTime)),t._panner.connect(t._node),t._paused||t._parent.pause(t._id,!0).play(t._id,!0)}})()})(hn)),hn}var qe=pa();const bn="default";class va{bgMusic=new Map;bgBaseVolumes=new Map;sfx=new Map;sfxBaseVolumes=new Map;masterVolume=1;musicMuted=!1;sfxMuted=!1;allMuted=!1;registerBgMusic(n,t,r){if(Array.isArray(n)){const s=typeof t=="number"?t:.5;this.registerBgMusicTrack(bn,n,s);return}if(t===void 0||typeof t=="number"){const s=typeof t=="number"?t:.5;this.registerBgMusicTrack(bn,n,s);return}const o=typeof r=="number"?r:.5;this.registerBgMusicTrack(n,t,o)}registerBgMusicTrack(n,t,r){if(this.bgMusic.has(n))return;const o=this.clamp(r);this.bgBaseVolumes.set(n,o),qe.Howler.volume(1),this.bgMusic.set(n,new qe.Howl({src:Array.isArray(t)?t:[t],loop:!0,volume:o*this.masterVolume}))}registerSound(n,t,r=1){if(this.sfx.has(n))return;const o=this.clamp(r);this.sfxBaseVolumes.set(n,o);const s=new qe.Howl({src:Array.isArray(t)?t:[t],volume:o*this.masterVolume});this.sfx.set(n,s)}playBgMusic(n){if(this.allMuted||this.musicMuted)return;const t=r=>{r.playing()||r.play()};if(n!==void 0){const r=this.bgMusic.get(n);r&&t(r);return}this.bgMusic.forEach(t)}stopBgMusic(n){if(n!==void 0){this.bgMusic.get(n)?.stop();return}this.bgMusic.forEach(t=>t.stop())}muteMusic(){this.musicMuted=!0,this.bgMusic.forEach(n=>n.pause())}unmuteMusic(){this.musicMuted=!1,this.allMuted||this.playBgMusic()}playSound(n,t=!1){if(this.allMuted||this.sfxMuted)return;const r=this.sfx.get(n);if(r)return r.loop(t),r.play()}playSoundOnce(n,t=!1){if(this.allMuted||this.sfxMuted)return;const r=this.sfx.get(n);if(r&&!r.playing())return r.loop(t),r.play()}stopSound(n){const t=this.sfx.get(n);t&&t.stop()}muteSounds(){this.sfxMuted=!0,this.sfx.forEach(n=>n.pause())}unmuteSounds(){this.sfxMuted=!1}setMasterVolume(n){let t=n/100;t=this.clamp(t),this.masterVolume=t,qe.Howler.volume(1),!this.allMuted&&(this.bgMusic.forEach((r,o)=>{const s=this.bgBaseVolumes.get(o)??1;r.volume(s*this.masterVolume)}),this.sfx.forEach((r,o)=>{const s=this.sfxBaseVolumes.get(o)??1;r.volume(s*this.masterVolume)}))}setSoundBaseVolume(n,t){const r=this.sfx.get(n);if(!r)return;const o=this.clamp(t);this.sfxBaseVolumes.set(n,o),r.volume(o*this.masterVolume)}setBgMusicBaseVolume(n,t){const r=this.bgMusic.get(n);if(!r)return;const o=this.clamp(t);this.bgBaseVolumes.set(n,o),r.volume(o*this.masterVolume)}muteAll(){this.allMuted=!0,qe.Howler.mute(!0)}unmuteAll(){this.allMuted=!1,qe.Howler.mute(!1),this.setMasterVolume(this.masterVolume),this.musicMuted||this.playBgMusic()}clamp(n){return Math.max(0,Math.min(1,n))}}const Se=new va;function M(){Se.playSound(vn.Click)}const ha=({onClick:e,disabled:n=!1,value:t,currency:r,highlighted:o=!1})=>v.jsxs("div",{className:`bet-amount ${n?"disabled":""} ${o?"ante-color":""}`,onClick:e&&!n?()=>{M(),e()}:void 0,children:[v.jsx("div",{className:"bet-amount-icon"}),v.jsxs("label",{className:"bet-amount-text",children:[t," ",r]})]}),Hr=({onClick:e,disabled:n=!1,className:t})=>v.jsx("button",{className:`${t} ${n?"disabled":""}`,onClick:e?()=>{n||(M(),e())}:void 0});class ba{activePopup=null;constructor(){Pe(this)}open(n){this.activePopup=n}close(){this.activePopup=null}get isOpen(){return this.activePopup!==null}}const k=new ba;class ma{dialogs=jr;activeDialog=null;constructor(){Pe(this)}add(n){this.dialogs.push(n)}open(n){const t=this.dialogs.find(r=>n===r.name);t?this.activeDialog=t:console.error(`Couldn't find dialog named ${n}`)}close(){this.activeDialog=null}get isOpen(){return this.activeDialog!==null}}const at=new ma;class ga{balance=1e4;betAmount=10;betIndex=0;betAmountRange=[10,20,50,100,500,1e3,5e3,1e4,25e3,5e5,65e3,8e4,1e5,15e4,2e5];maxBetAmount=this.betAmountRange[0];minBetAmount=this.betAmountRange[this.betAmountRange.length-1];displayCurrency="FUN";constructor(){Pe(this)}setBet(n){this.betAmount=n,this.betIndex=this.betAmountRange.indexOf(n)}setNextBetAmount(){if(this.betIndex===this.betAmountRange.length-1)return console.error("Bet Index must be less than BetStore.betAmountRange.length");this.betIndex+=1,this.betAmount=this.betAmountRange[this.betIndex]}setPrevBetAmount(){if(this.betIndex<1)return console.error("Bet Index must be more than 0");this.betIndex-=1,this.betAmount=this.betAmountRange[this.betIndex]}setBetAmountRange(n){this.betAmountRange=n,n.length>0&&(this.maxBetAmount=n[0],this.minBetAmount=n[n.length-1])}setDisplayCurrency(n){this.displayCurrency=n}setBalance(n){this.balance=n}}const W=new ga;class ya{countRange=[10,25,50,70,100,500,1e3];limitsRange=[10,20,50];count=0;specialFeatureSwitcherOn=!1;lossLimit=null;winLimit=null;currentWinLimit=0;currentLossLimit=0;isStarted=!1;constructor(){Pe(this)}setCount(n){this.count=n}setIsStarted(n){this.isStarted=n}setLimitsRange(n){this.limitsRange=n}setCountRange(n){this.countRange=n}setSpecialFeatureSwitcher(n){this.specialFeatureSwitcherOn=n}setLossLimit(n){this.lossLimit=n}setCurrentLossLimit(n){this.currentLossLimit=n}setWinLimit(n){this.winLimit=n}setCurrentWinLimit(n){this.currentWinLimit=n}}const we=new ya;class Aa{anteBets=[];inReelFeatures=[];bonusFeatures=[];activeAnteBet=null;activeBonusFeature=null;activeInReelFeature=null;freeSpinsCount=0;handler;handlerSet=!1;constructor(){Qt(this,{anteBets:C,inReelFeatures:C,bonusFeatures:C,activeAnteBet:C,activeBonusFeature:C,activeInReelFeature:C,freeSpinsCount:C,isActiveBonus:Te,isActiveInReelFeature:Te,isActiveAnteBet:Te,setAnteBets:L,setActiveAnteBet:L,setActiveBonusFeature:L,setActiveInReelFeature:L,setInReelFeatures:L,setBonusFeatures:L,setHandlerOnce:L,buyHandler:L})}setAnteBets(n){this.anteBets=n}setActiveAnteBet(n){n!==null?this.activeAnteBet=this.anteBets.find(t=>t.id===n)||null:this.activeAnteBet=null}setFreeSpinsCount(n){this.freeSpinsCount=n}setActiveBonusFeature(n){this.activeBonusFeature=n}setActiveInReelFeature(n){this.activeInReelFeature=n}setInReelFeatures(n){this.inReelFeatures=n}setBonusFeatures(n){this.bonusFeatures=n}get isActiveBonus(){return!!this.activeBonusFeature}get isActiveInReelFeature(){return!!this.activeInReelFeature}get isActiveAnteBet(){return!!this.activeAnteBet}setHandlerOnce(n){if(this.handlerSet){console.error("[BuyBonus] handler already set");return}this.handler=n,this.handlerSet=!0}buyHandler(n){this.handler?.(n)}}const fe=new Aa;class Oa{introSkip=JSON.parse(localStorage.getItem(ot.SKIP_INTRO))||!1;spaceToSpin=!1;spaceToSkip=!1;isTurbo=!1;volume=50;musicOn=!0;soundsOn=!0;constructor(){Pe(this)}setMusicOn(n){this.musicOn=n,localStorage.setItem(ot.MUSIC_ON,n.toString()),n?Se.unmuteMusic():Se.muteMusic()}toggleMute(){this.volume>0?this.setVolume(0):this.setVolume(50)}setVolume(n){this.volume=n,Se.setMasterVolume(n)}setIsTurbo(n){this.isTurbo=n}setSoundsOn(n){this.soundsOn=n,localStorage.setItem(ot.SOUND_ON,n.toString()),n?Se.unmuteSounds():Se.muteSounds()}setIntroSkip(n){this.introSkip=n,localStorage.setItem(ot.SKIP_INTRO,n.toString())}setSpaceToSpin(n){this.spaceToSpin=n}setSpaceToSkip(n){this.spaceToSkip=n}}const te=new Oa;class Sa{data=[{date:"26.11.2024 00:16",betAmount:1011,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:1,winAmount:2e4,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"}];constructor(){Pe(this)}setData(n){this.data=n}}const $r=new Sa;class wa{isRunning=!1;isDisabled=!1;isSlamStop=!1;isUIVisible=!1;isAutoPlayDisabled=!1;isBuyBonusDisabled=!1;isBetAmountLabelsDisabled=!1;handler;handlerSet=!1;constructor(){Qt(this,{isRunning:C,isDisabled:C,isSlamStop:C,isUIVisible:C,isAutoPlayDisabled:C,isBuyBonusDisabled:C,isBetAmountLabelsDisabled:C,setIsSpinRunning:L,setIsSpinDisabled:L,setIsSlamStop:L,setHandlerOnce:L,setIsUIVisible:L,setIsAutoplayDisabled:L,setIsBuyBonusDisabled:L,setIsBetAmountLabelsDisabled:L,clickHandler:L})}setHandlerOnce(n){if(this.handlerSet){console.error("[SpinButton] handler already set");return}this.handler=n,this.handlerSet=!0}setIsUIVisible(n){this.isUIVisible=n}setIsAutoplayDisabled(n){this.isAutoPlayDisabled=n}setIsBetAmountLabelsDisabled(n){this.isBetAmountLabelsDisabled=n}setIsSpinDisabled(n){this.isDisabled=n}setIsBuyBonusDisabled(n){this.isBuyBonusDisabled=n}clickHandler(){M(),this.handler?.()}setIsSpinRunning(n){this.isRunning=n}setIsSlamStop(n){this.isSlamStop=n}}const st=new wa;class Ea{lastResult={};isBonus=!1;lastWinAmount=0;constructor(){Pe(this)}setLastResult(n){this.lastResult=n}setIsBonus(n){this.isBonus=n}setLastWinAmount(n){this.lastWinAmount=n}}const Ur=new Ea,Na=K(()=>{const{isDisabled:e,isRunning:n,clickHandler:t}=st,{count:r,isStarted:o}=we,{freeSpinsCount:s}=fe;return v.jsx("button",{className:`spin-btn
32
32
  ${e?"disabled":""}
33
33
  ${n?"slam-stop":""}
34
34
  `,onClick:t.bind(st),children:v.jsx("span",{className:`spin-btn_label ${o&&n&&r||s?"":"hidden"}`,children:s||r})})}),Gr=({onClick:e,disabled:n=!1,className:t,isActive:r})=>v.jsx("button",{className:`${t} ${n?"disabled":""} ${r?"active":""}`,onClick:e?()=>{n||(M(),e())}:void 0}),Ca=K(()=>{const{balance:e,betAmount:n,displayCurrency:t,setNextBetAmount:r,setPrevBetAmount:o}=W,{lastWinAmount:s}=Ur,{setIsTurbo:u,isTurbo:d}=te,{open:c}=k,{activeAnteBet:p,activeBonusFeature:m,activeInReelFeature:i,setActiveAnteBet:a}=fe,{isUIVisible:l,isAutoPlayDisabled:f,isBuyBonusDisabled:h,isBetAmountLabelsDisabled:b}=st,_=E.useMemo(()=>p?.imagePath||i?.imagePath||m?.imagePath,[p,m,i]),y=E.useCallback(()=>{Se.playSound(vn.BuyBonusClick),p?a.call(fe,null):c.call(k,F.buyBonus)},[p,a]);return v.jsx("div",{className:`ui-footer ${l?"":"hidden"}`,children:v.jsxs("div",{className:"top-row",children:[v.jsxs("div",{className:"left-group",children:[v.jsx(_a,{imagePath:_,disabled:h,onClick:y,isAnteBet:!!p,isBonus:!!m}),v.jsxs("div",{className:"balance-info",children:[v.jsx(Ir,{label:"LAST WIN",value:`${s} ${t}`}),v.jsx(Ir,{label:"BALANCE",value:`${e} ${t}`})]})]}),v.jsxs("div",{className:"bet-control",children:[v.jsx(ha,{highlighted:!!p,value:p?p.availableBets[W.betIndex]:n,currency:t,onClick:()=>{c.call(k,F.bet)},disabled:b}),v.jsxs("div",{className:"bet-box",children:[v.jsx(Hr,{onClick:()=>{o.call(W)},className:"bet-btn minus",disabled:b}),v.jsx(Na,{onClick:()=>console.log("Spin"),state:"active"}),v.jsx(Hr,{onClick:()=>{r.call(W)},className:"bet-btn plus",disabled:b})]}),v.jsx(Gr,{className:"quick-spin",onClick:()=>{u.call(te,!d)},isActive:d}),v.jsx(Gr,{className:"auto-spin",onClick:()=>{c.call(k,F.autoplay)},isActive:!1,disabled:f})]})]})})}),Ta=({onMount:e,onUnmount:n,className:t})=>{const r=E.useRef(null);return E.useEffect(()=>(r.current&&e&&e(r.current),()=>{n?.()}),[e,n]),v.jsx("div",{ref:r,className:t,style:{width:"100%",height:"100%",position:"relative"}})};function Da(e){const n=E.useRef(null);return E.useEffect(()=>{if(typeof e!="function")return;const t=r=>{const o=n.current;if(!o)return;const s=r.target;s&&(o.contains(s)||e(r))};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e]),n}const xa=K(()=>{const{volume:e,setVolume:n}=te,[t,r]=E.useState(!1),o=Da(()=>r(!1)),s=E.useCallback(()=>{M(),te.toggleMute(),t||r(!0)},[t,r]);return v.jsxs(v.Fragment,{children:[t&&v.jsxs("div",{className:"volume-control",ref:o,children:[v.jsx("input",{type:"range",min:0,max:100,value:e,onChange:u=>n.call(te,Number(u.target.value)),className:"slider","aria-label":"Volume"}),v.jsx("span",{className:"volume-value",children:e})]}),v.jsx("button",{className:`btn-sound ${e===0?"inactive":""}`,"aria-label":"Toggle Sound",onClick:s})]})}),Va=K(()=>{const{open:e}=k,{isUIVisible:n}=st;return n?v.jsxs("div",{className:"settings-section",children:[v.jsx(xa,{}),v.jsx("button",{className:"btn-settings","aria-label":"Open Settings",onClick:()=>{M(),e.call(k,F.settings)}})]}):null}),Ba="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='34'%20height='45'%20viewBox='0%200%2034%2045'%20fill='none'%3e%3cpath%20d='M7.69062%2031.7333H7.06121L9.3091%2028.0889L11.9167%2024C12.636%2022.9333%2012.666%2021.8074%2012.0066%2020.6222C11.527%2019.6741%2011.0475%2018.8148%2010.5679%2018.0444L11.1973%2017.6889C11.1973%2017.6296%2011.1674%2017.5704%2011.1074%2017.5111L10.3881%2017.6889C10.2083%2017.6296%2010.0284%2017.4222%209.8486%2017.0667C9.72871%2016.7111%209.63879%2016.5037%209.57885%2016.4444C9.15924%2016.1481%208.85952%2015.7037%208.67969%2015.1111L9.12927%2014.5778C8.94944%2014.4%208.88949%2014.2815%208.94944%2014.2222C9.06933%2013.4518%209.33907%2012.9185%209.75868%2012.6222C10.0584%2012.563%2010.0284%2012.3556%209.66877%2012L8.40994%2014.5778C7.93039%2013.9852%207.66065%2013.6%207.6007%2013.4222C7.6007%2013.1852%207.8105%2012.7704%208.23011%2012.1778C8.40994%2012%208.5598%2011.7926%208.67969%2011.5556C8.85952%2011.1407%208.94944%2010.6963%208.94944%2010.2222L8.40994%2011.3778C8.11022%2011.8519%207.69062%2011.9704%207.15112%2011.7333C7.15112%2011.4963%207.18109%2011.3481%207.24104%2011.2889C7.36093%2011.1704%207.51079%2011.0815%207.69062%2011.0222C7.87045%2010.9037%208.02031%2010.7852%208.1402%2010.6667L7.78053%2010.4C7.78053%2010.3407%207.81051%2010.2815%207.87045%2010.2222C7.87045%209.98518%207.90042%209.83704%207.96036%209.77778C7.54076%2010.1926%207.12115%2010.2222%206.70154%209.86667C6.82143%209.51111%206.88137%209.3037%206.88137%209.24444L6.97129%209.06666L7.15112%208.8C6.97129%208.85926%206.73151%208.88889%206.43179%208.88889C6.43179%208.53333%206.46177%208.32592%206.52171%208.26666C6.70154%207.79259%206.70154%207.34815%206.52171%206.93333L6.07213%207.28889C5.77241%207.46667%205.23292%207.46667%204.45365%207.28889C4.15393%206.6963%204.30379%206.13333%204.90322%205.6C4.84328%205.6%204.66345%205.62963%204.36373%205.68889C4.12395%205.68889%203.94412%205.68889%203.82423%205.68889C3.82423%206.22222%203.79426%206.60741%203.73432%206.84444C3.37465%206.25185%203.19482%205.86666%203.19482%205.68889C3.13488%205.62963%203.07494%205.6%203.01499%205.6L2.74524%205.33333L1.21667%202.66666L1.03684%202.13333C0.677179%201.00741%201.09679%200.355554%202.29566%200.177775H3.73432C3.97409%200.177775%204.42367%200.207404%205.08306%200.266663C5.80238%200.266663%206.25196%200.266663%206.43179%200.266663C7.33095%200.148146%208.05028%200.503704%208.58978%201.33333C9.18921%202.16296%2010.2982%203.94074%2011.9167%206.66667C12.0366%206.78518%2012.0965%207.05185%2012.0965%207.46666C12.8158%207.58518%2013.2354%208.14815%2013.3553%209.15555L14.0746%2010.0444L15.6032%2012.8C15.6032%2012.9185%2015.6332%2013.0074%2015.6931%2013.0667L16.5923%2014.4L17.7612%2014.0444L18.3906%2013.6C18.8102%2013.1852%2019.2298%2012.6519%2019.6494%2012L21.5377%209.06666L23.336%206.4C24.2951%204.97778%2025.0144%203.82222%2025.494%202.93333L26.0335%201.86667C26.573%201.80741%2026.8727%201.74815%2026.9326%201.68889C27.0525%201.57037%2027.0525%201.24444%2026.9326%200.71111C27.5321%200.355554%2028.5211%200.177775%2029.8998%200.177775C31.4584%200.0592581%2032.2676%200%2032.3276%200L32.5074%200.62222L32.8671%200.266663L32.957%200.35555C33.0169%200.414812%2033.0769%200.444444%2033.1368%200.444444C33.8561%200.799999%2034.0959%201.27407%2033.8561%201.86667C33.7362%202.28148%2033.3766%203.05185%2032.7771%204.17777L32.3276%204.35555L31.878%205.51111C31.0987%206.45926%2030.0497%208%2028.7309%2010.1333C27.5321%2012.0296%2026.6928%2013.3333%2026.2133%2014.0444C25.9136%2014.4%2024.6547%2016.4148%2022.4368%2020.0889L21.8973%2021.0667C21.5976%2021.7778%2021.6575%2022.4296%2022.0772%2023.0222L23.6956%2025.8667C23.6956%2025.9852%2023.7556%2026.1037%2023.8755%2026.2222C23.9954%2026.3407%2023.9654%2026.4889%2023.7856%2026.6667L24.3251%2026.9333C24.5648%2027.4074%2025.0744%2028.237%2025.8536%2029.4222C26.6329%2030.6074%2027.0525%2031.2593%2027.1124%2031.3778C27.1124%2031.4963%2027.1424%2031.5852%2027.2024%2031.6444C26.543%2031.9407%2026.4231%2032.2963%2026.8427%2032.7111C26.8427%2032.7704%2026.8127%2032.8296%2026.7528%2032.8889C26.7528%2032.9481%2026.7528%2033.0074%2026.7528%2033.0667C26.7528%2033.2444%2026.8427%2033.4222%2027.0225%2033.6C27.2024%2033.4222%2027.4122%2033.037%2027.6519%2032.4444C28.1914%2033.037%2028.4012%2033.5704%2028.2814%2034.0444C28.9407%2034.4%2029.2704%2034.9037%2029.2704%2035.5556C29.2704%2035.6741%2029.3004%2035.7333%2029.3603%2035.7333C29.6001%2035.9704%2029.9898%2036.5037%2030.5292%2037.3333L31.6082%2039.0222L31.9679%2039.5556C32.1477%2039.9704%2032.0878%2040.237%2031.7881%2040.3556H31.9679L32.5074%2040.1778L33.6763%2042.4C34.3956%2044%2033.9161%2044.8%2032.2376%2044.8C32.1777%2044.8%2032.1477%2044.7704%2032.1477%2044.7111C32.1477%2044.3556%2032.0878%2044.1778%2031.9679%2044.1778C31.7881%2044.1778%2031.6682%2044.2074%2031.6082%2044.2667C31.6082%2044.3259%2031.6082%2044.4444%2031.6082%2044.6222C31.6682%2044.7407%2031.6982%2044.8296%2031.6982%2044.8889H28.3713C27.5321%2044.8889%2026.7828%2044.4741%2026.1234%2043.6444L24.9545%2041.7778L21.8973%2036.8889L20.9082%2035.0222L20.0091%2033.5111L18.4805%2031.2C18.4805%2031.1407%2018.3307%2030.9037%2018.0309%2030.4889C17.6113%2029.9556%2017.1618%2029.8074%2016.6822%2030.0444C16.2626%2030.2222%2015.9029%2030.4593%2015.6032%2030.7556C15.3634%2031.0519%2015.1536%2031.3778%2014.9738%2031.7333L11.1973%2037.6L9.3091%2040.4444L9.12927%2040.7111V40.3556C9.06933%2040.1185%209.03935%2039.9407%209.03935%2039.8222C8.5598%2040.1185%208.40994%2040.4444%208.58978%2040.8C8.58978%2040.8593%208.67969%2040.8889%208.85952%2040.8889L7.51079%2043.2L6.70154%2042.7556C6.70154%2042.8148%206.70154%2043.0222%206.70154%2043.3778C6.76149%2043.7333%206.79146%2043.9704%206.79146%2044.0889C6.43179%2044.6815%205.80238%2044.9778%204.90322%2044.9778C4.06401%2045.037%202.92508%2044.9778%201.48642%2044.8C0.107712%2044.6222%20-0.311896%2043.8519%200.2276%2042.4889L0.407431%2042.1333L3.19482%2037.6L3.91415%2038.4889C4.03404%2037.9556%203.91415%2037.5111%203.55449%2037.1556L4.45365%2035.9111L5.17297%2034.8444L6.16205%2033.9556C6.1021%2033.5407%206.40182%2032.7704%207.06121%2031.6444V31.8222L7.42087%2032.2667L7.51079%2032.0889C7.51079%2032.0296%207.54076%2031.9407%207.6007%2031.8222V31.7333C7.90042%2031.7926%208.05028%2031.763%208.05028%2031.6444C8.11022%2031.4667%208.11022%2031.2889%208.05028%2031.1111C7.8105%2031.1111%207.69062%2031.3185%207.69062%2031.7333ZM9.03935%2030.5778C9.45896%2030.637%209.69874%2030.637%209.75868%2030.5778C9.81863%2030.5185%209.78865%2030.2519%209.66877%2029.7778H8.85952C8.97941%2030.2519%209.03935%2030.5481%209.03935%2030.6667C8.79958%2030.6667%208.61975%2030.7259%208.49986%2030.8444C8.49986%2030.9037%208.52983%2030.9926%208.58978%2031.1111C8.64972%2031.1704%208.70966%2031.1704%208.76961%2031.1111C8.8895%2031.1111%208.97941%2030.9333%209.03935%2030.5778ZM21.2679%2012.8L20.9982%2012.3556L20.099%2012.7111C20.2189%2012.9481%2020.3987%2013.2148%2020.6385%2013.5111C21.0581%2013.4518%2021.2679%2013.2148%2021.2679%2012.8ZM30.6192%2040.8C30.0797%2041.0963%2030.0197%2041.5407%2030.4393%2042.1333C30.739%2041.4815%2030.799%2041.037%2030.6192%2040.8ZM22.5267%2012.1778C22.9463%2011.7037%2023.0363%2011.2593%2022.7965%2010.8444C22.3169%2011.2593%2022.227%2011.7037%2022.5267%2012.1778ZM3.46457%205.06666L4.63348%204.44444L3.91415%204.17777L3.37466%204.97778C3.37466%205.03704%203.40463%205.06666%203.46457%205.06666ZM22.3469%2026.4L22.1671%2026.1333C21.9872%2026.4889%2021.8973%2026.7259%2021.8973%2026.8444L22.0772%2027.0222L22.257%2027.1111C22.257%2027.0519%2022.3169%2026.963%2022.4368%2026.8444C22.6167%2026.6667%2022.5867%2026.5185%2022.3469%2026.4ZM24.1452%2012.1778V11.5556C24.1452%2011.437%2024.0553%2011.3778%2023.8755%2011.3778L23.6057%2011.4667C23.6057%2011.9407%2023.7856%2012.1778%2024.1452%2012.1778ZM6.25196%2035.2889C6.25196%2035.5852%206.28194%2035.8222%206.34188%2036C6.52171%2035.7037%206.49174%2035.4667%206.25196%2035.2889ZM10.0284%208.88889L9.39902%209.77778C9.81863%209.6%2010.0284%209.3037%2010.0284%208.88889ZM28.1015%2039.5556C28.3413%2039.2%2028.3113%2038.8741%2028.0116%2038.5778C27.9517%2038.6963%2027.9217%2038.8741%2027.9217%2039.1111C27.9217%2039.1704%2027.9517%2039.2296%2028.0116%2039.2889C28.0116%2039.4074%2028.0416%2039.4963%2028.1015%2039.5556ZM29.8099%2037.0667C29.75%2037.4815%2029.8699%2037.7185%2030.1696%2037.7778C30.2895%2037.4222%2030.1696%2037.1852%2029.8099%2037.0667ZM3.01499%2042.4889C3.07494%2042.4296%203.16485%2042.4%203.28474%2042.4L3.19482%2042.2222C3.19482%2042.0444%203.19482%2041.8963%203.19482%2041.7778L3.10491%2041.8667H2.92508L3.01499%2042.0444C3.01499%2042.2222%203.01499%2042.3704%203.01499%2042.4889ZM11.2873%208.17778H11.4671C11.587%208.05926%2011.6469%207.91111%2011.6469%207.73333L11.3772%207.64444C11.3772%207.7037%2011.3472%207.79259%2011.2873%207.91111C11.2873%208.02963%2011.2873%208.11852%2011.2873%208.17778ZM29.5402%2038.8444L29.72%2038.4889V38.1333C29.6001%2038.1333%2029.5102%2038.1037%2029.4503%2038.0444C29.3304%2038.3407%2029.3603%2038.6074%2029.5402%2038.8444ZM28.641%206.31111H28.4612C28.4012%206.37037%2028.3713%206.51852%2028.3713%206.75555C28.4312%206.81481%2028.4912%206.84444%2028.5511%206.84444V6.57778L28.641%206.31111ZM28.0116%2037.1556C28.1914%2036.9185%2028.1615%2036.7111%2027.9217%2036.5333C27.9217%2036.6519%2027.9517%2036.7704%2028.0116%2036.8889V37.1556ZM24.7746%2032.7111C24.7147%2032.6518%2024.6248%2032.6222%2024.5049%2032.6222C24.5049%2032.8593%2024.4749%2033.0074%2024.415%2033.0667H24.6847C24.6847%2033.0074%2024.6847%2032.9481%2024.6847%2032.8889C24.7447%2032.8296%2024.7746%2032.7704%2024.7746%2032.7111ZM25.404%2033.9556H25.5839C25.5839%2033.8963%2025.5539%2033.8074%2025.494%2033.6889C25.494%2033.5704%2025.494%2033.5111%2025.494%2033.5111H25.404C25.3441%2033.5704%2025.2842%2033.6%2025.2242%2033.6C25.3441%2033.7185%2025.404%2033.837%2025.404%2033.9556ZM9.66877%2030.8444H9.48893V31.2889H9.57885C9.63879%2031.2296%209.66877%2031.0815%209.66877%2030.8444ZM6.52171%2041.8667L6.43179%2042.1333C6.43179%2042.1926%206.49174%2042.2815%206.61163%2042.4L6.79146%2042.2222C6.79146%2042.163%206.70154%2042.0444%206.52171%2041.8667ZM5.3528%2039.1111H5.53264C5.53264%2038.8148%205.44272%2038.637%205.26289%2038.5778C5.32283%2038.6963%205.3528%2038.8741%205.3528%2039.1111ZM29.9897%206.48889H30.2595V5.95555H30.0797L29.9897%206.22222V6.48889ZM27.2024%209.6H27.3822C27.3822%209.36296%2027.3522%209.21481%2027.2923%209.15555H27.1124C27.1124%209.39259%2027.1424%209.54074%2027.2024%209.6ZM11.3772%2027.6444V28.3556C11.557%2028.1185%2011.557%2027.8815%2011.3772%2027.6444ZM4.54356%208.08889L5.53264%207.46666L6.07213%207.28889C6.13207%207.22963%206.25196%207.2%206.43179%207.2C6.49174%207.67407%206.34188%208%205.98222%208.17778C5.62255%208.35555%205.143%208.32592%204.54356%208.08889ZM6.43179%208.88889C6.73151%208.88889%206.97129%208.85926%207.15112%208.8L6.97129%209.06666L6.88137%209.24444L6.52171%209.6C6.22199%209.77778%205.98222%209.68889%205.80238%209.33333L6.07213%209.06666H5.98222C6.04216%209.06666%206.1021%209.03703%206.16205%208.97778C6.22199%208.97778%206.31191%208.94815%206.43179%208.88889ZM6.34188%2011.0222V10.2222L7.24104%2010.4C7.06121%2010.8741%206.76149%2011.0815%206.34188%2011.0222ZM5.98222%209.06666H6.07213C5.59258%209.06666%205.29286%208.97778%205.17297%208.8C5.29286%208.8%205.44272%208.74074%205.62255%208.62222C5.80238%208.5037%205.92227%208.41481%205.98222%208.35555V9.06666Z'%20fill='white'/%3e%3c/svg%3e",La=K(()=>{const{betAmount:e,displayCurrency:n,setNextBetAmount:t,setPrevBetAmount:r}=W;return v.jsxs("div",{className:"overlay-bet-controller",children:[v.jsx("div",{className:"decrease-bet",onClick:()=>{M(),r.call(W)}}),v.jsxs("div",{className:"bet-amount",children:[e," ",n]}),v.jsx("div",{className:"increase-bet",onClick:()=>{M(),t.call(W)}})]})}),Rr=({value:e,onClick:n,active:t})=>v.jsx("div",{className:`rectLabel ${t?"current-active":""}`,onClick:()=>{M(),n(e)},children:v.jsx("span",{children:e})}),Ma=K(()=>{const{betAmountRange:e,setBet:n,betAmount:t}=W,{activeAnteBet:r}=fe,{close:o}=k;return v.jsx("div",{className:"bet-popup-container",children:e.map((s,u)=>{const d=t===s;return v.jsx(Rr,{value:r?r.availableBets[u]:s,active:d,onClick:()=>{n.call(W,s),o.call(k)}},u)})})}),Pt=({checked:e,onChange:n})=>v.jsx("button",{className:`ap-toggle ${e?"ap-toggle--on":"ap-toggle--off"}`,"aria-pressed":e,onClick:()=>{M(),n(!e)},type:"button",children:v.jsx("span",{className:"ap-toggle__knob"})}),mn=({active:e,onClick:n,children:t})=>v.jsx("button",{className:`ap-limit ${e?"ap-limit--active":""}`,onClick:n?()=>{M(),n()}:void 0,type:"button",children:t}),qr=({active:e,onClick:n,children:t})=>v.jsx("button",{className:`ap-tab ${e?"ap-tab--active":""}`,onClick:n?()=>{M(),n()}:void 0,type:"button",children:t}),Pa=({value:e,placeholder:n,inputType:t="text",className:r="",autoFocus:o=!0,onSubmit:s,onCancel:u})=>{const[d,c]=E.useState(""),p=E.useRef(null),m=E.useRef(!1);E.useEffect(()=>{c(e??""),m.current=!1},[e]),E.useEffect(()=>{o&&setTimeout(()=>{p.current?.focus(),p.current?.select()},0)},[o]);const i=()=>{m.current||(m.current=!0,s(d.trim()))},a=()=>{i()},l=f=>{f.key==="Enter"?(f.preventDefault(),i(),p.current?.blur()):f.key==="Escape"&&(c(e??""),u?.(),p.current?.blur())};return v.jsx("input",{ref:p,className:`ap-limit ${r}`,type:"number",value:d,placeholder:n,onChange:f=>c(f.target.value),onBlur:a,onKeyDown:l,inputMode:t==="number"?"numeric":void 0,"aria-label":"custom limit input"})},Ia=K(()=>{const{specialFeatureSwitcherOn:e,setSpecialFeatureSwitcher:n,countRange:t,count:r,setCount:o,lossLimit:s,winLimit:u,setLossLimit:d,limitsRange:c,setWinLimit:p,setIsStarted:m}=we,[i,a]=E.useState(0),[l,f]=E.useState(!1),[h,b]=E.useState(""),_=E.useMemo(()=>i?u:s,[i,u,s]),y=E.useMemo(()=>i?p.bind(we):d.bind(we),[i,p,d]);E.useEffect(()=>{const O=_&&!c.includes(_);b(O?_:0)},[_,u]);const w=!!r&&r>0;return v.jsxs("div",{className:"autoplay-wrap",children:[v.jsx("h3",{className:"ap-title",children:"Number of spins"}),v.jsx("div",{className:"autoplay-count",children:t.map((O,D)=>{const V=r===O;return v.jsx(Rr,{value:O,active:V,onClick:o.bind(we,O)},D)})}),v.jsxs("div",{className:"ap-switch-row",children:[v.jsx("div",{className:"ap-switch-label",children:"Stop on special feature WIN"}),v.jsx("div",{className:"ap-switch-control",children:v.jsx(Pt,{checked:e,onChange:O=>n.call(we,O)})})]}),v.jsxs("div",{className:"ap-tabs",children:[v.jsx(qr,{active:!i,onClick:()=>a(0),children:"Loss limit"}),v.jsx(qr,{active:!!i,onClick:()=>a(1),children:"Single WIN limit"})]}),v.jsx("div",{className:"ap-limits-panel",children:v.jsx("div",{className:"ap-limits-inner",children:v.jsxs("div",{className:"ap-limit-grid",children:[c.map((O,D)=>v.jsxs(mn,{active:_===O,onClick:()=>y(O),children:[O,"X BET"]},D)),v.jsx(mn,{active:!_,onClick:()=>y(null),children:"NO LIMIT"}),l?v.jsx(Pa,{value:""+h,inputType:"number",onSubmit:O=>{const D=O.trim();if(D===""){f(!1);return}const V=Number(D);b(V??0),y(V),f(!1)},onCancel:()=>{f(!1)}}):v.jsx(mn,{onClick:()=>{f(!0)},active:!!_&&_===Number(h),children:h?`${h}X BET`:"CUSTOM"})]})})}),v.jsx("div",{className:"ap-start-row",children:v.jsx("button",{className:`ap-start-btn ${w?"":"ap-start-btn--disabled"}`,onClick:()=>{M(),m.call(we,!0)},type:"button",disabled:!w,children:"Start Autoplay"})})]})}),Kr=({onClick:e,label:n,className:t})=>v.jsxs("button",{className:`sp-action ${t}`,type:"button",onClick:()=>{M(),e()},children:[v.jsx("span",{className:"sp-action__icon","aria-hidden":"true"}),v.jsx("span",{className:"sp-action__label",children:n})]}),ut=({onToggle:e,label:n,checked:t=!1})=>v.jsxs("div",{className:"sp-row",children:[v.jsx("div",{className:"sp-switch",children:v.jsx(Pt,{checked:t,onChange:()=>{e(!t)}})}),v.jsx("div",{className:"sp-label",children:n})]}),ka=K(()=>{const{introSkip:e,spaceToSkip:n,musicOn:t,soundsOn:r,spaceToSpin:o,setSpaceToSpin:s,setIntroSkip:u,setSpaceToSkip:d,setSoundsOn:c,setMusicOn:p}=te,{open:m}=k;return v.jsxs("div",{className:"sp-wrap",children:[v.jsxs("div",{className:"sp-actions",children:[v.jsx(Kr,{onClick:m.bind(k,F.history),className:"sp-action--history",label:"History"}),v.jsx(Kr,{onClick:k.open.bind(k,F.payTable),className:"sp-action--paytable",label:"Paytable"})]}),v.jsx("h3",{className:"sp-section-title",children:"Audio"}),v.jsxs("div",{className:"sp-rows",children:[v.jsx(ut,{onToggle:p.bind(te),checked:t,label:"Music"}),v.jsx(ut,{onToggle:c.bind(te),checked:r,label:"Sounds"})]}),v.jsx("h3",{className:"sp-section-title",children:"Game launch"}),v.jsx("div",{className:"sp-rows",children:v.jsx(ut,{onToggle:u.bind(te),checked:e,label:"Skip Intro"})}),v.jsx("h3",{className:"sp-section-title",children:"Keyboard"}),v.jsxs("div",{className:"sp-rows",children:[v.jsx(ut,{onToggle:s.bind(te),checked:o,label:"Spacebar to Spin"}),v.jsx(ut,{onToggle:d.bind(te),checked:n,label:"Spacebar to Skip"})]})]})}),ja=({date:e,currencyCode:n,betAmount:t,winAmount:r})=>{const[o,s]=E.useState(!1);return v.jsxs("div",{className:`history-item ${o?"active":""}`,role:"row",children:[v.jsx("span",{className:"date-section",children:e}),v.jsxs("span",{className:"bet-section",children:[t,v.jsx("span",{className:"currency",children:n})]}),v.jsxs("span",{className:"win-section",children:[r,v.jsxs("span",{className:"currency",children:[" ",n]})]}),v.jsx("div",{className:`vector ${o?"up":"down"}`,"aria-hidden":"true",onClick:()=>{M(),s(!o)}}),o&&v.jsxs("div",{className:"additional-info",children:[v.jsxs("button",{type:"button",className:"additional-button replay",onClick:()=>{M()},children:[v.jsx("div",{className:"replay-icon"}),"REPLAY"]}),v.jsx("button",{type:"button",className:"additional-button",onClick:()=>{M()},children:"LINK"})]})]})},Fa=K(()=>{const{data:e}=$r;return v.jsxs("div",{className:"history-wrap",role:"list","aria-label":"History list",children:[v.jsxs("div",{className:"history-item history-item--head",role:"row",children:[v.jsx("span",{className:"date-section",children:"Date"}),v.jsx("span",{className:"bet-section",children:"Bet"}),v.jsx("span",{className:"win-section",children:"Win"})]}),e.map((n,t)=>v.jsx(ja,{date:n.date,betAmount:n.betAmount,winAmount:n.winAmount,currencyCode:n.currencyCode,id:"aa"},t))]})}),Ha=K(({item:e,type:n,onBuy:t})=>{const{betAmount:r}=W,{activeAnteBet:o,setActiveAnteBet:s}=fe,u=e.title.split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sticky-studio-npm/ui-core",
3
- "version": "0.1.100",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/ui-bundle.umd.js",