import{bl as s,d as h,bm as B,bn as I,bo as V,w as m,bp as z,h as i,bq as L,a5 as T,br as d,bs as $,at as b,bt as A,bk as N,bu as R,l as M,n as U,m as n,V as g}from"./index-30e60f49.js";function q(e){return["top","bottom","right","left","center"].includes(e)}var D={show:{type:Boolean,default:!1},position:{type:String,default:"center",validator:q},transition:{type:String},overlay:{type:Boolean,default:!0},overlayClass:{type:String},overlayStyle:{type:Object},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},defaultStyle:{type:Boolean,default:!0},teleport:{type:String},onOpen:s(),onOpened:s(),onClose:s(),onClosed:s(),onClickOverlay:s(),"onUpdate:show":s(),onRouteChange:s()};function f(){return f=Object.assign?Object.assign.bind():function(e){for(var a=1;ae.show,3),{disabled:O}=I(),C=()=>{var{closeOnClickOverlay:t,onClickOverlay:o}=e;d(o),t&&d(e["onUpdate:show"],!1)};V(()=>e.show,()=>e.lockScroll),m(()=>e.show,t=>{t?d(e.onOpen):d(e.onClose)}),z(()=>d(e.onRouteChange));var w=()=>{var{overlayClass:t="",overlayStyle:o}=e;return i("div",{class:p(r("overlay"),t),style:f({zIndex:c.value-1},o),onClick:C},null)},k=()=>i("div",N({class:p(r("content"),r("--"+e.position),[e.defaultStyle,r("--content-background-color")],[e.defaultStyle,r("$-elevation--3")]),style:{zIndex:c.value}},u),[d(l.default)]),y=()=>{var{onOpened:t,onClosed:o,show:S,overlay:x,transition:P,position:j}=e;return i(b,{name:r("$-fade"),onAfterEnter:t,onAfterLeave:o},{default:()=>[$(i("div",{class:p(r("$--box"),r()),style:{zIndex:c.value-2}},[x&&w(),i(b,{name:P||r("$-pop-"+j)},{default:()=>[S&&k()]})]),[[R,S]])]})};return()=>{var{teleport:t}=e;if(t){var o;return i(L,{to:t,disabled:O.value},E(o=y())?o:{default:()=>[o]})}return y()}}});v.install=function(e){e.component(v.name,v)};const F=h({name:"measureSpeed",setup(){const e=M(!1),a=U({speed:n.speed,originSpeed:n.originSpeed});return m(()=>n.section.length,()=>{if(n.modeType==="practise"){if(!e.value&&n.section.length===2){e.value=!0,a.speed=n.speed;const l=n.section[0].beatSpeed;n.originSpeed=l,g(l)}e.value&&n.section.length===0&&(e.value=!1,n.originSpeed=a.originSpeed,g(a.speed))}}),()=>i("div",null,null)}});export{F as M,v as P};