System.register(["./index-legacy-af5a4389.js"],(function(t,e){"use strict";var o,i,n,f,s,d,u,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:[function(t){o=t.d,i=t.O,n=t.i,f=t.o,s=t.y,d=t.w,u=t.g,a=t.Y}],execute:function(){var 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:function(t,o){var c=o.slots,r=o.emit,l=i({divStyle:{},heightV:0,sectionStyle:{width:"100%",height:"auto",left:"0"}}),p=function(e){l.sectionStyle.height="".concat(e,"px"),l.heightV=e,document.documentElement.style.setProperty(t.varName,"".concat(e,"px")),r("barHeight",e)},h=n(),y=n();return f((function(){"top"===t.position?l.divStyle.top=t.offsetTop||"0px":l.divStyle.bottom=t.offsetBottom||"0px",s((function(){if(h.value){var e=a(h.value).height;p(e),setTimeout((function(){var t=a(h.value).height;t!==l.heightV&&p(t)}),200)}y.value&&setTimeout((function(){var e=a(y.value).height;e!==l.heightV&&"top"===t.position&&p(e)}),1e3)}))})),d((function(){return t.offsetTop}),(function(){l.divStyle.top=t.offsetTop})),d((function(){return t.offsetBottom}),(function(){l.divStyle.bottom=t.offsetBottom})),function(){return u("div",{style:[l.sectionStyle],class:"sticky"===t.mode&&e},[u("div",{ref:h,class:["van-sticky","fixed"===t.mode?"van-sticky--fixed":""],style:[l.divStyle,l.sectionStyle]},[u("div",{ref:y},[c.default&&c.default()])])])}}}))}}}));
