(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6551,4160],{50794:function(e,t,n){"use strict";var o=n(67294),r=n(36834),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};t.Z=e=>{var{size:t=24,color:n=r.SQ,activeColor:i=r.SK,isActive:a}=e,s=__rest(e,["size","color","activeColor","isActive"]);return o.createElement("svg",Object.assign({width:t,height:t,fill:"none",viewBox:"0 0 24 24"},s),o.createElement("path",{fill:a?i:n,d:"M3.2 19.3a.9.9 0 0 1-.638-.25.86.86 0 0 1-.262-.65v-1.325q0-.775.4-1.375a2.83 2.83 0 0 1 1.075-.95q1.425-.675 2.863-1.062Q8.075 13.3 9.8 13.3t3.163.388q1.437.387 2.862 1.062.675.35 1.075.95t.4 1.375V18.4a.86.86 0 0 1-.262.65.9.9 0 0 1-.638.25zm15.7 0a.9.9 0 0 0 .3-.387q.1-.238.1-.513v-1.45q0-.974-.488-1.863a4.8 4.8 0 0 0-1.362-1.537q1 .15 1.9.462.9.314 1.725.738.775.426 1.2.988t.425 1.212v1.45a.86.86 0 0 1-.262.65.9.9 0 0 1-.638.25zm-9.1-7.6q-1.45 0-2.475-1.038Q6.3 9.625 6.3 8.2q0-1.449 1.025-2.475A3.37 3.37 0 0 1 9.8 4.7q1.449 0 2.475 1.025A3.37 3.37 0 0 1 13.3 8.2q0 1.425-1.025 2.462T9.8 11.7m8.625-3.5q0 1.425-1.025 2.462T14.925 11.7q-.15 0-.413-.038a3 3 0 0 1-.437-.087q.6-.725.913-1.587A5.2 5.2 0 0 0 15.3 8.2q0-.95-.325-1.8a6 6 0 0 0-.9-1.575q.2-.075.425-.1.224-.024.425-.025 1.449 0 2.475 1.025A3.37 3.37 0 0 1 18.425 8.2M3.8 17.8h12v-.725a1 1 0 0 0-.162-.55 1.3 1.3 0 0 0-.488-.425 13 13 0 0 0-2.55-.963q-1.3-.337-2.8-.337t-2.812.337q-1.314.339-2.538.963-.35.175-.5.425t-.15.55zm6-7.6q.824 0 1.413-.588.587-.587.587-1.412 0-.824-.587-1.413A1.93 1.93 0 0 0 9.8 6.2q-.825 0-1.412.587A1.93 1.93 0 0 0 7.8 8.2q0 .825.588 1.412.587.588 1.412.588"}))}},23577:function(e,t,n){"use strict";var o=n(67294),r=n(36834),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};t.Z=e=>{var{size:t=24,color:n=r.SQ,activeColor:i=r.SK,isActive:a}=e,s=__rest(e,["size","color","activeColor","isActive"]);return o.createElement("svg",Object.assign({width:t,height:t,fill:"none",viewBox:"0 0 24 24"},s),o.createElement("path",{fill:a?i:n,d:"M9.3 10.625c-.35 0-.613-.158-.788-.475-.175-.317-.17-.625.013-.925L11.725 4c.183-.3.442-.45.775-.45s.592.15.775.45l3.2 5.225c.183.3.188.608.013.925-.175.317-.438.475-.788.475H9.3zm8.7 11c-1.15 0-2.125-.4-2.925-1.2-.8-.8-1.2-1.775-1.2-2.925s.4-2.125 1.2-2.925c.8-.8 1.775-1.2 2.925-1.2s2.125.4 2.925 1.2c.8.8 1.2 1.775 1.2 2.925s-.4 2.125-1.2 2.925c-.8.8-1.775 1.2-2.925 1.2zm-13.225-.5a.9.9 0 01-.9-.925v-5.425a.898.898 0 01.925-.9h5.425a.87.87 0 01.638.262.9.9 0 01.262.663v5.425a.87.87 0 01-.262.638.9.9 0 01-.663.262H4.775zm13.225-1c.733 0 1.354-.254 1.863-.762.508-.509.762-1.13.762-1.863 0-.733-.254-1.354-.762-1.863A2.536 2.536 0 0018 14.875c-.733 0-1.354.254-1.862.762a2.535 2.535 0 00-.763 1.863c0 .733.254 1.354.763 1.863.508.508 1.129.762 1.862.762zm-12.625-.5h4.25v-4.25h-4.25v4.25zm4.975-10.5h4.3L12.5 5.65l-2.15 3.475z"}))}},25470:function(e,t,n){"use strict";var o=n(67294),r=n(36834),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};t.Z=e=>{var{size:t=24,color:n=r.SQ,activeColor:i=r.SK,isActive:a}=e,s=__rest(e,["size","color","activeColor","isActive"]);return o.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 25 24",fill:"none"},s),o.createElement("path",{d:"M8 4.5c.875 0 1.705.18 2.49.542.785.36 1.455.874 2.01 1.541a5.663 5.663 0 0 1 2.01-1.541A5.887 5.887 0 0 1 17 4.5c1.528 0 2.827.535 3.896 1.604C21.966 7.174 22.5 8.472 22.5 10c0 .486-.059.972-.177 1.458a7.25 7.25 0 0 1-.531 1.459 2.706 2.706 0 0 0-.584-.729 2.922 2.922 0 0 0-.791-.5c.11-.292.194-.577.25-.855A4.25 4.25 0 0 0 20.75 10c0-1.041-.365-1.927-1.094-2.656-.73-.73-1.615-1.094-2.656-1.094-.833 0-1.608.257-2.323.771-.715.514-1.441 1.23-2.177 2.146-.736-.917-1.462-1.632-2.177-2.146C9.608 6.507 8.833 6.25 8 6.25c-1.041 0-1.927.365-2.656 1.094-.73.73-1.094 1.615-1.094 2.656 0 .278.028.556.083.833.056.278.14.563.25.855a3.849 3.849 0 0 0-.781.52c-.243.209-.44.452-.594.73a7.216 7.216 0 0 1-.531-1.469A6.297 6.297 0 0 1 2.5 10c0-1.528.535-2.827 1.604-3.896C5.174 5.034 6.472 4.5 8 4.5ZM3.375 20.333a.843.843 0 0 1-.615-.26.843.843 0 0 1-.26-.615v-.52c0-.625.316-1.132.948-1.521.632-.39 1.455-.584 2.469-.584.153 0 .305.004.458.011.153.007.305.024.458.052a3.413 3.413 0 0 0-.5.989c-.11.355-.166.726-.166 1.115v1.333H3.375Zm5 0a.843.843 0 0 1-.615-.26.843.843 0 0 1-.26-.615V19c0-.903.462-1.635 1.385-2.198.924-.563 2.129-.844 3.615-.844 1.5 0 2.708.281 3.625.844.917.563 1.375 1.295 1.375 2.198v.458a.843.843 0 0 1-.26.615.843.843 0 0 1-.615.26h-8.25Zm10.458 0V19c0-.403-.055-.778-.166-1.125a3.444 3.444 0 0 0-.5-.979 3.35 3.35 0 0 1 .458-.052c.153-.007.305-.011.458-.011 1.014 0 1.837.195 2.469.584.632.389.948.896.948 1.521v.52a.843.843 0 0 1-.26.615.843.843 0 0 1-.615.26h-2.792ZM12.5 17.708c-.708 0-1.35.087-1.927.261-.577.173-.962.378-1.156.614h6.166c-.194-.236-.58-.44-1.156-.614a6.657 6.657 0 0 0-1.927-.261ZM5.875 16.25c-.486 0-.9-.17-1.24-.51a1.69 1.69 0 0 1-.51-1.24c0-.486.17-.9.51-1.24.34-.34.754-.51 1.24-.51s.9.17 1.24.51c.34.34.51.754.51 1.24s-.17.9-.51 1.24c-.34.34-.754.51-1.24.51Zm13.25 0c-.486 0-.9-.17-1.24-.51a1.69 1.69 0 0 1-.51-1.24c0-.486.17-.9.51-1.24.34-.34.754-.51 1.24-.51s.9.17 1.24.51c.34.34.51.754.51 1.24s-.17.9-.51 1.24c-.34.34-.754.51-1.24.51Zm-6.625-.917a2.411 2.411 0 0 1-1.771-.729A2.411 2.411 0 0 1 10 12.833c0-.694.243-1.284.729-1.771a2.411 2.411 0 0 1 1.771-.729c.695 0 1.285.243 1.771.729.486.487.729 1.077.729 1.771 0 .695-.243 1.285-.729 1.771a2.411 2.411 0 0 1-1.771.729Zm0-3.25a.723.723 0 0 0-.531.219.723.723 0 0 0-.219.531c0 .209.073.386.219.532a.725.725 0 0 0 .531.218.725.725 0 0 0 .531-.218.724.724 0 0 0 .219-.532.723.723 0 0 0-.219-.531.723.723 0 0 0-.531-.219Z",fill:a?i:n}))}},29828:function(e,t,n){"use strict";var o=n(67294),r=n(36834),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};t.Z=e=>{var{size:t=24,color:n=r.SQ,activeColor:i=r.SK,isActive:a}=e,s=__rest(e,["size","color","activeColor","isActive"]);return o.createElement("svg",Object.assign({width:t,height:t,fill:"none",viewBox:"0 0 24 24"},s),o.createElement("path",{fill:a?i:n,d:"M10.85 15.35q.525.525 1.375.5t1.225-.6l4-5.8q.225-.325-.05-.587c-.275-.262-.383-.196-.6-.063l-5.8 4q-.575.375-.625 1.2t.475 1.35m-5.5 4.15q-.4 0-.75-.188a1.5 1.5 0 0 1-.575-.562 10.2 10.2 0 0 1-.925-2.175A9 9 0 0 1 2.75 14q0-1.95.75-3.675A9.9 9.9 0 0 1 5.525 7.3a9.4 9.4 0 0 1 3.013-2.05 9.3 9.3 0 0 1 3.712-.75q1.15 0 2.163.237a9 9 0 0 1 1.962.713q.425.225.488.587.062.363-.238.688a.65.65 0 0 1-.412.175q-.263.025-.463-.05a7.7 7.7 0 0 0-1.688-.637A7.5 7.5 0 0 0 12.25 6Q8.925 6 6.588 8.337 4.25 10.675 4.25 14q0 1.05.287 2.075Q4.825 17.1 5.35 18h13.8a7.3 7.3 0 0 0 .838-1.975 8.6 8.6 0 0 0 .262-2.125 7.4 7.4 0 0 0-.212-1.75 7.7 7.7 0 0 0-.638-1.7.8.8 0 0 1-.088-.488.75.75 0 0 1 .263-.437.7.7 0 0 1 .663-.15q.361.1.537.475.475 1 .713 1.975.237.975.262 2.05 0 1.35-.312 2.563a9.7 9.7 0 0 1-.963 2.362q-.2.325-.562.512a1.64 1.64 0 0 1-.763.188z"}))}},47146:function(e,t,n){"use strict";var o=n(67294),r=n(36834),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};t.Z=e=>{var{size:t=24,color:n=r.SQ,activeColor:i=r.SK,isActive:a}=e,s=__rest(e,["size","color","activeColor","isActive"]);return o.createElement("svg",Object.assign({width:t,height:t,fill:"none",viewBox:"0 0 24 24"},s),o.createElement("path",{fill:a?i:n,d:"M13.475 21.5q-2.5 0-4.25-1.75t-1.75-4.25v-.55q-2.025-.25-3.387-1.8T2.725 9.5V4.65a.87.87 0 0 1 .262-.638.87.87 0 0 1 .638-.262h2.1V3.5a.73.73 0 0 1 .75-.75q.325 0 .538.212a.73.73 0 0 1 .212.538v2a.73.73 0 0 1-.75.75.726.726 0 0 1-.75-.75v-.25h-1.5V9.5q0 1.65 1.175 2.825T8.225 13.5c1.65 0 2.042-.392 2.825-1.175q1.175-1.175 1.175-2.825V5.25h-1.5v.25a.73.73 0 0 1-.75.75.726.726 0 0 1-.75-.75v-2a.73.73 0 0 1 .75-.75q.325 0 .538.212a.73.73 0 0 1 .212.538v.25h2.1a.87.87 0 0 1 .638.262.87.87 0 0 1 .262.638V9.5q0 2.1-1.362 3.65t-3.388 1.8v.55q0 1.875 1.313 3.188C11.601 20.001 12.225 20 13.475 20q1.875 0 3.188-1.312c1.313-1.312 1.312-1.938 1.312-3.188v-1.625a2.6 2.6 0 0 1-1.287-.913 2.4 2.4 0 0 1-.513-1.512q0-1.075.75-1.825c.75-.75 1.1-.75 1.8-.75q1.075 0 1.825.75c.75.75.75 1.108.75 1.825q0 .85-.512 1.512-.513.663-1.313.913V15.5q0 2.5-1.75 4.25t-4.25 1.75m5.25-9q.45 0 .763-.312.312-.314.312-.738 0-.45-.312-.762a1.04 1.04 0 0 0-.763-.313q-.45 0-.75.313-.3.312-.3.762 0 .425.3.738.3.312.75.312"}))}},41766:function(e,t,n){var o,r,i,a,s,u,d,_,l,c,p,f,h,m,v;(r=function(){this.init()}).prototype={init:function(){var e=this||i;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||i;if(e=parseFloat(e),t.ctx||p(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,i.ctx.currentTime);for(var n=0;n=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,p()),e},codecs:function(e){return(this||i)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||i;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio){if("undefined"!=typeof Audio)try{var t=new Audio;void 0===t.oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0}try{var t=new Audio;t.muted&&(e.noAudio=!0)}catch(e){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||i,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(t){return e}if(!t||"function"!=typeof t.canPlayType)return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",r=o.match(/OPR\/([0-6].)/g),a=r&&33>parseInt(r[0].split("/")[1],10),s=-1!==o.indexOf("Safari")&&-1===o.indexOf("Chrome"),u=o.match(/Version\/(.*?) /),d=s&&u&&15>parseInt(u[1],10);return e._codecs={mp3:!!(!a&&(n||t.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!d&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!d&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||i;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var unlock=function(t){for(;e._html5AudioPool.length0?s._seek:n._sprite[e][0]/1e3),_=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-d),l=1e3*_/Math.abs(s._rate),c=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3;s._sprite=e,s._ended=!1;var setParams=function(){s._paused=!1,s._seek=d,s._start=c,s._stop=p,s._loop=!!(s._loop||n._sprite[e][2])};if(d>=p){n._ended(s);return}var f=s._node;if(n._webAudio){var playWebAudio=function(){n._playLock=!1,setParams(),n._refreshBuffer(s);var e=s._muted||n._muted?0:s._volume;f.gain.setValueAtTime(e,i.ctx.currentTime),s._playStart=i.ctx.currentTime,void 0===f.bufferSource.start?s._loop?f.bufferSource.noteGrainOn(0,d,86400):f.bufferSource.noteGrainOn(0,d,_):s._loop?f.bufferSource.start(0,d,86400):f.bufferSource.start(0,d,_),l!==1/0&&(n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),l)),t||setTimeout(function(){n._emit("play",s._id),n._loadQueue()},0)};"running"===i.state&&"interrupted"!==i.ctx.state?playWebAudio():(n._playLock=!0,n.once("resume",playWebAudio),n._clearTimer(s._id))}else{var playHtml5=function(){f.currentTime=d,f.muted=s._muted||n._muted||i._muted||f.muted,f.volume=s._volume*i.volume(),f.playbackRate=s._rate;try{var o=f.play();if(o&&"undefined"!=typeof Promise&&(o instanceof Promise||"function"==typeof o.then)?(n._playLock=!0,setParams(),o.then(function(){n._playLock=!1,f._unlocked=!0,t?n._loadQueue():n._emit("play",s._id)}).catch(function(){n._playLock=!1,n._emit("playerror",s._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."),s._ended=!0,s._paused=!0})):t||(n._playLock=!1,setParams(),n._emit("play",s._id)),f.playbackRate=s._rate,f.paused){n._emit("playerror",s._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}"__default"!==e||s._loop?n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),l):(n._endTimers[s._id]=function(){n._ended(s),f.removeEventListener("ended",n._endTimers[s._id],!1)},f.addEventListener("ended",n._endTimers[s._id],!1))}catch(e){n._emit("playerror",s._id,e)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===f.src&&(f.src=n._src,f.load());var h=window&&window.ejecta||!f.readyState&&i._navigator.isCocoonJS;if(f.readyState>=3||h)playHtml5();else{n._playLock=!0,n._state="loading";var listener=function(){n._state="loaded",playHtml5(),f.removeEventListener(i._canPlayEvent,listener,!1)};f.addEventListener(i._canPlayEvent,listener,!1),n._clearTimer(s._id)}}return s._id},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var n=t._getSoundIds(e),o=0;o=0?t=parseInt(r[0],10):e=parseFloat(r[0]):r.length>=2&&(e=parseFloat(r[0]),t=parseInt(r[1],10)),void 0===e||!(e>=0)||!(e<=1))return(n=t?o._soundById(t):o._sounds[0])?n._volume:0;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"volume",action:function(){o.volume.apply(o,r)}}),o;void 0===t&&(o._volume=e),t=o._getSoundIds(t);for(var a=0;at&&s>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(n,e._id),a._emit("fade",e._id))},Math.max(4,d>0?o/d:o))},_stopFade:function(e){var t=this._soundById(e);return t&&t._interval&&(this._webAudio&&t._node.gain.cancelScheduledValues(i.ctx.currentTime),clearInterval(t._interval),t._interval=null,this.volume(t._fadeTo,e),t._fadeTo=null,this._emit("fade",e)),this},loop:function(){var e,t,n,o=arguments;if(0===o.length)return this._loop;if(1===o.length){if("boolean"!=typeof o[0])return!!(n=this._soundById(parseInt(o[0],10)))&&n._loop;e=o[0],this._loop=e}else 2===o.length&&(e=o[0],t=parseInt(o[1],10));for(var r=this._getSoundIds(t),i=0;i=0?t=parseInt(r[0],10):e=parseFloat(r[0]):2===r.length&&(e=parseFloat(r[0]),t=parseInt(r[1],10)),"number"!=typeof e)return(n=o._soundById(t))?n._rate:o._rate;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"rate",action:function(){o.rate.apply(o,r)}}),o;void 0===t&&(o._rate=e),t=o._getSoundIds(t);for(var a=0;a=0?t=parseInt(o[0],10):n._sounds.length&&(t=n._sounds[0]._id,e=parseFloat(o[0])):2===o.length&&(e=parseFloat(o[0]),t=parseInt(o[1],10)),void 0===t)return 0;if("number"==typeof e&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,o)}}),n;var r=n._soundById(t);if(r){if("number"==typeof e&&e>=0){var a=n.playing(t);a&&n.pause(t,!0),r._seek=e,r._ended=!1,n._clearTimer(t),n._webAudio||!r._node||isNaN(r._node.duration)||(r._node.currentTime=e);var seekAndEmit=function(){a&&n.play(t,!0),n._emit("seek",t)};if(a&&!n._webAudio){var emitSeek=function(){n._playLock?setTimeout(emitSeek,0):seekAndEmit()};setTimeout(emitSeek,0)}else seekAndEmit()}else{if(!n._webAudio)return r._node.currentTime;var s=n.playing(t)?i.ctx.currentTime-r._playStart:0,u=r._rateSeek?r._rateSeek-r._seek:0;return r._seek+(u+s*Math.abs(r._rate))}}return n},playing:function(e){if("number"==typeof e){var t=this._soundById(e);return!!t&&!t._paused}for(var n=0;n=0&&i._howls.splice(o,1);var r=!0;for(n=0;n=0){r=!1;break}return u&&r&&delete u[e._src],i.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var r=this["_on"+e];return"function"==typeof t&&r.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),this},off:function(e,t,n){var o=this["_on"+e],r=0;if("number"==typeof t&&(n=t,t=null),t||n)for(r=0;r=0;r--)(!o[r].id||o[r].id===t||"load"===e)&&(setTimeout((function(e){e.call(this,t,n)}).bind(this,o[r].fn),0),o[r].once&&this.off(e,o[r].fn,o[r].id));return this._loadQueue(e),this},_loadQueue:function(e){if(this._queue.length>0){var t=this._queue[0];t.event===e&&(this._queue.shift(),this._loadQueue()),e||t.action()}return this},_ended:function(e){var t=e._sprite;if(!this._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;n--){if(t<=e)return;this._sounds[n]._ended&&(this._webAudio&&this._sounds[n]._node&&this._sounds[n]._node.disconnect(0),this._sounds.splice(n,1),t--)}}},_getSoundIds:function(e){if(void 0!==e)return[e];for(var t=[],n=0;n=0;if(i._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=i._scratchBuffer}catch(e){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(i._navigator&&i._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}},(s=function(e){this._parent=e,this.init()}).prototype={init:function(){var e=this._parent;return this._muted=e._muted,this._loop=e._loop,this._volume=e._volume,this._rate=e._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++i._counter,e._sounds.push(this),this.create(),this},create:function(){var e=this._parent,t=i._muted||this._muted||this._parent._muted?0:this._volume;return e._webAudio?(this._node=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),this._node.gain.setValueAtTime(t,i.ctx.currentTime),this._node.paused=!0,this._node.connect(i.masterGain)):i.noAudio||(this._node=i._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(i._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=e._src,this._node.preload=!0===e._preload?"auto":e._preload,this._node.volume=t*i.volume(),this._node.load()),this},reset:function(){var e=this._parent;return this._muted=e._muted,this._loop=e._loop,this._volume=e._volume,this._rate=e._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++i._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var e=this._parent;e._duration=Math.ceil(10*this._node.duration)/10,0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue()),this._node.removeEventListener(i._canPlayEvent,this._loadFn,!1)},_endListener:function(){var e=this._parent;e._duration===1/0&&(e._duration=Math.ceil(10*this._node.duration)/10,e._sprite.__default[1]===1/0&&(e._sprite.__default[1]=1e3*e._duration),e._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}},u={},d=function(e){var t=e._src;if(u[t]){e._duration=u[t].duration,c(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),r=0;r0?(u[t._src]=e,c(t,e)):error()};"undefined"!=typeof Promise&&1===i.ctx.decodeAudioData.length?i.ctx.decodeAudioData(e).then(success).catch(error):i.ctx.decodeAudioData(e,success,error)},c=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},p=function(){if(i.usingWebAudio){try{"undefined"!=typeof AudioContext?i.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?i.ctx=new webkitAudioContext:i.usingWebAudio=!1}catch(e){i.usingWebAudio=!1}i.ctx||(i.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(i._navigator&&i._navigator.platform),t=i._navigator&&i._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var o=/safari/.test(i._navigator&&i._navigator.userAgent.toLowerCase());i._navigator&&!o&&(i.usingWebAudio=!1)}i.usingWebAudio&&(i.masterGain=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),i.masterGain.gain.setValueAtTime(i._muted?0:i._volume,i.ctx.currentTime),i.masterGain.connect(i.ctx.destination)),i._setup()}},void 0!==(o=(function(){return{Howler:i,Howl:a}}).apply(t,[]))&&(e.exports=o),t.Howler=i,t.Howl=a,void 0!==n.g?(n.g.HowlerGlobal=r,n.g.Howler=i,n.g.Howl=a,n.g.Sound=s):"undefined"!=typeof window&&(window.HowlerGlobal=r,window.Howler=i,window.Howl=a,window.Sound=s),HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){if(!this.ctx||!this.ctx.listener)return this;for(var t=this._howls.length-1;t>=0;t--)this._howls[t].stereo(e);return this},HowlerGlobal.prototype.pos=function(e,t,n){return this.ctx&&this.ctx.listener?(t="number"!=typeof t?this._pos[1]:t,n="number"!=typeof n?this._pos[2]:n,"number"!=typeof e)?this._pos:(this._pos=[e,t,n],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this):this},HowlerGlobal.prototype.orientation=function(e,t,n,o,r,i){if(!this.ctx||!this.ctx.listener)return this;var a=this._orientation;return(t="number"!=typeof t?a[1]:t,n="number"!=typeof n?a[2]:n,o="number"!=typeof o?a[3]:o,r="number"!=typeof r?a[4]:r,i="number"!=typeof i?a[5]:i,"number"!=typeof e)?a:(this._orientation=[e,t,n,o,r,i],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(o,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(r,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(e,t,n,o,r,i),this)},Howl.prototype.init=(f=Howl.prototype.init,function(e){return this._orientation=e.orientation||[1,0,0],this._stereo=e.stereo||null,this._pos=e.pos||null,this._pannerAttr={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:360,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:360,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:0,distanceModel:void 0!==e.distanceModel?e.distanceModel:"inverse",maxDistance:void 0!==e.maxDistance?e.maxDistance:1e4,panningModel:void 0!==e.panningModel?e.panningModel:"HRTF",refDistance:void 0!==e.refDistance?e.refDistance:1,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:1},this._onstereo=e.onstereo?[{fn:e.onstereo}]:[],this._onpos=e.onpos?[{fn:e.onpos}]:[],this._onorientation=e.onorientation?[{fn:e.onorientation}]:[],f.call(this,e)}),Howl.prototype.stereo=function(e,t){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,t)}}),n;var o=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===t){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0]}for(var r=n._getSoundIds(t),i=0;i=0||(r[n]=e[n]);return r}(o=r||(r={}))[o.START_LOAD=0]="START_LOAD",o[o.ON_LOAD=1]="ON_LOAD",o[o.ON_PLAY=2]="ON_PLAY",o[o.ON_END=3]="ON_END",o[o.ON_PAUSE=4]="ON_PAUSE",o[o.ON_STOP=5]="ON_STOP",o[o.ON_PLAY_ERROR=6]="ON_PLAY_ERROR",o[o.ON_LOAD_ERROR=7]="ON_LOAD_ERROR";var s={loading:!0,playing:!1,stopped:!0,ended:!1,error:null,duration:0,ready:!1};function reducer(e,t){switch(t.type){case r.START_LOAD:return _extends({},e,{loading:!0,stopped:!0,ready:!1,error:null,duration:0});case r.ON_LOAD:return _extends({},e,{loading:!1,duration:t.duration,ended:!1,ready:!0});case r.ON_PLAY:return _extends({},e,{playing:!0,ended:!1,stopped:!1});case r.ON_STOP:return _extends({},e,{stopped:!0,playing:!1});case r.ON_END:return _extends({},e,{stopped:!0,playing:!1,ended:!0});case r.ON_PAUSE:return _extends({},e,{playing:!1});case r.ON_PLAY_ERROR:return _extends({},e,{playing:!1,stopped:!0,error:t.error});case r.ON_LOAD_ERROR:return _extends({},e,{playing:!1,stopped:!0,loading:!1,error:t.error});default:return e}}var u=i.createContext(null),d=i.createContext({position:0,setPosition:function(){}}),_=["src","autoplay","html5"];function AudioPlayerProvider(e){var t=e.children,n=e.value,o=(0,i.useState)(null),l=o[0],c=o[1],p=(0,i.useReducer)(reducer,s),f=p[0],h=f.loading,m=f.error,v=f.playing,y=f.stopped,A=f.duration,g=f.ready,b=f.ended,w=p[1],x=(0,i.useRef)(),T=(0,i.useRef)(),O=(0,i.useState)(0),S=O[0],k=O[1],P=(0,i.useMemo)(function(){return{position:S,setPosition:k}},[S,k]),I=(0,i.useCallback)(function(e){return new a.Howl(e)},[]),E=(0,i.useCallback)(function(e){var t=e.src,n=e.autoplay,o=e.html5,i=_objectWithoutPropertiesLoose(e,_),a=!1;if(x.current){var s,u=x.current._src;if((Array.isArray(u)?u[0]:u)===t)return;h?(T.current=x.current,T.current.once("load",function(){var e;null===(e=T.current)||void 0===e||e.unload()})):(T.current=x.current,null===(s=T.current)||void 0===s||s.unload()),(a=x.current.playing())&&(x.current.stop(),x.current.off(),x.current=void 0)}w({type:r.START_LOAD});var d=I(_extends({src:t,autoplay:a||void 0!==n&&n,html5:void 0!==o&&o},i));"loaded"===d._state&&w({type:r.ON_LOAD,duration:d.duration()}),d.on("load",function(){w({type:r.ON_LOAD,duration:d.duration()})}),d.on("play",function(){w({type:r.ON_PLAY})}),d.on("end",function(){w({type:r.ON_END})}),d.on("pause",function(){w({type:r.ON_PAUSE})}),d.on("stop",function(){w({type:r.ON_STOP})}),d.on("playerror",function(e,t){w({type:r.ON_PLAY_ERROR,error:Error("[Play error] "+t)})}),d.on("loaderror",function(e,t){w({type:r.ON_LOAD_ERROR,error:Error("[Load error] "+t)})}),c(d),x.current=d},[I,h]);(0,i.useEffect)(function(){return function(){x.current&&x.current.unload()}},[]);var L=(0,i.useMemo)(function(){return n||{player:l,load:E,error:m,loading:h,playing:v,stopped:y,ready:g,duration:A,ended:b}},[h,m,v,y,E,n,l,g,A,b]);return i.createElement(u.Provider,{value:L},i.createElement(d.Provider,{value:P},t))}var l=["player","load"],c=["src"],noop=function(){},useAudioPlayer=function(e){var t=(0,i.useContext)(u),n=t.player,o=t.load,r=_objectWithoutPropertiesLoose(t,l);(0,i.useEffect)(function(){var t=e||{},n=t.src,r=_objectWithoutPropertiesLoose(t,c);n&&o(_extends({src:n},r))},[e,o]);var a=(0,i.useCallback)(function(){n&&(n.playing()?n.pause():n.play())},[n]),s=(0,i.useMemo)(function(){return{rate:n?n.rate.bind(n):noop,play:n?n.play.bind(n):noop,pause:n?n.pause.bind(n):noop,stop:n?n.stop.bind(n):noop,mute:n?n.mute.bind(n):noop,volume:n?n.volume.bind(n):noop,fade:n?n.fade.bind(n):noop}},[n]);return(0,i.useMemo)(function(){return _extends({},r,s,{player:n,load:o,togglePlayPause:a})},[r,n,s,o,a])},p="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,useAudioPosition=function(e){void 0===e&&(e={});var t=e.highRefreshRate,n=void 0!==t&&t,o=(0,i.useContext)(u),r=o.player,a=o.playing,s=o.stopped,_=o.duration,l=(0,i.useContext)(d),c=l.position,f=l.setPosition,h=(0,i.useRef)();(0,i.useEffect)(function(){r&&f(r.seek())},[r,f,s]),(0,i.useEffect)(function(){var e;return!n&&r&&a&&(e=window.setInterval(function(){return f(r.seek())},1e3)),function(){return clearTimeout(e)}},[n,r,a,f]),p(function(){return n&&r&&a&&(h.current=requestAnimationFrame(function animate(){f(null==r?void 0:r.seek()),h.current=requestAnimationFrame(animate)})),function(){h.current&&cancelAnimationFrame(h.current)}},[n,r,a,f]);var m=(0,i.useCallback)(function(e){if(!r)return 0;var t=r.seek(e).seek();return f(t),t},[r,f]),v=(0,i.useMemo)(function(){return c/_*100||0},[_,c]);return{position:c,duration:_,seek:m,percentComplete:v}}}}]);