mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
24 KiB
2 lines
24 KiB
11 months ago
|
import{a as q,o as ue}from"./evtd-9ZCiDXyn.js";import{A as He,F as Se,C as Ve,d as C,p as Xe,g as Te,i as ce,H as I,G as ee,P as ze,N as Z,c as _,h as A,X as Ye,b as K,E as U,n as Ee,u as Ae,I as De,J as Ne,O as _e}from"./@vue-M2CzPUka.js";import{u as te}from"./@css-render-nQ5vzMKz.js";import{h as Pe,u as ae,o as je,i as Ue}from"./vooks-RlHpQsWY.js";import{z as qe}from"./vdirs-gz97tqc5.js";import{R as Ke}from"./@juggle--NVrOerG.js";import{C as Ge}from"./css-render-Adblu2bf.js";let R=[];const Fe=new WeakMap;function Je(){R.forEach(n=>n(...Fe.get(n))),R=[]}function Be(n,...e){Fe.set(n,e),!R.includes(n)&&R.push(n)===1&&requestAnimationFrame(Je)}function Qe(n){return n.composedPath()[0]||null}function he(n){return typeof n=="string"?n.endsWith("px")?Number(n.slice(0,n.length-2)):Number(n):n}function G(n){if(n!=null)return typeof n=="number"?`${n}px`:n.endsWith("px")?n:`${n}px`}function Ze(n=8){return Math.random().toString(16).slice(2,2+n)}function de(n,e,t="default"){const r=e[t];if(r===void 0)throw new Error(`[vueuc/${n}]: slot[${t}] is empty.`);return r()}function fe(n,e=!0,t=[]){return n.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&t.push(He(String(r)));return}if(Array.isArray(r)){fe(r,e,t);return}if(r.type===Se){if(r.children===null)return;Array.isArray(r.children)&&fe(r.children,e,t)}else r.type!==Ve&&t.push(r)}}),t}function pe(n,e,t="default"){const r=e[t];if(r===void 0)throw new Error(`[vueuc/${n}]: slot[${t}] is empty.`);const o=fe(r());if(o.length===1)return o[0];throw new Error(`[vueuc/${n}]: slot[${t}] should have exactly one child.`)}let X=null;function Ie(){if(X===null&&(X=document.getElementById("v-binder-view-measurer"),X===null)){X=document.createElement("div"),X.id="v-binder-view-measurer";const{style:n}=X;n.position="fixed",n.left="0",n.right="0",n.top="0",n.bottom="0",n.pointerEvents="none",n.visibility="hidden",document.body.appendChild(X)}return X.getBoundingClientRect()}function Re(n,e){const t=Ie();return{top:e,left:n,height:0,width:0,right:t.width-n,bottom:t.height-e}}function ie(n){const e=n.getBoundingClientRect(),t=Ie();return{left:e.left-t.left,top:e.top-t.top,bottom:t.height+t.top-e.bottom,right:t.width+t.left-e.right,width:e.width,height:e.height}}function et(n){return n.nodeType===9?null:n.parentNode}function Oe(n){if(n===null)return null;const e=et(n);if(e===null)return null;if(e.nodeType===9)return document;if(e.nodeType===1){const{overflow:t,overflowX:r,overflowY:o}=getComputedStyle(e);if(/(auto|scroll|overlay)/.test(t+o+r))return e}return Oe(e)}const tt=C({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(n){var e;Xe("VBinder",(e=Te())===null||e===void 0?void 0:e.proxy);const t=ce("VBinder",null),r=I(null),o=i=>{r.value=i,t&&n.syncTargetWithParent&&t.setTargetRef(i)};let l=[];const v=()=>{let i=r.value;for(;i=Oe(i),i!==null;)l.push(i);for(const y of l)ue("scroll",y,M,!0)},m=()=>{for(const i of l)q("scroll",i,M,!0);l=[]},d=new Set,g=i=>{d.size===0&&v(),d.has(i)||d.add(i)},w=i=>{d.has(i)&&d.delete(i),d.size===0&&m()},M=()=>{Be(a)},a=()=>{d.forEach(i=>i())},c=new Set,p=i=>{c.size===0&&ue("resize",window,s),c.has(i)||c.add(i)},h=i=>{c.has(i)&&c.delete(i),c.size===0&&q("resize",window,s)},s=()=>{c.forEach(i=>i())};return ee(()=>{q("resize",window,s),m()}),{targetRef:r,setTargetRef:o,addScrollListener:g,removeScrollListener:w,addResizeListener:p,removeResizeListener:h}},render(){return de("binder",this.$slots)}}),St=tt,Tt=C({name:"Target",setup(){const{setTargetRef:n,syncTarget:e}=ce("VBinder");return{syncTarget:e,setTargetDirective:{mounted:n,updated:n}}},render(){const{syncTarget:n,setTargetDirective:e}=this;return n?ze(pe("follower",this.$slots),[[e]]):pe("follower",this.$slots)}});function me(n,e){console.error(`[vueuc/${n}]: ${e}`)}const{c:O}=Ge(),ne="vueuc-style";function ve(n){return n&-n}class nt{constructor(e,t){this.l=e,this.min=t;const r=new Array(e+1);for(let o=0;o<e+1;++o)r[o]=0;this.ft=r}add(e,t){if(t===0)return;const{l:r,ft:o}=this;for(e+=1;e<=r;)o[e]+=t,e+=ve(e)}get(e){return this.sum(e+1)-t
|