vant.system.min.js 218.7 KB
Newer Older
1
System.register(["vue"],(function(e,t){"use strict";var o,n,a,l,i,r,s,c,u,d,p,v,h,m,f,g,b,y,x,w,k,S,C,B,T,P,D,O,I,A,V,z,E,$;return{setters:[e=>{o=e.unref,n=e.inject,a=e.getCurrentInstance,l=e.onUnmounted,i=e.computed,r=e.ref,s=e.reactive,c=e.onBeforeUnmount,u=e.onActivated,d=e.onDeactivated,p=e.onMounted,v=e.nextTick,h=e.isRef,m=e.watch,f=e.provide,g=e.isVNode,b=e.createVNode,y=e.defineComponent,x=e.watchEffect,w=e.mergeProps,k=e.Transition,S=e.withDirectives,C=e.vShow,B=e.Teleport,T=e.Fragment,P=e.onBeforeUpdate,D=e.createTextVNode,O=e.createApp,I=e.resolveDirective,A=e.withKeys,V=e.onUpdated,z=e.Comment,E=e.Text,$=e.h}],execute:function(){function t(){}e({install:Cm,setToastDefaultOptions:function(e,t){"string"==typeof e?cl.set(e,t):L(sl,e)},showDialog:mc,showNotify:function(e){if(!M)return;Uu||({instance:Uu}=al({setup(){const{state:e,toggle:t}=nl();return()=>b(ju,w(e,{"onUpdate:show":t}),null)}}));e=L({},Xu,Yu(e)),Uu.open(e),clearTimeout(Wu),e.duration>0&&(Wu=setTimeout(qu,e.duration));return Uu},showToast:pl});const L=Object.assign,M="undefined"!=typeof window,R=e=>null!==e&&"object"==typeof e,F=e=>null!=e,H=e=>"function"==typeof e,N=e=>R(e)&&H(e.then)&&H(e.catch),j=e=>"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime());function W(e){return e=e.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(e)||/^0[0-9-]{10,13}$/.test(e)}const U=e=>"number"==typeof e||/^\d+(\.\d+)?$/.test(e);function Y(e,t){const o=t.split(".");let n=e;return o.forEach((e=>{var t;n=R(n)&&null!=(t=n[e])?t:""})),n}function X(e,t,o){return t.reduce(((t,n)=>(o&&void 0===e[n]||(t[n]=e[n]),t)),{})}const q=(e,t)=>JSON.stringify(e)===JSON.stringify(t),G=e=>Array.isArray(e)?e:[e],Z=null,K=[Number,String],_={type:Boolean,default:!0},J=e=>({type:e,required:!0}),Q=()=>({type:Array,default:()=>[]}),ee=e=>({type:Number,default:e}),te=e=>({type:K,default:e}),oe=e=>({type:String,default:e});var ne="undefined"!=typeof window;function ae(e){return ne?requestAnimationFrame(e):-1}function le(e){ne&&cancelAnimationFrame(e)}function ie(e){ae((()=>ae(e)))}var re=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),se=e=>{const t=o(e);if(t===window){const e=t.innerWidth,o=t.innerHeight;return re(e,o)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():re(0,0)};function ce(e){const t=n(e,null);if(t){const e=a(),{link:o,unlink:n,internalChildren:r}=t;o(e),l((()=>n(e)));return{parent:t,index:i((()=>r.indexOf(e)))}}return{parent:null,index:r(-1)}}var ue=(e,t)=>{const o=e.indexOf(t);return-1===o?e.findIndex((e=>void 0!==t.key&&null!==t.key&&e.type===t.type&&e.key===t.key)):o};function de(e,t,o){const n=function(e){const t=[],o=e=>{Array.isArray(e)&&e.forEach((e=>{var n;g(e)&&(t.push(e),(null==(n=e.component)?void 0:n.subTree)&&(t.push(e.component.subTree),o(e.component.subTree.children)),e.children&&o(e.children))}))};return o(e),t}(e.subTree.children);o.sort(((e,t)=>ue(n,e.vnode)-ue(n,t.vnode)));const a=o.map((e=>e.proxy));t.sort(((e,t)=>a.indexOf(e)-a.indexOf(t)))}function pe(e){const t=s([]),o=s([]),n=a();return{children:t,linkChildren:a=>{f(e,Object.assign({link:e=>{e.proxy&&(o.push(e),t.push(e.proxy),de(n,t,o))},unlink:e=>{const n=o.indexOf(e);t.splice(n,1),o.splice(n,1)},children:t,internalChildren:o},a))}}}var ve,he,me=1e3,fe=60*me,ge=60*fe,be=24*ge;function ye(e){let t,o,n,a;const l=r(e.time),s=i((()=>{return{total:e=l.value,days:Math.floor(e/be),hours:Math.floor(e%be/ge),minutes:Math.floor(e%ge/fe),seconds:Math.floor(e%fe/me),milliseconds:Math.floor(e%me)};var e})),p=()=>{n=!1,le(t)},v=()=>Math.max(o-Date.now(),0),h=t=>{var o,n;l.value=t,null==(o=e.onChange)||o.call(e,s.value),0===t&&(p(),null==(n=e.onFinish)||n.call(e))},m=()=>{t=ae((()=>{n&&(h(v()),l.value>0&&m())}))},f=()=>{t=ae((()=>{if(n){const o=v();e=o,t=l.value,(Math.floor(e/1e3)!==Math.floor(t/1e3)||0===o)&&h(o),l.value>0&&f()}var e,t}))},g=()=>{ne&&(e.millisecond?m():f())};return c(p),u((()=>{a&&(n=!0,a=!1,g())})),d((()=>{n&&(p(),a=!0)})),{start:()=>{n||(o=Date.now()+l.value,n=!0,g())},pause:p,reset:(t=e.time)=>{p(),l.value=t},current:s}}function xe(e){let t;p((()=>{e(),v((()=>{t=!0}))})),u((()=>{t&&e()}))}function we(e,t,n={}){if(!ne)return;const{target:a=window,passive:i=!1,capture:r=!1}=n;let s,c=!1;const u=n=>{if(c)return;const a=o(n);a&&!s&&(a.addEventListener(e,t,{capture:r,passive:i}),s=!0)},p=n=>{if(c)return;const a=o(n);a&&s&&(a.removeEventListener(e,t,r),s=!1)};let v;return l((()=>p(a))),d((()=>p(a))),xe((()=>u(a))),h(a)&&(v=m(a,((e,t)=>{p(t),u(e)}))),()=>{null==v||v(),p(a),c=!0}}function ke(e,t,n={}){if(!ne)return;const{eventName:a="click"}=n;we(a,(n=>{(Array.isArray(e)?e:[e]).every((e=>{const t=o(e);return t&&!t.contains(n.target)}))&&t(n)}),{target:document})}var Se,Ce=/scroll|auto|overlay/i,Be=ne?window:void 0;function Te(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType}function Pe(e,t=Be){let o=e;for(;o&&o!==t&&Te(o);){const{overflowY:e}=window.getComputedStyle(o);if(Ce.test(e))return o;o=o.parentNode}return t}function De(e,t=Be){const o=r();return p((()=>{e.value&&(o.value=Pe(e.value,t))})),o}var Oe=Symbol("van-field");function Ie(e){const t=n(Oe,null);t&&!t.customValue.value&&(t.customValue.value=e,m(e,(()=>{t.resetValidation(),t.validateWithTrigger("onChange")})))}function Ae(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function Ve(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function ze(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function Ee(e){Ve(window,e),Ve(document.body,e)}function $e(e,t){if(e===window)return 0;const o=t?Ae(t):ze();return se(e).top+o}const Le=!!M&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());function Me(){Le&&Ee(ze())}const Re=e=>e.stopPropagation();function Fe(e,t){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault(),t&&Re(e)}function He(e){const t=o(e);if(!t)return!1;const n=window.getComputedStyle(t),a="none"===n.display,l=null===t.offsetParent&&"fixed"!==n.position;return a||l}const{width:Ne,height:je}=function(){if(!ve&&(ve=r(0),he=r(0),ne)){const e=()=>{ve.value=window.innerWidth,he.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:ve,height:he}}();function We(e){if(F(e))return U(e)?`${e}px`:String(e)}function Ue(e){if(F(e)){if(Array.isArray(e))return{width:We(e[0]),height:We(e[1])};const t=We(e);return{width:t,height:t}}}function Ye(e){const t={};return void 0!==e&&(t.zIndex=+e),t}let Xe;function qe(e){return+(e=e.replace(/rem/g,""))*function(){if(!Xe){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;Xe=parseFloat(t)}return Xe}()}function Ge(e){if("number"==typeof e)return e;if(M){if(e.includes("rem"))return qe(e);if(e.includes("vw"))return function(e){return+(e=e.replace(/vw/g,""))*Ne.value/100}(e);if(e.includes("vh"))return function(e){return+(e=e.replace(/vh/g,""))*je.value/100}(e)}return parseFloat(e)}const Ze=/-(\w)/g,Ke=e=>e.replace(Ze,((e,t)=>t.toUpperCase()));function _e(e,t=2){let o=e+"";for(;o.length<t;)o="0"+o;return o}const Je=(e,t,o)=>Math.min(Math.max(e,t),o);function Qe(e,t,o){const n=e.indexOf(t);return-1===n?e:"-"===t&&0!==n?e.slice(0,n):e.slice(0,n+1)+e.slice(n).replace(o,"")}function et(e,t=!0,o=!0){e=t?Qe(e,".",/\./g):e.split(".")[0];const n=t?/[^-0-9.]/g:/[^-0-9]/g;return(e=o?Qe(e,"-",/-/g):e.replace(/-/,"")).replace(n,"")}function tt(e,t){const o=10**10;return Math.round((e+t)*o)/o}const{hasOwnProperty:ot}=Object.prototype;function nt(e,t){return Object.keys(t).forEach((o=>{!function(e,t,o){const n=t[o];F(n)&&(ot.call(e,o)&&R(n)?e[o]=nt(Object(e[o]),n):e[o]=n)}(e,t,o)})),e}const at=r("zh-CN"),lt=s({"zh-CN":{name:"姓名",tel:"电话",save:"保存",clear:"清空",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}}}),it=e("Locale",{messages:()=>lt[at.value],use(e,t){at.value=e,this.add({[e]:t})},add(e={}){nt(lt,e)}});e("useCurrentLang",(()=>at));var rt=it;function st(e){const t=Ke(e)+".";return(e,...o)=>{const n=rt.messages(),a=Y(n,t+e)||Y(n,e);return H(a)?a(...o):a}}function ct(e,t){return t?"string"==typeof t?` ${e}--${t}`:Array.isArray(t)?t.reduce(((t,o)=>t+ct(e,o)),""):Object.keys(t).reduce(((o,n)=>o+(t[n]?ct(e,n):"")),""):""}function ut(e){return(t,o)=>(t&&"string"!=typeof t&&(o=t,t=""),`${t=t?`${e}__${t}`:e}${ct(t,o)}`)}function dt(e){const t=`van-${e}`;return[t,ut(t),st(t)]}const pt="van-hairline",vt=`${pt}--top`,ht=`${pt}--left`,mt=`${pt}--right`,ft=`${pt}--bottom`,gt=`${pt}--surround`,bt=`${pt}--top-bottom`,yt=`${pt}-unset--top-bottom`,xt="van-haptics-feedback",wt=Symbol("van-form"),kt=5;function St(e,{args:o=[],done:n,canceled:a,error:l}){if(e){const i=e.apply(null,o);N(i)?i.then((e=>{e?n():a&&a()})).catch(l||t):i?n():a&&a()}else n()}function Ct(e){return e.install=t=>{const{name:o}=e;o&&(t.component(o,e),t.component(Ke(`-${o}`),e))},e}function Bt(e,t){return e.reduce(((e,o)=>Math.abs(e-t)<Math.abs(o-t)?e:o))}const Tt=Symbol();function Pt(e){const t=n(Tt,null);t&&m(t,(t=>{t&&e()}))}const Dt=(e,t)=>{const o=r(),n=()=>{o.value=se(e).height};return p((()=>{if(v(n),t)for(let e=1;e<=3;e++)setTimeout(n,100*e)})),Pt((()=>v(n))),m([Ne,je],n),o};function Ot(e,t){const o=Dt(e,!0);return e=>b("div",{class:t("placeholder"),style:{height:o.value?`${o.value}px`:void 0}},[e()])}const[It,At]=dt("action-bar"),Vt=Symbol(It),zt=e("actionBarProps",{placeholder:Boolean,safeAreaInsetBottom:_});var Et=y({name:It,props:zt,setup(e,{slots:t}){const o=r(),n=Ot(o,At),{linkChildren:a}=pe(Vt);a();const l=()=>{var n;return b("div",{ref:o,class:[At(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[null==(n=t.default)?void 0:n.call(t)])};return()=>e.placeholder?n(l):l()}});const $t=e("ActionBar",Ct(Et));function Lt(e){const t=a();t&&L(t.proxy,e)}const Mt={to:[String,Object],url:String,replace:Boolean};function Rt({to:e,url:t,replace:o,$router:n}){e&&n?n[o?"replace":"push"](e):t&&(o?location.replace(t):location.href=t)}function Ft(){const e=a().proxy;return()=>Rt(e)}const[Ht,Nt]=dt("badge"),jt=e("badgeProps",{dot:Boolean,max:K,tag:oe("div"),color:String,offset:Array,content:K,showZero:_,position:oe("top-right")});var Wt=y({name:Ht,props:jt,setup(e,{slots:t}){const o=()=>{if(t.content)return!0;const{content:o,showZero:n}=e;return F(o)&&""!==o&&(n||0!==o&&"0"!==o)},n=()=>{const{dot:n,max:a,content:l}=e;if(!n&&o())return t.content?t.content():F(a)&&U(l)&&+l>+a?`${a}+`:l},a=e=>e.startsWith("-")?e.replace("-",""):`-${e}`,l=i((()=>{const o={background:e.color};if(e.offset){const[n,l]=e.offset,{position:i}=e,[r,s]=i.split("-");t.default?(o[r]="number"==typeof l?We("top"===r?l:-l):"top"===r?We(l):a(l),o[s]="number"==typeof n?We("left"===s?n:-n):"left"===s?We(n):a(n)):(o.marginTop=We(l),o.marginLeft=We(n))}return o})),r=()=>{if(o()||e.dot)return b("div",{class:Nt([e.position,{dot:e.dot,fixed:!!t.default}]),style:l.value},[n()])};return()=>{if(t.default){const{tag:o}=e;return b(o,{class:Nt("wrapper")},{default:()=>[t.default(),r()]})}return r()}}});const Ut=e("Badge",Ct(Wt));let Yt=2e3;const[Xt,qt]=dt("config-provider"),Gt=Symbol(Xt),Zt=e("configProviderProps",{tag:oe("div"),theme:oe("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:oe("local"),iconPrefix:String});function Kt(e={},t={}){Object.keys(e).forEach((o=>{e[o]!==t[o]&&document.documentElement.style.setProperty(o,e[o])})),Object.keys(t).forEach((t=>{e[t]||document.documentElement.style.removeProperty(t)}))}var _t=y({name:Xt,props:Zt,setup(e,{slots:t}){const o=i((()=>function(e){const t={};return Object.keys(e).forEach((o=>{const n=o.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"").replace(/([a-zA-Z])(\d)/g,"$1-$2");t[`--van-${n}`]=e[o]})),t}(L({},e.themeVars,"dark"===e.theme?e.themeVarsDark:e.themeVarsLight))));if(M){const t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},n=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};m((()=>e.theme),((e,o)=>{o&&n(o),t()}),{immediate:!0}),u(t),d(n),c(n),m(o,((t,o)=>{"global"===e.themeVarsScope&&Kt(t,o)})),m((()=>e.themeVarsScope),((e,t)=>{"global"===t&&Kt({},o.value),"global"===e&&Kt(o.value,{})})),"global"===e.themeVarsScope&&Kt(o.value,{})}return f(Gt,e),x((()=>{var t;void 0!==e.zIndex&&(t=e.zIndex,Yt=t)})),()=>b(e.tag,{class:qt(),style:"local"===e.themeVarsScope?o.value:void 0},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}});const[Jt,Qt]=dt("icon"),eo=e("iconProps",{dot:Boolean,tag:oe("i"),name:String,size:K,badge:K,color:String,badgeProps:Object,classPrefix:String});var to=y({name:Jt,props:eo,setup(e,{slots:t}){const o=n(Gt,null),a=i((()=>e.classPrefix||(null==o?void 0:o.iconPrefix)||Qt()));return()=>{const{tag:o,dot:n,name:l,size:i,badge:r,color:s}=e,c=(e=>null==e?void 0:e.includes("/"))(l);return b(Ut,w({dot:n,tag:o,class:[a.value,c?"":`${a.value}-${l}`],style:{color:s,fontSize:We(i)},content:r},e.badgeProps),{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t),c&&b("img",{class:Qt("image"),src:l},null)]}})}}});const oo=e("Icon",Ct(to));var no=oo;const[ao,lo]=dt("loading"),io=Array(12).fill(null).map(((e,t)=>b("i",{class:lo("line",String(t+1))},null))),ro=b("svg",{class:lo("circular"),viewBox:"25 25 50 50"},[b("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),so=e("loadingProps",{size:K,type:oe("circular"),color:String,vertical:Boolean,textSize:K,textColor:String});var co=y({name:ao,props:so,setup(e,{slots:t}){const o=i((()=>L({color:e.color},Ue(e.size)))),n=()=>{const n="spinner"===e.type?io:ro;return b("span",{class:lo("spinner",e.type),style:o.value},[t.icon?t.icon():n])},a=()=>{var o;if(t.default)return b("span",{class:lo("text"),style:{fontSize:We(e.textSize),color:null!=(o=e.textColor)?o:e.color}},[t.default()])};return()=>{const{type:t,vertical:o}=e;return b("div",{class:lo([t,{vertical:o}]),"aria-live":"polite","aria-busy":!0},[n(),a()])}}});const uo=e("Loading",Ct(co)),[po,vo]=dt("button"),ho=e("buttonProps",L({},Mt,{tag:oe("button"),text:String,icon:String,type:oe("default"),size:oe("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:oe("button"),loadingSize:K,loadingText:String,loadingType:String,iconPosition:oe("left")}));var mo=y({name:po,props:ho,emits:["click"],setup(e,{emit:t,slots:o}){const n=Ft(),a=()=>e.loading?o.loading?o.loading():b(uo,{size:e.loadingSize,type:e.loadingType,class:vo("loading")},null):o.icon?b("div",{class:vo("icon")},[o.icon()]):e.icon?b(oo,{name:e.icon,class:vo("icon"),classPrefix:e.iconPrefix},null):void 0,l=()=>{let t;if(t=e.loading?e.loadingText:o.default?o.default():e.text,t)return b("span",{class:vo("text")},[t])},i=()=>{const{color:t,plain:o}=e;if(t){const e={color:o?t:"white"};return o||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}},r=o=>{e.loading?Fe(o):e.disabled||(t("click",o),n())};return()=>{const{tag:t,type:o,size:n,block:s,round:c,plain:u,square:d,loading:p,disabled:v,hairline:h,nativeType:m,iconPosition:f}=e,g=[vo([o,n,{plain:u,block:s,round:c,square:d,loading:p,disabled:v,hairline:h}]),{[gt]:h}];return b(t,{type:m,class:g,style:i(),disabled:v,onClick:r},{default:()=>[b("div",{class:vo("content")},["left"===f&&a(),l(),"right"===f&&a()])]})}}});const fo=e("Button",Ct(mo)),[go,bo]=dt("action-bar-button"),yo=e("actionBarButtonProps",L({},Mt,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean}));var xo=y({name:go,props:yo,setup(e,{slots:t}){const o=Ft(),{parent:n,index:a}=ce(Vt),l=i((()=>{if(n){const e=n.children[a.value-1];return!(e&&"isButton"in e)}})),r=i((()=>{if(n){const e=n.children[a.value+1];return!(e&&"isButton"in e)}}));return Lt({isButton:!0}),()=>{const{type:n,icon:a,text:i,color:s,loading:c,disabled:u}=e;return b(fo,{class:bo([n,{last:r.value,first:l.value}]),size:"large",type:n,icon:a,color:s,loading:c,disabled:u,onClick:o},{default:()=>[t.default?t.default():i]})}}});const wo=e("ActionBarButton",Ct(xo)),[ko,So]=dt("action-bar-icon"),Co=e("actionBarIconProps",L({},Mt,{dot:Boolean,text:String,icon:String,color:String,badge:K,iconClass:Z,badgeProps:Object,iconPrefix:String}));var Bo=y({name:ko,props:Co,setup(e,{slots:t}){const o=Ft();ce(Vt);const n=()=>{const{dot:o,badge:n,icon:a,color:l,iconClass:i,badgeProps:r,iconPrefix:s}=e;return t.icon?b(Ut,w({dot:o,class:So("icon"),content:n},r),{default:t.icon}):b(oo,{tag:"div",dot:o,name:a,badge:n,color:l,class:[So("icon"),i],badgeProps:r,classPrefix:s},null)};return()=>b("div",{role:"button",class:So(),tabindex:0,onClick:o},[n(),t.default?t.default():e.text])}});const To=e("ActionBarIcon",Ct(Bo)),Po={show:Boolean,zIndex:K,overlay:_,duration:K,teleport:[String,Object],lockScroll:_,lazyRender:_,beforeClose:Function,overlayStyle:Object,overlayClass:Z,transitionAppear:Boolean,closeOnClickOverlay:_},Do=Object.keys(Po);function Oo(){const e=r(0),t=r(0),o=r(0),n=r(0),a=r(0),l=r(0),i=r(""),s=r(!0),c=()=>{o.value=0,n.value=0,a.value=0,l.value=0,i.value="",s.value=!0};return{move:r=>{const c=r.touches[0];o.value=(c.clientX<0?0:c.clientX)-e.value,n.value=c.clientY-t.value,a.value=Math.abs(o.value),l.value=Math.abs(n.value);var u,d;(!i.value||a.value<10&&l.value<10)&&(i.value=(u=a.value,d=l.value,u>d?"horizontal":d>u?"vertical":"")),s.value&&(a.value>kt||l.value>kt)&&(s.value=!1)},start:o=>{c(),e.value=o.touches[0].clientX,t.value=o.touches[0].clientY},reset:c,startX:e,startY:t,deltaX:o,deltaY:n,offsetX:a,offsetY:l,direction:i,isVertical:()=>"vertical"===i.value,isHorizontal:()=>"horizontal"===i.value,isTap:s}}let Io=0;const Ao="van-overflow-hidden";function Vo(e,t){const o=Oo(),n=t=>{o.move(t);const n=o.deltaY.value>0?"10":"01",a=Pe(t.target,e.value),{scrollHeight:l,offsetHeight:i,scrollTop:r}=a;let s="11";0===r?s=i>=l?"00":"01":r+i>=l&&(s="10"),"11"===s||!o.isVertical()||parseInt(s,2)&parseInt(n,2)||Fe(t,!0)},a=()=>{document.addEventListener("touchstart",o.start),document.addEventListener("touchmove",n,{passive:!1}),Io||document.body.classList.add(Ao),Io++},l=()=>{Io&&(document.removeEventListener("touchstart",o.start),document.removeEventListener("touchmove",n),Io--,Io||document.body.classList.remove(Ao))},i=()=>t()&&l();xe((()=>t()&&a())),d(i),c(i),m(t,(e=>{e?a():l()}))}function zo(e){const t=r(!1);return m(e,(e=>{e&&(t.value=e)}),{immediate:!0}),e=>()=>t.value?e():null}const Eo=()=>{var e;const{scopeId:t}=(null==(e=a())?void 0:e.vnode)||{};return t?{[t]:""}:null},[$o,Lo]=dt("overlay"),Mo=e("overlayProps",{show:Boolean,zIndex:K,duration:K,className:Z,lockScroll:_,lazyRender:_,customStyle:Object});var Ro=y({name:$o,props:Mo,setup(e,{slots:t}){const o=r(),n=zo((()=>e.show||!e.lazyRender))((()=>{var n;const a=L(Ye(e.zIndex),e.customStyle);return F(e.duration)&&(a.animationDuration=`${e.duration}s`),S(b("div",{ref:o,style:a,class:[Lo(),e.className]},[null==(n=t.default)?void 0:n.call(t)]),[[C,e.show]])}));return we("touchmove",(t=>{e.lockScroll&&Fe(t,!0)}),{target:o}),()=>b(k,{name:"van-fade",appear:!0},{default:n})}});const Fo=e("Overlay",Ct(Ro)),Ho=e("popupProps",L({},Po,{round:Boolean,position:oe("center"),closeIcon:oe("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:oe("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean})),[No,jo]=dt("popup");var Wo=y({name:No,inheritAttrs:!1,props:Ho,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:o,slots:n}){let a,l;const s=r(),c=r(),h=zo((()=>e.show||!e.lazyRender)),g=i((()=>{const t={zIndex:s.value};if(F(e.duration)){t["center"===e.position?"animationDuration":"transitionDuration"]=`${e.duration}s`}return t})),y=()=>{a||(a=!0,s.value=void 0!==e.zIndex?+e.zIndex:++Yt,t("open"))},x=()=>{a&&St(e.beforeClose,{done(){a=!1,t("close"),t("update:show",!1)}})},P=o=>{t("clickOverlay",o),e.closeOnClickOverlay&&x()},D=()=>{if(e.overlay)return b(Fo,w({show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},Eo(),{onClick:P}),{default:n["overlay-content"]})},O=e=>{t("clickCloseIcon",e),x()},I=()=>{if(e.closeable)return b(oo,{role:"button",tabindex:0,name:e.closeIcon,class:[jo("close-icon",e.closeIconPosition),xt],classPrefix:e.iconPrefix,onClick:O},null)};let A;const V=()=>{A&&clearTimeout(A),A=setTimeout((()=>{t("opened")}))},z=()=>t("closed"),E=e=>t("keydown",e),$=h((()=>{var t;const{round:a,position:l,safeAreaInsetTop:i,safeAreaInsetBottom:r}=e;return S(b("div",w({ref:c,style:g.value,role:"dialog",tabindex:0,class:[jo({round:a,[l]:l}),{"van-safe-area-top":i,"van-safe-area-bottom":r}],onKeydown:E},o,Eo()),[null==(t=n.default)?void 0:t.call(n),I()]),[[C,e.show]])})),L=()=>{const{position:t,transition:o,transitionAppear:n}=e;return b(k,{name:o||("center"===t?"van-fade":`van-popup-slide-${t}`),appear:n,onAfterEnter:V,onAfterLeave:z},{default:$})};return m((()=>e.show),(e=>{e&&!a&&(y(),0===o.tabindex&&v((()=>{var e;null==(e=c.value)||e.focus()}))),!e&&a&&(a=!1,t("close"))})),Lt({popupRef:c}),Vo(c,(()=>e.show&&e.lockScroll)),we("popstate",(()=>{e.closeOnPopstate&&(x(),l=!1)})),p((()=>{e.show&&y()})),u((()=>{l&&(t("update:show",!0),l=!1)})),d((()=>{e.show&&e.teleport&&(x(),l=!0)})),f(Tt,(()=>e.show)),()=>e.teleport?b(B,{to:e.teleport},{default:()=>[D(),L()]}):b(T,null,[D(),L()])}});const Uo=e("Popup",Ct(Wo)),[Yo,Xo]=dt("action-sheet"),qo=e("actionSheetProps",L({},Po,{title:String,round:_,actions:Q(),closeIcon:oe("cross"),closeable:_,cancelText:String,description:String,closeOnPopstate:_,closeOnClickAction:Boolean,safeAreaInsetBottom:_})),Go=[...Do,"round","closeOnPopstate","safeAreaInsetBottom"];var Zo=y({name:Yo,props:qo,emits:["select","cancel","update:show"],setup(e,{slots:t,emit:o}){const n=e=>o("update:show",e),a=()=>{n(!1),o("cancel")},l=()=>{if(e.title)return b("div",{class:Xo("header")},[e.title,e.closeable&&b(oo,{name:e.closeIcon,class:[Xo("close"),xt],onClick:a},null)])},i=()=>{if(t.cancel||e.cancelText)return[b("div",{class:Xo("gap")},null),b("button",{type:"button",class:Xo("cancel"),onClick:a},[t.cancel?t.cancel():e.cancelText])]},r=(e,o)=>e.loading?b(uo,{class:Xo("loading-icon")},null):t.action?t.action({action:e,index:o}):[b("span",{class:Xo("name")},[e.name]),e.subname&&b("div",{class:Xo("subname")},[e.subname])],s=(t,a)=>{const{color:l,loading:i,callback:s,disabled:c,className:u}=t;return b("button",{type:"button",style:{color:l},class:[Xo("item",{loading:i,disabled:c}),u],onClick:()=>{c||i||(s&&s(t),e.closeOnClickAction&&n(!1),v((()=>o("select",t,a))))}},[r(t,a)])},c=()=>{if(e.description||t.description){const o=t.description?t.description():e.description;return b("div",{class:Xo("description")},[o])}};return()=>b(Uo,w({class:Xo(),position:"bottom","onUpdate:show":n},X(e,Go)),{default:()=>{var o;return[l(),c(),b("div",{class:Xo("content")},[e.actions.map(s),null==(o=t.default)?void 0:o.call(t)]),i()]}})}});const Ko=e("ActionSheet",Ct(Zo)),[_o,Jo,Qo]=dt("picker"),en=e=>e.find((e=>!e.disabled))||e[0];function tn(e,t){for(let o=t=Je(t,0,e.length);o<e.length;o++)if(!e[o].disabled)return o;for(let o=t-1;o>=0;o--)if(!e[o].disabled)return o;return 0}const on=(e,t,o)=>void 0!==t&&!!e.find((e=>e[o.value]===t));function nn(e,t,o){const n=e.findIndex((e=>e[o.value]===t));return e[tn(e,n)]}const[an,ln]=dt("picker-column"),rn=Symbol(an);var sn=y({name:an,props:{value:K,fields:J(Object),options:Q(),readonly:Boolean,allowHtml:Boolean,optionHeight:J(Number),swipeDuration:J(K),visibleOptionNum:J(K)},emits:["change","clickOption","scrollInto"],setup(e,{emit:t,slots:o}){let n,a,l,s,c;const u=r(),d=r(),p=r(0),v=r(0),h=Oo(),m=()=>e.options.length,f=()=>e.optionHeight*(+e.visibleOptionNum-1)/2,g=o=>{let a=tn(e.options,o);const l=-a*e.optionHeight,i=()=>{a>m()-1&&(a=tn(e.options,o));const n=e.options[a][e.fields.value];n!==e.value&&t("change",n)};n&&l!==p.value?c=i:i(),p.value=l},y=()=>e.readonly||!e.options.length,w=t=>Je(Math.round(-t/e.optionHeight),0,m()-1),k=i((()=>w(p.value))),S=()=>{n=!1,v.value=0,c&&(c(),c=null)},C=e=>{if(!y()){if(h.start(e),n){const e=function(e){const{transform:t}=window.getComputedStyle(e),o=t.slice(7,t.length-1).split(", ")[5];return Number(o)}(d.value);p.value=Math.min(0,e-f())}v.value=0,a=p.value,l=Date.now(),s=a,c=null}},B=()=>{if(y())return;const t=p.value-s,o=Date.now()-l;if(o<300&&Math.abs(t)>15)return void((t,o)=>{const n=Math.abs(t/o);t=p.value+n/.003*(t<0?-1:1);const a=w(t);v.value=+e.swipeDuration,g(a)})(t,o);const a=w(p.value);v.value=200,g(a),setTimeout((()=>{n=!1}),0)},T=()=>{const a={height:`${e.optionHeight}px`};return e.options.map(((l,i)=>{const r=l[e.fields.text],{disabled:s}=l,u=l[e.fields.value],d={role:"button",style:a,tabindex:s?-1:0,class:[ln("item",{disabled:s,selected:u===e.value}),l.className],onClick:()=>(o=>{n||y()||(c=null,v.value=200,g(o),t("clickOption",e.options[o]))})(i)},p={class:"van-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:r};return b("li",d,[o.option?o.option(l,i):b("div",p,null)])}))};return ce(rn),Lt({stopMomentum:S}),x((()=>{const t=n?Math.floor(-p.value/e.optionHeight):e.options.findIndex((t=>t[e.fields.value]===e.value)),o=tn(e.options,t),a=-o*e.optionHeight;n&&o<t&&S(),p.value=a})),we("touchmove",(o=>{if(y())return;h.move(o),h.isVertical()&&(n=!0,Fe(o,!0));const i=Je(a+h.deltaY.value,-m()*e.optionHeight,e.optionHeight),r=w(i);r!==k.value&&t("scrollInto",e.options[r]),p.value=i;const c=Date.now();c-l>300&&(l=c,s=i)}),{target:u}),()=>b("div",{ref:u,class:ln(),onTouchstartPassive:C,onTouchend:B,onTouchcancel:B},[b("ul",{ref:d,style:{transform:`translate3d(0, ${p.value+f()}px, 0)`,transitionDuration:`${v.value}ms`,transitionProperty:v.value?"all":"none"},class:ln("wrapper"),onTransitionend:S},[T()])])}});const[cn]=dt("picker-toolbar"),un={title:String,cancelButtonText:String,confirmButtonText:String},dn=["cancel","confirm","title","toolbar"],pn=Object.keys(un);var vn=y({name:cn,props:un,emits:["confirm","cancel"],setup(e,{emit:t,slots:o}){const n=()=>t("cancel"),a=()=>t("confirm"),l=()=>{const t=e.cancelButtonText||Qo("cancel");return b("button",{type:"button",class:[Jo("cancel"),xt],onClick:n},[o.cancel?o.cancel():t])},i=()=>{const t=e.confirmButtonText||Qo("confirm");return b("button",{type:"button",class:[Jo("confirm"),xt],onClick:a},[o.confirm?o.confirm():t])};return()=>b("div",{class:Jo("toolbar")},[o.toolbar?o.toolbar():[l(),o.title?o.title():e.title?b("div",{class:[Jo("title"),"van-ellipsis"]},[e.title]):void 0,i()]])}});const hn=(e,t)=>{const o=r(e());return m(e,(e=>{e!==o.value&&(o.value=e)})),m(o,(o=>{o!==e()&&t(o)})),o},mn=Array.isArray,fn=e=>"string"==typeof e,gn=e=>null!==e&&"object"==typeof e,bn=/\B([A-Z])/g,yn=(e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))})((e=>e.replace(bn,"-$1").toLowerCase()));function xn(e){if(mn(e)){const t={};for(let o=0;o<e.length;o++){const n=e[o],a=fn(n)?Cn(n):xn(n);if(a)for(const e in a)t[e]=a[e]}return t}return fn(e)||gn(e)?e:void 0}const wn=/;(?![^(]*\))/g,kn=/:([^]+)/,Sn=/\/\*[^]*?\*\//g;function Cn(e){const t={};return e.replace(Sn,"").split(wn).forEach((e=>{if(e){const o=e.split(kn);o.length>1&&(t[o[0].trim()]=o[1].trim())}})),t}function Bn(e){let t="";if(fn(e))t=e;else if(mn(e))for(let o=0;o<e.length;o++){const n=Bn(e[o]);n&&(t+=n+" ")}else if(gn(e))for(const o in e)e[o]&&(t+=o+" ");return t.trim()}let Tn=0;function Pn(){const e=a(),{name:t="unknown"}=(null==e?void 0:e.type)||{};return`${t}-${++Tn}`}function Dn(){const e=r([]),t=[];P((()=>{e.value=[]}));return[e,o=>(t[o]||(t[o]=t=>{e.value[o]=t}),t[o])]}function On(e,t){if(!M||!window.IntersectionObserver)return;const o=new IntersectionObserver((e=>{t(e[0].intersectionRatio>0)}),{root:document.body}),n=()=>{e.value&&o.unobserve(e.value)};d(n),c(n),xe((()=>{e.value&&o.observe(e.value)}))}const[In,An]=dt("sticky"),Vn=e("stickyProps",{zIndex:K,position:oe("top"),container:Object,offsetTop:te(0),offsetBottom:te(0)});var zn=y({name:In,props:Vn,emits:["scroll","change"],setup(e,{emit:t,slots:o}){const n=r(),a=De(n),l=s({fixed:!1,width:0,height:0,transform:0}),c=r(!1),u=i((()=>Ge("top"===e.position?e.offsetTop:e.offsetBottom))),d=i((()=>{if(c.value)return;const{fixed:e,height:t,width:o}=l;return e?{width:`${o}px`,height:`${t}px`}:void 0})),p=i((()=>{if(!l.fixed||c.value)return;const t=L(Ye(e.zIndex),{width:`${l.width}px`,height:`${l.height}px`,[e.position]:`${u.value}px`});return l.transform&&(t.transform=`translate3d(0, ${l.transform}px, 0)`),t})),h=()=>{if(!n.value||He(n))return;const{container:o,position:a}=e,i=se(n),r=Ae(window);if(l.width=i.width,l.height=i.height,"top"===a)if(o){const e=se(o),t=e.bottom-u.value-l.height;l.fixed=u.value>i.top&&e.bottom>0,l.transform=t<0?t:0}else l.fixed=u.value>i.top;else{const{clientHeight:e}=document.documentElement;if(o){const t=se(o),n=e-t.top-u.value-l.height;l.fixed=e-u.value<i.bottom&&e>t.top,l.transform=n<0?-n:0}else l.fixed=e-u.value<i.bottom}(e=>{t("scroll",{scrollTop:e,isFixed:l.fixed})})(r)};return m((()=>l.fixed),(e=>t("change",e))),we("scroll",h,{target:a,passive:!0}),On(n,h),m([Ne,je],(()=>{n.value&&!He(n)&&l.fixed&&(c.value=!0,v((()=>{const e=se(n);l.width=e.width,l.height=e.height,c.value=!1})))})),()=>{var e;return b("div",{ref:n,style:d.value},[b("div",{class:An({fixed:l.fixed&&!c.value}),style:p.value},[null==(e=o.default)?void 0:e.call(o)])])}}});const En=e("Sticky",Ct(zn)),[$n,Ln]=dt("swipe"),Mn=e("swipeProps",{loop:_,width:K,height:K,vertical:Boolean,autoplay:te(0),duration:te(500),touchable:_,lazyRender:Boolean,initialSwipe:te(0),indicatorColor:String,showIndicators:_,stopPropagation:_}),Rn=Symbol($n);var Fn=y({name:$n,props:Mn,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:o}){const n=r(),a=r(),l=s({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let h=!1;const f=Oo(),{children:g,linkChildren:y}=pe(Rn),x=i((()=>g.length)),w=i((()=>l[e.vertical?"height":"width"])),k=i((()=>e.vertical?f.deltaY.value:f.deltaX.value)),S=i((()=>{if(l.rect){return(e.vertical?l.rect.height:l.rect.width)-w.value*x.value}return 0})),C=i((()=>w.value?Math.ceil(Math.abs(S.value)/w.value):x.value)),B=i((()=>x.value*w.value)),T=i((()=>(l.active+x.value)%x.value)),P=i((()=>{const t=e.vertical?"vertical":"horizontal";return f.direction.value===t})),D=i((()=>{const t={transitionDuration:`${l.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${+l.offset.toFixed(2)}px)`};if(w.value){const o=e.vertical?"height":"width",n=e.vertical?"width":"height";t[o]=`${B.value}px`,t[n]=e[n]?`${e[n]}px`:""}return t})),O=(t,o=0)=>{let n=t*w.value;e.loop||(n=Math.min(n,-S.value));let a=o-n;return e.loop||(a=Je(a,S.value,0)),a},I=({pace:o=0,offset:n=0,emitChange:a})=>{if(x.value<=1)return;const{active:i}=l,r=(t=>{const{active:o}=l;return t?e.loop?Je(o+t,-1,x.value):Je(o+t,0,C.value):o})(o),s=O(r,n);if(e.loop){if(g[0]&&s!==S.value){const e=s<S.value;g[0].setOffset(e?B.value:0)}if(g[x.value-1]&&0!==s){const e=s>0;g[x.value-1].setOffset(e?-B.value:0)}}l.active=r,l.offset=s,a&&r!==i&&t("change",T.value)},A=()=>{l.swiping=!0,l.active<=-1?I({pace:x.value}):l.active>=x.value&&I({pace:-x.value})},V=()=>{A(),f.reset(),ie((()=>{l.swiping=!1,I({pace:1,emitChange:!0})}))};let z;const E=()=>clearTimeout(z),$=()=>{E(),+e.autoplay>0&&x.value>1&&(z=setTimeout((()=>{V(),$()}),+e.autoplay))},L=(t=+e.initialSwipe)=>{if(!n.value)return;const o=()=>{var o,a;if(!He(n)){const t={width:n.value.offsetWidth,height:n.value.offsetHeight};l.rect=t,l.width=+(null!=(o=e.width)?o:t.width),l.height=+(null!=(a=e.height)?a:t.height)}x.value&&-1===(t=Math.min(x.value-1,t))&&(t=x.value-1),l.active=t,l.swiping=!0,l.offset=O(t),g.forEach((e=>{e.setOffset(0)})),$()};He(n)?v().then(o):o()},M=()=>L(l.active);let R;const F=t=>{!e.touchable||t.touches.length>1||(f.start(t),h=!1,R=Date.now(),E(),A())},H=()=>{if(!e.touchable||!l.swiping)return;const o=Date.now()-R,n=k.value/o;if((Math.abs(n)>.25||Math.abs(k.value)>w.value/2)&&P.value){const t=e.vertical?f.offsetY.value:f.offsetX.value;let o=0;o=e.loop?t>0?k.value>0?-1:1:0:-Math[k.value>0?"ceil":"floor"](k.value/w.value),I({pace:o,emitChange:!0})}else k.value&&I({pace:0});h=!1,l.swiping=!1,t("dragEnd",{index:T.value}),$()},N=(t,o)=>{const n=o===T.value,a=n?{backgroundColor:e.indicatorColor}:void 0;return b("i",{style:a,class:Ln("indicator",{active:n})},null)};return Lt({prev:()=>{A(),f.reset(),ie((()=>{l.swiping=!1,I({pace:-1,emitChange:!0})}))},next:V,state:l,resize:M,swipeTo:(t,o={})=>{A(),f.reset(),ie((()=>{let n;n=e.loop&&t===x.value?0===l.active?0:t:t%x.value,o.immediate?ie((()=>{l.swiping=!1})):l.swiping=!1,I({pace:n-l.active,emitChange:!0})}))}}),y({size:w,props:e,count:x,activeIndicator:T}),m((()=>e.initialSwipe),(e=>L(+e))),m(x,(()=>L(l.active))),m((()=>e.autoplay),$),m([Ne,je,()=>e.width,()=>e.height],M),m(function(){if(!Se&&(Se=r("visible"),ne)){const e=()=>{Se.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return Se}(),(e=>{"visible"===e?$():E()})),p(L),u((()=>L(l.active))),Pt((()=>L(l.active))),d(E),c(E),we("touchmove",(o=>{if(e.touchable&&l.swiping&&(f.move(o),P.value)){!e.loop&&(0===l.active&&k.value>0||l.active===x.value-1&&k.value<0)||(Fe(o,e.stopPropagation),I({offset:k.value}),h||(t("dragStart",{index:T.value}),h=!0))}}),{target:a}),()=>{var t;return b("div",{ref:n,class:Ln()},[b("div",{ref:a,style:D.value,class:Ln("track",{vertical:e.vertical}),onTouchstartPassive:F,onTouchend:H,onTouchcancel:H},[null==(t=o.default)?void 0:t.call(o)]),o.indicator?o.indicator({active:T.value,total:x.value}):e.showIndicators&&x.value>1?b("div",{class:Ln("indicators",{vertical:e.vertical})},[Array(x.value).fill("").map(N)]):void 0])}}});const Hn=e("Swipe",Ct(Fn)),[Nn,jn]=dt("tabs");var Wn=y({name:Nn,props:{count:J(Number),inited:Boolean,animated:Boolean,duration:J(K),swipeable:Boolean,lazyRender:Boolean,currentIndex:J(Number)},emits:["change"],setup(e,{emit:t,slots:o}){const n=r(),a=e=>t("change",e),l=()=>{var t;const l=null==(t=o.default)?void 0:t.call(o);return e.animated||e.swipeable?b(Hn,{ref:n,loop:!1,class:jn("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:a},{default:()=>[l]}):l},i=t=>{const o=n.value;o&&o.state.active!==t&&o.swipeTo(t,{immediate:!e.inited})};return m((()=>e.currentIndex),i),p((()=>{i(e.currentIndex)})),Lt({swipeRef:n}),()=>b("div",{class:jn("content",{animated:e.animated||e.swipeable})},[l()])}});const[Un,Yn]=dt("tabs"),Xn=e("tabsProps",{type:oe("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:te(0),duration:te(.3),animated:Boolean,ellipsis:_,swipeable:Boolean,scrollspy:Boolean,offsetTop:te(0),background:String,lazyRender:_,lineWidth:K,lineHeight:K,beforeChange:Function,swipeThreshold:te(5),titleActiveColor:String,titleInactiveColor:String}),qn=Symbol(Un);var Gn=y({name:Un,props:Xn,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:t,slots:o}){let n,a,l,c,d;const p=r(),h=r(),f=r(),g=r(),y=Pn(),x=De(p),[w,k]=Dn(),{children:S,linkChildren:C}=pe(qn),B=s({inited:!1,position:"",lineStyle:{},currentIndex:-1}),T=i((()=>S.length>+e.swipeThreshold||!e.ellipsis||e.shrink)),P=i((()=>({borderColor:e.color,background:e.background}))),D=(e,t)=>{var o;return null!=(o=e.name)?o:t},O=i((()=>{const e=S[B.currentIndex];if(e)return D(e,B.currentIndex)})),I=i((()=>Ge(e.offsetTop))),A=i((()=>e.sticky?I.value+n:0)),V=t=>{const o=h.value,n=w.value;if(!(T.value&&o&&n&&n[B.currentIndex]))return;const a=n[B.currentIndex].$el,l=a.offsetLeft-(o.offsetWidth-a.offsetWidth)/2;c&&c(),c=function(e,t,o){let n,a=0;const l=e.scrollLeft,i=0===o?1:Math.round(1e3*o/16);return function o(){e.scrollLeft+=(t-l)/i,++a<i&&(n=ae(o))}(),function(){le(n)}}(o,l,t?0:+e.duration)},z=()=>{const t=B.inited;v((()=>{const o=w.value;if(!o||!o[B.currentIndex]||"line"!==e.type||He(p.value))return;const n=o[B.currentIndex].$el,{lineWidth:a,lineHeight:l}=e,i=n.offsetLeft+n.offsetWidth/2,r={width:We(a),backgroundColor:e.color,transform:`translateX(${i}px) translateX(-50%)`};if(t&&(r.transitionDuration=`${e.duration}s`),F(l)){const e=We(l);r.height=e,r.borderRadius=e}B.lineStyle=r}))},E=(o,n)=>{const a=(e=>{const t=e<B.currentIndex?-1:1;for(;e>=0&&e<S.length;){if(!S[e].disabled)return e;e+=t}})(o);if(!F(a))return;const i=S[a],r=D(i,a),s=null!==B.currentIndex;B.currentIndex!==a&&(B.currentIndex=a,n||V(),z()),r!==e.active&&(t("update:active",r),s&&t("change",r,i.title)),l&&!e.scrollspy&&Ee(Math.ceil($e(p.value)-I.value))},$=(e,t)=>{const o=S.find(((t,o)=>D(t,o)===e)),n=o?S.indexOf(o):0;E(n,t)},L=(t=!1)=>{if(e.scrollspy){const o=S[B.currentIndex].$el;if(o&&x.value){const n=$e(o,x.value)-A.value;a=!0,d&&d(),d=function(e,t,o,n){let a,l=Ae(e);const i=l<t,r=0===o?1:Math.round(1e3*o/16),s=(t-l)/r;return function o(){l+=s,(i&&l>t||!i&&l<t)&&(l=t),Ve(e,l),i&&l<t||!i&&l>t?a=ae(o):n&&(a=ae(n))}(),function(){le(a)}}(x.value,n,t?0:+e.duration,(()=>{a=!1}))}}},M=(o,n,a)=>{const{title:l,disabled:i}=S[n],r=D(S[n],n);i||(St(e.beforeChange,{args:[r],done:()=>{E(n),L()}}),Rt(o)),t("clickTab",{name:r,title:l,event:a,disabled:i})},R=e=>{l=e.isFixed,t("scroll",e)},H=()=>{if("line"===e.type&&S.length)return b("div",{class:Yn("line"),style:B.lineStyle},null)},N=()=>{var t,n,a;const{type:l,border:i,sticky:r}=e,s=[b("div",{ref:r?void 0:f,class:[Yn("wrap"),{[bt]:"line"===l&&i}]},[b("div",{ref:h,role:"tablist",class:Yn("nav",[l,{shrink:e.shrink,complete:T.value}]),style:P.value,"aria-orientation":"horizontal"},[null==(t=o["nav-left"])?void 0:t.call(o),S.map((e=>e.renderTitle(M))),H(),null==(n=o["nav-right"])?void 0:n.call(o)])]),null==(a=o["nav-bottom"])?void 0:a.call(o)];return r?b("div",{ref:f},[s]):s},j=()=>{z(),v((()=>{var e,t;V(!0),null==(t=null==(e=g.value)?void 0:e.swipeRef.value)||t.resize()}))};m((()=>[e.color,e.duration,e.lineWidth,e.lineHeight]),z),m(Ne,j),m((()=>e.active),(e=>{e!==O.value&&$(e)})),m((()=>S.length),(()=>{B.inited&&($(e.active),z(),v((()=>{V(!0)})))}));return Lt({resize:j,scrollTo:e=>{v((()=>{$(e),L(!0)}))}}),u(z),Pt(z),xe((()=>{$(e.active,!0),v((()=>{B.inited=!0,f.value&&(n=se(f.value).height),V(!0)}))})),On(p,z),we("scroll",(()=>{if(e.scrollspy&&!a){const e=(()=>{for(let e=0;e<S.length;e++){const{top:t}=se(S[e].$el);if(t>A.value)return 0===e?0:e-1}return S.length-1})();E(e)}}),{target:x,passive:!0}),C({id:y,props:e,setLine:z,scrollable:T,onRendered:(e,o)=>t("rendered",e,o),currentName:O,setTitleRefs:k,scrollIntoView:V}),()=>b("div",{ref:p,class:Yn([e.type])},[e.sticky?b(En,{container:p.value,offsetTop:I.value,onScroll:R},{default:()=>[N()]}):N(),b(Wn,{ref:g,count:S.length,inited:B.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:B.currentIndex,onChange:E},{default:()=>{var e;return[null==(e=o.default)?void 0:e.call(o)]}})])}});const Zn=Symbol(),[Kn,_n]=dt("tab"),Jn=y({name:Kn,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:K,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:_},setup(e,{slots:t}){const o=i((()=>{const t={},{type:o,color:n,disabled:a,isActive:l,activeColor:i,inactiveColor:r}=e;n&&"card"===o&&(t.borderColor=n,a||(l?t.backgroundColor=n:t.color=n));const s=l?i:r;return s&&(t.color=s),t})),n=()=>{const o=b("span",{class:_n("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||F(e.badge)&&""!==e.badge?b(Ut,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[o]}):o};return()=>b("div",{id:e.id,role:"tab",class:[_n([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:o.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[n()])}}),[Qn,ea]=dt("swipe-item");var ta=y({name:Qn,setup(e,{slots:t}){let o;const n=s({offset:0,inited:!1,mounted:!1}),{parent:a,index:l}=ce(Rn);if(!a)return;const r=i((()=>{const e={},{vertical:t}=a.props;return a.size.value&&(e[t?"height":"width"]=`${a.size.value}px`),n.offset&&(e.transform=`translate${t?"Y":"X"}(${n.offset}px)`),e})),c=i((()=>{const{loop:e,lazyRender:t}=a.props;if(!t||o)return!0;if(!n.mounted)return!1;const i=a.activeIndicator.value,r=a.count.value-1,s=0===i&&e?r:i-1,c=i===r&&e?0:i+1;return o=l.value===i||l.value===s||l.value===c,o}));return p((()=>{v((()=>{n.mounted=!0}))})),Lt({setOffset:e=>{n.offset=e}}),()=>{var e;return b("div",{class:ea(),style:r.value},[c.value?null==(e=t.default)?void 0:e.call(t):null])}}});const oa=e("SwipeItem",Ct(ta)),[na,aa]=dt("tab"),la=e("tabProps",L({},Mt,{dot:Boolean,name:K,badge:K,title:String,disabled:Boolean,titleClass:Z,titleStyle:[String,Object],showZeroBadge:_}));var ia=y({name:na,props:la,setup(e,{slots:t}){const o=Pn(),n=r(!1),l=a(),{parent:s,index:c}=ce(qn);if(!s)return;const u=()=>{var t;return null!=(t=e.name)?t:c.value},d=i((()=>{const t=u()===s.currentName.value;return t&&!n.value&&(n.value=!0,s.props.lazyRender&&v((()=>{s.onRendered(u(),e.title)}))),t})),p=r(""),h=r("");x((()=>{const{titleClass:t,titleStyle:o}=e;p.value=t?Bn(t):"",h.value=o&&"string"!=typeof o?function(e){let t="";if(!e||fn(e))return t;for(const o in e){const n=e[o],a=o.startsWith("--")?o:yn(o);(fn(n)||"number"==typeof n)&&(t+=`${a}:${n};`)}return t}(xn(o)):o}));const g=r(!d.value);return m(d,(e=>{e?g.value=!1:ie((()=>{g.value=!0}))})),m((()=>e.title),(()=>{s.setLine(),s.scrollIntoView()})),f(Zn,d),Lt({id:o,renderTitle:n=>b(Jn,w({key:o,id:`${s.id}-${c.value}`,ref:s.setTitleRefs(c.value),style:h.value,class:p.value,isActive:d.value,controls:o,scrollable:s.scrollable.value,activeColor:s.props.titleActiveColor,inactiveColor:s.props.titleInactiveColor,onClick:e=>n(l.proxy,c.value,e)},X(s.props,["type","color","shrink"]),X(e,["dot","badge","title","disabled","showZeroBadge"])),{title:t.title})}),()=>{var e;const a=`${s.id}-${c.value}`,{animated:l,swipeable:i,scrollspy:r,lazyRender:u}=s.props;if(!t.default&&!l)return;const p=r||d.value;if(l||i)return b(oa,{id:o,role:"tabpanel",class:aa("panel-wrapper",{inactive:g.value}),tabindex:d.value?0:-1,"aria-hidden":!d.value,"aria-labelledby":a},{default:()=>{var e;return[b("div",{class:aa("panel")},[null==(e=t.default)?void 0:e.call(t)])]}});const v=n.value||r||!u?null==(e=t.default)?void 0:e.call(t):null;return S(b("div",{id:o,role:"tabpanel",class:aa("panel"),tabindex:p?0:-1,"aria-labelledby":a},[v]),[[C,p]])}}});const ra=e("Tab",Ct(ia)),sa=e("Tabs",Ct(Gn)),[ca,ua]=dt("picker-group"),da=Symbol(ca),pa=e("pickerGroupProps",L({tabs:Q(),activeTab:te(0),nextStepText:String},un));var va=y({name:ca,props:pa,emits:["confirm","cancel","update:activeTab"],setup(e,{emit:t,slots:o}){const n=hn((()=>e.activeTab),(e=>t("update:activeTab",e))),{children:a,linkChildren:l}=pe(da);l();const i=()=>+n.value<e.tabs.length-1&&e.nextStepText,r=()=>{i()?n.value=+n.value+1:t("confirm",a.map((e=>e.confirm())))},s=()=>t("cancel");return()=>{var t;const a=null==(t=o.default)?void 0:t.call(o),l=i()?e.nextStepText:e.confirmButtonText;return b("div",{class:ua()},[b(vn,{title:e.title,cancelButtonText:e.cancelButtonText,confirmButtonText:l,onConfirm:r,onCancel:s},X(o,dn)),b(sa,{active:n.value,"onUpdate:active":e=>n.value=e,class:ua("tabs"),shrink:!0,animated:!0,lazyRender:!1},{default:()=>[e.tabs.map(((e,t)=>b(ra,{title:e,titleClass:ua("tab-title")},{default:()=>[null==a?void 0:a[t]]})))]})])}}});const ha=L({loading:Boolean,readonly:Boolean,allowHtml:Boolean,optionHeight:te(44),showToolbar:_,swipeDuration:te(1e3),visibleOptionNum:te(6)},un),ma=e("pickerProps",L({},ha,{columns:Q(),modelValue:Q(),toolbarPosition:oe("top"),columnsFieldNames:Object}));var fa=y({name:_o,props:ma,emits:["confirm","cancel","change","scrollInto","clickOption","update:modelValue"],setup(e,{emit:t,slots:o}){const n=r(),a=r(e.modelValue.slice(0)),{parent:l}=ce(da),{children:s,linkChildren:c}=pe(rn);c();const u=i((()=>function(e){return L({text:"text",value:"value",children:"children"},e)}(e.columnsFieldNames))),d=i((()=>Ge(e.optionHeight))),p=i((()=>function(e,t){const o=e[0];if(o){if(Array.isArray(o))return"multiple";if(t.children in o)return"cascade"}return"default"}(e.columns,u.value))),h=i((()=>{const{columns:t}=e;switch(p.value){case"multiple":return t;case"cascade":return function(e,t,o){const n=[];let a={[t.children]:e},l=0;for(;a&&a[t.children];){const e=a[t.children],i=o.value[l];a=F(i)?nn(e,i,t):void 0,!a&&e.length&&(a=nn(e,en(e)[t.value],t)),l++,n.push(e)}return n}(t,u.value,a);default:return[t]}})),f=i((()=>h.value.some((e=>e.length)))),g=i((()=>h.value.map(((e,t)=>nn(e,a.value[t],u.value))))),y=i((()=>h.value.map(((e,t)=>e.findIndex((e=>e[u.value.value]===a.value[t])))))),x=(e,t)=>{if(a.value[e]!==t){const o=a.value.slice(0);o[e]=t,a.value=o}},k=()=>({selectedValues:a.value.slice(0),selectedOptions:g.value,selectedIndexes:y.value}),S=()=>{s.forEach((e=>e.stopMomentum()));const e=k();return v((()=>{t("confirm",e)})),e},C=()=>t("cancel",k()),B=()=>h.value.map(((n,l)=>b(sn,{value:a.value[l],fields:u.value,options:n,readonly:e.readonly,allowHtml:e.allowHtml,optionHeight:d.value,swipeDuration:e.swipeDuration,visibleOptionNum:e.visibleOptionNum,onChange:e=>((e,o)=>{x(o,e),"cascade"===p.value&&a.value.forEach(((e,t)=>{const o=h.value[t];on(o,e,u.value)||x(t,o.length?o[0][u.value.value]:void 0)})),v((()=>{t("change",L({columnIndex:o},k()))}))})(e,l),onClickOption:e=>((e,o)=>{const n={columnIndex:o,currentOption:e};t("clickOption",L(k(),n)),t("scrollInto",n)})(e,l),onScrollInto:e=>{t("scrollInto",{currentOption:e,columnIndex:l})}},{option:o.option}))),T=e=>{if(f.value){const t={height:`${d.value}px`},o={backgroundSize:`100% ${(e-d.value)/2}px`};return[b("div",{class:Jo("mask"),style:o},null),b("div",{class:[yt,Jo("frame")],style:t},null)]}},P=()=>{const t=d.value*+e.visibleOptionNum,o={height:`${t}px`};return b("div",{ref:n,class:Jo("columns"),style:o},[B(),T(t)])},D=()=>{if(e.showToolbar&&!l)return b(vn,w(X(e,pn),{onConfirm:S,onCancel:C}),X(o,dn))};let O;m(h,(e=>{e.forEach(((e,t)=>{e.length&&!on(e,a.value[t],u.value)&&x(t,en(e)[u.value.value])}))}),{immediate:!0}),m((()=>e.modelValue),(e=>{q(e,a.value)||q(e,O)||(a.value=e.slice(0),O=e.slice(0))}),{deep:!0}),m(a,(o=>{q(o,e.modelValue)||(O=o.slice(0),t("update:modelValue",O))}),{immediate:!0}),we("touchmove",Fe,{target:n});return Lt({confirm:S,getSelectedOptions:()=>g.value}),()=>{var t,n;return b("div",{class:Jo()},["top"===e.toolbarPosition?D():null,e.loading?b(uo,{class:Jo("loading")},null):null,null==(t=o["columns-top"])?void 0:t.call(o),P(),null==(n=o["columns-bottom"])?void 0:n.call(o),"bottom"===e.toolbarPosition?D():null])}}});const ga="000000",ba=["title","cancel","confirm","toolbar","columns-top","columns-bottom"],ya=["title","loading","readonly","optionHeight","swipeDuration","visibleOptionNum","cancelButtonText","confirmButtonText"],xa=(e="",t=ga,o=void 0)=>({text:e,value:t,children:o});function wa({areaList:e,columnsNum:t,columnsPlaceholder:o}){const{city_list:n={},county_list:a={},province_list:l={}}=e,i=+t>1,r=+t>2,s=new Map;Object.keys(l).forEach((e=>{s.set(e.slice(0,2),xa(l[e],e,(()=>{if(i)return o.length?[xa(o[0],ga,r?[]:void 0)]:[]})()))}));const c=new Map;if(i){const e=()=>{if(r)return o.length?[xa(o[1])]:[]};Object.keys(n).forEach((t=>{const o=xa(n[t],t,e());c.set(t.slice(0,4),o);const a=s.get(t.slice(0,2));a&&a.children.push(o)}))}r&&Object.keys(a).forEach((e=>{const t=c.get(e.slice(0,4));t&&t.children.push(xa(a[e],e))}));const u=Array.from(s.values());if(o.length){const e=r?[xa(o[2])]:void 0,t=i?[xa(o[1],ga,e)]:void 0;u.unshift(xa(o[0],ga,t))}return u}const ka=e("Picker",Ct(fa)),[Sa,Ca]=dt("area"),Ba=e("areaProps",L({},X(ha,ya),{modelValue:String,columnsNum:te(3),columnsPlaceholder:Q(),areaList:{type:Object,default:()=>({})}}));var Ta=y({name:Sa,props:Ba,emits:["change","confirm","cancel","update:modelValue"],setup(e,{emit:t,slots:o}){const n=r([]),a=r(),l=i((()=>wa(e))),s=(...e)=>t("change",...e),c=(...e)=>t("cancel",...e),u=(...e)=>t("confirm",...e);return m(n,(o=>{const n=o.length?o[o.length-1]:"";n&&n!==e.modelValue&&t("update:modelValue",n)}),{deep:!0}),m((()=>e.modelValue),(t=>{if(t){t!==(n.value.length?n.value[n.value.length-1]:"")&&(n.value=[`${t.slice(0,2)}0000`,`${t.slice(0,4)}00`,t].slice(0,+e.columnsNum))}else n.value=[]}),{immediate:!0}),Lt({confirm:()=>{var e;return null==(e=a.value)?void 0:e.confirm()},getSelectedOptions:()=>{var e;return(null==(e=a.value)?void 0:e.getSelectedOptions())||[]}}),()=>b(ka,w({ref:a,modelValue:n.value,"onUpdate:modelValue":e=>n.value=e,class:Ca(),columns:l.value,onChange:s,onCancel:c,onConfirm:u},X(e,ya)),X(o,ba))}});const Pa=e("Area",Ct(Ta)),[Da,Oa]=dt("cell"),Ia={tag:oe("div"),icon:String,size:String,title:K,value:K,label:K,center:Boolean,isLink:Boolean,border:_,required:Boolean,iconPrefix:String,valueClass:Z,labelClass:Z,titleClass:Z,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},Aa=e("cellProps",L({},Ia,Mt));var Va=y({name:Da,props:Aa,setup(e,{slots:t}){const o=Ft(),n=()=>{if(t.label||F(e.label))return b("div",{class:[Oa("label"),e.labelClass]},[t.label?t.label():e.label])},a=()=>{var o;if(t.title||F(e.title)){const a=null==(o=t.title)?void 0:o.call(t);if(Array.isArray(a)&&0===a.length)return;return b("div",{class:[Oa("title"),e.titleClass],style:e.titleStyle},[a||b("span",null,[e.title]),n()])}},l=()=>{const o=t.value||t.default;if(o||F(e.value))return b("div",{class:[Oa("value"),e.valueClass]},[o?o():b("span",null,[e.value])])},i=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const t=e.arrowDirection&&"right"!==e.arrowDirection?`arrow-${e.arrowDirection}`:"arrow";return b(oo,{name:t,class:Oa("right-icon")},null)}};return()=>{var n;const{tag:r,size:s,center:c,border:u,isLink:d,required:p}=e,v=null!=(n=e.clickable)?n:d,h={center:c,required:p,clickable:v,borderless:!u};return s&&(h[s]=!!s),b(r,{class:Oa(h),role:v?"button":void 0,tabindex:v?0:void 0,onClick:o},{default:()=>{var o;return[t.icon?t.icon():e.icon?b(oo,{name:e.icon,class:Oa("left-icon"),classPrefix:e.iconPrefix},null):void 0,a(),l(),i(),null==(o=t.extra)?void 0:o.call(t)]}})}}});const za=e("Cell",Ct(Va)),[Ea,$a]=dt("form"),La=e("formProps",{colon:Boolean,disabled:Boolean,readonly:Boolean,showError:Boolean,labelWidth:K,labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,submitOnEnter:_,showErrorMessage:_,errorMessageAlign:String,validateTrigger:{type:[String,Array],default:"onBlur"}});var Ma=y({name:Ea,props:La,emits:["submit","failed"],setup(e,{emit:t,slots:o}){const{children:n,linkChildren:a}=pe(wt),l=e=>e?n.filter((t=>e.includes(t.name))):n,i=t=>{return"string"==typeof t?(e=>{const t=n.find((t=>t.name===e));return t?new Promise(((e,o)=>{t.validate().then((t=>{t?o(t):e()}))})):Promise.reject()})(t):e.validateFirst?(o=t,new Promise(((e,t)=>{const n=[];l(o).reduce(((e,t)=>e.then((()=>{if(!n.length)return t.validate().then((e=>{e&&n.push(e)}))}))),Promise.resolve()).then((()=>{n.length?t(n):e()}))}))):(e=>new Promise(((t,o)=>{const n=l(e);Promise.all(n.map((e=>e.validate()))).then((e=>{(e=e.filter(Boolean)).length?o(e):t()}))})))(t);var o},r=(e,t)=>{n.some((o=>o.name===e&&(o.$el.scrollIntoView(t),!0)))},s=()=>n.reduce(((e,t)=>(void 0!==t.name&&(e[t.name]=t.formValue.value),e)),{}),c=()=>{const o=s();i().then((()=>t("submit",o))).catch((n=>{t("failed",{values:o,errors:n}),e.scrollToError&&n[0].name&&r(n[0].name)}))},u=e=>{Fe(e),c()};return a({props:e}),Lt({submit:c,validate:i,getValues:s,scrollToField:r,resetValidation:e=>{"string"==typeof e&&(e=[e]);l(e).forEach((e=>{e.resetValidation()}))},getValidationStatus:()=>n.reduce(((e,t)=>(e[t.name]=t.getValidationStatus(),e)),{})}),()=>{var e;return b("form",{class:$a(),onSubmit:u},[null==(e=o.default)?void 0:e.call(o)])}}});const Ra=e("Form",Ct(Ma));function Fa(e){return Array.isArray(e)?!e.length:0!==e&&!e}function Ha(e,t){const{message:o}=t;return H(o)?o(e,t):o||""}function Na({target:e}){e.composing=!0}function ja({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}function Wa(e){return[...e].length}function Ua(e,t){return[...e].slice(0,t).join("")}const[Ya,Xa]=dt("field"),qa={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:K,formatter:Function,clearIcon:oe("clear"),modelValue:te(""),inputAlign:String,placeholder:String,autocomplete:String,autocapitalize:String,autocorrect:String,errorMessage:String,enterkeyhint:String,spellcheck:{type:Boolean,default:null},clearTrigger:oe("focus"),formatTrigger:oe("onChange"),error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null}},Ga=e("fieldProps",L({},Ia,qa,{rows:K,type:oe("text"),rules:Array,autosize:[Boolean,Object],labelWidth:K,labelClass:Z,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}}));var Za=y({name:Ya,props:Ga,emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:o}){const n=Pn(),a=s({status:"unvalidated",focused:!1,validateMessage:""}),l=r(),c=r(),u=r(),{parent:d}=ce(wt),h=()=>{var t;return String(null!=(t=e.modelValue)?t:"")},g=t=>F(e[t])?e[t]:d&&F(d.props[t])?d.props[t]:void 0,y=i((()=>{const t=g("readonly");if(e.clearable&&!t){const t=""!==h(),o="always"===e.clearTrigger||"focus"===e.clearTrigger&&a.focused;return t&&o}return!1})),x=i((()=>u.value&&o.input?u.value():e.modelValue)),k=e=>e.reduce(((e,t)=>e.then((()=>{if("failed"===a.status)return;let{value:e}=x;if(t.formatter&&(e=t.formatter(e,t)),!function(e,t){if(Fa(e)){if(t.required)return!1;if(!1===t.validateEmpty)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}(e,t))return a.status="failed",void(a.validateMessage=Ha(e,t));if(t.validator){if(Fa(e)&&!1===t.validateEmpty)return;return function(e,t){return new Promise((o=>{const n=t.validator(e,t);N(n)?n.then(o):o(n)}))}(e,t).then((o=>{o&&"string"==typeof o?(a.status="failed",a.validateMessage=o):!1===o&&(a.status="failed",a.validateMessage=Ha(e,t))}))}}))),Promise.resolve()),S=()=>{a.status="unvalidated",a.validateMessage=""},C=()=>t("endValidate",{status:a.status,message:a.validateMessage}),B=(o=e.rules)=>new Promise((n=>{S(),o?(t("startValidate"),k(o).then((()=>{"failed"===a.status?(n({name:e.name,message:a.validateMessage}),C()):(a.status="passed",n(),C())}))):n()})),T=t=>{if(d&&e.rules){const{validateTrigger:o}=d.props,n=G(o).includes(t),a=e.rules.filter((e=>e.trigger?G(e.trigger).includes(t):n));a.length&&B(a)}},P=(o,n="onChange")=>{const i=o;o=(t=>{var o;const{maxlength:n}=e;if(F(n)&&Wa(t)>+n){const e=h();if(e&&Wa(e)===+n)return e;const i=null==(o=l.value)?void 0:o.selectionEnd;if(a.focused&&i){const e=[...t],o=e.length-+n;return e.splice(i-o,o),e.join("")}return Ua(t,+n)}return t})(o);const r=Wa(i)-Wa(o);if("number"===e.type||"digit"===e.type){const t="number"===e.type;o=et(o,t,t)}let s=0;if(e.formatter&&n===e.formatTrigger){const{formatter:t,maxlength:n}=e;if(o=t(o),F(n)&&Wa(o)>+n&&(o=Ua(o,+n)),l.value&&a.focused){const{selectionEnd:e}=l.value,o=Ua(i,e);s=Wa(t(o))-Wa(o)}}if(l.value&&l.value.value!==o)if(a.focused){let{selectionStart:e,selectionEnd:t}=l.value;if(l.value.value=o,F(e)&&F(t)){const n=Wa(o);r?(e-=r,t-=r):s&&(e+=s,t+=s),l.value.setSelectionRange(Math.min(e,n),Math.min(t,n))}}else l.value.value=o;o!==e.modelValue&&t("update:modelValue",o)},O=e=>{e.target.composing||P(e.target.value)},I=()=>{var e;return null==(e=l.value)?void 0:e.blur()},A=()=>{var e;return null==(e=l.value)?void 0:e.focus()},V=()=>{const t=l.value;"textarea"===e.type&&e.autosize&&t&&function(e,t){const o=ze();e.style.height="auto";let n=e.scrollHeight;if(R(t)){const{maxHeight:e,minHeight:o}=t;void 0!==e&&(n=Math.min(n,e)),void 0!==o&&(n=Math.max(n,o))}n&&(e.style.height=`${n}px`,Ee(o))}(t,e.autosize)},z=e=>{a.focused=!0,t("focus",e),v(V),g("readonly")&&I()},E=e=>{a.focused=!1,P(h(),"onBlur"),t("blur",e),g("readonly")||(T("onBlur"),v(V),Me())},$=e=>t("clickInput",e),L=e=>t("clickLeftIcon",e),M=e=>t("clickRightIcon",e),H=i((()=>"boolean"==typeof e.error?e.error:!(!d||!d.props.showError||"failed"!==a.status)||void 0)),j=i((()=>{const e=g("labelWidth"),t=g("labelAlign");if(e&&"top"!==t)return{width:We(e)}})),W=o=>{if(13===o.keyCode){d&&d.props.submitOnEnter||"textarea"===e.type||Fe(o),"search"===e.type&&I()}t("keypress",o)},U=()=>e.id||`${n}-input`,Y=()=>{const t=Xa("control",[g("inputAlign"),{error:H.value,custom:!!o.input,"min-height":"textarea"===e.type&&!e.autosize}]);if(o.input)return b("div",{class:t,onClick:$},[o.input()]);const a={id:U(),ref:l,name:e.name,rows:void 0!==e.rows?+e.rows:void 0,class:t,disabled:g("disabled"),readonly:g("readonly"),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,autocapitalize:e.autocapitalize,autocorrect:e.autocorrect,enterkeyhint:e.enterkeyhint,spellcheck:e.spellcheck,"aria-labelledby":e.label?`${n}-label`:void 0,onBlur:E,onFocus:z,onInput:O,onClick:$,onChange:ja,onKeypress:W,onCompositionend:ja,onCompositionstart:Na};return"textarea"===e.type?b("textarea",a,null):b("input",w("number"===(i=e.type)?{type:"text",inputmode:"decimal"}:"digit"===i?{type:"tel",inputmode:"numeric"}:{type:i},a),null);var i},X=()=>{const t=o["right-icon"];if(e.rightIcon||t)return b("div",{class:Xa("right-icon"),onClick:M},[t?t():b(oo,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},q=()=>{if(e.showWordLimit&&e.maxlength){const t=Wa(h());return b("div",{class:Xa("word-limit")},[b("span",{class:Xa("word-num")},[t]),D("/"),e.maxlength])}},Z=()=>{if(d&&!1===d.props.showErrorMessage)return;const t=e.errorMessage||a.validateMessage;if(t){const e=o["error-message"],n=g("errorMessageAlign");return b("div",{class:Xa("error-message",n)},[e?e({message:t}):t])}},K=()=>[b("div",{class:Xa("body")},[Y(),y.value&&b(oo,{ref:c,name:e.clearIcon,class:Xa("clear")},null),X(),o.button&&b("div",{class:Xa("button")},[o.button()])]),q(),Z()];return Lt({blur:I,focus:A,validate:B,formValue:x,resetValidation:S,getValidationStatus:()=>a.status}),f(Oe,{customValue:u,resetValidation:S,validateWithTrigger:T}),m((()=>e.modelValue),(()=>{P(h()),S(),T("onChange"),v(V)})),p((()=>{P(h(),e.formatTrigger),v(V)})),we("touchstart",(e=>{Fe(e),t("update:modelValue",""),t("clear",e)}),{target:i((()=>{var e;return null==(e=c.value)?void 0:e.$el}))}),()=>{const t=g("disabled"),a=g("labelAlign"),l=(()=>{const t=o["left-icon"];if(e.leftIcon||t)return b("div",{class:Xa("left-icon"),onClick:L},[t?t():b(oo,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])})();return b(za,{size:e.size,class:Xa({error:H.value,disabled:t,[`label-${a}`]:a}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:j.value,valueClass:Xa("value"),titleClass:[Xa("label",[a,{required:e.required}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:l&&"top"!==a?()=>l:null,title:()=>{const t=(()=>{const t=g("labelWidth"),a=g("labelAlign"),l=g("colon")?":":"";return o.label?[o.label(),l]:e.label?b("label",{id:`${n}-label`,for:o.input?void 0:U(),onClick:e=>{Fe(e),A()},style:"top"===a&&t?{width:We(t)}:void 0},[e.label+l]):void 0})();return"top"===a?[l,t].filter(Boolean):t||[]},value:K,extra:o.extra})}}});const Ka=e("Field",Ct(Za));let _a=0;const[Ja,Qa]=dt("toast"),el=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay"],tl=e("toastProps",{icon:String,show:Boolean,type:oe("text"),overlay:Boolean,message:K,iconSize:K,duration:ee(2e3),position:oe("middle"),teleport:[String,Object],wordBreak:String,className:Z,iconPrefix:String,transition:oe("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:Z,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean});var ol=y({name:Ja,props:tl,emits:["update:show"],setup(e,{emit:t,slots:o}){let n,a=!1;const i=()=>{const t=e.show&&e.forbidClick;a!==t&&(a=t,a?(_a||document.body.classList.add("van-toast--unclickable"),_a++):_a&&(_a--,_a||document.body.classList.remove("van-toast--unclickable")))},r=e=>t("update:show",e),s=()=>{e.closeOnClick&&r(!1)},c=()=>clearTimeout(n),u=()=>{const{icon:t,type:o,iconSize:n,iconPrefix:a,loadingType:l}=e;return t||"success"===o||"fail"===o?b(oo,{name:t||o,size:n,class:Qa("icon"),classPrefix:a},null):"loading"===o?b(uo,{class:Qa("loading"),size:n,type:l},null):void 0},d=()=>{const{type:t,message:n}=e;return o.message?b("div",{class:Qa("text")},[o.message()]):F(n)&&""!==n?"html"===t?b("div",{key:0,class:Qa("text"),innerHTML:String(n)},null):b("div",{class:Qa("text")},[n]):void 0};return m((()=>[e.show,e.forbidClick]),i),m((()=>[e.show,e.type,e.message,e.duration]),(()=>{c(),e.show&&e.duration>0&&(n=setTimeout((()=>{r(!1)}),e.duration))})),p(i),l(i),()=>b(Uo,w({class:[Qa([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:s,onClosed:c,"onUpdate:show":r},X(e,el)),{default:()=>[u(),d()]})}});function nl(){const e=s({show:!1}),t=t=>{e.show=t},o=o=>{L(e,o,{transitionAppear:!0}),t(!0)},n=()=>t(!1);return Lt({open:o,close:n,toggle:t}),{open:o,close:n,state:e,toggle:t}}function al(e){const t=O(e),o=document.createElement("div");return document.body.appendChild(o),{instance:t.mount(o),unmount(){t.unmount(),document.body.removeChild(o)}}}const ll={icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let il=[],rl=!1,sl=L({},ll);const cl=new Map;function ul(e){return R(e)?e:{message:e}}function dl(){if(!il.length||rl){const e=function(){const{instance:e,unmount:t}=al({setup(){const o=r(""),{open:n,state:l,close:i,toggle:s}=nl(),c=()=>{rl&&(il=il.filter((t=>t!==e)),t())};return m(o,(e=>{l.message=e})),a().render=()=>b(ol,w(l,{onClosed:c,"onUpdate:show":s}),null),{open:n,close:i,message:o}}});return e}();il.push(e)}return il[il.length-1]}function pl(e={}){if(!M)return{};const t=dl(),o=ul(e);return t.open(L({},sl,cl.get(o.type||sl.type),o)),t}const vl=e=>t=>pl(L({type:e},ul(t)));e("showLoadingToast",vl("loading")),e("showSuccessToast",vl("success")),e("showFailToast",vl("fail")),e("closeToast",(e=>{var t;il.length&&(e?(il.forEach((e=>{e.close()})),il=[]):rl?null==(t=il.shift())||t.close():il[0].close())}));e("resetToastDefaultOptions",(e=>{"string"==typeof e?cl.delete(e):(sl=L({},ll),cl.clear())})),e("allowMultipleToast",((e=!0)=>{rl=e}));const hl=e("Toast",Ct(ol)),[ml,fl]=dt("switch"),gl=e("switchProps",{size:K,loading:Boolean,disabled:Boolean,modelValue:Z,activeColor:String,inactiveColor:String,activeValue:{type:Z,default:!0},inactiveValue:{type:Z,default:!1}});var bl=y({name:ml,props:gl,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const n=()=>e.modelValue===e.activeValue,a=()=>{if(!e.disabled&&!e.loading){const o=n()?e.inactiveValue:e.activeValue;t("update:modelValue",o),t("change",o)}},l=()=>{if(e.loading){const t=n()?e.activeColor:e.inactiveColor;return b(uo,{class:fl("loading"),color:t},null)}if(o.node)return o.node()};return Ie((()=>e.modelValue)),()=>{var t;const{size:i,loading:r,disabled:s,activeColor:c,inactiveColor:u}=e,d=n(),p={fontSize:We(i),backgroundColor:d?c:u};return b("div",{role:"switch",class:fl({on:d,loading:r,disabled:s}),style:p,tabindex:s?void 0:0,"aria-checked":d,onClick:a},[b("div",{class:fl("node")},[l()]),null==(t=o.background)?void 0:t.call(o)])}}});const yl=e("Switch",Ct(bl)),[xl,wl]=dt("address-edit-detail"),kl=dt("address-edit")[2];var Sl=y({name:xl,props:{show:Boolean,rows:K,value:String,rules:Array,focused:Boolean,maxlength:K,searchResult:Array,showSearchResult:Boolean},emits:["blur","focus","input","selectSearch"],setup(e,{emit:t}){const o=r(),n=()=>e.focused&&e.searchResult&&e.showSearchResult,a=()=>{if(!n())return;const{searchResult:o}=e;return o.map((e=>b(za,{clickable:!0,key:(e.name||"")+(e.address||""),icon:"location-o",title:e.name,label:e.address,class:wl("search-item"),border:!1,onClick:()=>(e=>{t("selectSearch",e),t("input",`${e.address||""} ${e.name||""}`.trim())})(e)},null)))},l=e=>t("blur",e),i=e=>t("focus",e),s=e=>t("input",e);return()=>{if(e.show)return b(T,null,[b(Ka,{autosize:!0,clearable:!0,ref:o,class:wl(),rows:e.rows,type:"textarea",rules:e.rules,label:kl("addressDetail"),border:!n(),maxlength:e.maxlength,modelValue:e.value,placeholder:kl("addressDetail"),onBlur:l,onFocus:i,"onUpdate:modelValue":s},null),a()])}}});const[Cl,Bl,Tl]=dt("address-edit"),Pl={name:"",tel:"",city:"",county:"",country:"",province:"",areaCode:"",isDefault:!1,addressDetail:""},Dl=e("addressEditProps",{areaList:Object,isSaving:Boolean,isDeleting:Boolean,validator:Function,showArea:_,showDetail:_,showDelete:Boolean,disableArea:Boolean,searchResult:Array,telMaxlength:K,showSetDefault:Boolean,saveButtonText:String,areaPlaceholder:String,deleteButtonText:String,showSearchResult:Boolean,detailRows:te(1),detailMaxlength:te(200),areaColumnsPlaceholder:Q(),addressInfo:{type:Object,default:()=>L({},Pl)},telValidator:{type:Function,default:W}});var Ol=y({name:Cl,props:Dl,emits:["save","focus","change","delete","clickArea","changeArea","changeDetail","selectSearch","changeDefault"],setup(e,{emit:t,slots:o}){const n=r(),a=s({}),l=r(!1),c=r(!1),u=i((()=>R(e.areaList)&&Object.keys(e.areaList).length)),d=i((()=>{const{province:e,city:t,county:o,areaCode:n}=a;if(n){const n=[e,t,o];return e&&e===t&&n.splice(1,1),n.filter(Boolean).join("/")}return""})),p=i((()=>{var t;return(null==(t=e.searchResult)?void 0:t.length)&&c.value})),h=e=>{c.value="addressDetail"===e,t("focus",e)},f=(e,o)=>{t("change",{key:e,value:o})},g=i((()=>{const{validator:t,telValidator:o}=e,n=(e,o)=>({validator:n=>{if(t){const o=t(e,n);if(o)return o}return!!n||o}});return{name:[n("name",Tl("nameEmpty"))],tel:[n("tel",Tl("telInvalid")),{validator:o,message:Tl("telInvalid")}],areaCode:[n("areaCode",Tl("areaEmpty"))],addressDetail:[n("addressDetail",Tl("addressEmpty"))]}})),y=()=>t("save",a),x=e=>{a.addressDetail=e,t("changeDetail",e)},w=e=>{a.province=e[0].text,a.city=e[1].text,a.county=e[2].text},k=({selectedValues:e,selectedOptions:o})=>{e.some((e=>e===ga))?pl(Tl("areaEmpty")):(l.value=!1,w(o),t("changeArea",o))},B=()=>t("delete",a),T=()=>{setTimeout((()=>{c.value=!1}))},P=()=>{if(e.showSetDefault){const e={"right-icon":()=>b(yl,{modelValue:a.isDefault,"onUpdate:modelValue":e=>a.isDefault=e,onChange:e=>t("changeDefault",e)},null)};return S(b(za,{center:!0,border:!1,title:Tl("defaultAddress"),class:Bl("default")},e),[[C,!p.value]])}};return Lt({setAreaCode:e=>{a.areaCode=e||""},setAddressDetail:e=>{a.addressDetail=e}}),m((()=>e.addressInfo),(e=>{L(a,Pl,e),v((()=>{var e;const t=null==(e=n.value)?void 0:e.getSelectedOptions();t&&t.every((e=>e&&e.value!==ga))&&w(t)}))}),{deep:!0,immediate:!0}),()=>{const{disableArea:i}=e;return b(Ra,{class:Bl(),onSubmit:y},{default:()=>{var r;return[b("div",{class:Bl("fields")},[b(Ka,{modelValue:a.name,"onUpdate:modelValue":[e=>a.name=e,e=>f("name",e)],clearable:!0,label:Tl("name"),rules:g.value.name,placeholder:Tl("name"),onFocus:()=>h("name")},null),b(Ka,{modelValue:a.tel,"onUpdate:modelValue":[e=>a.tel=e,e=>f("tel",e)],clearable:!0,type:"tel",label:Tl("tel"),rules:g.value.tel,maxlength:e.telMaxlength,placeholder:Tl("tel"),onFocus:()=>h("tel")},null),S(b(Ka,{readonly:!0,label:Tl("area"),"is-link":!i,modelValue:d.value,rules:g.value.areaCode,placeholder:e.areaPlaceholder||Tl("area"),onFocus:()=>h("areaCode"),onClick:()=>{t("clickArea"),l.value=!i}},null),[[C,e.showArea]]),b(Sl,{show:e.showDetail,rows:e.detailRows,rules:g.value.addressDetail,value:a.addressDetail,focused:c.value,maxlength:e.detailMaxlength,searchResult:e.searchResult,showSearchResult:e.showSearchResult,onBlur:T,onFocus:()=>h("addressDetail"),onInput:x,onSelectSearch:e=>t("selectSearch",e)},null),null==(r=o.default)?void 0:r.call(o)]),P(),S(b("div",{class:Bl("buttons")},[b(fo,{block:!0,round:!0,type:"primary",text:e.saveButtonText||Tl("save"),class:Bl("button"),loading:e.isSaving,nativeType:"submit"},null),e.showDelete&&b(fo,{block:!0,round:!0,class:Bl("button"),loading:e.isDeleting,text:e.deleteButtonText||Tl("delete"),onClick:B},null)]),[[C,!p.value]]),b(Uo,{show:l.value,"onUpdate:show":e=>l.value=e,round:!0,teleport:"body",position:"bottom",lazyRender:!1},{default:()=>[b(Pa,{modelValue:a.areaCode,"onUpdate:modelValue":e=>a.areaCode=e,ref:n,loading:!u.value,areaList:e.areaList,columnsPlaceholder:e.areaColumnsPlaceholder,onConfirm:k,onCancel:()=>{l.value=!1}},null)]})]}})}}});const Il=e("AddressEdit",Ct(Ol)),[Al,Vl]=dt("radio-group"),zl=e("radioGroupProps",{shape:String,disabled:Boolean,iconSize:K,direction:String,modelValue:Z,checkedColor:String}),El=Symbol(Al);var $l=y({name:Al,props:zl,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const{linkChildren:n}=pe(El);return m((()=>e.modelValue),(e=>t("change",e))),n({props:e,updateValue:e=>t("update:modelValue",e)}),Ie((()=>e.modelValue)),()=>{var t;return b("div",{class:Vl([e.direction]),role:"radiogroup"},[null==(t=o.default)?void 0:t.call(o)])}}});const Ll=e("RadioGroup",Ct($l)),[Ml,Rl]=dt("tag"),Fl=e("tagProps",{size:String,mark:Boolean,show:_,type:oe("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean});var Hl=y({name:Ml,props:Fl,emits:["close"],setup(e,{slots:t,emit:o}){const n=e=>{e.stopPropagation(),o("close",e)},a=()=>{var o;const{type:a,mark:l,plain:i,round:r,size:s,closeable:c}=e,u={mark:l,plain:i,round:r};s&&(u[s]=s);const d=c&&b(oo,{name:"cross",class:[Rl("close"),xt],onClick:n},null);return b("span",{style:e.plain?{color:e.textColor||e.color,borderColor:e.color}:{color:e.textColor,background:e.color},class:Rl([u,a])},[null==(o=t.default)?void 0:o.call(t),d])};return()=>b(k,{name:e.closeable?"van-fade":void 0},{default:()=>[e.show?a():null]})}});const Nl=e("Tag",Ct(Hl)),jl={name:Z,disabled:Boolean,iconSize:K,modelValue:Z,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var Wl=y({props:L({},jl,{bem:J(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:_,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(e,{emit:t,slots:o}){const n=r(),a=t=>{if(e.parent&&e.bindGroup)return e.parent.props[t]},l=i((()=>{if(e.parent&&e.bindGroup){const t=a("disabled")||e.disabled;if("checkbox"===e.role){const o=a("modelValue").length,n=a("max");return t||n&&o>=+n&&!e.checked}return t}return e.disabled})),s=i((()=>a("direction"))),c=i((()=>{const t=e.checkedColor||a("checkedColor");if(t&&e.checked&&!l.value)return{borderColor:t,backgroundColor:t}})),u=i((()=>e.shape||a("shape")||"round")),d=o=>{const{target:a}=o,i=n.value,r=i===a||(null==i?void 0:i.contains(a));l.value||!r&&e.labelDisabled||t("toggle"),t("click",o)},p=()=>{var t,i;const{bem:r,checked:s,indeterminate:d}=e,p=e.iconSize||a("iconSize");return b("div",{ref:n,class:r("icon",[u.value,{disabled:l.value,checked:s,indeterminate:d}]),style:"dot"!==u.value?{fontSize:We(p)}:{width:We(p),height:We(p),borderColor:null==(t=c.value)?void 0:t.borderColor}},[o.icon?o.icon({checked:s,disabled:l.value}):"dot"!==u.value?b(oo,{name:d?"minus":"success",style:c.value},null):b("div",{class:r("icon--dot__icon"),style:{backgroundColor:null==(i=c.value)?void 0:i.backgroundColor}},null)])},v=()=>{if(o.default)return b("span",{class:e.bem("label",[e.labelPosition,{disabled:l.value}])},[o.default()])};return()=>{const t="left"===e.labelPosition?[v(),p()]:[p(),v()];return b("div",{role:e.role,class:e.bem([{disabled:l.value,"label-disabled":e.labelDisabled},s.value]),tabindex:l.value?void 0:0,"aria-checked":e.checked,onClick:d},[t])}}});const Ul=e("radioProps",L({},jl,{shape:String})),[Yl,Xl]=dt("radio");var ql=y({name:Yl,props:Ul,emits:["update:modelValue"],setup(e,{emit:t,slots:o}){const{parent:n}=ce(El),a=()=>{n?n.updateValue(e.name):t("update:modelValue",e.name)};return()=>b(Wl,w({bem:Xl,role:"radio",parent:n,checked:(n?n.props.modelValue:e.modelValue)===e.name,onToggle:a},e),X(o,["default","icon"]))}});const Gl=e("Radio",Ct(ql)),[Zl,Kl]=dt("address-item");var _l=y({name:Zl,props:{address:J(Object),disabled:Boolean,switchable:Boolean,defaultTagText:String,rightIcon:oe("edit")},emits:["edit","click","select"],setup(e,{slots:t,emit:o}){const n=()=>{e.switchable&&o("select"),o("click")},a=()=>b(oo,{name:e.rightIcon,class:Kl("edit"),onClick:e=>{e.stopPropagation(),o("edit"),o("click")}},null),l=()=>{const{address:o,disabled:n,switchable:a}=e,l=[b("div",{class:Kl("name")},[`${o.name} ${o.tel}`,t.tag?t.tag(e.address):e.address.isDefault&&e.defaultTagText?b(Nl,{type:"primary",round:!0,class:Kl("tag")},{default:()=>[e.defaultTagText]}):void 0]),b("div",{class:Kl("address")},[o.address])];return a&&!n?b(Gl,{name:o.id,iconSize:18},{default:()=>[l]}):l};return()=>{var o;const{disabled:i}=e;return b("div",{class:Kl({disabled:i}),onClick:n},[b(za,{border:!1,titleClass:Kl("title")},{title:l,"right-icon":a}),null==(o=t.bottom)?void 0:o.call(t,L({},e.address,{disabled:i}))])}}});const[Jl,Ql,ei]=dt("address-list"),ti=e("addressListProps",{list:Q(),modelValue:K,switchable:_,disabledText:String,disabledList:Q(),showAddButton:_,addButtonText:String,defaultTagText:String,rightIcon:oe("edit")});var oi=y({name:Jl,props:ti,emits:["add","edit","select","clickItem","editDisabled","selectDisabled","update:modelValue"],setup(e,{slots:t,emit:o}){const n=(n,a)=>{if(n)return n.map(((n,l)=>((n,a,l)=>b(_l,{key:n.id,address:n,disabled:l,switchable:e.switchable,defaultTagText:e.defaultTagText,rightIcon:e.rightIcon,onEdit:()=>o(l?"editDisabled":"edit",n,a),onClick:()=>o("clickItem",n,a),onSelect:()=>{o(l?"selectDisabled":"select",n,a),l||o("update:modelValue",n.id)}},{bottom:t["item-bottom"],tag:t.tag}))(n,l,a)))};return()=>{var a,l;const i=n(e.list),r=n(e.disabledList,!0),s=e.disabledText&&b("div",{class:Ql("disabled-text")},[e.disabledText]);return b("div",{class:Ql()},[null==(a=t.top)?void 0:a.call(t),b(Ll,{modelValue:e.modelValue},{default:()=>[i]}),s,r,null==(l=t.default)?void 0:l.call(t),e.showAddButton?b("div",{class:[Ql("bottom"),"van-safe-area-bottom"]},[b(fo,{round:!0,block:!0,type:"primary",text:e.addButtonText||ei("add"),class:Ql("add"),onClick:()=>o("add")},null)]):void 0])}}});const ni=e("AddressList",Ct(oi)),ai=ne&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,li="event",ii="observer";function ri(e,t){if(!e.length)return;const o=e.indexOf(t);return o>-1?e.splice(o,1):void 0}function si(e,t){if("IMG"!==e.tagName||!e.getAttribute("data-srcset"))return;let o=e.getAttribute("data-srcset");const n=e.parentNode.offsetWidth*t;let a,l,i;o=o.trim().split(",");const r=o.map((e=>(e=e.trim(),a=e.lastIndexOf(" "),-1===a?(l=e,i=999998):(l=e.substr(0,a),i=parseInt(e.substr(a+1,e.length-a-2),10)),[i,l])));r.sort(((e,t)=>{if(e[0]<t[0])return 1;if(e[0]>t[0])return-1;if(e[0]===t[0]){if(-1!==t[1].indexOf(".webp",t[1].length-5))return 1;if(-1!==e[1].indexOf(".webp",e[1].length-5))return-1}return 0}));let s,c="";for(let u=0;u<r.length;u++){s=r[u],c=s[1];const e=r[u+1];if(e&&e[0]<n){c=s[1];break}if(!e){c=s[1];break}}return c}const ci=(e=1)=>ne&&window.devicePixelRatio||e;function ui(){if(!ne)return!1;let e=!0;try{const t=document.createElement("canvas");t.getContext&&t.getContext("2d")&&(e=0===t.toDataURL("image/webp").indexOf("data:image/webp"))}catch(t){e=!1}return e}function di(e,t){let o=null,n=0;return function(...a){if(o)return;const l=()=>{n=Date.now(),o=!1,e.apply(this,a)};Date.now()-n>=t?l():o=setTimeout(l,t)}}function pi(e,t,o){e.addEventListener(t,o,{capture:!1,passive:!0})}function vi(e,t,o){e.removeEventListener(t,o,!1)}const hi=(e,t,o)=>{const n=new Image;if(!e||!e.src)return o(new Error("image src is required"));n.src=e.src,e.cors&&(n.crossOrigin=e.cors),n.onload=()=>t({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src}),n.onerror=e=>o(e)};class mi{constructor({max:e}){this.options={max:e||100},this.caches=[]}has(e){return this.caches.indexOf(e)>-1}add(e){this.has(e)||(this.caches.push(e),this.caches.length>this.options.max&&this.free())}free(){this.caches.shift()}}const[fi,gi]=dt("back-top"),bi=e("backTopProps",{right:K,bottom:K,zIndex:K,target:[String,Object],offset:te(200),immediate:Boolean,teleport:{type:[String,Object],default:"body"}});var yi=y({name:fi,inheritAttrs:!1,props:bi,emits:["click"],setup(e,{emit:t,slots:o,attrs:n}){let a=!1;const l=r(!1),s=r(),c=r(),h=i((()=>L(Ye(e.zIndex),{right:We(e.right),bottom:We(e.bottom)}))),f=o=>{var n;t("click",o),null==(n=c.value)||n.scrollTo({top:0,behavior:e.immediate?"auto":"smooth"})},g=()=>{l.value=!!c.value&&Ae(c.value)>=+e.offset},y=()=>{M&&v((()=>{c.value=e.target?(()=>{const{target:t}=e;if("string"!=typeof t)return t;{const e=document.querySelector(t);if(e)return e}})():Pe(s.value),g()}))};return we("scroll",di(g,100),{target:c}),p(y),u((()=>{a&&(l.value=!0,a=!1)})),d((()=>{l.value&&e.teleport&&(l.value=!1,a=!0)})),m((()=>e.target),y),()=>{const t=b("div",w({ref:e.teleport?void 0:s,class:gi({active:l.value}),style:h.value,onClick:f},n),[o.default?o.default():b(oo,{name:"back-top",class:gi("icon")},null)]);return e.teleport?[b("div",{ref:s,class:gi("placeholder")},null),b(B,{to:e.teleport},{default:()=>[t]})]:t}}});const xi=e("BackTop",Ct(yi));const wi=e("barrageProps",{top:te(10),rows:te(4),duration:te(4e3),autoPlay:_,delay:ee(300),modelValue:Q()}),[ki,Si]=dt("barrage");var Ci=y({name:ki,props:wi,emits:["update:modelValue"],setup(e,{emit:t,slots:o}){const n=r(),a=Si("item"),l=r(0),i=[],s=r(!0),c=r(e.autoPlay),u=({id:o,text:r},u)=>{var d;const p=((t,o=e.delay)=>{const n=document.createElement("span");return n.className=a,n.innerText=String(t),n.style.animationDuration=`${e.duration}ms`,n.style.animationDelay=`${o}ms`,n.style.animationName="van-barrage",n.style.animationTimingFunction="linear",n})(r,s.value?u*e.delay:void 0);e.autoPlay||!1!==c.value||(p.style.animationPlayState="paused"),null==(d=n.value)||d.append(p),l.value++;const v=(l.value-1)%+e.rows*p.offsetHeight+ +e.top;p.style.top=`${v}px`,p.dataset.id=String(o),i.push(p),p.addEventListener("animationend",(()=>{t("update:modelValue",[...e.modelValue].filter((e=>String(e.id)!==p.dataset.id)))}))},d=(e,t)=>{const o=new Map(t.map((e=>[e.id,e])));e.forEach(((e,t)=>{o.has(e.id)?o.delete(e.id):u(e,t)})),o.forEach((e=>{const t=i.findIndex((t=>t.dataset.id===String(e.id)));t>-1&&(i[t].remove(),i.splice(t,1))})),s.value=!1};m((()=>e.modelValue.slice()),((e,t)=>d(null!=e?e:[],null!=t?t:[])),{deep:!0});const h=r({});p((()=>{return t=this,o=null,a=function*(){var t;h.value["--move-distance"]=`-${null==(t=n.value)?void 0:t.offsetWidth}px`,yield v(),d(e.modelValue,[])},new Promise(((e,n)=>{var l=e=>{try{r(a.next(e))}catch(t){n(t)}},i=e=>{try{r(a.throw(e))}catch(t){n(t)}},r=t=>t.done?e(t.value):Promise.resolve(t.value).then(l,i);r((a=a.apply(t,o)).next())}));var t,o,a}));return Lt({play:()=>{c.value=!0,i.forEach((e=>{e.style.animationPlayState="running"}))},pause:()=>{c.value=!1,i.forEach((e=>{e.style.animationPlayState="paused"}))}}),()=>{var e;return b("div",{class:Si(),ref:n,style:h.value},[null==(e=o.default)?void 0:e.call(o)])}}});const Bi=e("Barrage",Ct(Ci)),[Ti,Pi,Di]=dt("calendar");function Oi(e,t){const o=e.getFullYear(),n=t.getFullYear();if(o===n){const o=e.getMonth(),n=t.getMonth();return o===n?0:o>n?1:-1}return o>n?1:-1}function Ii(e,t){const o=Oi(e,t);if(0===o){const o=e.getDate(),n=t.getDate();return o===n?0:o>n?1:-1}return o}const Ai=e=>new Date(e),Vi=e=>Array.isArray(e)?e.map(Ai):Ai(e);function zi(e,t){const o=Ai(e);return o.setDate(o.getDate()+t),o}const Ei=e=>zi(e,-1),$i=e=>zi(e,1),Li=()=>{const e=new Date;return e.setHours(0,0,0,0),e};const Mi=L({},ha,{modelValue:Q(),filter:Function,formatter:{type:Function,default:(e,t)=>t}}),Ri=Object.keys(ha);const Fi=(e,t)=>32-new Date(e,t-1,32).getDate(),Hi=(e,t,o,n,a,l)=>{const i=function(e,t){if(e<0)return[];const o=Array(e);let n=-1;for(;++n<e;)o[n]=t(n);return o}(t-e+1,(t=>{const a=_e(e+t);return n(o,{text:a,value:a})}));return a?a(o,i,l):i},Ni=(e,t)=>e.map(((e,o)=>{const n=t[o];if(n.length){const t=+n[0].value,o=+n[n.length-1].value;return _e(Je(+e,t,o))}return e})),[ji]=dt("calendar-day");var Wi=y({name:ji,props:{item:J(Object),color:String,index:Number,offset:ee(0),rowHeight:String},emits:["click","clickDisabledDate"],setup(e,{emit:t,slots:o}){const n=i((()=>{var t;const{item:o,index:n,color:a,offset:l,rowHeight:i}=e,r={height:i};if("placeholder"===o.type)return r.width="100%",r;if(0===n&&(r.marginLeft=100*l/7+"%"),a)switch(o.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":r.background=a;break;case"middle":r.color=a}return l+((null==(t=o.date)?void 0:t.getDate())||1)>28&&(r.marginBottom=0),r})),a=()=>{"disabled"!==e.item.type?t("click",e.item):t("clickDisabledDate",e.item)},l=()=>{const{topInfo:t}=e.item;if(t||o["top-info"])return b("div",{class:Pi("top-info")},[o["top-info"]?o["top-info"](e.item):t])},r=()=>{const{bottomInfo:t}=e.item;if(t||o["bottom-info"])return b("div",{class:Pi("bottom-info")},[o["bottom-info"]?o["bottom-info"](e.item):t])},s=()=>{const{item:t,color:o,rowHeight:n}=e,{type:a,text:i}=t,s=[l(),i,r()];return"selected"===a?b("div",{class:Pi("selected-day"),style:{width:n,height:n,background:o}},[s]):s};return()=>{const{type:t,className:o}=e.item;return"placeholder"===t?b("div",{class:Pi("day"),style:n.value},null):b("div",{role:"gridcell",style:n.value,class:[Pi("day",t),o],tabindex:"disabled"===t?void 0:-1,onClick:a},[s()])}}});const[Ui]=dt("calendar-month"),Yi={date:J(Date),type:String,color:String,minDate:J(Date),maxDate:J(Date),showMark:Boolean,rowHeight:K,formatter:Function,lazyRender:Boolean,currentDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Boolean,showMonthTitle:Boolean,firstDayOfWeek:Number};var Xi=y({name:Ui,props:Yi,emits:["click","clickDisabledDate"],setup(e,{emit:t,slots:o}){const[n,a]=function(e=!1){const t=r(e);return[t,(e=!t.value)=>{t.value=e}]}(),l=r(),s=r(),c=Dt(s),u=i((()=>{return t=e.date,Di("monthTitle",t.getFullYear(),t.getMonth()+1);var t})),d=i((()=>We(e.rowHeight))),p=i((()=>{const t=e.date.getDay();return e.firstDayOfWeek?(t+7-e.firstDayOfWeek)%7:t})),v=i((()=>Fi(e.date.getFullYear(),e.date.getMonth()+1))),h=i((()=>n.value||!e.lazyRender)),m=t=>{const{type:o,minDate:n,maxDate:a,currentDate:l}=e;if(Ii(t,n)<0||Ii(t,a)>0)return"disabled";if(null===l)return"";if(Array.isArray(l)){if("multiple"===o)return(t=>{const o=t=>e.currentDate.some((e=>0===Ii(e,t)));if(o(t)){const e=Ei(t),n=$i(t),a=o(e),l=o(n);return a&&l?"multiple-middle":a?"end":l?"start":"multiple-selected"}return""})(t);if("range"===o)return(t=>{const[o,n]=e.currentDate;if(!o)return"";const a=Ii(t,o);if(!n)return 0===a?"start":"";const l=Ii(t,n);return e.allowSameDay&&0===a&&0===l?"start-end":0===a?"start":0===l?"end":a>0&&l<0?"middle":""})(t)}else if("single"===o)return 0===Ii(t,l)?"selected":"";return""},f=t=>{if("range"===e.type){if("start"===t||"end"===t)return Di(t);if("start-end"===t)return`${Di("start")}/${Di("end")}`}},g=()=>{if(e.showMonthTitle)return b("div",{class:Pi("month-title")},[o["month-title"]?o["month-title"]({date:e.date,text:u.value}):u.value])},y=()=>{if(e.showMark&&h.value)return b("div",{class:Pi("month-mark")},[e.date.getMonth()+1])},x=i((()=>{const e=Math.ceil((v.value+p.value)/7);return Array(e).fill({type:"placeholder"})})),w=i((()=>{const t=[],o=e.date.getFullYear(),n=e.date.getMonth();for(let a=1;a<=v.value;a++){const l=new Date(o,n,a),i=m(l);let r={date:l,type:i,text:a,bottomInfo:f(i)};e.formatter&&(r=e.formatter(r)),t.push(r)}return t})),k=i((()=>w.value.filter((e=>"disabled"===e.type)))),S=(n,a)=>b(Wi,{item:n,index:a,color:e.color,offset:p.value,rowHeight:d.value,onClick:e=>t("click",e),onClickDisabledDate:e=>t("clickDisabledDate",e)},X(o,["top-info","bottom-info"]));return Lt({getTitle:()=>u.value,getHeight:()=>c.value,setVisible:a,scrollToDate:(e,t)=>{if(l.value){const o=se(l.value),n=x.value.length,a=(Math.ceil((t.getDate()+p.value)/7)-1)*o.height/n;Ve(e,o.top+a+e.scrollTop-se(e).top)}},disabledDays:k}),()=>b("div",{class:Pi("month"),ref:s},[g(),b("div",{ref:l,role:"grid",class:Pi("days")},[y(),(h.value?w:x).value.map(S)])])}});const[qi]=dt("calendar-header");var Gi=y({name:qi,props:{date:Date,title:String,subtitle:String,showTitle:Boolean,showSubtitle:Boolean,firstDayOfWeek:Number},emits:["clickSubtitle"],setup(e,{slots:t,emit:o}){const n=()=>{if(e.showTitle){const o=e.title||Di("title"),n=t.title?t.title():o;return b("div",{class:Pi("header-title")},[n])}},a=e=>o("clickSubtitle",e),l=()=>{if(e.showSubtitle){const o=t.subtitle?t.subtitle({date:e.date,text:e.subtitle}):e.subtitle;return b("div",{class:Pi("header-subtitle"),onClick:a},[o])}},i=()=>{const{firstDayOfWeek:t}=e,o=Di("weekdays"),n=[...o.slice(t,7),...o.slice(0,t)];return b("div",{class:Pi("weekdays")},[n.map((e=>b("span",{class:Pi("weekday")},[e])))])};return()=>b("div",{class:Pi("header")},[n(),l(),i()])}});const Zi=e("calendarProps",{show:Boolean,type:oe("single"),title:String,color:String,round:_,readonly:Boolean,poppable:_,maxRange:te(null),position:oe("bottom"),teleport:[String,Object],showMark:_,showTitle:_,formatter:Function,rowHeight:K,confirmText:String,rangePrompt:String,lazyRender:_,showConfirm:_,defaultDate:[Date,Array],allowSameDay:Boolean,showSubtitle:_,closeOnPopstate:_,showRangePrompt:_,confirmDisabledText:String,closeOnClickOverlay:_,safeAreaInsetTop:Boolean,safeAreaInsetBottom:_,minDate:{type:Date,validator:j,default:Li},maxDate:{type:Date,validator:j,default:()=>{const e=Li();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())}},firstDayOfWeek:{type:K,default:0,validator:e=>e>=0&&e<=6}});var Ki=y({name:Ti,props:Zi,emits:["select","confirm","unselect","monthShow","overRange","update:show","clickSubtitle","clickDisabledDate"],setup(e,{emit:t,slots:o}){const n=(t,o=e.minDate,n=e.maxDate)=>-1===Ii(t,o)?o:1===Ii(t,n)?n:t,a=(t=e.defaultDate)=>{const{type:o,minDate:a,maxDate:l,allowSameDay:i}=e;if(null===t)return t;const r=Li();if("range"===o){Array.isArray(t)||(t=[]);return[n(t[0]||r,a,i?l:Ei(l)),n(t[1]||r,i?a:$i(a))]}return"multiple"===o?Array.isArray(t)?t.map((e=>n(e))):[n(r)]:(t&&!Array.isArray(t)||(t=r),n(t))};let l;const s=r(),c=r({text:"",date:void 0}),u=r(a()),[d,p]=Dn(),v=i((()=>e.firstDayOfWeek?+e.firstDayOfWeek%7:0)),h=i((()=>{const t=[],o=new Date(e.minDate);o.setDate(1);do{t.push(new Date(o)),o.setMonth(o.getMonth()+1)}while(1!==Oi(o,e.maxDate));return t})),f=i((()=>{if(u.value){if("range"===e.type)return!u.value[0]||!u.value[1];if("multiple"===e.type)return!u.value.length}return!u.value})),g=()=>{const e=Ae(s.value),o=e+l,n=h.value.map(((e,t)=>d.value[t].getHeight()));if(o>n.reduce(((e,t)=>e+t),0)&&e>0)return;let a,i=0;const r=[-1,-1];for(let l=0;l<h.value.length;l++){const s=d.value[l];i<=o&&i+n[l]>=e&&(r[1]=l,a||(a=s,r[0]=l),d.value[l].showed||(d.value[l].showed=!0,t("monthShow",{date:s.date,title:s.getTitle()}))),i+=n[l]}h.value.forEach(((e,t)=>{const o=t>=r[0]-1&&t<=r[1]+1;d.value[t].setVisible(o)})),a&&(c.value={text:a.getTitle(),date:a.date})},y=e=>{ae((()=>{h.value.some(((t,o)=>0===Oi(t,e)&&(s.value&&d.value[o].scrollToDate(s.value,e),!0))),g()}))},x=()=>{if(!e.poppable||e.show)if(u.value){const t="single"===e.type?u.value:u.value[0];j(t)&&y(t)}else ae(g)},k=()=>{e.poppable&&!e.show||(ae((()=>{l=Math.floor(se(s).height)})),x())},S=(e=a())=>{u.value=e,x()},C=()=>{var e;return t("confirm",null!=(e=u.value)?e:Vi(u.value))},B=(o,n)=>{const a=e=>{u.value=e,t("select",Vi(e))};if(n&&"range"===e.type){const n=(o=>{const{maxRange:n,rangePrompt:a,showRangePrompt:l}=e;return!(n&&function(e){const t=e[0].getTime();return(e[1].getTime()-t)/864e5+1}(o)>+n&&(l&&pl(a||Di("rangePrompt",n)),t("overRange"),1))})(o);if(!n)return void a([o[0],zi(o[0],+e.maxRange-1)])}a(o),n&&!e.showConfirm&&C()},T=i((()=>d.value.reduce(((e,t)=>{var o,n;return e.push(...null!=(n=null==(o=t.disabledDays)?void 0:o.value)?n:[]),e}),[]))),P=o=>{if(e.readonly||!o.date)return;const{date:n}=o,{type:a}=e;if("range"===a){if(!u.value)return void B([n]);const[t,o]=u.value;if(t&&!o){const o=Ii(n,t);if(1===o){const e=((e,t,o)=>{var n;return null==(n=e.find((e=>-1===Ii(t,e.date)&&-1===Ii(e.date,o))))?void 0:n.date})(T.value,t,n);if(e){const o=Ei(e);-1===Ii(t,o)?B([t,o]):B([n])}else B([t,n],!0)}else-1===o?B([n]):e.allowSameDay&&B([n,n],!0)}else B([n])}else if("multiple"===a){if(!u.value)return void B([n]);const o=u.value,a=o.findIndex((e=>0===Ii(e,n)));if(-1!==a){const[e]=o.splice(a,1);t("unselect",Ai(e))}else e.maxRange&&o.length>=+e.maxRange?pl(e.rangePrompt||Di("rangePrompt",e.maxRange)):B([...o,n])}else B(n,!0)},D=e=>t("update:show",e),O=(n,a)=>{const l=0!==a||!e.showSubtitle;return b(Xi,w({ref:p(a),date:n,currentDate:u.value,showMonthTitle:l,firstDayOfWeek:v.value},X(e,["type","color","minDate","maxDate","showMark","formatter","rowHeight","lazyRender","showSubtitle","allowSameDay"]),{onClick:P,onClickDisabledDate:e=>t("clickDisabledDate",e)}),X(o,["top-info","bottom-info","month-title"]))},I=()=>{if(o.footer)return o.footer();if(e.showConfirm){const t=o["confirm-text"],n=f.value,a=n?e.confirmDisabledText:e.confirmText;return b(fo,{round:!0,block:!0,type:"primary",color:e.color,class:Pi("confirm"),disabled:n,nativeType:"button",onClick:C},{default:()=>[t?t({disabled:n}):a||Di("confirm")]})}},A=()=>b("div",{class:Pi()},[b(Gi,{date:c.value.date,title:e.title,subtitle:c.value.text,showTitle:e.showTitle,showSubtitle:e.showSubtitle,firstDayOfWeek:v.value,onClickSubtitle:e=>t("clickSubtitle",e)},X(o,["title","subtitle"])),b("div",{ref:s,class:Pi("body"),onScroll:g},[h.value.map(O)]),b("div",{class:[Pi("footer"),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[I()])]);return m((()=>e.show),k),m((()=>[e.type,e.minDate,e.maxDate]),(()=>S(a(u.value)))),m((()=>e.defaultDate),((e=null)=>{u.value=e,x()})),Lt({reset:S,scrollToDate:y,getSelectedDate:()=>u.value}),xe(k),()=>e.poppable?b(Uo,{show:e.show,class:Pi("popup"),round:e.round,position:e.position,closeable:e.showTitle||e.showSubtitle,teleport:e.teleport,closeOnPopstate:e.closeOnPopstate,safeAreaInsetTop:e.safeAreaInsetTop,closeOnClickOverlay:e.closeOnClickOverlay,"onUpdate:show":D},{default:A}):A()}});const _i=e("Calendar",Ct(Ki)),[Ji,Qi]=dt("image"),er=e("imageProps",{src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:K,height:K,radius:K,lazyLoad:Boolean,iconSize:K,showError:_,errorIcon:oe("photo-fail"),iconPrefix:String,showLoading:_,loadingIcon:oe("photo")});var tr=y({name:Ji,props:er,emits:["load","error"],setup(e,{emit:t,slots:o}){const n=r(!1),l=r(!0),s=r(),{$Lazyload:u}=a().proxy,d=i((()=>{const t={width:We(e.width),height:We(e.height)};return F(e.radius)&&(t.overflow="hidden",t.borderRadius=We(e.radius)),t}));m((()=>e.src),(()=>{n.value=!1,l.value=!0}));const h=e=>{l.value&&(l.value=!1,t("load",e))},f=()=>{const e=new Event("load");Object.defineProperty(e,"target",{value:s.value,enumerable:!0}),h(e)},g=e=>{n.value=!0,l.value=!1,t("error",e)},y=(t,o,n)=>n?n():b(oo,{name:t,size:e.iconSize,class:o,classPrefix:e.iconPrefix},null),x=()=>{if(n.value||!e.src)return;const t={alt:e.alt,class:Qi("img"),style:{objectFit:e.fit,objectPosition:e.position}};return e.lazyLoad?S(b("img",w({ref:s},t),null),[[I("lazy"),e.src]]):b("img",w({ref:s,src:e.src,onLoad:h,onError:g},t),null)},k=({el:e})=>{const t=()=>{e===s.value&&l.value&&f()};s.value?t():v(t)},C=({el:e})=>{e!==s.value||n.value||g()};return u&&M&&(u.$on("loaded",k),u.$on("error",C),c((()=>{u.$off("loaded",k),u.$off("error",C)}))),p((()=>{v((()=>{var t;(null==(t=s.value)?void 0:t.complete)&&!e.lazyLoad&&f()}))})),()=>{var t;return b("div",{class:Qi({round:e.round,block:e.block}),style:d.value},[x(),l.value&&e.showLoading?b("div",{class:Qi("loading")},[y(e.loadingIcon,Qi("loading-icon"),o.loading)]):n.value&&e.showError?b("div",{class:Qi("error")},[y(e.errorIcon,Qi("error-icon"),o.error)]):void 0,null==(t=o.default)?void 0:t.call(o)])}}});const or=e("Image",Ct(tr)),[nr,ar]=dt("card"),lr=e("cardProps",{tag:String,num:K,desc:String,thumb:String,title:String,price:K,centered:Boolean,lazyLoad:Boolean,currency:oe("¥"),thumbLink:String,originPrice:K});var ir=y({name:nr,props:lr,emits:["clickThumb"],setup(e,{slots:t,emit:o}){const n=()=>{if(t.tag||e.tag)return b("div",{class:ar("tag")},[t.tag?t.tag():b(Nl,{mark:!0,type:"primary"},{default:()=>[e.tag]})])},a=()=>{if(t.thumb||e.thumb)return b("a",{href:e.thumbLink,class:ar("thumb"),onClick:e=>o("clickThumb",e)},[t.thumb?t.thumb():b(or,{src:e.thumb,fit:"cover",width:"100%",height:"100%",lazyLoad:e.lazyLoad},null),n()])},l=()=>{const t=e.price.toString().split(".");return b("div",null,[b("span",{class:ar("price-currency")},[e.currency]),b("span",{class:ar("price-integer")},[t[0]]),D("."),b("span",{class:ar("price-decimal")},[t[1]])])};return()=>{var o,n,i;const r=t.num||F(e.num),s=t.price||F(e.price),c=t["origin-price"]||F(e.originPrice),u=r||s||c||t.bottom,d=s&&b("div",{class:ar("price")},[t.price?t.price():l()]),p=c&&b("div",{class:ar("origin-price")},[t["origin-price"]?t["origin-price"]():`${e.currency} ${e.originPrice}`]),v=r&&b("div",{class:ar("num")},[t.num?t.num():`x${e.num}`]),h=t.footer&&b("div",{class:ar("footer")},[t.footer()]),m=u&&b("div",{class:ar("bottom")},[null==(o=t["price-top"])?void 0:o.call(t),d,p,v,null==(n=t.bottom)?void 0:n.call(t)]);return b("div",{class:ar()},[b("div",{class:ar("header")},[a(),b("div",{class:ar("content",{centered:e.centered})},[b("div",null,[t.title?t.title():e.title?b("div",{class:[ar("title"),"van-multi-ellipsis--l2"]},[e.title]):void 0,t.desc?t.desc():e.desc?b("div",{class:[ar("desc"),"van-ellipsis"]},[e.desc]):void 0,null==(i=t.tags)?void 0:i.call(t)]),m])]),h])}}});const rr=e("Card",Ct(ir)),[sr,cr,ur]=dt("cascader"),dr=e("cascaderProps",{title:String,options:Q(),closeable:_,swipeable:_,closeIcon:oe("cross"),showHeader:_,modelValue:K,fieldNames:Object,placeholder:String,activeColor:String});var pr=y({name:sr,props:dr,emits:["close","change","finish","clickTab","update:modelValue"],setup(e,{slots:t,emit:o}){const n=r([]),a=r(0),[l,i]=Dn(),{text:s,value:c,children:u}=L({text:"text",value:"value",children:"children"},e.fieldNames),d=(e,t)=>{for(const o of e){if(o[c]===t)return[o];if(o[u]){const e=d(o[u],t);if(e)return[o,...e]}}},p=()=>{const{options:t,modelValue:o}=e;if(void 0!==o){const e=d(t,o);if(e){let o=t;return n.value=e.map((e=>{const t={options:o,selected:e},n=o.find((t=>t[c]===e[c]));return n&&(o=n[u]),t})),o&&n.value.push({options:o,selected:null}),void v((()=>{a.value=n.value.length-1}))}}n.value=[{options:t,selected:null}]},h=()=>o("close"),f=({name:e,title:t})=>o("clickTab",e,t),g=(l,r,d)=>{const{disabled:p}=l,h=!(!r||l[c]!==r[c]),m=l.color||(h?e.activeColor:void 0),f=t.option?t.option({option:l,selected:h}):b("span",null,[l[s]]);return b("li",{ref:h?i(d):void 0,role:"menuitemradio",class:[cr("option",{selected:h,disabled:p}),l.className],style:{color:m},tabindex:p?void 0:h?0:-1,"aria-checked":h,"aria-disabled":p||void 0,onClick:()=>((e,t)=>{if(e.disabled)return;if(n.value[t].selected=e,n.value.length>t+1&&(n.value=n.value.slice(0,t+1)),e[u]){const o={options:e[u],selected:null};n.value[t+1]?n.value[t+1]=o:n.value.push(o),v((()=>{a.value++}))}const l=n.value.map((e=>e.selected)).filter(Boolean);o("update:modelValue",e[c]);const i={value:e[c],tabIndex:t,selectedOptions:l};o("change",i),e[u]||o("finish",i)})(l,d)},[f,h?b(oo,{name:"success",class:cr("selected-icon")},null):null])},y=(e,t,o)=>b("ul",{role:"menu",class:cr("options")},[e.map((e=>g(e,t,o)))]),x=(o,n)=>{const{options:a,selected:l}=o,i=e.placeholder||ur("select"),r=l?l[s]:i;return b(ra,{title:r,titleClass:cr("tab",{unselected:!l})},{default:()=>{var e,o;return[null==(e=t["options-top"])?void 0:e.call(t,{tabIndex:n}),y(a,l,n),null==(o=t["options-bottom"])?void 0:o.call(t,{tabIndex:n})]}})};return p(),m(a,(e=>{const t=l.value[e];t&&(e=>{const t=e.parentElement;t&&(t.scrollTop=e.offsetTop-(t.offsetHeight-e.offsetHeight)/2)})(t)})),m((()=>e.options),p,{deep:!0}),m((()=>e.modelValue),(e=>{if(void 0!==e){if(n.value.map((e=>{var t;return null==(t=e.selected)?void 0:t[c]})).includes(e))return}p()})),()=>b("div",{class:cr()},[e.showHeader?b("div",{class:cr("header")},[b("h2",{class:cr("title")},[t.title?t.title():e.title]),e.closeable?b(oo,{name:e.closeIcon,class:[cr("close-icon"),xt],onClick:h},null):null]):null,b(sa,{active:a.value,"onUpdate:active":e=>a.value=e,shrink:!0,animated:!0,class:cr("tabs"),color:e.activeColor,swipeable:e.swipeable,onClickTab:f},{default:()=>[n.value.map(x)]})])}});const vr=e("Cascader",Ct(pr)),[hr,mr]=dt("cell-group"),fr=e("cellGroupProps",{title:String,inset:Boolean,border:_});var gr=y({name:hr,inheritAttrs:!1,props:fr,setup(e,{slots:t,attrs:o}){const n=()=>{var n;return b("div",w({class:[mr({inset:e.inset}),{[bt]:e.border&&!e.inset}]},o,Eo()),[null==(n=t.default)?void 0:n.call(t)])};return()=>e.title||t.title?b(T,null,[b("div",{class:mr("title",{inset:e.inset})},[t.title?t.title():e.title]),n()]):n()}});const br=e("CellGroup",Ct(gr)),[yr,xr]=dt("checkbox-group"),wr=e("checkboxGroupProps",{max:K,shape:oe("round"),disabled:Boolean,iconSize:K,direction:String,modelValue:Q(),checkedColor:String}),kr=Symbol(yr);var Sr=y({name:yr,props:wr,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const{children:n,linkChildren:a}=pe(kr),l=e=>t("update:modelValue",e);return m((()=>e.modelValue),(e=>t("change",e))),Lt({toggleAll:(e={})=>{"boolean"==typeof e&&(e={checked:e});const{checked:t,skipDisabled:o}=e,a=n.filter((e=>!!e.props.bindGroup&&(e.props.disabled&&o?e.checked.value:null!=t?t:!e.checked.value))).map((e=>e.name));l(a)}}),Ie((()=>e.modelValue)),a({props:e,updateValue:l}),()=>{var t;return b("div",{class:xr([e.direction])},[null==(t=o.default)?void 0:t.call(o)])}}});const[Cr,Br]=dt("checkbox"),Tr=e("checkboxProps",L({},jl,{shape:String,bindGroup:_,indeterminate:{type:Boolean,default:null}}));var Pr=y({name:Cr,props:Tr,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const{parent:n}=ce(kr),a=i((()=>n&&e.bindGroup?-1!==n.props.modelValue.indexOf(e.name):!!e.modelValue)),l=(o=!a.value)=>{n&&e.bindGroup?(t=>{const{name:o}=e,{max:a,modelValue:l}=n.props,i=l.slice();if(t)a&&i.length>=+a||i.includes(o)||(i.push(o),e.bindGroup&&n.updateValue(i));else{const t=i.indexOf(o);-1!==t&&(i.splice(t,1),e.bindGroup&&n.updateValue(i))}})(o):t("update:modelValue",o),null!==e.indeterminate&&t("change",o)};return m((()=>e.modelValue),(o=>{null===e.indeterminate&&t("change",o)})),Lt({toggle:l,props:e,checked:a}),Ie((()=>e.modelValue)),()=>b(Wl,w({bem:Br,role:"checkbox",parent:n,checked:a.value,onToggle:l},e),X(o,["default","icon"]))}});const Dr=e("Checkbox",Ct(Pr)),Or=e("CheckboxGroup",Ct(Sr)),[Ir,Ar]=dt("circle");let Vr=0;const zr=e=>Math.min(Math.max(+e,0),100);const Er=e("circleProps",{text:String,size:K,fill:oe("none"),rate:te(100),speed:te(0),color:[String,Object],clockwise:_,layerColor:String,currentRate:ee(0),strokeWidth:te(40),strokeLinecap:String,startPosition:oe("top")});var $r=y({name:Ir,props:Er,emits:["update:currentRate"],setup(e,{emit:t,slots:o}){const n="van-circle-"+Vr++,a=i((()=>+e.strokeWidth+1e3)),l=i((()=>function(e,t){const o=e?1:0;return`M ${t/2} ${t/2} m 0, -500 a 500, 500 0 1, ${o} 0, 1000 a 500, 500 0 1, ${o} 0, -1000`}(e.clockwise,a.value))),r=i((()=>{const t={top:0,right:90,bottom:180,left:270}[e.startPosition];if(t)return{transform:`rotate(${t}deg)`}}));m((()=>e.rate),(o=>{let n;const a=Date.now(),l=e.currentRate,i=zr(o),r=Math.abs(1e3*(l-i)/+e.speed),s=()=>{const e=Date.now(),o=Math.min((e-a)/r,1)*(i-l)+l;t("update:currentRate",zr(parseFloat(o.toFixed(1)))),(i>l?o<i:o>i)&&(n=ae(s))};e.speed?(n&&le(n),n=ae(s)):t("update:currentRate",i)}),{immediate:!0});const s=()=>{const{strokeWidth:t,currentRate:o,strokeLinecap:a}=e,i=3140*o/100,r=R(e.color)?`url(#${n})`:e.color,s={stroke:r,strokeWidth:+t+1+"px",strokeLinecap:a,strokeDasharray:`${i}px 3140px`};return b("path",{d:l.value,style:s,class:Ar("hover"),stroke:r},null)},c=()=>{const t={fill:e.fill,stroke:e.layerColor,strokeWidth:`${e.strokeWidth}px`};return b("path",{class:Ar("layer"),style:t,d:l.value},null)},u=()=>{const{color:t}=e;if(!R(t))return;const o=Object.keys(t).sort(((e,t)=>parseFloat(e)-parseFloat(t))).map(((e,o)=>b("stop",{key:o,offset:e,"stop-color":t[e]},null)));return b("defs",null,[b("linearGradient",{id:n,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[o])])};return()=>b("div",{class:Ar(),style:Ue(e.size)},[b("svg",{viewBox:`0 0 ${a.value} ${a.value}`,style:r.value},[u(),c(),s()]),o.default?o.default():e.text?b("div",{class:Ar("text")},[e.text]):void 0])}});const Lr=e("Circle",Ct($r)),[Mr,Rr]=dt("row"),Fr=Symbol(Mr),Hr=e("rowProps",{tag:oe("div"),wrap:_,align:String,gutter:te(0),justify:String});var Nr=y({name:Mr,props:Hr,setup(e,{slots:t}){const{children:o,linkChildren:n}=pe(Fr),a=i((()=>{const e=[[]];let t=0;return o.forEach(((o,n)=>{t+=Number(o.span),t>24?(e.push([n]),t-=24):e[e.length-1].push(n)})),e}));return n({spaces:i((()=>{const t=Number(e.gutter),o=[];return t?(a.value.forEach((e=>{const n=t*(e.length-1)/e.length;e.forEach(((e,a)=>{if(0===a)o.push({right:n});else{const a=t-o[e-1].right,l=n-a;o.push({left:a,right:l})}}))})),o):o}))}),()=>{const{tag:o,wrap:n,align:a,justify:l}=e;return b(o,{class:Rr({[`align-${a}`]:a,[`justify-${l}`]:l,nowrap:!n})},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}}});const[jr,Wr]=dt("col"),Ur=e("colProps",{tag:oe("div"),span:te(0),offset:K});var Yr=y({name:jr,props:Ur,setup(e,{slots:t}){const{parent:o,index:n}=ce(Fr),a=i((()=>{if(!o)return;const{spaces:e}=o;if(e&&e.value&&e.value[n.value]){const{left:t,right:o}=e.value[n.value];return{paddingLeft:t?`${t}px`:null,paddingRight:o?`${o}px`:null}}}));return()=>{const{tag:o,span:n,offset:l}=e;return b(o,{style:a.value,class:Wr({[n]:n,[`offset-${l}`]:l})},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}}});const Xr=e("Col",Ct(Yr)),[qr,Gr]=dt("collapse"),Zr=Symbol(qr),Kr=e("collapseProps",{border:_,accordion:Boolean,modelValue:{type:[String,Number,Array],default:""}});var _r=y({name:qr,props:Kr,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const{linkChildren:n,children:a}=pe(Zr),l=e=>{t("change",e),t("update:modelValue",e)};return Lt({toggleAll:(t={})=>{if(e.accordion)return;"boolean"==typeof t&&(t={expanded:t});const{expanded:o,skipDisabled:n}=t,i=a.filter((e=>e.disabled&&n?e.expanded.value:null!=o?o:!e.expanded.value)).map((e=>e.itemName.value));l(i)}}),n({toggle:(t,o)=>{const{accordion:n,modelValue:a}=e;l(n?t===a?"":t:o?a.concat(t):a.filter((e=>e!==t)))},isExpanded:t=>{const{accordion:o,modelValue:n}=e;return o?n===t:n.includes(t)}}),()=>{var t;return b("div",{class:[Gr(),{[bt]:e.border}]},[null==(t=o.default)?void 0:t.call(o)])}}});const Jr=e("Collapse",Ct(_r)),[Qr,es]=dt("collapse-item"),ts=["icon","title","value","label","right-icon"],os=e("collapseItemProps",L({},Ia,{name:K,isLink:_,disabled:Boolean,readonly:Boolean,lazyRender:_}));var ns=y({name:Qr,props:os,setup(e,{slots:t}){const o=r(),n=r(),{parent:a,index:l}=ce(Zr);if(!a)return;const s=i((()=>{var t;return null!=(t=e.name)?t:l.value})),c=i((()=>a.isExpanded(s.value))),u=r(c.value),d=zo((()=>u.value||!e.lazyRender)),p=()=>{c.value?o.value&&(o.value.style.height=""):u.value=!1};m(c,((e,t)=>{if(null===t)return;e&&(u.value=!0);(e?v:ae)((()=>{if(!n.value||!o.value)return;const{offsetHeight:t}=n.value;if(t){const n=`${t}px`;o.value.style.height=e?"0":n,ie((()=>{o.value&&(o.value.style.height=e?n:"0")}))}else p()}))}));const h=(e=!c.value)=>{a.toggle(s.value,e)},f=()=>{e.disabled||e.readonly||h()},g=()=>{const{border:o,disabled:n,readonly:a}=e,l=X(e,Object.keys(Ia));return a&&(l.isLink=!1),(n||a)&&(l.clickable=!1),b(za,w({role:"button",class:es("title",{disabled:n,expanded:c.value,borderless:!o}),"aria-expanded":String(c.value),onClick:f},l),X(t,ts))},y=d((()=>{var e;return S(b("div",{ref:o,class:es("wrapper"),onTransitionend:p},[b("div",{ref:n,class:es("content")},[null==(e=t.default)?void 0:e.call(t)])]),[[C,u.value]])}));return Lt({toggle:h,expanded:c,itemName:s}),()=>b("div",{class:[es({border:l.value&&e.border})]},[g(),y()])}});const as=e("CollapseItem",Ct(ns)),ls=e("ConfigProvider",Ct(_t)),[is,rs,ss]=dt("contact-card"),cs=e("contactCardProps",{tel:String,name:String,type:oe("add"),addText:String,editable:_});var us=y({name:is,props:cs,emits:["click"],setup(e,{emit:t}){const o=o=>{e.editable&&t("click",o)},n=()=>"add"===e.type?e.addText||ss("addContact"):[b("div",null,[`${ss("name")}${e.name}`]),b("div",null,[`${ss("tel")}${e.tel}`])];return()=>b(za,{center:!0,icon:"edit"===e.type?"contact":"add-square",class:rs([e.type]),border:!1,isLink:e.editable,titleClass:rs("title"),onClick:o},{title:n})}});const ds=e("ContactCard",Ct(us)),[ps,vs,hs]=dt("contact-edit"),ms={tel:"",name:""},fs=e("contactEditProps",{isEdit:Boolean,isSaving:Boolean,isDeleting:Boolean,showSetDefault:Boolean,setDefaultLabel:String,contactInfo:{type:Object,default:()=>L({},ms)},telValidator:{type:Function,default:W}});var gs=y({name:ps,props:fs,emits:["save","delete","changeDefault"],setup(e,{emit:t}){const o=s(L({},ms,e.contactInfo)),n=()=>{e.isSaving||t("save",o)},a=()=>t("delete",o),l=()=>b(yl,{modelValue:o.isDefault,"onUpdate:modelValue":e=>o.isDefault=e,onChange:e=>t("changeDefault",e)},null),i=()=>{if(e.showSetDefault)return b(za,{title:e.setDefaultLabel,class:vs("switch-cell"),border:!1},{"right-icon":l})};return m((()=>e.contactInfo),(e=>L(o,ms,e))),()=>b(Ra,{class:vs(),onSubmit:n},{default:()=>[b("div",{class:vs("fields")},[b(Ka,{modelValue:o.name,"onUpdate:modelValue":e=>o.name=e,clearable:!0,label:hs("name"),rules:[{required:!0,message:hs("nameEmpty")}],maxlength:"30",placeholder:hs("name")},null),b(Ka,{modelValue:o.tel,"onUpdate:modelValue":e=>o.tel=e,clearable:!0,type:"tel",label:hs("tel"),rules:[{validator:e.telValidator,message:hs("telInvalid")}],placeholder:hs("tel")},null)]),i(),b("div",{class:vs("buttons")},[b(fo,{block:!0,round:!0,type:"primary",text:hs("save"),class:vs("button"),loading:e.isSaving,nativeType:"submit"},null),e.isEdit&&b(fo,{block:!0,round:!0,text:hs("delete"),class:vs("button"),loading:e.isDeleting,onClick:a},null)])]})}});const bs=e("ContactEdit",Ct(gs)),[ys,xs,ws]=dt("contact-list"),ks=e("contactListProps",{list:Array,addText:String,modelValue:Z,defaultTagText:String});var Ss=y({name:ys,props:ks,emits:["add","edit","select","update:modelValue"],setup(e,{emit:t}){const o=(o,n)=>b(za,{key:o.id,isLink:!0,center:!0,class:xs("item"),titleClass:xs("item-title"),onClick:()=>{t("update:modelValue",o.id),t("select",o,n)}},{icon:()=>b(oo,{name:"edit",class:xs("edit"),onClick:e=>{e.stopPropagation(),t("edit",o,n)}},null),title:()=>{const t=[`${o.name}${o.tel}`];return o.isDefault&&e.defaultTagText&&t.push(b(Nl,{type:"primary",round:!0,class:xs("item-tag")},{default:()=>[e.defaultTagText]})),t},"right-icon":()=>b(Gl,{class:xs("radio"),name:o.id,iconSize:18},null)});return()=>b("div",{class:xs()},[b(Ll,{modelValue:e.modelValue,class:xs("group")},{default:()=>[e.list&&e.list.map(o)]}),b("div",{class:[xs("bottom"),"van-safe-area-bottom"]},[b(fo,{round:!0,block:!0,type:"primary",class:xs("add"),text:e.addText||ws("addContact"),onClick:()=>t("add")},null)])])}});const Cs=e("ContactList",Ct(Ss));const[Bs,Ts]=dt("count-down"),Ps=e("countDownProps",{time:te(0),format:oe("HH:mm:ss"),autoStart:_,millisecond:Boolean});var Ds=y({name:Bs,props:Ps,emits:["change","finish"],setup(e,{emit:t,slots:o}){const{start:n,pause:a,reset:l,current:r}=ye({time:+e.time,millisecond:e.millisecond,onChange:e=>t("change",e),onFinish:()=>t("finish")}),s=i((()=>function(e,t){const{days:o}=t;let{hours:n,minutes:a,seconds:l,milliseconds:i}=t;if(e.includes("DD")?e=e.replace("DD",_e(o)):n+=24*o,e.includes("HH")?e=e.replace("HH",_e(n)):a+=60*n,e.includes("mm")?e=e.replace("mm",_e(a)):l+=60*a,e.includes("ss")?e=e.replace("ss",_e(l)):i+=1e3*l,e.includes("S")){const t=_e(i,3);e=e.includes("SSS")?e.replace("SSS",t):e.includes("SS")?e.replace("SS",t.slice(0,2)):e.replace("S",t.charAt(0))}return e}(e.format,r.value))),c=()=>{l(+e.time),e.autoStart&&n()};return m((()=>e.time),c,{immediate:!0}),Lt({start:n,pause:a,reset:c}),()=>b("div",{role:"timer",class:Ts()},[o.default?o.default(r.value):s.value])}});const Os=e("CountDown",Ct(Ds));function Is(e){const t=new Date(1e3*e);return`${t.getFullYear()}.${_e(t.getMonth()+1)}.${_e(t.getDate())}`}const As=e=>(e/100).toFixed(e%100==0?0:e%10==0?1:2),[Vs,zs,Es]=dt("coupon");var $s=y({name:Vs,props:{chosen:Boolean,coupon:J(Object),disabled:Boolean,currency:oe("¥")},setup(e){const t=i((()=>{const{startAt:t,endAt:o}=e.coupon;return`${Is(t)} - ${Is(o)}`})),o=i((()=>{const{coupon:t,currency:o}=e;if(t.valueDesc)return[t.valueDesc,b("span",null,[t.unitDesc||""])];if(t.denominations){const e=As(t.denominations);return[b("span",null,[o]),` ${e}`]}return t.discount?Es("discount",((n=t.discount)/10).toFixed(n%10==0?0:1)):"";var n})),n=i((()=>{const t=As(e.coupon.originCondition||0);return"0"===t?Es("unlimited"):Es("condition",t)}));return()=>{const{chosen:a,coupon:l,disabled:i}=e,r=i&&l.reason||l.description;return b("div",{class:zs({disabled:i})},[b("div",{class:zs("content")},[b("div",{class:zs("head")},[b("h2",{class:zs("amount")},[o.value]),b("p",{class:zs("condition")},[l.condition||n.value])]),b("div",{class:zs("body")},[b("p",{class:zs("name")},[l.name]),b("p",{class:zs("valid")},[t.value]),!i&&b(Dr,{class:zs("corner"),modelValue:a},null)])]),r&&b("p",{class:zs("description")},[r])])}}});const Ls=e("Coupon",Ct($s)),[Ms,Rs,Fs]=dt("coupon-cell"),Hs=e("couponCellProps",{title:String,border:_,editable:_,coupons:Q(),currency:oe("¥"),chosenCoupon:te(-1)});function Ns({coupons:e,chosenCoupon:t,currency:o}){const n=e[+t];if(n){let e=0;return F(n.value)?({value:e}=n):F(n.denominations)&&(e=n.denominations),`-${o} ${(e/100).toFixed(2)}`}return 0===e.length?Fs("noCoupon"):Fs("count",e.length)}var js=y({name:Ms,props:Hs,setup:e=>()=>{const t=e.coupons[+e.chosenCoupon];return b(za,{class:Rs(),value:Ns(e),title:e.title||Fs("title"),border:e.border,isLink:e.editable,valueClass:Rs("value",{selected:t})},null)}});const Ws=e("CouponCell",Ct(js)),[Us,Ys]=dt("empty"),Xs=e("emptyProps",{image:oe("default"),imageSize:[Number,String,Array],description:String});var qs=y({name:Us,props:Xs,setup(e,{slots:t}){const o=()=>{const o=t.description?t.description():e.description;if(o)return b("p",{class:Ys("description")},[o])},n=()=>{if(t.default)return b("div",{class:Ys("bottom")},[t.default()])},a=Pn(),l=e=>`${a}-${e}`,i=e=>`url(#${l(e)})`,r=(e,t,o)=>b("stop",{"stop-color":e,offset:`${t}%`,"stop-opacity":o},null),s=(e,t)=>[r(e,0),r(t,100)],c=e=>[b("defs",null,[b("radialGradient",{id:l(e),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)"},[r("#EBEDF0",0),r("#F2F3F5",100,.3)])]),b("ellipse",{fill:i(e),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],u=()=>[b("defs",null,[b("linearGradient",{id:l("a"),x1:"64%",y1:"100%",x2:"64%"},[r("#FFF",0,.5),r("#F2F3F5",100)])]),b("g",{opacity:".8"},[b("path",{d:"M36 131V53H16v20H2v58h34z",fill:i("a")},null),b("path",{d:"M123 15h22v14h9v77h-31V15z",fill:i("a")},null)])],d=()=>[b("defs",null,[b("linearGradient",{id:l("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%"},[r("#F2F3F5",0,.3),r("#F2F3F5",100)])]),b("g",{opacity:".8"},[b("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:i("b")},null),b("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:i("b")},null)])],p=()=>b("svg",{viewBox:"0 0 160 160"},[b("defs",null,[b("linearGradient",{id:l(1),x1:"64%",y1:"100%",x2:"64%"},[r("#FFF",0,.5),r("#F2F3F5",100)]),b("linearGradient",{id:l(2),x1:"50%",x2:"50%",y2:"84%"},[r("#EBEDF0",0),r("#DCDEE0",100,0)]),b("linearGradient",{id:l(3),x1:"100%",x2:"100%",y2:"100%"},[s("#EAEDF0","#DCDEE0")]),b("radialGradient",{id:l(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[r("#EBEDF0",0),r("#FFF",100,0)])]),b("g",{fill:"none"},[u(),b("path",{fill:i(4),d:"M0 139h160v21H0z"},null),b("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:i(2)},null),b("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7"},[b("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:i(3)},null),b("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:i(3)},null),b("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:i(3)},null),b("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:i(3)},null)]),b("g",{transform:"translate(31 105)"},[b("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),b("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),b("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),v=()=>b("svg",{viewBox:"0 0 160 160"},[b("defs",null,[b("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(5)},[s("#F2F3F5","#DCDEE0")]),b("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:l(6)},[s("#EAEDF1","#DCDEE0")]),b("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:l(7)},[s("#EAEDF1","#DCDEE0")])]),u(),d(),b("g",{transform:"translate(36 50)",fill:"none"},[b("g",{transform:"translate(8)"},[b("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),b("rect",{fill:i(5),width:"64",height:"66",rx:"2"},null),b("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),b("g",{transform:"translate(15 17)",fill:i(6)},[b("rect",{width:"34",height:"6",rx:"1"},null),b("path",{d:"M0 14h34v6H0z"},null),b("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),b("rect",{fill:i(7),y:"61",width:"88",height:"28",rx:"1"},null),b("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),h=()=>b("svg",{viewBox:"0 0 160 160"},[b("defs",null,[b("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(8)},[s("#EAEDF1","#DCDEE0")])]),u(),d(),c("c"),b("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:i(8)},null)]),m=()=>b("svg",{viewBox:"0 0 160 160"},[b("defs",null,[b("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:l(9)},[s("#EEE","#D8D8D8")]),b("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:l(10)},[s("#F2F3F5","#DCDEE0")]),b("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(11)},[s("#F2F3F5","#DCDEE0")]),b("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(12)},[s("#FFF","#F7F8FA")])]),u(),d(),c("d"),b("g",{transform:"rotate(-45 113 -4)",fill:"none"},[b("rect",{fill:i(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),b("rect",{fill:i(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),b("circle",{stroke:i(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),b("circle",{fill:i(12),cx:"27",cy:"27",r:"16"},null),b("path",{d:"M37 7c-8 0-15 5-16 12",stroke:i(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),f=()=>{var o;if(t.image)return t.image();const n={error:h,search:m,network:p,default:v};return(null==(o=n[e.image])?void 0:o.call(n))||b("img",{src:e.image},null)};return()=>b("div",{class:Ys()},[b("div",{class:Ys("image"),style:Ue(e.imageSize)},[f()]),o(),n()])}});const Gs=e("Empty",Ct(qs)),[Zs,Ks,_s]=dt("coupon-list"),Js=e("couponListProps",{code:oe(""),coupons:Q(),currency:oe("¥"),showCount:_,emptyImage:String,chosenCoupon:ee(-1),enabledTitle:String,disabledTitle:String,disabledCoupons:Q(),showExchangeBar:_,showCloseButton:_,closeButtonText:String,inputPlaceholder:String,exchangeMinLength:ee(1),exchangeButtonText:String,displayedCouponIndex:ee(-1),exchangeButtonLoading:Boolean,exchangeButtonDisabled:Boolean});var Qs=y({name:Zs,props:Js,emits:["change","exchange","update:code"],setup(e,{emit:t,slots:o}){const[n,a]=Dn(),l=r(),s=r(),c=r(0),u=r(0),d=r(e.code),h=i((()=>!e.exchangeButtonLoading&&(e.exchangeButtonDisabled||!d.value||d.value.length<e.exchangeMinLength))),f=()=>{const e=se(l).height,t=se(s).height+44;u.value=(e>t?e:je.value)-t},g=()=>{t("exchange",d.value),e.code||(d.value="")},y=e=>{v((()=>{var t;return null==(t=n.value[e])?void 0:t.scrollIntoView()}))},x=()=>b(Gs,{image:e.emptyImage},{default:()=>[b("p",{class:Ks("empty-tip")},[_s("noCoupon")])]}),w=()=>{if(e.showExchangeBar)return b("div",{ref:s,class:Ks("exchange-bar")},[b(Ka,{modelValue:d.value,"onUpdate:modelValue":e=>d.value=e,clearable:!0,border:!1,class:Ks("field"),placeholder:e.inputPlaceholder||_s("placeholder"),maxlength:"20"},null),b(fo,{plain:!0,type:"primary",class:Ks("exchange"),text:e.exchangeButtonText||_s("exchange"),loading:e.exchangeButtonLoading,disabled:h.value,onClick:g},null)])},k=()=>{const{coupons:n}=e,l=e.showCount?` (${n.length})`:"",i=(e.enabledTitle||_s("enable"))+l;return b(ra,{title:i},{default:()=>{var l;return[b("div",{class:Ks("list",{"with-bottom":e.showCloseButton}),style:{height:`${u.value}px`}},[n.map(((o,n)=>b(Ls,{key:o.id,ref:a(n),coupon:o,chosen:n===e.chosenCoupon,currency:e.currency,onClick:()=>t("change",n)},null))),!n.length&&x(),null==(l=o["list-footer"])?void 0:l.call(o)])]}})},B=()=>{const{disabledCoupons:t}=e,n=e.showCount?` (${t.length})`:"",a=(e.disabledTitle||_s("disabled"))+n;return b(ra,{title:a},{default:()=>{var n;return[b("div",{class:Ks("list",{"with-bottom":e.showCloseButton}),style:{height:`${u.value}px`}},[t.map((t=>b(Ls,{disabled:!0,key:t.id,coupon:t,currency:e.currency},null))),!t.length&&x(),null==(n=o["disabled-list-footer"])?void 0:n.call(o)])]}})};return m((()=>e.code),(e=>{d.value=e})),m(je,f),m(d,(e=>t("update:code",e))),m((()=>e.displayedCouponIndex),y),p((()=>{f(),y(e.displayedCouponIndex)})),()=>b("div",{ref:l,class:Ks()},[w(),b(sa,{active:c.value,"onUpdate:active":e=>c.value=e,class:Ks("tab")},{default:()=>[k(),B()]}),b("div",{class:Ks("bottom")},[S(b(fo,{round:!0,block:!0,type:"primary",class:Ks("close"),text:e.closeButtonText||_s("close"),onClick:()=>t("change",-1)},null),[[C,e.showCloseButton]])])])}});const ec=e("CouponList",Ct(Qs)),tc=(new Date).getFullYear(),[oc]=dt("date-picker"),nc=e("datePickerProps",L({},Mi,{columnsType:{type:Array,default:()=>["year","month","day"]},minDate:{type:Date,default:()=>new Date(tc-10,0,1),validator:j},maxDate:{type:Date,default:()=>new Date(tc+10,11,31),validator:j}}));var ac=y({name:oc,props:nc,emits:["confirm","cancel","change","update:modelValue"],setup(e,{emit:t,slots:o}){const n=r(e.modelValue),a=r(!1),l=t=>t===e.minDate.getFullYear(),s=t=>t===e.maxDate.getFullYear(),c=t=>{const{minDate:o,columnsType:l}=e,i=l.indexOf(t),r=a.value?e.modelValue[i]:n.value[i];if(r)return+r;switch(t){case"year":return o.getFullYear();case"month":return o.getMonth()+1;case"day":return o.getDate()}},u=()=>{const t=c("year"),o=c("month"),n=l(t)&&(t=>t===e.minDate.getMonth()+1)(o)?e.minDate.getDate():1,a=s(t)&&(t=>t===e.maxDate.getMonth()+1)(o)?e.maxDate.getDate():Fi(t,o);return Hi(n,a,"day",e.formatter,e.filter)},d=i((()=>e.columnsType.map((t=>{switch(t){case"year":return(()=>{const t=e.minDate.getFullYear(),o=e.maxDate.getFullYear();return Hi(t,o,"year",e.formatter,e.filter)})();case"month":return(()=>{const t=c("year"),o=l(t)?e.minDate.getMonth()+1:1,n=s(t)?e.maxDate.getMonth()+1:12;return Hi(o,n,"month",e.formatter,e.filter)})();case"day":return u();default:return[]}}))));m(n,(o=>{q(o,e.modelValue)||t("update:modelValue",o)})),m((()=>e.modelValue),((e,t)=>{a.value=q(t,n.value),e=Ni(e,d.value),q(e,n.value)||(n.value=e),a.value=!1}),{immediate:!0});const p=(...e)=>t("change",...e),v=(...e)=>t("cancel",...e),h=(...e)=>t("confirm",...e);return()=>b(ka,w({modelValue:n.value,"onUpdate:modelValue":e=>n.value=e,columns:d.value,onChange:p,onCancel:v,onConfirm:h},X(e,Ri)),o)}});const lc=e("DatePicker",Ct(ac)),[ic,rc,sc]=dt("dialog"),cc=e("dialogProps",L({},Po,{title:String,theme:String,width:K,message:[String,Function],callback:Function,allowHtml:Boolean,className:Z,transition:oe("van-dialog-bounce"),messageAlign:String,closeOnPopstate:_,showCancelButton:Boolean,cancelButtonText:String,cancelButtonColor:String,cancelButtonDisabled:Boolean,confirmButtonText:String,confirmButtonColor:String,confirmButtonDisabled:Boolean,showConfirmButton:_,closeOnClickOverlay:Boolean})),uc=[...Do,"transition","closeOnPopstate"];var dc=y({name:ic,props:cc,emits:["confirm","cancel","keydown","update:show"],setup(e,{emit:o,slots:n}){const a=r(),l=s({confirm:!1,cancel:!1}),i=e=>o("update:show",e),c=t=>{var o;i(!1),null==(o=e.callback)||o.call(e,t)},u=t=>()=>{e.show&&(o(t),e.beforeClose?(l[t]=!0,St(e.beforeClose,{args:[t],done(){c(t),l[t]=!1},canceled(){l[t]=!1}})):c(t))},d=u("cancel"),p=u("confirm"),v=A((n=>{var l,i;if(n.target!==(null==(i=null==(l=a.value)?void 0:l.popupRef)?void 0:i.value))return;({Enter:e.showConfirmButton?p:t,Escape:e.showCancelButton?d:t})[n.key](),o("keydown",n)}),["enter","esc"]),h=()=>{const t=n.title?n.title():e.title;if(t)return b("div",{class:rc("header",{isolated:!e.message&&!n.default})},[t])},m=t=>{const{message:o,allowHtml:n,messageAlign:a}=e,l=rc("message",{"has-title":t,[a]:a}),i=H(o)?o():o;return n&&"string"==typeof i?b("div",{class:l,innerHTML:i},null):b("div",{class:l},[i])},f=()=>{if(n.default)return b("div",{class:rc("content")},[n.default()]);const{title:t,message:o,allowHtml:a}=e;if(o){const e=!(!t&&!n.title);return b("div",{key:a?1:0,class:rc("content",{isolated:!e})},[m(e)])}},g=()=>n.footer?n.footer():"round-button"===e.theme?b($t,{class:rc("footer")},{default:()=>[e.showCancelButton&&b(wo,{type:"warning",text:e.cancelButtonText||sc("cancel"),class:rc("cancel"),color:e.cancelButtonColor,loading:l.cancel,disabled:e.cancelButtonDisabled,onClick:d},null),e.showConfirmButton&&b(wo,{type:"danger",text:e.confirmButtonText||sc("confirm"),class:rc("confirm"),color:e.confirmButtonColor,loading:l.confirm,disabled:e.confirmButtonDisabled,onClick:p},null)]}):b("div",{class:[vt,rc("footer")]},[e.showCancelButton&&b(fo,{size:"large",text:e.cancelButtonText||sc("cancel"),class:rc("cancel"),style:{color:e.cancelButtonColor},loading:l.cancel,disabled:e.cancelButtonDisabled,onClick:d},null),e.showConfirmButton&&b(fo,{size:"large",text:e.confirmButtonText||sc("confirm"),class:[rc("confirm"),{[ht]:e.showCancelButton}],style:{color:e.confirmButtonColor},loading:l.confirm,disabled:e.confirmButtonDisabled,onClick:p},null)]);return()=>{const{width:t,title:o,theme:n,message:l,className:r}=e;return b(Uo,w({ref:a,role:"dialog",class:[rc([n]),r],style:{width:We(t)},tabindex:0,"aria-labelledby":o||l,onKeydown:v,"onUpdate:show":i},X(e,uc)),{default:()=>[h(),f(),g()]})}}});let pc;const vc={title:"",width:"",theme:null,message:"",overlay:!0,callback:null,teleport:"body",className:"",allowHtml:!1,lockScroll:!0,transition:void 0,beforeClose:null,overlayClass:"",overlayStyle:void 0,messageAlign:"",cancelButtonText:"",cancelButtonColor:null,cancelButtonDisabled:!1,confirmButtonText:"",confirmButtonColor:null,confirmButtonDisabled:!1,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1};let hc=L({},vc);function mc(e){return M?new Promise(((t,o)=>{pc||function(){const e={setup(){const{state:e,toggle:t}=nl();return()=>b(dc,w(e,{"onUpdate:show":t}),null)}};({instance:pc}=al(e))}(),pc.open(L({},hc,e,{callback:e=>{("confirm"===e?t:o)(e)}}))})):Promise.resolve(void 0)}e("setDialogDefaultOptions",(e=>{L(hc,e)})),e("resetDialogDefaultOptions",(()=>{hc=L({},vc)})),e("showConfirmDialog",(e=>mc(L({showCancelButton:!0},e)))),e("closeDialog",(()=>{pc&&pc.toggle(!1)}));const fc=e("Dialog",Ct(dc)),[gc,bc]=dt("divider"),yc=e("dividerProps",{dashed:Boolean,hairline:_,vertical:Boolean,contentPosition:oe("center")});var xc=y({name:gc,props:yc,setup:(e,{slots:t})=>()=>{var o;return b("div",{role:"separator",class:bc({dashed:e.dashed,hairline:e.hairline,vertical:e.vertical,[`content-${e.contentPosition}`]:!!t.default&&!e.vertical})},[!e.vertical&&(null==(o=t.default)?void 0:o.call(t))])}});const wc=e("Divider",Ct(xc)),[kc,Sc]=dt("dropdown-menu"),Cc=e("dropdownMenuProps",{overlay:_,zIndex:K,duration:te(.2),direction:oe("down"),activeColor:String,closeOnClickOutside:_,closeOnClickOverlay:_,swipeThreshold:K}),Bc=Symbol(kc);var Tc=y({name:kc,props:Cc,setup(e,{slots:t}){const o=Pn(),n=r(),a=r(),l=r(0),{children:s,linkChildren:c}=pe(Bc),u=De(n),d=i((()=>s.some((e=>e.state.showWrapper)))),p=i((()=>e.swipeThreshold&&s.length>+e.swipeThreshold)),v=i((()=>{if(d.value&&F(e.zIndex))return{zIndex:+e.zIndex+1}})),h=()=>{s.forEach((e=>{e.toggle(!1)}))},m=()=>{if(a.value){const t=se(a);"down"===e.direction?l.value=t.bottom:l.value=je.value-t.top}},f=(t,n)=>{const{showPopup:a}=t.state,{disabled:l,titleClass:i}=t;return b("div",{id:`${o}-${n}`,role:"button",tabindex:l?void 0:0,class:[Sc("item",{disabled:l,grow:p.value}),{[xt]:!l}],onClick:()=>{var e;l||(e=n,s.forEach(((t,o)=>{o===e?t.toggle():t.state.showPopup&&t.toggle(!1,{immediate:!0})})))}},[b("span",{class:[Sc("title",{down:a===("down"===e.direction),active:a}),i],style:{color:a?e.activeColor:""}},[b("div",{class:"van-ellipsis"},[t.renderTitle()])])])};return Lt({close:h}),c({id:o,props:e,offset:l,updateOffset:m}),ke(n,(()=>{e.closeOnClickOutside&&h()})),we("scroll",(()=>{d.value&&m()}),{target:u,passive:!0}),()=>{var e;return b("div",{ref:n,class:Sc()},[b("div",{ref:a,style:v.value,class:Sc("bar",{opened:d.value,scrollable:p.value})},[s.map(f)]),null==(e=t.default)?void 0:e.call(t)])}}});const[Pc,Dc]=dt("dropdown-item"),Oc=e("dropdownItemProps",{title:String,options:Q(),disabled:Boolean,teleport:[String,Object],lazyRender:_,modelValue:Z,titleClass:Z});var Ic=y({name:Pc,inheritAttrs:!1,props:Oc,emits:["open","opened","close","closed","change","update:modelValue"],setup(e,{emit:t,slots:o,attrs:n}){const a=s({showPopup:!1,transition:!0,showWrapper:!1}),{parent:l,index:i}=ce(Bc);if(!l)return;const r=e=>()=>t(e),c=r("open"),u=r("close"),d=r("opened"),p=()=>{a.showWrapper=!1,t("closed")},v=t=>{e.teleport&&t.stopPropagation()},h=o=>{const{activeColor:n}=l.props,i=o.value===e.modelValue;return b(za,{role:"menuitem",key:String(o.value),icon:o.icon,title:o.text,class:Dc("option",{active:i}),style:{color:i?n:""},tabindex:i?0:-1,clickable:!0,onClick:()=>{a.showPopup=!1,o.value!==e.modelValue&&(t("update:modelValue",o.value),t("change",o.value))}},{value:()=>{if(i)return b(oo,{class:Dc("icon"),color:n,name:"success"},null)}})},m=()=>{const{offset:t}=l,{zIndex:r,overlay:s,duration:m,direction:f,closeOnClickOverlay:g}=l.props,y=Ye(r);return"down"===f?y.top=`${t.value}px`:y.bottom=`${t.value}px`,S(b("div",w({style:y,class:Dc([f]),onClick:v},n),[b(Uo,{show:a.showPopup,"onUpdate:show":e=>a.showPopup=e,role:"menu",class:Dc("content"),overlay:s,position:"down"===f?"top":"bottom",duration:a.transition?m:0,lazyRender:e.lazyRender,overlayStyle:{position:"absolute"},"aria-labelledby":`${l.id}-${i.value}`,closeOnClickOverlay:g,onOpen:c,onClose:u,onOpened:d,onClosed:p},{default:()=>{var t;return[e.options.map(h),null==(t=o.default)?void 0:t.call(o)]}})]),[[C,a.showWrapper]])};return Lt({state:a,toggle:(e=!a.showPopup,t={})=>{e!==a.showPopup&&(a.showPopup=e,a.transition=!t.immediate,e&&(l.updateOffset(),a.showWrapper=!0))},renderTitle:()=>{if(o.title)return o.title();if(e.title)return e.title;const t=e.options.find((t=>t.value===e.modelValue));return t?t.text:""}}),()=>e.teleport?b(B,{to:e.teleport},{default:()=>[m()]}):m()}});const Ac=e("DropdownItem",Ct(Ic)),Vc=e("DropdownMenu",Ct(Tc)),zc=e("floatingBubbleProps",{gap:ee(24),icon:String,axis:oe("y"),magnetic:String,offset:{type:Object,default:()=>({x:-1,y:-1})},teleport:{type:[String,Object],default:"body"}}),[Ec,$c]=dt("floating-bubble");var Lc=y({name:Ec,inheritAttrs:!1,props:zc,emits:["click","update:offset","offsetChange"],setup(e,{slots:t,emit:o,attrs:n}){const a=r(),l=r({x:0,y:0,width:0,height:0}),s=i((()=>({top:e.gap,right:Ne.value-l.value.width-e.gap,bottom:je.value-l.value.height-e.gap,left:e.gap}))),c=r(!1);let h=!1;const f=i((()=>{const e={},t=We(l.value.x),o=We(l.value.y);return e.transform=`translate3d(${t}, ${o}, 0)`,!c.value&&h||(e.transition="none"),e})),g=()=>{if(!O.value)return;const{width:t,height:o}=se(a.value),{offset:n}=e;l.value={x:n.x>-1?n.x:Ne.value-t-e.gap,y:n.y>-1?n.y:je.value-o-e.gap,width:t,height:o}},y=Oo();let x=0,k=0;const T=e=>{y.start(e),c.value=!0,x=l.value.x,k=l.value.y};we("touchmove",(t=>{if(t.preventDefault(),y.move(t),"lock"!==e.axis&&!y.isTap.value){if("x"===e.axis||"xy"===e.axis){let e=x+y.deltaX.value;e<s.value.left&&(e=s.value.left),e>s.value.right&&(e=s.value.right),l.value.x=e}if("y"===e.axis||"xy"===e.axis){let e=k+y.deltaY.value;e<s.value.top&&(e=s.value.top),e>s.value.bottom&&(e=s.value.bottom),l.value.y=e}const t=X(l.value,["x","y"]);o("update:offset",t)}}),{target:a});const P=()=>{c.value=!1,v((()=>{if("x"===e.magnetic){const e=Bt([s.value.left,s.value.right],l.value.x);l.value.x=e}if("y"===e.magnetic){const e=Bt([s.value.top,s.value.bottom],l.value.y);l.value.y=e}if(!y.isTap.value){const e=X(l.value,["x","y"]);o("update:offset",e),x===e.x&&k===e.y||o("offsetChange",e)}}))},D=e=>{y.isTap.value?o("click",e):e.stopPropagation()};p((()=>{g(),v((()=>{h=!0}))})),m([Ne,je,()=>e.gap,()=>e.offset],g);const O=r(!0);return u((()=>{O.value=!0})),d((()=>{e.teleport&&(O.value=!1)})),()=>{const o=S(b("div",w({class:$c(),ref:a,onTouchstartPassive:T,onTouchend:P,onTouchcancel:P,onClickCapture:D,style:f.value},n),[t.default?t.default():b(no,{name:e.icon,class:$c("icon")},null)]),[[C,O.value]]);return e.teleport?b(B,{to:e.teleport},{default:()=>[o]}):o}}});const Mc=e("FloatingBubble",Ct(Lc)),Rc=e("floatingPanelProps",{height:te(0),anchors:Q(),duration:te(.3),contentDraggable:_,lockScroll:Boolean,safeAreaInsetBottom:_}),[Fc,Hc]=dt("floating-panel");var Nc=y({name:Fc,props:Rc,emits:["heightChange","update:height"],setup(e,{emit:t,slots:o}){const n=r(),a=r(),l=hn((()=>+e.height),(e=>t("update:height",e))),s=i((()=>{var t,o;return{min:null!=(t=e.anchors[0])?t:100,max:null!=(o=e.anchors[e.anchors.length-1])?o:Math.round(.6*je.value)}})),c=i((()=>e.anchors.length>=2?e.anchors:[s.value.min,s.value.max])),u=r(!1),d=i((()=>({height:We(s.value.max),transform:`translateY(calc(100% + ${We(-l.value)}))`,transition:u.value?"none":`transform ${e.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)`})));let p,v=-1;const h=Oo(),f=e=>{h.start(e),u.value=!0,p=-l.value,v=-1},g=()=>{v=-1,u.value=!1,l.value=Bt(c.value,l.value),l.value!==-p&&t("heightChange",{height:l.value})};return m(s,(()=>{l.value=Bt(c.value,l.value)}),{immediate:!0}),Vo(n,(()=>e.lockScroll||u.value)),we("touchmove",(t=>{var o;h.move(t);const n=t.target;if(a.value===n||(null==(o=a.value)?void 0:o.contains(n))){const{scrollTop:o}=a.value;if(v=Math.max(v,o),!e.contentDraggable)return;if(-p<s.value.max)Fe(t,!0);else if(!(o<=0&&h.deltaY.value>0)||v>0)return}const i=h.deltaY.value+p;l.value=-(e=>{const t=Math.abs(e),{min:o,max:n}=s.value;return t>n?-(n+.2*(t-n)):t<o?-(o-.2*(o-t)):e})(i)}),{target:n}),()=>{var t;return b("div",{class:[Hc(),{"van-safe-area-bottom":e.safeAreaInsetBottom}],ref:n,style:d.value,onTouchstartPassive:f,onTouchend:g,onTouchcancel:g},[b("div",{class:Hc("header")},[b("div",{class:Hc("header-bar")},null)]),b("div",{class:Hc("content"),ref:a},[null==(t=o.default)?void 0:t.call(o)])])}}});const jc=e("FloatingPanel",Ct(Nc)),[Wc,Uc]=dt("grid"),Yc=e("gridProps",{square:Boolean,center:_,border:_,gutter:K,reverse:Boolean,iconSize:K,direction:String,clickable:Boolean,columnNum:te(4)}),Xc=Symbol(Wc);var qc=y({name:Wc,props:Yc,setup(e,{slots:t}){const{linkChildren:o}=pe(Xc);return o({props:e}),()=>{var o;return b("div",{style:{paddingLeft:We(e.gutter)},class:[Uc(),{[vt]:e.border&&!e.gutter}]},[null==(o=t.default)?void 0:o.call(t)])}}});const Gc=e("Grid",Ct(qc)),[Zc,Kc]=dt("grid-item"),_c=e("gridItemProps",L({},Mt,{dot:Boolean,text:String,icon:String,badge:K,iconColor:String,iconPrefix:String,badgeProps:Object}));var Jc=y({name:Zc,props:_c,setup(e,{slots:t}){const{parent:o,index:n}=ce(Xc),a=Ft();if(!o)return;const l=i((()=>{const{square:e,gutter:t,columnNum:a}=o.props,l=100/+a+"%",i={flexBasis:l};if(e)i.paddingTop=l;else if(t){const e=We(t);i.paddingRight=e,n.value>=+a&&(i.marginTop=e)}return i})),r=i((()=>{const{square:e,gutter:t}=o.props;if(e&&t){const e=We(t);return{right:e,bottom:e,height:"auto"}}}));return()=>{const{center:n,border:i,square:s,gutter:c,reverse:u,direction:d,clickable:p}=o.props,v=[Kc("content",[d,{center:n,square:s,reverse:u,clickable:p,surround:i&&c}]),{[pt]:i}];return b("div",{class:[Kc({square:s})],style:l.value},[b("div",{role:p?"button":void 0,class:v,style:r.value,tabindex:p?0:void 0,onClick:a},[t.default?t.default():[t.icon?b(Ut,w({dot:e.dot,content:e.badge},e.badgeProps),{default:t.icon}):e.icon?b(oo,{dot:e.dot,name:e.icon,size:o.props.iconSize,badge:e.badge,class:Kc("icon"),color:e.iconColor,badgeProps:e.badgeProps,classPrefix:e.iconPrefix},null):void 0,t.text?t.text():e.text?b("span",{class:Kc("text")},[e.text]):void 0]])])}}});const Qc=e("GridItem",Ct(Jc)),eu=e=>Math.sqrt((e[0].clientX-e[1].clientX)**2+(e[0].clientY-e[1].clientY)**2),tu=dt("image-preview")[1];var ou=y({props:{src:String,show:Boolean,active:Number,minZoom:J(K),maxZoom:J(K),rootWidth:J(Number),rootHeight:J(Number),disableZoom:Boolean,doubleScale:Boolean,closeOnClickOverlay:Boolean},emits:["scale","close","longPress"],setup(e,{emit:t,slots:o}){const n=s({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,initializing:!1,imageRatio:0}),a=Oo(),l=r(),c=r(),u=r(!1),d=r(!1);let p=0;const v=i((()=>{const{scale:e,moveX:t,moveY:o,moving:a,zooming:l,initializing:i}=n,r={transitionDuration:l||a||i?"0s":".3s"};return(1!==e||d.value)&&(r.transform=`matrix(${e}, 0, 0, ${e}, ${t}, ${o})`),r})),h=i((()=>{if(n.imageRatio){const{rootWidth:t,rootHeight:o}=e,a=u.value?o/n.imageRatio:t;return Math.max(0,(n.scale*a-t)/2)}return 0})),f=i((()=>{if(n.imageRatio){const{rootWidth:t,rootHeight:o}=e,a=u.value?o:t*n.imageRatio;return Math.max(0,(n.scale*a-o)/2)}return 0})),g=(o,a)=>{var i;if((o=Je(o,+e.minZoom,+e.maxZoom+1))!==n.scale){const r=o/n.scale;if(n.scale=o,a){const e=se(null==(i=l.value)?void 0:i.$el),t={x:.5*e.width,y:.5*e.height},o=n.moveX-(a.x-e.left-t.x)*(r-1),s=n.moveY-(a.y-e.top-t.y)*(r-1);n.moveX=Je(o,-h.value,h.value),n.moveY=Je(s,-f.value,f.value)}else n.moveX=0,n.moveY=d.value?p:0;t("scale",{scale:o,index:e.active})}},y=()=>{g(1)};let x,w,k,S,C,B,T,P,D=!1;const O=t=>{const{touches:o}=t;if(x=o.length,2===x&&e.disableZoom)return;const{offsetX:l}=a;a.start(t),w=n.moveX,k=n.moveY,P=Date.now(),D=!1,n.moving=1===x&&(1!==n.scale||d.value),n.zooming=2===x&&!l.value,n.zooming&&(S=n.scale,C=eu(o))},I=o=>{var l;if(x>1)return;const{offsetX:i,offsetY:r}=a,s=Date.now()-P;if(i.value<kt&&r.value<kt)if(s<250)if(e.doubleScale)if(T)clearTimeout(T),T=null,(()=>{const e=n.scale>1?1:2;g(e,2===e||d.value?{x:a.startX.value,y:a.startY.value}:void 0)})();else{if(!e.closeOnClickOverlay&&o.target===(null==(l=c.value)?void 0:l.$el))return;T=setTimeout((()=>{t("close"),T=null}),250)}else t("close");else s>500&&t("longPress")},A=t=>{let o=!1;if((n.moving||n.zooming)&&(o=!0,n.moving&&w===n.moveX&&k===n.moveY&&(o=!1),!t.touches.length)){n.zooming&&(n.moveX=Je(n.moveX,-h.value,h.value),n.moveY=Je(n.moveY,-f.value,f.value),n.zooming=!1),n.moving=!1,w=0,k=0,S=1,n.scale<1&&y();const t=+e.maxZoom;n.scale>t&&g(t,B)}Fe(t,o),I(t),a.reset()},V=()=>{const{rootWidth:t,rootHeight:o}=e,a=o/t,{imageRatio:l}=n;u.value=n.imageRatio>a&&l<2.6,d.value=n.imageRatio>a&&l>=2.6,d.value&&(p=(l*t-o)/2,n.moveY=p,n.initializing=!0,ae((()=>{n.initializing=!1}))),y()},z=e=>{const{naturalWidth:t,naturalHeight:o}=e.target;n.imageRatio=o/t,V()};return m((()=>e.active),y),m((()=>e.show),(e=>{e||y()})),m((()=>[e.rootWidth,e.rootHeight]),V),we("touchmove",(e=>{const{touches:t}=e;if(a.move(e),n.moving){const{deltaX:t,deltaY:o}=a,l=t.value+w,i=o.value+k;if((l>h.value||l<-h.value)&&!D&&a.isHorizontal())return void(n.moving=!1);D=!0,Fe(e,!0),n.moveX=Je(l,-h.value,h.value),n.moveY=Je(i,-f.value,f.value)}if(n.zooming&&(Fe(e,!0),2===t.length)){const e=eu(t),o=S*e/C;B=(e=>({x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}))(t),g(o,B)}}),{target:i((()=>{var e;return null==(e=c.value)?void 0:e.$el}))}),()=>{const t={loading:()=>b(uo,{type:"spinner"},null)};return b(oa,{ref:c,class:tu("swipe-item"),onTouchstartPassive:O,onTouchend:A,onTouchcancel:A},{default:()=>[o.image?b("div",{class:tu("image-wrap")},[o.image({src:e.src})]):b(or,{ref:l,src:e.src,fit:"contain",class:tu("image",{vertical:u.value}),style:v.value,onLoad:z},t)]})}}});const[nu,au]=dt("image-preview"),lu=["show","teleport","transition","overlayStyle","closeOnPopstate"],iu=e("imagePreviewProps",{show:Boolean,loop:_,images:Q(),minZoom:te(1/3),maxZoom:te(3),overlay:_,closeable:Boolean,showIndex:_,className:Z,closeIcon:oe("clear"),transition:String,beforeClose:Function,doubleScale:_,overlayClass:Z,overlayStyle:Object,swipeDuration:te(300),startPosition:te(0),showIndicators:Boolean,closeOnPopstate:_,closeOnClickOverlay:_,closeIconPosition:oe("top-right"),teleport:[String,Object]});var ru=y({name:nu,props:iu,emits:["scale","close","closed","change","longPress","update:show"],setup(e,{emit:t,slots:o}){const n=r(),a=s({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),l=()=>{if(n.value){const e=se(n.value.$el);a.rootWidth=e.width,a.rootHeight=e.height,n.value.resize()}},i=e=>t("scale",e),c=e=>t("update:show",e),u=()=>{St(e.beforeClose,{args:[a.active],done:()=>c(!1)})},d=e=>{e!==a.active&&(a.active=e,t("change",e))},h=()=>{if(e.showIndex)return b("div",{class:au("index")},[o.index?o.index({index:a.active}):`${a.active+1} / ${e.images.length}`])},f=()=>{if(o.cover)return b("div",{class:au("cover")},[o.cover()])},g=()=>{a.disableZoom=!0},y=()=>{a.disableZoom=!1},x=()=>{if(e.closeable)return b(oo,{role:"button",name:e.closeIcon,class:[au("close-icon",e.closeIconPosition),xt],onClick:u},null)},k=()=>t("closed"),S=(e,t)=>{var o;return null==(o=n.value)?void 0:o.swipeTo(e,t)};return Lt({swipeTo:S}),p(l),m([Ne,je],l),m((()=>e.startPosition),(e=>d(+e))),m((()=>e.show),(o=>{const{images:n,startPosition:i}=e;o?(d(+i),v((()=>{l(),S(+i,{immediate:!0})}))):t("close",{index:a.active,url:n[a.active]})})),()=>b(Uo,w({class:[au(),e.className],overlayClass:[au("overlay"),e.overlayClass],onClosed:k,"onUpdate:show":c},X(e,lu)),{default:()=>[x(),b(Hn,{ref:n,lazyRender:!0,loop:e.loop,class:au("swipe"),duration:e.swipeDuration,initialSwipe:e.startPosition,showIndicators:e.showIndicators,indicatorColor:"white",onChange:d,onDragEnd:y,onDragStart:g},{default:()=>[e.images.map(((n,l)=>b(ou,{src:n,show:e.show,active:a.active,maxZoom:e.maxZoom,minZoom:e.minZoom,rootWidth:a.rootWidth,rootHeight:a.rootHeight,disableZoom:a.disableZoom,doubleScale:e.doubleScale,closeOnClickOverlay:e.closeOnClickOverlay,onScale:i,onClose:u,onLongPress:()=>t("longPress",{index:l})},{image:o.image})))]}),h(),f()]})}});let su;const cu={loop:!0,images:[],maxZoom:3,minZoom:1/3,onScale:void 0,onClose:void 0,onChange:void 0,teleport:"body",className:"",showIndex:!0,closeable:!1,closeIcon:"clear",transition:void 0,beforeClose:void 0,doubleScale:!0,overlayStyle:void 0,overlayClass:void 0,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeOnClickOverlay:!0,closeIconPosition:"top-right"};const uu=e("showImagePreview",((e,t=0)=>{if(M)return su||({instance:su}=al({setup(){const{state:e,toggle:t}=nl(),o=()=>{e.images=[]};return()=>b(ru,w(e,{onClosed:o,"onUpdate:show":t}),null)}})),e=Array.isArray(e)?{images:e,startPosition:t}:e,su.open(L({},cu,e)),su})),du=e("ImagePreview",Ct(ru));const[pu,vu]=dt("index-bar"),hu=e("indexBarProps",{sticky:_,zIndex:K,teleport:[String,Object],highlightColor:String,stickyOffsetTop:ee(0),indexList:{type:Array,default:function(){const e="A".charCodeAt(0);return Array(26).fill("").map(((t,o)=>String.fromCharCode(e+o)))}}}),mu=Symbol(pu);var fu=y({name:pu,props:hu,emits:["select","change"],setup(e,{emit:t,slots:o}){const n=r(),a=r(),l=r(""),s=Oo(),c=De(n),{children:u,linkChildren:d}=pe(mu);let h;d({props:e});const f=i((()=>{if(F(e.zIndex))return{zIndex:+e.zIndex+1}})),g=i((()=>{if(e.highlightColor)return{color:e.highlightColor}})),y=(t,o)=>{for(let n=u.length-1;n>=0;n--){const a=n>0?o[n-1].height:0;if(t+(e.sticky?a+e.stickyOffsetTop:0)>=o[n].top)return n}return-1},x=e=>u.find((t=>String(t.index)===e)),w=()=>{if(He(n))return;const{sticky:t,indexList:o}=e,a=Ae(c.value),i=se(c),r=u.map((e=>e.getRect(c.value,i)));let s=-1;if(h){const e=x(h);if(e){const t=e.getRect(c.value,i);s=y(t.top,r)}}else s=y(a,r);l.value=o[s],t&&u.forEach(((t,o)=>{const{state:n,$el:l}=t;if(o===s||o===s-1){const e=l.getBoundingClientRect();n.left=e.left,n.width=e.width}else n.left=null,n.width=null;if(o===s)n.active=!0,n.top=Math.max(e.stickyOffsetTop,r[o].top-a)+i.top;else if(o===s-1&&""===h){const e=r[s].top-a;n.active=e>0,n.top=e+i.top-r[o].height}else n.active=!1})),h=""},k=()=>{v(w)};we("scroll",w,{target:c,passive:!0}),p(k),m((()=>e.indexList),k),m(l,(e=>{e&&t("change",e)}));const S=o=>{h=String(o);const n=x(h);if(n){const o=Ae(c.value),a=se(c),{offsetHeight:l}=document.documentElement;if(n.$el.scrollIntoView(),o===l-a.height)return void w();e.sticky&&e.stickyOffsetTop&&Ee(ze()-e.stickyOffsetTop),t("select",n.index)}},C=e=>{const{index:t}=e.dataset;t&&S(t)},T=e=>{C(e.target)};let P;const D=()=>b("div",{ref:a,class:vu("sidebar"),style:f.value,onClick:T,onTouchstartPassive:s.start},[e.indexList.map((e=>{const t=e===l.value;return b("span",{class:vu("index",{active:t}),style:t?g.value:void 0,"data-index":e},[e])}))]);return Lt({scrollTo:S}),we("touchmove",(e=>{if(s.move(e),s.isVertical()){Fe(e);const{clientX:t,clientY:o}=e.touches[0],n=document.elementFromPoint(t,o);if(n){const{index:e}=n.dataset;e&&P!==e&&(P=e,C(n))}}}),{target:a}),()=>{var t;return b("div",{ref:n,class:vu()},[e.teleport?b(B,{to:e.teleport},{default:()=>[D()]}):D(),null==(t=o.default)?void 0:t.call(o)])}}});const[gu,bu]=dt("index-anchor"),yu=e("indexAnchorProps",{index:K});var xu=y({name:gu,props:yu,setup(e,{slots:t}){const o=s({top:0,left:null,rect:{top:0,height:0},width:null,active:!1}),n=r(),{parent:a}=ce(mu);if(!a)return;const l=()=>o.active&&a.props.sticky,c=i((()=>{const{zIndex:e,highlightColor:t}=a.props;if(l())return L(Ye(e),{left:o.left?`${o.left}px`:void 0,width:o.width?`${o.width}px`:void 0,transform:o.top?`translate3d(0, ${o.top}px, 0)`:void 0,color:t})}));return Lt({state:o,getRect:(e,t)=>{const a=se(n);return o.rect.height=a.height,e===window||e===document.body?o.rect.top=a.top+ze():o.rect.top=a.top+Ae(e)-t.top,o.rect}}),()=>{const a=l();return b("div",{ref:n,style:{height:a?`${o.rect.height}px`:void 0}},[b("div",{style:c.value,class:[bu({sticky:a}),{[ft]:a}]},[t.default?t.default():e.index])])}}});const wu=e("IndexAnchor",Ct(xu)),ku=e("IndexBar",Ct(fu)),[Su,Cu,Bu]=dt("list"),Tu=e("listProps",{error:Boolean,offset:te(300),loading:Boolean,disabled:Boolean,finished:Boolean,scroller:Object,errorText:String,direction:oe("down"),loadingText:String,finishedText:String,immediateCheck:_});var Pu=y({name:Su,props:Tu,emits:["load","update:error","update:loading"],setup(e,{emit:t,slots:o}){const a=r(e.loading),l=r(),s=r(),c=n(Zn,null),u=De(l),d=i((()=>e.scroller||u.value)),h=()=>{v((()=>{if(a.value||e.finished||e.disabled||e.error||!1===(null==c?void 0:c.value))return;const{direction:o}=e,n=+e.offset,i=se(d);if(!i.height||He(l))return;let r=!1;const u=se(s);r="up"===o?i.top-u.top<=n:u.bottom-i.bottom<=n,r&&(a.value=!0,t("update:loading",!0),t("load"))}))},f=()=>{if(e.finished){const t=o.finished?o.finished():e.finishedText;if(t)return b("div",{class:Cu("finished-text")},[t])}},g=()=>{t("update:error",!1),h()},y=()=>{if(e.error){const t=o.error?o.error():e.errorText;if(t)return b("div",{role:"button",class:Cu("error-text"),tabindex:0,onClick:g},[t])}},x=()=>{if(a.value&&!e.finished&&!e.disabled)return b("div",{class:Cu("loading")},[o.loading?o.loading():b(uo,{class:Cu("loading-icon")},{default:()=>[e.loadingText||Bu("loading")]})])};return m((()=>[e.loading,e.finished,e.error]),h),c&&m(c,(e=>{e&&h()})),V((()=>{a.value=e.loading})),p((()=>{e.immediateCheck&&h()})),Lt({check:h}),we("scroll",h,{target:d,passive:!0}),()=>{var t;const n=null==(t=o.default)?void 0:t.call(o),i=b("div",{ref:s,class:Cu("placeholder")},null);return b("div",{ref:l,role:"feed",class:Cu(),"aria-busy":a.value},["down"===e.direction?n:i,x(),f(),y(),"up"===e.direction?n:i])}}});const Du=e("List",Ct(Pu)),[Ou,Iu]=dt("nav-bar"),Au=e("navBarProps",{title:String,fixed:Boolean,zIndex:K,border:_,leftText:String,rightText:String,leftDisabled:Boolean,rightDisabled:Boolean,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:_});var Vu=y({name:Ou,props:Au,emits:["clickLeft","clickRight"],setup(e,{emit:t,slots:o}){const n=r(),a=Ot(n,Iu),l=o=>{e.leftDisabled||t("clickLeft",o)},i=o=>{e.rightDisabled||t("clickRight",o)},s=()=>{const{title:t,fixed:a,border:r,zIndex:s}=e,c=Ye(s),u=e.leftArrow||e.leftText||o.left,d=e.rightText||o.right;return b("div",{ref:n,style:c,class:[Iu({fixed:a}),{[ft]:r,"van-safe-area-top":e.safeAreaInsetTop}]},[b("div",{class:Iu("content")},[u&&b("div",{class:[Iu("left",{disabled:e.leftDisabled}),e.clickable&&!e.leftDisabled?xt:""],onClick:l},[o.left?o.left():[e.leftArrow&&b(oo,{class:Iu("arrow"),name:"arrow-left"},null),e.leftText&&b("span",{class:Iu("text")},[e.leftText])]]),b("div",{class:[Iu("title"),"van-ellipsis"]},[o.title?o.title():t]),d&&b("div",{class:[Iu("right",{disabled:e.rightDisabled}),e.clickable&&!e.rightDisabled?xt:""],onClick:i},[o.right?o.right():b("span",{class:Iu("text")},[e.rightText])])])])};return()=>e.fixed&&e.placeholder?a(s):s()}});const zu=e("NavBar",Ct(Vu)),[Eu,$u]=dt("notice-bar"),Lu=e("noticeBarProps",{text:String,mode:String,color:String,delay:te(1),speed:te(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}});var Mu=y({name:Eu,props:Lu,emits:["close","replay"],setup(e,{emit:t,slots:o}){let n,a=0,l=0;const i=r(),c=r(),u=s({show:!0,offset:0,duration:0}),d=o=>{"closeable"===e.mode&&(u.show=!1,t("close",o))},p=()=>{if(o["right-icon"])return o["right-icon"]();const t="closeable"===e.mode?"cross":"link"===e.mode?"arrow":void 0;return t?b(oo,{name:t,class:$u("right-icon"),onClick:d},null):void 0},v=()=>{u.offset=a,u.duration=0,ae((()=>{ie((()=>{u.offset=-l,u.duration=(l+a)/+e.speed,t("replay")}))}))},h=()=>{const t=!1===e.scrollable&&!e.wrapable,n={transform:u.offset?`translateX(${u.offset}px)`:"",transitionDuration:`${u.duration}s`};return b("div",{ref:i,role:"marquee",class:$u("wrap")},[b("div",{ref:c,style:n,class:[$u("content"),{"van-ellipsis":t}],onTransitionend:v},[o.default?o.default():e.text])])},f=()=>{const{delay:t,speed:o,scrollable:r}=e,s=F(t)?1e3*+t:0;a=0,l=0,u.offset=0,u.duration=0,clearTimeout(n),n=setTimeout((()=>{if(!i.value||!c.value||!1===r)return;const e=se(i).width,t=se(c).width;(r||t>e)&&ie((()=>{a=e,l=t,u.offset=-l,u.duration=l/+o}))}),s)};return Pt(f),xe(f),we("pageshow",f),Lt({reset:f}),m((()=>[e.text,e.scrollable]),f),()=>{const{color:t,wrapable:n,background:a}=e;return S(b("div",{role:"alert",class:$u({wrapable:n}),style:{color:t,background:a}},[o["left-icon"]?o["left-icon"]():e.leftIcon?b(oo,{class:$u("left-icon"),name:e.leftIcon},null):void 0,h(),p()]),[[C,u.show]])}}});const Ru=e("NoticeBar",Ct(Mu)),[Fu,Hu]=dt("notify"),Nu=e("notifyProps",L({},Po,{type:oe("danger"),color:String,message:K,position:oe("top"),className:Z,background:String,lockScroll:Boolean}));var ju=y({name:Fu,props:Nu,emits:["update:show"],setup(e,{emit:t,slots:o}){const n=e=>t("update:show",e);return()=>b(Uo,{show:e.show,class:[Hu([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,zIndex:e.zIndex,position:e.position,duration:.2,lockScroll:e.lockScroll,"onUpdate:show":n},{default:()=>[o.default?o.default():e.message]})}});let Wu,Uu;const Yu=e=>R(e)?e:{message:e};let Xu={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0};const qu=e("closeNotify",(()=>{Uu&&Uu.toggle(!1)}));e("setNotifyDefaultOptions",(e=>L(Xu,e))),e("resetNotifyDefaultOptions",(()=>{Xu={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0}}));const Gu=e("Notify",Ct(ju)),[Zu,Ku]=dt("key"),_u=b("svg",{class:Ku("collapse-icon"),viewBox:"0 0 30 24"},[b("path",{d:"M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z",fill:"currentColor"},null)]),Ju=b("svg",{class:Ku("delete-icon"),viewBox:"0 0 32 22"},[b("path",{d:"M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z",fill:"currentColor"},null)]);var Qu=y({name:Zu,props:{type:String,text:K,color:String,wider:Boolean,large:Boolean,loading:Boolean},emits:["press"],setup(e,{emit:t,slots:o}){const n=r(!1),a=Oo(),l=e=>{a.start(e),n.value=!0},i=e=>{a.move(e),a.direction.value&&(n.value=!1)},s=a=>{n.value&&(o.default||Fe(a),n.value=!1,t("press",e.text,e.type))},c=()=>{if(e.loading)return b(uo,{class:Ku("loading-icon")},null);const t=o.default?o.default():e.text;switch(e.type){case"delete":return t||Ju;case"extra":return t||_u;default:return t}};return()=>b("div",{class:Ku("wrapper",{wider:e.wider}),onTouchstartPassive:l,onTouchmovePassive:i,onTouchend:s,onTouchcancel:s},[b("div",{role:"button",tabindex:0,class:Ku([e.color,{large:e.large,active:n.value,delete:"delete"===e.type}])},[c()])])}});const[ed,td]=dt("number-keyboard"),od=e("numberKeyboardProps",{show:Boolean,title:String,theme:oe("default"),zIndex:K,teleport:[String,Object],maxlength:te(1/0),modelValue:oe(""),transition:_,blurOnClose:_,showDeleteKey:_,randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,hideOnClickOutside:_,safeAreaInsetBottom:_,extraKey:{type:[String,Array],default:""}});var nd=y({name:ed,inheritAttrs:!1,props:od,emits:["show","hide","blur","input","close","delete","update:modelValue"],setup(e,{emit:t,slots:o,attrs:n}){const a=r(),l=()=>{const t=Array(9).fill("").map(((e,t)=>({text:t+1})));return e.randomKeyOrder&&function(e){for(let t=e.length-1;t>0;t--){const o=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[o],e[o]=n}}(t),t},s=i((()=>"custom"===e.theme?(()=>{const t=l(),{extraKey:o}=e,n=Array.isArray(o)?o:[o];return 1===n.length?t.push({text:0,wider:!0},{text:n[0],type:"extra"}):2===n.length&&t.push({text:n[0],type:"extra"},{text:0},{text:n[1],type:"extra"}),t})():[...l(),{text:e.extraKey,type:"extra"},{text:0},{text:e.showDeleteKey?e.deleteButtonText:"",type:e.showDeleteKey?"delete":""}])),c=()=>{e.show&&t("blur")},u=()=>{t("close"),e.blurOnClose&&c()},d=()=>t(e.show?"show":"hide"),p=(o,n)=>{if(""===o)return void("extra"===n&&c());const a=e.modelValue;"delete"===n?(t("delete"),t("update:modelValue",a.slice(0,a.length-1))):"close"===n?u():a.length<+e.maxlength&&(t("input",o),t("update:modelValue",a+o))},v=()=>{if("custom"===e.theme)return b("div",{class:td("sidebar")},[e.showDeleteKey&&b(Qu,{large:!0,text:e.deleteButtonText,type:"delete",onPress:p},{delete:o.delete}),b(Qu,{large:!0,text:e.closeButtonText,type:"close",color:"blue",loading:e.closeButtonLoading,onPress:p},null)])};return m((()=>e.show),(o=>{e.transition||t(o?"show":"hide")})),e.hideOnClickOutside&&ke(a,c,{eventName:"touchstart"}),()=>{const t=(()=>{const{title:t,theme:n,closeButtonText:a}=e,l=o["title-left"],i=a&&"default"===n;if(t||i||l)return b("div",{class:td("header")},[l&&b("span",{class:td("title-left")},[l()]),t&&b("h2",{class:td("title")},[t]),i&&b("button",{type:"button",class:[td("close"),xt],onClick:u},[a])])})(),l=b(k,{name:e.transition?"van-slide-up":""},{default:()=>[S(b("div",w({ref:a,style:Ye(e.zIndex),class:td({unfit:!e.safeAreaInsetBottom,"with-title":!!t}),onAnimationend:d,onTouchstartPassive:Re},n),[t,b("div",{class:td("body")},[b("div",{class:td("keys")},[s.value.map((e=>{const t={};return"delete"===e.type&&(t.default=o.delete),"extra"===e.type&&(t.default=o["extra-key"]),b(Qu,{key:e.text,text:e.text,type:e.type,wider:e.wider,color:e.color,onPress:p},t)}))]),v()])]),[[C,e.show]])]});return e.teleport?b(B,{to:e.teleport},{default:()=>[l]}):l}}});const ad=e("NumberKeyboard",Ct(nd)),[ld,id,rd]=dt("pagination"),sd=(e,t,o)=>({number:e,text:t,active:o}),cd=e("paginationProps",{mode:oe("multi"),prevText:String,nextText:String,pageCount:te(0),modelValue:ee(0),totalItems:te(0),showPageSize:te(5),itemsPerPage:te(10),forceEllipses:Boolean,showPrevButton:_,showNextButton:_});var ud=y({name:ld,props:cd,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const n=i((()=>{const{pageCount:t,totalItems:o,itemsPerPage:n}=e,a=+t||Math.ceil(+o/+n);return Math.max(1,a)})),a=i((()=>{const t=[],o=n.value,a=+e.showPageSize,{modelValue:l,forceEllipses:i}=e;let r=1,s=o;const c=a<o;c&&(r=Math.max(l-Math.floor(a/2),1),s=r+a-1,s>o&&(s=o,r=s-a+1));for(let e=r;e<=s;e++){const o=sd(e,e,e===l);t.push(o)}if(c&&a>0&&i){if(r>1){const e=sd(r-1,"...");t.unshift(e)}if(s<o){const e=sd(s+1,"...");t.push(e)}}return t})),l=(o,a)=>{o=Je(o,1,n.value),e.modelValue!==o&&(t("update:modelValue",o),a&&t("change",o))};x((()=>l(e.modelValue)));const r=()=>{const{mode:t,modelValue:n,showPrevButton:a}=e;if(!a)return;const i=o["prev-text"],r=1===n;return b("li",{class:[id("item",{disabled:r,border:"simple"===t,prev:!0}),gt]},[b("button",{type:"button",disabled:r,onClick:()=>l(n-1,!0)},[i?i():e.prevText||rd("prev")])])},s=()=>{const{mode:t,modelValue:a,showNextButton:i}=e;if(!i)return;const r=o["next-text"],s=a===n.value;return b("li",{class:[id("item",{disabled:s,border:"simple"===t,next:!0}),gt]},[b("button",{type:"button",disabled:s,onClick:()=>l(a+1,!0)},[r?r():e.nextText||rd("next")])])};return()=>b("nav",{role:"navigation",class:id()},[b("ul",{class:id("items")},[r(),"simple"===e.mode?b("li",{class:id("page-desc")},[o.pageDesc?o.pageDesc():`${e.modelValue}/${n.value}`]):a.value.map((e=>b("li",{class:[id("item",{active:e.active,page:!0}),gt]},[b("button",{type:"button","aria-current":e.active||void 0,onClick:()=>l(e.number,!0)},[o.page?o.page(e):e.text])]))),s()])])}});const dd=e("Pagination",Ct(ud)),[pd,vd]=dt("password-input"),hd=e("passwordInputProps",{info:String,mask:_,value:oe(""),gutter:K,length:te(6),focused:Boolean,errorInfo:String});var md=y({name:pd,props:hd,emits:["focus"],setup(e,{emit:t}){const o=e=>{e.stopPropagation(),t("focus",e)},n=()=>{const t=[],{mask:o,value:n,gutter:a,focused:l}=e,i=+e.length;for(let e=0;e<i;e++){const i=n[e],r=0!==e&&!a,s=l&&e===n.length;let c;0!==e&&a&&(c={marginLeft:We(a)}),t.push(b("li",{class:[{[ht]:r},vd("item",{focus:s})],style:c},[o?b("i",{style:{visibility:i?"visible":"hidden"}},null):i,s&&b("div",{class:vd("cursor")},null)]))}return t};return()=>{const t=e.errorInfo||e.info;return b("div",{class:vd()},[b("ul",{class:[vd("security"),{[gt]:!e.gutter}],onTouchstartPassive:o},[n()]),t&&b("div",{class:vd(e.errorInfo?"error-info":"info")},[t])])}}});const fd=e("PasswordInput",Ct(md)),gd=e("PickerGroup",Ct(va));function bd(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yd(e){return e instanceof bd(e).Element||e instanceof Element}function xd(e){return e instanceof bd(e).HTMLElement||e instanceof HTMLElement}function wd(e){return"undefined"!=typeof ShadowRoot&&(e instanceof bd(e).ShadowRoot||e instanceof ShadowRoot)}var kd=Math.round;function Sd(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Cd(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var n=e.getBoundingClientRect(),a=1,l=1;t&&xd(e)&&(a=e.offsetWidth>0&&kd(n.width)/e.offsetWidth||1,l=e.offsetHeight>0&&kd(n.height)/e.offsetHeight||1);var i=(yd(e)?bd(e):window).visualViewport,r=!!/^((?!chrome|android).)*safari/i.test(Sd())&&o,s=(n.left+(r&&i?i.offsetLeft:0))/a,c=(n.top+(r&&i?i.offsetTop:0))/l,u=n.width/a,d=n.height/l;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function Bd(e){var t=bd(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Td(e){return e?(e.nodeName||"").toLowerCase():null}function Pd(e){return((yd(e)?e.ownerDocument:e.document)||window.document).documentElement}function Dd(e){return bd(e).getComputedStyle(e)}function Od(e){var t=Dd(e),o=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+a+n)}function Id(e,t,o){void 0===o&&(o=!1);var n,a,l=xd(t),i=xd(t)&&function(e){var t=e.getBoundingClientRect(),o=kd(t.width)/e.offsetWidth||1,n=kd(t.height)/e.offsetHeight||1;return 1!==o||1!==n}(t),r=Pd(t),s=Cd(e,i,o),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(l||!l&&!o)&&(("body"!==Td(t)||Od(r))&&(c=(n=t)!==bd(n)&&xd(n)?{scrollLeft:(a=n).scrollLeft,scrollTop:a.scrollTop}:Bd(n)),xd(t)?((u=Cd(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):r&&(u.x=function(e){return Cd(Pd(e)).left+Bd(e).scrollLeft}(r))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function Ad(e){return"html"===Td(e)?e:e.assignedSlot||e.parentNode||(wd(e)?e.host:null)||Pd(e)}function Vd(e){return["html","body","#document"].indexOf(Td(e))>=0?e.ownerDocument.body:xd(e)&&Od(e)?e:Vd(Ad(e))}function zd(e,t){var o;void 0===t&&(t=[]);var n=Vd(e),a=n===(null==(o=e.ownerDocument)?void 0:o.body),l=bd(n),i=a?[l].concat(l.visualViewport||[],Od(n)?n:[]):n,r=t.concat(i);return a?r:r.concat(zd(Ad(i)))}function Ed(e){return["table","td","th"].indexOf(Td(e))>=0}function $d(e){return xd(e)&&"fixed"!==Dd(e).position?e.offsetParent:null}function Ld(e){for(var t=bd(e),o=$d(e);o&&Ed(o)&&"static"===Dd(o).position;)o=$d(o);return o&&("html"===Td(o)||"body"===Td(o)&&"static"===Dd(o).position)?t:o||function(e){var t=/firefox/i.test(Sd());if(/Trident/i.test(Sd())&&xd(e)&&"fixed"===Dd(e).position)return null;var o=Ad(e);for(wd(o)&&(o=o.host);xd(o)&&["html","body"].indexOf(Td(o))<0;){var n=Dd(o);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return o;o=o.parentNode}return null}(e)||t}var Md="top",Rd="bottom",Fd="right",Hd="left",Nd="start",jd="end",Wd=[].concat([Md,Rd,Fd,Hd],["auto"]).reduce((function(e,t){return e.concat([t,t+"-"+Nd,t+"-"+jd])}),[]),Ud=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Yd(e){var t=new Map,o=new Set,n=[];function a(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!o.has(e)){var n=t.get(e);n&&a(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||a(e)})),n}function Xd(e){return e.split("-")[0]}function qd(e){return e.split("-")[1]}var Gd={placement:"bottom",modifiers:[],strategy:"absolute"};function Zd(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Kd(e){void 0===e&&(e={});var t=e,o=t.defaultModifiers,n=void 0===o?[]:o,a=t.defaultOptions,l=void 0===a?Gd:a;return function(e,t,o){void 0===o&&(o=l);var a,i,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Gd,l),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:r,setOptions:function(o){var a="function"==typeof o?o(r.options):o;d(),r.options=Object.assign({},l,r.options,a),r.scrollParents={reference:yd(e)?zd(e):e.contextElement?zd(e.contextElement):[],popper:zd(t)};var i,c,p=function(e){var t=Yd(e);return Ud.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}((i=[].concat(n,r.options.modifiers),c=i.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return r.orderedModifiers=p.filter((function(e){return e.enabled})),r.orderedModifiers.forEach((function(e){var t=e.name,o=e.options,n=void 0===o?{}:o,a=e.effect;if("function"==typeof a){var l=a({state:r,name:t,instance:u,options:n}),i=function(){};s.push(l||i)}})),u.update()},forceUpdate:function(){if(!c){var e=r.elements,t=e.reference,o=e.popper;if(Zd(t,o)){var n,a,l,i;r.rects={reference:Id(t,Ld(o),"fixed"===r.options.strategy),popper:(n=o,a=Cd(n),l=n.offsetWidth,i=n.offsetHeight,Math.abs(a.width-l)<=1&&(l=a.width),Math.abs(a.height-i)<=1&&(i=a.height),{x:n.offsetLeft,y:n.offsetTop,width:l,height:i})},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(e){return r.modifiersData[e.name]=Object.assign({},e.data)}));for(var s=0;s<r.orderedModifiers.length;s++)if(!0!==r.reset){var d=r.orderedModifiers[s],p=d.fn,v=d.options,h=void 0===v?{}:v,m=d.name;"function"==typeof p&&(r=p({state:r,options:h,name:m,instance:u})||r)}else r.reset=!1,s=-1}}},update:(a=function(){return new Promise((function(e){u.forceUpdate(),e(r)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(a())}))}))),i}),destroy:function(){d(),c=!0}};if(!Zd(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(o).then((function(e){!c&&o.onFirstUpdate&&o.onFirstUpdate(e)})),u}}var _d={passive:!0};var Jd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qd(e){var t,o=e.popper,n=e.popperRect,a=e.placement,l=e.variation,i=e.offsets,r=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=i.x,v=void 0===p?0:p,h=i.y,m=void 0===h?0:h,f="function"==typeof u?u({x:v,y:m}):{x:v,y:m};v=f.x,m=f.y;var g=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),y=Hd,x=Md,w=window;if(c){var k=Ld(o),S="clientHeight",C="clientWidth";if(k===bd(o)&&"static"!==Dd(k=Pd(o)).position&&"absolute"===r&&(S="scrollHeight",C="scrollWidth"),a===Md||(a===Hd||a===Fd)&&l===jd)x=Rd,m-=(d&&k===w&&w.visualViewport?w.visualViewport.height:k[S])-n.height,m*=s?1:-1;if(a===Hd||(a===Md||a===Rd)&&l===jd)y=Fd,v-=(d&&k===w&&w.visualViewport?w.visualViewport.width:k[C])-n.width,v*=s?1:-1}var B,T=Object.assign({position:r},c&&Jd),P=!0===u?function(e,t){var o=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:kd(o*a)/a||0,y:kd(n*a)/a||0}}({x:v,y:m},bd(o)):{x:v,y:m};return v=P.x,m=P.y,s?Object.assign({},T,((B={})[x]=b?"0":"",B[y]=g?"0":"",B.transform=(w.devicePixelRatio||1)<=1?"translate("+v+"px, "+m+"px)":"translate3d("+v+"px, "+m+"px, 0)",B)):Object.assign({},T,((t={})[x]=b?m+"px":"",t[y]=g?v+"px":"",t.transform="",t))}var ep=Kd({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,n=e.options,a=n.scroll,l=void 0===a||a,i=n.resize,r=void 0===i||i,s=bd(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&c.forEach((function(e){e.addEventListener("scroll",o.update,_d)})),r&&s.addEventListener("resize",o.update,_d),function(){l&&c.forEach((function(e){e.removeEventListener("scroll",o.update,_d)})),r&&s.removeEventListener("resize",o.update,_d)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=function(e){var t,o=e.reference,n=e.element,a=e.placement,l=a?Xd(a):null,i=a?qd(a):null,r=o.x+o.width/2-n.width/2,s=o.y+o.height/2-n.height/2;switch(l){case Md:t={x:r,y:o.y-n.height};break;case Rd:t={x:r,y:o.y+o.height};break;case Fd:t={x:o.x+o.width,y:s};break;case Hd:t={x:o.x-n.width,y:s};break;default:t={x:o.x,y:o.y}}var c=l?function(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}(l):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case Nd:t[c]=t[c]-(o[u]/2-n[u]/2);break;case jd:t[c]=t[c]+(o[u]/2-n[u]/2)}}return t}({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,n=o.gpuAcceleration,a=void 0===n||n,l=o.adaptive,i=void 0===l||l,r=o.roundOffsets,s=void 0===r||r,c={placement:Xd(t.placement),variation:qd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Qd(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Qd(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var o=t.styles[e]||{},n=t.attributes[e]||{},a=t.elements[e];xd(a)&&Td(a)&&(Object.assign(a.style,o),Object.keys(n).forEach((function(e){var t=n[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],a=t.attributes[e]||{},l=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{});xd(n)&&Td(n)&&(Object.assign(n.style,l),Object.keys(a).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});var tp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,n=e.name,a=o.offset,l=void 0===a?[0,0]:a,i=Wd.reduce((function(e,o){return e[o]=function(e,t,o){var n=Xd(e),a=[Hd,Md].indexOf(n)>=0?-1:1,l="function"==typeof o?o(Object.assign({},t,{placement:e})):o,i=l[0],r=l[1];return i=i||0,r=(r||0)*a,[Hd,Fd].indexOf(n)>=0?{x:r,y:i}:{x:i,y:r}}(o,t.rects,l),e}),{}),r=i[t.placement],s=r.x,c=r.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};const[op,np]=dt("popover"),ap=["overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],lp=e("popoverProps",{show:Boolean,theme:oe("light"),overlay:Boolean,actions:Q(),actionsDirection:oe("vertical"),trigger:oe("click"),duration:K,showArrow:_,placement:oe("bottom"),iconPrefix:String,overlayClass:Z,overlayStyle:Object,closeOnClickAction:_,closeOnClickOverlay:_,closeOnClickOutside:_,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"}});var ip=y({name:op,props:lp,emits:["select","touchstart","update:show"],setup(e,{emit:t,slots:o,attrs:n}){let a;const l=r(),i=r(),s=r(),u=hn((()=>e.show),(e=>t("update:show",e))),d=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},L({},tp,{options:{offset:e.offset}})]}),h=()=>{v((()=>{u.value&&(a?a.setOptions(d()):(a=i.value&&s.value?ep(i.value,s.value.popupRef.value,d()):null,M&&(window.addEventListener("animationend",h),window.addEventListener("transitionend",h))))}))},f=e=>{u.value=e},g=()=>{"click"===e.trigger&&(u.value=!u.value)},y=(t,n)=>o.action?o.action({action:t,index:n}):[t.icon&&b(oo,{name:t.icon,classPrefix:e.iconPrefix,class:np("action-icon")},null),b("div",{class:[np("action-text"),{[ft]:"vertical"===e.actionsDirection}]},[t.text])],k=(o,n)=>{const{icon:a,color:l,disabled:i,className:r}=o;return b("div",{role:"menuitem",class:[np("action",{disabled:i,"with-icon":a}),{[mt]:"horizontal"===e.actionsDirection},r],style:{color:l},tabindex:i?void 0:0,"aria-disabled":i||void 0,onClick:()=>((o,n)=>{o.disabled||(t("select",o,n),e.closeOnClickAction&&(u.value=!1))})(o,n)},[y(o,n)])};return p((()=>{h(),x((()=>{var e;l.value=null==(e=s.value)?void 0:e.popupRef.value}))})),c((()=>{a&&(M&&(window.removeEventListener("animationend",h),window.removeEventListener("transitionend",h)),a.destroy(),a=null)})),m((()=>[u.value,e.offset,e.placement]),h),ke([i,l],(()=>{u.value&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&(u.value=!1)}),{eventName:"touchstart"}),()=>{var t;return b(T,null,[b("span",{ref:i,class:np("wrapper"),onClick:g},[null==(t=o.reference)?void 0:t.call(o)]),b(Uo,w({ref:s,show:u.value,class:np([e.theme]),position:"",transition:"van-popover-zoom",lockScroll:!1,"onUpdate:show":f},n,Eo(),X(e,ap)),{default:()=>[e.showArrow&&b("div",{class:np("arrow")},null),b("div",{role:"menu",class:np("content",e.actionsDirection)},[o.default?o.default():e.actions.map(k)])]})])}}});const rp=e("Popover",Ct(ip)),[sp,cp]=dt("progress"),up=e("progressProps",{color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:_,pivotColor:String,trackColor:String,strokeWidth:K,percentage:{type:K,default:0,validator:e=>+e>=0&&+e<=100}});var dp=y({name:sp,props:up,setup(e){const t=i((()=>e.inactive?void 0:e.color)),o=()=>{const{textColor:o,pivotText:n,pivotColor:a,percentage:l}=e,i=null!=n?n:`${l}%`;if(e.showPivot&&i){const n={color:o,left:+l+"%",transform:`translate(-${+l}%,-50%)`,background:a||t.value};return b("span",{style:n,class:cp("pivot",{inactive:e.inactive})},[i])}};return()=>{const{trackColor:n,percentage:a,strokeWidth:l}=e,i={background:n,height:We(l)},r={width:`${a}%`,background:t.value};return b("div",{class:cp(),style:i},[b("span",{class:cp("portion",{inactive:e.inactive}),style:r},null),o()])}}});const pp=e("Progress",Ct(dp)),[vp,hp,mp]=dt("pull-refresh"),fp=["pulling","loosing","success"],gp=e("pullRefreshProps",{disabled:Boolean,modelValue:Boolean,headHeight:te(50),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:K,successDuration:te(500),animationDuration:te(300)});var bp=y({name:vp,props:gp,emits:["change","refresh","update:modelValue"],setup(e,{emit:t,slots:o}){let n;const a=r(),l=r(),i=De(a),c=s({status:"normal",distance:0,duration:0}),u=Oo(),d=()=>{if(50!==e.headHeight)return{height:`${e.headHeight}px`}},p=()=>"loading"!==c.status&&"success"!==c.status&&!e.disabled,h=(o,n)=>{const a=+(e.pullDistance||e.headHeight);c.distance=o,c.status=n?"loading":0===o?"normal":o<a?"pulling":"loosing",t("change",{status:c.status,distance:o})},f=()=>{const{status:t}=c;return"normal"===t?"":e[`${t}Text`]||mp(t)},g=()=>{const{status:e,distance:t}=c;if(o[e])return o[e]({distance:t});const n=[];return fp.includes(e)&&n.push(b("div",{class:hp("text")},[f()])),"loading"===e&&n.push(b(uo,{class:hp("loading")},{default:f})),n},y=e=>{n=0===Ae(i.value),n&&(c.duration=0,u.start(e))},x=e=>{p()&&y(e)},w=()=>{n&&u.deltaY.value&&p()&&(c.duration=+e.animationDuration,"loosing"===c.status?(h(+e.headHeight,!0),t("update:modelValue",!0),v((()=>t("refresh")))):h(0))};return m((()=>e.modelValue),(t=>{c.duration=+e.animationDuration,t?h(+e.headHeight,!0):o.success||e.successText?(c.status="success",setTimeout((()=>{h(0)}),+e.successDuration)):h(0,!1)})),we("touchmove",(t=>{if(p()){n||y(t);const{deltaY:o}=u;u.move(t),n&&o.value>=0&&u.isVertical()&&(Fe(t),h((t=>{const o=+(e.pullDistance||e.headHeight);return t>o&&(t=t<2*o?o+(t-o)/2:1.5*o+(t-2*o)/4),Math.round(t)})(o.value)))}}),{target:l}),()=>{var e;const t={transitionDuration:`${c.duration}ms`,transform:c.distance?`translate3d(0,${c.distance}px, 0)`:""};return b("div",{ref:a,class:hp()},[b("div",{ref:l,class:hp("track"),style:t,onTouchstartPassive:x,onTouchend:w,onTouchcancel:w},[b("div",{class:hp("head"),style:d()},[g()]),null==(e=o.default)?void 0:e.call(o)])])}}});const yp=e("PullRefresh",Ct(bp)),[xp,wp]=dt("rate");const kp=e("rateProps",{size:K,icon:oe("star"),color:String,count:te(5),gutter:K,clearable:Boolean,readonly:Boolean,disabled:Boolean,voidIcon:oe("star-o"),allowHalf:Boolean,voidColor:String,touchable:_,iconPrefix:String,modelValue:ee(0),disabledColor:String});var Sp=y({name:xp,props:kp,emits:["change","update:modelValue"],setup(e,{emit:t}){const o=Oo(),[n,a]=Dn(),l=r(),s=i((()=>e.readonly||e.disabled)),c=i((()=>s.value||!e.touchable)),u=i((()=>Array(+e.count).fill("").map(((t,o)=>function(e,t,o,n){if(e>=t)return{status:"full",value:1};if(e+.5>=t&&o&&!n)return{status:"half",value:.5};if(e+1>=t&&o&&n){const o=10**10;return{status:"half",value:Math.round((e-t+1)*o)/o}}return{status:"void",value:0}}(e.modelValue,o+1,e.allowHalf,e.readonly)))));let d,p,v=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER;const m=()=>{p=se(l);const t=n.value.map(se);d=[],t.forEach(((t,o)=>{v=Math.min(t.top,v),h=Math.max(t.top,h),e.allowHalf?d.push({score:o+.5,left:t.left,top:t.top,height:t.height},{score:o+1,left:t.left+t.width/2,top:t.top,height:t.height}):d.push({score:o+1,left:t.left,top:t.top,height:t.height})}))},f=(t,o)=>{for(let e=d.length-1;e>0;e--)if(o>=p.top&&o<=p.bottom){if(t>d[e].left&&o>=d[e].top&&o<=d[e].top+d[e].height)return d[e].score}else{const n=o<p.top?v:h;if(t>d[e].left&&d[e].top===n)return d[e].score}return e.allowHalf?.5:1},g=o=>{s.value||o===e.modelValue||(t("update:modelValue",o),t("change",o))},y=e=>{c.value||(o.start(e),m())},x=(t,n)=>{const{icon:l,size:i,color:r,count:s,gutter:c,voidIcon:u,disabled:d,voidColor:p,allowHalf:v,iconPrefix:h,disabledColor:y}=e,x=n+1,w="full"===t.status,k="void"===t.status,S=v&&t.value>0&&t.value<1;let C;c&&x!==+s&&(C={paddingRight:We(c)});return b("div",{key:n,ref:a(n),role:"radio",style:C,class:wp("item"),tabindex:d?void 0:0,"aria-setsize":s,"aria-posinset":x,"aria-checked":!k,onClick:t=>{m();let n=v?f(t.clientX,t.clientY):x;e.clearable&&o.isTap.value&&n===e.modelValue&&(n=0),g(n)}},[b(oo,{size:i,name:w?l:u,class:wp("icon",{disabled:d,full:w}),color:d?y:w?r:p,classPrefix:h},null),S&&b(oo,{size:i,style:{width:t.value+"em"},name:k?u:l,class:wp("icon",["half",{disabled:d,full:!k}]),color:d?y:k?p:r,classPrefix:h},null)])};return Ie((()=>e.modelValue)),we("touchmove",(e=>{if(!c.value&&(o.move(e),o.isHorizontal()&&!o.isTap.value)){const{clientX:t,clientY:o}=e.touches[0];Fe(e),g(f(t,o))}}),{target:l}),()=>b("div",{ref:l,role:"radiogroup",class:wp({readonly:e.readonly,disabled:e.disabled}),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,"aria-readonly":e.readonly,onTouchstartPassive:y},[u.value.map(x)])}});const Cp=e("Rate",Ct(Sp)),Bp={figureArr:Q(),delay:Number,duration:ee(2),isStart:Boolean,direction:oe("down"),height:ee(40)},[Tp,Pp]=dt("rolling-text-item");var Dp=y({name:Tp,props:Bp,setup(e){const t=i((()=>"down"===e.direction?e.figureArr.slice().reverse():e.figureArr)),o=i((()=>`-${e.height*(e.figureArr.length-1)}px`)),n=i((()=>({lineHeight:We(e.height)}))),a=i((()=>({height:We(e.height),"--van-translate":o.value,"--van-duration":e.duration+"s","--van-delay":e.delay+"s"})));return()=>b("div",{class:Pp([e.direction]),style:a.value},[b("div",{class:Pp("box",{animate:e.isStart})},[Array.isArray(t.value)&&t.value.map((e=>b("div",{class:Pp("item"),style:n.value},[e])))])])}});const[Op,Ip]=dt("rolling-text"),Ap=e("rollingTextProps",{startNum:ee(0),targetNum:Number,textList:Q(),duration:ee(2),autoStart:_,direction:oe("down"),stopOrder:oe("ltr"),height:ee(40)});var Vp=y({name:Op,props:Ap,setup(e){const t=i((()=>Array.isArray(e.textList)&&e.textList.length)),o=i((()=>t.value?e.textList[0].length:`${Math.max(e.startNum,e.targetNum)}`.length)),n=t=>{const o=[];for(let n=0;n<e.textList.length;n++)o.push(e.textList[n][t]);return o},a=i((()=>t.value?new Array(o.value).fill(""):_e(e.targetNum,o.value).split(""))),l=i((()=>_e(e.startNum,o.value).split(""))),s=e=>{const t=+l.value[e],o=+a.value[e],n=[];for(let a=t;a<=9;a++)n.push(a);for(let a=0;a<=2;a++)for(let e=0;e<=9;e++)n.push(e);for(let a=0;a<=o;a++)n.push(a);return n},c=(t,o)=>"ltr"===e.stopOrder?.2*t:.2*(o-1-t),u=r(e.autoStart),d=()=>{u.value=!0};return m((()=>e.autoStart),(e=>{e&&d()})),Lt({start:d,reset:()=>{u.value=!1,e.autoStart&&ae((()=>d()))}}),()=>b("div",{class:Ip()},[a.value.map(((a,l)=>b(Dp,{figureArr:t.value?n(l):s(l),duration:e.duration,direction:e.direction,isStart:u.value,height:e.height,delay:c(l,o.value)},null)))])}});const zp=e("RollingText",Ct(Vp)),Ep=e("Row",Ct(Nr)),[$p,Lp,Mp]=dt("search"),Rp=e("searchProps",L({},qa,{label:String,shape:oe("square"),leftIcon:oe("search"),clearable:_,actionText:String,background:String,showAction:Boolean}));var Fp=y({name:$p,props:Rp,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:o,attrs:n}){const a=Pn(),l=r(),i=()=>{o.action||(t("update:modelValue",""),t("cancel"))},s=o=>{13===o.keyCode&&(Fe(o),t("search",e.modelValue))},c=()=>e.id||`${a}-input`,u=()=>{if(o.label||e.label)return b("label",{class:Lp("label"),for:c()},[o.label?o.label():e.label])},d=()=>{if(e.showAction){const t=e.actionText||Mp("cancel");return b("div",{class:Lp("action"),role:"button",tabindex:0,onClick:i},[o.action?o.action():t])}},p=e=>t("blur",e),v=e=>t("focus",e),h=e=>t("clear",e),m=e=>t("clickInput",e),f=e=>t("clickLeftIcon",e),g=e=>t("clickRightIcon",e),y=Object.keys(qa),x=()=>{const a=L({},n,X(e,y),{id:c()});return b(Ka,w({ref:l,type:"search",class:Lp("field"),border:!1,onBlur:p,onFocus:v,onClear:h,onKeypress:s,onClickInput:m,onClickLeftIcon:f,onClickRightIcon:g,"onUpdate:modelValue":e=>t("update:modelValue",e)},a),X(o,["left-icon","right-icon"]))};return Lt({focus:()=>{var e;return null==(e=l.value)?void 0:e.focus()},blur:()=>{var e;return null==(e=l.value)?void 0:e.blur()}}),()=>{var t;return b("div",{class:Lp({"show-action":e.showAction}),style:{background:e.background}},[null==(t=o.left)?void 0:t.call(o),b("div",{class:Lp("content",e.shape)},[u(),x()]),d()])}}});const Hp=e("Search",Ct(Fp)),Np=[...Do,"round","closeOnPopstate","safeAreaInsetBottom"],jp={qq:"qq",link:"link-o",weibo:"weibo",qrcode:"qr",poster:"photo-o",wechat:"wechat","weapp-qrcode":"miniprogram-o","wechat-moments":"wechat-moments"},[Wp,Up,Yp]=dt("share-sheet"),Xp=e("shareSheetProps",L({},Po,{title:String,round:_,options:Q(),cancelText:String,description:String,closeOnPopstate:_,safeAreaInsetBottom:_}));var qp=y({name:Wp,props:Xp,emits:["cancel","select","update:show"],setup(e,{emit:t,slots:o}){const n=e=>t("update:show",e),a=()=>{n(!1),t("cancel")},l=()=>{const t=o.title?o.title():e.title,n=o.description?o.description():e.description;if(t||n)return b("div",{class:Up("header")},[t&&b("h2",{class:Up("title")},[t]),n&&b("span",{class:Up("description")},[n])])},i=e=>{return(null==(t=e)?void 0:t.includes("/"))?b("img",{src:e,class:Up("image-icon")},null):b("div",{class:Up("icon",[e])},[b(oo,{name:jp[e]||e},null)]);var t},r=(e,o)=>{const{name:n,icon:a,className:l,description:r}=e;return b("div",{role:"button",tabindex:0,class:[Up("option"),l,xt],onClick:()=>((e,o)=>t("select",e,o))(e,o)},[i(a),n&&b("span",{class:Up("name")},[n]),r&&b("span",{class:Up("option-description")},[r])])},s=(e,t)=>b("div",{class:Up("options",{border:t})},[e.map(r)]),c=()=>{const{options:t}=e;return Array.isArray(t[0])?t.map(((e,t)=>s(e,0!==t))):s(t)},u=()=>{var t;const n=null!=(t=e.cancelText)?t:Yp("cancel");if(o.cancel||n)return b("button",{type:"button",class:Up("cancel"),onClick:a},[o.cancel?o.cancel():n])};return()=>b(Uo,w({class:Up(),position:"bottom","onUpdate:show":n},X(e,Np)),{default:()=>[l(),c(),u()]})}});const Gp=e("ShareSheet",Ct(qp)),[Zp,Kp]=dt("sidebar"),_p=Symbol(Zp),Jp=e("sidebarProps",{modelValue:te(0)});var Qp=y({name:Zp,props:Jp,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const{linkChildren:n}=pe(_p),a=()=>+e.modelValue;return n({getActive:a,setActive:e=>{e!==a()&&(t("update:modelValue",e),t("change",e))}}),()=>{var e;return b("div",{role:"tablist",class:Kp()},[null==(e=o.default)?void 0:e.call(o)])}}});const ev=e("Sidebar",Ct(Qp)),[tv,ov]=dt("sidebar-item"),nv=e("sidebarItemProps",L({},Mt,{dot:Boolean,title:String,badge:K,disabled:Boolean,badgeProps:Object}));var av=y({name:tv,props:nv,emits:["click"],setup(e,{emit:t,slots:o}){const n=Ft(),{parent:a,index:l}=ce(_p);if(!a)return;const i=()=>{e.disabled||(t("click",l.value),a.setActive(l.value),n())};return()=>{const{dot:t,badge:n,title:r,disabled:s}=e,c=l.value===a.getActive();return b("div",{role:"tab",class:ov({select:c,disabled:s}),tabindex:s?void 0:0,"aria-selected":c,onClick:i},[b(Ut,w({dot:t,class:ov("text"),content:n},e.badgeProps),{default:()=>[o.title?o.title():r]})])}}});const lv=e("SidebarItem",Ct(av)),[iv,rv,sv]=dt("signature"),cv={tips:String,type:oe("png"),penColor:oe("#000"),lineWidth:ee(3),clearButtonText:String,backgroundColor:oe(""),confirmButtonText:String};var uv=y({name:iv,props:cv,emits:["submit","clear","start","end","signing"],setup(e,{emit:t}){const o=r(),n=r(),a=i((()=>o.value?o.value.getContext("2d"):null)),l=!M||(()=>{var e;const t=document.createElement("canvas");return!!(null==(e=t.getContext)?void 0:e.call(t,"2d"))})();let s,c=0,u=0;const d=()=>{if(!a.value)return!1;a.value.beginPath(),a.value.lineWidth=e.lineWidth,a.value.strokeStyle=e.penColor,s=se(o),t("start")},v=e=>{if(!a.value)return!1;Fe(e);const o=e.touches[0],n=o.clientX-((null==s?void 0:s.left)||0),l=o.clientY-((null==s?void 0:s.top)||0);a.value.lineCap="round",a.value.lineJoin="round",a.value.lineTo(n,l),a.value.stroke(),t("signing",e)},h=e=>{Fe(e),t("end")},m=t=>{t&&e.backgroundColor&&(t.fillStyle=e.backgroundColor,t.fillRect(0,0,c,u))},f=()=>{var n,a;const l=o.value;if(!l)return;const i=(t=>{const o=document.createElement("canvas");if(o.width=t.width,o.height=t.height,e.backgroundColor){const e=o.getContext("2d");m(e)}return t.toDataURL()===o.toDataURL()})(l),r=i?"":(null==(a=(n={jpg:()=>l.toDataURL("image/jpeg",.8),jpeg:()=>l.toDataURL("image/jpeg",.8)})[e.type])?void 0:a.call(n))||l.toDataURL(`image/${e.type}`);t("submit",{image:r,canvas:l})},g=()=>{a.value&&(a.value.clearRect(0,0,c,u),a.value.closePath(),m(a.value)),t("clear")};return p((()=>{var e,t,i;if(l&&o.value){const l=o.value,r=M?window.devicePixelRatio:1;c=l.width=((null==(e=n.value)?void 0:e.offsetWidth)||0)*r,u=l.height=((null==(t=n.value)?void 0:t.offsetHeight)||0)*r,null==(i=a.value)||i.scale(r,r),m(a.value)}})),()=>b("div",{class:rv()},[b("div",{class:rv("content"),ref:n},[l?b("canvas",{ref:o,onTouchstartPassive:d,onTouchmove:v,onTouchend:h},null):b("p",null,[e.tips])]),b("div",{class:rv("footer")},[b(fo,{size:"small",onClick:g},{default:()=>[e.clearButtonText||sv("clear")]}),b(fo,{type:"primary",size:"small",onClick:f},{default:()=>[e.confirmButtonText||sv("confirm")]})])])}});const dv=e("Signature",Ct(uv)),[pv,vv]=dt("skeleton-title"),hv=e("skeletonTitleProps",{round:Boolean,titleWidth:K});var mv=y({name:pv,props:hv,setup:e=>()=>b("h3",{class:vv([{round:e.round}]),style:{width:We(e.titleWidth)}},null)});const fv=e("SkeletonTitle",Ct(mv));var gv=fv;const[bv,yv]=dt("skeleton-avatar"),xv=e("skeletonAvatarProps",{avatarSize:K,avatarShape:oe("round")});var wv=y({name:bv,props:xv,setup:e=>()=>b("div",{class:yv([e.avatarShape]),style:Ue(e.avatarSize)},null)});const kv=e("SkeletonAvatar",Ct(wv));var Sv=kv;const Cv=e("DEFAULT_ROW_WIDTH","100%"),Bv=e("skeletonParagraphProps",{round:Boolean,rowWidth:{type:K,default:Cv}}),[Tv,Pv]=dt("skeleton-paragraph");var Dv=y({name:Tv,props:Bv,setup:e=>()=>b("div",{class:Pv([{round:e.round}]),style:{width:e.rowWidth}},null)});const Ov=e("SkeletonParagraph",Ct(Dv));var Iv=Ov;const[Av,Vv]=dt("skeleton"),zv=e("skeletonProps",{row:te(0),round:Boolean,title:Boolean,titleWidth:K,avatar:Boolean,avatarSize:K,avatarShape:oe("round"),loading:_,animate:_,rowWidth:{type:[Number,String,Array],default:Cv}});var Ev=y({name:Av,inheritAttrs:!1,props:zv,setup(e,{slots:t,attrs:o}){const n=()=>{if(e.avatar)return b(Sv,{avatarShape:e.avatarShape,avatarSize:e.avatarSize},null)},a=()=>{if(e.title)return b(gv,{round:e.round,titleWidth:e.titleWidth},null)},l=t=>{const{rowWidth:o}=e;return o===Cv&&t===+e.row-1?"60%":Array.isArray(o)?o[t]:o};return()=>{var i;return e.loading?b("div",w({class:Vv({animate:e.animate,round:e.round})},o),[t.template?t.template():b(T,null,[n(),b("div",{class:Vv("content")},[a(),Array(+e.row).fill("").map(((t,o)=>b(Iv,{key:o,round:e.round,rowWidth:We(l(o))},null)))])])]):null==(i=t.default)?void 0:i.call(t)}}});const $v=e("Skeleton",Ct(Ev)),[Lv,Mv]=dt("skeleton-image"),Rv=e("skeletonImageProps",{imageSize:K,imageShape:oe("square")});var Fv=y({name:Lv,props:Rv,setup:e=>()=>b("div",{class:Mv([e.imageShape]),style:Ue(e.imageSize)},[b(oo,{name:"photo",class:Mv("icon")},null)])});const Hv=e("SkeletonImage",Ct(Fv)),[Nv,jv]=dt("slider"),Wv=e("sliderProps",{min:te(0),max:te(100),step:te(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:K,buttonSize:K,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}});var Uv=y({name:Nv,props:Wv,emits:["change","dragEnd","dragStart","update:modelValue"],setup(e,{emit:t,slots:o}){let n,a,l;const s=r(),c=[r(),r()],u=r(),d=Oo(),p=i((()=>Number(e.max)-Number(e.min))),v=i((()=>{const t=e.vertical?"width":"height";return{background:e.inactiveColor,[t]:We(e.barHeight)}})),h=t=>e.range&&Array.isArray(t),m=()=>{const{modelValue:t,min:o}=e;return h(t)?100*(t[1]-t[0])/p.value+"%":100*(t-Number(o))/p.value+"%"},f=i((()=>{const t={[e.vertical?"height":"width"]:m(),background:e.activeColor};u.value&&(t.transition="none");return t[e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left"]=(()=>{const{modelValue:t,min:o}=e;return h(t)?100*(t[0]-Number(o))/p.value+"%":"0%"})(),t})),g=t=>{const o=+e.min,n=+e.max,a=+e.step;t=Je(t,o,n);return tt(o,Math.round((t-o)/a)*a)},y=()=>{const t=e.modelValue;l=h(t)?t.map(g):g(t)},x=(o,n)=>{o=h(o)?(t=>{var o,n;const a=null!=(o=t[0])?o:Number(e.min),l=null!=(n=t[1])?n:Number(e.max);return a>l?[l,a]:[a,l]})(o).map(g):g(o),q(o,e.modelValue)||t("update:modelValue",o),n&&!q(o,l)&&t("change",o)},w=t=>{if(t.stopPropagation(),e.disabled||e.readonly)return;y();const{min:o,reverse:n,vertical:a,modelValue:l}=e,i=se(s),r=a?i.height:i.width,c=Number(o)+(a?n?i.bottom-t.clientY:t.clientY-i.top:n?i.right-t.clientX:t.clientX-i.left)/r*p.value;if(h(l)){const[e,t]=l;x(c<=(e+t)/2?[c,t]:[e,c],!0)}else x(c,!0)},k=o=>{if(e.disabled||e.readonly)return;"start"===u.value&&t("dragStart",o),Fe(o,!0),d.move(o),u.value="dragging";const i=se(s);let r=(e.vertical?d.deltaY.value:d.deltaX.value)/(e.vertical?i.height:i.width)*p.value;if(e.reverse&&(r=-r),h(l)){const t=e.reverse?1-n:n;a[t]=l[t]+r}else a=l+r;x(a)},S=o=>{e.disabled||e.readonly||("dragging"===u.value&&(x(a,!0),t("dragEnd",o)),u.value="")},C=t=>{if("number"==typeof t){return jv("button-wrapper",["left","right"][t])}return jv("button-wrapper",e.reverse?"left":"right")},B=(t,l)=>{const i="dragging"===u.value;if("number"==typeof l){const e=o[0===l?"left-button":"right-button"];let r;if(i&&Array.isArray(a)&&(r=a[0]>a[1]?1^n:n),e)return e({value:t,dragging:i,dragIndex:r})}return o.button?o.button({value:t,dragging:i}):b("div",{class:jv("button"),style:Ue(e.buttonSize)},null)},T=t=>{const o="number"==typeof t?e.modelValue[t]:e.modelValue;return b("div",{ref:c[null!=t?t:0],role:"slider",class:C(t),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":o,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstartPassive:o=>{"number"==typeof t&&(n=t),(t=>{e.disabled||e.readonly||(d.start(t),a=e.modelValue,y(),u.value="start")})(o)},onTouchend:S,onTouchcancel:S,onClick:Re},[B(o,t)])};return x(e.modelValue),Ie((()=>e.modelValue)),c.forEach((e=>{we("touchmove",k,{target:e})})),()=>b("div",{ref:s,style:v.value,class:jv({vertical:e.vertical,disabled:e.disabled}),onClick:w},[b("div",{class:jv("bar"),style:f.value},[e.range?[T(0),T(1)]:T()])])}});const Yv=e("Slider",Ct(Uv)),[Xv,qv]=dt("space"),Gv=e("spaceProps",{align:String,direction:{type:String,default:"horizontal"},size:{type:[Number,String,Array],default:8},wrap:Boolean,fill:Boolean});function Zv(e=[]){const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...e):e.type===T?t.push(...Zv(e.children)):t.push(e)})),t.filter((e=>{var t;return!(e&&(e.type===z||e.type===T&&0===(null==(t=e.children)?void 0:t.length)||e.type===E&&""===e.children.trim()))}))}var Kv=y({name:Xv,props:Gv,setup(e,{slots:t}){const o=i((()=>{var t;return null!=(t=e.align)?t:"horizontal"===e.direction?"center":""})),n=e=>"number"==typeof e?e+"px":e,a=t=>{const o={},a=`${n(Array.isArray(e.size)?e.size[0]:e.size)}`,l=`${n(Array.isArray(e.size)?e.size[1]:e.size)}`;return t?e.wrap?{marginBottom:l}:{}:("horizontal"===e.direction&&(o.marginRight=a),("vertical"===e.direction||e.wrap)&&(o.marginBottom=l),o)};return()=>{var n;const l=Zv(null==(n=t.default)?void 0:n.call(t));return b("div",{class:[qv({[e.direction]:e.direction,[`align-${o.value}`]:o.value,wrap:e.wrap,fill:e.fill})]},[l.map(((e,t)=>b("div",{key:`item-${t}`,class:`${Xv}-item`,style:a(t===l.length-1)},[e])))])}}});const _v=e("Space",Ct(Kv)),[Jv,Qv]=dt("steps"),eh=e("stepsProps",{active:te(0),direction:oe("horizontal"),activeIcon:oe("checked"),iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String}),th=Symbol(Jv);var oh=y({name:Jv,props:eh,emits:["clickStep"],setup(e,{emit:t,slots:o}){const{linkChildren:n}=pe(th);return n({props:e,onClickStep:e=>t("clickStep",e)}),()=>{var t;return b("div",{class:Qv([e.direction])},[b("div",{class:Qv("items")},[null==(t=o.default)?void 0:t.call(o)])])}}});const[nh,ah]=dt("step");var lh=y({name:nh,setup(e,{slots:t}){const{parent:o,index:n}=ce(th);if(!o)return;const a=o.props,l=()=>{const e=+a.active;return n.value<e?"finish":n.value===e?"process":"waiting"},r=()=>"process"===l(),s=i((()=>({background:"finish"===l()?a.activeColor:a.inactiveColor}))),c=i((()=>r()?{color:a.activeColor}:"waiting"===l()?{color:a.inactiveColor}:void 0)),u=()=>o.onClickStep(n.value),d=()=>{const{iconPrefix:e,finishIcon:o,activeIcon:n,activeColor:i,inactiveIcon:c}=a;return r()?t["active-icon"]?t["active-icon"]():b(oo,{class:ah("icon","active"),name:n,color:i,classPrefix:e},null):"finish"===l()&&(o||t["finish-icon"])?t["finish-icon"]?t["finish-icon"]():b(oo,{class:ah("icon","finish"),name:o,color:i,classPrefix:e},null):t["inactive-icon"]?t["inactive-icon"]():c?b(oo,{class:ah("icon"),name:c,classPrefix:e},null):b("i",{class:ah("circle"),style:s.value},null)};return()=>{var e;const o=l();return b("div",{class:[pt,ah([a.direction,{[o]:o}])]},[b("div",{class:ah("title",{active:r()}),style:c.value,onClick:u},[null==(e=t.default)?void 0:e.call(t)]),b("div",{class:ah("circle-container"),onClick:u},[d()]),b("div",{class:ah("line"),style:s.value},null)])}}});const ih=e("Step",Ct(lh)),[rh,sh]=dt("stepper"),ch=(e,t)=>String(e)===String(t),uh=e("stepperProps",{min:te(1),max:te(1/0),name:te(""),step:te(1),theme:String,integer:Boolean,disabled:Boolean,showPlus:_,showMinus:_,showInput:_,longPress:_,autoFixed:_,allowEmpty:Boolean,modelValue:K,inputWidth:K,buttonSize:K,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,beforeChange:Function,defaultValue:te(1),decimalLength:K});var dh=y({name:rh,props:uh,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup(e,{emit:t}){const o=(t,o=!0)=>{const{min:n,max:a,allowEmpty:l,decimalLength:i}=e;return l&&""===t||(t=""===(t=et(String(t),!e.integer))?0:+t,t=Number.isNaN(t)?+n:t,t=o?Math.max(Math.min(+a,t),+n):t,F(i)&&(t=t.toFixed(+i))),t};let n;const a=r(),l=r((()=>{var n;const a=null!=(n=e.modelValue)?n:e.defaultValue,l=o(a);return ch(l,e.modelValue)||t("update:modelValue",l),l})()),s=i((()=>e.disabled||e.disableMinus||+l.value<=+e.min)),c=i((()=>e.disabled||e.disablePlus||+l.value>=+e.max)),u=i((()=>({width:We(e.inputWidth),height:We(e.buttonSize)}))),d=i((()=>Ue(e.buttonSize))),p=t=>{e.beforeChange?St(e.beforeChange,{args:[t],done(){l.value=t}}):l.value=t},h=()=>{if("plus"===n&&c.value||"minus"===n&&s.value)return void t("overlimit",n);const a="minus"===n?-e.step:+e.step,i=o(tt(+l.value,a));p(i),t(n)},f=t=>{const o=t.target,{value:n}=o,{decimalLength:a}=e;let i=et(String(n),!e.integer);if(F(a)&&i.includes(".")){const e=i.split(".");i=`${e[0]}.${e[1].slice(0,+a)}`}e.beforeChange?o.value=String(l.value):ch(n,i)||(o.value=i);const r=i===String(+i);p(r?+i:i)},g=o=>{var n;e.disableInput?null==(n=a.value)||n.blur():t("focus",o)},y=n=>{const a=n.target,i=o(a.value,e.autoFixed);a.value=String(i),l.value=i,v((()=>{t("blur",n),Me()}))};let x,k;const B=()=>{k=setTimeout((()=>{h(),B()}),200)},T=t=>{e.longPress&&(clearTimeout(k),x&&Fe(t))},P=t=>{e.disableInput&&Fe(t)},D=t=>({onClick:e=>{Fe(e),n=t,h()},onTouchstartPassive:()=>{n=t,e.longPress&&(x=!1,clearTimeout(k),k=setTimeout((()=>{x=!0,h(),B()}),500))},onTouchend:T,onTouchcancel:T});return m((()=>[e.max,e.min,e.integer,e.decimalLength]),(()=>{const e=o(l.value);ch(e,l.value)||(l.value=e)})),m((()=>e.modelValue),(e=>{ch(e,l.value)||(l.value=o(e))})),m(l,(o=>{t("update:modelValue",o),t("change",o,{name:e.name})})),Ie((()=>e.modelValue)),()=>b("div",{role:"group",class:sh([e.theme])},[S(b("button",w({type:"button",style:d.value,class:[sh("minus",{disabled:s.value}),{[xt]:!s.value}],"aria-disabled":s.value||void 0},D("minus")),null),[[C,e.showMinus]]),S(b("input",{ref:a,type:e.integer?"tel":"text",role:"spinbutton",class:sh("input"),value:l.value,style:u.value,disabled:e.disabled,readonly:e.disableInput,inputmode:e.integer?"numeric":"decimal",placeholder:e.placeholder,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":l.value,onBlur:y,onInput:f,onFocus:g,onMousedown:P},null),[[C,e.showInput]]),S(b("button",w({type:"button",style:d.value,class:[sh("plus",{disabled:c.value}),{[xt]:!c.value}],"aria-disabled":c.value||void 0},D("plus")),null),[[C,e.showPlus]])])}});const ph=e("Stepper",Ct(dh)),vh=e("Steps",Ct(oh)),[hh,mh,fh]=dt("submit-bar"),gh=e("submitBarProps",{tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,currency:oe("¥"),disabled:Boolean,textAlign:String,buttonText:String,buttonType:oe("danger"),buttonColor:String,suffixLabel:String,placeholder:Boolean,decimalLength:te(2),safeAreaInsetBottom:_});var bh=y({name:hh,props:gh,emits:["submit"],setup(e,{emit:t,slots:o}){const n=r(),a=Ot(n,mh),l=()=>{const{price:t,label:o,currency:n,textAlign:a,suffixLabel:l,decimalLength:i}=e;if("number"==typeof t){const e=(t/100).toFixed(+i).split("."),r=i?`.${e[1]}`:"";return b("div",{class:mh("text"),style:{textAlign:a}},[b("span",null,[o||fh("label")]),b("span",{class:mh("price")},[n,b("span",{class:mh("price-integer")},[e[0]]),r]),l&&b("span",{class:mh("suffix-label")},[l])])}},i=()=>{var t;const{tip:n,tipIcon:a}=e;if(o.tip||n)return b("div",{class:mh("tip")},[a&&b(oo,{class:mh("tip-icon"),name:a},null),n&&b("span",{class:mh("tip-text")},[n]),null==(t=o.tip)?void 0:t.call(o)])},s=()=>t("submit"),c=()=>{var t,a;return b("div",{ref:n,class:[mh(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[null==(t=o.top)?void 0:t.call(o),i(),b("div",{class:mh("bar")},[null==(a=o.default)?void 0:a.call(o),l(),o.button?o.button():b(fo,{round:!0,type:e.buttonType,text:e.buttonText,class:mh("button",e.buttonType),color:e.buttonColor,loading:e.loading,disabled:e.disabled,onClick:s},null)])])};return()=>e.placeholder?a(c):c()}});const yh=e("SubmitBar",Ct(bh)),[xh,wh]=dt("swipe-cell"),kh=e("swipeCellProps",{name:te(""),disabled:Boolean,leftWidth:K,rightWidth:K,beforeClose:Function,stopPropagation:Boolean});var Sh=y({name:xh,props:kh,emits:["open","close","click"],setup(e,{emit:t,slots:o}){let n,a,l,c;const u=r(),d=r(),p=r(),v=s({offset:0,dragging:!1}),h=Oo(),m=e=>e.value?se(e).width:0,f=i((()=>F(e.leftWidth)?+e.leftWidth:m(d))),g=i((()=>F(e.rightWidth)?+e.rightWidth:m(p))),y=o=>{v.offset="left"===o?f.value:-g.value,n||(n=!0,t("open",{name:e.name,position:o}))},x=o=>{v.offset=0,n&&(n=!1,t("close",{name:e.name,position:o}))},w=t=>{e.disabled||(l=v.offset,h.start(t))},k=()=>{v.dragging&&(v.dragging=!1,(e=>{const t=Math.abs(v.offset),o=n?.85:.15,a="left"===e?f.value:g.value;a&&t>a*o?y(e):x(e)})(v.offset>0?"left":"right"),setTimeout((()=>{a=!1}),0))},S=(o="outside")=>{c||(t("click",o),n&&!a&&(c=!0,St(e.beforeClose,{args:[{name:e.name,position:o}],done:()=>{c=!1,x(o)},canceled:()=>c=!1,error:()=>c=!1})))},C=(e,t)=>o=>{t&&o.stopPropagation(),S(e)},B=(e,t)=>{const n=o[e];if(n)return b("div",{ref:t,class:wh(e),onClick:C(e,!0)},[n()])};return Lt({open:y,close:x}),ke(u,(()=>S("outside")),{eventName:"touchstart"}),we("touchmove",(t=>{if(e.disabled)return;const{deltaX:o}=h;if(h.move(t),h.isHorizontal()){a=!0,v.dragging=!0;(!n||o.value*l<0)&&Fe(t,e.stopPropagation),v.offset=Je(o.value+l,-g.value,f.value)}}),{target:u}),()=>{var e;const t={transform:`translate3d(${v.offset}px, 0, 0)`,transitionDuration:v.dragging?"0s":".6s"};return b("div",{ref:u,class:wh(),onClick:C("cell",a),onTouchstartPassive:w,onTouchend:k,onTouchcancel:k},[b("div",{class:wh("wrapper"),style:t},[B("left",d),null==(e=o.default)?void 0:e.call(o),B("right",p)])])}}});const Ch=e("SwipeCell",Ct(Sh)),[Bh,Th]=dt("tabbar"),Ph=e("tabbarProps",{route:Boolean,fixed:_,border:_,zIndex:K,placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,modelValue:te(0),safeAreaInsetBottom:{type:Boolean,default:null}}),Dh=Symbol(Bh);var Oh=y({name:Bh,props:Ph,emits:["change","update:modelValue"],setup(e,{emit:t,slots:o}){const n=r(),{linkChildren:a}=pe(Dh),l=Ot(n,Th),i=()=>{var t;return null!=(t=e.safeAreaInsetBottom)?t:e.fixed},s=()=>{var t;const{fixed:a,zIndex:l,border:r}=e;return b("div",{ref:n,role:"tablist",style:Ye(l),class:[Th({fixed:a}),{[bt]:r,"van-safe-area-bottom":i()}]},[null==(t=o.default)?void 0:t.call(o)])};return a({props:e,setActive:(o,n)=>{St(e.beforeChange,{args:[o],done(){t("update:modelValue",o),t("change",o),n()}})}}),()=>e.fixed&&e.placeholder?l(s):s()}});const Ih=e("Tabbar",Ct(Oh)),[Ah,Vh]=dt("tabbar-item"),zh=e("tabbarItemProps",L({},Mt,{dot:Boolean,icon:String,name:K,badge:K,badgeProps:Object,iconPrefix:String}));var Eh=y({name:Ah,props:zh,emits:["click"],setup(e,{emit:t,slots:o}){const n=Ft(),l=a().proxy,{parent:r,index:s}=ce(Dh);if(!r)return;const c=i((()=>{var t;const{route:o,modelValue:n}=r.props;if(o&&"$route"in l){const{$route:t}=l,{to:o}=e,n=R(o)?o:{path:o};return!!t.matched.find((e=>{const t="path"in n&&n.path===e.path,o="name"in n&&n.name===e.name;return t||o}))}return(null!=(t=e.name)?t:s.value)===n})),u=o=>{var a;c.value||r.setActive(null!=(a=e.name)?a:s.value,n),t("click",o)},d=()=>o.icon?o.icon({active:c.value}):e.icon?b(oo,{name:e.icon,classPrefix:e.iconPrefix},null):void 0;return()=>{var t;const{dot:n,badge:a}=e,{activeColor:l,inactiveColor:i}=r.props,s=c.value?l:i;return b("div",{role:"tab",class:Vh({active:c.value}),style:{color:s},tabindex:0,"aria-selected":c.value,onClick:u},[b(Ut,w({dot:n,class:Vh("icon"),content:a},e.badgeProps),{default:d}),b("div",{class:Vh("text")},[null==(t=o.default)?void 0:t.call(o,{active:c.value})])])}}});const $h=e("TabbarItem",Ct(Eh)),[Lh,Mh]=dt("text-ellipsis"),Rh=e("textEllipsisProps",{rows:te(1),dots:oe("..."),content:oe(""),expandText:oe(""),collapseText:oe(""),position:oe("end")});var Fh=y({name:Lh,props:Rh,emits:["clickAction"],setup(e,{emit:t}){const o=r(""),n=r(!1),a=r(!1),l=r(),s=i((()=>n.value?e.collapseText:e.expandText)),c=e=>{if(!e)return 0;const t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0},u=()=>{const t=(()=>{if(!l.value)return;const t=window.getComputedStyle(l.value),o=document.createElement("div");return Array.prototype.slice.apply(t).forEach((e=>{o.style.setProperty(e,t.getPropertyValue(e))})),o.style.position="fixed",o.style.zIndex="-9999",o.style.top="-9999px",o.style.height="auto",o.style.minHeight="auto",o.style.maxHeight="auto",o.innerText=e.content,document.body.appendChild(o),o})();if(!t)return;const{paddingBottom:n,paddingTop:i,lineHeight:r}=t.style,u=Math.ceil((Number(e.rows)+.5)*c(r)+c(i)+c(n));u<t.offsetHeight?(a.value=!0,o.value=((t,o)=>{const{content:n,position:a,dots:l}=e,i=n.length,r=(a,s)=>{if(a[1]-a[0]<=1&&s[1]-s[0]<=1)return n.slice(0,a[0])+l+n.slice(s[1],i);const c=Math.floor((a[0]+a[1])/2),u=Math.ceil((s[0]+s[1])/2);return t.innerText=e.content.slice(0,c)+e.dots+e.content.slice(u,i)+e.expandText,t.offsetHeight>=o?r([a[0],c],[u,s[1]]):r([c,a[1]],[s[0],u])},c=0+i>>1;return"middle"===e.position?t.innerText=r([0,c],[c,i]):(()=>{const e=(r,c)=>{if(c-r<=1)return"end"===a?n.slice(0,r)+l:l+n.slice(c,i);const u=Math.round((r+c)/2);return t.innerText="end"===a?n.slice(0,u)+l+s.value:l+n.slice(u,i)+s.value,t.offsetHeight>o?"end"===a?e(r,u):e(u,c):"end"===a?e(u,c):e(r,u)};t.innerText=e(0,i)})(),t.innerText})(t,u)):(a.value=!1,o.value=e.content),document.body.removeChild(t)},d=e=>{n.value=!n.value,t("clickAction",e)};return p(u),m((()=>[e.content,e.rows,e.position]),u),we("resize",u),()=>b("div",{ref:l,class:Mh()},[n.value?e.content:o.value,a.value?b("span",{class:Mh("action"),onClick:d},[s.value]):null])}});const Hh=e("TextEllipsis",Ct(Fh)),[Nh]=dt("time-picker"),jh=e=>/^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/.test(e),Wh=["hour","minute","second"],Uh=e("timePickerProps",L({},Mi,{minHour:te(0),maxHour:te(23),minMinute:te(0),maxMinute:te(59),minSecond:te(0),maxSecond:te(59),minTime:{type:String,validator:jh},maxTime:{type:String,validator:jh},columnsType:{type:Array,default:()=>["hour","minute"]},filter:Function}));var Yh=y({name:Nh,props:Uh,emits:["confirm","cancel","change","update:modelValue"],setup(e,{emit:t,slots:o}){const n=r(e.modelValue),a=t=>{const o=t.split(":");return Wh.map(((t,n)=>e.columnsType.includes(t)?o[n]:"00"))},l=i((()=>{let{minHour:t,maxHour:o,minMinute:l,maxMinute:i,minSecond:r,maxSecond:s}=e;if(e.minTime||e.maxTime){const c={hour:0,minute:0,second:0};e.columnsType.forEach(((e,t)=>{var o;c[e]=null!=(o=n.value[t])?o:0}));const{hour:u,minute:d}=c;if(e.minTime){const[o,n,i]=a(e.minTime);t=o,l=+u<=+t?n:"00",r=+u<=+t&&+d<=+l?i:"00"}if(e.maxTime){const[t,n,l]=a(e.maxTime);o=t,i=+u>=+o?n:"59",s=+u>=+o&&+d>=+i?l:"59"}}return e.columnsType.map((a=>{const{filter:c,formatter:u}=e;switch(a){case"hour":return Hi(+t,+o,a,u,c,n.value);case"minute":return Hi(+l,+i,a,u,c,n.value);case"second":return Hi(+r,+s,a,u,c,n.value);default:return[]}}))}));m(n,(o=>{q(o,e.modelValue)||t("update:modelValue",o)})),m((()=>e.modelValue),(e=>{e=Ni(e,l.value),q(e,n.value)||(n.value=e)}),{immediate:!0});const s=(...e)=>t("change",...e),c=(...e)=>t("cancel",...e),u=(...e)=>t("confirm",...e);return()=>b(ka,w({modelValue:n.value,"onUpdate:modelValue":e=>n.value=e,columns:l.value,onChange:s,onCancel:c,onConfirm:u},X(e,Ri)),o)}});const Xh=e("TimePicker",Ct(Yh)),[qh,Gh]=dt("tree-select"),Zh=e("treeSelectProps",{max:te(1/0),items:Q(),height:te(300),selectedIcon:oe("success"),mainActiveIndex:te(0),activeId:{type:[Number,String,Array],default:0}});var Kh=y({name:qh,props:Zh,emits:["clickNav","clickItem","update:activeId","update:mainActiveIndex"],setup(e,{emit:t,slots:o}){const n=t=>Array.isArray(e.activeId)?e.activeId.includes(t):e.activeId===t,a=o=>b("div",{key:o.id,class:["van-ellipsis",Gh("item",{active:n(o.id),disabled:o.disabled})],onClick:()=>{if(o.disabled)return;let n;if(Array.isArray(e.activeId)){n=e.activeId.slice();const t=n.indexOf(o.id);-1!==t?n.splice(t,1):n.length<+e.max&&n.push(o.id)}else n=o.id;t("update:activeId",n),t("clickItem",o)}},[o.text,n(o.id)&&b(oo,{name:e.selectedIcon,class:Gh("selected")},null)]),l=e=>{t("update:mainActiveIndex",e)},i=e=>t("clickNav",e),r=()=>{const t=e.items.map((e=>b(lv,{dot:e.dot,badge:e.badge,class:[Gh("nav-item"),e.className],disabled:e.disabled,onClick:i},{title:()=>o["nav-text"]?o["nav-text"](e):e.text})));return b(ev,{class:Gh("nav"),modelValue:e.mainActiveIndex,onChange:l},{default:()=>[t]})},s=()=>{if(o.content)return o.content();const t=e.items[+e.mainActiveIndex]||{};return t.children?t.children.map(a):void 0};return()=>b("div",{class:Gh(),style:{height:We(e.height)}},[r(),b("div",{class:Gh("content")},[s()])])}});const _h=e("TreeSelect",Ct(Kh)),[Jh,Qh,em]=dt("uploader");function tm(e,t){return new Promise((o=>{if("file"===t)return void o();const n=new FileReader;n.onload=e=>{o(e.target.result)},"dataUrl"===t?n.readAsDataURL(e):"text"===t&&n.readAsText(e)}))}function om(e,t){return G(e).some((e=>!!e.file&&(H(t)?t(e.file):e.file.size>+t)))}const nm=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;function am(e){return!!e.isImage||(e.file&&e.file.type?0===e.file.type.indexOf("image"):e.url?(t=e.url,nm.test(t)):"string"==typeof e.content&&0===e.content.indexOf("data:image"));var t}var lm=y({props:{name:K,item:J(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,reupload:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview","reupload"],setup(e,{emit:t,slots:o}){const n=()=>{const{status:t,message:o}=e.item;if("uploading"===t||"failed"===t){const e="failed"===t?b(oo,{name:"close",class:Qh("mask-icon")},null):b(uo,{class:Qh("loading")},null),n=F(o)&&""!==o;return b("div",{class:Qh("mask")},[e,n&&b("div",{class:Qh("mask-message")},[o])])}},a=o=>{const{name:n,item:a,index:l,beforeDelete:i}=e;o.stopPropagation(),St(i,{args:[a,{name:n,index:l}],done:()=>t("delete")})},l=()=>t("preview"),i=()=>t("reupload"),r=()=>{if(e.deletable&&"uploading"!==e.item.status){const e=o["preview-delete"];return b("div",{role:"button",class:Qh("preview-delete",{shadow:!e}),tabindex:0,"aria-label":em("delete"),onClick:a},[e?e():b(oo,{name:"cross",class:Qh("preview-delete-icon")},null)])}},s=()=>{if(o["preview-cover"]){const{index:t,item:n}=e;return b("div",{class:Qh("preview-cover")},[o["preview-cover"](L({index:t},n))])}},c=()=>{const{item:t,lazyLoad:o,imageFit:n,previewSize:a,reupload:r}=e;return am(t)?b(or,{fit:n,src:t.objectUrl||t.content||t.url,class:Qh("preview-image"),width:Array.isArray(a)?a[0]:a,height:Array.isArray(a)?a[1]:a,lazyLoad:o,onClick:r?i:l},{default:s}):b("div",{class:Qh("file"),style:Ue(e.previewSize)},[b(oo,{class:Qh("file-icon"),name:"description"},null),b("div",{class:[Qh("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url]),s()])};return()=>b("div",{class:Qh("preview")},[c(),n(),r()])}});const im=e("uploaderProps",{name:te(""),accept:oe("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:te(1/0),imageFit:oe("cover"),resultType:oe("dataUrl"),uploadIcon:oe("photograph"),uploadText:String,deletable:_,reupload:Boolean,afterRead:Function,showUpload:_,modelValue:Q(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:_,previewOptions:Object,previewFullImage:_,maxSize:{type:[Number,String,Function],default:1/0}});var rm=y({name:Jh,props:im,emits:["delete","oversize","clickUpload","closePreview","clickPreview","clickReupload","update:modelValue"],setup(e,{emit:t,slots:o}){const n=r(),a=[],l=r(-1),i=r(!1),u=(t=e.modelValue.length)=>({name:e.name,index:t}),d=()=>{n.value&&(n.value.value="")},p=o=>{if(d(),om(o,e.maxSize)){if(!Array.isArray(o))return void t("oversize",o,u());{const n=function(e,t){const o=[],n=[];return e.forEach((e=>{om(e,t)?n.push(e):o.push(e)})),{valid:o,invalid:n}}(o,e.maxSize);if(o=n.valid,t("oversize",n.invalid,u()),!o.length)return}}if(o=s(o),l.value>-1){const n=[...e.modelValue];n.splice(l.value,1,o),t("update:modelValue",n),l.value=-1}else t("update:modelValue",[...e.modelValue,...G(o)]);e.afterRead&&e.afterRead(o,u())},h=t=>{const{maxCount:o,modelValue:n,resultType:a}=e;if(Array.isArray(t)){const e=+o-n.length;t.length>e&&(t=t.slice(0,e)),Promise.all(t.map((e=>tm(e,a)))).then((e=>{const o=t.map(((t,o)=>{const n={file:t,status:"",message:"",objectUrl:URL.createObjectURL(t)};return e[o]&&(n.content=e[o]),n}));p(o)}))}else tm(t,a).then((e=>{const o={file:t,status:"",message:"",objectUrl:URL.createObjectURL(t)};e&&(o.content=e),p(o)}))},m=t=>{const{files:o}=t.target;if(e.disabled||!o||!o.length)return;const n=1===o.length?o[0]:[].slice.call(o);if(e.beforeRead){const t=e.beforeRead(n,u());if(!t)return void d();if(N(t))return void t.then((e=>{h(e||n)})).catch(d)}h(n)};let f;const g=()=>t("closePreview"),y=()=>{i.value||(l.value=-1),i.value=!1},x=(n,r)=>{const s=["imageFit","deletable","reupload","previewSize","beforeDelete"],c=L(X(e,s),X(n,s,!0));return b(lm,w({item:n,index:r,onClick:()=>t(e.reupload?"clickReupload":"clickPreview",n,u(r)),onDelete:()=>((o,n)=>{const a=e.modelValue.slice(0);a.splice(n,1),t("update:modelValue",a),t("delete",o,u(n))})(n,r),onPreview:()=>(t=>{if(e.previewFullImage){const o=e.modelValue.filter(am),n=o.map((e=>(e.objectUrl&&!e.url&&"failed"!==e.status&&(e.url=e.objectUrl,a.push(e.url)),e.url))).filter(Boolean);f=uu(L({images:n,startPosition:o.indexOf(t),onClose:g},e.previewOptions))}})(n),onReupload:()=>(e=>{i.value=!0,l.value=e,v((()=>P()))})(r)},X(e,["name","lazyLoad"]),c),X(o,["preview-cover","preview-delete"]))},k=()=>{if(e.previewImage)return e.modelValue.map(x)},B=e=>t("clickUpload",e),T=()=>{if(e.modelValue.length>=+e.maxCount&&!e.reupload)return;const t=e.modelValue.length>=+e.maxCount&&e.reupload,a=e.readonly?null:b("input",{ref:n,type:"file",class:Qh("input"),accept:e.accept,capture:e.capture,multiple:e.multiple&&-1===l.value,disabled:e.disabled,onChange:m,onClick:y},null);return o.default?S(b("div",{class:Qh("input-wrapper"),onClick:B},[o.default(),a]),[[C,!t]]):S(b("div",{class:Qh("upload",{readonly:e.readonly}),style:Ue(e.previewSize),onClick:B},[b(oo,{name:e.uploadIcon,class:Qh("upload-icon")},null),e.uploadText&&b("span",{class:Qh("upload-text")},[e.uploadText]),a]),[[C,e.showUpload&&!t]])},P=()=>{n.value&&!e.disabled&&n.value.click()};return c((()=>{a.forEach((e=>URL.revokeObjectURL(e)))})),Lt({chooseFile:P,closeImagePreview:()=>{f&&f.close()}}),Ie((()=>e.modelValue)),()=>b("div",{class:Qh()},[b("div",{class:Qh("wrapper",{disabled:e.disabled})},[k(),T()])])}});const sm=e("Uploader",Ct(rm)),[cm,um]=dt("watermark"),dm=e("watermarkProps",{gapX:ee(0),gapY:ee(0),image:String,width:ee(100),height:ee(100),rotate:te(-22),zIndex:K,content:String,opacity:K,fullPage:_,textColor:oe("#dcdee0")});var pm=y({name:cm,props:dm,setup(e,{slots:t}){const o=r(),n=r(""),a=r(""),i=()=>{const o={transformOrigin:"center",transform:`rotate(${e.rotate}deg)`},n=e.width+e.gapX,l=e.height+e.gapY;return b("svg",{viewBox:`0 0 ${n} ${l}`,width:n,height:l,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",style:{padding:`0 ${e.gapX}px ${e.gapY}px 0`,opacity:e.opacity}},[e.image&&!t.content?b("image",{href:a.value,"xlink:href":a.value,x:"0",y:"0",width:e.width,height:e.height,style:o},null):b("foreignObject",{x:"0",y:"0",width:e.width,height:e.height},[b("div",{xmlns:"http://www.w3.org/1999/xhtml",style:o},[t.content?t.content():b("span",{style:{color:e.textColor}},[e.content])])])])};return x((()=>{e.image&&(e=>{const t=document.createElement("canvas"),o=new Image;o.crossOrigin="anonymous",o.referrerPolicy="no-referrer",o.onload=()=>{t.width=o.naturalWidth,t.height=o.naturalHeight;const e=t.getContext("2d");null==e||e.drawImage(o,0,0),a.value=t.toDataURL()},o.src=e})(e.image)})),m((()=>[a.value,e.content,e.textColor,e.height,e.width,e.rotate,e.gapX,e.gapY]),(()=>{v((()=>{o.value&&(n.value&&URL.revokeObjectURL(n.value),n.value=(e=>{const t=new Blob([e],{type:"image/svg+xml"});return URL.createObjectURL(t)})(o.value.innerHTML))}))}),{immediate:!0}),l((()=>{n.value&&URL.revokeObjectURL(n.value)})),()=>{const t=L({backgroundImage:`url(${n.value})`},Ye(e.zIndex));return b("div",{class:um({full:e.fullPage}),style:t},[b("div",{class:um("wrapper"),ref:o},[i()])])}}});const vm=e("Watermark",Ct(pm));class hm{constructor({el:e,src:t,error:o,loading:n,bindType:a,$parent:l,options:i,cors:r,elRenderer:s,imageCache:c}){this.el=e,this.src=t,this.error=o,this.loading=n,this.bindType=a,this.attempt=0,this.cors=r,this.naturalHeight=0,this.naturalWidth=0,this.options=i,this.$parent=l,this.elRenderer=s,this.imageCache=c,this.performanceData={loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(e){this.performanceData[e]=Date.now()}update({src:e,loading:t,error:o}){const n=this.src;this.src=e,this.loading=t,this.error=o,this.filter(),n!==this.src&&(this.attempt=0,this.initState())}checkInView(){const e=se(this.el);return e.top<window.innerHeight*this.options.preLoad&&e.bottom>this.options.preLoadTop&&e.left<window.innerWidth*this.options.preLoad&&e.right>0}filter(){Object.keys(this.options.filter).forEach((e=>{this.options.filter[e](this,this.options)}))}renderLoading(e){this.state.loading=!0,hi({src:this.loading,cors:this.cors},(()=>{this.render("loading",!1),this.state.loading=!1,e()}),(()=>{e(),this.state.loading=!1}))}load(e=t){if(this.attempt>this.options.attempt-1&&this.state.error)e();else if(!this.state.rendered||!this.state.loaded)return this.imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,e()):void this.renderLoading((()=>{var t,o;this.attempt++,null==(o=(t=this.options.adapter).beforeLoad)||o.call(t,this,this.options),this.record("loadStart"),hi({src:this.src,cors:this.cors},(t=>{this.naturalHeight=t.naturalHeight,this.naturalWidth=t.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this.imageCache.add(this.src),e()}),(e=>{!this.options.silent&&console.error(e),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)}))}))}render(e,t){this.elRenderer(this,e,t)}performance(){let e="loading",t=0;return this.state.loaded&&(e="loaded",t=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:t}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const mm="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",fm=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],gm={rootMargin:"0px",threshold:0};var bm=e=>({props:{tag:{type:String,default:"div"}},emits:["show"],render(){return $(this.tag,this.show&&this.$slots.default?this.$slots.default():null)},data:()=>({el:null,state:{loaded:!1},show:!1}),mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{checkInView(){const t=se(this.$el);return ne&&t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});const ym={selector:"img"};class xm{constructor({el:e,binding:t,vnode:o,lazy:n}){this.el=null,this.vnode=o,this.binding=t,this.options={},this.lazy=n,this.queue=[],this.update({el:e,binding:t})}update({el:e,binding:t}){this.el=e,this.options=Object.assign({},ym,t.value);this.getImgs().forEach((e=>{this.lazy.add(e,Object.assign({},this.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||this.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||this.options.loading}}),this.vnode)}))}getImgs(){return Array.from(this.el.querySelectorAll(this.options.selector))}clear(){this.getImgs().forEach((e=>this.lazy.remove(e))),this.vnode=null,this.binding=null,this.lazy=null}}class wm{constructor({lazy:e}){this.lazy=e,this.queue=[]}bind(e,t,o){const n=new xm({el:e,binding:t,vnode:o,lazy:this.lazy});this.queue.push(n)}update(e,t,o){const n=this.queue.find((t=>t.el===e));n&&n.update({el:e,binding:t,vnode:o})}unbind(e){const t=this.queue.find((t=>t.el===e));t&&(t.clear(),ri(this.queue,t))}}var km=e=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(){var e,t;return $(this.tag,{src:this.renderSrc},null==(t=(e=this.$slots).default)?void 0:t.call(e))},data:()=>({el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},renderSrc:""}),watch:{src(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created(){this.init()},mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{init(){const{src:t,loading:o,error:n}=e.valueFormatter(this.src);this.state.loaded=!1,this.options.src=t,this.options.error=n,this.options.loading=o,this.renderSrc=this.options.loading},checkInView(){const t=se(this.$el);return t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(e=t){if(this.state.attempt>this.options.attempt-1&&this.state.error)return void e();const{src:o}=this.options;hi({src:o},(({src:e})=>{this.renderSrc=e,this.state.loaded=!0}),(()=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0}))}}});e("Lazyload",{install(e,t={}){const o=class{constructor({preLoad:e,error:t,throttleWait:o,preLoadTop:n,dispatchEvent:a,loading:l,attempt:i,silent:r=!0,scale:s,listenEvents:c,filter:u,adapter:d,observer:p,observerOptions:v}){this.mode=li,this.listeners=[],this.targetIndex=0,this.targets=[],this.options={silent:r,dispatchEvent:!!a,throttleWait:o||200,preLoad:e||1.3,preLoadTop:n||0,error:t||mm,loading:l||mm,attempt:i||3,scale:s||ci(s),ListenEvents:c||fm,supportWebp:ui(),filter:u||{},adapter:d||{},observer:!!p,observerOptions:v||gm},this.initEvent(),this.imageCache=new mi({max:200}),this.lazyLoadHandler=di(this.lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?ii:li)}config(e={}){Object.assign(this.options,e)}performance(){return this.listeners.map((e=>e.performance()))}addLazyBox(e){this.listeners.push(e),ne&&(this.addListenerTarget(window),this.observer&&this.observer.observe(e.el),e.$el&&e.$el.parentNode&&this.addListenerTarget(e.$el.parentNode))}add(e,t,o){if(this.listeners.some((t=>t.el===e)))return this.update(e,t),v(this.lazyLoadHandler);const n=this.valueFormatter(t.value);let{src:a}=n;v((()=>{a=si(e,this.options.scale)||a,this.observer&&this.observer.observe(e);const l=Object.keys(t.modifiers)[0];let i;l&&(i=o.context.$refs[l],i=i?i.$el||i:document.getElementById(l)),i||(i=Pe(e));const r=new hm({bindType:t.arg,$parent:i,el:e,src:a,loading:n.loading,error:n.error,cors:n.cors,elRenderer:this.elRenderer.bind(this),options:this.options,imageCache:this.imageCache});this.listeners.push(r),ne&&(this.addListenerTarget(window),this.addListenerTarget(i)),this.lazyLoadHandler(),v((()=>this.lazyLoadHandler()))}))}update(e,t,o){const n=this.valueFormatter(t.value);let{src:a}=n;a=si(e,this.options.scale)||a;const l=this.listeners.find((t=>t.el===e));l?l.update({src:a,error:n.error,loading:n.loading}):this.add(e,t,o),this.observer&&(this.observer.unobserve(e),this.observer.observe(e)),this.lazyLoadHandler(),v((()=>this.lazyLoadHandler()))}remove(e){if(!e)return;this.observer&&this.observer.unobserve(e);const t=this.listeners.find((t=>t.el===e));t&&(this.removeListenerTarget(t.$parent),this.removeListenerTarget(window),ri(this.listeners,t),t.$destroy())}removeComponent(e){e&&(ri(this.listeners,e),this.observer&&this.observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this.removeListenerTarget(e.$el.parentNode),this.removeListenerTarget(window))}setMode(e){ai||e!==ii||(e=li),this.mode=e,e===li?(this.observer&&(this.listeners.forEach((e=>{this.observer.unobserve(e.el)})),this.observer=null),this.targets.forEach((e=>{this.initListen(e.el,!0)}))):(this.targets.forEach((e=>{this.initListen(e.el,!1)})),this.initIntersectionObserver())}addListenerTarget(e){if(!e)return;let t=this.targets.find((t=>t.el===e));return t?t.childrenCount++:(t={el:e,id:++this.targetIndex,childrenCount:1,listened:!0},this.mode===li&&this.initListen(t.el,!0),this.targets.push(t)),this.targetIndex}removeListenerTarget(e){this.targets.forEach(((t,o)=>{t.el===e&&(t.childrenCount--,t.childrenCount||(this.initListen(t.el,!1),this.targets.splice(o,1),t=null))}))}initListen(e,t){this.options.ListenEvents.forEach((o=>(t?pi:vi)(e,o,this.lazyLoadHandler)))}initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(e,t)=>{this.Event.listeners[e]||(this.Event.listeners[e]=[]),this.Event.listeners[e].push(t)},this.$once=(e,t)=>{const o=(...n)=>{this.$off(e,o),t.apply(this,n)};this.$on(e,o)},this.$off=(e,t)=>{if(t)ri(this.Event.listeners[e],t);else{if(!this.Event.listeners[e])return;this.Event.listeners[e].length=0}},this.$emit=(e,t,o)=>{this.Event.listeners[e]&&this.Event.listeners[e].forEach((e=>e(t,o)))}}lazyLoadHandler(){const e=[];this.listeners.forEach((t=>{t.el&&t.el.parentNode||e.push(t),t.checkInView()&&t.load()})),e.forEach((e=>{ri(this.listeners,e),e.$destroy()}))}initIntersectionObserver(){ai&&(this.observer=new IntersectionObserver(this.observerHandler.bind(this),this.options.observerOptions),this.listeners.length&&this.listeners.forEach((e=>{this.observer.observe(e.el)})))}observerHandler(e){e.forEach((e=>{e.isIntersecting&&this.listeners.forEach((t=>{if(t.el===e.target){if(t.state.loaded)return this.observer.unobserve(t.el);t.load()}}))}))}elRenderer(e,t,o){if(!e.el)return;const{el:n,bindType:a}=e;let l;switch(t){case"loading":l=e.loading;break;case"error":l=e.error;break;default:({src:l}=e)}if(a?n.style[a]='url("'+l+'")':n.getAttribute("src")!==l&&n.setAttribute("src",l),n.setAttribute("lazy",t),this.$emit(t,e,o),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){const o=new CustomEvent(t,{detail:e});n.dispatchEvent(o)}}valueFormatter(e){let t=e,{loading:o,error:n}=this.options;return R(e)&&(({src:t}=e),o=e.loading||this.options.loading,n=e.error||this.options.error),{src:t,loading:o,error:n}}},n=new o(t),a=new wm({lazy:n});e.config.globalProperties.$Lazyload=n,t.lazyComponent&&e.component("LazyComponent",bm(n)),t.lazyImage&&e.component("LazyImage",km(n)),e.directive("lazy",{beforeMount:n.add.bind(n),updated:n.update.bind(n),unmounted:n.remove.bind(n)}),e.directive("lazy-container",{beforeMount:a.bind.bind(a),updated:a.update.bind(a),unmounted:a.unbind.bind(a)})}});const Sm=e("version","4.7.2");function Cm(e){[$t,wo,To,Ko,Il,ni,Pa,xi,Ut,Bi,fo,_i,rr,vr,za,br,Dr,Or,Lr,Xr,Jr,as,ls,ds,bs,Cs,Os,Ls,Ws,ec,lc,fc,wc,Ac,Vc,Gs,Ka,Mc,jc,Ra,Gc,Qc,oo,or,du,wu,ku,Du,uo,it,zu,Ru,Gu,ad,Fo,dd,fd,ka,gd,rp,Uo,pp,yp,Gl,Ll,Cp,zp,Ep,Hp,Gp,ev,lv,dv,$v,kv,Hv,Ov,fv,Yv,_v,ih,ph,vh,En,yh,Hn,Ch,oa,yl,ra,Ih,$h,sa,Nl,Hh,Xh,hl,_h,sm,vm].forEach((t=>{t.install?e.use(t):t.name&&e.component(t.name,t)}))}e("default",{install:Cm,version:Sm})}}}));