2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
import{r as D,o as ue,c as P,w as de,d as pe,a as V,b,e as S,n as ne,u as I,F as oe,f as ae,t as me,g as ge,h as se}from"./vendor-vue-kYoPQr5S.js";const ie=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"];function he(e){return e==null||typeof e=="object"&&e!==null&&"value"in e&&(e=e.value,e==null)||typeof e=="object"?"":String(e).replace(/[0-9]/g,m=>ie[+m]).replace(/[٠-٩]/g,m=>ie[m.charCodeAt(0)-1632])}var ye=(e=>(e.CLASSIC_CASINO="CLASSIC_CASINO",e.NEON_CYBER="NEON_CYBER",e.MINIMAL_FLAT="MINIMAL_FLAT",e.LUXURY_GOLD="LUXURY_GOLD",e.PLAYFUL_CARTOON="PLAYFUL_CARTOON",e.RUSTIC_WOOD="RUSTIC_WOOD",e.GALAXY_SPACE="GALAXY_SPACE",e.CANDY_LAND="CANDY_LAND",e.FIRE_FLAME="FIRE_FLAME",e.CRYSTAL_ICE="CRYSTAL_ICE",e))(ye||{});const F=D(localStorage.getItem("wheel_sound_enabled")!=="false");let O=null;function H(){if(!O){const e=window.AudioContext||window.webkitAudioContext;O=new e}return O.state==="suspended"&&O.resume(),O}let q=null;function Ae(e){if(!q||q.sampleRate!==e.sampleRate){const m=Math.ceil(e.sampleRate*.05);q=e.createBuffer(1,m,e.sampleRate);const h=q.getChannelData(0);for(let y=0;y<m;y++)h[y]=(Math.random()*2-1)*Math.exp(-y/(e.sampleRate*.015))}return q}function xe(){function e(){F.value=!F.value,localStorage.setItem("wheel_sound_enabled",String(F.value))}function m(n=.6){if(F.value)try{const f=H(),i=f.currentTime,a=Math.max(.05,Math.min(1,n)),g=.012+(1-a)*.008,d=f.createBufferSource();d.buffer=Ae(f);const s=f.createBiquadFilter();s.type="bandpass",s.frequency.value=2800+a*1200,s.Q.value=1.5;const t=f.createGain();t.gain.setValueAtTime(.18*a+.06,i),t.gain.exponentialRampToValueAtTime(.001,i+g),d.connect(s),s.connect(t),t.connect(f.destination),d.start(i),d.stop(i+g+.005);const o=f.createOscillator();o.type="triangle";const r=600+a*400;o.frequency.setValueAtTime(r,i),o.frequency.exponentialRampToValueAtTime(r*.3,i+.04);const l=f.createGain();l.gain.setValueAtTime(.1*a+.03,i),l.gain.exponentialRampToValueAtTime(.001,i+.04),o.connect(l),l.connect(f.destination),o.start(i),o.stop(i+.05)}catch{}}function h(){if(F.value)try{const n=H(),f=n.currentTime,i=[523.25,659.25,783.99,1046.5],a=.1;i.forEach((t,o)=>{const r=n.createOscillator();r.type="sine",r.frequency.value=t;const l=n.createOscillator();l.type="sine",l.frequency.value=t*2.01;const p=n.createGain(),A=f+o*a;p.gain.setValueAtTime(0,A),p.gain.linearRampToValueAtTime(.22,A+.03),p.gain.exponentialRampToValueAtTime(.001,A+.7);const c=n.createGain();c.gain.setValueAtTime(0,A),c.gain.linearRampToValueAtTime(.06,A+.03),c.gain.exponentialRampToValueAtTime(.001,A+.5),r.connect(p),l.connect(c),p.connect(n.destination),c.connect(n.destination),r.start(A),r.stop(A+.75),l.start(A),l.stop(A+.55)});const g=n.createOscillator();g.type="sine",g.frequency.value=2093;const d=n.createGain(),s=f+i.length*a+.05;d.gain.setValueAtTime(0,s),d.gain.linearRampToValueAtTime(.1,s+.01),d.gain.exponentialRampToValueAtTime(.001,s+.6),g.connect(d),d.connect(n.destination),g.start(s),g.stop(s+.65)}catch{}}function y(){if(F.value)try{const n=H(),f=n.currentTime;[{freq:311.13,duration:.28,delay:0,slide:!1},{freq:293.66,duration:.28,delay:.32,slide:!1},{freq:277.18,duration:.28,delay:.64,slide:!1},{freq:261.63,duration:1.45,delay:.98,slide:!0}].forEach(({freq:a,duration:g,delay:d,slide:s})=>{const t=f+d,o=t+g,r=n.createOscillator(),l=n.createOscillator();if(r.type="sawtooth",l.type="sawtooth",r.frequency.setValueAtTime(a,t),l.frequency.setValueAtTime(a*1.008,t),s){r.frequency.setValueAtTime(a,t),l.frequency.setValueAtTime(a*1.008,t),r.frequency.exponentialRampToValueAtTime(208,o),l.frequency.exponentialRampToValueAtTime(209,o);const u=n.createOscillator(),x=n.createGain();u.frequency.setValueAtTime(5.8,t),x.gain.setValueAtTime(0,t),x.gain.linearRampToValueAtTime(8.5,t+.4),u.connect(x),x.connect(r.frequency),x.connect(l.frequency),u.start(t),u.stop(o+.1)}const p=n.createBiquadFilter();p.type="lowpass",p.Q.value=4.8;const A=t+Math.min(.08,g*.28);p.frequency.setValueAtTime(280,t),p.frequency.exponentialRampToValueAtTime(s?1650:1450,A),p.frequency.exponentialRampToValueAtTime(s?300:360,o);const c=n.create
|