1import{C as E,N as l,u as B}from"./L40OcWrG.js";let d=null,m=null,p=null;const c=l(new Set),s=l(new Set);let b;function L(){d??=l({backgrounds:c,observedElements:s,observe:C,addBackground:A}),m??=new IntersectionObserver(r);function r(n){n.forEach(e=>{const t=Array.from(c).find(o=>o.elm===e.target);t&&(t.inView=e.isIntersecting)})}return E(n=>{[...c].forEach(e=>{e.isActive?m.observe(e.elm):e.unregister()}),[...s].forEach(e=>{e.isActive||e.unregister()}),s.size>0&&(u(),c.size>0&&(window.addEventListener("resize",u,{passive:!0}),window.addEventListener("scroll",u,{passive:!0}))),n(()=>{window.removeEventListener("resize",u),window.removeEventListener("scroll",u),m.disconnect()})}),u(),d}function A(r){const n=Array.from(c).find(t=>t.elm===r);if(n)return n;const e=h(r);return c.add(e),[...s].forEach(t=>{t?.update?.()}),e}function h(r,n){const e=l({elm:r,inView:!0,handler:d,unregister(){e.observer?.disconnect?.(),c.delete(e)},get isActive(){return c.has(e)&&r},...n||{}});return e}function C(r,n){b??=h(document.documentElement,{inView:!0});const e=Array.from(s).find(i=>i.elm===r);if(e)return e;const t=l({elm:r,background:b,backgroundColor:n?.backgroundColor??void 0,handler:d,update:o,unregister(){s.delete(t)},get isActive(){return s.has(t)&&r}});E(o);function o(){let i;const a=t.background?.elm;a&&(i=a.dataset.color),t.backgroundColor=i??n?.backgroundColor??B().pageColor??void 0}return s.add(t),t}function u(){window.cancelAnimationFrame(p),p=window.requestAnimationFrame(()=>{const r=Array.from(d.backgrounds).filter(n=>n.inView);[...s].forEach(n=>{const e=r.find(t=>{const{top:o,bottom:i}=n.elm.getBoundingClientRect(),{top:a,bottom:f}=t.elm.getBoundingClientRect(),k=n.elm.closest(".p-page"),v=t.elm.closest(".p-page");if(k&&v&&k!==v)return!1;let g=0;if(o!==i&&a!==f){const w=i-o;i>a&&o<f&&(o<a?g=(i-a)/w:i>f?g=(f-o)/w:g=1)}return g>=.5});n.background=e??b})})}export{L as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.