Files
appco_dist/.output/public/_nuxt/eFIXPWs4.js
T
2025-07-27 10:51:22 +03:30

2 lines
3.9 KiB
JavaScript

import{bm as S,b8 as I,ag as _,k as x,r as b,K as P,bn as L,du as $,bB as D,a1 as R,o as M,ae as Y,dm as z,H as k,bh as H,d as B,C as v,dv as V}from"./vNwORUzZ.js";import{m as w,t as W,b as p,c as y,h as m,d as C,k as F,w as A}from"./DmeoQcPT.js";var E=typeof window<"u";function de(e){const n=S(e,null);if(n){const t=I(),{link:r,unlink:i,internalChildren:c}=n;r(t),_(()=>i(t));const d=x(()=>c.indexOf(t));return{parent:n,index:d}}return{parent:null,index:b(-1)}}function j(e){const n=[],t=r=>{Array.isArray(r)&&r.forEach(i=>{var c;H(i)&&(n.push(i),(c=i.component)!=null&&c.subTree&&(n.push(i.component.subTree),t(i.component.subTree.children)),i.children&&t(i.children))})};return t(e),n}var O=(e,n)=>{const t=e.indexOf(n);return t===-1?e.findIndex(r=>n.key!==void 0&&n.key!==null&&r.type===n.type&&r.key===n.key):t};function K(e,n,t){const r=j(e.subTree.children);t.sort((c,d)=>O(r,c.vnode)-O(r,d.vnode));const i=t.map(c=>c.proxy);n.sort((c,d)=>{const o=i.indexOf(c),s=i.indexOf(d);return o-s})}function ue(e){const n=P([]),t=P([]),r=I();return{children:n,linkChildren:c=>{L(e,Object.assign({link:s=>{s.proxy&&(t.push(s),n.push(s.proxy),K(r,n,t))},unlink:s=>{const a=t.indexOf(s);n.splice(a,1),t.splice(a,1)},children:n,internalChildren:t},c))}}}function U(e){let n;M(()=>{e(),Y(()=>{n=!0})}),z(()=>{n&&e()})}function le(e,n,t={}){if(!E)return;const{target:r=window,passive:i=!1,capture:c=!1}=t;let d=!1,o;const s=u=>{if(d)return;const l=k(u);l&&!o&&(l.addEventListener(e,n,{capture:c,passive:i}),o=!0)},a=u=>{if(d)return;const l=k(u);l&&o&&(l.removeEventListener(e,n,c),o=!1)};_(()=>a(r)),$(()=>a(r)),U(()=>s(r));let f;return D(r)&&(f=R(r,(u,l)=>{a(l),s(u)})),()=>{f==null||f(),a(r),d=!0}}var g,h;function fe(){if(!g&&(g=b(0),h=b(0),E)){const e=()=>{g.value=window.innerWidth,h.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:g,height:h}}var Z=/scroll|auto|overlay/i,G=E?window:void 0;function X(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function me(e,n=G){let t=e;for(;t&&t!==n&&X(t);){const{overflowY:r}=window.getComputedStyle(t);if(Z.test(r))return t;t=t.parentNode}return n}const ge="van-hairline",ve="van-haptics-feedback",pe=5,[q,T]=y("badge"),J={dot:Boolean,max:p,tag:w("div"),color:String,offset:Array,content:p,showZero:W,position:w("top-right")};var Q=B({name:q,props:J,setup(e,{slots:n}){const t=()=>{if(n.content)return!0;const{content:o,showZero:s}=e;return C(o)&&o!==""&&(s||o!==0&&o!=="0")},r=()=>{const{dot:o,max:s,content:a}=e;if(!o&&t())return n.content?n.content():C(s)&&F(a)&&+a>+s?`${s}+`:a},i=o=>o.startsWith("-")?o.replace("-",""):`-${o}`,c=x(()=>{const o={background:e.color};if(e.offset){const[s,a]=e.offset,{position:f}=e,[u,l]=f.split("-");n.default?(typeof a=="number"?o[u]=m(u==="top"?a:-a):o[u]=u==="top"?m(a):i(a),typeof s=="number"?o[l]=m(l==="left"?s:-s):o[l]=l==="left"?m(s):i(s)):(o.marginTop=m(a),o.marginLeft=m(s))}return o}),d=()=>{if(t()||e.dot)return v("div",{class:T([e.position,{dot:e.dot,fixed:!!n.default}]),style:c.value},[r()])};return()=>{if(n.default){const{tag:o}=e;return v(o,{class:T("wrapper")},{default:()=>[n.default(),d()]})}return d()}}});const ee=A(Q),[ne,he]=y("config-provider"),te=Symbol(ne),[oe,N]=y("icon"),re=e=>e==null?void 0:e.includes("/"),se={dot:Boolean,tag:w("i"),name:String,size:p,badge:p,color:String,badgeProps:Object,classPrefix:String};var ie=B({name:oe,props:se,setup(e,{slots:n}){const t=S(te,null),r=x(()=>e.classPrefix||(t==null?void 0:t.iconPrefix)||N());return()=>{const{tag:i,dot:c,name:d,size:o,badge:s,color:a}=e,f=re(d);return v(ee,V({dot:c,tag:i,class:[r.value,f?"":`${r.value}-${d}`],style:{color:a,fontSize:m(o)},content:s},e.badgeProps),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n),f&&v("img",{class:N("image"),src:d},null)]}})}}});const be=A(ie);export{ge as B,ve as H,be as I,pe as T,le as a,ue as b,de as c,me as g,U as o,fe as u};