"use strict";(self.webpackChunkbongacams=self.webpackChunkbongacams||[]).push([[12],{7315:function(e,t,n){n.r(t),n.d(t,{arrow:function(){return fe},autoPlacement:function(){return ie},autoUpdate:function(){return ne},computePosition:function(){return me},detectOverflow:function(){return re},flip:function(){return ue},getOverflowAncestors:function(){return H.v9},hide:function(){return se},inline:function(){return ae},limitShift:function(){return de},offset:function(){return oe},platform:function(){return ee},shift:function(){return ce},size:function(){return le}});const r=["top","right","bottom","left"],o=["start","end"],i=r.reduce((e,t)=>e.concat(t,t+"-"+o[0],t+"-"+o[1]),[]),c=Math.min,u=Math.max,l=Math.round,s=Math.floor,f=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function m(e,t,n){return u(e,c(t,n))}function p(e,t){return"function"==typeof e?e(t):e}function v(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function y(e){return"y"===e?"height":"width"}const w=new Set(["top","bottom"]);function b(e){return w.has(v(e))?"y":"x"}function x(e){return h(b(e))}function R(e,t,n){void 0===n&&(n=!1);const r=g(e),o=x(e),i=y(o);let c="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=A(c)),[c,A(c)]}function E(e){return e.replace(/start|end/g,e=>d[e])}const L=["left","right"],C=["right","left"],k=["top","bottom"],P=["bottom","top"];function T(e,t,n,r){const o=g(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?C:L:t?L:C;case"left":case"right":return t?k:P;default:return[]}}(v(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(E)))),i}function A(e){return e.replace(/left|right|bottom|top/g,e=>a[e])}function M(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function S(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function O(e,t,n){let{reference:r,floating:o}=e;const i=b(t),c=x(t),u=y(c),l=v(t),s="y"===i,f=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let m;switch(l){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-o.width,y:a};break;default:m={x:r.x,y:r.y}}switch(g(t)){case"start":m[c]-=d*(n&&s?-1:1);break;case"end":m[c]+=d*(n&&s?-1:1)}return m}async function D(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:c,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:f="viewport",elementContext:a="floating",altBoundary:d=!1,padding:m=0}=p(t,e),v=M(m),g=u[d?"floating"===a?"reference":"floating":a],h=S(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:f,strategy:l})),y="floating"===a?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:y,offsetParent:w,strategy:l}):y);return{top:(h.top-x.top+v.top)/b.y,bottom:(x.bottom-h.bottom+v.bottom)/b.y,left:(h.left-x.left+v.left)/b.x,right:(x.right-h.right+v.right)/b.x}}function q(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function B(e){return r.some(t=>e[t]>=0)}function F(e){const t=c(...e.map(e=>e.left)),n=c(...e.map(e=>e.top));return{x:t,y:n,width:u(...e.map(e=>e.right))-t,height:u(...e.map(e=>e.bottom))-n}}const I=new Set(["left","top"]);var H=n(86635);function W(e){const t=(0,H.L9)(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=(0,H.sb)(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,u=l(n)!==i||l(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function j(e){return(0,H.vq)(e)?e:e.contextElement}function z(e){const t=j(e);if(!(0,H.sb)(t))return f(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=W(t);let c=(i?l(n.width):n.width)/r,u=(i?l(n.height):n.height)/o;return c&&Number.isFinite(c)||(c=1),u&&Number.isFinite(u)||(u=1),{x:c,y:u}}const N=f(0);function _(e){const t=(0,H.zk)(e);return(0,H.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:N}function V(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=j(e);let c=f(1);t&&(r?(0,H.vq)(r)&&(c=z(r)):c=z(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==(0,H.zk)(e))&&t}(i,n,r)?_(i):f(0);let l=(o.left+u.x)/c.x,s=(o.top+u.y)/c.y,a=o.width/c.x,d=o.height/c.y;if(i){const e=(0,H.zk)(i),t=r&&(0,H.vq)(r)?(0,H.zk)(r):r;let n=e,o=(0,H._m)(n);for(;o&&r&&t!==n;){const e=z(o),t=o.getBoundingClientRect(),r=(0,H.L9)(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,c=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,s*=e.y,a*=e.x,d*=e.y,l+=i,s+=c,n=(0,H.zk)(o),o=(0,H._m)(n)}}return S({width:a,height:d,x:l,y:s})}function K(e,t){const n=(0,H.CP)(e).scrollLeft;return t?t.left+n:V((0,H.ep)(e)).left+n}function X(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:K(e,r)),y:r.top+t.scrollTop}}const $=new Set(["absolute","fixed"]);function U(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=(0,H.zk)(e),r=(0,H.ep)(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,l=0;if(o){i=o.width,c=o.height;const e=(0,H.Tc)();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,l=o.offsetTop)}return{width:i,height:c,x:u,y:l}}(e,n);else if("document"===t)r=function(e){const t=(0,H.ep)(e),n=(0,H.CP)(e),r=e.ownerDocument.body,o=u(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=u(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+K(e);const l=-n.scrollTop;return"rtl"===(0,H.L9)(r).direction&&(c+=u(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:l}}((0,H.ep)(e));else if((0,H.vq)(t))r=function(e,t){const n=V(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=(0,H.sb)(e)?z(e):f(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function Y(e,t){const n=(0,H.$4)(e);return!(n===t||!(0,H.vq)(n)||(0,H.eu)(n))&&("fixed"===(0,H.L9)(n).position||Y(n,t))}function Q(e,t,n){const r=(0,H.sb)(t),o=(0,H.ep)(t),i="fixed"===n,c=V(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=f(0);function s(){l.x=K(o)}if(r||!r&&!i)if(("body"!==(0,H.mq)(t)||(0,H.ZU)(o))&&(u=(0,H.CP)(t)),r){const e=V(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&s();i&&!r&&o&&s();const a=!o||r||i?f(0):X(o,u);return{x:c.left+u.scrollLeft-l.x-a.x,y:c.top+u.scrollTop-l.y-a.y,width:c.width,height:c.height}}function Z(e){return"static"===(0,H.L9)(e).position}function J(e,t){if(!(0,H.sb)(e)||"fixed"===(0,H.L9)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,H.ep)(e)===n&&(n=n.ownerDocument.body),n}function G(e,t){const n=(0,H.zk)(e);if((0,H.Tf)(e))return n;if(!(0,H.sb)(e)){let t=(0,H.$4)(e);for(;t&&!(0,H.eu)(t);){if((0,H.vq)(t)&&!Z(t))return t;t=(0,H.$4)(t)}return n}let r=J(e,t);for(;r&&(0,H.Lv)(r)&&Z(r);)r=J(r,t);return r&&(0,H.eu)(r)&&Z(r)&&!(0,H.sQ)(r)?n:r||(0,H.gJ)(e)||n}const ee={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,c=(0,H.ep)(r),u=!!t&&(0,H.Tf)(t.floating);if(r===c||u&&i)return n;let l={scrollLeft:0,scrollTop:0},s=f(1);const a=f(0),d=(0,H.sb)(r);if((d||!d&&!i)&&(("body"!==(0,H.mq)(r)||(0,H.ZU)(c))&&(l=(0,H.CP)(r)),(0,H.sb)(r))){const e=V(r);s=z(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const m=!c||d||i?f(0):X(c,l,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+a.x+m.x,y:n.y*s.y-l.scrollTop*s.y+a.y+m.y}},getDocumentElement:H.ep,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?(0,H.Tf)(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=(0,H.v9)(e,[],!1).filter(e=>(0,H.vq)(e)&&"body"!==(0,H.mq)(e)),o=null;const i="fixed"===(0,H.L9)(e).position;let c=i?(0,H.$4)(e):e;for(;(0,H.vq)(c)&&!(0,H.eu)(c);){const t=(0,H.L9)(c),n=(0,H.sQ)(c);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&$.has(o.position)||(0,H.ZU)(c)&&!n&&Y(e,c))?r=r.filter(e=>e!==c):o=t,c=(0,H.$4)(c)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],s=i.reduce((e,n)=>{const r=U(t,n,o);return e.top=u(r.top,e.top),e.right=c(r.right,e.right),e.bottom=c(r.bottom,e.bottom),e.left=u(r.left,e.left),e},U(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:G,getElementRects:async function(e){const t=this.getOffsetParent||G,n=this.getDimensions,r=await n(e.floating);return{reference:Q(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=W(e);return{width:t,height:n}},getScale:z,isElement:H.vq,isRTL:function(e){return"rtl"===(0,H.L9)(e).direction}};function te(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ne(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,d=j(e),m=o||i?[...d?(0,H.v9)(d):[],...(0,H.v9)(t)]:[];m.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const p=d&&f?function(e,t){let n,r=null;const o=(0,H.ep)(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(f,a){void 0===f&&(f=!1),void 0===a&&(a=1),i();const d=e.getBoundingClientRect(),{left:m,top:p,width:v,height:g}=d;if(f||t(),!v||!g)return;const h={rootMargin:-s(p)+"px "+-s(o.clientWidth-(m+v))+"px "+-s(o.clientHeight-(p+g))+"px "+-s(m)+"px",threshold:u(0,c(1,a))||1};let y=!0;function w(t){const r=t[0].intersectionRatio;if(r!==a){if(!y)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||te(d,e.getBoundingClientRect())||l(),y=!1}try{r=new IntersectionObserver(w,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(w,h)}r.observe(e)}(!0),i}(d,n):null;let v,g=-1,h=null;l&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),d&&!a&&h.observe(d),h.observe(t));let y=a?V(e):null;return a&&function t(){const r=V(e);y&&!te(y,r)&&n();y=r,v=requestAnimationFrame(t)}(),n(),()=>{var e;m.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==p||p(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(v)}}const re=D,oe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:u}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),c=v(n),u=g(n),l="y"===b(n),s=I.has(c)?-1:1,f=i&&l?-1:1,a=p(t,e);let{mainAxis:d,crossAxis:m,alignmentAxis:h}="number"==typeof a?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return u&&"number"==typeof h&&(m="end"===u?-1*h:h),l?{x:m*f,y:d*s}:{x:d*s,y:m*f}}(t,e);return c===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:c}}}}},ie=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:c,middlewareData:u,placement:l,platform:s,elements:f}=t,{crossAxis:a=!1,alignment:d,allowedPlacements:m=i,autoAlignment:h=!0,...y}=p(e,t),w=void 0!==d||m===i?function(e,t,n){return(e?[...n.filter(t=>g(t)===e),...n.filter(t=>g(t)!==e)]:n.filter(e=>v(e)===e)).filter(n=>!e||g(n)===e||!!t&&E(n)!==n)}(d||null,h,m):m,b=await D(t,y),x=(null==(n=u.autoPlacement)?void 0:n.index)||0,L=w[x];if(null==L)return{};const C=R(L,c,await(null==s.isRTL?void 0:s.isRTL(f.floating)));if(l!==L)return{reset:{placement:w[0]}};const k=[b[v(L)],b[C[0]],b[C[1]]],P=[...(null==(r=u.autoPlacement)?void 0:r.overflows)||[],{placement:L,overflows:k}],T=w[x+1];if(T)return{data:{index:x+1,overflows:P},reset:{placement:T}};const A=P.map(e=>{const t=g(e.placement);return[e.placement,t&&a?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),M=(null==(o=A.filter(e=>e[2].slice(0,g(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||A[0][0];return M!==l?{data:{index:x+1,overflows:P},reset:{placement:M}}:{}}}},ce=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=p(e,t),s={x:n,y:r},f=await D(t,l),a=b(v(o)),d=h(a);let g=s[d],y=s[a];if(i){const e="y"===d?"bottom":"right";g=m(g+f["y"===d?"top":"left"],g,g-f[e])}if(c){const e="y"===a?"bottom":"right";y=m(y+f["y"===a?"top":"left"],y,y-f[e])}const w=u.fn({...t,[d]:g,[a]:y});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[d]:i,[a]:c}}}}}},ue=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:f=!0,crossAxis:a=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=p(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=v(o),x=b(u),L=v(u)===u,C=await(null==l.isRTL?void 0:l.isRTL(s.floating)),k=d||(L||!h?[A(u)]:function(e){const t=A(e);return[E(e),t,E(t)]}(u)),P="none"!==g;!d&&P&&k.push(...T(u,h,g,C));const M=[u,...k],S=await D(t,y),O=[];let q=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&O.push(S[w]),a){const e=R(o,c,C);O.push(S[e[0]],S[e[1]])}if(q=[...q,{placement:o,overflows:O}],!O.every(e=>e<=0)){var B,F;const e=((null==(B=i.flip)?void 0:B.index)||0)+1,t=M[e];if(t){if(!("alignment"===a&&x!==b(t))||q.every(e=>e.overflows[0]>0&&b(e.placement)===x))return{data:{index:e,overflows:q},reset:{placement:t}}}let n=null==(F=q.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:F.placement;if(!n)switch(m){case"bestFit":{var I;const e=null==(I=q.filter(e=>{if(P){const t=b(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=u}if(o!==n)return{reset:{placement:n}}}return{}}}},le=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:s}=t,{apply:f=()=>{},...a}=p(e,t),d=await D(t,a),m=v(o),h=g(o),y="y"===b(o),{width:w,height:x}=i.floating;let R,E;"top"===m||"bottom"===m?(R=m,E=h===(await(null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(E=m,R="end"===h?"top":"bottom");const L=x-d.top-d.bottom,C=w-d.left-d.right,k=c(x-d[R],L),P=c(w-d[E],C),T=!t.middlewareData.shift;let A=k,M=P;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(M=C),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(A=L),T&&!h){const e=u(d.left,0),t=u(d.right,0),n=u(d.top,0),r=u(d.bottom,0);y?M=w-2*(0!==e||0!==t?e+t:u(d.left,d.right)):A=x-2*(0!==n||0!==r?n+r:u(d.top,d.bottom))}await f({...t,availableWidth:M,availableHeight:A});const S=await l.getDimensions(s.floating);return w!==S.width||x!==S.height?{reset:{rects:!0}}:{}}}},se=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=p(e,t);switch(r){case"referenceHidden":{const e=q(await D(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:B(e)}}}case"escaped":{const e=q(await D(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:B(e)}}}default:return{}}}}},fe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:u,elements:l,middlewareData:s}=t,{element:f,padding:a=0}=p(e,t)||{};if(null==f)return{};const d=M(a),v={x:n,y:r},h=x(o),w=y(h),b=await u.getDimensions(f),R="y"===h,E=R?"top":"left",L=R?"bottom":"right",C=R?"clientHeight":"clientWidth",k=i.reference[w]+i.reference[h]-v[h]-i.floating[w],P=v[h]-i.reference[h],T=await(null==u.getOffsetParent?void 0:u.getOffsetParent(f));let A=T?T[C]:0;A&&await(null==u.isElement?void 0:u.isElement(T))||(A=l.floating[C]||i.floating[w]);const S=k/2-P/2,O=A/2-b[w]/2-1,D=c(d[E],O),q=c(d[L],O),B=D,F=A-b[w]-q,I=A/2-b[w]/2+S,H=m(B,I,F),W=!s.arrow&&null!=g(o)&&I!==H&&i.reference[w]/2-(Ie.y-t.y),n=[];let r=null;for(let e=0;er.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>S(F(e)))}(d),g=S(F(d)),h=M(s);const y=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===m.length&&m[0].left>m[1].right&&null!=f&&null!=a)return m.find(e=>f>e.left-h.left&&fe.top-h.top&&a=2){if("y"===b(n)){const e=m[0],t=m[m.length-1],r="top"===v(n),o=e.top,i=t.bottom,c=r?e.left:t.left,u=r?e.right:t.right;return{top:o,bottom:i,left:c,right:u,width:u-c,height:i-o,x:c,y:o}}const e="left"===v(n),t=u(...m.map(e=>e.right)),r=c(...m.map(e=>e.left)),o=m.filter(n=>e?n.left===r:n.right===t),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:r,right:t,width:t-r,height:l-i,x:r,y:i}}return g}},floating:r.floating,strategy:l});return o.reference.x!==y.reference.x||o.reference.y!==y.reference.y||o.reference.width!==y.reference.width||o.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},de=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=p(e,t),f={x:n,y:r},a=b(o),d=h(a);let m=f[d],g=f[a];const y=p(u,t),w="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+w.mainAxis,n=i.reference[d]+i.reference[e]-w.mainAxis;mn&&(m=n)}if(s){var x,R;const e="y"===d?"width":"height",t=I.has(v(o)),n=i.reference[a]-i.floating[e]+(t&&(null==(x=c.offset)?void 0:x[a])||0)+(t?0:w.crossAxis),r=i.reference[a]+i.reference[e]+(t?0:(null==(R=c.offset)?void 0:R[a])||0)-(t?w.crossAxis:0);gr&&(g=r)}return{[d]:m,[a]:g}}}},me=(e,t,n)=>{const r=new Map,o={platform:ee,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,u=i.filter(Boolean),l=await(null==c.isRTL?void 0:c.isRTL(t));let s=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:a}=O(s,r,l),d=r,m={},p=0;for(let n=0;n{t.current=e}),t}function a(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:d,elements:{reference:m,floating:p}={},transform:v=!0,whileElementsMounted:g,open:h}=e,[y,w]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=o.useState(a);u(b,a)||x(a);const[R,E]=o.useState(null),[L,C]=o.useState(null),k=o.useCallback(e=>{e!==M.current&&(M.current=e,E(e))},[]),P=o.useCallback(e=>{e!==S.current&&(S.current=e,C(e))},[]),T=m||R,A=p||L,M=o.useRef(null),S=o.useRef(null),O=o.useRef(y),D=null!=g,q=f(g),B=f(d),F=f(h),I=o.useCallback(()=>{if(!M.current||!S.current)return;const e={placement:t,strategy:n,middleware:b};B.current&&(e.platform=B.current),(0,r.computePosition)(M.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==F.current};H.current&&!u(O.current,t)&&(O.current=t,i.flushSync(()=>{w(t)}))})},[b,t,n,B,F]);c(()=>{!1===h&&O.current.isPositioned&&(O.current.isPositioned=!1,w(e=>({...e,isPositioned:!1})))},[h]);const H=o.useRef(!1);c(()=>(H.current=!0,()=>{H.current=!1}),[]),c(()=>{if(T&&(M.current=T),A&&(S.current=A),T&&A){if(q.current)return q.current(T,A,I);I()}},[T,A,I,q,D]);const W=o.useMemo(()=>({reference:M,floating:S,setReference:k,setFloating:P}),[k,P]),j=o.useMemo(()=>({reference:T,floating:A}),[T,A]),z=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=s(j.floating,y.x),r=s(j.floating,y.y);return v?{...e,transform:"translate("+t+"px, "+r+"px)",...l(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,v,j.floating,y.x,y.y]);return o.useMemo(()=>({...y,update:I,refs:W,elements:j,floatingStyles:z}),[y,I,W,j,z])}const d=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,r.arrow)({element:n.current,padding:o}).fn(t):{}:n?(0,r.arrow)({element:n,padding:o}).fn(t):{};var i}}),m=(e,t)=>({...(0,r.offset)(e),options:[e,t]}),p=(e,t)=>({...(0,r.shift)(e),options:[e,t]}),v=(e,t)=>({...(0,r.flip)(e),options:[e,t]}),g=(e,t)=>({...d(e),options:[e,t]})},83505:function(e,t,n){n.d(t,{ie:function(){return U},XF:function(){return ae},iB:function(){return ke},s9:function(){return ge},we:function(){return he},iQ:function(){return we},Mk:function(){return ie},bv:function(){return xe},SV:function(){return D},It:function(){return Ee}});var r=n(96540),o=n.t(r,2),i=n(86635),c=n(49054);function u(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function l(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function s(){return/apple/i.test(navigator.vendor)}function f(){return l().includes("jsdom/")}const a="data-floating-ui-focusable",d="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function m(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function p(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,i.Ng)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function v(e){return"composedPath"in e?e.composedPath()[0]:e.target}function g(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function h(e){return(null==e?void 0:e.ownerDocument)||document}function y(e){return(0,i.sb)(e)&&e.matches(d)}function w(e,t,n){void 0===n&&(n=!0);return e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...w(e,t.id,n)])}function b(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var x="undefined"!=typeof document?r.useLayoutEffect:function(){};function R(e){const t=r.useRef(e);return x(()=>{t.current=e}),t}const E={...o}.useInsertionEffect||(e=>e());function L(e){const t=r.useRef(()=>{0});return E(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function k(e,t){const n=(0,c.Kr)(e,C()),r=n.length;if(0===r)return;const o=m(h(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function P(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!p(n,r)}function T(e){(0,c.Kr)(e,C()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function A(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var M=n(74848),S=n(40961),O=n(34743);function D(e){const t=r.useRef(void 0),n=r.useCallback(t=>{const n=e.map(e=>{if(null!=e){if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return r.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}const q="data-floating-ui-focusable",B="active",F="selected",I="ArrowLeft",H="ArrowRight",W="ArrowUp",j="ArrowDown";const z=[I,H],N=[W,j],_={...o};let V=!1,K=0;const X=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+K++;const $=_.useId||function(){const[e,t]=r.useState(()=>V?X():void 0);return x(()=>{null==e&&t(X())},[]),r.useEffect(()=>{V=!0},[]),e};const U=r.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:c,shift:u}},width:l=14,height:s=7,tipRadius:f=0,strokeWidth:a=0,staticOffset:d,stroke:m,d:p,style:{transform:v,...g}={},...h}=e;const y=$(),[w,b]=r.useState(!1);if(x(()=>{if(!o)return;"rtl"===(0,i.L9)(o).direction&&b(!0)},[o]),!o)return null;const[R,E]=n.split("-"),L="top"===R||"bottom"===R;let C=d;(L&&null!=u&&u.x||!L&&null!=u&&u.y)&&(C=null);const k=2*a,P=k/2,T=l/2*(f/-8+1),A=s/2*f/4,S=!!p,O=C&&"end"===E?"bottom":"top";let D=C&&"end"===E?"right":"left";C&&w&&(D="end"===E?"left":"right");const q=null!=(null==c?void 0:c.x)?C||c.x:"",B=null!=(null==c?void 0:c.y)?C||c.y:"",F=p||"M0,0 H"+l+" L"+(l-T)+","+(s-A)+" Q"+l/2+","+s+" "+T+","+(s-A)+" Z",I={top:S?"rotate(180deg)":"",left:S?"rotate(90deg)":"rotate(-90deg)",bottom:S?"":"rotate(180deg)",right:S?"rotate(-90deg)":"rotate(90deg)"}[R];return(0,M.jsxs)("svg",{...h,"aria-hidden":!0,ref:t,width:S?l:l+k,height:l,viewBox:"0 0 "+l+" "+(s>l?s:l),style:{position:"absolute",pointerEvents:"none",[D]:q,[O]:B,[R]:L||S?"100%":"calc(100% - "+k/2+"px)",transform:[I,v].filter(e=>!!e).join(" "),...g},children:[k>0&&(0,M.jsx)("path",{clipPath:"url(#"+y+")",fill:"none",stroke:m,strokeWidth:k+(p?0:1),d:F}),(0,M.jsx)("path",{stroke:k&&!p?h.fill:"none",d:F}),(0,M.jsx)("clipPath",{id:y,children:(0,M.jsx)("rect",{x:-P,y:P*(S?-1:1),width:l+k,height:l})})]})});function Y(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}const Q=r.createContext(null),Z=r.createContext(null),J=()=>{var e;return(null==(e=r.useContext(Q))?void 0:e.id)||null},G=()=>r.useContext(Z);function ee(e){return"data-floating-ui-"+e}function te(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const ne=ee("safe-polygon");function re(e,t,n){if(n&&!b(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function oe(e){return"function"==typeof e?e():e}function ie(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:c,events:u,elements:l}=e,{enabled:s=!0,delay:f=0,handleClose:a=null,mouseOnly:d=!1,restMs:m=0,move:v=!0}=t,g=G(),y=J(),w=R(a),E=R(f),C=R(n),k=R(m),P=r.useRef(),T=r.useRef(-1),A=r.useRef(),M=r.useRef(-1),S=r.useRef(!0),O=r.useRef(!1),D=r.useRef(()=>{}),q=r.useRef(!1),B=L(()=>{var e;const t=null==(e=c.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});r.useEffect(()=>{if(s)return u.on("openchange",e),()=>{u.off("openchange",e)};function e(e){let{open:t}=e;t||(te(T),te(M),S.current=!0,q.current=!1)}},[s,u]),r.useEffect(()=>{if(!s)return;if(!w.current)return;if(!n)return;function e(e){B()&&o(!1,e,"hover")}const t=h(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,n,o,s,w,B]);const F=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=re(E.current,"close",P.current);r&&!A.current?(te(T),T.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(te(T),o(!1,e,n))},[E,o]),I=L(()=>{D.current(),A.current=void 0}),H=L(()=>{if(O.current){const e=h(l.floating).body;e.style.pointerEvents="",e.removeAttribute(ne),O.current=!1}}),W=L(()=>!!c.current.openEvent&&["click","mousedown"].includes(c.current.openEvent.type));r.useEffect(()=>{if(s&&(0,i.vq)(l.domReference)){const o=l.domReference,i=l.floating;return n&&o.addEventListener("mouseleave",r),v&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),i&&(i.addEventListener("mouseleave",r),i.addEventListener("mouseenter",u),i.addEventListener("mouseleave",f)),()=>{n&&o.removeEventListener("mouseleave",r),v&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),i&&(i.removeEventListener("mouseleave",r),i.removeEventListener("mouseenter",u),i.removeEventListener("mouseleave",f))}}function e(e){if(te(T),S.current=!1,d&&!b(P.current)||oe(k.current)>0&&!re(E.current,"open"))return;const t=re(E.current,"open",P.current);t?T.current=window.setTimeout(()=>{C.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function t(e){if(W())return void H();D.current();const t=h(l.floating);if(te(M),q.current=!1,w.current&&c.current.floatingContext){n||te(T),A.current=w.current({...c.current.floatingContext,tree:g,x:e.clientX,y:e.clientY,onClose(){H(),I(),W()||F(e,!0,"safe-polygon")}});const r=A.current;return t.addEventListener("mousemove",r),void(D.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==P.current||!p(l.floating,e.relatedTarget))&&F(e)}function r(e){W()||c.current.floatingContext&&(null==w.current||w.current({...c.current.floatingContext,tree:g,x:e.clientX,y:e.clientY,onClose(){H(),I(),W()||F(e)}})(e))}function u(){te(T)}function f(e){W()||F(e,!1)}},[l,s,e,d,v,F,I,H,o,n,C,g,E,w,c,W,k]),x(()=>{var e;if(s&&n&&null!=(e=w.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&B()){O.current=!0;const e=l.floating;if((0,i.vq)(l.domReference)&&e){var t;const n=h(l.floating).body;n.setAttribute(ne,"");const r=l.domReference,o=null==g||null==(t=g.nodesRef.current.find(e=>e.id===y))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.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,l,g,w,B]),x(()=>{n||(P.current=void 0,q.current=!1,I(),H())},[n,I,H]),r.useEffect(()=>()=>{I(),te(T),te(M),H()},[s,l.domReference,I,H]);const j=r.useMemo(()=>{function e(e){P.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){S.current||C.current||o(!0,t,"hover")}d&&!b(P.current)||n||0===oe(k.current)||q.current&&e.movementX**2+e.movementY**2<2||(te(M),"touch"===P.current?r():(q.current=!0,M.current=window.setTimeout(r,oe(k.current))))}}},[d,o,n,C,k]);return r.useMemo(()=>s?{reference:j}:{},[s,j])}function ce(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,i.Ng)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}const ue={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},le=r.forwardRef(function(e,t){const[n,o]=r.useState();x(()=>{s()&&o("button")},[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[ee("focus-guard")]:"",style:ue};return(0,M.jsx)("span",{...e,...i})}),se=r.createContext(null),fe=ee("portal");function ae(e){const{children:t,id:n,root:o,preserveTabOrder:c=!0}=e,u=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=$(),c=de(),[u,l]=r.useState(null),s=r.useRef(null);return x(()=>()=>{null==u||u.remove(),queueMicrotask(()=>{s.current=null})},[u]),x(()=>{if(!o)return;if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(fe,""),e.appendChild(n),s.current=n,l(n)},[t,o]),x(()=>{if(null===n)return;if(!o)return;if(s.current)return;let e=n||(null==c?void 0:c.portalNode);e&&!(0,i.vq)(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const u=document.createElement("div");u.id=o,u.setAttribute(fe,""),e=r||e,e.appendChild(u),s.current=u,l(u)},[t,n,o,c]),u}({id:n,root:o}),[l,s]=r.useState(null),f=r.useRef(null),a=r.useRef(null),d=r.useRef(null),m=r.useRef(null),p=null==l?void 0:l.modal,v=null==l?void 0:l.open,g=!!l&&!l.modal&&l.open&&c&&!(!o&&!u);return r.useEffect(()=>{if(u&&c&&!p)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){if(u&&P(e)){("focusin"===e.type?A:T)(u)}}},[u,c,p]),r.useEffect(()=>{u&&(v||A(u))},[v,u]),(0,M.jsxs)(se.Provider,{value:r.useMemo(()=>({preserveTabOrder:c,beforeOutsideRef:f,afterOutsideRef:a,beforeInsideRef:d,afterInsideRef:m,portalNode:u,setFocusManagerState:s}),[c,u]),children:[g&&u&&(0,M.jsx)(le,{"data-type":"outside",ref:f,onFocus:e=>{if(P(e,u)){var t;null==(t=d.current)||t.focus()}else{const e=l?l.domReference:null,t=k(h(n=e).body,-1)||n;null==t||t.focus()}var n}}),g&&u&&(0,M.jsx)("span",{"aria-owns":u.id,style:ue}),u&&S.createPortal(t,u),g&&u&&(0,M.jsx)(le,{"data-type":"outside",ref:a,onFocus:e=>{if(P(e,u)){var t;null==(t=m.current)||t.focus()}else{const t=l?l.domReference:null,r=k(h(n=t).body,1)||n;null==r||r.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}var n}})]})}const de=()=>r.useContext(se);const me={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},pe={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ve=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 ge(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:c,dataRef:u}=e,{enabled:l=!0,escapeKey:s=!0,outsidePress:f=!0,outsidePressEvent:a="pointerdown",referencePress:d=!1,referencePressEvent:m="pointerdown",ancestorScroll:y=!1,bubbles:b,capture:x}=t,R=G(),E=L("function"==typeof f?f:()=>!1),C="function"==typeof f?E:f,k=r.useRef(!1),{escapeKey:P,outsidePress:T}=ve(b),{escapeKey:A,outsidePress:M}=ve(x),S=r.useRef(!1),O=r.useRef(-1),D=L(e=>{var t;if(!n||!l||!s||"Escape"!==e.key)return;if(S.current)return;const r=null==(t=u.current.floatingContext)?void 0:t.nodeId,i=R?w(R.nodesRef.current,r):[];if(!P&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),q=L(e=>{var t;const n=()=>{var t;D(e),null==(t=v(e))||t.removeEventListener("keydown",n)};null==(t=v(e))||t.addEventListener("keydown",n)}),B=L(e=>{var t;const n=u.current.insideReactTree;u.current.insideReactTree=!1;const r=k.current;if(k.current=!1,"click"===a&&r)return;if(n)return;if("function"==typeof C&&!C(e))return;const l=v(e),s="["+ee("inert")+"]",f=h(c.floating).querySelectorAll(s);let d=(0,i.vq)(l)?l:null;for(;d&&!(0,i.eu)(d);){const e=(0,i.$4)(d);if((0,i.eu)(e)||!(0,i.vq)(e))break;d=e}if(f.length&&(0,i.vq)(l)&&!l.matches("html,body")&&!p(l,c.floating)&&Array.from(f).every(e=>!p(d,e)))return;if((0,i.sb)(l)&&H){const t=(0,i.eu)(l),n=(0,i.L9)(l),r=/auto|scroll/,o=t||r.test(n.overflowX),c=t||r.test(n.overflowY),u=o&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,s=c&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,f="rtl"===n.direction,a=s&&(f?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),d=u&&e.offsetY>l.clientHeight;if(a||d)return}const m=null==(t=u.current.floatingContext)?void 0:t.nodeId,y=R&&w(R.nodesRef.current,m).some(t=>{var n;return g(e,null==(n=t.context)?void 0:n.elements.floating)});if(g(e,c.floating)||g(e,c.domReference)||y)return;const b=R?w(R.nodesRef.current,m):[];if(b.length>0){let e=!0;if(b.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),F=L(e=>{var t;const n=()=>{var t;B(e),null==(t=v(e))||t.removeEventListener(a,n)};null==(t=v(e))||t.addEventListener(a,n)});r.useEffect(()=>{if(!n||!l)return;u.current.__escapeKeyBubbles=P,u.current.__outsidePressBubbles=T;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),S.current=!0}function f(){e=window.setTimeout(()=>{S.current=!1},(0,i.Tc)()?5:0)}const d=h(c.floating);s&&(d.addEventListener("keydown",A?q:D,A),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",f)),C&&d.addEventListener(a,M?F:B,M);let m=[];return y&&((0,i.vq)(c.domReference)&&(m=(0,i.v9)(c.domReference)),(0,i.vq)(c.floating)&&(m=m.concat((0,i.v9)(c.floating))),!(0,i.vq)(c.reference)&&c.reference&&c.reference.contextElement&&(m=m.concat((0,i.v9)(c.reference.contextElement)))),m=m.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),m.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{s&&(d.removeEventListener("keydown",A?q:D,A),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",f)),C&&d.removeEventListener(a,M?F:B,M),m.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[u,c,s,C,a,n,o,y,l,P,T,D,A,q,B,M,F]),r.useEffect(()=>{u.current.insideReactTree=!1},[u,C,a]);const I=r.useMemo(()=>({onKeyDown:D,...d&&{[me[m]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==m&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[D,o,d,m]),H=r.useMemo(()=>({onKeyDown:D,onMouseDown(){k.current=!0},onMouseUp(){k.current=!0},[pe[a]]:()=>{u.current.insideReactTree=!0},onBlurCapture(){R||(te(O),u.current.insideReactTree=!0,O.current=window.setTimeout(()=>{u.current.insideReactTree=!1}))}}),[D,a,u,R]);return r.useMemo(()=>l?{reference:I,floating:H}:{},[l,I,H])}function he(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=$(),c=r.useRef({}),[u]=r.useState(()=>Y()),l=null!=J(),[s,f]=r.useState(o.reference),a=L((e,t,r)=>{c.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),d=r.useMemo(()=>({setPositionReference:f}),[]),m=r.useMemo(()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference}),[s,o.reference,o.floating]);return r.useMemo(()=>({dataRef:c,open:t,onOpenChange:a,elements:m,events:u,floatingId:i,refs:d}),[t,a,m,u,i,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,c=o.elements,[u,l]=r.useState(null),[s,f]=r.useState(null),a=(null==c?void 0:c.domReference)||u,d=r.useRef(null),m=G();x(()=>{a&&(d.current=a)},[a]);const p=(0,O.we)({...e,elements:{...c,...s&&{reference:s}}}),v=r.useCallback(e=>{const t=(0,i.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;f(t),p.refs.setReference(t)},[p.refs]),g=r.useCallback(e=>{((0,i.vq)(e)||null===e)&&(d.current=e,l(e)),((0,i.vq)(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!(0,i.vq)(e))&&p.refs.setReference(e)},[p.refs]),h=r.useMemo(()=>({...p.refs,setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=r.useMemo(()=>({...p.elements,domReference:a}),[p.elements,a]),w=r.useMemo(()=>({...p,...o,refs:h,elements:y,nodeId:t}),[p,h,y,t,o]);return x(()=>{o.dataRef.current.floatingContext=w;const e=null==m?void 0:m.nodesRef.current.find(e=>e.id===t);e&&(e.context=w)}),r.useMemo(()=>({...p,context:w,refs:h,elements:y}),[p,h,y,w])}function ye(){return u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&s()}function we(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,events:c,dataRef:u,elements:l}=e,{enabled:s=!0,visibleOnly:a=!0}=t,d=r.useRef(!1),g=r.useRef(-1),w=r.useRef(!0);r.useEffect(()=>{if(!s)return;const e=(0,i.zk)(l.domReference);function t(){!n&&(0,i.sb)(l.domReference)&&l.domReference===m(h(l.domReference))&&(d.current=!0)}function r(){w.current=!0}function o(){w.current=!1}return e.addEventListener("blur",t),ye()&&(e.addEventListener("keydown",r,!0),e.addEventListener("pointerdown",o,!0)),()=>{e.removeEventListener("blur",t),ye()&&(e.removeEventListener("keydown",r,!0),e.removeEventListener("pointerdown",o,!0))}},[l.domReference,n,s]),r.useEffect(()=>{if(s)return c.on("openchange",e),()=>{c.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(d.current=!0)}},[c,s]),r.useEffect(()=>()=>{te(g)},[]);const b=r.useMemo(()=>({onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;const t=v(e.nativeEvent);if(a&&(0,i.vq)(t))if(ye()&&!e.relatedTarget){if(!w.current&&!y(t))return}else if(!function(e){if(!e||f())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return;o(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=(0,i.vq)(t)&&t.hasAttribute(ee("focus-guard"))&&"outside"===t.getAttribute("data-type");g.current=window.setTimeout(()=>{var e;const i=m(l.domReference?l.domReference.ownerDocument:document);(t||i!==l.domReference)&&(p(null==(e=u.current.floatingContext)?void 0:e.refs.floating.current,i)||p(l.domReference,i)||r||o(!1,n,"focus"))})}}),[u,l.domReference,o,a]);return r.useMemo(()=>s?{reference:b}:{},[s,b])}function be(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[B]:t,[F]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[q]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var c;o&&[B,F].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(c=r.get(n))||c.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;ie(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function xe(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=r.useCallback(t=>be(t,e,"reference"),t),c=r.useCallback(t=>be(t,e,"floating"),n),u=r.useCallback(t=>be(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:i,getFloatingProps:c,getItemProps:u}),[i,c,u])}const Re=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ee(e,t){var n,o;void 0===t&&(t={});const{open:i,elements:c,floatingId:u}=e,{enabled:l=!0,role:s="dialog"}=t,f=$(),d=(null==(n=c.domReference)?void 0:n.id)||f,m=r.useMemo(()=>{var e,t;return(null==(e=(t=c.floating)?t.hasAttribute(a)?t:t.querySelector("["+a+"]")||t:null)?void 0:e.id)||u},[c.floating,u]),p=null!=(o=Re.get(s))?o:s,v=null!=J(),g=r.useMemo(()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?m:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?m:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&v&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[p,m,v,i,d,s]),h=r.useMemo(()=>{const e={id:m,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}},[p,m,d,s]),y=r.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:m+"-fui-option"}};switch(s){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,"aria-selected":n}}return{}},[m,s]);return r.useMemo(()=>l?{reference:g,floating:h,item:y}:{},[l,g,h,y])}function Le(e,t,n){void 0===n&&(n=!0);return e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Le(e,t.id,n)])}function Ce(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,c=i-1;e=r!=s>=r&&n<=(l-i)*(r-u)/(s-u)+i&&(o=!o)}return o}function ke(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let c=!1,u=null,l=null,s=performance.now();const f=e=>{let{x:n,y:f,placement:a,elements:d,onClose:m,nodeId:p,tree:v}=e;return function(e){function g(){te(o),m()}if(te(o),!d.domReference||!d.floating||null==a||null==n||null==f)return;const{clientX:h,clientY:y}=e,w=[h,y],b=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e),x="mouseleave"===e.type,R=ce(d.floating,b),E=ce(d.domReference,b),L=d.domReference.getBoundingClientRect(),C=d.floating.getBoundingClientRect(),k=a.split("-")[0],P=n>C.right-C.width/2,T=f>C.bottom-C.height/2,A=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(w,L),M=C.width>L.width,S=C.height>L.height,O=(M?L:C).left,D=(M?L:C).right,q=(S?L:C).top,B=(S?L:C).bottom;if(R&&(c=!0,!x))return;if(E&&(c=!1),E&&!x)return void(c=!0);if(x&&(0,i.vq)(e.relatedTarget)&&ce(d.floating,e.relatedTarget))return;if(v&&Le(v.nodesRef.current,p).length)return;if("top"===k&&f>=L.bottom-1||"bottom"===k&&f<=L.top+1||"left"===k&&n>=L.right-1||"right"===k&&n<=L.left+1)return g();let F=[];switch(k){case"top":F=[[O,L.top+1],[O,C.bottom-1],[D,C.bottom-1],[D,L.top+1]];break;case"bottom":F=[[O,C.top+1],[O,L.bottom-1],[D,L.bottom-1],[D,C.top+1]];break;case"left":F=[[C.right-1,B],[C.right-1,q],[L.left+1,q],[L.left+1,B]];break;case"right":F=[[L.right-1,B],[L.right-1,q],[C.left+1,q],[C.left+1,B]]}if(!Ce([h,y],F)){if(c&&!A)return g();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-s;if(null===u||null===l||0===r)return u=e,l=t,s=n,null;const o=e-u,i=t-l,c=Math.sqrt(o*o+i*i);return u=e,l=t,s=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}Ce([h,y],function(e){let[n,r]=e;switch(k){case"top":return[[M?n+t/2:P?n+4*t:n-4*t,r+t+1],[M?n-t/2:P?n+4*t:n-4*t,r+t+1],...[[C.left,P||M?C.bottom-t:C.top],[C.right,P?M?C.bottom-t:C.top:C.bottom-t]]];case"bottom":return[[M?n+t/2:P?n+4*t:n-4*t,r-t],[M?n-t/2:P?n+4*t:n-4*t,r-t],...[[C.left,P||M?C.top+t:C.bottom],[C.right,P?M?C.top+t:C.bottom:C.top+t]]];case"left":{const e=[n+t+1,S?r+t/2:T?r+4*t:r-4*t],o=[n+t+1,S?r-t/2:T?r+4*t:r-4*t];return[...[[T||S?C.right-t:C.left,C.top],[T?S?C.right-t:C.left:C.right-t,C.bottom]],e,o]}case"right":return[[n-t,S?r+t/2:T?r+4*t:r-4*t],[n-t,S?r-t/2:T?r+4*t:r-4*t],...[[T||S?C.left+t:C.right,C.top],[T?S?C.left+t:C.right:C.left+t,C.bottom]]]}}([n,f]))?!c&&r&&(o.current=window.setTimeout(g,40)):g()}}};return f.__options={blockPointerEvents:n},f}},86635:function(e,t,n){function r(){return"undefined"!=typeof window}function o(e){return u(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function c(e){var t;return null==(t=(u(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function l(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function s(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function f(e){return!(!r()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}n.d(t,{$4:function(){return P},CP:function(){return k},L9:function(){return C},Lv:function(){return p},Ng:function(){return f},Tc:function(){return R},Tf:function(){return g},ZU:function(){return d},_m:function(){return M},ep:function(){return c},eu:function(){return L},gJ:function(){return x},mq:function(){return o},sQ:function(){return b},sb:function(){return s},v9:function(){return A},vq:function(){return l},zk:function(){return i}});const a=new Set(["inline","contents"]);function d(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=C(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!a.has(o)}const m=new Set(["table","td","th"]);function p(e){return m.has(o(e))}const v=[":popover-open",":modal"];function g(e){return v.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const h=["transform","translate","scale","rotate","perspective"],y=["transform","translate","scale","rotate","perspective","filter"],w=["paint","layout","strict","content"];function b(e){const t=R(),n=l(e)?C(e):e;return h.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||y.some(e=>(n.willChange||"").includes(e))||w.some(e=>(n.contain||"").includes(e))}function x(e){let t=P(e);for(;s(t)&&!L(t);){if(b(t))return t;if(g(t))return null;t=P(t)}return null}function R(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const E=new Set(["html","body","#document"]);function L(e){return E.has(o(e))}function C(e){return i(e).getComputedStyle(e)}function k(e){return l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function P(e){if("html"===o(e))return e;const t=e.assignedSlot||e.parentNode||f(e)&&e.host||c(e);return f(t)?t.host:t}function T(e){const t=P(e);return L(t)?e.ownerDocument?e.ownerDocument.body:e.body:s(t)&&d(t)?t:T(t)}function A(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=T(e),c=o===(null==(r=e.ownerDocument)?void 0:r.body),u=i(o);if(c){const e=M(u);return t.concat(u,u.visualViewport||[],d(o)?o:[],e&&n?A(e):[])}return t.concat(o,A(o,[],n))}function M(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}}}]);