PageSourceSearch

https://blast.tv/ssr-assets/2024-10-15/floating-BNAvEkZb.js

js blast.tv collected 2026-10-02 03:48:17 UTC 22,634 bytes, 1 lines download raw bytes

1import{N as Ge,O as He,a as Je}from"./portal-DRW6cTqK.js";import{r as u,g as Qe}from"./chunk-OIYGIGL5-fdmY2nYp.js";import{n as X,o as Ze,a as Le,p as et}from"./open-closed-DCLMyQr8.js";import{x as tt,z as nt,y as ot,C as rt,D as it,E as st,g as ae,i as T,a as $,c as lt,b as P,d as k,F as xe,e as L,r as $e,f as B,h as Y,j as ge,k as K,l as Z,m as ct,n as Be,o as ft,p as H,q as ee,s as he,t as me,u as oe,v as J,w as We,G as ut}from"./floating-ui.utils.dom-yK12IXwe.js";import{r as te}from"./index-BRQzM_sV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(o){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i])}return o})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:portal-frontend-ssr":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e65a440c-0897-45f8-9ba5-401730b6b439",e._sentryDebugIdIdentifier="sentry-dbid-e65a440c-0897-45f8-9ba5-401730b6b439")}catch{}})();function gn(e){let t=e.parentElement,o=null;for(;t&&!Ge(t);)He(t)&&(o=t),t=t.parentElement;let n=t?.getAttribute("disabled")==="";return n&&at(o)?!1:n}function at(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(He(t))return!1;t=t.previousElementSibling}return!0}function Re(e){if(e===null)return{width:0,height:0};let{width:t,height:o}=e.getBoundingClientRect();return{width:t,height:o}}function hn(e,t,o=!1){let[n,r]=u.useState(()=>Re(t));return X(()=>{if(!t||!e)return;let i=Ze();return i.requestAnimationFrame(function s(){i.requestAnimationFrame(s),r(l=>{let f=Re(t);return f.width===l.width&&f.height===l.height?l:f})}),()=>{i.dispose()}},[t,e]),o?{width:`${n.width}px`,height:`${n.height}px`}:n}function mn(e,t){return u.useMemo(()=>{var o;if(e.type)return e.type;let n=(o=e.as)!=null?o:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||t?.tagName==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function dt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:o,version:n}=t;return o+"/"+n}).join(" "):navigator.userAgent}function Ne(e){const t=L(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=B(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n,l=Y(o)!==i||Y(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function pe(e){return T(e)?e:e.contextElement}function z(e){const t=pe(e);if(!B(t))return P(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=Ne(t);let s=(i?Y(o.width):o.width)/n,l=(i?Y(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const gt=P(0);function _e(e){const t=k(e);return!We()||!t.visualViewport?gt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ht(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==k(e)?!1:t}function V(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),i=pe(e);let s=P(1);t&&(n?T(n)&&(s=z(n)):s=z(e));const l=ht(i,o,n)?_e(i):P(0);let f=(r.left+l.x)/s.x,c=(r.top+l.y)/s.y,d=r.width/s.x,m=r.height/s.y;if(i){const p=k(i),a=n&&T(n)?k(n):n;let g=p,h=xe(g);for(;h&&n&&a!==g;){const y=z(h),w=h.getBoundingClientRect(),R=L(h),v=w.left+(h.clientLeft+parseFloat(R.paddingLeft))*y.x,x=w.top+(h.clientTop+parseFloat(R.paddingTop))*y.y;f*=y.x,c*=y.y,d*=y.x,m*=y.y,f+=v,c+=x,g=k(h),h=xe(g)}}return $e({width:d,height:m,x:f,y:c})}function re(e,t){const o=oe(e).scrollLeft;return t?t.left+o:V($(e)).left+o}function ke(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-re(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function mt(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i=r==="fixed",s=$(n),l=t?ge(t.floating):!1;if(n===s||l&&i)return o;let f={scrollLeft:0,scrollTop:0},c=P(1);const d=P(0),m=B(n);if((m||!m&&!i)&&((he(n)!=="body"||me(s))&&(f=oe(n)),B(n))){const a=V(n);c=z(n),d.x=a.x+n.clientLeft,d.y=a.y+n.clientTop}const p=s&&!m&&!i?ke(s,f):P(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-f.scrollLeft*c.x+d.x+p.x,y:o.y*c.y-f.scrollTop*c.y+d.y+p.y}}function pt(e){return Array.from(e.getClientRects())}function yt(e){const t=$(e),o=oe(e),n=e.ownerDocument.body,r=H(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=H(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+re(e);const l=-o.scrollTop;return L(n).direction==="rtl"&&(s+=H(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:s,y:l}}const be=25;
vendor: 5,024 bytes, line 1
1function vt(e,t){const o=k(e),n=$(e),r=o.visualViewport;let i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(r){i=r.width,s=r.height;const d=We();(!d||d&&t==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=re(n);if(c<=0){const d=n.ownerDocument,m=d.body,p=getComputedStyle(m),a=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-m.clientWidth-a);g<=be&&(i-=g)}else c<=be&&(i+=c);return{width:i,height:s,x:l,y:f}}const wt=new Set(["absolute","fixed"]);function xt(e,t){const o=V(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=B(e)?z(e):P(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=r*i.x,c=n*i.y;return{width:s,height:l,x:f,y:c}}function Ce(e,t,o){let n;if(t==="viewport")n=vt(e,o);else if(t==="document")n=yt($(e));else if(T(t))n=xt(t,o);else{const r=_e(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $e(n)}function Ve(e,t){const o=K(e);return o===t||!T(o)||Z(o)?!1:L(o).position==="fixed"||Ve(o,t)}function Rt(e,t){const o=t.get(e);if(o)return o;let n=ae(e,[],!1).filter(l=>T(l)&&he(l)!=="body"),r=null;const i=L(e).position==="fixed";let s=i?K(e):e;for(;T(s)&&!Z(s);){const l=L(s),f=Be(s);!f&&l.position==="fixed"&&(r=null),(i?!f&&!r:!f&&l.position==="static"&&!!r&&wt.has(r.position)||me(s)&&!f&&Ve(e,s))?n=n.filter(d=>d!==s):r=l,s=K(s)}return t.set(e,n),n}function bt(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const s=[...o==="clippingAncestors"?ge(t)?[]:Rt(t,this._c):[].concat(o),n],l=s[0],f=s.reduce((c,d)=>{const m=Ce(t,d,r);return c.top=H(m.top,c.top),c.right=ee(m.right,c.right),c.bottom=ee(m.bottom,c.bottom),c.left=H(m.left,c.left),c},Ce(t,l,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ct(e){const{width:t,height:o}=Ne(e);return{width:t,height:o}}function Et(e,t,o){const n=B(t),r=$(t),i=o==="fixed",s=V(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const f=P(0);function c(){f.x=re(r)}if(n||!n&&!i)if((he(t)!=="body"||me(r))&&(l=oe(t)),n){const a=V(t,!0,i,t);f.x=a.x+t.clientLeft,f.y=a.y+t.clientTop}else r&&c();i&&!n&&r&&c();const d=r&&!n&&!i?ke(r,l):P(0),m=s.left+l.scrollLeft-f.x-d.x,p=s.top+l.scrollTop-f.y-d.y;return{x:m,y:p,width:s.width,height:s.height}}function se(e){return L(e).position==="static"}function Ee(e,t){if(!B(e)||L(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return $(e)===o&&(o=o.ownerDocument.body),o}function ze(e,t){const o=k(e);if(ge(e))return o;if(!B(e)){let r=K(e);for(;r&&!Z(r);){if(T(r)&&!se(r))return r;r=K(r)}return o}let n=Ee(e,t);for(;n&&ct(n)&&se(n);)n=Ee(n,t);return n&&Z(n)&&se(n)&&!Be(n)?o:n||ft(e)||o}const Ft=async function(e){const t=this.getOffsetParent||ze,o=this.getDimensions,n=await o(e.floating);return{reference:Et(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ot(e){return L(e).direction==="rtl"}const St={convertOffsetParentRelativeRectToViewportRelativeRect:mt,getDocumentElement:$,getClippingRect:bt,getOffsetParent:ze,getElementRects:Ft,getClientRects:pt,getDimensions:Ct,getScale:z,isElement:T,isRTL:Ot};function qe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tt(e,t){let o=null,n;const r=$(e);function i(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function s(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),i();const c=e.getBoundingClientRect(),{left:d,top:m,width:p,height:a}=c;if(l||t(),!p||!a)return;const g=J(m),h=J(r.clientWidth-(d+p)),y=J(r.clientHeight-(m+a)),w=J(d),v={rootMargin:-g+"px "+-h+"px "+-y+"px "+-w+"px",threshold:H(0,ee(1,f))||1};let x=!0;function b(E){const F=E[0].intersectionRatio;if(F!==f){if(!x)return s();F?s(!1,F):n=setTimeout(()=>{s(!1,1e-7)},1e3)}F===1&&!qe(c,e.getBoundingClientRect())&&s(),x=!1}try{o=new IntersectionObserver(b,{...v,root:r.ownerDocument})}catch{o=new IntersectionObserver(b,v)}o.observe(e)}return s(!0),i}function Mt(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,c=pe(e),d=r||i?[...c?ae(c):[],...ae(t)]:[];d.forEach(w=>{r&&w.addEventListener("scroll",o,{passive:!0}),i&&w.addEventListener("resize",o)});const m=c&&l?Tt(c,o):null;let p=-1,a=null;s&&(a=new ResizeObserver(w=>{let[R]=w;R&&R.target===c&&a&&(a.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=a)==null||v.observe(t)})),o()}),c&&!f&&a.observe(c),a.observe(t));let g,h=f?V(e):null;f&&y();function y(){const w=V(e);h&&!qe(h,w)&&o(),h=w,g=requestAnimationFrame(y)}return o(),()=>{var w;d.forEach(R=>{r&&R.removeEventListener("scroll",o),i&&R.removeEventListener("resize",o)}),m?.(),(w=a)==null||w.disconnect(),a=null,f&&cancelAnimationFrame(g)}}const le=it,At=tt,It=nt,Pt=ot,Dt=rt,Fe=st,Ht=(e,t,o)=>{const n=new Map,r={platform:St,...o},i={...r.platform,_c:n};return lt(e,t,{...r,platform:i})};var Lt=typeof document<"u",$t=function(){},Q=Lt?u.useLayoutEffect:$t;function ne(e,t){if(e===t)return!0;
1if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!ne(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!ne(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function je(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oe(e,t){const o=je(e);return Math.round(t*o)/o}function ce(e){const t=u.useRef(e);return Q(()=>{t.current=e}),t}function Bt(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[d,m]=u.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,a]=u.useState(n);ne(p,n)||a(n);const[g,h]=u.useState(null),[y,w]=u.useState(null),R=u.useCallback(C=>{C!==E.current&&(E.current=C,h(C))},[]),v=u.useCallback(C=>{C!==F.current&&(F.current=C,w(C))},[]),x=i||g,b=s||y,E=u.useRef(null),F=u.useRef(null),W=u.useRef(d),G=f!=null,N=ce(f),O=ce(r),_=ce(c),I=u.useCallback(()=>{if(!E.current||!F.current)return;const C={placement:t,strategy:o,middleware:p};O.current&&(C.platform=O.current),Ht(E.current,F.current,C).then(M=>{const S={...M,isPositioned:_.current!==!1};D.current&&!ne(W.current,S)&&(W.current=S,te.flushSync(()=>{m(S)}))})},[p,t,o,O,_]);Q(()=>{c===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,m(C=>({...C,isPositioned:!1})))},[c]);const D=u.useRef(!1);Q(()=>(D.current=!0,()=>{D.current=!1}),[]),Q(()=>{if(x&&(E.current=x),b&&(F.current=b),x&&b){if(N.current)return N.current(x,b,I);I()}},[x,b,I,N,G]);const j=u.useMemo(()=>({reference:E,floating:F,setReference:R,setFloating:v}),[R,v]),A=u.useMemo(()=>({reference:x,floating:b}),[x,b]),U=u.useMemo(()=>{const C={position:o,left:0,top:0};if(!A.floating)return C;const M=Oe(A.floating,d.x),S=Oe(A.floating,d.y);return l?{...C,transform:"translate("+M+"px, "+S+"px)",...je(A.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:M,top:S}},[o,l,A.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:I,refs:j,elements:A,floatingStyles:U}),[d,I,j,A,U])}const Wt=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?Fe({element:n.current,padding:r}).fn(o):{}:n?Fe({element:n,padding:r}).fn(o):{}}}},Ue=(e,t)=>({...At(e),options:[e,t]}),Nt=(e,t)=>({...It(e),options:[e,t]}),_t=(e,t)=>({...Pt(e),options:[e,t]}),kt=(e,t)=>({...Dt(e),options:[e,t]}),pn=(e,t)=>({...Wt(e),options:[e,t]}),Ye={...Qe},Vt=Ye.useInsertionEffect,zt=Vt||(e=>e());function Ke(e){const t=u.useRef(()=>{});return zt(()=>{t.current=e}),u.useCallback(function(){for(var o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}var de=typeof document<"u"?u.useLayoutEffect:u.useEffect;let Se=!1,qt=0;const Te=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qt++;function jt(){const[e,t]=u.useState(()=>Se?Te():void 0);return de(()=>{e==null&&t(Te())},[]),u.useEffect(()=>{Se=!0},[]),e}const Ut=Ye.useId,Yt=Ut||jt;function Kt(){const e=new Map;return{emit(t,o){var n;(n=e.get(t))==null||n.forEach(r=>r(o))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(r=>r!==o))||[])}}}const Xt=u.createContext(null),Gt=u.createContext(null),Jt=()=>{var e;return((e=u.useContext(Xt))==null?void 0:e.id)||null},Qt=()=>u.useContext(Gt),Zt="data-floating-ui-focusable";function en(e){const{open:t=!1,onOpenChange:o,elements:n}=e,r=Yt(),i=u.useRef({}),[s]=u.useState(()=>Kt()),l=Jt()!=null,[f,c]=u.useState(n.reference),d=Ke((a,g,h)=>{i.current.openEvent=a?g:void 0,s.emit("openchange",{open:a,event:g,reason:h,nested:l}),o?.(a,g,h)}),m=u.useMemo(()=>({setPositionReference:c}),[]),p=u.useMemo(()=>({reference:f||n.reference||null,floating:n.floating||null,domReference:n.reference}),[f,n.reference,n.floating]);return u.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:s,floatingId:r,refs:m}),[t,d,p,s,r,m])}function tn(e){e===void 0&&(e={});const{nodeId:t}=e,o=en({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||o,r=n.elements,[i,s]=u.useState(null),[l,f]=u.useState(null),d=r?.domReference||i,m=u.useRef(null),p=Qt();de(()=>{d&&(m.current=d)},[d]);const a=Bt({...e,elements:{...r,...l&&{reference:l}}}),g=u.useCallback(v=>{const x=T(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;f(x),a.refs.setReference(x)},[a.refs]),h=u.useCallback(v=>{(T(v)||v===null)&&(m.current=v,s(v)),(T(a.refs.reference.current)||a.refs.reference.current===null||v!==null&&!T(v))&&a.refs.setReference(v)},[a.refs]),y=u.useMemo(()=>({...a.refs,setReference:h,setPositionReference:g,domReference:m}),[a.refs,h,g]),w=u.useMemo(()=>({...a.elements,domReference:d}),[a.elements,d]),R=u.useMemo(()=>({...a,...n,refs:y,elements:w,nodeId:t}),[a,y,w,t,n]);return de(()=>{n.dataRef.current.floatingContext=R;const v=p?.nodesRef.current.find(x=>x.id===t);v&&(v.context=R)}),u.useMemo(()=>({...a,context:R,refs:y,elements:w}),[a,y,w,R])}const Me="active",Ae="selected";function fe(e,t,o){const n=new Map,r=o==="item";let i=e;if(r&&e){const{[Me]:s,[Ae]:l,...f}=e;i=f}return{...o==="floating"&&{tabIndex:-1,[Zt]:""},...i,...t.map(s=>{const l=s?s[o]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(f=>{let[c,d]=f;if(!(r&&[Me,Ae].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var m;(m=n.get(c))==null||m.push(d),s[c]=function(){for(var p,a=arguments.length,g=new Array(a),h=0;h<a;h++)g[h]=arguments[h];return(p=n.get(c))==null?void 0:p.map(y=>y(...g)).find(y=>y!==void 0)}}}else s[c]=d}),s),{})}}function nn(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),o=e.map(l=>l?.floating),n=e.map(l=>l?.item),r=u.useCallback(l=>fe(l,e,"reference"),t),i=u.useCallback(l=>fe(l,e,"floating"),o),s=u.useCallback(l=>fe(l,e,"item"),n);return u.useMemo(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}function Ie(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const on=e=>({name:"inner",options:e,async fn(t){const{listRef:o,overflowRef:n,onFallbackChange:r,offset:i=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:f=0,scrollRef:c,...d}=ut(e,t),{rects:m,elements:{floating:p}}=t,a=o.current[s],g=c?.current||p,h=p.clientTop||g.clientTop,y=p.clientTop!==0,w=g.clientTop!==0,R=p===g;if(!a)return{};const v={...t,...await Ue(-a.offsetTop-p.clientTop-m.reference.height/2-a.offsetHeight/2-i).fn(t)},x=await le(Ie(v,g.scrollHeight+h+p.clientTop),d),b=await le(v,{...d,elementContext:"reference"}),E=H(0,x.top),F=v.y+E,N=(g.scrollHeight>g.clientHeight?O=>O:Y)(H(0,g.scrollHeight+(y&&R||w?h*2:0)-E-H(0,x.bottom)));if(g.style.maxHeight=N+"px",g.scrollTop=E,r){const O=g.offsetHeight<a.offsetHeight*ee(l,o.
1current.length)-1||b.top>=-f||b.bottom>=-f;te.flushSync(()=>r(O))}return n&&(n.current=await le(Ie({...v,y:F},g.offsetHeight+h+p.clientTop),d)),{y:F}}});function rn(e,t){const{open:o,elements:n}=e,{enabled:r=!0,overflowRef:i,scrollRef:s,onChange:l}=t,f=Ke(l),c=u.useRef(!1),d=u.useRef(null),m=u.useRef(null);u.useEffect(()=>{if(!r)return;function a(h){if(h.ctrlKey||!g||i.current==null)return;const y=h.deltaY,w=i.current.top>=-.5,R=i.current.bottom>=-.5,v=g.scrollHeight-g.clientHeight,x=y<0?-1:1,b=y<0?"max":"min";g.scrollHeight<=g.clientHeight||(!w&&y>0||!R&&y<0?(h.preventDefault(),te.flushSync(()=>{f(E=>E+Math[b](y,v*x))})):/firefox/i.test(dt())&&(g.scrollTop+=y))}const g=s?.current||n.floating;if(o&&g)return g.addEventListener("wheel",a),requestAnimationFrame(()=>{d.current=g.scrollTop,i.current!=null&&(m.current={...i.current})}),()=>{d.current=null,m.current=null,g.removeEventListener("wheel",a)}},[r,o,n.floating,i,s,f]);const p=u.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const a=s?.current||n.floating;if(!(!i.current||!a||!c.current)){if(d.current!==null){const g=a.scrollTop-d.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&te.flushSync(()=>f(h=>h+g))}requestAnimationFrame(()=>{d.current=a.scrollTop})}}}),[n.floating,f,i,s]);return u.useMemo(()=>r?{floating:p}:{},[r,p])}let q=u.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});q.displayName="FloatingContext";let ye=u.createContext(null);ye.displayName="PlacementContext";function yn(e){return u.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function vn(){return u.useContext(q).setReference}function wn(){return u.useContext(q).getReferenceProps}function xn(){let{getFloatingProps:e,slot:t}=u.useContext(q);return u.useCallback((...o)=>Object.assign({},e(...o),{"data-anchor":t.anchor}),[e,t])}function Rn(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=u.useContext(ye),o=u.useMemo(()=>e,[JSON.stringify(e,(r,i)=>{var s;return(s=i?.outerHTML)!=null?s:i})]);X(()=>{t?.(o??null)},[t,o]);let n=u.useContext(q);return u.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let Pe=4;function bn({children:e,enabled:t=!0}){let[o,n]=u.useState(null),[r,i]=u.useState(0),s=u.useRef(null),[l,f]=u.useState(null);sn(l);let c=t&&o!==null&&l!==null,{to:d="bottom",gap:m=0,offset:p=0,padding:a=0,inner:g}=ln(o,l),[h,y="center"]=d.split(" ");X(()=>{c&&i(0)},[c]);let{refs:w,floatingStyles:R,context:v}=tn({open:c,placement:h==="selection"?y==="center"?"bottom":`bottom-${y}`:y==="center"?`${h}`:`${h}-${y}`,strategy:"absolute",transform:!1,middleware:[Ue({mainAxis:h==="selection"?0:m,crossAxis:p}),Nt({padding:a}),h!=="selection"&&_t({padding:a}),h==="selection"&&g?on({...g,padding:a,overflowRef:s,offset:r,minItemsVisible:Pe,referenceOverflowThreshold:a,onFallbackChange(O){var _,I;if(!O)return;let D=v.elements.floating;if(!D)return;let j=parseFloat(getComputedStyle(D).scrollPaddingBottom)||0,A=Math.min(Pe,D.childElementCount),U=0,C=0;for(let M of(I=(_=v.elements.floating)==null?void 0:_.childNodes)!=null?I:[])if(Je(M)){let S=M.offsetTop,ve=S+M.clientHeight+j,ie=D.scrollTop,we=ie+D.clientHeight;if(S>=ie&&ve<=we)A--;else{C=Math.max(0,Math.min(ve,we)-Math.max(S,ie)),U=M.clientHeight;break}}A>=1&&i(M=>{let S=U*A-C+j;return M>=S?M:S})}}):null,kt({padding:a,apply({availableWidth:O,availableHeight:_,elements:I}){Object.assign(I.floating.style,{overflow:"auto",maxWidth:`${O}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${_}px)`})}})].filter(Boolean),whileElementsMounted:Mt}),[x=h,b=y]=v.placement.split("-");h==="selection"&&(x="selection");let E=u.useMemo(()=>({anchor:[x,b].filter(Boolean).join(" ")}),[x,b]),F=rn(v,{overflowRef:s,onChange:i}),{getReferenceProps:W,getFloatingProps:G}=nn([F]),N=Le(O=>{f(O),w.setFloating(O)});return u.createElement(ye.Provider,{value:n},u.createElement(q.Provider,{value:{setFloating:N,setReference:w.setReference,styles:R,getReferenceProps:W,getFloatingProps:G,slot:E}},e))}function sn(e){X(()=>
1{if(!e)return;let t=new MutationObserver(()=>{let o=window.getComputedStyle(e).maxHeight,n=parseFloat(o);if(isNaN(n))return;let r=parseInt(o);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function ln(e,t){var o,n,r;let i=ue((o=e?.gap)!=null?o:"var(--anchor-gap, 0)",t),s=ue((n=e?.offset)!=null?n:"var(--anchor-offset, 0)",t),l=ue((r=e?.padding)!=null?r:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:l}}function ue(e,t,o=void 0){let n=et(),r=Le((f,c)=>{if(f==null)return[o,null];if(typeof f=="number")return[f,null];if(typeof f=="string"){if(!c)return[o,null];let d=De(f,c);return[d,m=>{let p=Xe(f);{let a=p.map(g=>window.getComputedStyle(c).getPropertyValue(g));n.requestAnimationFrame(function g(){n.nextFrame(g);let h=!1;for(let[w,R]of p.entries()){let v=window.getComputedStyle(c).getPropertyValue(R);if(a[w]!==v){a[w]=v,h=!0;break}}if(!h)return;let y=De(f,c);d!==y&&(m(y),d=y)})}return n.dispose}]}return[o,null]}),i=u.useMemo(()=>r(e,t)[0],[e,t]),[s=i,l]=u.useState();return X(()=>{let[f,c]=r(e,t);if(l(f),!!c)return c(l)},[e,t]),s}function Xe(e){let t=/var\((.*)\)/.exec(e);if(t){let o=t[1].indexOf(",");if(o===-1)return[t[1]];let n=t[1].slice(0,o).trim(),r=t[1].slice(o+1).trim();return r?[n,...Xe(r)]:[n]}return[]}function De(e,t){let o=document.createElement("div");t.appendChild(o),o.style.setProperty("margin-top","0px","important"),o.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(o).marginTop)||0;return t.removeChild(o),n}export{bn as A,vn as F,Rn as R,xn as T,pn as a,wn as b,mn as e,gn as s,tn as u,hn as w,yn as y};

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.