System.register(["./index-legacy-fdce4919.js","./index-legacy-03a60eb4.js"],(function(t,e){"use strict";var o,i,s,d,n,f,a,c=document.createElement("style");return c.textContent="._sticky_4d2w6_1{position:sticky;top:0;z-index:99}._white_4d2w6_6{background-color:#fff}._white_4d2w6_6>div{padding-top:.4rem;box-shadow:0 0 .26667rem rgba(216,216,216,.5)}\n",document.head.appendChild(c),{setters:[t=>{o=t.d,i=t.x,s=t.r,d=t.y,n=t.w,f=t.a},t=>{a=t.c}],execute:function(){const e="_sticky_4d2w6_1";t("M",o({name:"m-sticky",props:{position:{type:String,default:"top"},mode:{type:String,default:"fixed"},offsetTop:{type:String,default:"0px"},offsetBottom:{default:"0px"},varName:{type:String,default:"--header-height"}},emits:["barHeight"],setup(t,{slots:o,emit:c}){const l=i({divStyle:{},heightV:0,sectionStyle:{width:"100%",height:"auto",left:"0"}}),p=s(),r=s();return d((()=>{"top"===t.position?l.divStyle.top=t.offsetTop||"0px":l.divStyle.bottom=t.offsetBottom||"0px",a(p.value,(e=>{const o=e[0],{height:i}=o.contentRect;(e=>{l.sectionStyle.height=`${e}px`,l.heightV=e,document.documentElement.style.setProperty(t.varName,`${e}px`),c("barHeight",e)})(i)}))})),n((()=>t.offsetTop),(()=>{l.divStyle.top=t.offsetTop})),n((()=>t.offsetBottom),(()=>{l.divStyle.bottom=t.offsetBottom})),()=>f("div",{style:[l.sectionStyle],class:"sticky"===t.mode&&e},[f("div",{ref:p,class:["van-sticky","fixed"===t.mode?"van-sticky--fixed":""],style:[l.divStyle,l.sectionStyle]},[f("div",{ref:r},[o.default&&o.default()])])])}}))}}}));
