PageSourceSearch

https://image.news1.kr/system/_sjs/_next/static/chunks/26770aaf-e6b6c5ce8f7ef829.js

js news1.kr collected 2026-09-24 08:38:38 UTC 55,753 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2982],{94993:function(e,t,n){let r;n.r(t),n.d(t,{Composite:function(){return j},CompositeItem:function(){return H},FloatingArrow:function(){return G},FloatingDelayGroup:function(){return ef},FloatingFocusManager:function(){return eB},FloatingList:function(){return D},FloatingNode:function(){return et},FloatingOverlay:function(){return ez},FloatingPortal:function(){return eK},FloatingTree:function(){return en},arrow:function(){return f.x7},autoPlacement:function(){return f.X5},autoUpdate:function(){return d.Me},computePosition:function(){return d.oo},detectOverflow:function(){return d.US},flip:function(){return f.RR},getOverflowAncestors:function(){return c.Kx},hide:function(){return f.Cp},inline:function(){return f.Qo},inner:function(){return tv},limitShift:function(){return f.dr},offset:function(){return f.cv},platform:function(){return d.Jv},safePolygon:function(){return tg},shift:function(){return f.uY},size:function(){return f.dp},useClick:function(){return eV},useClientPoint:function(){return eJ},useDelayGroup:function(){return ed},useDelayGroupContext:function(){return es},useDismiss:function(){return e1},useFloating:function(){return e7},useFloatingNodeId:function(){return ee},useFloatingParentNodeId:function(){return Q},useFloatingPortalNode:function(){return eF},useFloatingRootContext:function(){return e2},useFloatingTree:function(){return $},useFocus:function(){return e3},useHover:function(){return ei},useId:function(){return z},useInnerOffset:function(){return tm},useInteractions:function(){return e8},useListItem:function(){return F},useListNavigation:function(){return tu},useMergeRefs:function(){return v},useRole:function(){return tl},useTransitionStatus:function(){return ta},useTransitionStyles:function(){return ts},useTypeahead:function(){return tf}});var u,o=n(67294),l=n(97145),i=n(71347),c=n(37317),a=n(88388),s=n(73935),f=n(1371),d=n(29545);function v(e){return o.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})},e)}let m={...u||(u=n.t(o,2))},p=m.useInsertionEffect||(e=>e());function g(e){let t=o.useRef(()=>{});return p(()=>{t.current=e}),o.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}let h="ArrowUp",y="ArrowDown",E="ArrowLeft",b="ArrowRight";function w(e,t,n){return Math.floor(e/t)!==n}function x(e,t){return t<0||t>=e.current.length}function R(e,t){return M(e,{disabledIndices:t})}function k(e,t){return M(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function M(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:u,amount:o=1}=void 0===t?{}:t,l=e.current,i=n;do i+=r?-o:o;while(i>=0&&i<=l.length-1&&A(l,i,u));return i}function C(e,t){let{event:n,orientation:r,loop:u,rtl:o,cols:c,disabledIndices:a,minIndex:s,maxIndex:f,prevIndex:d,stopEvent:v=!1}=t,m=d;if(n.key===h){if(v&&(0,l.p7)(n),-1===d)m=f;else if(m=M(e,{startingIndex:m,amount:c,decrement:!0,disabledIndices:a}),u&&(d-c<s||m<0)){let e=d%c,t=f%c,n=f-(t-e);m=t===e?f:t>e?n:n-c}x(e,m)&&(m=d)}if(n.key===y&&(v&&(0,l.p7)(n),-1===d?m=s:(m=M(e,{startingIndex:d,amount:c,disabledIndices:a}),u&&d+c>f&&(m=M(e,{startingIndex:d%c-c,amount:c,disabledIndices:a}))),x(e,m)&&(m=d)),"both"===r){let t=(0,i.GW)(d/c);n.key===(o?E:b)&&(v&&(0,l.p7)(n),d%c!=c-1?(m=M(e,{startingIndex:d,disabledIndices:a}),u&&w(m,c,t)&&(m=M(e,{startingIndex:d-d%c-1,disabledIndices:a}))):u&&(m=M(e,{startingIndex:d-d%c-1,disabledIndices:a})),w(m,c,t)&&(m=d)),n.key===(o?b:E)&&(v&&(0,l.p7)(n),d%c!=0?(m=M(e,{startingIndex:d,decrement:!0,disabledIndices:a}),u&&w(m,c,t)&&(m=M(e,{startingIndex:d+(c-d%c),decrement:!0,disabledIndices:a}))):u&&(m=M(e,{startingIndex:d+(c-d%c),decrement:!0,disabledIndices:a})),w(m,c,t)&&(m=d));let r=(0,i.GW)(f/c)===t;x(e,m)&&(m=u&&r?n.key===(o?b:E)?f:M(e,{startingIndex:d-d%c-1,disabledIndices:a}):d)}return m}function T(e,t,n){let r=[],u=0;return e.forEach((e,o)=>{let{width:l,height:i}=e,c=!1;for(n&&(u=0);!c;){let e=[];for(let n=0;n<l;n++)for(let r=0;r<i;r++)e.push(u+n+r*t);u%t+l<=t&&e.every(e=>
1null==r[e])?(e.forEach(e=>{r[e]=o}),c=!0):u++}}),[...r]}function I(e,t,n,r,u){if(-1===e)return -1;let o=n.indexOf(e),l=t[e];switch(u){case"tl":return o;case"tr":if(!l)return o;return o+l.width-1;case"bl":if(!l)return o;return o+(l.height-1)*r;case"br":return n.lastIndexOf(e)}}function L(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function A(e,t,n){if(n)return n.includes(t);let r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var P="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function S(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}let O=o.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function D(e){let{children:t,elementsRef:n,labelsRef:r}=e,[u,l]=o.useState(()=>new Map),i=o.useCallback(e=>{l(t=>new Map(t).set(e,null))},[]),c=o.useCallback(e=>{l(t=>{let n=new Map(t);return n.delete(e),n})},[]);return P(()=>{let e=new Map(u);Array.from(e.keys()).sort(S).forEach((t,n)=>{e.set(t,n)}),!function(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(u,e)&&l(e)},[u]),o.createElement(O.Provider,{value:o.useMemo(()=>({register:i,unregister:c,map:u,elementsRef:n,labelsRef:r}),[i,c,u,n,r])},t)}function F(e){void 0===e&&(e={});let{label:t}=e,{register:n,unregister:r,map:u,elementsRef:l,labelsRef:i}=o.useContext(O),[c,a]=o.useState(null),s=o.useRef(null),f=o.useCallback(e=>{if(s.current=e,null!==c&&(l.current[c]=e,i)){var n;let r=void 0!==t;i.current[c]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[c,l,i,t]);return P(()=>{let e=s.current;if(e)return n(e),()=>{r(e)}},[n,r]),P(()=>{let e=s.current?u.get(s.current):null;null!=e&&a(e)},[u]),o.useMemo(()=>({ref:f,index:null==c?-1:c}),[c,f])}function K(e,t){return"function"==typeof e?e(t):e?o.cloneElement(e,t):o.createElement("div",t)}let N=o.createContext({activeIndex:0,onNavigate:()=>{}}),W=[E,b],_=[h,y],U=[...W,..._],j=o.forwardRef(function(e,t){let{render:n,orientation:r="both",loop:u=!0,rtl:l=!1,cols:i=1,disabledIndices:c,activeIndex:a,onNavigate:s,itemSizes:f,dense:d=!1,...v}=e,[m,p]=o.useState(0),w=null!=a?a:m,P=g(null!=s?s:p),S=o.useRef([]),O=n&&"function"!=typeof n?n.props:{},F=o.useMemo(()=>({activeIndex:w,onNavigate:P}),[w,P]),j=i>1,H={...v,...O,ref:t,"aria-orientation":"both"===r?void 0:r,onKeyDown(e){null==v.onKeyDown||v.onKeyDown(e),null==O.onKeyDown||O.onKeyDown(e),function(e){if(!U.includes(e.key))return;let t=w,n=R(S,c),o=k(S,c),a=l?E:b,s=l?b:E;if(j){let s=f||Array.from({length:S.current.length},()=>({width:1,height:1})),v=T(s,i,d),m=v.findIndex(e=>null!=e&&!A(S.current,e,c)),p=v.reduce((e,t,n)=>null==t||A(S.current,t,c)?e:n,-1),g=v[C({current:v.map(e=>e?S.current[e]:null)},{event:e,orientation:r,loop:u,rtl:l,cols:i,disabledIndices:L([...c||S.current.map((e,t)=>A(S.current,t)?t:void 0),void 0],v),minIndex:m,maxIndex:p,prevIndex:I(w>o?n:w,s,v,i,e.key===y?"bl":e.key===a?"tr":"tl")})];null!=g&&(t=g)}let v={horizontal:[a],vertical:[y],both:[a,y]}[r],m={horizontal:[s],vertical:[h],both:[s,h]}[r],p=j?U:({horizontal:W,vertical:_,both:U})[r];if(t===w&&[...v,...m].includes(e.key)&&(t=u&&t===o&&v.includes(e.key)?n:u&&t===n&&m.includes(e.key)?o:M(S,{startingIndex:t,decrement:m.includes(e.key),disabledIndices:c})),t!==w&&!x(S,t)){var g;e.stopPropagation(),p.includes(e.key)&&e.preventDefault(),P(t),null==(g=S.current[t])||g.focus()}}(e)}};return o.createElement(N.Provider,{value:F},o.createElement(D,{elementsRef:S},K(n,H)))}),H=o.forwardRef(function(e,t){let{render:n,...r}=e,u=n&&"function"!=typeof n?n.props:{},{activeIndex:l,onNavigate:i}=o.useContext(N),{ref:c,index:a}=F(),s=v([c,t,u.ref]),f=l===a;return K(n,{...r,...u,ref:s,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(e){null==r.onFocus||r.onFocus(e),null==u.onFocus||u.onFocus(e),i(a)}})});function q(){return(q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let B=!1,X=0,Y=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+X++,z=m.useId||function(){let[e,t]=o.useState(()=>B?Y():void 0);return P(()=>{null==e&&t(Y())},[]),o.useEffect(()=>{B=!0},[]),e}
1,G=o.forwardRef(function(e,t){let{context:{placement:n,elements:{floating:r},middlewareData:{arrow:u,shift:l}},width:i=14,height:a=7,tipRadius:s=0,strokeWidth:f=0,staticOffset:d,stroke:v,d:m,style:{transform:p,...g}={},...h}=e,y=z(),[E,b]=o.useState(!1);if(P(()=>{r&&"rtl"===(0,c.Dx)(r).direction&&b(!0)},[r]),!r)return null;let[w,x]=n.split("-"),R="top"===w||"bottom"===w,k=d;(R&&null!=l&&l.x||!R&&null!=l&&l.y)&&(k=null);let M=2*f,C=M/2,T=i/2*(-(s/8)+1),I=a/2*s/4,L=!!m,A=k&&"end"===x?"bottom":"top",S=k&&"end"===x?"right":"left";k&&E&&(S="end"===x?"left":"right");let O=(null==u?void 0:u.x)!=null?k||u.x:"",D=(null==u?void 0:u.y)!=null?k||u.y:"",F=m||"M0,0 H"+i+" L"+(i-T)+","+(a-I)+(" Q"+i/2+","+a+" ")+T+","+(a-I)+" Z",K={top:L?"rotate(180deg)":"",left:L?"rotate(90deg)":"rotate(-90deg)",bottom:L?"":"rotate(180deg)",right:L?"rotate(-90deg)":"rotate(90deg)"}[w];return o.createElement("svg",q({},h,{"aria-hidden":!0,ref:t,width:L?i:i+M,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[S]:O,[A]:D,[w]:R||L?"100%":"calc(100% - "+M/2+"px)",transform:[K,p].filter(e=>!!e).join(" "),...g}}),M>0&&o.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:v,strokeWidth:M+(m?0:1),d:F}),o.createElement("path",{stroke:M&&!m?h.fill:"none",d:F}),o.createElement("clipPath",{id:y},o.createElement("rect",{x:-C,y:C*(L?-1:1),width:i+M,height:i})))});function V(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}let Z=o.createContext(null),J=o.createContext(null),Q=()=>{var e;return(null==(e=o.useContext(Z))?void 0:e.id)||null},$=()=>o.useContext(J);function ee(e){let t=z(),n=$(),r=Q(),u=e||r;return P(()=>{let e={id:t,parentId:u};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}},[n,t,u]),t}function et(e){let{children:t,id:n}=e,r=Q();return o.createElement(Z.Provider,{value:o.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function en(e){let{children:t}=e,n=o.useRef([]),r=o.useCallback(e=>{n.current=[...n.current,e]},[]),u=o.useCallback(e=>{n.current=n.current.filter(t=>t!==e)},[]),l=o.useState(()=>V())[0];return o.createElement(J.Provider,{value:o.useMemo(()=>({nodesRef:n,addNode:r,removeNode:u,events:l}),[r,u,l])},t)}function er(e){return"data-floating-ui-"+e}function eu(e){let t=(0,o.useRef)(e);return P(()=>{t.current=e}),t}let eo=er("safe-polygon");function el(e,t,n){return n&&!(0,l.r)(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function ei(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,dataRef:u,events:i,elements:a}=e,{enabled:s=!0,delay:f=0,handleClose:d=null,mouseOnly:v=!1,restMs:m=0,move:p=!0}=t,h=$(),y=Q(),E=eu(d),b=eu(f),w=eu(n),x=o.useRef(),R=o.useRef(-1),k=o.useRef(),M=o.useRef(-1),C=o.useRef(!0),T=o.useRef(!1),I=o.useRef(()=>{}),L=o.useRef(!1),A=o.useCallback(()=>{var e;let t=null==(e=u.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[u]);o.useEffect(()=>{if(s)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(R.current),clearTimeout(M.current),C.current=!0,L.current=!1)}},[s,i]),o.useEffect(()=>{if(!s||!E.current||!n)return;function e(e){A()&&r(!1,e,"hover")}let t=(0,l.Me)(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[a.floating,n,r,s,E,A]);let S=o.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");let u=el(b.current,"close",x.current);u&&!k.current?(clearTimeout(R.current),R.current=window.setTimeout(()=>r(!1,e,n),u)):t&&(clearTimeout(R.current),r(!1,e,n))},[b,r]),O=g(()=>{I.current(),k.current=void 0}),D=g(()=>{if(T.current){let e=(0,l.Me)(a.floating).body;e.style.pointerEvents="",e.removeAttribute(eo),T.current=!1}}),F=g(()=>!!u.current.openEvent&&["click","mousedown"].includes(u.current.openEvent.type));o.useEffect(()=>{if(s&&(0,c.kK)(a.domReference)){var e;let r=a.domReference;return n&&r.addEventListener("mouseleave",i),null==(e=a.floating)||e.addEventListener("mouseleave",i),p&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",o),()=>{var e;n&&r.removeEventListener("mouseleave",i),null==(e=a.floating)||e.removeEventListener("mouseleave",i),p&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",o)}}function t(e){if(clearTimeout(R.current),C.current=!1,v&&!(0,l.r)(x.current)||m>0&&!el(b.current,"open"))return;let t=el(b.current,"open",x.current);t?R.current=window.setTimeout(()=>{w.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function o(e){if(F())return;I.current();let t=(0,l.Me)(a.floating);
1if(clearTimeout(M.current),L.current=!1,E.current&&u.current.floatingContext){n||clearTimeout(R.current),k.current=E.current({...u.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),O(),F()||S(e,!0,"safe-polygon")}});let r=k.current;t.addEventListener("mousemove",r),I.current=()=>{t.removeEventListener("mousemove",r)};return}"touch"===x.current&&(0,l.r3)(a.floating,e.relatedTarget)||S(e)}function i(e){!F()&&u.current.floatingContext&&(null==E.current||E.current({...u.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),O(),F()||S(e)}})(e))}},[a,s,e,v,m,p,S,O,D,r,n,w,h,b,E,u,F]),P(()=>{var e,t;if(s&&n&&null!=(e=E.current)&&e.__options.blockPointerEvents&&A()){T.current=!0;let e=a.floating;if((0,c.kK)(a.domReference)&&e){let n=(0,l.Me)(a.floating).body;n.setAttribute(eo,"");let r=a.domReference,u=null==h||null==(t=h.nodesRef.current.find(e=>e.id===y))||null==(t=t.context)?void 0:t.elements.floating;return u&&(u.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[s,n,y,a,h,E,A]),P(()=>{n||(x.current=void 0,L.current=!1,O(),D())},[n,O,D]),o.useEffect(()=>()=>{O(),clearTimeout(R.current),clearTimeout(M.current),D()},[s,a.domReference,O,D]);let K=o.useMemo(()=>{function e(e){x.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function u(){C.current||w.current||r(!0,t,"hover")}!(!v||(0,l.r)(x.current))||n||0===m||L.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(M.current),"touch"===x.current?u():(L.current=!0,M.current=window.setTimeout(u,m)))}}},[v,r,n,w,m]),N=o.useMemo(()=>({onMouseEnter(){clearTimeout(R.current)},onMouseLeave(e){F()||S(e.nativeEvent,!1)}}),[S,F]);return o.useMemo(()=>s?{reference:K,floating:N}:{},[s,K,N])}let ec=()=>{},ea=o.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:ec,setState:ec,isInstantPhase:!1}),es=()=>o.useContext(ea);function ef(e){let{children:t,delay:n,timeoutMs:r=0}=e,[u,l]=o.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),i=o.useRef(null),c=o.useCallback(e=>{l({currentId:e})},[]);return P(()=>{u.currentId?null===i.current?i.current=u.currentId:u.isInstantPhase||l({isInstantPhase:!0}):(u.isInstantPhase&&l({isInstantPhase:!1}),i.current=null)},[u.currentId,u.isInstantPhase]),o.createElement(ea.Provider,{value:o.useMemo(()=>({...u,setState:l,setCurrentId:c}),[u,c])},t)}function ed(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,floatingId:u}=e,{id:o,enabled:l=!0}=t,i=null!=o?o:u,c=es(),{currentId:a,setCurrentId:s,initialDelay:f,setState:d,timeoutMs:v}=c;return P(()=>{l&&a&&(d({delay:{open:1,close:el(f,"close")}}),a!==i&&r(!1))},[l,i,r,d,a,f]),P(()=>{function e(){r(!1),d({delay:f,currentId:null})}if(l&&a&&!n&&a===i){if(v){let t=window.setTimeout(e,v);return()=>{clearTimeout(t)}}e()}},[l,n,d,a,i,r,f,v]),P(()=>{l&&s!==ec&&n&&s(i)},[l,n,s,i]),c}let ev=0;function em(e,t){void 0===t&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:u=!1}=t;r&&cancelAnimationFrame(ev);let o=()=>null==e?void 0:e.focus({preventScroll:n});u?o():ev=requestAnimationFrame(o)}function ep(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let eg=new WeakMap,eh=new WeakSet,ey={},eE=0,eb=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,ew=e=>e&&(e.host||ew(e.parentNode)),ex=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ew(t);return e.contains(n)?n:null}).filter(e=>null!=e);function eR(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);let r=(0,l.Me)(e[0]).body;return function(e,t,n,r){let u="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,l=ex(t,e),i=new Set,a=new Set(l),s=[];ey[u]||(ey[u]=new WeakMap);let f=ey[u];return l.forEach(function e(t){!(!t||i.has(t))&&(i.add(t),t.parentNode&&e(t.parentNode))}),function e(t){!t||a.has(t)||[].forEach.call(t.children,t=>{if("script"!==(0,c.wk)(t)){if(i.has(t))e(t);else{let e=o?t.getAttribute(o):null,n=null!==e&&"false"!==e,r=(eg.get(t)||0)+1,l=(f.get(t)||0)+1;eg.set(t,r),f.set(t,l),s.push(t),1===r&&n&&eh.add(t),1===l&&t.setAttribute(u,""),!n&&o&&t.setAttribute(o,"true")}}})}(t),i.clear(),eE++,()=>
1{s.forEach(e=>{let t=(eg.get(e)||0)-1,n=(f.get(e)||0)-1;eg.set(e,t),f.set(e,n),t||(!eh.has(e)&&o&&e.removeAttribute(o),eh.delete(e)),n||e.removeAttribute(u)}),--eE||(eg=new WeakMap,eg=new WeakMap,eh=new WeakSet,ey={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}let ek=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eM(e,t){let n=(0,a.ht)(e,ek());"prev"===t&&n.reverse();let r=n.indexOf((0,l.AW)((0,l.Me)(e)));return n.slice(r+1)[0]}function eC(){return eM(document.body,"next")}function eT(){return eM(document.body,"prev")}function eI(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!(0,l.r3)(n,r)}function eL(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}let eA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function eP(e){"Tab"===e.key&&(e.target,clearTimeout(r))}let eS=o.forwardRef(function(e,t){let[n,r]=o.useState();P(()=>((0,l.G6)()&&r("button"),document.addEventListener("keydown",eP),
1()=>{document.removeEventListener("keydown",eP)}),[]);let u={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[er("focus-guard")]:"",style:eA};return o.createElement("span",q({},e,u))}),eO=o.createContext(null),eD=er("portal");function eF(e){void 0===e&&(e={});let{id:t,root:n}=e,r=z(),u=eN(),[l,i]=o.useState(null),a=o.useRef(null);return P(()=>()=>{null==l||l.remove(),queueMicrotask(()=>{a.current=null})},[l]),P(()=>{if(!r||a.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement("div");n.id=r,n.setAttribute(eD,""),e.appendChild(n),a.current=n,i(n)},[t,r]),P(()=>{if(null===n||!r||a.current)return;let e=n||(null==u?void 0:u.portalNode);e&&!(0,c.kK)(e)&&(e=e.current),e=e||document.body;let o=null;t&&((o=document.createElement("div")).id=t,e.appendChild(o));let l=document.createElement("div");l.id=r,l.setAttribute(eD,""),(e=o||e).appendChild(l),a.current=l,i(l)},[t,n,r,u]),l}function eK(e){let{children:t,id:n,root:r,preserveTabOrder:u=!0}=e,l=eF({id:n,root:r}),[i,c]=o.useState(null),f=o.useRef(null),d=o.useRef(null),v=o.useRef(null),m=o.useRef(null),p=null==i?void 0:i.modal,g=null==i?void 0:i.open,h=!!i&&!i.modal&&i.open&&u&&!!(r||l);return o.useEffect(()=>{if(l&&u&&!p)return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){l&&eI(e)&&("focusin"===e.type?eL:function(e){(0,a.ht)(e,ek()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(l)}},[l,u,p]),o.useEffect(()=>{l&&(g||eL(l))},[g,l]),o.createElement(eO.Provider,{value:o.useMemo(()=>({preserveTabOrder:u,beforeOutsideRef:f,afterOutsideRef:d,beforeInsideRef:v,afterInsideRef:m,portalNode:l,setFocusManagerState:c}),[u,l])},h&&l&&o.createElement(eS,{"data-type":"outside",ref:f,onFocus:e=>{if(eI(e,l)){var t;null==(t=v.current)||t.focus()}else{let e=eT()||(null==i?void 0:i.refs.domReference.current);null==e||e.focus()}}}),h&&l&&o.createElement("span",{"aria-owns":l.id,style:eA}),l&&s.createPortal(t,l),h&&l&&o.createElement(eS,{"data-type":"outside",ref:d,onFocus:e=>{if(eI(e,l)){var t;null==(t=m.current)||t.focus()}else{let t=eC()||(null==i?void 0:i.refs.domReference.current);null==t||t.focus(),(null==i?void 0:i.closeOnFocusOut)&&(null==i||i.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}let eN=()=>o.useContext(eO),eW="data-floating-ui-focusable";function e_(e){return e?e.hasAttribute(eW)?e:e.querySelector("["+eW+"]")||e:null}let eU=[];function ej(e){eU=eU.filter(e=>e.isConnected);let t=e;if(t&&"body"!==(0,c.wk)(t)){if(!(0,a.Wq)(t,ek())){let e=(0,a.ht)(t,ek())[0];e&&(t=e)}eU.push(t),eU.length>20&&(eU=eU.slice(-20))}}function eH(){return eU.slice().reverse().find(e=>e.isConnected)}let eq=o.forwardRef(function(e,t){return o.createElement("button",q({},e,{type:"button",ref:t,tabIndex:-1,style:eA}))});function eB(e){let{context:t,children:n,disabled:r=!1,order:u=["content"],guards:i=!0,initialFocus:s=0,returnFocus:f=!0,restoreFocus:d=!1,modal:v=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:p=!0}=e,{open:h,refs:y,nodeId:E,onOpenChange:b,events:w,dataRef:x,floatingId:R,elements:{domReference:k,floating:M}}=t,C="number"==typeof s&&s<0,T=(0,l.Ie)(k)&&C,I=!eb()||i,L=eu(u),A=eu(s),S=eu(f),O=$(),D=eN(),F=o.useRef(null),K=o.useRef(null),N=o.useRef(!1),W=o.useRef(!1),_=o.useRef(-1),U=null!=D,j=e_(M),H=g(function(e){return void 0===e&&(e=j),e?(0,a.ht)(e,ek()):[]}),q=g(e=>{let t=H(e);return L.current.map(e=>k&&"reference"===e?k:j&&"floating"===e?j:t).filter(Boolean).flat()});function B(e){return!r&&m&&v?o.createElement(eq,{ref:"start"===e?F:K,onClick:e=>b(!1,e.nativeEvent)},"string"==typeof m?m:"Dismiss"):null}o.useEffect(()=>{if(r||!v)return;function e(e){if("Tab"===e.key){(0,l.r3)(j,(0,l.AW)((0,l.Me)(j)))&&0===H().length&&!T&&(0,l.p7)(e);let t=q(),n=(0,l.U9)(e);"reference"===L.current[0]&&n===k&&((0,l.p7)(e),e.shiftKey?em(t[t.length-1]):em(t[1])),"floating"===L.current[1]&&n===j&&e.shiftKey&&((0,l.p7)(e),em(t[0]))}}let t=(0,l.Me)(j);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,k,j,v,L,T,H,q]),o.useEffect(()=>{if(!r&&M)return M.addEventListener("focusin",e),()=>{M.removeEventListener("focusin",e)};function e(e){let t=(0,l.U9)(e),n=H().indexOf(t);-1!==n&&(_.current=n)}},[r,M,H]),o.useEffect(()=>{if(!r&&p&&M&&(0,c.Re)(k))return k.addEventListener("focusout",t),k.addEventListener("pointerdown",e),M.addEventListener("focusout",t),()=>{k.removeEventListener("focusout",t),k.removeEventListener("pointerdown",e),M.removeEventListener("focusout",t)};function e(){W.current=!0,setTimeout(()=>{W.current=!1})}function t(e){let t=e.relatedTarget;queueMicrotask(()=>{let n=!((0,l.r3)(k,t)||(0,l.r3)(M,t)||(0,l.r3)(t,M)||(0,l.r3)(null==D?void 0:D.portalNode,t)||null!=t&&t.hasAttribute(er("focus-guard"))||O&&(ep(O.nodesRef.current,E).find(e=>{var n,r;return(0,l.r3)(null==(n=e.context)?void 0:n.elements.floating,t)||(0,l.r3)(null==(r=e.context)?void 0:r.elements.domReference,t)})||(function(e,t){var n;let r=[],u=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;u;){let t=e.find(e=>e.id===u);u=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r})(O.nodesRef.current,E).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));if(d&&n&&(0,l.AW)((0,l.Me)(j))===(0,l.Me)(j).body){(0,c.Re)(j)&&j.focus();let e=_.current,t=H(),n=t[e]||t[t.length-1]||j;(0,c.Re)(n)&&n.focus()}(T||!v)&&t&&n&&!W.current&&t!==eH()&&(N.current=!0,b(!1,e,"focus-out"))})}},[r,k,M,j,v,E,O,D,b,p,d,H,T]),o.useEffect(()=>{var e;if(r)return;let t=Array.from((null==D||null==(e=D.portalNode)?void 0:e.querySelectorAll("["+er("portal")+"]"))||[]);if(M){let e=[M,...t,F.current,K.current,L.current.includes("reference")||T?k:null].filter(e=>null!=e),n=v||T?eR(e,I,!I):eR(e);return()=>{n()}}},[r,k,M,v,L,D,T,I]),P(()=>{if(r||!(0,c.Re)(j))return;let e=(0,l.Me)(j),t=(0,l.AW)(e);queueMicrotask(()=>{let e=q(j),n=A.current,r=("number"==typeof n?e[n]:n.current)||j,u=(0,l.r3)(j,t);C||u||!h||em(r,{preventScroll:r===j})})},[r,h,j,C,q,A]),P(()=>{if(r||!j)return;let e=!1,t=(0,l.Me)(j),n=(0,l.AW)(t),u=x.current.openEvent;function o(t){let{open:n,reason:r,event:o,nested:i}=t;n&&(u=o),"escape-key"===r&&y.domReference.current&&ej(y.domReference.current),"hover"===r&&"mouseleave"===o.type&&(N.current=!0),"outside-press"===r&&(i?(N.current=!1,e=!0):N.current=!((0,l.Zj)(o)||(0,l.cr)(o)))}ej(n),w.on("openchange",o);let i=t.createElement("span");return i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),Object.assign(i.style,eA),U&&k&&k.insertAdjacentElement("afterend",i),()=>{w.off("openchange",o);let n=(0,l.AW)(t),r=(0,l.r3)(M,n)||O&&ep(O.nodesRef.current,E).some(e=>{var t;return(0,l.r3)(null==(t=e.context)?void 0:t.elements.floating,n)});(r||u&&["click","mousedown"].includes(u.type))&&y.domReference.current&&ej(y.domReference.current);let a="boolean"==typeof S.current?eH()||i:S.current.current||i;queueMicrotask(()=>{S.current&&!N.current&&(0,c.Re)(a)&&(a===n||n===t.body||r)&&a.focus({preventScroll:e}),i.remove()})}},[r,M,j,S,x,y,w,O,E,U,k]),o.useEffect(()=>{queueMicrotask(()=>{N.current=!1})},[r]),P(()=>{if(!r&&D)return D.setFocusManagerState({modal:v,closeOnFocusOut:p,open:h,onOpenChange:b,refs:y}
1),()=>{D.setFocusManagerState(null)}},[r,D,v,h,b,y,p]),P(()=>{if(r||!j||"function"!=typeof MutationObserver||C)return;let e=()=>{let e=j.getAttribute("tabindex"),t=H(),n=(0,l.AW)((0,l.Me)(M)),r=t.indexOf(n);-1!==r&&(_.current=r),L.current.includes("floating")||n!==y.domReference.current&&0===t.length?"0"!==e&&j.setAttribute("tabindex","0"):"-1"!==e&&j.setAttribute("tabindex","-1")};e();let t=new MutationObserver(e);return t.observe(j,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[r,M,j,y,L,H,C]);let X=!r&&I&&(!v||!T)&&(U||v);return o.createElement(o.Fragment,null,X&&o.createElement(eS,{"data-type":"inside",ref:null==D?void 0:D.beforeInsideRef,onFocus:e=>{if(v){let e=q();em("reference"===u[0]?e[0]:e[e.length-1])}else if(null!=D&&D.preserveTabOrder&&D.portalNode){if(N.current=!1,eI(e,D.portalNode)){let e=eC()||k;null==e||e.focus()}else{var t;null==(t=D.beforeOutsideRef.current)||t.focus()}}}}),!T&&B("start"),n,B("end"),X&&o.createElement(eS,{"data-type":"inside",ref:null==D?void 0:D.afterInsideRef,onFocus:e=>{if(v)em(q()[0]);else if(null!=D&&D.preserveTabOrder&&D.portalNode){if(p&&(N.current=!0),eI(e,D.portalNode)){let e=eT()||k;null==e||e.focus()}else{var t;null==(t=D.afterOutsideRef.current)||t.focus()}}}}))}let eX=0,eY=()=>{},ez=o.forwardRef(function(e,t){let{lockScroll:n=!1,...r}=e;return P(()=>{if(n)return 1==++eX&&(eY=function(){let e=/iP(hone|ad|od)|iOS/.test((0,l.Xf)()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,u=t.left?parseFloat(t.left):window.scrollX,o=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var i,c;let e=(null==(i=window.visualViewport)?void 0:i.offsetLeft)||0;Object.assign(t,{position:"fixed",top:-(o-Math.floor((null==(c=window.visualViewport)?void 0:c.offsetTop)||0))+"px",left:-(u-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(u,o))}}()),()=>{0==--eX&&eY()}},[n]),o.createElement("div",q({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))});function eG(e){return(0,c.Re)(e.target)&&"BUTTON"===e.target.tagName}function eV(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,dataRef:u,elements:{domReference:i}}=e,{enabled:c=!0,event:a="click",toggle:s=!0,ignoreMouse:f=!1,keyboardHandlers:d=!0,stickIfOpen:v=!0}=t,m=o.useRef(),p=o.useRef(!1),g=o.useMemo(()=>({onPointerDown(e){m.current=e.pointerType},onMouseDown(e){let t=m.current;0===e.button&&"click"!==a&&((0,l.r)(t,!0)&&f||(n&&s&&(!u.current.openEvent||!v||"mousedown"===u.current.openEvent.type)?r(!1,e.nativeEvent,"click"):(e.preventDefault(),r(!0,e.nativeEvent,"click"))))},onClick(e){let t=m.current;if("mousedown"===a&&m.current){m.current=void 0;return}(0,l.r)(t,!0)&&f||(n&&s&&(!u.current.openEvent||!v||"click"===u.current.openEvent.type)?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))},onKeyDown(e){m.current=void 0,e.defaultPrevented||!d||eG(e)||(" "!==e.key||(0,l.j7)(i)||(e.preventDefault(),p.current=!0),"Enter"===e.key&&(n&&s?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!d||eG(e)||(0,l.j7)(i))&&" "===e.key&&p.current&&(p.current=!1,n&&s?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))}}),[u,i,a,f,d,r,n,v,s]);return o.useMemo(()=>c?{reference:g}:{},[c,g])}function eZ(e){return null!=e&&null!=e.clientX}function eJ(e,t){void 0===t&&(t={});let{open:n,dataRef:r,elements:{floating:u,domReference:i},refs:a}=e,{enabled:s=!0,axis:f="both",x:d=null,y:v=null}=t,m=o.useRef(!1),p=o.useRef(null),[h,y]=o.useState(),[E,b]=o.useState([]),w=g((e,t)=>{if(!m.current){var n;let u,o,l;(!r.current.openEvent||eZ(r.current.openEvent))&&a.setPositionReference((n={x:e,y:t,axis:f,dataRef:r,pointerType:h},u=null,o=null,l=!1,{contextElement:i||void 0,getBoundingClientRect(){var e;let t=(null==i?void 0:i.getBoundingClientRect())||{width:0,height:0,x:0,y:0},r="x"===n.axis||"both"===n.axis,c="y"===n.axis||"both"===n.axis,a=["mouseenter","mousemove"].includes((null==(e=n.dataRef.current.openEvent)?void 0:e.type)||"")&&"touch"!==n.pointerType,s=t.width,f=t.height,d=t.x,v=t.y;return null==u&&n.x&&r&&(u=t.x-n.x),null==o&&n.y&&c&&(o=t.y-n.y),d-=u||0,v-=o||0,s=0,f=0,!l||a?(s="y"===n.axis?t.width:0,f="x"===n.axis?t.height:0,d=r&&null!=n.x?n.x:d,v=c&&null!=n.y?n.y:v):l&&!a&&(f="x"===n.axis?t.height:f,s="y"===n.axis?t.width:s),l=!0,{width:s,height:f,x:d,y:v,top:v,right:d+s,bottom:v+f,left:d}}}))}}),x=g(e=>{null!=d||null!=v||(n?p.current||b([]):w(e.clientX,e.clientY))}),R=(0,l.r)(h)?u:n,k=o.useCallback(()=>
1{if(!R||!s||null!=d||null!=v)return;let e=(0,c.Jj)(u);function t(n){let r=(0,l.U9)(n);(0,l.r3)(u,r)?(e.removeEventListener("mousemove",t),p.current=null):w(n.clientX,n.clientY)}if(!r.current.openEvent||eZ(r.current.openEvent)){e.addEventListener("mousemove",t);let n=()=>{e.removeEventListener("mousemove",t),p.current=null};return p.current=n,n}a.setPositionReference(i)},[R,s,d,v,u,r,a,i,w]);o.useEffect(()=>k(),[k,E]),o.useEffect(()=>{s&&!u&&(m.current=!1)},[s,u]),o.useEffect(()=>{!s&&n&&(m.current=!0)},[s,n]),P(()=>{s&&(null!=d||null!=v)&&(m.current=!1,w(d,v))},[s,d,v,w]);let M=o.useMemo(()=>{function e(e){let{pointerType:t}=e;y(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:x,onMouseEnter:x}},[x]);return o.useMemo(()=>s?{reference:M}:{},[s,M])}let eQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},e$={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},e0=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function e1(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,elements:u,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:y}=t,E=$(),b=g("function"==typeof f?f:()=>!1),w="function"==typeof f?b:f,x=o.useRef(!1),R=o.useRef(!1),{escapeKey:k,outsidePress:M}=e0(h),{escapeKey:C,outsidePress:T}=e0(y),I=o.useRef(!1),L=g(e=>{var t;if(!n||!a||!s||"Escape"!==e.key||I.current)return;let u=null==(t=i.current.floatingContext)?void 0:t.nodeId,o=E?ep(E.nodesRef.current,u):[];if(!k&&(e.stopPropagation(),o.length>0)){let e=!0;if(o.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,(0,l.MM)(e)?e.nativeEvent:e,"escape-key")}),A=g(e=>{var t;let n=()=>{var t;L(e),null==(t=(0,l.U9)(e))||t.removeEventListener("keydown",n)};null==(t=(0,l.U9)(e))||t.addEventListener("keydown",n)}),P=g(e=>{var t;let n=x.current;x.current=!1;let o=R.current;if(R.current=!1,"click"===d&&o||n||"function"==typeof w&&!w(e))return;let a=(0,l.U9)(e),s="["+er("inert")+"]",f=(0,l.Me)(u.floating).querySelectorAll(s),v=(0,c.kK)(a)?a:null;for(;v&&!(0,c.Py)(v);){let e=(0,c.Ow)(v);if((0,c.Py)(e)||!(0,c.kK)(e))break;v=e}if(f.length&&(0,c.kK)(a)&&!(0,l.ex)(a)&&!(0,l.r3)(a,u.floating)&&Array.from(f).every(e=>!(0,l.r3)(v,e)))return;if((0,c.Re)(a)&&D){let t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight,r=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===(0,c.Dx)(a).direction&&(r=e.offsetX<=a.offsetWidth-a.clientWidth),r||t&&e.offsetY>a.clientHeight)return}let m=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=E&&ep(E.nodesRef.current,m).some(t=>{var n;return(0,l.Pe)(e,null==(n=t.context)?void 0:n.elements.floating)});if((0,l.Pe)(e,u.floating)||(0,l.Pe)(e,u.domReference)||p)return;let g=E?ep(E.nodesRef.current,m):[];if(g.length>0){let e=!0;if(g.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,"outside-press")}),S=g(e=>{var t;let n=()=>{var t;P(e),null==(t=(0,l.U9)(e))||t.removeEventListener(d,n)};null==(t=(0,l.U9)(e))||t.addEventListener(d,n)});o.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=k,i.current.__outsidePressBubbles=M;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function o(){window.clearTimeout(e),I.current=!0}function f(){e=window.setTimeout(()=>{I.current=!1},(0,c.Pf)()?5:0)}let v=(0,l.Me)(u.floating);s&&(v.addEventListener("keydown",C?A:L,C),v.addEventListener("compositionstart",o),v.addEventListener("compositionend",f)),w&&v.addEventListener(d,T?S:P,T);let m=[];return p&&((0,c.kK)(u.domReference)&&(m=(0,c.Kx)(u.domReference)),(0,c.kK)(u.floating)&&(m=m.concat((0,c.Kx)(u.floating))),!(0,c.kK)(u.reference)&&u.reference&&u.reference.contextElement&&(m=m.concat((0,c.Kx)(u.reference.contextElement)))),(m=m.filter(e=>{var t;
1return e!==(null==(t=v.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{s&&(v.removeEventListener("keydown",C?A:L,C),v.removeEventListener("compositionstart",o),v.removeEventListener("compositionend",f)),w&&v.removeEventListener(d,T?S:P,T),m.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,u,s,w,d,n,r,p,a,k,M,L,C,A,P,T,S]),o.useEffect(()=>{x.current=!1},[w,d]);let O=o.useMemo(()=>({onKeyDown:L,[eQ[m]]:e=>{v&&r(!1,e.nativeEvent,"reference-press")}}),[L,r,v,m]),D=o.useMemo(()=>({onKeyDown:L,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[e$[d]]:()=>{x.current=!0}}),[L,d]);return o.useMemo(()=>a?{reference:O,floating:D}:{},[a,O,D])}function e2(e){let{open:t=!1,onOpenChange:n,elements:r}=e,u=z(),l=o.useRef({}),[i]=o.useState(()=>V()),c=null!=Q(),[a,s]=o.useState(r.reference),f=g((e,t,r)=>{l.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:c}),null==n||n(e,t,r)}),d=o.useMemo(()=>({setPositionReference:s}),[]),v=o.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return o.useMemo(()=>({dataRef:l,open:t,onOpenChange:f,elements:v,events:i,floatingId:u,refs:d}),[t,f,v,i,u,d])}function e7(e){void 0===e&&(e={});let{nodeId:t}=e,n=e2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,u=r.elements,[l,i]=o.useState(null),[a,s]=o.useState(null),d=(null==u?void 0:u.domReference)||l,v=o.useRef(null),m=$();P(()=>{d&&(v.current=d)},[d]);let p=(0,f.YF)({...e,elements:{...u,...a&&{reference:a}}}),g=o.useCallback(e=>{let t=(0,c.kK)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s(t),p.refs.setReference(t)},[p.refs]),h=o.useCallback(e=>{((0,c.kK)(e)||null===e)&&(v.current=e,i(e)),((0,c.kK)(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!(0,c.kK)(e))&&p.refs.setReference(e)},[p.refs]),y=o.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:v}),[p.refs,h,g]),E=o.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),b=o.useMemo(()=>({...p,...r,refs:y,elements:E,nodeId:t}),[p,y,E,t,r]);return P(()=>{r.dataRef.current.floatingContext=b;let e=null==m?void 0:m.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),o.useMemo(()=>({...p,context:b,refs:y,elements:E}),[p,y,E,b])}function e3(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,events:u,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:f=!0}=t,d=o.useRef(!1),v=o.useRef(),m=o.useRef(!0);o.useEffect(()=>{if(!s)return;let e=(0,c.Jj)(a.domReference);function t(){!n&&(0,c.Re)(a.domReference)&&a.domReference===(0,l.AW)((0,l.Me)(a.domReference))&&(d.current=!0)}function r(){m.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}},[a.domReference,n,s]),o.useEffect(()=>{if(s)return u.on("openchange",e),()=>{u.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(d.current=!0)}},[u,s]),o.useEffect(()=>()=>{clearTimeout(v.current)},[]);let p=o.useMemo(()=>({onPointerDown(e){(0,l.cr)(e.nativeEvent)||(m.current=!1)},onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;let t=(0,l.U9)(e.nativeEvent);if(f&&(0,c.kK)(t))try{if((0,l.G6)()&&(0,l.V5)())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!m.current&&!(0,l.j7)(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;let t=e.relatedTarget,n=e.nativeEvent,u=(0,c.kK)(t)&&t.hasAttribute(er("focus-guard"))&&"outside"===t.getAttribute("data-type");v.current=window.setTimeout(()=>{var e;let o=(0,l.AW)(a.domReference?a.domReference.ownerDocument:document);if(t||o!==a.domReference){if((0,l.r3)(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,o)||(0,l.r3)(a.domReference,o)||u)return;r(!1,n,"focus")}})}}),[i,a.domReference,r,f]);return o.useMemo(()=>s?{reference:p}:{},[s,p])}let e4="active",e9="selected";function e5(e,t,n){let r=new Map,u="item"===n,o=e;if(u&&e){let{[e4]:t,[e9]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[eW]:""},...o,...t.map(t=>{let r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>
1(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(!(u&&[e4,e9].includes(n))){if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof o){var l;null==(l=r.get(n))||l.push(o),e[n]=function(){for(var e,t=arguments.length,u=Array(t),o=0;o<t;o++)u[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map(e=>e(...u)).find(e=>void 0!==e)}}}else e[n]=o}}),e),{})}}function e8(e){void 0===e&&(e=[]);let t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),u=o.useCallback(t=>e5(t,e,"reference"),t),l=o.useCallback(t=>e5(t,e,"floating"),n),i=o.useCallback(t=>e5(t,e,"item"),r);return o.useMemo(()=>({getReferenceProps:u,getFloatingProps:l,getItemProps:i}),[u,l,i])}let e6=!1;function te(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function tt(e,t){return te(t,e===h||e===y,e===E||e===b)}function tn(e,t,n){return te(t,e===y,n?e===E:e===b)||"Enter"===e||" "===e||""===e}function tr(e,t,n){return te(t,n?e===b:e===E,e===h)}function tu(e,t){let{open:n,onOpenChange:r,elements:u}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:v=!1,loop:m=!1,nested:p=!1,rtl:h=!1,virtual:w=!1,focusItemOnOpen:S="auto",focusItemOnHover:O=!0,openOnArrowKeyDown:D=!0,disabledIndices:F,orientation:K="vertical",cols:N=1,scrollItemIntoView:W=!0,virtualItemRef:_,itemSizes:U,dense:j=!1}=t,H=eu(e_(u.floating)),q=Q(),B=$(),X=g(s),Y=(0,l.Ie)(u.domReference),z=o.useRef(S),G=o.useRef(null!=d?d:-1),V=o.useRef(null),Z=o.useRef(!0),J=o.useRef(X),ee=o.useRef(!!u.floating),et=o.useRef(n),en=o.useRef(!1),er=o.useRef(!1),eo=eu(F),el=eu(n),ei=eu(W),ec=eu(d),[ea,es]=o.useState(),[ef,ed]=o.useState(),ev=g(function(e,t,n){function r(e){w?(es(e.id),null==B||B.events.emit("virtualfocus",e),_&&(_.current=e)):em(e,{preventScroll:!0,sync:!!((0,l.V5)()&&(0,l.G6)())&&(e6||en.current)})}void 0===n&&(n=!1);let u=e.current[t.current];u&&r(u),requestAnimationFrame(()=>{let o=e.current[t.current]||u;if(!o)return;u||r(o);let l=ei.current;l&&eh&&(n||!Z.current)&&(null==o.scrollIntoView||o.scrollIntoView("boolean"==typeof l?{block:"nearest",inline:"nearest"}:l))})});P(()=>{document.createElement("div").focus({get preventScroll(){return e6=!0,!1}})},[]),P(()=>{f&&(n&&u.floating?z.current&&null!=d&&(er.current=!0,G.current=d,X(d)):ee.current&&(G.current=-1,J.current(null)))},[f,n,u.floating,d,X]),P(()=>{if(f&&n&&u.floating){if(null==a){if(en.current=!1,null==ec.current&&(ee.current&&(G.current=-1,ev(i,G)),(!et.current||!ee.current)&&z.current&&(null!=V.current||!0===z.current&&null==V.current))){let e=0,t=()=>{null==i.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(G.current=null==V.current||tn(V.current,K,h)||p?R(i,eo.current):k(i,eo.current),V.current=null,X(G.current))};t()}}else x(i,a)||(G.current=a,ev(i,G,er.current),er.current=!1)}},[f,n,u.floating,a,ec,p,i,K,h,X,ev,eo]),P(()=>{var e;if(!f||u.floating||!B||w||!ee.current)return;let t=B.nodesRef.current,n=null==(e=t.find(e=>e.id===q))||null==(e=e.context)?void 0:e.elements.floating,r=(0,l.AW)((0,l.Me)(u.floating)),o=t.some(e=>e.context&&(0,l.r3)(e.context.elements.floating,r));n&&!o&&Z.current&&n.focus({preventScroll:!0})},[f,u.floating,B,q,w]),P(()=>{if(f&&B&&w&&!q)return B.events.on("virtualfocus",e),()=>{B.events.off("virtualfocus",e)};function e(e){ed(e.id),_&&(_.current=e)}},[f,B,w,q,_]),P(()=>{J.current=X,ee.current=!!u.floating}),P(()=>{n||(V.current=null)},[n]),P(()=>{et.current=n},[n]);let eg=null!=a,eh=o.useMemo(()=>{function e(e){if(!n)return;let t=i.current.indexOf(e);-1!==t&&X(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...O&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;Z.current&&"touch"!==t&&(G.current=-1,ev(i,G),X(null),w||em(H.current,{preventScroll:!0}))}}}},[n,H,ev,O,i,X,w]),ey=g(e=>{if(Z.current=!1,en.current=!0,229===e.which||!el.current&&e.currentTarget===H.current)return;if(p&&tr(e.key,K,h)){(0,l.p7)(e),r(!1,e.nativeEvent,"list-navigation"),(0,c.Re)(u.domReference)&&(w?null==B||B.events.emit("virtualfocus",u.domReference):u.domReference.focus());return}let t=G.current,o=R(i,F),a=k(i,F);if(Y||("Home"===e.key&&((0,l.p7)(e),G.current=o,X(G.current)),"End"===e.key&&((0,l.p7)(e),G.current=a,X(G.current))),N>1){let t=U||Array.from({length:i.current.length},()=>({width:1,height:1})),n=T(t,N,j),r=n.findIndex(e=>
1null!=e&&!A(i.current,e,F)),u=n.reduce((e,t,n)=>null==t||A(i.current,t,F)?e:n,-1),l=n[C({current:n.map(e=>null!=e?i.current[e]:null)},{event:e,orientation:K,loop:m,rtl:h,cols:N,disabledIndices:L([...F||i.current.map((e,t)=>A(i.current,t)?t:void 0),void 0],n),minIndex:r,maxIndex:u,prevIndex:I(G.current>a?o:G.current,t,n,N,e.key===y?"bl":e.key===(h?E:b)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(G.current=l,X(G.current)),"both"===K)return}if(tt(e.key,K)){if((0,l.p7)(e),n&&!w&&(0,l.AW)(e.currentTarget.ownerDocument)===e.currentTarget){G.current=tn(e.key,K,h)?o:a,X(G.current);return}tn(e.key,K,h)?m?G.current=t>=a?v&&t!==i.current.length?-1:o:M(i,{startingIndex:t,disabledIndices:F}):G.current=Math.min(a,M(i,{startingIndex:t,disabledIndices:F})):m?G.current=t<=o?v&&-1!==t?i.current.length:a:M(i,{startingIndex:t,decrement:!0,disabledIndices:F}):G.current=Math.max(o,M(i,{startingIndex:t,decrement:!0,disabledIndices:F})),x(i,G.current)?X(null):X(G.current)}}),eE=o.useMemo(()=>w&&n&&eg&&{"aria-activedescendant":ef||ea},[w,n,eg,ef,ea]),eb=o.useMemo(()=>({"aria-orientation":"both"===K?void 0:K,...!(0,l.Ie)(u.domReference)&&eE,onKeyDown:ey,onPointerMove(){Z.current=!0}}),[eE,ey,u.domReference,K]),ew=o.useMemo(()=>{function e(e){"auto"===S&&(0,l.Zj)(e.nativeEvent)&&(z.current=!0)}return{...eE,onKeyDown(e){var t,u,o,c,a,s;Z.current=!1;let f=e.key.startsWith("Arrow"),v=["Home","End"].includes(e.key),m=(t=e.key,te(K,h?t===E:t===b,t===y)),g=tr(e.key,K,h),x=tt(e.key,K),k=(p?m:x)||"Enter"===e.key||""===e.key.trim();if(w&&n){let t,n;let r=null==B?void 0:B.nodesRef.current.find(e=>null==e.parentId),d=B&&r?(u=B.nodesRef.current,o=r.id,n=-1,!function e(r,o){o>n&&(t=r,n=o),ep(u,r).forEach(t=>{e(t.id,o+1)})}(o,0),u.find(e=>e.id===t)):null;if((f||v)&&d&&_){let t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(m||g){let n=(null==(c=d.context)?void 0:c.elements.domReference)===e.currentTarget,r=g&&!n?null==(a=d.context)?void 0:a.elements.domReference:m?i.current.find(e=>(null==e?void 0:e.id)===ea):null;r&&((0,l.p7)(e),r.dispatchEvent(t),ed(void 0))}if((x||v)&&d.context&&d.context.open&&d.parentId&&e.currentTarget!==d.context.elements.domReference){(0,l.p7)(e),null==(s=d.context.elements.domReference)||s.dispatchEvent(t);return}}return ey(e)}if(n||D||!f){if(k&&(V.current=p&&x?null:e.key),p){m&&((0,l.p7)(e),n?(G.current=R(i,eo.current),X(G.current)):r(!0,e.nativeEvent,"list-navigation"));return}x&&(null!=d&&(G.current=d),(0,l.p7)(e),!n&&D?r(!0,e.nativeEvent,"list-navigation"):ey(e),n&&X(G.current))}},onFocus(){n&&!w&&X(null)},onPointerDown:function(e){z.current=S,"auto"===S&&(0,l.cr)(e.nativeEvent)&&(z.current=!0)},onMouseDown:e,onClick:e}},[ea,eE,ey,eo,S,i,p,X,r,n,D,K,h,d,B,w,_]);return o.useMemo(()=>f?{reference:ew,floating:eb,item:eh}:{},[f,ew,eb,eh])}let to=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function tl(e,t){var n;void 0===t&&(t={});let{open:r,floatingId:u}=e,{enabled:l=!0,role:i="dialog"}=t,c=null!=(n=to.get(i))?n:i,a=z(),s=null!=Q(),f=o.useMemo(()=>"tooltip"===c||"label"===i?{["aria-"+("label"===i?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===c?"dialog":c,"aria-controls":r?u:void 0,..."listbox"===c&&{role:"combobox"},..."menu"===c&&{id:a},..."menu"===c&&s&&{role:"menuitem"},..."select"===i&&{"aria-autocomplete":"none"},..."combobox"===i&&{"aria-autocomplete":"list"}},[c,u,s,r,a,i]),d=o.useMemo(()=>{let e={id:u,...c&&{role:c}};return"tooltip"===c||"label"===i?e:{...e,..."menu"===c&&{"aria-labelledby":a}}},[c,u,a,i]),v=o.useCallback(e=>{let{active:t,selected:n}=e,r={role:"option",...t&&{id:u+"-option"}};switch(i){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}},[u,i]);return o.useMemo(()=>l?{reference:f,floating:d,item:v}:{},[l,f,d,v])}let ti=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function tc(e,t){return"function"==typeof e?e(t):e}function ta(e,t){void 0===t&&(t={});let{open:n,elements:{floating:r}}=e,{duration:u=250}=t,l=("number"==typeof u?u:u.close)||0,[i,c]=o.useState("unmounted"),a=function(e,t){let[n,r]=o.useState(e);return e&&!n&&r(!0),o.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,l);return a||"close"!==i||c("unmounted"),P(()=>{if(r){if(n){c("initial");let e=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(e)}}c("close")}},[n,r]),{isMounted:a,status:i}}function ts(e,t){void 0===t&&(t={});let{initial:n={opacity:0}
1,open:r,close:u,common:l,duration:i=250}=t,c=e.placement,a=c.split("-")[0],s=o.useMemo(()=>({side:a,placement:c}),[a,c]),f="number"==typeof i,d=(f?i:i.open)||0,v=(f?i:i.close)||0,[m,p]=o.useState(()=>({...tc(l,s),...tc(n,s)})),{isMounted:g,status:h}=ta(e,{duration:i}),y=eu(n),E=eu(r),b=eu(u),w=eu(l);return P(()=>{let e=tc(y.current,s),t=tc(b.current,s),n=tc(w.current,s),r=tc(E.current,s)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===h&&p(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===h&&p({transitionProperty:Object.keys(r).map(ti).join(","),transitionDuration:d+"ms",...n,...r}),"close"===h){let r=t||e;p({transitionProperty:Object.keys(r).map(ti).join(","),transitionDuration:v+"ms",...n,...r})}},[v,b,y,E,w,d,h,s]),{isMounted:g,styles:m}}function tf(e,t){var n;let{open:r,dataRef:u}=e,{listRef:i,activeIndex:c,onMatch:a,onTypingChange:s,enabled:f=!0,findMatch:d=null,resetMs:v=750,ignoreKeys:m=[],selectedIndex:p=null}=t,h=o.useRef(),y=o.useRef(""),E=o.useRef(null!=(n=null!=p?p:c)?n:-1),b=o.useRef(null),w=g(a),x=g(s),R=eu(d),k=eu(m);P(()=>{r&&(clearTimeout(h.current),b.current=null,y.current="")},[r]),P(()=>{if(r&&""===y.current){var e;E.current=null!=(e=null!=p?p:c)?e:-1}},[r,p,c]);let M=g(e=>{e?u.current.typing||(u.current.typing=e,x(e)):u.current.typing&&(u.current.typing=e,x(e))}),C=g(e=>{function t(e,t,n){let r=R.current?R.current(t,n):t.find(e=>(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))===0);return r?e.indexOf(r):-1}let n=i.current;if(y.current.length>0&&" "!==y.current[0]&&(-1===t(n,n,y.current)?M(!1):" "===e.key&&(0,l.p7)(e)),null==n||k.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&((0,l.p7)(e),M(!0)),n.every(e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())})&&y.current===e.key&&(y.current="",E.current=b.current),y.current+=e.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",E.current=b.current,M(!1)},v);let u=E.current,o=t(n,[...n.slice((u||0)+1),...n.slice(0,(u||0)+1)],y.current);-1!==o?(w(o),b.current=o):" "!==e.key&&(y.current="",M(!1))}),T=o.useMemo(()=>({onKeyDown:C}),[C]),I=o.useMemo(()=>({onKeyDown:C,onKeyUp(e){" "===e.key&&M(!1)}}),[C,M]);return o.useMemo(()=>f?{reference:T,floating:I}:{},[f,T,I])}function td(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let tv=e=>({name:"inner",options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:u,offset:o=0,index:l=0,minItemsVisible:c=4,referenceOverflowThreshold:a=0,scrollRef:v,...m}=(0,i.ku)(e,t),{rects:p,elements:{floating:g}}=t,h=n.current[l],y=(null==v?void 0:v.current)||g,E=g.clientTop||y.clientTop,b=0!==g.clientTop,w=0!==y.clientTop,x=g===y;if(!h)return{};let R={...t,...await (0,f.cv)(-h.offsetTop-g.clientTop-p.reference.height/2-h.offsetHeight/2-o).fn(t)},k=await (0,d.US)(td(R,y.scrollHeight+E+g.clientTop),m),M=await (0,d.US)(R,{...m,elementContext:"reference"}),C=(0,i.Fp)(0,k.top),T=R.y+C,I=(y.scrollHeight>y.clientHeight?e=>e:i.NM)((0,i.Fp)(0,y.scrollHeight+(b&&x||w?2*E:0)-C-(0,i.Fp)(0,k.bottom)));if(y.style.maxHeight=I+"px",y.scrollTop=C,u){let e=y.offsetHeight<h.offsetHeight*(0,i.VV)(c,n.current.length)-1||M.top>=-a||M.bottom>=-a;s.flushSync(()=>u(e))}return r&&(r.current=await (0,d.US)(td({...R,y:T},y.offsetHeight+E+g.clientTop),m)),{y:T}}});function tm(e,t){let{open:n,elements:r}=e,{enabled:u=!0,overflowRef:i,scrollRef:c,onChange:a}=t,f=g(a),d=o.useRef(!1),v=o.useRef(null),m=o.useRef(null);o.useEffect(()=>{if(!u)return;function e(e){if(e.ctrlKey||!t||null==i.current)return;let n=e.deltaY,r=i.current.top>=-.5,u=i.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,c=n<0?-1:1,a=n<0?"max":"min";!(t.scrollHeight<=t.clientHeight)&&(!r&&n>0||!u&&n<0?(e.preventDefault(),s.flushSync(()=>{f(e=>e+Math[a](n,o*c))})):/firefox/i.test((0,l.ij)())&&(t.scrollTop+=n))}let t=(null==c?void 0:c.current)||r.floating;if(n&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{v.current=t.scrollTop,null!=i.current&&(m.current={...i.current})}),()=>{v.current=null,m.current=null,t.removeEventListener("wheel",e)}},[u,n,r.floating,i,c,f]);let p=o.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){let e=(null==c?void 0:c.current)||r.floating;if(i.current&&e&&d.current){if(null!==v.current){let t=e.scrollTop-v.current;(i.current.bottom<-.5&&t<-1||i.current.top<-.5&&t>1)&&s.flushSync(()=>f(e=>e+t))}requestAnimationFrame(()=>{v.current=e.scrollTop})}}}),[r.floating,f,i,c]);return o.useMemo(()=>u?{floating:p}:{},[u,p])}function tp(e,t){let[n,r]=e,u=!1,o=t.length;for(let e=0,l=o-1;e<o;l=e++){let[o,i]=t[e]||[0,0],[c,a]=t[l]||[0,0];i>=r!=a>=r&&n<=(c-o)*(r-i)/(a-i)+o&&(u=!u)}return u}function tg(e){let t;void 0===e&&(e={});let{buffer:n=.5,blockPointerEvents:r=!1,requireIntent:u=!0}=e,o=!1,i=null,a=null,s=performance.now(),f=e=>{let{x:r,y:f,placement:d,elements:v,onClose:m,nodeId:p,tree:g}=e;return function(e){function h(){clearTimeout(t),m()}if(clearTimeout(t),!v.domReference||!v.floating||null==d||null==r||null==f)return;let{clientX:y,clientY:E}=e,b=[y,E],w=(0,l.U9)(e),x="mouseleave"===e.type,R=(0,l.r3)(v.floating,w),k=(0,l.r3)(v.domReference,w),M=v.domReference.getBoundingClientRect(),C=v.floating.getBoundingClientRect(),T=d.split("-")[0],I=r>C.right-C.width/2,L=f>C.bottom-C.height/2,A=b[0]>=M.x&&b[0]<=M.x+M.width&&b[1]>=M.y&&b[1]<=M.y+M.height,P=C.width>M.width,S=C.height>M.height,O=(P?M:C).left,D=(P?M:C).right,F=(S?M:C).top,K=(S?M:C).bottom;
1if(R&&(o=!0,!x))return;if(k&&(o=!1),k&&!x){o=!0;return}if(x&&(0,c.kK)(e.relatedTarget)&&(0,l.r3)(v.floating,e.relatedTarget)||g&&ep(g.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===T&&f>=M.bottom-1||"bottom"===T&&f<=M.top+1||"left"===T&&r>=M.right-1||"right"===T&&r<=M.left+1)return h();let N=[];switch(T){case"top":N=[[O,M.top+1],[O,C.bottom-1],[D,C.bottom-1],[D,M.top+1]];break;case"bottom":N=[[O,C.top+1],[O,M.bottom-1],[D,M.bottom-1],[D,C.top+1]];break;case"left":N=[[C.right-1,K],[C.right-1,F],[M.left+1,F],[M.left+1,K]];break;case"right":N=[[M.right-1,K],[M.right-1,F],[C.left+1,F],[C.left+1,K]]}if(!tp([y,E],N)){if(o&&!A)return h();if(!x&&u){let t=function(e,t){let n=performance.now(),r=n-s;if(null===i||null===a||0===r)return i=e,a=t,s=n,null;let u=e-i,o=t-a;return i=e,a=t,s=n,Math.sqrt(u*u+o*o)/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return h()}tp([y,E],function(e){let[t,r]=e;switch(T){case"top":{let e=[[C.left,I?C.bottom-n:P?C.bottom-n:C.top],[C.right,I?P?C.bottom-n:C.top:C.bottom-n]];return[[P?t+n/2:I?t+4*n:t-4*n,r+n+1],[P?t-n/2:I?t+4*n:t-4*n,r+n+1],...e]}case"bottom":{let e=[[C.left,I?C.top+n:P?C.top+n:C.bottom],[C.right,I?P?C.top+n:C.bottom:C.top+n]];return[[P?t+n/2:I?t+4*n:t-4*n,r-n],[P?t-n/2:I?t+4*n:t-4*n,r-n],...e]}case"left":return[[L?C.right-n:S?C.right-n:C.left,C.top],[L?S?C.right-n:C.left:C.right-n,C.bottom],[t+n+1,S?r+n/2:L?r+4*n:r-4*n],[t+n+1,S?r-n/2:L?r+4*n:r-4*n]];case"right":{let e=[[L?C.left+n:S?C.left+n:C.right,C.top],[L?S?C.left+n:C.right:C.left+n,C.bottom]];return[[t-n,S?r+n/2:L?r+4*n:r-4*n],[t-n,S?r-n/2:L?r+4*n:r-4*n],...e]}}}([r,f]))?!o&&u&&(t=window.setTimeout(h,40)):h()}}};return f.__options={blockPointerEvents:r},f}}}]);

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.