2026-03-07 16:09:22 +03:30
|
|
|
import{i as Ce,a as Pe,n as ke,t as w,b as C,c as P,m as k,d as x,e as D,f as xe,w as T,u as ae,g as _,h as Se,s as Ee,p as Te,j as _e}from"./BLlRvrPP.js";import{aU as se,ag as ce,l as L,r as y,J as Z,aV as N,aa as le,by as Ae,de as V,bk as Be,a0 as $,o as re,af as U,dd as ie,K as G,d as A,D as d,df as E,e as ze,U as ue,cV as de,a6 as fe,a7 as ve,a1 as De}from"./sHYMdOhR.js";var H=typeof window<"u";function Pn(e){const n=se(e,null);if(n){const t=N(),{link:a,unlink:s,internalChildren:l}=n;a(t),ce(()=>s(t));const r=L(()=>l.indexOf(t));return{parent:n,index:r}}return{parent:null,index:y(-1)}}function Le(e){const n=[],t=a=>{Array.isArray(a)&&a.forEach(s=>{var l;Ae(s)&&(n.push(s),(l=s.component)!=null&&l.subTree&&(n.push(s.component.subTree),t(s.component.subTree.children)),s.children&&t(s.children))})};return t(e),n}var J=(e,n)=>{const t=e.indexOf(n);return t===-1?e.findIndex(a=>n.key!==void 0&&n.key!==null&&a.type===n.type&&a.key===n.key):t};function Ne(e,n,t){const a=Le(e.subTree.children);t.sort((l,r)=>J(a,l.vnode)-J(a,r.vnode));const s=t.map(l=>l.proxy);n.sort((l,r)=>{const o=s.indexOf(l),i=s.indexOf(r);return o-i})}function kn(e){const n=Z([]),t=Z([]),a=N();return{children:n,linkChildren:l=>{le(e,Object.assign({link:i=>{i.proxy&&(t.push(i),n.push(i.proxy),Ne(a,n,t))},unlink:i=>{const u=t.indexOf(i);n.splice(u,1),t.splice(u,1)},children:n,internalChildren:t},l))}}}function me(e){let n;re(()=>{e(),U(()=>{n=!0})}),ie(()=>{n&&e()})}function ye(e,n,t={}){if(!H)return;const{target:a=window,passive:s=!1,capture:l=!1}=t;let r=!1,o;const i=c=>{if(r)return;const v=G(c);v&&!o&&(v.addEventListener(e,n,{capture:l,passive:s}),o=!0)},u=c=>{if(r)return;const v=G(c);v&&o&&(v.removeEventListener(e,n,l),o=!1)};ce(()=>u(a)),V(()=>u(a)),me(()=>i(a));let f;return Be(a)&&(f=$(a,(c,v)=>{u(v),i(c)})),()=>{f?.(),u(a),r=!0}}var z,K;function $e(){if(!z&&(z=y(0),K=y(0),H)){const e=()=>{z.value=window.innerWidth,K.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:z,height:K}}var Re=/scroll|auto|overlay/i,Ye=H?window:void 0;function je(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Ke(e,n=Ye){let t=e;for(;t&&t!==n&&je(t);){const{overflowY:a}=window.getComputedStyle(t);if(Re.test(a))return t;t=t.parentNode}return n}Ce();const Me=e=>e.stopPropagation();function he(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),Me(e)}$e();const xn="van-hairline",ge="van-haptics-feedback",q=5;function Ve(e,{args:n=[],done:t,canceled:a,error:s}){if(e){const l=e.apply(null,n);Pe(l)?l.then(r=>{r?t():a&&a()}).catch(s||ke):l?t():a&&a()}else t()}const[Ue,Q]=x("badge"),He={dot:Boolean,max:C,tag:k("div"),color:String,offset:Array,content:C,showZero:w,position:k("top-right")};var Xe=A({name:Ue,props:He,setup(e,{slots:n}){const t=()=>{if(n.content)return!0;const{content:o,showZero:i}=e;return D(o)&&o!==""&&(i||o!==0&&o!=="0")},a=()=>{const{dot:o,max:i,content:u}=e;if(!o&&t())return n.content?n.content():D(i)&&xe(u)&&+u>+i?`${i}+`:u},s=o=>o.startsWith("-")?o.replace("-",""):`-${o}`,l=L(()=>{const o={background:e.color};if(e.offset){const[i,u]=e.offset,{position:f}=e,[c,v]=f.split("-");n.default?(typeof u=="number"?o[c]=P(c==="top"?u:-u):o[c]=c==="top"?P(u):s(u),typeof i=="number"?o[v]=P(v==="left"?i:-i):o[v]=v==="left"?P(i):s(i)):(o.marginTop=P(u),o.marginLeft=P(i))}return o}),r=()=>{if(t()||e.dot)return d("div",{class:Q([e.position,{dot:e.dot,fixed:!!n.default}]),style:l.value},[a()])};return()=>{if(n.default){const{tag:o}=e;return d(o,{class:Q("wrapper")},{default:()=>[n.default(),r()]})}return r()}}});const Fe=T(Xe);let We=2e3;const Ze=()=>++We,[Ge]=x("config-provider"),Je=Symbol(Ge),[qe,ee]=x("icon"),Qe=e=>e?.includes("/"),en={dot:Boolean,tag:k("i"),name:String,size:C,badge:C,color:String,badgeProps:Object,classPrefix:String};var nn=A({name:qe,props:en,setup(e,{slots:n}){const t=se(Je,null),a=L(()=>e.classPrefix||t?.iconPrefix||ee());return()=>{const{tag:s,dot:l,name:r,size:o,badge:i,color:u}=e,f=Qe(r);return d(Fe,E({dot:l,ta
|