@@ -195,15 +195,15 @@ var gm=(A=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(A,{get:(r,l)=>(
-`;function wn(A){return A.parentElement.nextElementSibling}function Vy(A){let r=A.getElementsByTagName("spessarange");for(let l of r)l.parentElement.insertBefore(NB(l,!0),l);for(;r.length>0;)r[0].parentNode.removeChild(r[0])}function NB(A,r=!0){let l=document.createElement("div");l.classList.add("settings_slider_wrapper");let g=A.getAttribute("min"),d=A.getAttribute("max"),b=A.getAttribute("value"),I0=A.getAttribute("units"),b0=A.getAttribute("input_id"),m0=document.createElement("input");m0.classList.add("settings_slider"),m0.type="range",m0.id=b0,m0.min=g,m0.max=d,m0.value=b;let Y0;r&&(Y0=document.createElement("span"),Y0.textContent=b+I0);let m1=document.createElement("div");m1.classList.add("settings_visual_wrapper");let F=document.createElement("div");F.classList.add("settings_slider_progress"),m1.appendChild(F);let j0=document.createElement("div");return j0.classList.add("settings_slider_thumb"),m1.appendChild(j0),m1.appendChild(m0),m0.addEventListener("input",()=>{let K0=parseInt(m1.style.getPropertyValue("--visual-width").replace("%","")),F1=Math.round((m0.value-m0.min)/(m0.max-m0.min)*100);Math.abs((K0-F1)/100)>.05?m1.classList.add("settings_slider_transition"):m1.classList.remove("settings_slider_transition"),m1.style.setProperty("--visual-width",`${F1}%`)}),m1.style.setProperty("--visual-width",`${(m0.value-m0.min)/(m0.max-m0.min)*100}%`),l.appendChild(m1),r&&l.appendChild(Y0),l}async function zy(){let A=await window.savedSettings;if(!A.interface)return;J5("Loading saved settings...",A);let r=this.htmlControls.renderer,l=this.renderer,g=A.renderer;l.noteFallingTimeMs=g.noteFallingTimeMs,r.noteTimeSlider.value=g.noteFallingTimeMs,r.noteTimeSlider.dispatchEvent(new Event("input")),wn(r.noteTimeSlider).innerText=`${g.noteFallingTimeMs}ms`,r.analyserThicknessSlider.value=g.waveformThickness,r.analyserThicknessSlider.dispatchEvent(new Event("input")),l.lineThickness=g.waveformThickness,wn(r.analyserThicknessSlider).innerText=`${g.waveformThickness}px`;let d=g.sampleSize;r.analyserFftSlider.value=Math.log2(d),r.analyserFftSlider.dispatchEvent(new Event("input")),l.normalAnalyserFft=d,l.drumAnalyserFft=Math.pow(2,Math.min(15,Math.log2(d)+2)),l.updateFftSize(),wn(r.analyserFftSlider).innerText=`${d}`,l.waveMultiplier=g.amplifier,r.waveMultiplierSlizer.value=g.amplifier,r.waveMultiplierSlizer.dispatchEvent(new Event("input")),wn(r.waveMultiplierSlizer).innerText=g.amplifier.toString();let b=this.htmlControls.renderer;l.renderAnalysers=g.renderWaveforms,b.analyserToggler.checked=g.renderWaveforms,l.renderNotes=g.renderNotes,b.noteToggler.checked=g.renderNotes,l.drawActiveNotes=g.drawActiveNotes,b.activeNoteToggler.checked=g.drawActiveNotes,l.showVisualPitch=g.showVisualPitch,b.visualPitchToggler.checked=g.showVisualPitch,l.stabilizeWaveforms=g.stabilizeWaveforms,b.stabilizeWaveformsToggler.checked=g.stabilizeWaveforms,l.keyRange=g.keyRange;let I0=this.htmlControls.keyboard,b0=this.midiKeyboard,m0=A.keyboard;b0.setKeyRange(m0.keyRange,!1),m0.autoRange?(I0.sizeSelector.value=Ro,this.autoKeyRange=!0):(this.autoKeyRange=!1,I0.sizeSelector.value=Object.keys(this.keyboardSizes).find(Y0=>this.keyboardSizes[Y0].min===m0.keyRange.min&&this.keyboardSizes[Y0].max===m0.keyRange.max)),m0.mode==="dark"&&(b0.toggleMode(!1),this.htmlControls.keyboard.modeSelector.checked=!0),this.locale.changeGlobalLocale(A.interface.language,!0),setTimeout(()=>{this.htmlControls.interface.languageSelector.value=A.interface.language},100),A.interface.mode==="light"?(this._toggleDarkMode(),this.htmlControls.interface.themeSelector.checked=!1):this.htmlControls.interface.themeSelector.checked=!0,this.htmlControls.interface.layoutSelector.value=A.interface.layout||"downwards",this._changeLayout(A.interface.layout||"downwards")}function Zy(){window.saveSettings&&window.saveSettings(this._serializeSettings())}function Wy(){return{renderer:{noteFallingTimeMs:this.renderer.noteFallingTimeMs,waveformThickness:this.renderer.lineThickness,sampleSize:this.renderer.normalAnalyserFft,amplifier:this.renderer.waveMultiplier,renderWaveforms:this.renderer.renderAnalysers,renderNotes:this.renderer.renderNotes,drawActiveNotes:this.renderer.drawActiveNotes,showVisualPitch:this.renderer.showVisualPitch,stabilizeWaveforms:this.renderer.stabilizeWaveforms,keyRange:this.renderer.keyRange},keyboard:{selectedChannel:this.midiKeyboard.channel,keyRange:this.midiKeyboard.keyRange,mode:this.midiKeyboard.mode,autoRange:this.htmlControls.keyboard.sizeSelector.value===Ro},midi:{input:this.midiDeviceHandler.selectedInput===null?null:this.midiDeviceHandler.selectedInput.name,output:this.midiDeviceHandler.selectedOutput===null?null:this.midiDeviceHandler.selectedOutput.name},interface:{mode:this.mode,language:this.htmlControls.interface.languageSelector.value,layout:this.htmlControls.interface.layoutSelector.value}}}function jy(){let A=this.htmlControls.interface.themeSelector;A.onclick=()=>{this._toggleDarkMode(),this._saveSettings()};let r=this.htmlControls.interface.languageSelector;for(let[g,d]of Object.entries(this.locales)){let b=document.createElement("option");b.value=g,b.textContent=d.localeName,r.appendChild(b)}r.onchange=()=>{this.locale.changeGlobalLocale(r.value),this._saveSettings()};let l=this.htmlControls.interface.layoutSelector;l.onchange=()=>{this._changeLayout(l.value),this._saveSettings(),l.blur()}}function Xy(A){let r=document.getElementById("keyboard_canvas_wrapper"),l=document.getElementById("note_canvas"),g=document.getElementById("keyboard");switch(A){case"downwards":r.classList.remove("upwards"),r.classList.remove("left_to_right"),r.classList.remove("right_to_left"),l.classList.remove("sideways"),g.classList.remove("sideways"),this.renderer.direction="down",this.renderer.sideways=!1;break;case"upwards":r.classList.add("upwards"),r.classList.remove("left_to_right"),r.classList.remove("right_to_left"),l.classList.remove("sideways"),g.classList.remove("sideways"),this.renderer.direction="up",this.renderer.sideways=!1;break;case"left":r.classList.remove("upwards"),r.classList.add("left_to_right"),r.classList.remove("right_to_left"),l.classList.add("sideways"),g.classList.add("sideways"),this.renderer.direction="up",this.renderer.sideways=!0;break;case"right":r.classList.remove("upwards"),r.classList.remove("left_to_right"),r.classList.add("right_to_left"),l.classList.add("sideways"),g.classList.add("sideways"),this.renderer.direction="down",this.renderer.sideways=!0}}var Dm={start:"#101010",end:"#212121"},bm={start:"#bbb",end:"#f0f0f0"},ew="#eee",tw="#333",_m={start:"#222",end:"#333"},Rm={start:"#ccc",end:"#fff"},kn=.2;function iw(){this.mode==="dark"?(this.mode="light",this.renderer.drawActiveNotes=!1):(this.renderer.drawActiveNotes=!0,this.mode="dark"),this.renderer.toggleDarkMode(),this.synthui.toggleDarkMode(),this.sequi.toggleDarkMode(),this.musicMode.toggleDarkMode(),document.getElementsByClassName("spessasynth_main")[0].classList.toggle("light_mode"),document.getElementsByClassName("top_part")[0].classList.toggle("top_part_light"),this.mainDiv.classList.toggle("settings_menu_light");let A=document.styleSheets[0].cssRules;for(let r of A)if(r.selectorText==="*"){this.mode==="dark"?(vn(tw,ew,kn,r,"--font-color"),vn(Rm.start,_m.start,kn,r,"--top-buttons-color-start"),vn(Rm.end,_m.end,kn,r,"--top-buttons-color-end"),vn(bm.start,Dm.start,kn,r,"--top-color-start"),vn(bm.end,Dm.end,kn,r,"--top-color-end")):(vn(ew,tw,kn,r,"--font-color"),vn(_m.start,Rm.start,kn,r,"--top-buttons-color-start"),vn(_m.end,Rm.end,kn,r,"--top-buttons-color-end"),vn(Dm.start,bm.start,kn,r,"--top-color-start"),vn(Dm.end,bm.end,kn,r,"--top-color-end"));break}document.body.style.background=this.mode==="dark"?"black":"white"}var hh={};function vn(A,r,l,g,d){hh[d]&&(clearInterval(hh[d]),hh[d]=void 0);function b(F){F.length===4&&(F=`#${F[1]}${F[1]}${F[2]}${F[2]}${F[3]}${F[3]}`);let j0=parseInt(F.slice(1),16);return{r:j0>>16&255,g:j0>>8&255,b:j0&255}}function I0(F,j0,K0){return F+(j0-F)*K0}let b0=b(A),m0=b(r),Y0=performance.now()/1e3;function m1(){let j0=performance.now()/1e3-Y0,K0=Math.min(j0/l,1),F1=Math.round(I0(b0.r,m0.r,K0)),B2=Math.round(I0(b0.g,m0.g,K0)),b1=Math.round(I0(b0.b,m0.b,K0));g.style.setProperty(d,`rgb(${F1}, ${B2}, ${b1})`),K0>=1&&(clearInterval(hh[d]),hh[d]=void 0)}hh[d]=setInterval(m1,1e3/60)}function rw(A){let r=this.htmlControls.renderer;r.noteTimeSlider.addEventListener("input",()=>{A.noteFallingTimeMs=r.noteTimeSlider.value,wn(r.noteTimeSlider).innerText=`${r.noteTimeSlider.value}ms`}),r.noteTimeSlider.onchange=()=>{this._saveSettings()},r.analyserThicknessSlider.addEventListener("input",()=>{A.lineThickness=parseInt(r.analyserThicknessSlider.value),wn(r.analyserThicknessSlider).innerText=`${r.analyserThicknessSlider.value}px`}),r.analyserThicknessSlider.onchange=()=>{this._saveSettings()},r.analyserFftSlider.addEventListener("input",()=>{let l=Math.pow(2,parseInt(r.analyserFftSlider.value));A.normalAnalyserFft=l,A.drumAnalyserFft=Math.pow(2,Math.min(15,parseInt(r.analyserFftSlider.value)+2)),A.updateFftSize(),wn(r.analyserFftSlider).innerText=`${l}`}),r.analyserFftSlider.onchange=()=>{this._saveSettings()},r.waveMultiplierSlizer.addEventListener("input",()=>{A.waveMultiplier=parseInt(r.waveMultiplierSlizer.value),wn(r.waveMultiplierSlizer).innerText=r.waveMultiplierSlizer.value}),r.waveMultiplierSlizer.onchange=()=>{this._saveSettings()},r.analyserToggler.onclick=()=>{A.renderAnalysers=!A.renderAnalysers,this._saveSettings()},r.noteToggler.onclick=()=>{A.renderNotes=!A.renderNotes,this._saveSettings()},r.activeNoteToggler.onclick=()=>{A.drawActiveNotes=!A.drawActiveNotes,this._saveSettings()},r.visualPitchToggler.onclick=()=>{A.showVisualPitch=!A.showVisualPitch,this._saveSettings()},r.stabilizeWaveformsToggler.onclick=()=>{A.stabilizeWaveforms=!A.stabilizeWaveforms,this._saveSettings()}}function xo(A,r,l){if(r.textContent&&(A.textContent=r.textContent),r.translatePathTitle){if(!l)throw new Error("Translate path title provided but no locale provided.");l.bindObjectProperty(A,"textContent",r.translatePathTitle+".title"),l.bindObjectProperty(A,"title",r.translatePathTitle+".description")}}function nw(A,r){switch(A.type){case"button":let l=document.createElement("button");return xo(l,A,r),p$(A,[l]),l;case"text":let g=document.createElement("p");return xo(g,A,r),p$(A,[g]),g;case"input":let d=document.createElement("div");d.classList.add("notification_input_wrapper");let b=document.createElement("input");xo(b,A,r),b.addEventListener("keydown",_5=>_5.stopPropagation());let I0=document.createElement("label");return xo(I0,A,r),p$(A,[b,I0]),d.append(I0),d.appendChild(b),d;case"file":let b0=document.createElement("label");b0.classList.add("notification_input_wrapper");let m0=document.createElement("input");m0.type="file";let Y0=document.createElement("label");Y0.classList.add("notification_file_button"),xo(Y0,A,r);let m1=document.createElement("label");return xo(m1,A,r),p$(A,[Y0,m0,m1]),Y0.appendChild(m0),b0.append(m1),b0.appendChild(Y0),b0;case"progress":let F=document.createElement("div");F.classList.add("notification_progress_background");let j0=document.createElement("div");return j0.classList.add("notification_progress"),p$(A,[j0,F]),F.appendChild(j0),F;case"toggle":return qD(A,r);case"range":let K0=document.createElement("input");K0.type="range";let F1=document.createElement("label");p$(A,[K0,F1]),xo(F1,A,r);let B2=NB(K0,!1),b1=document.createElement("div");return b1.classList.add("notification_slider_wrapper"),b1.appendChild(F1),b1.appendChild(B2),b1}}function p$(A,r){if(A.attributes)for(let[l,g]of Object.entries(A.attributes))for(let d of r)d.setAttribute(l,g)}function qD(A,r){let l=document.createElement("label");l.classList.add("notification_switch_wrapper");let g=document.createElement("label");xo(g,A,r);let d=document.createElement("input");d.type="checkbox",p$(A,[g,d]);let b=document.createElement("div");b.classList.add("notification_switch"),b.appendChild(d);let I0=document.createElement("div");return I0.classList.add("notification_switch_slider"),b.appendChild(I0),l.appendChild(g),l.appendChild(b),l}var YD=13,JD=0,xm={};function U7(A,r,l=YD,g=!0,d=void 0,b=void 0){let I0=document.createElement("div"),b0=JD++;I0.classList.add("notification"),I0.innerHTML=`
+`;function wn(A){return A.parentElement.nextElementSibling}function Vy(A){let r=A.getElementsByTagName("spessarange");for(let l of r)l.parentElement.insertBefore(NB(l,!0),l);for(;r.length>0;)r[0].parentNode.removeChild(r[0])}function NB(A,r=!0){let l=document.createElement("div");l.classList.add("settings_slider_wrapper");let g=A.getAttribute("min"),d=A.getAttribute("max"),b=A.getAttribute("value"),I0=A.getAttribute("units"),b0=A.getAttribute("input_id"),m0=document.createElement("input");m0.classList.add("settings_slider"),m0.type="range",m0.id=b0,m0.min=g,m0.max=d,m0.value=b;let q0;r&&(q0=document.createElement("span"),q0.textContent=b+I0);let m1=document.createElement("div");m1.classList.add("settings_visual_wrapper");let x=document.createElement("div");x.classList.add("settings_slider_progress"),m1.appendChild(x);let j0=document.createElement("div");return j0.classList.add("settings_slider_thumb"),m1.appendChild(j0),m1.appendChild(m0),m0.addEventListener("input",()=>{let K0=parseInt(m1.style.getPropertyValue("--visual-width").replace("%","")),F1=Math.round((m0.value-m0.min)/(m0.max-m0.min)*100);Math.abs((K0-F1)/100)>.05?m1.classList.add("settings_slider_transition"):m1.classList.remove("settings_slider_transition"),m1.style.setProperty("--visual-width",`${F1}%`)}),m1.style.setProperty("--visual-width",`${(m0.value-m0.min)/(m0.max-m0.min)*100}%`),l.appendChild(m1),r&&l.appendChild(q0),l}async function zy(){let A=await window.savedSettings;if(!A.interface)return;Y5("Loading saved settings...",A);let r=this.htmlControls.renderer,l=this.renderer,g=A.renderer;l.noteFallingTimeMs=g.noteFallingTimeMs,r.noteTimeSlider.value=g.noteFallingTimeMs,r.noteTimeSlider.dispatchEvent(new Event("input")),wn(r.noteTimeSlider).innerText=`${g.noteFallingTimeMs}ms`,r.analyserThicknessSlider.value=g.waveformThickness,r.analyserThicknessSlider.dispatchEvent(new Event("input")),l.lineThickness=g.waveformThickness,wn(r.analyserThicknessSlider).innerText=`${g.waveformThickness}px`;let d=g.sampleSize;r.analyserFftSlider.value=Math.log2(d),r.analyserFftSlider.dispatchEvent(new Event("input")),l.normalAnalyserFft=d,l.drumAnalyserFft=Math.pow(2,Math.min(15,Math.log2(d)+2)),l.updateFftSize(),wn(r.analyserFftSlider).innerText=`${d}`,l.waveMultiplier=g.amplifier,r.waveMultiplierSlizer.value=g.amplifier,r.waveMultiplierSlizer.dispatchEvent(new Event("input")),wn(r.waveMultiplierSlizer).innerText=g.amplifier.toString();let b=this.htmlControls.renderer;l.renderAnalysers=g.renderWaveforms,b.analyserToggler.checked=g.renderWaveforms,l.renderNotes=g.renderNotes,b.noteToggler.checked=g.renderNotes,l.drawActiveNotes=g.drawActiveNotes,b.activeNoteToggler.checked=g.drawActiveNotes,l.showVisualPitch=g.showVisualPitch,b.visualPitchToggler.checked=g.showVisualPitch,l.stabilizeWaveforms=g.stabilizeWaveforms,b.stabilizeWaveformsToggler.checked=g.stabilizeWaveforms,l.keyRange=g.keyRange;let I0=this.htmlControls.keyboard,b0=this.midiKeyboard,m0=A.keyboard;b0.setKeyRange(m0.keyRange,!1),m0.autoRange?(I0.sizeSelector.value=Ro,this.autoKeyRange=!0):(this.autoKeyRange=!1,I0.sizeSelector.value=Object.keys(this.keyboardSizes).find(q0=>this.keyboardSizes[q0].min===m0.keyRange.min&&this.keyboardSizes[q0].max===m0.keyRange.max)),m0.mode==="dark"&&(b0.toggleMode(!1),this.htmlControls.keyboard.modeSelector.checked=!0),this.locale.changeGlobalLocale(A.interface.language,!0),setTimeout(()=>{this.htmlControls.interface.languageSelector.value=A.interface.language},100),A.interface.mode==="light"?(this._toggleDarkMode(),this.htmlControls.interface.themeSelector.checked=!1):this.htmlControls.interface.themeSelector.checked=!0,this.htmlControls.interface.layoutSelector.value=A.interface.layout||"downwards",this._changeLayout(A.interface.layout||"downwards")}function Zy(){window.saveSettings&&window.saveSettings(this._serializeSettings())}function Wy(){return{renderer:{noteFallingTimeMs:this.renderer.noteFallingTimeMs,waveformThickness:this.renderer.lineThickness,sampleSize:this.renderer.normalAnalyserFft,amplifier:this.renderer.waveMultiplier,renderWaveforms:this.renderer.renderAnalysers,renderNotes:this.renderer.renderNotes,drawActiveNotes:this.renderer.drawActiveNotes,showVisualPitch:this.renderer.showVisualPitch,stabilizeWaveforms:this.renderer.stabilizeWaveforms,keyRange:this.renderer.keyRange},keyboard:{selectedChannel:this.midiKeyboard.channel,keyRange:this.midiKeyboard.keyRange,mode:this.midiKeyboard.mode,autoRange:this.htmlControls.keyboard.sizeSelector.value===Ro},midi:{input:this.midiDeviceHandler.selectedInput===null?null:this.midiDeviceHandler.selectedInput.name,output:this.midiDeviceHandler.selectedOutput===null?null:this.midiDeviceHandler.selectedOutput.name},interface:{mode:this.mode,language:this.htmlControls.interface.languageSelector.value,layout:this.htmlControls.interface.layoutSelector.value}}}function jy(){let A=this.htmlControls.interface.themeSelector;A.onclick=()=>{this._toggleDarkMode(),this._saveSettings()};let r=this.htmlControls.interface.languageSelector;for(let[g,d]of Object.entries(this.locales)){let b=document.createElement("option");b.value=g,b.textContent=d.localeName,r.appendChild(b)}r.onchange=()=>{this.locale.changeGlobalLocale(r.value),this._saveSettings()};let l=this.htmlControls.interface.layoutSelector;l.onchange=()=>{this._changeLayout(l.value),this._saveSettings(),l.blur()}}function Xy(A){let r=document.getElementById("keyboard_canvas_wrapper"),l=document.getElementById("note_canvas"),g=document.getElementById("keyboard");switch(A){case"downwards":r.classList.remove("upwards"),r.classList.remove("left_to_right"),r.classList.remove("right_to_left"),l.classList.remove("sideways"),g.classList.remove("sideways"),this.renderer.direction="down",this.renderer.sideways=!1;break;case"upwards":r.classList.add("upwards"),r.classList.remove("left_to_right"),r.classList.remove("right_to_left"),l.classList.remove("sideways"),g.classList.remove("sideways"),this.renderer.direction="up",this.renderer.sideways=!1;break;case"left":r.classList.remove("upwards"),r.classList.add("left_to_right"),r.classList.remove("right_to_left"),l.classList.add("sideways"),g.classList.add("sideways"),this.renderer.direction="up",this.renderer.sideways=!0;break;case"right":r.classList.remove("upwards"),r.classList.remove("left_to_right"),r.classList.add("right_to_left"),l.classList.add("sideways"),g.classList.add("sideways"),this.renderer.direction="down",this.renderer.sideways=!0}}var Dm={start:"#101010",end:"#212121"},bm={start:"#bbb",end:"#f0f0f0"},ew="#eee",tw="#333",_m={start:"#222",end:"#333"},Rm={start:"#ccc",end:"#fff"},kn=.2;function iw(){this.mode==="dark"?(this.mode="light",this.renderer.drawActiveNotes=!1):(this.renderer.drawActiveNotes=!0,this.mode="dark"),this.renderer.toggleDarkMode(),this.synthui.toggleDarkMode(),this.sequi.toggleDarkMode(),this.musicMode.toggleDarkMode(),document.getElementsByClassName("spessasynth_main")[0].classList.toggle("light_mode"),document.getElementsByClassName("top_part")[0].classList.toggle("top_part_light"),this.mainDiv.classList.toggle("settings_menu_light");let A=document.styleSheets[0].cssRules;for(let r of A)if(r.selectorText==="*"){this.mode==="dark"?(vn(tw,ew,kn,r,"--font-color"),vn(Rm.start,_m.start,kn,r,"--top-buttons-color-start"),vn(Rm.end,_m.end,kn,r,"--top-buttons-color-end"),vn(bm.start,Dm.start,kn,r,"--top-color-start"),vn(bm.end,Dm.end,kn,r,"--top-color-end")):(vn(ew,tw,kn,r,"--font-color"),vn(_m.start,Rm.start,kn,r,"--top-buttons-color-start"),vn(_m.end,Rm.end,kn,r,"--top-buttons-color-end"),vn(Dm.start,bm.start,kn,r,"--top-color-start"),vn(Dm.end,bm.end,kn,r,"--top-color-end"));break}document.body.style.background=this.mode==="dark"?"black":"white"}var hh={};function vn(A,r,l,g,d){hh[d]&&(clearInterval(hh[d]),hh[d]=void 0);function b(x){x.length===4&&(x=`#${x[1]}${x[1]}${x[2]}${x[2]}${x[3]}${x[3]}`);let j0=parseInt(x.slice(1),16);return{r:j0>>16&255,g:j0>>8&255,b:j0&255}}function I0(x,j0,K0){return x+(j0-x)*K0}let b0=b(A),m0=b(r),q0=performance.now()/1e3;function m1(){let j0=performance.now()/1e3-q0,K0=Math.min(j0/l,1),F1=Math.round(I0(b0.r,m0.r,K0)),B2=Math.round(I0(b0.g,m0.g,K0)),b1=Math.round(I0(b0.b,m0.b,K0));g.style.setProperty(d,`rgb(${F1}, ${B2}, ${b1})`),K0>=1&&(clearInterval(hh[d]),hh[d]=void 0)}hh[d]=setInterval(m1,1e3/60)}function rw(A){let r=this.htmlControls.renderer;r.noteTimeSlider.addEventListener("input",()=>{A.noteFallingTimeMs=r.noteTimeSlider.value,wn(r.noteTimeSlider).innerText=`${r.noteTimeSlider.value}ms`}),r.noteTimeSlider.onchange=()=>{this._saveSettings()},r.analyserThicknessSlider.addEventListener("input",()=>{A.lineThickness=parseInt(r.analyserThicknessSlider.value),wn(r.analyserThicknessSlider).innerText=`${r.analyserThicknessSlider.value}px`}),r.analyserThicknessSlider.onchange=()=>{this._saveSettings()},r.analyserFftSlider.addEventListener("input",()=>{let l=Math.pow(2,parseInt(r.analyserFftSlider.value));A.normalAnalyserFft=l,A.drumAnalyserFft=Math.pow(2,Math.min(15,parseInt(r.analyserFftSlider.value)+2)),A.updateFftSize(),wn(r.analyserFftSlider).innerText=`${l}`}),r.analyserFftSlider.onchange=()=>{this._saveSettings()},r.waveMultiplierSlizer.addEventListener("input",()=>{A.waveMultiplier=parseInt(r.waveMultiplierSlizer.value),wn(r.waveMultiplierSlizer).innerText=r.waveMultiplierSlizer.value}),r.waveMultiplierSlizer.onchange=()=>{this._saveSettings()},r.analyserToggler.onclick=()=>{A.renderAnalysers=!A.renderAnalysers,this._saveSettings()},r.noteToggler.onclick=()=>{A.renderNotes=!A.renderNotes,this._saveSettings()},r.activeNoteToggler.onclick=()=>{A.drawActiveNotes=!A.drawActiveNotes,this._saveSettings()},r.visualPitchToggler.onclick=()=>{A.showVisualPitch=!A.showVisualPitch,this._saveSettings()},r.stabilizeWaveformsToggler.onclick=()=>{A.stabilizeWaveforms=!A.stabilizeWaveforms,this._saveSettings()}}function xo(A,r,l){if(r.textContent&&(A.textContent=r.textContent),r.translatePathTitle){if(!l)throw new Error("Translate path title provided but no locale provided.");l.bindObjectProperty(A,"textContent",r.translatePathTitle+".title"),l.bindObjectProperty(A,"title",r.translatePathTitle+".description")}}function nw(A,r){switch(A.type){case"button":let l=document.createElement("button");return xo(l,A,r),p$(A,[l]),l;case"text":let g=document.createElement("p");return xo(g,A,r),p$(A,[g]),g;case"input":let d=document.createElement("div");d.classList.add("notification_input_wrapper");let b=document.createElement("input");xo(b,A,r),b.addEventListener("keydown",_5=>_5.stopPropagation());let I0=document.createElement("label");return xo(I0,A,r),p$(A,[b,I0]),d.append(I0),d.appendChild(b),d;case"file":let b0=document.createElement("label");b0.classList.add("notification_input_wrapper");let m0=document.createElement("input");m0.type="file";let q0=document.createElement("label");q0.classList.add("notification_file_button"),xo(q0,A,r);let m1=document.createElement("label");return xo(m1,A,r),p$(A,[q0,m0,m1]),q0.appendChild(m0),b0.append(m1),b0.appendChild(q0),b0;case"progress":let x=document.createElement("div");x.classList.add("notification_progress_background");let j0=document.createElement("div");return j0.classList.add("notification_progress"),p$(A,[j0,x]),x.appendChild(j0),x;case"toggle":return qD(A,r);case"range":let K0=document.createElement("input");K0.type="range";let F1=document.createElement("label");p$(A,[K0,F1]),xo(F1,A,r);let B2=NB(K0,!1),b1=document.createElement("div");return b1.classList.add("notification_slider_wrapper"),b1.appendChild(F1),b1.appendChild(B2),b1}}function p$(A,r){if(A.attributes)for(let[l,g]of Object.entries(A.attributes))for(let d of r)d.setAttribute(l,g)}function qD(A,r){let l=document.createElement("label");l.classList.add("notification_switch_wrapper");let g=document.createElement("label");xo(g,A,r);let d=document.createElement("input");d.type="checkbox",p$(A,[g,d]);let b=document.createElement("div");b.classList.add("notification_switch"),b.appendChild(d);let I0=document.createElement("div");return I0.classList.add("notification_switch_slider"),b.appendChild(I0),l.appendChild(g),l.appendChild(b),l}var YD=13,JD=0,xm={};function U7(A,r,l=YD,g=!0,d=void 0,b=void 0){let I0=document.createElement("div"),b0=JD++;I0.classList.add("notification"),I0.innerHTML=`
@@ -248,19 +248,19 @@ var gm=(A=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(A,{get:(r,l)=>(
`;for(let g of this.mainDiv.querySelectorAll("*[translate-path]"))l.bindObjectProperty(g,"textContent",g.getAttribute("translate-path"));for(let g of this.mainDiv.querySelectorAll("*[translate-path-title]"))l.bindObjectProperty(g,"textContent",g.getAttribute("translate-path-title")+".title"),l.bindObjectProperty(g,"title",g.getAttribute("translate-path-title")+".description");this.timeoutId=-1,this.visible=!1,this.locale=l}toggleDarkMode(){this.mainDiv.getElementsByClassName("player_info_wrapper")[0].classList.toggle("light_mode")}setTitle(r){document.getElementById("player_info_title").textContent=r}connectSequencer(r){this.seq=r,this.seq.addOnSongChangeEvent(l=>{let g=l.copyright.replaceAll(`
`,""),d=(K0,F1,B2=!0)=>{let b1=document.getElementById(K0);if(F1.length>0)if(b1.parentElement.classList.remove("hidden"),b1.innerHTML="",F1.length>30&&B2){b1.classList.add("marquee");let _5=document.createElement("span");_5.textContent=F1,b1.appendChild(_5)}else b1.textContent=F1;else b1.parentElement.classList.add("hidden")};d("player_info_detail",g),d("player_info_time",f$(this.seq.duration).time),d("player_info_file_name",l.fileName,!1);let b=(K0,F1,B2,b1="")=>this.seq.midiData.RMIDInfo?.[K0]===void 0?F1:b1+B2.decode(this.seq.midiData.RMIDInfo?.[K0]).replace(/\0$/,""),I0=b("IENC","ascii",new TextDecoder),b0=new TextDecoder(I0);d("player_info_album",b("IPRD","",b0)),d("player_info_artist",b("IART","",b0)),d("player_info_genre",b("IGNR","",b0)),d("player_info_creation",b("ICRD","",b0)+b("ICRT","",b0,`
-`)),d("player_info_comment",b("ICMT","",b0));let m0=this.mainDiv.getElementsByTagName("svg")[0],Y0=this.mainDiv.getElementsByTagName("img")[0],m1=document.getElementById("player_info_background_image");if(!l.isEmbedded){m0.style.display="",Y0.style.display="none",m1.style.setProperty("--bg-image","undefined");return}if(l.RMIDInfo.IPIC===void 0){m0.style.display="",Y0.style.display="none",m1.style.setProperty("--bg-image","undefined");return}m0.style.display="none",Y0.style.display="";let F=new Blob([l.RMIDInfo.IPIC.buffer]),j0=URL.createObjectURL(F);Y0.src=j0,m1.style.setProperty("--bg-image",`url('${j0}')`)},"player-js-song-change")}setVisibility(r,l){if(r===this.visible)return;this.visible=r,this.timeoutId&&clearTimeout(this.timeoutId);let g=this.mainDiv;if(r){l.classList.add("out_animation"),this.savedCKWrapperHeight=l.clientHeight;let d=l.clientHeight,b=l.getBoundingClientRect().top;g.style.position="absolute",g.style.top=`${b}px`,g.style.height=`${d}px`,g.style.display="flex",setTimeout(()=>{g.classList.add("player_info_show"),document.body.style.overflow="hidden"},75),this.timeoutId=setTimeout(async()=>{l.style.display="none",g.style.position="",g.style.top="",g.style.height="",document.body.style.overflow=""},Gw*1e3)}else{let d=g.getBoundingClientRect().top;l.style.display="",l.style.position="absolute",l.style.top=`${d}px`,l.style.height=`${this.savedCKWrapperHeight}px`,g.classList.remove("player_info_show"),setTimeout(()=>{l.classList.remove("out_animation"),document.body.style.overflow="hidden"},75),this.timeoutId=setTimeout(()=>{g.style.display="none",l.style.position="",l.style.top="",l.style.height="",document.body.style.overflow=""},Gw*1e3)}}};var Lm=class{constructor(r){this.locale=Q$[r]||Q$[UB],this.fallbackLocale=Q$[UB],this.localeCode=r,this._boundObjectProperties=[]}getLocaleString(r,l=[]){let g=this._resolveLocalePath(r);return l.length>0?this._formatLocale(g,l):g}_applyPropertyInternal(r){if(r.isEdited)return;let l=this._resolveLocalePath(r.localePath);r.formattingArguments.length>0&&(l=this._formatLocale(l,r.formattingArguments)),r.object[r.propertyName]=l}_validatePropertyIntegrity(r){let l=this._resolveLocalePath(r.localePath);r.formattingArguments.length>0&&(l=this._formatLocale(l,r.formattingArguments)),r.object[r.propertyName]!==l&&(r.isEdited=!0)}onLocaleChanged=[];_formatLocale(r,l){return r.replace(/{(\d+)}/g,(g,d)=>typeof l[d]<"u"?l[d]:g)}bindObjectProperty(r,l,g,d=[]){let b={object:r,propertyName:l,localePath:g,formattingArguments:d,isEdited:!1};this._applyPropertyInternal(b),this._boundObjectProperties.push(b)}_resolveLocalePath(r,l=!1){if(!r.startsWith("locale."))throw new Error(`Invalid locale path: ${r} (it should start with "locale.")`);let g=r.split("."),d=l?this.fallbackLocale:this.locale;for(let b=1;b