12345 |
- import{c1 as Be,c2 as Bt,c3 as hn,l as N,c4 as mn,bV as ot,c5 as Vt,af as dt,c6 as Lt,aU as J,bk as F,by as te,bw as X,d as K,bE as Mt,n as Ae,e as $,bz as Dt,bi as Le,c7 as bn,w as H,br as Me,f as d,bH as Ye,bG as Se,aX as re,bx as G,bh as ee,a7 as yn,bn as jt,bu as zt,bp as Pe,c8 as Nt,c9 as pn,b3 as wn,c as De,ca as Wt,cb as Ft,as as Z,bs as Xe,cc as _e,bj as He,bl as et,cd as vt,bI as Ie,ce as xn,cf as Ht,cg as pt,bC as Ze,bv as qt,bU as Sn,ch as Cn,ci as kn,bo as gt,bK as Yt,bN as de,cj as Xt,ck as Ut,cl as Kt,bL as On,I as Te,cm as Tn,cn as lt,co as En,bR as In,cp as Rn,cq as wt,cr as An,cs as Pn,k as st,ct as $n,bY as Gt,bB as _n,cu as Bn,cv as Vn,cw as Zt,bq as Ln,J as Mn,P as Dn,F as Jt,bm as jn,cx as zn,bA as xt,cy as Nn,cz as Wn,cA as pe,cB as Fn,cC as Hn,cD as qn,cE as Yn,cF as Xn,V as Un,cG as ke,ah as St,cH as Kn,o as Gn,m as me,b9 as Zn}from"./index-369af630.js";function Jn(e,t,n){let i=0;const a=e.scrollLeft,r=n===0?1:Math.round(n*1e3/16);function c(){e.scrollLeft+=(t-a)/r,++i<r&&Be(c)}c()}function Qn(e,t,n,i){let a=Bt(e);const r=a<t,c=n===0?1:Math.round(n*1e3/16),u=(t-a)/c;function l(){a+=u,(r&&a>t||!r&&a<t)&&(a=t),hn(e,a),r&&a<t||!r&&a>t?Be(l):i&&Be(i)}l()}function ea(){const e=N([]),t=[];return mn(()=>{e.value=[]}),[e,i=>(t[i]||(t[i]=a=>{e.value[i]=a}),t[i])]}function Qt(e,t){if(!ot||!window.IntersectionObserver)return;const n=new IntersectionObserver(r=>{t(r[0].intersectionRatio>0)},{root:document.body}),i=()=>{e.value&&n.observe(e.value)},a=()=>{e.value&&n.unobserve(e.value)};Vt(a),dt(a),Lt(i)}const[ta,na]=J("sticky"),aa={zIndex:F,position:te("top"),container:Object,offsetTop:X(0),offsetBottom:X(0)};var ra=K({name:ta,props:aa,emits:["scroll","change"],setup(e,{emit:t,slots:n}){const i=N(),a=Mt(i),r=Ae({fixed:!1,width:0,height:0,transform:0}),c=$(()=>Dt(e.position==="top"?e.offsetTop:e.offsetBottom)),u=$(()=>{const{fixed:f,height:m,width:y}=r;if(f)return{width:`${y}px`,height:`${m}px`}}),l=$(()=>{if(!r.fixed)return;const f=Le(bn(e.zIndex),{width:`${r.width}px`,height:`${r.height}px`,[e.position]:`${c.value}px`});return r.transform&&(f.transform=`translate3d(0, ${r.transform}px, 0)`),f}),v=f=>t("scroll",{scrollTop:f,isFixed:r.fixed}),o=()=>{if(!i.value||Ye(i))return;const{container:f,position:m}=e,y=Se(i),w=Bt(window);if(r.width=y.width,r.height=y.height,m==="top")if(f){const p=Se(f),b=p.bottom-c.value-r.height;r.fixed=c.value>y.top&&p.bottom>0,r.transform=b<0?b:0}else r.fixed=c.value>y.top;else{const{clientHeight:p}=document.documentElement;if(f){const b=Se(f),E=p-b.top-c.value-r.height;r.fixed=p-c.value<y.bottom&&p>b.top,r.transform=E<0?-E:0}else r.fixed=p-c.value<y.bottom}v(w)};return H(()=>r.fixed,f=>t("change",f)),Me("scroll",o,{target:a,passive:!0}),Qt(i,o),()=>{var f;return d("div",{ref:i,style:u.value},[d("div",{class:na({fixed:r.fixed}),style:l.value},[(f=n.default)==null?void 0:f.call(n)])])}}});const ia=re(ra),[oa,Ct]=J("tab");var la=K({name:oa,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:F,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:G},setup(e,{slots:t}){const n=$(()=>{const a={},{type:r,color:c,disabled:u,isActive:l,activeColor:v,inactiveColor:o}=e;c&&r==="card"&&(a.borderColor=c,u||(l?a.backgroundColor=c:a.color=c));const m=l?v:o;return m&&(a.color=m),a}),i=()=>{const a=d("span",{class:Ct("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||ee(e.badge)&&e.badge!==""?d(yn,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[a]}):a};return()=>d("div",{id:e.id,role:"tab",class:[Ct([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:n.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[i()])}});const[en,ze]=J("swipe"),sa={loop:G,width:F,height:F,vertical:Boolean,autoplay:X(0),duration:X(500),touchable:G,lazyRender:Boolean,initialSwipe:X(0),indicatorColor:String,showIndicators:G,stopPropagation:G},tn=Symbol(en);var ca=K({name:en,props:sa,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:n}){const i=N(),a=N(),r=Ae({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let c=!1;const u=jt(),{children:l,linkChildren:v}=zt(tn),o=$(()=>l.length),f=$(()=>r[e.vertical?"height":"width"]),m=$(()=>e.vertical?u.deltaY.value:u.deltaX.value),y=$(()=>r.rect?(e.vertical?r.rect.height:r.rect.width)-f.value*o.value:0),w=$(()=>f.value?Math.ceil(Math.abs(y.value)/f.value):o.value),p=$(()=>o.value*f.value),b=$(()=>(r.active+o.value)%o.value),E=$(()=>{const T=e.vertical?"vertical":"horizontal";return u.direction.value===T}),x=$(()=>{const T={transitionDuration:`${r.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${r.offset}px)`};if(f.value){const j=e.vertical?"height":"width",z=e.vertical?"width":"height";T[j]=`${p.value}px`,T[z]=e[z]?`${e[z]}px`:""}return T}),I=T=>{const{active:j}=r;return T?e.loop?He(j+T,-1,o.value):He(j+T,0,w.value):j},B=(T,j=0)=>{let z=T*f.value;e.loop||(z=Math.min(z,-y.value));let h=j-z;return e.loop||(h=He(h,y.value,0)),h},R=({pace:T=0,offset:j=0,emitChange:z})=>{if(o.value<=1)return;const{active:h}=r,C=I(T),s=B(C,j);if(e.loop){if(l[0]&&s!==y.value){const k=s<y.value;l[0].setOffset(k?p.value:0)}if(l[o.value-1]&&s!==0){const k=s>0;l[o.value-1].setOffset(k?-p.value:0)}}r.active=C,r.offset=s,z&&C!==h&&t("change",b.value)},A=()=>{r.swiping=!0,r.active<=-1?R({pace:o.value}):r.active>=o.value&&R({pace:-o.value})},L=()=>{A(),u.reset(),_e(()=>{r.swiping=!1,R({pace:-1,emitChange:!0})})},D=()=>{A(),u.reset(),_e(()=>{r.swiping=!1,R({pace:1,emitChange:!0})})};let Y;const g=()=>clearTimeout(Y),S=()=>{g(),+e.autoplay>0&&o.value>1&&(Y=setTimeout(()=>{D(),S()},+e.autoplay))},P=(T=+e.initialSwipe)=>{if(!i.value)return;const j=()=>{var z,h;if(!Ye(i)){const C={width:i.value.offsetWidth,height:i.value.offsetHeight};r.rect=C,r.width=+((z=e.width)!=null?z:C.width),r.height=+((h=e.height)!=null?h:C.height)}o.value&&(T=Math.min(o.value-1,T),T===-1&&(T=o.value-1)),r.active=T,r.swiping=!0,r.offset=B(T),l.forEach(C=>{C.setOffset(0)}),S()};Ye(i)?Z().then(j):j()},M=()=>P(r.active);let W;const U=T=>{!e.touchable||T.touches.length>1||(u.start(T),c=!1,W=Date.now(),g(),A())},ye=T=>{e.touchable&&r.swiping&&(u.move(T),E.value&&(!e.loop&&(r.active===0&&m.value>0||r.active===o.value-1&&m.value<0)||(Xe(T,e.stopPropagation),R({offset:m.value}),c||(t("dragStart",{index:b.value}),c=!0))))},se=()=>{if(!e.touchable||!r.swiping)return;const T=Date.now()-W,j=m.value/T;if((Math.abs(j)>.25||Math.abs(m.value)>f.value/2)&&E.value){const h=e.vertical?u.offsetY.value:u.offsetX.value;let C=0;e.loop?C=h>0?m.value>0?-1:1:0:C=-Math[m.value>0?"ceil":"floor"](m.value/f.value),R({pace:C,emitChange:!0})}else m.value&&R({pace:0});c=!1,r.swiping=!1,t("dragEnd",{index:b.value}),S()},oe=(T,j={})=>{A(),u.reset(),_e(()=>{let z;e.loop&&T===o.value?z=r.active===0?0:T:z=T%o.value,j.immediate?_e(()=>{r.swiping=!1}):r.swiping=!1,R({pace:z-r.active,emitChange:!0})})},he=(T,j)=>{const z=j===b.value,h=z?{backgroundColor:e.indicatorColor}:void 0;return d("i",{style:h,class:ze("indicator",{active:z})},null)},ce=()=>{if(n.indicator)return n.indicator({active:b.value,total:o.value});if(e.showIndicators&&o.value>1)return d("div",{class:ze("indicators",{vertical:e.vertical})},[Array(o.value).fill("").map(he)])};return Pe({prev:L,next:D,state:r,resize:M,swipeTo:oe}),v({size:f,props:e,count:o,activeIndicator:b}),H(()=>e.initialSwipe,T=>P(+T)),H(o,()=>P(r.active)),H(()=>e.autoplay,S),H([Nt,pn],M),H(wn(),T=>{T==="visible"?S():g()}),De(P),Wt(()=>P(r.active)),Ft(()=>P(r.active)),Vt(g),dt(g),Me("touchmove",ye,{target:a}),()=>{var T;return d("div",{ref:i,class:ze()},[d("div",{ref:a,style:x.value,class:ze("track",{vertical:e.vertical}),onTouchstartPassive:U,onTouchend:se,onTouchcancel:se},[(T=n.default)==null?void 0:T.call(n)]),ce()])}}});const ua=re(ca),[fa,kt]=J("tabs");var da=K({name:fa,props:{count:et(Number),inited:Boolean,animated:Boolean,duration:et(F),swipeable:Boolean,lazyRender:Boolean,currentIndex:et(Number)},emits:["change"],setup(e,{emit:t,slots:n}){const i=N(),a=u=>t("change",u),r=()=>{var u;const l=(u=n.default)==null?void 0:u.call(n);return e.animated||e.swipeable?d(ua,{ref:i,loop:!1,class:kt("track"),duration:+e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:a},{default:()=>[l]}):l},c=u=>{const l=i.value;l&&l.state.active!==u&&l.swipeTo(u,{immediate:!e.inited})};return H(()=>e.currentIndex,c),De(()=>{c(e.currentIndex)}),Pe({swipeRef:i}),()=>d("div",{class:kt("content",{animated:e.animated||e.swipeable})},[r()])}});const[nn,Ne]=J("tabs"),va={type:te("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:X(0),duration:X(.3),animated:Boolean,ellipsis:G,swipeable:Boolean,scrollspy:Boolean,offsetTop:X(0),background:String,lazyRender:G,lineWidth:F,lineHeight:F,beforeChange:Function,swipeThreshold:X(5),titleActiveColor:String,titleInactiveColor:String},an=Symbol(nn);var ga=K({name:nn,props:va,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:t,slots:n}){let i,a,r;const c=N(),u=N(),l=N(),v=N(),o=vt(),f=Mt(c),[m,y]=ea(),{children:w,linkChildren:p}=zt(an),b=Ae({inited:!1,position:"",lineStyle:{},currentIndex:-1}),E=$(()=>w.length>+e.swipeThreshold||!e.ellipsis||e.shrink),x=$(()=>({borderColor:e.color,background:e.background})),I=(h,C)=>{var s;return(s=h.name)!=null?s:C},B=$(()=>{const h=w[b.currentIndex];if(h)return I(h,b.currentIndex)}),R=$(()=>Dt(e.offsetTop)),A=$(()=>e.sticky?R.value+i:0),L=h=>{const C=u.value,s=m.value;if(!E.value||!C||!s||!s[b.currentIndex])return;const k=s[b.currentIndex].$el,O=k.offsetLeft-(C.offsetWidth-k.offsetWidth)/2;Jn(C,O,h?0:+e.duration)},D=()=>{const h=b.inited;Z(()=>{const C=m.value;if(!C||!C[b.currentIndex]||e.type!=="line"||Ye(c.value))return;const s=C[b.currentIndex].$el,{lineWidth:k,lineHeight:O}=e,_=s.offsetLeft+s.offsetWidth/2,V={width:Ie(k),backgroundColor:e.color,transform:`translateX(${_}px) translateX(-50%)`};if(h&&(V.transitionDuration=`${e.duration}s`),ee(O)){const q=Ie(O);V.height=q,V.borderRadius=q}b.lineStyle=V})},Y=h=>{const C=h<b.currentIndex?-1:1;for(;h>=0&&h<w.length;){if(!w[h].disabled)return h;h+=C}},g=(h,C)=>{const s=Y(h);if(!ee(s))return;const k=w[s],O=I(k,s),_=b.currentIndex!==null;b.currentIndex!==s&&(b.currentIndex=s,C||L(),D()),O!==e.active&&(t("update:active",O),_&&t("change",O,k.title)),r&&!e.scrollspy&&Ht(Math.ceil(pt(c.value)-R.value))},S=(h,C)=>{const s=w.find((O,_)=>I(O,_)===h),k=s?w.indexOf(s):0;g(k,C)},P=(h=!1)=>{if(e.scrollspy){const C=w[b.currentIndex].$el;if(C&&f.value){const s=pt(C,f.value)-A.value;a=!0,Qn(f.value,s,h?0:+e.duration,()=>{a=!1})}}},M=(h,C,s)=>{const{title:k,disabled:O}=w[C],_=I(w[C],C);O||(Sn(e.beforeChange,{args:[_],done:()=>{g(C),P()}}),Cn(h)),t("clickTab",{name:_,title:k,event:s,disabled:O})},W=h=>{r=h.isFixed,t("scroll",h)},U=h=>{Z(()=>{S(h),P(!0)})},ye=()=>{for(let h=0;h<w.length;h++){const{top:C}=Se(w[h].$el);if(C>A.value)return h===0?0:h-1}return w.length-1},se=()=>{if(e.scrollspy&&!a){const h=ye();g(h)}},oe=()=>w.map((h,C)=>d(la,Ze({key:h.id,id:`${o}-${C}`,ref:y(C),type:e.type,color:e.color,style:h.titleStyle,class:h.titleClass,shrink:e.shrink,isActive:C===b.currentIndex,controls:h.id,scrollable:E.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:s=>M(h,C,s)},qt(h,["dot","badge","title","disabled","showZeroBadge"])),{title:h.$slots.title})),he=()=>{if(e.type==="line"&&w.length)return d("div",{class:Ne("line"),style:b.lineStyle},null)},ce=()=>{var h,C,s;const{type:k,border:O,sticky:_}=e,V=[d("div",{ref:_?void 0:l,class:[Ne("wrap"),{[xn]:k==="line"&&O}]},[d("div",{ref:u,role:"tablist",class:Ne("nav",[k,{shrink:e.shrink,complete:E.value}]),style:x.value,"aria-orientation":"horizontal"},[(h=n["nav-left"])==null?void 0:h.call(n),oe(),he(),(C=n["nav-right"])==null?void 0:C.call(n)])]),(s=n["nav-bottom"])==null?void 0:s.call(n)];return _?d("div",{ref:l},[V]):V};H([()=>e.color,Nt],D),H(()=>e.active,h=>{h!==B.value&&S(h)}),H(()=>w.length,()=>{b.inited&&(S(e.active),D(),Z(()=>{L(!0)}))});const T=()=>{S(e.active,!0),Z(()=>{b.inited=!0,l.value&&(i=Se(l.value).height),L(!0)})},j=(h,C)=>t("rendered",h,C);return Pe({resize:()=>{D(),Z(()=>{var h,C;return(C=(h=v.value)==null?void 0:h.swipeRef.value)==null?void 0:C.resize()})},scrollTo:U}),Wt(D),Ft(D),Lt(T),Qt(c,D),Me("scroll",se,{target:f,passive:!0}),p({id:o,props:e,setLine:D,onRendered:j,currentName:B,scrollIntoView:L}),()=>d("div",{ref:c,class:Ne([e.type])},[e.sticky?d(ia,{container:c.value,offsetTop:R.value,onScroll:W},{default:()=>[ce()]}):ce(),d(da,{ref:v,count:w.length,inited:b.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:b.currentIndex,onChange:g},{default:()=>{var h;return[(h=n.default)==null?void 0:h.call(n)]}})])}});const rn=Symbol(),ri=()=>kn(rn,null),[ha,ma]=J("swipe-item");var ba=K({name:ha,setup(e,{slots:t}){let n;const i=Ae({offset:0,inited:!1,mounted:!1}),{parent:a,index:r}=gt(tn);if(!a)return;const c=$(()=>{const v={},{vertical:o}=a.props;return a.size.value&&(v[o?"height":"width"]=`${a.size.value}px`),i.offset&&(v.transform=`translate${o?"Y":"X"}(${i.offset}px)`),v}),u=$(()=>{const{loop:v,lazyRender:o}=a.props;if(!o||n)return!0;if(!i.mounted)return!1;const f=a.activeIndicator.value,m=a.count.value-1,y=f===0&&v?m:f-1,w=f===m&&v?0:f+1;return n=r.value===f||r.value===y||r.value===w,n}),l=v=>{i.offset=v};return De(()=>{Z(()=>{i.mounted=!0})}),Pe({setOffset:l}),()=>{var v;return d("div",{class:ma(),style:c.value},[u.value?(v=t.default)==null?void 0:v.call(t):null])}}});const ya=re(ba),[pa,tt]=J("tab"),wa=Le({},Yt,{dot:Boolean,name:F,badge:F,title:String,disabled:Boolean,titleClass:de,titleStyle:[String,Object],showZeroBadge:G});var xa=K({name:pa,props:wa,setup(e,{slots:t}){const n=vt(),i=N(!1),{parent:a,index:r}=gt(an);if(!a)return;const c=()=>{var o;return(o=e.name)!=null?o:r.value},u=()=>{i.value=!0,a.props.lazyRender&&Z(()=>{a.onRendered(c(),e.title)})},l=$(()=>{const o=c()===a.currentName.value;return o&&!i.value&&u(),o}),v=N(!l.value);return H(l,o=>{o?v.value=!1:_e(()=>{v.value=!0})}),H(()=>e.title,()=>{a.setLine(),a.scrollIntoView()}),Xt(rn,l),()=>{var o;const f=`${a.id}-${r.value}`,{animated:m,swipeable:y,scrollspy:w,lazyRender:p}=a.props;if(!t.default&&!m)return;const b=w||l.value;if(m||y)return d(ya,{id:n,role:"tabpanel",class:tt("panel-wrapper",{inactive:v.value}),tabindex:l.value?0:-1,"aria-hidden":!l.value,"aria-labelledby":f},{default:()=>{var I;return[d("div",{class:tt("panel")},[(I=t.default)==null?void 0:I.call(t)])]}});const x=i.value||w||!p?(o=t.default)==null?void 0:o.call(t):null;return Pe({id:n}),Ut(d("div",{id:n,role:"tabpanel",class:tt("panel"),tabindex:b?0:-1,"aria-labelledby":f},[x]),[[Kt,b]])}}});const ii=re(xa),oi=re(ga),[Sa,Oe]=J("cell"),on={tag:te("div"),icon:String,size:String,title:F,value:F,label:F,center:Boolean,isLink:Boolean,border:G,required:Boolean,iconPrefix:String,valueClass:de,labelClass:de,titleClass:de,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},Ca=Le({},on,Yt);var ka=K({name:Sa,props:Ca,setup(e,{slots:t}){const n=On(),i=()=>{if(t.label||ee(e.label))return d("div",{class:[Oe("label"),e.labelClass]},[t.label?t.label():e.label])},a=()=>{var l;if(t.title||ee(e.title)){const v=(l=t.title)==null?void 0:l.call(t);return Array.isArray(v)&&v.length===0?void 0:d("div",{class:[Oe("title"),e.titleClass],style:e.titleStyle},[v||d("span",null,[e.title]),i()])}},r=()=>{const l=t.value||t.default;if(l||ee(e.value))return d("div",{class:[Oe("value"),e.valueClass]},[l?l():d("span",null,[e.value])])},c=()=>{if(t.icon)return t.icon();if(e.icon)return d(Te,{name:e.icon,class:Oe("left-icon"),classPrefix:e.iconPrefix},null)},u=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const l=e.arrowDirection&&e.arrowDirection!=="right"?`arrow-${e.arrowDirection}`:"arrow";return d(Te,{name:l,class:Oe("right-icon")},null)}};return()=>{var l;const{tag:v,size:o,center:f,border:m,isLink:y,required:w}=e,p=(l=e.clickable)!=null?l:y,b={center:f,required:w,clickable:p,borderless:!m};return o&&(b[o]=!!o),d(v,{class:Oe(b),role:p?"button":void 0,tabindex:p?0:void 0,onClick:n},{default:()=>{var E;return[c(),a(),r(),u(),(E=t.extra)==null?void 0:E.call(t)]}})}}});const Oa=re(ka);function ln(e){return Array.isArray(e)?!e.length:e===0?!1:!e}function Ta(e,t){if(ln(e)){if(t.required)return!1;if(t.validateEmpty===!1)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}function Ea(e,t){return new Promise(n=>{const i=t.validator(e,t);if(En(i)){i.then(n);return}n(i)})}function Ot(e,t){const{message:n}=t;return In(n)?n(e,t):n||""}function Ia({target:e}){e.composing=!0}function Tt({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}function Ra(e,t){const n=Tn();e.style.height="auto";let i=e.scrollHeight;if(lt(t)){const{maxHeight:a,minHeight:r}=t;a!==void 0&&(i=Math.min(i,a)),r!==void 0&&(i=Math.max(i,r))}i&&(e.style.height=`${i}px`,Ht(n))}function Aa(e){return e==="number"?{type:"text",inputmode:"decimal"}:e==="digit"?{type:"tel",inputmode:"numeric"}:{type:e}}function ue(e){return[...e].length}function nt(e,t){return[...e].slice(0,t).join("")}const[Pa,Q]=J("field"),$a={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:F,formatter:Function,clearIcon:te("clear"),modelValue:X(""),inputAlign:String,placeholder:String,autocomplete:String,errorMessage:String,enterkeyhint:String,clearTrigger:te("focus"),formatTrigger:te("onChange"),error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null}},_a=Le({},on,$a,{rows:F,type:te("text"),rules:Array,autosize:[Boolean,Object],labelWidth:F,labelClass:de,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}});var Ba=K({name:Pa,props:_a,emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:n}){const i=vt(),a=Ae({status:"unvalidated",focused:!1,validateMessage:""}),r=N(),c=N(),u=N(),{parent:l}=gt(Rn),v=()=>{var s;return String((s=e.modelValue)!=null?s:"")},o=s=>{if(ee(e[s]))return e[s];if(l&&ee(l.props[s]))return l.props[s]},f=$(()=>{const s=o("readonly");if(e.clearable&&!s){const k=v()!=="",O=e.clearTrigger==="always"||e.clearTrigger==="focus"&&a.focused;return k&&O}return!1}),m=$(()=>u.value&&n.input?u.value():e.modelValue),y=s=>s.reduce((k,O)=>k.then(()=>{if(a.status==="failed")return;let{value:_}=m;if(O.formatter&&(_=O.formatter(_,O)),!Ta(_,O)){a.status="failed",a.validateMessage=Ot(_,O);return}if(O.validator)return ln(_)&&O.validateEmpty===!1?void 0:Ea(_,O).then(V=>{V&&typeof V=="string"?(a.status="failed",a.validateMessage=V):V===!1&&(a.status="failed",a.validateMessage=Ot(_,O))})}),Promise.resolve()),w=()=>{a.status="unvalidated",a.validateMessage=""},p=()=>t("endValidate",{status:a.status,message:a.validateMessage}),b=(s=e.rules)=>new Promise(k=>{w(),s?(t("startValidate"),y(s).then(()=>{a.status==="failed"?(k({name:e.name,message:a.validateMessage}),p()):(a.status="passed",k(),p())})):k()}),E=s=>{if(l&&e.rules){const{validateTrigger:k}=l.props,O=wt(k).includes(s),_=e.rules.filter(V=>V.trigger?wt(V.trigger).includes(s):O);_.length&&b(_)}},x=s=>{var k;const{maxlength:O}=e;if(ee(O)&&ue(s)>+O){const _=v();if(_&&ue(_)===+O)return _;const V=(k=r.value)==null?void 0:k.selectionEnd;if(a.focused&&V){const q=[...s],ne=q.length-+O;return q.splice(V-ne,ne),q.join("")}return nt(s,+O)}return s},I=(s,k="onChange")=>{const O=s;s=x(s);const _=ue(O)-ue(s);if(e.type==="number"||e.type==="digit"){const q=e.type==="number";s=An(s,q,q)}let V=0;if(e.formatter&&k===e.formatTrigger){const{formatter:q,maxlength:ne}=e;if(s=q(s),ee(ne)&&ue(s)>+ne&&(s=nt(s,+ne)),r.value&&a.focused){const{selectionEnd:je}=r.value,yt=nt(O,je);V=ue(q(yt))-ue(yt)}}if(r.value&&r.value.value!==s)if(a.focused){let{selectionStart:q,selectionEnd:ne}=r.value;if(r.value.value=s,ee(q)&&ee(ne)){const je=ue(s);_?(q-=_,ne-=_):V&&(q+=V,ne+=V),r.value.setSelectionRange(Math.min(q,je),Math.min(ne,je))}}else r.value.value=s;s!==e.modelValue&&t("update:modelValue",s)},B=s=>{s.target.composing||I(s.target.value)},R=()=>{var s;return(s=r.value)==null?void 0:s.blur()},A=()=>{var s;return(s=r.value)==null?void 0:s.focus()},L=()=>{const s=r.value;e.type==="textarea"&&e.autosize&&s&&Ra(s,e.autosize)},D=s=>{a.focused=!0,t("focus",s),Z(L),o("readonly")&&R()},Y=s=>{a.focused=!1,I(v(),"onBlur"),t("blur",s),!o("readonly")&&(E("onBlur"),Z(L),$n())},g=s=>t("clickInput",s),S=s=>t("clickLeftIcon",s),P=s=>t("clickRightIcon",s),M=s=>{Xe(s),t("update:modelValue",""),t("clear",s)},W=$(()=>{if(typeof e.error=="boolean")return e.error;if(l&&l.props.showError&&a.status==="failed")return!0}),U=$(()=>{const s=o("labelWidth"),k=o("labelAlign");if(s&&k!=="top")return{width:Ie(s)}}),ye=s=>{s.keyCode===13&&(!(l&&l.props.submitOnEnter)&&e.type!=="textarea"&&Xe(s),e.type==="search"&&R()),t("keypress",s)},se=()=>e.id||`${i}-input`,oe=()=>a.status,he=()=>{const s=Q("control",[o("inputAlign"),{error:W.value,custom:!!n.input,"min-height":e.type==="textarea"&&!e.autosize}]);if(n.input)return d("div",{class:s,onClick:g},[n.input()]);const k={id:se(),ref:r,name:e.name,rows:e.rows!==void 0?+e.rows:void 0,class:s,disabled:o("disabled"),readonly:o("readonly"),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,enterkeyhint:e.enterkeyhint,"aria-labelledby":e.label?`${i}-label`:void 0,onBlur:Y,onFocus:D,onInput:B,onClick:g,onChange:Tt,onKeypress:ye,onCompositionend:Tt,onCompositionstart:Ia};return e.type==="textarea"?d("textarea",k,null):d("input",Ze(Aa(e.type),k),null)},ce=()=>{const s=n["left-icon"];if(e.leftIcon||s)return d("div",{class:Q("left-icon"),onClick:S},[s?s():d(Te,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])},T=()=>{const s=n["right-icon"];if(e.rightIcon||s)return d("div",{class:Q("right-icon"),onClick:P},[s?s():d(Te,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},j=()=>{if(e.showWordLimit&&e.maxlength){const s=ue(v());return d("div",{class:Q("word-limit")},[d("span",{class:Q("word-num")},[s]),st("/"),e.maxlength])}},z=()=>{if(l&&l.props.showErrorMessage===!1)return;const s=e.errorMessage||a.validateMessage;if(s){const k=n["error-message"],O=o("errorMessageAlign");return d("div",{class:Q("error-message",O)},[k?k({message:s}):s])}},h=()=>{const s=o("labelWidth"),k=o("labelAlign"),O=o("colon")?":":"";if(n.label)return[n.label(),O];if(e.label)return d("label",{id:`${i}-label`,for:se(),style:k==="top"&&s?{width:Ie(s)}:void 0},[e.label+O])},C=()=>[d("div",{class:Q("body")},[he(),f.value&&d(Te,{ref:c,name:e.clearIcon,class:Q("clear")},null),T(),n.button&&d("div",{class:Q("button")},[n.button()])]),j(),z()];return Pe({blur:R,focus:A,validate:b,formValue:m,resetValidation:w,getValidationStatus:oe}),Xt(Pn,{customValue:u,resetValidation:w,validateWithTrigger:E}),H(()=>e.modelValue,()=>{I(v()),w(),E("onChange"),Z(L)}),De(()=>{I(v(),e.formatTrigger),Z(L)}),Me("touchstart",M,{target:$(()=>{var s;return(s=c.value)==null?void 0:s.$el})}),()=>{const s=o("disabled"),k=o("labelAlign"),O=ce(),_=()=>{const V=h();return k==="top"?[O,V].filter(Boolean):V||[]};return d(Oa,{size:e.size,class:Q({error:W.value,disabled:s,[`label-${k}`]:k}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:U.value,valueClass:Q("value"),titleClass:[Q("label",[k,{required:e.required}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:O&&k!=="top"?()=>O:null,title:_,value:C,extra:n.extra})}}});const li=re(Ba),[Va,at]=J("switch"),La={size:F,loading:Boolean,disabled:Boolean,modelValue:de,activeColor:String,inactiveColor:String,activeValue:{type:de,default:!0},inactiveValue:{type:de,default:!1}};var Ma=K({name:Va,props:La,emits:["change","update:modelValue"],setup(e,{emit:t,slots:n}){const i=()=>e.modelValue===e.activeValue,a=()=>{if(!e.disabled&&!e.loading){const c=i()?e.inactiveValue:e.activeValue;t("update:modelValue",c),t("change",c)}},r=()=>{if(e.loading){const c=i()?e.activeColor:e.inactiveColor;return d(_n,{class:at("loading"),color:c},null)}if(n.node)return n.node()};return Gt(()=>e.modelValue),()=>{var c;const{size:u,loading:l,disabled:v,activeColor:o,inactiveColor:f}=e,m=i(),y={fontSize:Ie(u),backgroundColor:m?o:f};return d("div",{role:"switch",class:at({on:m,loading:l,disabled:v}),style:y,tabindex:v?void 0:0,"aria-checked":m,onClick:a},[d("div",{class:at("node")},[r()]),(c=n.background)==null?void 0:c.call(n)])}}});const si=re(Ma),[Da,We]=J("circle");let ja=0;const Et=e=>Math.min(Math.max(+e,0),100);function za(e,t){const n=e?1:0;return`M ${t/2} ${t/2} m 0, -500 a 500, 500 0 1, ${n} 0, 1000 a 500, 500 0 1, ${n} 0, -1000`}const Na={text:String,size:F,fill:te("none"),rate:X(100),speed:X(0),color:[String,Object],clockwise:G,layerColor:String,currentRate:Bn(0),strokeWidth:X(40),strokeLinecap:String,startPosition:te("top")};var Wa=K({name:Da,props:Na,emits:["update:currentRate"],setup(e,{emit:t,slots:n}){const i=`van-circle-${ja++}`,a=$(()=>+e.strokeWidth+1e3),r=$(()=>za(e.clockwise,a.value)),c=$(()=>{const m={top:0,right:90,bottom:180,left:270}[e.startPosition];if(m)return{transform:`rotate(${m}deg)`}});H(()=>e.rate,f=>{let m;const y=Date.now(),w=e.currentRate,p=Et(f),b=Math.abs((w-p)*1e3/+e.speed),E=()=>{const x=Date.now(),B=Math.min((x-y)/b,1)*(p-w)+w;t("update:currentRate",Et(parseFloat(B.toFixed(1)))),(p>w?B<p:B>p)&&(m=Be(E))};e.speed?(m&&Vn(m),m=Be(E)):t("update:currentRate",p)},{immediate:!0});const u=()=>{const{strokeWidth:m,currentRate:y,strokeLinecap:w}=e,p=3140*y/100,b=lt(e.color)?`url(#${i})`:e.color,E={stroke:b,strokeWidth:`${+m+1}px`,strokeLinecap:w,strokeDasharray:`${p}px 3140px`};return d("path",{d:r.value,style:E,class:We("hover"),stroke:b},null)},l=()=>{const f={fill:e.fill,stroke:e.layerColor,strokeWidth:`${e.strokeWidth}px`};return d("path",{class:We("layer"),style:f,d:r.value},null)},v=()=>{const{color:f}=e;if(!lt(f))return;const m=Object.keys(f).sort((y,w)=>parseFloat(y)-parseFloat(w)).map((y,w)=>d("stop",{key:w,offset:y,"stop-color":f[y]},null));return d("defs",null,[d("linearGradient",{id:i,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[m])])},o=()=>{if(n.default)return n.default();if(e.text)return d("div",{class:We("text")},[e.text])};return()=>d("div",{class:We(),style:Zt(e.size)},[d("svg",{viewBox:`0 0 ${a.value} ${a.value}`,style:c.value},[v(),l(),u()]),o()])}});const ci=re(Wa);function ie(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ht(e){var t=ie(e).Element;return e instanceof t||e instanceof Element}function ae(e){var t=ie(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function sn(e){if(typeof ShadowRoot>"u")return!1;var t=ie(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Re=Math.round;function ct(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Fa(){return!/^((?!chrome|android).)*safari/i.test(ct())}function Ue(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),a=1,r=1;t&&ae(e)&&(a=e.offsetWidth>0&&Re(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&Re(i.height)/e.offsetHeight||1);var c=ht(e)?ie(e):window,u=c.visualViewport,l=!Fa()&&n,v=(i.left+(l&&u?u.offsetLeft:0))/a,o=(i.top+(l&&u?u.offsetTop:0))/r,f=i.width/a,m=i.height/r;return{width:f,height:m,top:o,right:v+f,bottom:o+m,left:v,x:v,y:o}}function cn(e){var t=ie(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Ha(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qa(e){return e===ie(e)||!ae(e)?cn(e):Ha(e)}function ve(e){return e?(e.nodeName||"").toLowerCase():null}function Je(e){return((ht(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ya(e){return Ue(Je(e)).left+cn(e).scrollLeft}function ge(e){return ie(e).getComputedStyle(e)}function mt(e){var t=ge(e),n=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+i)}function Xa(e){var t=e.getBoundingClientRect(),n=Re(t.width)/e.offsetWidth||1,i=Re(t.height)/e.offsetHeight||1;return n!==1||i!==1}function Ua(e,t,n){n===void 0&&(n=!1);var i=ae(t),a=ae(t)&&Xa(t),r=Je(t),c=Ue(e,a,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((ve(t)!=="body"||mt(r))&&(u=qa(t)),ae(t)?(l=Ue(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=Ya(r))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function Ka(e){var t=Ue(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function bt(e){return ve(e)==="html"?e:e.assignedSlot||e.parentNode||(sn(e)?e.host:null)||Je(e)}function un(e){return["html","body","#document"].indexOf(ve(e))>=0?e.ownerDocument.body:ae(e)&&mt(e)?e:un(bt(e))}function qe(e,t){var n;t===void 0&&(t=[]);var i=un(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),r=ie(i),c=a?[r].concat(r.visualViewport||[],mt(i)?i:[]):i,u=t.concat(c);return a?u:u.concat(qe(bt(c)))}function Ga(e){return["table","td","th"].indexOf(ve(e))>=0}function It(e){return!ae(e)||ge(e).position==="fixed"?null:e.offsetParent}function Za(e){var t=/firefox/i.test(ct()),n=/Trident/i.test(ct());if(n&&ae(e)){var i=ge(e);if(i.position==="fixed")return null}var a=bt(e);for(sn(a)&&(a=a.host);ae(a)&&["html","body"].indexOf(ve(a))<0;){var r=ge(a);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return a;a=a.parentNode}return null}function fn(e){for(var t=ie(e),n=It(e);n&&Ga(n)&&ge(n).position==="static";)n=It(n);return n&&(ve(n)==="html"||ve(n)==="body"&&ge(n).position==="static")?t:n||Za(e)||t}var Ee="top",Ke="bottom",Ve="right",Ce="left",dn="auto",Ja=[Ee,Ke,Ve,Ce],vn="start",Ge="end",Qa=[].concat(Ja,[dn]).reduce(function(e,t){return e.concat([t,t+"-"+vn,t+"-"+Ge])},[]),er="beforeRead",tr="read",nr="afterRead",ar="beforeMain",rr="main",ir="afterMain",or="beforeWrite",lr="write",sr="afterWrite",ut=[er,tr,nr,ar,rr,ir,or,lr,sr];function cr(e){var t=new Map,n=new Set,i=[];e.forEach(function(r){t.set(r.name,r)});function a(r){n.add(r.name);var c=[].concat(r.requires||[],r.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var l=t.get(u);l&&a(l)}}),i.push(r)}return e.forEach(function(r){n.has(r.name)||a(r)}),i}function ur(e){var t=cr(e);return ut.reduce(function(n,i){return n.concat(t.filter(function(a){return a.phase===i}))},[])}function fr(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return[].concat(n).reduce(function(a,r){return a.replace(/%s/,r)},e)}var we='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',dr='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',Rt=["name","enabled","phase","fn","effect","requires","options"];function vr(e){e.forEach(function(t){[].concat(Object.keys(t),Rt).filter(function(n,i,a){return a.indexOf(n)===i}).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(be(we,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(be(we,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":ut.indexOf(t.phase)<0&&console.error(be(we,t.name,'"phase"',"either "+ut.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(be(we,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(be(we,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(be(we,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(be(we,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+Rt.map(function(i){return'"'+i+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(i){e.find(function(a){return a.name===i})==null&&console.error(be(dr,String(t.name),i,i))})})})}function gr(e,t){var n=new Set;return e.filter(function(i){var a=t(i);if(!n.has(a))return n.add(a),!0})}function Qe(e){return e.split("-")[0]}function hr(e){var t=e.reduce(function(n,i){var a=n[i.name];return n[i.name]=a?Object.assign({},a,i,{options:Object.assign({},a.options,i.options),data:Object.assign({},a.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}function gn(e){return e.split("-")[1]}function mr(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function br(e){var t=e.reference,n=e.element,i=e.placement,a=i?Qe(i):null,r=i?gn(i):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,l;switch(a){case Ee:l={x:c,y:t.y-n.height};break;case Ke:l={x:c,y:t.y+t.height};break;case Ve:l={x:t.x+t.width,y:u};break;case Ce:l={x:t.x-n.width,y:u};break;default:l={x:t.x,y:t.y}}var v=a?mr(a):null;if(v!=null){var o=v==="y"?"height":"width";switch(r){case vn:l[v]=l[v]-(t[o]/2-n[o]/2);break;case Ge:l[v]=l[v]+(t[o]/2-n[o]/2);break}}return l}var At="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",yr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",Pt={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function pr(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,a=t.defaultOptions,r=a===void 0?Pt:a;return function(u,l,v){v===void 0&&(v=r);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pt,r),modifiersData:{},elements:{reference:u,popper:l},attributes:{},styles:{}},f=[],m=!1,y={state:o,setOptions:function(E){var x=typeof E=="function"?E(o.options):E;p(),o.options=Object.assign({},r,o.options,x),o.scrollParents={reference:ht(u)?qe(u):u.contextElement?qe(u.contextElement):[],popper:qe(l)};var I=ur(hr([].concat(i,o.options.modifiers)));o.orderedModifiers=I.filter(function(S){return S.enabled});{var B=gr([].concat(I,o.options.modifiers),function(S){var P=S.name;return P});if(vr(B),Qe(o.options.placement)===dn){var R=o.orderedModifiers.find(function(S){var P=S.name;return P==="flip"});R||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var A=ge(l),L=A.marginTop,D=A.marginRight,Y=A.marginBottom,g=A.marginLeft;[L,D,Y,g].some(function(S){return parseFloat(S)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return w(),y.update()},forceUpdate:function(){if(!m){var E=o.elements,x=E.reference,I=E.popper;if(!$t(x,I)){console.error(At);return}o.rects={reference:Ua(x,fn(I),o.options.strategy==="fixed"),popper:Ka(I)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(S){return o.modifiersData[S.name]=Object.assign({},S.data)});for(var B=0,R=0;R<o.orderedModifiers.length;R++){if(B+=1,B>100){console.error(yr);break}if(o.reset===!0){o.reset=!1,R=-1;continue}var A=o.orderedModifiers[R],L=A.fn,D=A.options,Y=D===void 0?{}:D,g=A.name;typeof L=="function"&&(o=L({state:o,options:Y,name:g,instance:y})||o)}}},update:fr(function(){return new Promise(function(b){y.forceUpdate(),b(o)})}),destroy:function(){p(),m=!0}};if(!$t(u,l))return console.error(At),y;y.setOptions(v).then(function(b){!m&&v.onFirstUpdate&&v.onFirstUpdate(b)});function w(){o.orderedModifiers.forEach(function(b){var E=b.name,x=b.options,I=x===void 0?{}:x,B=b.effect;if(typeof B=="function"){var R=B({state:o,name:E,instance:y,options:I}),A=function(){};f.push(R||A)}})}function p(){f.forEach(function(b){return b()}),f=[]}return y}}var Fe={passive:!0};function wr(e){var t=e.state,n=e.instance,i=e.options,a=i.scroll,r=a===void 0?!0:a,c=i.resize,u=c===void 0?!0:c,l=ie(t.elements.popper),v=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&v.forEach(function(o){o.addEventListener("scroll",n.update,Fe)}),u&&l.addEventListener("resize",n.update,Fe),function(){r&&v.forEach(function(o){o.removeEventListener("scroll",n.update,Fe)}),u&&l.removeEventListener("resize",n.update,Fe)}}var xr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wr,data:{}};function Sr(e){var t=e.state,n=e.name;t.modifiersData[n]=br({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Cr={name:"popperOffsets",enabled:!0,phase:"read",fn:Sr,data:{}},kr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Or(e){var t=e.x,n=e.y,i=window,a=i.devicePixelRatio||1;return{x:Re(t*a)/a||0,y:Re(n*a)/a||0}}function _t(e){var t,n=e.popper,i=e.popperRect,a=e.placement,r=e.variation,c=e.offsets,u=e.position,l=e.gpuAcceleration,v=e.adaptive,o=e.roundOffsets,f=e.isFixed,m=c.x,y=m===void 0?0:m,w=c.y,p=w===void 0?0:w,b=typeof o=="function"?o({x:y,y:p}):{x:y,y:p};y=b.x,p=b.y;var E=c.hasOwnProperty("x"),x=c.hasOwnProperty("y"),I=Ce,B=Ee,R=window;if(v){var A=fn(n),L="clientHeight",D="clientWidth";if(A===ie(n)&&(A=Je(n),ge(A).position!=="static"&&u==="absolute"&&(L="scrollHeight",D="scrollWidth")),A=A,a===Ee||(a===Ce||a===Ve)&&r===Ge){B=Ke;var Y=f&&A===R&&R.visualViewport?R.visualViewport.height:A[L];p-=Y-i.height,p*=l?1:-1}if(a===Ce||(a===Ee||a===Ke)&&r===Ge){I=Ve;var g=f&&A===R&&R.visualViewport?R.visualViewport.width:A[D];y-=g-i.width,y*=l?1:-1}}var S=Object.assign({position:u},v&&kr),P=o===!0?Or({x:y,y:p}):{x:y,y:p};if(y=P.x,p=P.y,l){var M;return Object.assign({},S,(M={},M[B]=x?"0":"",M[I]=E?"0":"",M.transform=(R.devicePixelRatio||1)<=1?"translate("+y+"px, "+p+"px)":"translate3d("+y+"px, "+p+"px, 0)",M))}return Object.assign({},S,(t={},t[B]=x?p+"px":"",t[I]=E?y+"px":"",t.transform="",t))}function Tr(e){var t=e.state,n=e.options,i=n.gpuAcceleration,a=i===void 0?!0:i,r=n.adaptive,c=r===void 0?!0:r,u=n.roundOffsets,l=u===void 0?!0:u;{var v=ge(t.elements.popper).transitionProperty||"";c&&["transform","top","right","bottom","left"].some(function(f){return v.indexOf(f)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
- `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
- `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var o={placement:Qe(t.placement),variation:gn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_t(Object.assign({},o,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_t(Object.assign({},o,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Er={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tr,data:{}};function Ir(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},a=t.attributes[n]||{},r=t.elements[n];!ae(r)||!ve(r)||(Object.assign(r.style,i),Object.keys(a).forEach(function(c){var u=a[c];u===!1?r.removeAttribute(c):r.setAttribute(c,u===!0?"":u)}))})}function Rr(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var a=t.elements[i],r=t.attributes[i]||{},c=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),u=c.reduce(function(l,v){return l[v]="",l},{});!ae(a)||!ve(a)||(Object.assign(a.style,u),Object.keys(r).forEach(function(l){a.removeAttribute(l)}))})}}var Ar={name:"applyStyles",enabled:!0,phase:"write",fn:Ir,effect:Rr,requires:["computeStyles"]},Pr=[xr,Cr,Er,Ar],$r=pr({defaultModifiers:Pr});function _r(e,t,n){var i=Qe(e),a=[Ce,Ee].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=r[0],u=r[1];return c=c||0,u=(u||0)*a,[Ce,Ve].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}function Br(e){var t=e.state,n=e.options,i=e.name,a=n.offset,r=a===void 0?[0,0]:a,c=Qa.reduce(function(o,f){return o[f]=_r(f,t.rects,r),o},{}),u=c[t.placement],l=u.x,v=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=v),t.modifiersData[i]=c}var Vr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Br};const Lr=(e,t)=>{const n=N(e());return H(e,i=>{i!==n.value&&(n.value=i)}),H(n,i=>{i!==e()&&t(i)}),n},[Mr,xe]=J("popover"),Dr=["overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],jr={show:Boolean,theme:te("light"),overlay:Boolean,actions:jn(),trigger:te("click"),duration:F,showArrow:G,placement:te("bottom"),iconPrefix:String,overlayClass:de,overlayStyle:Object,closeOnClickAction:G,closeOnClickOverlay:G,closeOnClickOutside:G,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"}};var zr=K({name:Mr,props:jr,emits:["select","touchstart","update:show"],setup(e,{emit:t,slots:n,attrs:i}){let a;const r=N(),c=N(),u=N(),l=Lr(()=>e.show,x=>t("update:show",x)),v=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},Le({},Vr,{options:{offset:e.offset}})]}),o=()=>c.value&&u.value?$r(c.value,u.value.popupRef.value,v()):null,f=()=>{Z(()=>{l.value&&(a?a.setOptions(v()):(a=o(),ot&&(window.addEventListener("animationend",f),window.addEventListener("transitionend",f))))})},m=x=>{l.value=x},y=()=>{e.trigger==="click"&&(l.value=!l.value)},w=(x,I)=>{x.disabled||(t("select",x,I),e.closeOnClickAction&&(l.value=!1))},p=()=>{l.value&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&(l.value=!1)},b=(x,I)=>n.action?n.action({action:x,index:I}):[x.icon&&d(Te,{name:x.icon,classPrefix:e.iconPrefix,class:xe("action-icon")},null),d("div",{class:[xe("action-text"),zn]},[x.text])],E=(x,I)=>{const{icon:B,color:R,disabled:A,className:L}=x;return d("div",{role:"menuitem",class:[xe("action",{disabled:A,"with-icon":B}),L],style:{color:R},tabindex:A?void 0:0,"aria-disabled":A||void 0,onClick:()=>w(x,I)},[b(x,I)])};return De(()=>{f(),Ln(()=>{var x;r.value=(x=u.value)==null?void 0:x.popupRef.value})}),dt(()=>{a&&(ot&&(window.removeEventListener("animationend",f),window.removeEventListener("transitionend",f)),a.destroy(),a=null)}),H(()=>[l.value,e.offset,e.placement],f),Mn([c,r],p,{eventName:"touchstart"}),()=>{var x;return d(Jt,null,[d("span",{ref:c,class:xe("wrapper"),onClick:y},[(x=n.reference)==null?void 0:x.call(n)]),d(Dn,Ze({ref:u,show:l.value,class:xe([e.theme]),position:"",transition:"van-popover-zoom",lockScroll:!1,"onUpdate:show":m},i,qt(e,Dr)),{default:()=>[e.showArrow&&d("div",{class:xe("arrow")},null),d("div",{role:"menu",class:xe("content")},[n.default?n.default():e.actions.map(E)])]})])}}});const ui=re(zr),[Nr,$e]=J("slider"),Wr={min:X(0),max:X(100),step:X(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:F,buttonSize:F,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var Fr=K({name:Nr,props:Wr,emits:["change","dragEnd","dragStart","update:modelValue"],setup(e,{emit:t,slots:n}){let i,a,r;const c=N(),u=[N(),N()],l=N(),v=jt(),o=$(()=>Number(e.max)-Number(e.min)),f=$(()=>{const g=e.vertical?"width":"height";return{background:e.inactiveColor,[g]:Ie(e.barHeight)}}),m=g=>e.range&&Array.isArray(g),y=()=>{const{modelValue:g,min:S}=e;return m(g)?`${(g[1]-g[0])*100/o.value}%`:`${(g-Number(S))*100/o.value}%`},w=()=>{const{modelValue:g,min:S}=e;return m(g)?`${(g[0]-Number(S))*100/o.value}%`:"0%"},p=$(()=>{const S={[e.vertical?"height":"width"]:y(),background:e.activeColor};l.value&&(S.transition="none");const P=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return S[P()]=w(),S}),b=g=>{const S=+e.min,P=+e.max,M=+e.step;g=He(g,S,P);const W=Math.round((g-S)/M)*M;return Wn(S,W)},E=g=>{var S,P;const M=(S=g[0])!=null?S:Number(e.min),W=(P=g[1])!=null?P:Number(e.max);return M>W?[W,M]:[M,W]},x=(g,S)=>{m(g)?g=E(g).map(b):g=b(g),xt(g,e.modelValue)||t("update:modelValue",g),S&&!xt(g,r)&&t("change",g)},I=g=>{if(g.stopPropagation(),e.disabled||e.readonly)return;const{min:S,reverse:P,vertical:M,modelValue:W}=e,U=Se(c),ye=()=>M?P?U.bottom-g.clientY:g.clientY-U.top:P?U.right-g.clientX:g.clientX-U.left,se=M?U.height:U.width,oe=Number(S)+ye()/se*o.value;if(m(W)){const[he,ce]=W,T=(he+ce)/2;oe<=T?x([oe,ce],!0):x([he,oe],!0)}else x(oe,!0)},B=g=>{e.disabled||e.readonly||(v.start(g),a=e.modelValue,m(a)?r=a.map(b):r=b(a),l.value="start")},R=g=>{if(e.disabled||e.readonly)return;l.value==="start"&&t("dragStart",g),Xe(g,!0),v.move(g),l.value="dragging";const S=Se(c),P=e.vertical?v.deltaY.value:v.deltaX.value,M=e.vertical?S.height:S.width;let W=P/M*o.value;if(e.reverse&&(W=-W),m(r)){const U=e.reverse?1-i:i;a[U]=r[U]+W}else a=r+W;x(a)},A=g=>{e.disabled||e.readonly||(l.value==="dragging"&&(x(a,!0),t("dragEnd",g)),l.value="")},L=g=>typeof g=="number"?$e("button-wrapper",["left","right"][g]):$e("button-wrapper",e.reverse?"left":"right"),D=(g,S)=>{if(typeof S=="number"){const P=n[S===0?"left-button":"right-button"];if(P)return P({value:g})}return n.button?n.button({value:g}):d("div",{class:$e("button"),style:Zt(e.buttonSize)},null)},Y=g=>{const S=typeof g=="number"?e.modelValue[g]:e.modelValue;return d("div",{ref:u[g!=null?g:0],role:"slider",class:L(g),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":S,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstartPassive:P=>{typeof g=="number"&&(i=g),B(P)},onTouchend:A,onTouchcancel:A,onClick:Nn},[D(S,g)])};return x(e.modelValue),Gt(()=>e.modelValue),u.forEach(g=>{Me("touchmove",R,{target:g})}),()=>d("div",{ref:c,style:f.value,class:$e({vertical:e.vertical,disabled:e.disabled}),onClick:I},[d("div",{class:$e("bar"),style:p.value},[e.range?[Y(0),Y(1)]:Y()])])}});const fi=re(Fr);function Hr(e){return["top","bottom","right","left","center"].includes(e)}var qr={show:{type:Boolean,default:!1},position:{type:String,default:"center",validator:Hr},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:pe(),onOpened:pe(),onClose:pe(),onClosed:pe(),onClickOverlay:pe(),"onUpdate:show":pe(),onRouteChange:pe()};function ft(){return ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ft.apply(this,arguments)}function Yr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Un(e)}var{n:fe,classes:rt}=Kn("popup");const it=K({name:"VarPopup",inheritAttrs:!1,props:qr,setup(e,t){var{slots:n,attrs:i}=t,{zIndex:a}=Fn(()=>e.show,3),{disabled:r}=Hn(),c=()=>{var{closeOnClickOverlay:o,onClickOverlay:f}=e;ke(f),o&&ke(e["onUpdate:show"],!1)};qn(()=>e.show,()=>e.lockScroll),H(()=>e.show,o=>{o?ke(e.onOpen):ke(e.onClose)}),Yn(()=>ke(e.onRouteChange));var u=()=>{var{overlayClass:o="",overlayStyle:f}=e;return d("div",{class:rt(fe("overlay"),o),style:ft({zIndex:a.value-1},f),onClick:c},null)},l=()=>d("div",Ze({class:rt(fe("content"),fe("--"+e.position),[e.defaultStyle,fe("--content-background-color")],[e.defaultStyle,fe("$-elevation--3")]),style:{zIndex:a.value}},i),[ke(n.default)]),v=()=>{var{onOpened:o,onClosed:f,show:m,overlay:y,transition:w,position:p}=e;return d(St,{name:fe("$-fade"),onAfterEnter:o,onAfterLeave:f},{default:()=>[Ut(d("div",{class:rt(fe("$--box"),fe()),style:{zIndex:a.value-2}},[y&&u(),d(St,{name:w||fe("$-pop-"+p)},{default:()=>[m&&l()]})]),[[Kt,m]])]})};return()=>{var{teleport:o}=e;if(o){var f;return d(Xn,{to:o,disabled:r.value},Yr(f=v())?f:{default:()=>[f]})}return v()}}});it.install=function(e){e.component(it.name,it)};const Xr="_fingeringContainer_xflo8_1",Ur="_vertical_xflo8_10",Kr="_imgs_xflo8_15",Gr="_rightContent_xflo8_32",Zr="_yidiao_xflo8_76",Jr="_tizhi_xflo8_83",Qr="_canDisplay_xflo8_99",ei="_activeopacity_xflo8_1",ti="_leftrotates_xflo8_1",ni="_rightrotates_xflo8_1",le={fingeringContainer:Xr,vertical:Ur,imgs:Kr,rightContent:Gr,yidiao:Zr,tizhi:Jr,canDisplay:Qr,activeopacity:ei,leftrotates:ti,rightrotates:ni},di=K({name:"fingering",emits:["open"],setup(e,{emit:t}){const n=Ae({relationshipIndex:0,subject:null,delay:0}),i=async()=>{n.subject=await Zn(me.fingeringInfo.name),console.log("🚀 ~ fingerData.subject:",n.subject)};Gn(()=>{i()});const a=$(()=>{var c;return((c=me.times[me.activeNoteIndex])==null?void 0:c.realKey)||-1}),r=()=>{const c=Date.now();if(c-n.delay<300){t("open");return}n.delay=c};return()=>{var v,o,f,m,y,w;const c=((o=(v=n.subject)==null?void 0:v.relationship)==null?void 0:o[a.value])||[],u=Array.isArray(c[1])?c[n.relationshipIndex]:c,l=Array.isArray(c[1]);return d(Jt,null,[me.fingeringInfo.direction==="transverse"?d("div",{onClick:()=>r(),class:[le.fingeringContainer]},[d("div",{class:le.imgs},[d("img",{src:(m=(f=n.subject)==null?void 0:f.json)==null?void 0:m.full},null),u.map((p,b)=>{var x,I;const E=typeof p=="string"?p.replace("active-",""):String(p);return d("img",{"data-index":E,src:(I=(x=n.subject)==null?void 0:x.json)==null?void 0:I[E]},null)})]),me.fingeringInfo.hasTizhi&&d("div",{class:[le.tizhi,l&&le.canDisplay],onClick:()=>n.relationshipIndex=n.relationshipIndex===0?1:0},[st("替指")])]):d("div",{onClick:()=>r(),class:[le.fingeringContainer,le.vertical,me.fingeringInfo.name]},[d("div",{class:le.imgs},[d("img",{src:(w=(y=n.subject)==null?void 0:y.json)==null?void 0:w.full},null),u.map((p,b)=>{var x,I;const E=typeof p=="string"?p.replace("active-",""):String(p);return d("img",{"data-index":E,src:(I=(x=n.subject)==null?void 0:x.json)==null?void 0:I[E]},null)})]),me.fingeringInfo.hasTizhi&&d("div",{style:{display:me.fingeringInfo.disabledFinger?"none":""},class:le.rightContent},[d("div",{class:[le.tizhi,l&&le.canDisplay],onClick:()=>n.relationshipIndex=n.relationshipIndex===0?1:0},[st("替指")])])])])}}});export{Oa as C,li as F,ui as P,ua as S,oi as T,ya as a,fi as b,ii as c,si as d,it as e,ci as f,di as g,ri as u};
|