profinansy-ui-lib 3.8.2 → 3.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -316,7 +316,7 @@ Check the top-level render call using <`+Q+">.")}return Z}}function V2(I,Z){{if(
316
316
  `;function Qo(){return typeof window<"u"}function Tn(e){return L0(e)?(e.nodeName||"").toLowerCase():"#document"}function Ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qt(e){var t;return(t=(L0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function L0(e){return Qo()?e instanceof Node||e instanceof Ct(e).Node:!1}function Ee(e){return Qo()?e instanceof Element||e instanceof Ct(e).Element:!1}function Xe(e){return Qo()?e instanceof HTMLElement||e instanceof Ct(e).HTMLElement:!1}function ka(e){return!Qo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ct(e).ShadowRoot}function Ir(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function S8(e){return["table","td","th"].includes(Tn(e))}function Ko(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function bs(e){const t=qo(),n=Ee(e)?vt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function D8(e){let t=fn(e);for(;Xe(t)&&!Dn(t);){if(bs(t))return t;if(Ko(t))return null;t=fn(t)}return null}function qo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Dn(e){return["html","body","#document"].includes(Tn(e))}function vt(e){return Ct(e).getComputedStyle(e)}function ei(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fn(e){if(Tn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ka(e)&&e.host||qt(e);return ka(t)?t.host:t}function S0(e){const t=fn(e);return Dn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&Ir(t)?t:S0(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=S0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ct(o);if(i){const l=Ma(a);return t.concat(a,a.visualViewport||[],Ir(o)?o:[],l&&n?kn(l):[])}return t.concat(o,kn(o,[],n))}function Ma(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ze(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ka(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function D0(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function _0(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function _8(e){return e.mozInputSource===0&&e.isTrusted?!0:Ia()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $0(e){return T8()?!1:!Ia()&&e.width===0&&e.height===0||Ia()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function T0(){return/apple/i.test(navigator.vendor)}function Ia(){const e=/android/i;return e.test(D0())||e.test(_0())}function $8(){return D0().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function T8(){return _0().includes("jsdom/")}function cr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function A8(e){return"nativeEvent"in e}function R8(e){return e.matches("html,body")}function rt(e){return e?.ownerDocument||document}function Ri(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function an(e){return"composedPath"in e?e.composedPath()[0]:e.target}const P8="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function xs(e){return Xe(e)&&e.matches(P8)}function Pi(e){e.preventDefault(),e.stopPropagation()}function H8(e){return e?e.getAttribute("role")==="combobox"&&xs(e):!1}const M1=Math.min,On=Math.max,Eo=Math.round,Wr=Math.floor,zt=e=>({x:e,y:e}),j8={left:"right",right:"left",bottom:"top",top:"bottom"},F8={start:"end",end:"start"};function La(e,t,n){return On(e,M1(t,n))}function Lr(e,t){return typeof e=="function"?e(t):e}function Gn(e){return e.split("-")[0]}function Sr(e){return e.split("-")[1]}function A0(e){return e==="x"?"y":"x"}function ys(e){return e==="y"?"height":"width"}function I1(e){return["top","bottom"].includes(Gn(e))?"y":"x"}function ws(e){return A0(I1(e))}function B8(e,t,n){n===void 0&&(n=!1);const r=Sr(e),o=ws(e),i=ys(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ko(a)),[a,ko(a)]}function V8(e){const t=ko(e);return[Sa(e),t,Sa(t)]}function Sa(e){return e.replace(/start|end/g,t=>F8[t])}function O8(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function N8(e,t,n,r){const o=Sr(e);let i=O8(Gn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Sa)))),i}function ko(e){return e.replace(/left|right|bottom|top/g,t=>j8[t])}function Z8(e){return{top:0,right:0,bottom:0,left:0,...e}}function R0(e){return typeof e!="number"?Z8(e):{top:e,right:e,bottom:e,left:e}}function Mo(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}}/*!
317
317
  * tabbable 6.2.0
318
318
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
319
- */var W8=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Io=W8.join(","),P0=typeof Element>"u",L1=P0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Lo=!P0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},So=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},G8=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Y8=function(t,n,r){if(So(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Io));return n&&L1.call(t,Io)&&o.unshift(t),o=o.filter(r),o},z8=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!So(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),c=l.length?l:a.children,d=e(c,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else{var p=L1.call(a,Io);p&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),C=!So(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&C){var g=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:a,candidates:g})}else i.unshift.apply(i,a.children)}}return o},H0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},j0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||G8(t))&&!H0(t)?0:t.tabIndex},X8=function(t,n){var r=j0(t);return r<0&&n&&!H0(t)?0:r},U8=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},F0=function(t){return t.tagName==="INPUT"},J8=function(t){return F0(t)&&t.type==="hidden"},Q8=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},K8=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},q8=function(t){if(!t.name)return!0;var n=t.form||Lo(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=K8(o,t.form);return!i||i===t},ep=function(t){return F0(t)&&t.type==="radio"},tp=function(t){return ep(t)&&!q8(t)},np=function(t){var n,r=t&&Lo(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,l,c;for(i=!!((a=o)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var d,p,f;r=Lo(o),o=(d=r)===null||d===void 0?void 0:d.host,i=!!((p=o)!==null&&p!==void 0&&(f=p.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},l5=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rp=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=L1.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(L1.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,d=Lo(t);if(c&&!c.shadowRoot&&o(c)===!0)return l5(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=l}if(np(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return l5(t);return!1},op=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return L1.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ip=function(t,n){return!(n.disabled||So(n)||J8(n)||rp(n,t)||Q8(n)||op(n))},Da=function(t,n){return!(tp(n)||j0(n)<0||!ip(t,n))},ap=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sp=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,l=a?o.scopeParent:o,c=X8(l,a),d=a?e(o.candidates):l;c===0?a?n.push.apply(n,d):n.push(l):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:d})}),r.sort(U8).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ti=function(t,n){n=n||{};var r;return n.getShadowRoot?r=z8([t],n.includeContainer,{filter:Da.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ap}):r=Y8(t,n.includeContainer,Da.bind(null,n)),sp(r)},lp=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return L1.call(t,Io)===!1?!1:Da(n,t)};function c5(e,t,n){let{reference:r,floating:o}=e;const i=I1(t),a=ws(t),l=ys(a),c=Gn(t),d=i==="y",p=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,C=r[l]/2-o[l]/2;let g;switch(c){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Sr(t)){case"start":g[a]-=C*(n&&d?-1:1);break;case"end":g[a]+=C*(n&&d?-1:1);break}return g}const cp=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:f}=c5(d,r,c),C=r,g={},v=0;for(let b=0;b<l.length;b++){const{name:x,fn:y}=l[b],{x:E,y:w,data:M,reset:k}=await y({x:p,y:f,initialPlacement:r,placement:C,strategy:o,middlewareData:g,rects:d,platform:a,elements:{reference:e,floating:t}});p=E??p,f=w??f,g={...g,[x]:{...g[x],...M}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(C=k.placement),k.rects&&(d=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:p,y:f}=c5(d,C,c)),b=-1)}return{x:p,y:f,placement:C,strategy:o,middlewareData:g}};async function B0(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:C=!1,padding:g=0}=Lr(t,e),v=R0(g),x=l[C?f==="floating"?"reference":"floating":f],y=Mo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:d,rootBoundary:p,strategy:c})),E=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),M=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Mo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:w,strategy:c}):E);return{top:(y.top-k.top+v.top)/M.y,bottom:(k.bottom-y.bottom+v.bottom)/M.y,left:(y.left-k.left+v.left)/M.x,right:(k.right-y.right+v.right)/M.x}}const up=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:c}=t,{element:d,padding:p=0}=Lr(e,t)||{};if(d==null)return{};const f=R0(p),C={x:n,y:r},g=ws(o),v=ys(g),b=await a.getDimensions(d),x=g==="y",y=x?"top":"left",E=x?"bottom":"right",w=x?"clientHeight":"clientWidth",M=i.reference[v]+i.reference[g]-C[g]-i.floating[v],k=C[g]-i.reference[g],L=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let S=L?L[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(L)))&&(S=l.floating[w]||i.floating[v]);const D=M/2-k/2,_=S/2-b[v]/2-1,j=M1(f[y],_),B=M1(f[E],_),A=j,N=S-b[v]-B,R=S/2-b[v]/2+D,P=La(A,R,N),T=!c.arrow&&Sr(o)!=null&&R!==P&&i.reference[v]/2-(R<A?j:B)-b[v]/2<0,H=T?R<A?R-A:R-N:0;return{[g]:C[g]+H,data:{[g]:P,centerOffset:R-P-H,...T&&{alignmentOffset:H}},reset:T}}}),dp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:C,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...x}=Lr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Gn(o),E=I1(l),w=Gn(l)===l,M=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=C||(w||!b?[ko(l)]:V8(l)),L=v!=="none";!C&&L&&k.push(...N8(l,b,v,M));const S=[l,...k],D=await B0(t,x),_=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&_.push(D[y]),f){const R=B8(o,a,M);_.push(D[R[0]],D[R[1]])}if(j=[...j,{placement:o,overflows:_}],!_.every(R=>R<=0)){var B,A;const R=(((B=i.flip)==null?void 0:B.index)||0)+1,P=S[R];if(P)return{data:{index:R,overflows:j},reset:{placement:P}};let T=(A=j.filter(H=>H.overflows[0]<=0).sort((H,F)=>H.overflows[1]-F.overflows[1])[0])==null?void 0:A.placement;if(!T)switch(g){case"bestFit":{var N;const H=(N=j.filter(F=>{if(L){const $=I1(F.placement);return $===E||$==="y"}return!0}).map(F=>[F.placement,F.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((F,$)=>F[1]-$[1])[0])==null?void 0:N[0];H&&(T=H);break}case"initialPlacement":T=l;break}if(o!==T)return{reset:{placement:T}}}return{}}}};async function pp(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Gn(n),l=Sr(n),c=I1(n)==="y",d=["left","top"].includes(a)?-1:1,p=i&&c?-1:1,f=Lr(t,e);let{mainAxis:C,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),c?{x:g*p,y:C*d}:{x:C*d,y:g*p}}const fp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,c=await pp(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},hp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:y,y:E}=x;return{x:y,y:E}}},...c}=Lr(e,t),d={x:n,y:r},p=await B0(t,c),f=I1(Gn(o)),C=A0(f);let g=d[C],v=d[f];if(i){const x=C==="y"?"top":"left",y=C==="y"?"bottom":"right",E=g+p[x],w=g-p[y];g=La(E,g,w)}if(a){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=v+p[x],w=v-p[y];v=La(E,v,w)}const b=l.fn({...t,[C]:g,[f]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[C]:i,[f]:a}}}}}};function V0(e){const t=vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Eo(n)!==i||Eo(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Es(e){return Ee(e)?e:e.contextElement}function v1(e){const t=Es(e);if(!Xe(t))return zt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=V0(t);let a=(i?Eo(n.width):n.width)/r,l=(i?Eo(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const mp=zt(0);function O0(e){const t=Ct(e);return!qo()||!t.visualViewport?mp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ct(e)?!1:t}function Yn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Es(e);let a=zt(1);t&&(r?Ee(r)&&(a=v1(r)):a=v1(e));const l=gp(i,n,r)?O0(i):zt(0);let c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,p=o.width/a.x,f=o.height/a.y;if(i){const C=Ct(i),g=r&&Ee(r)?Ct(r):r;let v=C,b=Ma(v);for(;b&&r&&g!==v;){const x=v1(b),y=b.getBoundingClientRect(),E=vt(b),w=y.left+(b.clientLeft+parseFloat(E.paddingLeft))*x.x,M=y.top+(b.clientTop+parseFloat(E.paddingTop))*x.y;c*=x.x,d*=x.y,p*=x.x,f*=x.y,c+=w,d+=M,v=Ct(b),b=Ma(v)}}return Mo({width:p,height:f,x:c,y:d})}function ks(e,t){const n=ei(e).scrollLeft;return t?t.left+n:Yn(qt(e)).left+n}function N0(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ks(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Cp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qt(r),l=t?Ko(t.floating):!1;if(r===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},d=zt(1);const p=zt(0),f=Xe(r);if((f||!f&&!i)&&((Tn(r)!=="body"||Ir(a))&&(c=ei(r)),Xe(r))){const g=Yn(r);d=v1(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const C=a&&!f&&!i?N0(a,c,!0):zt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+p.x+C.x,y:n.y*d.y-c.scrollTop*d.y+p.y+C.y}}function vp(e){return Array.from(e.getClientRects())}function bp(e){const t=qt(e),n=ei(e),r=e.ownerDocument.body,o=On(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=On(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ks(e);const l=-n.scrollTop;return vt(r).direction==="rtl"&&(a+=On(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function xp(e,t){const n=Ct(e),r=qt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;const d=qo();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}function yp(e,t){const n=Yn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xe(e)?v1(e):zt(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,c=o*i.x,d=r*i.y;return{width:a,height:l,x:c,y:d}}function u5(e,t,n){let r;if(t==="viewport")r=xp(e,n);else if(t==="document")r=bp(qt(e));else if(Ee(t))r=yp(t,n);else{const o=O0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Mo(r)}function Z0(e,t){const n=fn(e);return n===t||!Ee(n)||Dn(n)?!1:vt(n).position==="fixed"||Z0(n,t)}function wp(e,t){const n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(l=>Ee(l)&&Tn(l)!=="body"),o=null;const i=vt(e).position==="fixed";let a=i?fn(e):e;for(;Ee(a)&&!Dn(a);){const l=vt(a),c=bs(a);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ir(a)&&!c&&Z0(e,a))?r=r.filter(p=>p!==a):o=l,a=fn(a)}return t.set(e,r),r}function Ep(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ko(t)?[]:wp(t,this._c):[].concat(n),r],l=a[0],c=a.reduce((d,p)=>{const f=u5(t,p,o);return d.top=On(f.top,d.top),d.right=M1(f.right,d.right),d.bottom=M1(f.bottom,d.bottom),d.left=On(f.left,d.left),d},u5(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kp(e){const{width:t,height:n}=V0(e);return{width:t,height:n}}function Mp(e,t,n){const r=Xe(t),o=qt(t),i=n==="fixed",a=Yn(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=zt(0);if(r||!r&&!i)if((Tn(t)!=="body"||Ir(o))&&(l=ei(t)),r){const C=Yn(t,!0,i,t);c.x=C.x+t.clientLeft,c.y=C.y+t.clientTop}else o&&(c.x=ks(o));const d=o&&!r&&!i?N0(o,l):zt(0),p=a.left+l.scrollLeft-c.x-d.x,f=a.top+l.scrollTop-c.y-d.y;return{x:p,y:f,width:a.width,height:a.height}}function Hi(e){return vt(e).position==="static"}function d5(e,t){if(!Xe(e)||vt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qt(e)===n&&(n=n.ownerDocument.body),n}function W0(e,t){const n=Ct(e);if(Ko(e))return n;if(!Xe(e)){let o=fn(e);for(;o&&!Dn(o);){if(Ee(o)&&!Hi(o))return o;o=fn(o)}return n}let r=d5(e,t);for(;r&&S8(r)&&Hi(r);)r=d5(r,t);return r&&Dn(r)&&Hi(r)&&!bs(r)?n:r||D8(e)||n}const Ip=async function(e){const t=this.getOffsetParent||W0,n=this.getDimensions,r=await n(e.floating);return{reference:Mp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lp(e){return vt(e).direction==="rtl"}const Sp={convertOffsetParentRelativeRectToViewportRelativeRect:Cp,getDocumentElement:qt,getClippingRect:Ep,getOffsetParent:W0,getElementRects:Ip,getClientRects:vp,getDimensions:kp,getScale:v1,isElement:Ee,isRTL:Lp};function G0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dp(e,t){let n=null,r;const o=qt(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:p,top:f,width:C,height:g}=d;if(l||t(),!C||!g)return;const v=Wr(f),b=Wr(o.clientWidth-(p+C)),x=Wr(o.clientHeight-(f+g)),y=Wr(p),w={rootMargin:-v+"px "+-b+"px "+-x+"px "+-y+"px",threshold:On(0,M1(1,c))||1};let M=!0;function k(L){const S=L[0].intersectionRatio;if(S!==c){if(!M)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!G0(d,e.getBoundingClientRect())&&a(),M=!1}try{n=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return a(!0),i}function r1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Es(e),p=o||i?[...d?kn(d):[],...kn(t)]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=d&&l?Dp(d,n):null;let C=-1,g=null;a&&(g=new ResizeObserver(y=>{let[E]=y;E&&E.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),d&&!c&&g.observe(d),g.observe(t));let v,b=c?Yn(e):null;c&&x();function x(){const y=Yn(e);b&&!G0(b,y)&&n(),b=y,v=requestAnimationFrame(x)}return n(),()=>{var y;p.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),f?.(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(v)}}const _p=fp,$p=hp,Tp=dp,p5=up,Ap=(e,t,n)=>{const r=new Map,o={platform:Sp,...n},i={...o.platform,_c:r};return cp(e,t,{...o,platform:i})};var so=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Do(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Do(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Do(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Y0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function f5(e,t){const n=Y0(e);return Math.round(t*n)/n}function ji(e){const t=u.useRef(e);return so(()=>{t.current=e}),t}function z0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[p,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,g]=u.useState(r);Do(C,r)||g(r);const[v,b]=u.useState(null),[x,y]=u.useState(null),E=u.useCallback(F=>{F!==L.current&&(L.current=F,b(F))},[]),w=u.useCallback(F=>{F!==S.current&&(S.current=F,y(F))},[]),M=i||v,k=a||x,L=u.useRef(null),S=u.useRef(null),D=u.useRef(p),_=c!=null,j=ji(c),B=ji(o),A=ji(d),N=u.useCallback(()=>{if(!L.current||!S.current)return;const F={placement:t,strategy:n,middleware:C};B.current&&(F.platform=B.current),Ap(L.current,S.current,F).then($=>{const W={...$,isPositioned:A.current!==!1};R.current&&!Do(D.current,W)&&(D.current=W,Oc.flushSync(()=>{f(W)}))})},[C,t,n,B,A]);so(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[d]);const R=u.useRef(!1);so(()=>(R.current=!0,()=>{R.current=!1}),[]),so(()=>{if(M&&(L.current=M),k&&(S.current=k),M&&k){if(j.current)return j.current(M,k,N);N()}},[M,k,N,j,_]);const P=u.useMemo(()=>({reference:L,floating:S,setReference:E,setFloating:w}),[E,w]),T=u.useMemo(()=>({reference:M,floating:k}),[M,k]),H=u.useMemo(()=>{const F={position:n,left:0,top:0};if(!T.floating)return F;const $=f5(T.floating,p.x),W=f5(T.floating,p.y);return l?{...F,transform:"translate("+$+"px, "+W+"px)",...Y0(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:W}},[n,l,T.floating,p.x,p.y]);return u.useMemo(()=>({...p,update:N,refs:P,elements:T,floatingStyles:H}),[p,N,P,T,H])}const Rp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?p5({element:r.current,padding:o}).fn(n):{}:r?p5({element:r,padding:o}).fn(n):{}}}},P1=(e,t)=>({..._p(e),options:[e,t]}),Dr=(e,t)=>({...$p(e),options:[e,t]}),H1=(e,t)=>({...Tp(e),options:[e,t]}),ni=(e,t)=>({...Rp(e),options:[e,t]});function en(e){return u.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const X0={...u},Pp=X0.useInsertionEffect,Hp=Pp||(e=>e());function _t(e){const t=u.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Hp(()=>{t.current=e}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var et=typeof document<"u"?m.useLayoutEffect:m.useEffect;function ur(){return ur=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},ur.apply(this,arguments)}let h5=!1,jp=0;const m5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+jp++;function Fp(){const[e,t]=u.useState(()=>h5?m5():void 0);return et(()=>{e==null&&t(m5())},[]),u.useEffect(()=>{h5=!0},[]),e}const Bp=X0.useId,zn=Bp||Fp;let dr;process.env.NODE_ENV!=="production"&&(dr=new Set);function Vp(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=dr)!=null&&e.has(o))){var i;(i=dr)==null||i.add(o),console.warn(o)}}function Op(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=dr)!=null&&e.has(o))){var i;(i=dr)==null||i.add(o),console.error(o)}}const Ms=u.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:l=14,height:c=7,tipRadius:d=0,strokeWidth:p=0,staticOffset:f,stroke:C,d:g,style:{transform:v,...b}={},...x}=t;process.env.NODE_ENV!=="production"&&(n||Vp("The `ref` prop is required for `FloatingArrow`."));const y=zn(),[E,w]=u.useState(!1);if(et(()=>{if(!o)return;vt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[M,k]=r.split("-"),L=M==="top"||M==="bottom";let S=f;(L&&a!=null&&a.x||!L&&a!=null&&a.y)&&(S=null);const D=p*2,_=D/2,j=l/2*(d/-8+1),B=c/2*d/4,A=!!g,N=S&&k==="end"?"bottom":"top";let R=S&&k==="end"?"right":"left";S&&E&&(R=k==="end"?"left":"right");const P=i?.x!=null?S||i.x:"",T=i?.y!=null?S||i.y:"",H=g||"M0,0"+(" H"+l)+(" L"+(l-j)+","+(c-B))+(" Q"+l/2+","+c+" "+j+","+(c-B))+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[M];return u.createElement("svg",ur({},x,{"aria-hidden":!0,ref:n,width:A?l:l+D,height:l,viewBox:"0 0 "+l+" "+(c>l?c:l),style:{position:"absolute",pointerEvents:"none",[R]:P,[N]:T,[M]:L||A?"100%":"calc(100% - "+D/2+"px)",transform:[F,v].filter($=>!!$).join(" "),...b}}),D>0&&u.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:C,strokeWidth:D+(g?0:1),d:H}),u.createElement("path",{stroke:D&&!g?x.fill:"none",d:H}),u.createElement("clipPath",{id:y},u.createElement("rect",{x:-_,y:_*(A?-1:1),width:l+D,height:l})))});function Np(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Zp=u.createContext(null),Wp=u.createContext(null),Is=()=>{var e;return((e=u.useContext(Zp))==null?void 0:e.id)||null},ri=()=>u.useContext(Wp);function Xn(e){return"data-floating-ui-"+e}function Gt(e){const t=m.useRef(e);return et(()=>{t.current=e}),t}const g5=Xn("safe-polygon");function Fi(e,t,n){return n&&!cr(n)?0:typeof e=="number"?e:e?.[t]}function Ls(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:d=null,mouseOnly:p=!1,restMs:f=0,move:C=!0}=t,g=ri(),v=Is(),b=Gt(d),x=Gt(c),y=Gt(n),E=u.useRef(),w=u.useRef(-1),M=u.useRef(),k=u.useRef(-1),L=u.useRef(!0),S=u.useRef(!1),D=u.useRef(()=>{}),_=u.useRef(!1),j=u.useCallback(()=>{var H;const F=(H=o.current.openEvent)==null?void 0:H.type;return F?.includes("mouse")&&F!=="mousedown"},[o]);u.useEffect(()=>{if(!l)return;function H(F){let{open:$}=F;$||(clearTimeout(w.current),clearTimeout(k.current),L.current=!0,_.current=!1)}return i.on("openchange",H),()=>{i.off("openchange",H)}},[l,i]),u.useEffect(()=>{if(!l||!b.current||!n)return;function H($){j()&&r(!1,$,"hover")}const F=rt(a.floating).documentElement;return F.addEventListener("mouseleave",H),()=>{F.removeEventListener("mouseleave",H)}},[a.floating,n,r,l,b,j]);const B=u.useCallback(function(H,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const W=Fi(x.current,"close",E.current);W&&!M.current?(clearTimeout(w.current),w.current=window.setTimeout(()=>r(!1,H,$),W)):F&&(clearTimeout(w.current),r(!1,H,$))},[x,r]),A=_t(()=>{D.current(),M.current=void 0}),N=_t(()=>{if(S.current){const H=rt(a.floating).body;H.style.pointerEvents="",H.removeAttribute(g5),S.current=!1}}),R=_t(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);u.useEffect(()=>{if(!l)return;function H(G){if(clearTimeout(w.current),L.current=!1,p&&!cr(E.current)||f>0&&!Fi(x.current,"open"))return;const ne=Fi(x.current,"open",E.current);ne?w.current=window.setTimeout(()=>{y.current||r(!0,G,"hover")},ne):n||r(!0,G,"hover")}function F(G){if(R())return;D.current();const ne=rt(a.floating);if(clearTimeout(k.current),_.current=!1,b.current&&o.current.floatingContext){n||clearTimeout(w.current),M.current=b.current({...o.current.floatingContext,tree:g,x:G.clientX,y:G.clientY,onClose(){N(),A(),R()||B(G,!0,"safe-polygon")}});const re=M.current;ne.addEventListener("mousemove",re),D.current=()=>{ne.removeEventListener("mousemove",re)};return}(E.current==="touch"?!ze(a.floating,G.relatedTarget):!0)&&B(G)}function $(G){R()||o.current.floatingContext&&(b.current==null||b.current({...o.current.floatingContext,tree:g,x:G.clientX,y:G.clientY,onClose(){N(),A(),R()||B(G)}})(G))}if(Ee(a.domReference)){var W;const G=a.domReference;return n&&G.addEventListener("mouseleave",$),(W=a.floating)==null||W.addEventListener("mouseleave",$),C&&G.addEventListener("mousemove",H,{once:!0}),G.addEventListener("mouseenter",H),G.addEventListener("mouseleave",F),()=>{var ne;n&&G.removeEventListener("mouseleave",$),(ne=a.floating)==null||ne.removeEventListener("mouseleave",$),C&&G.removeEventListener("mousemove",H),G.removeEventListener("mouseenter",H),G.removeEventListener("mouseleave",F)}}},[a,l,e,p,f,C,B,A,N,r,n,y,g,x,b,o,R]),et(()=>{var H;if(l&&n&&(H=b.current)!=null&&H.__options.blockPointerEvents&&j()){S.current=!0;const $=a.floating;if(Ee(a.domReference)&&$){var F;const W=rt(a.floating).body;W.setAttribute(g5,"");const G=a.domReference,ne=g==null||(F=g.nodesRef.current.find(Ce=>Ce.id===v))==null||(F=F.context)==null?void 0:F.elements.floating;return ne&&(ne.style.pointerEvents=""),W.style.pointerEvents="none",G.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{W.style.pointerEvents="",G.style.pointerEvents="",$.style.pointerEvents=""}}}},[l,n,v,a,g,b,j]),et(()=>{n||(E.current=void 0,_.current=!1,A(),N())},[n,A,N]),u.useEffect(()=>()=>{A(),clearTimeout(w.current),clearTimeout(k.current),N()},[l,a.domReference,A,N]);const P=u.useMemo(()=>{function H(F){E.current=F.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(F){const{nativeEvent:$}=F;function W(){!L.current&&!y.current&&r(!0,$,"hover")}p&&!cr(E.current)||n||f===0||_.current&&F.movementX**2+F.movementY**2<2||(clearTimeout(k.current),E.current==="touch"?W():(_.current=!0,k.current=window.setTimeout(W,f)))}}},[p,r,n,y,f]),T=u.useMemo(()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(H){R()||B(H.nativeEvent,!1)}}),[B,R]);return u.useMemo(()=>l?{reference:P,floating:T}:{},[l,P,T])}let C5=0;function u1(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(C5);const i=()=>e?.focus({preventScroll:n});o?i():C5=requestAnimationFrame(i)}function Gp(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function b1(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var l;return o.parentId===a.id&&((l=o.context)==null?void 0:l.open)})}),n=n.concat(r);return n}let d1=new WeakMap,Gr=new WeakSet,Yr={},Bi=0;const Yp=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,U0=e=>e&&(e.host||U0(e.parentNode)),zp=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=U0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Xp(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=zp(t,e),l=new Set,c=new Set(a),d=[];Yr[o]||(Yr[o]=new WeakMap);const p=Yr[o];a.forEach(f),C(t),l.clear();function f(g){!g||l.has(g)||(l.add(g),g.parentNode&&f(g.parentNode))}function C(g){!g||c.has(g)||[].forEach.call(g.children,v=>{if(Tn(v)!=="script")if(l.has(v))C(v);else{const b=i?v.getAttribute(i):null,x=b!==null&&b!=="false",y=(d1.get(v)||0)+1,E=(p.get(v)||0)+1;d1.set(v,y),p.set(v,E),d.push(v),y===1&&x&&Gr.add(v),E===1&&v.setAttribute(o,""),!x&&i&&v.setAttribute(i,"true")}})}return Bi++,()=>{d.forEach(g=>{const v=(d1.get(g)||0)-1,b=(p.get(g)||0)-1;d1.set(g,v),p.set(g,b),v||(!Gr.has(g)&&i&&g.removeAttribute(i),Gr.delete(g)),b||g.removeAttribute(o)}),Bi--,Bi||(d1=new WeakMap,d1=new WeakMap,Gr=new WeakSet,Yr={})}}function v5(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=rt(e[0]).body;return Xp(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const pr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function J0(e,t){const n=ti(e,pr());t==="prev"&&n.reverse();const r=n.indexOf(rn(rt(e)));return n.slice(r+1)[0]}function Q0(){return J0(document.body,"next")}function K0(){return J0(document.body,"prev")}function ir(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ze(n,r)}function Up(e){ti(e,pr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function b5(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const oi={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};let Jp;function x5(e){e.key==="Tab"&&(e.target,clearTimeout(Jp))}const _o=u.forwardRef(function(t,n){const[r,o]=u.useState();et(()=>(T0()&&o("button"),document.addEventListener("keydown",x5),()=>{document.removeEventListener("keydown",x5)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Xn("focus-guard")]:"",style:oi};return u.createElement("span",ur({},t,i))}),q0=u.createContext(null),y5=Xn("portal");function Qp(e){e===void 0&&(e={});const{id:t,root:n}=e,r=zn(),o=e3(),[i,a]=u.useState(null),l=u.useRef(null);return et(()=>()=>{i?.remove(),queueMicrotask(()=>{l.current=null})},[i]),et(()=>{if(!r||l.current)return;const c=t?document.getElementById(t):null;if(!c)return;const d=document.createElement("div");d.id=r,d.setAttribute(y5,""),c.appendChild(d),l.current=d,a(d)},[t,r]),et(()=>{if(n===null||!r||l.current)return;let c=n||o?.portalNode;c&&!Ee(c)&&(c=c.current),c=c||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,c.appendChild(d));const p=document.createElement("div");p.id=r,p.setAttribute(y5,""),c=d||c,c.appendChild(p),l.current=p,a(p)},[t,n,r,o]),i}function _r(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=Qp({id:n,root:r}),[a,l]=u.useState(null),c=u.useRef(null),d=u.useRef(null),p=u.useRef(null),f=u.useRef(null),C=a?.modal,g=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return u.useEffect(()=>{if(!i||!o||C)return;function b(x){i&&ir(x)&&(x.type==="focusin"?b5:Up)(i)}return i.addEventListener("focusin",b,!0),i.addEventListener("focusout",b,!0),()=>{i.removeEventListener("focusin",b,!0),i.removeEventListener("focusout",b,!0)}},[i,o,C]),u.useEffect(()=>{i&&(g||b5(i))},[g,i]),u.createElement(q0.Provider,{value:u.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:p,afterInsideRef:f,portalNode:i,setFocusManagerState:l}),[o,i])},v&&i&&u.createElement(_o,{"data-type":"outside",ref:c,onFocus:b=>{if(ir(b,i)){var x;(x=p.current)==null||x.focus()}else{const y=K0()||a?.refs.domReference.current;y?.focus()}}}),v&&i&&u.createElement("span",{"aria-owns":i.id,style:oi}),i&&Oc.createPortal(t,i),v&&i&&u.createElement(_o,{"data-type":"outside",ref:d,onFocus:b=>{if(ir(b,i)){var x;(x=f.current)==null||x.focus()}else{const y=Q0()||a?.refs.domReference.current;y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,b.nativeEvent,"focus-out")}}}))}const e3=()=>u.useContext(q0),_a="data-floating-ui-focusable";function Kp(e){return e?e.hasAttribute(_a)?e:e.querySelector("["+_a+"]")||e:null}const qp=20;let Pn=[];function Vi(e){Pn=Pn.filter(n=>n.isConnected);let t=e;if(!(!t||Tn(t)==="body")){if(!lp(t,pr())){const n=ti(t,pr())[0];n&&(t=n)}Pn.push(t),Pn.length>qp&&(Pn=Pn.slice(-20))}}function w5(){return Pn.slice().reverse().find(e=>e.isConnected)}const ef=u.forwardRef(function(t,n){return u.createElement("button",ur({},t,{type:"button",ref:n,tabIndex:-1,style:oi}))});function Ss(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:d=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:f=!0}=e,{open:C,refs:g,nodeId:v,onOpenChange:b,events:x,dataRef:y,floatingId:E,elements:{domReference:w,floating:M}}=t,k=typeof a=="number"&&a<0,L=H8(w)&&k,S=Yp()?i:!0,D=Gt(o),_=Gt(a),j=Gt(l),B=ri(),A=e3(),N=u.useRef(null),R=u.useRef(null),P=u.useRef(!1),T=u.useRef(!1),H=u.useRef(-1),F=A!=null,$=Kp(M),W=_t(function(re){return re===void 0&&(re=$),re?ti(re,pr()):[]}),G=_t(re=>{const ie=W(re);return D.current.map(J=>w&&J==="reference"?w:$&&J==="floating"?$:ie).filter(Boolean).flat()});u.useEffect(()=>{if(r||!d)return;function re(J){if(J.key==="Tab"){ze($,rn(rt($)))&&W().length===0&&!L&&Pi(J);const ee=G(),q=an(J);D.current[0]==="reference"&&q===w&&(Pi(J),J.shiftKey?u1(ee[ee.length-1]):u1(ee[1])),D.current[1]==="floating"&&q===$&&J.shiftKey&&(Pi(J),u1(ee[0]))}}const ie=rt($);return ie.addEventListener("keydown",re),()=>{ie.removeEventListener("keydown",re)}},[r,w,$,d,D,L,W,G]),u.useEffect(()=>{if(r||!M)return;function re(ie){const J=an(ie),q=W().indexOf(J);q!==-1&&(H.current=q)}return M.addEventListener("focusin",re),()=>{M.removeEventListener("focusin",re)}},[r,M,W]),u.useEffect(()=>{if(r||!f)return;function re(){T.current=!0,setTimeout(()=>{T.current=!1})}function ie(J){const ee=J.relatedTarget;queueMicrotask(()=>{const q=!(ze(w,ee)||ze(M,ee)||ze(ee,M)||ze(A?.portalNode,ee)||ee!=null&&ee.hasAttribute(Xn("focus-guard"))||B&&(b1(B.nodesRef.current,v).find(ue=>{var be,He;return ze((be=ue.context)==null?void 0:be.elements.floating,ee)||ze((He=ue.context)==null?void 0:He.elements.domReference,ee)})||Gp(B.nodesRef.current,v).find(ue=>{var be,He;return((be=ue.context)==null?void 0:be.elements.floating)===ee||((He=ue.context)==null?void 0:He.elements.domReference)===ee})));if(c&&q&&rn(rt($))===rt($).body){Xe($)&&$.focus();const ue=H.current,be=W(),He=be[ue]||be[be.length-1]||$;Xe(He)&&He.focus()}(L||!d)&&ee&&q&&!T.current&&ee!==w5()&&(P.current=!0,b(!1,J,"focus-out"))})}if(M&&Xe(w))return w.addEventListener("focusout",ie),w.addEventListener("pointerdown",re),M.addEventListener("focusout",ie),()=>{w.removeEventListener("focusout",ie),w.removeEventListener("pointerdown",re),M.removeEventListener("focusout",ie)}},[r,w,M,$,d,v,B,A,b,f,c,W,L]),u.useEffect(()=>{var re;if(r)return;const ie=Array.from((A==null||(re=A.portalNode)==null?void 0:re.querySelectorAll("["+Xn("portal")+"]"))||[]);if(M){const J=[M,...ie,N.current,R.current,D.current.includes("reference")||L?w:null].filter(q=>q!=null),ee=d||L?v5(J,S,!S):v5(J);return()=>{ee()}}},[r,w,M,d,D,A,L,S]),et(()=>{if(r||!Xe($))return;const re=rt($),ie=rn(re);queueMicrotask(()=>{const J=G($),ee=_.current,q=(typeof ee=="number"?J[ee]:ee.current)||$,ue=ze($,ie);!k&&!ue&&C&&u1(q,{preventScroll:q===$})})},[r,C,$,k,G,_]),et(()=>{if(r||!$)return;let re=!1;const ie=rt($),J=rn(ie);let q=y.current.openEvent;Vi(J);function ue(Y){let{open:kt,reason:gt,event:Ue,nested:vn}=Y;kt&&(q=Ue),gt==="escape-key"&&g.domReference.current&&Vi(g.domReference.current),gt==="hover"&&Ue.type==="mouseleave"&&(P.current=!0),gt==="outside-press"&&(vn?(P.current=!1,re=!0):P.current=!(_8(Ue)||$0(Ue)))}x.on("openchange",ue);const be=ie.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,oi),F&&w&&w.insertAdjacentElement("afterend",be);function He(){return typeof j.current=="boolean"?w5()||be:j.current.current||be}return()=>{x.off("openchange",ue);const Y=rn(ie),kt=ze(M,Y)||B&&b1(B.nodesRef.current,v).some(vn=>{var N1;return ze((N1=vn.context)==null?void 0:N1.elements.floating,Y)});(kt||q&&["click","mousedown"].includes(q.type))&&g.domReference.current&&Vi(g.domReference.current);const Ue=He();queueMicrotask(()=>{j.current&&!P.current&&Xe(Ue)&&(!(Ue!==Y&&Y!==ie.body)||kt)&&Ue.focus({preventScroll:re}),be.remove()})}},[r,M,$,j,y,g,x,B,v,F,w]),u.useEffect(()=>{queueMicrotask(()=>{P.current=!1})},[r]),et(()=>{if(!r&&A)return A.setFocusManagerState({modal:d,closeOnFocusOut:f,open:C,onOpenChange:b,refs:g}),()=>{A.setFocusManagerState(null)}},[r,A,d,C,b,g,f]),et(()=>{if(r||!$||typeof MutationObserver!="function"||k)return;const re=()=>{const J=$.getAttribute("tabindex"),ee=W(),q=rn(rt(M)),ue=ee.indexOf(q);ue!==-1&&(H.current=ue),D.current.includes("floating")||q!==g.domReference.current&&ee.length===0?J!=="0"&&$.setAttribute("tabindex","0"):J!=="-1"&&$.setAttribute("tabindex","-1")};re();const ie=new MutationObserver(re);return ie.observe($,{childList:!0,subtree:!0,attributes:!0}),()=>{ie.disconnect()}},[r,M,$,g,D,W,k]);function ne(re){return r||!p||!d?null:u.createElement(ef,{ref:re==="start"?N:R,onClick:ie=>b(!1,ie.nativeEvent)},typeof p=="string"?p:"Dismiss")}const Ce=!r&&S&&(d?!L:!0)&&(F||d);return u.createElement(u.Fragment,null,Ce&&u.createElement(_o,{"data-type":"inside",ref:A?.beforeInsideRef,onFocus:re=>{if(d){const J=G();u1(o[0]==="reference"?J[0]:J[J.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(P.current=!1,ir(re,A.portalNode)){const J=Q0()||w;J?.focus()}else{var ie;(ie=A.beforeOutsideRef.current)==null||ie.focus()}}}),!L&&ne("start"),n,ne("end"),Ce&&u.createElement(_o,{"data-type":"inside",ref:A?.afterInsideRef,onFocus:re=>{if(d)u1(G()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(f&&(P.current=!0),ir(re,A.portalNode)){const J=K0()||w;J?.focus()}else{var ie;(ie=A.afterOutsideRef.current)==null||ie.focus()}}}))}function E5(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function k5(e){return xs(e)}function $r(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:d=!1,keyboardHandlers:p=!0,stickIfOpen:f=!0}=t,C=u.useRef(),g=u.useRef(!1),v=u.useMemo(()=>({onPointerDown(b){C.current=b.pointerType},onMouseDown(b){const x=C.current;b.button===0&&l!=="click"&&(cr(x,!0)&&d||(n&&c&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const x=C.current;if(l==="mousedown"&&C.current){C.current=void 0;return}cr(x,!0)&&d||(n&&c&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){C.current=void 0,!(b.defaultPrevented||!p||E5(b))&&(b.key===" "&&!k5(i)&&(b.preventDefault(),g.current=!0),b.key==="Enter"&&r(!(n&&c),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!p||E5(b)||k5(i)||b.key===" "&&g.current&&(g.current=!1,r(!(n&&c),b.nativeEvent,"click"))}}),[o,i,l,d,p,r,n,f,c]);return u.useMemo(()=>a?{reference:v}:{},[a,v])}const tf={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nf={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},M5=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Tr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:p=!1,referencePressEvent:f="pointerdown",ancestorScroll:C=!1,bubbles:g,capture:v}=t,b=ri(),x=_t(typeof c=="function"?c:()=>!1),y=typeof c=="function"?x:c,E=u.useRef(!1),w=u.useRef(!1),{escapeKey:M,outsidePress:k}=M5(g),{escapeKey:L,outsidePress:S}=M5(v),D=u.useRef(!1),_=_t(P=>{var T;if(!n||!a||!l||P.key!=="Escape"||D.current)return;const H=(T=i.current.floatingContext)==null?void 0:T.nodeId,F=b?b1(b.nodesRef.current,H):[];if(!M&&(P.stopPropagation(),F.length>0)){let $=!0;if(F.forEach(W=>{var G;if((G=W.context)!=null&&G.open&&!W.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}r(!1,A8(P)?P.nativeEvent:P,"escape-key")}),j=_t(P=>{var T;const H=()=>{var F;_(P),(F=an(P))==null||F.removeEventListener("keydown",H)};(T=an(P))==null||T.addEventListener("keydown",H)}),B=_t(P=>{var T;const H=E.current;E.current=!1;const F=w.current;if(w.current=!1,d==="click"&&F||H||typeof y=="function"&&!y(P))return;const $=an(P),W="["+Xn("inert")+"]",G=rt(o.floating).querySelectorAll(W);let ne=Ee($)?$:null;for(;ne&&!Dn(ne);){const J=fn(ne);if(Dn(J)||!Ee(J))break;ne=J}if(G.length&&Ee($)&&!R8($)&&!ze($,o.floating)&&Array.from(G).every(J=>!ze(ne,J)))return;if(Xe($)&&R){const J=$.clientWidth>0&&$.scrollWidth>$.clientWidth,ee=$.clientHeight>0&&$.scrollHeight>$.clientHeight;let q=ee&&P.offsetX>$.clientWidth;if(ee&&vt($).direction==="rtl"&&(q=P.offsetX<=$.offsetWidth-$.clientWidth),q||J&&P.offsetY>$.clientHeight)return}const Ce=(T=i.current.floatingContext)==null?void 0:T.nodeId,re=b&&b1(b.nodesRef.current,Ce).some(J=>{var ee;return Ri(P,(ee=J.context)==null?void 0:ee.elements.floating)});if(Ri(P,o.floating)||Ri(P,o.domReference)||re)return;const ie=b?b1(b.nodesRef.current,Ce):[];if(ie.length>0){let J=!0;if(ie.forEach(ee=>{var q;if((q=ee.context)!=null&&q.open&&!ee.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,P,"outside-press")}),A=_t(P=>{var T;const H=()=>{var F;B(P),(F=an(P))==null||F.removeEventListener(d,H)};(T=an(P))==null||T.addEventListener(d,H)});u.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=M,i.current.__outsidePressBubbles=k;let P=-1;function T(G){r(!1,G,"ancestor-scroll")}function H(){window.clearTimeout(P),D.current=!0}function F(){P=window.setTimeout(()=>{D.current=!1},qo()?5:0)}const $=rt(o.floating);l&&($.addEventListener("keydown",L?j:_,L),$.addEventListener("compositionstart",H),$.addEventListener("compositionend",F)),y&&$.addEventListener(d,S?A:B,S);let W=[];return C&&(Ee(o.domReference)&&(W=kn(o.domReference)),Ee(o.floating)&&(W=W.concat(kn(o.floating))),!Ee(o.reference)&&o.reference&&o.reference.contextElement&&(W=W.concat(kn(o.reference.contextElement)))),W=W.filter(G=>{var ne;return G!==((ne=$.defaultView)==null?void 0:ne.visualViewport)}),W.forEach(G=>{G.addEventListener("scroll",T,{passive:!0})}),()=>{l&&($.removeEventListener("keydown",L?j:_,L),$.removeEventListener("compositionstart",H),$.removeEventListener("compositionend",F)),y&&$.removeEventListener(d,S?A:B,S),W.forEach(G=>{G.removeEventListener("scroll",T)}),window.clearTimeout(P)}},[i,o,l,y,d,n,r,C,a,M,k,_,L,j,B,S,A]),u.useEffect(()=>{E.current=!1},[y,d]);const N=u.useMemo(()=>({onKeyDown:_,[tf[f]]:P=>{p&&r(!1,P.nativeEvent,"reference-press")}}),[_,r,p,f]),R=u.useMemo(()=>({onKeyDown:_,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[nf[d]]:()=>{E.current=!0}}),[_,d]);return u.useMemo(()=>a?{reference:N,floating:R}:{},[a,N,R])}function rf(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=zn(),i=u.useRef({}),[a]=u.useState(()=>Np()),l=Is()!=null;if(process.env.NODE_ENV!=="production"){const g=r.reference;g&&!Ee(g)&&Op("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,d]=u.useState(r.reference),p=_t((g,v,b)=>{i.current.openEvent=g?v:void 0,a.emit("openchange",{open:g,event:v,reason:b,nested:l}),n?.(g,v,b)}),f=u.useMemo(()=>({setPositionReference:d}),[]),C=u.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return u.useMemo(()=>({dataRef:i,open:t,onOpenChange:p,elements:C,events:a,floatingId:o,refs:f}),[t,p,C,a,o,f])}function Ar(e){e===void 0&&(e={});const{nodeId:t}=e,n=rf({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=u.useState(null),[l,c]=u.useState(null),p=o?.domReference||i,f=u.useRef(null),C=ri();et(()=>{p&&(f.current=p)},[p]);const g=z0({...e,elements:{...o,...l&&{reference:l}}}),v=u.useCallback(w=>{const M=Ee(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;c(M),g.refs.setReference(M)},[g.refs]),b=u.useCallback(w=>{(Ee(w)||w===null)&&(f.current=w,a(w)),(Ee(g.refs.reference.current)||g.refs.reference.current===null||w!==null&&!Ee(w))&&g.refs.setReference(w)},[g.refs]),x=u.useMemo(()=>({...g.refs,setReference:b,setPositionReference:v,domReference:f}),[g.refs,b,v]),y=u.useMemo(()=>({...g.elements,domReference:p}),[g.elements,p]),E=u.useMemo(()=>({...g,...r,refs:x,elements:y,nodeId:t}),[g,x,y,t,r]);return et(()=>{r.dataRef.current.floatingContext=E;const w=C?.nodesRef.current.find(M=>M.id===t);w&&(w.context=E)}),u.useMemo(()=>({...g,context:E,refs:x,elements:y}),[g,x,y,E])}function of(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,d=u.useRef(!1),p=u.useRef(),f=u.useRef(!0);u.useEffect(()=>{if(!l)return;const g=Ct(a.domReference);function v(){!n&&Xe(a.domReference)&&a.domReference===rn(rt(a.domReference))&&(d.current=!0)}function b(){f.current=!0}return g.addEventListener("blur",v),g.addEventListener("keydown",b,!0),()=>{g.removeEventListener("blur",v),g.removeEventListener("keydown",b,!0)}},[a.domReference,n,l]),u.useEffect(()=>{if(!l)return;function g(v){let{reason:b}=v;(b==="reference-press"||b==="escape-key")&&(d.current=!0)}return o.on("openchange",g),()=>{o.off("openchange",g)}},[o,l]),u.useEffect(()=>()=>{clearTimeout(p.current)},[]);const C=u.useMemo(()=>({onPointerDown(g){$0(g.nativeEvent)||(f.current=!1)},onMouseLeave(){d.current=!1},onFocus(g){if(d.current)return;const v=an(g.nativeEvent);if(c&&Ee(v))try{if(T0()&&$8())throw Error();if(!v.matches(":focus-visible"))return}catch{if(!f.current&&!xs(v))return}r(!0,g.nativeEvent,"focus")},onBlur(g){d.current=!1;const v=g.relatedTarget,b=g.nativeEvent,x=Ee(v)&&v.hasAttribute(Xn("focus-guard"))&&v.getAttribute("data-type")==="outside";p.current=window.setTimeout(()=>{var y;const E=rn(a.domReference?a.domReference.ownerDocument:document);!v&&E===a.domReference||ze((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,E)||ze(a.domReference,E)||x||r(!1,b,"focus")})}}),[i,a.domReference,r,c]);return u.useMemo(()=>l?{reference:C}:{},[l,C])}const I5="active",L5="selected";function Oi(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[I5]:a,[L5]:l,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1,[_a]:""},...i,...t.map(a=>{const l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[d,p]=c;if(!(o&&[I5,L5].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof p=="function"){var f;(f=r.get(d))==null||f.push(p),a[d]=function(){for(var C,g=arguments.length,v=new Array(g),b=0;b<g;b++)v[b]=arguments[b];return(C=r.get(d))==null?void 0:C.map(x=>x(...v)).find(x=>x!==void 0)}}}else a[d]=p}),a),{})}}function Rr(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=u.useCallback(l=>Oi(l,e,"reference"),t),i=u.useCallback(l=>Oi(l,e,"floating"),n),a=u.useCallback(l=>Oi(l,e,"item"),r);return u.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const af=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Pr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,l=(n=af.get(a))!=null?n:a,c=zn(),p=Is()!=null,f=u.useMemo(()=>l==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":r?o:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:c},...l==="menu"&&p&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[l,o,p,r,c,a]),C=u.useMemo(()=>{const v={id:o,...l&&{role:l}};return l==="tooltip"||a==="label"?v:{...v,...l==="menu"&&{"aria-labelledby":c}}},[l,o,c,a]),g=u.useCallback(v=>{let{active:b,selected:x}=v;const y={role:"option",...b&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":b&&x};case"combobox":return{...y,...b&&{"aria-selected":!0}}}return{}},[o,a]);return u.useMemo(()=>i?{reference:f,floating:C,item:g}:{},[i,f,C,g])}const S5=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function p1(e,t){return typeof e=="function"?e(t):e}function sf(e,t){const[n,r]=u.useState(e);return e&&!n&&r(!0),u.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function lf(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[l,c]=u.useState("unmounted"),d=sf(n,a);return!d&&l==="close"&&c("unmounted"),et(()=>{if(r){if(n){c("initial");const p=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(p)}}c("close")}},[n,r]),{isMounted:d,status:l}}function Hr(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,l=e.placement,c=l.split("-")[0],d=u.useMemo(()=>({side:c,placement:l}),[c,l]),p=typeof a=="number",f=(p?a:a.open)||0,C=(p?a:a.close)||0,[g,v]=u.useState(()=>({...p1(i,d),...p1(n,d)})),{isMounted:b,status:x}=lf(e,{duration:a}),y=Gt(n),E=Gt(r),w=Gt(o),M=Gt(i);return et(()=>{const k=p1(y.current,d),L=p1(w.current,d),S=p1(M.current,d),D=p1(E.current,d)||Object.keys(k).reduce((_,j)=>(_[j]="",_),{});if(x==="initial"&&v(_=>({transitionProperty:_.transitionProperty,...S,...k})),x==="open"&&v({transitionProperty:Object.keys(D).map(S5).join(","),transitionDuration:f+"ms",...S,...D}),x==="close"){const _=L||k;v({transitionProperty:Object.keys(_).map(S5).join(","),transitionDuration:C+"ms",...S,..._})}},[C,w,y,E,M,f,x,d]),{isMounted:b,styles:g}}function D5(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,l=i-1;a<i;l=a++){const[c,d]=t[a]||[0,0],[p,f]=t[l]||[0,0];d>=r!=f>=r&&n<=(p-c)*(r-d)/(f-d)+c&&(o=!o)}return o}function cf(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uf(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,l=null,c=performance.now();function d(f,C){const g=performance.now(),v=g-c;if(a===null||l===null||v===0)return a=f,l=C,c=g,null;const b=f-a,x=C-l,E=Math.sqrt(b*b+x*x)/v;return a=f,l=C,c=g,E}const p=f=>{let{x:C,y:g,placement:v,elements:b,onClose:x,nodeId:y,tree:E}=f;return function(M){function k(){clearTimeout(o),x()}if(clearTimeout(o),!b.domReference||!b.floating||v==null||C==null||g==null)return;const{clientX:L,clientY:S}=M,D=[L,S],_=an(M),j=M.type==="mouseleave",B=ze(b.floating,_),A=ze(b.domReference,_),N=b.domReference.getBoundingClientRect(),R=b.floating.getBoundingClientRect(),P=v.split("-")[0],T=C>R.right-R.width/2,H=g>R.bottom-R.height/2,F=cf(D,N),$=R.width>N.width,W=R.height>N.height,G=($?N:R).left,ne=($?N:R).right,Ce=(W?N:R).top,re=(W?N:R).bottom;if(B&&(i=!0,!j))return;if(A&&(i=!1),A&&!j){i=!0;return}if(j&&Ee(M.relatedTarget)&&ze(b.floating,M.relatedTarget)||E&&b1(E.nodesRef.current,y).some(ee=>{let{context:q}=ee;return q?.open}))return;if(P==="top"&&g>=N.bottom-1||P==="bottom"&&g<=N.top+1||P==="left"&&C>=N.right-1||P==="right"&&C<=N.left+1)return k();let ie=[];switch(P){case"top":ie=[[G,N.top+1],[G,R.bottom-1],[ne,R.bottom-1],[ne,N.top+1]];break;case"bottom":ie=[[G,R.top+1],[G,N.bottom-1],[ne,N.bottom-1],[ne,R.top+1]];break;case"left":ie=[[R.right-1,re],[R.right-1,Ce],[N.left+1,Ce],[N.left+1,re]];break;case"right":ie=[[N.right-1,re],[N.right-1,Ce],[R.left+1,Ce],[R.left+1,re]];break}function J(ee){let[q,ue]=ee;switch(P){case"top":{const be=[$?q+t/2:T?q+t*4:q-t*4,ue+t+1],He=[$?q-t/2:T?q+t*4:q-t*4,ue+t+1],Y=[[R.left,T||$?R.bottom-t:R.top],[R.right,T?$?R.bottom-t:R.top:R.bottom-t]];return[be,He,...Y]}case"bottom":{const be=[$?q+t/2:T?q+t*4:q-t*4,ue-t],He=[$?q-t/2:T?q+t*4:q-t*4,ue-t],Y=[[R.left,T||$?R.top+t:R.bottom],[R.right,T?$?R.top+t:R.bottom:R.top+t]];return[be,He,...Y]}case"left":{const be=[q+t+1,W?ue+t/2:H?ue+t*4:ue-t*4],He=[q+t+1,W?ue-t/2:H?ue+t*4:ue-t*4];return[...[[H||W?R.right-t:R.left,R.top],[H?W?R.right-t:R.left:R.right-t,R.bottom]],be,He]}case"right":{const be=[q-t,W?ue+t/2:H?ue+t*4:ue-t*4],He=[q-t,W?ue-t/2:H?ue+t*4:ue-t*4],Y=[[H||W?R.left+t:R.right,R.top],[H?W?R.left+t:R.right:R.left+t,R.bottom]];return[be,He,...Y]}}}if(!D5([L,S],ie)){if(i&&!F)return k();if(!j&&r){const ee=d(M.clientX,M.clientY);if(ee!==null&&ee<.1)return k()}D5([L,S],J([C,g]))?!i&&r&&(o=window.setTimeout(k,40)):k()}}};return p.__options={blockPointerEvents:n},p}const An=e=>{if(n1){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}},jr=(e,t,n={})=>{const r={path:"/","max-age":31104e3,...n},o=window.location.origin;o.includes("localhost")?r.domain="localhost":o.includes("profinansy.ae")?r.domain=".profinansy.ae":r.domain=".profinansy.ru",n.expires instanceof Date&&(r.expires=n.expires.toUTCString());let i=encodeURIComponent(e)+"="+encodeURIComponent(t);for(const a in r){i+="; "+a;const l=r[a];l!==!0&&(i+="="+l)}document.cookie=i},df=e=>{jr(e,"",{"max-age":-1})},$a=["/login","/idv","/method"],t3=m.createContext({mode:"light",selectedMode:"light",toggleTheme:null,setShowTheme:null,unAvailablePagesTheme:$a}),K=()=>m.useContext(t3),_5="selected_theme",pf=({children:e,selectedTheme:t})=>{const[n,r]=m.useState(t??"light"),[o,i]=m.useState(t??"light");m.useEffect(()=>{let c=!0;const d=window?.location.pathname;$a.forEach(p=>{d.includes(p)&&(c=!1)}),i(c?n:"light")},[n]),m.useEffect(()=>{const c=An(_5);(c==="light"||c==="dark")&&r(c)},[]);const a=c=>{r(c),jr(_5,c)},l=c=>{i(c)};return s.jsx(t3.Provider,{value:{mode:o,selectedMode:n,toggleTheme:a,setShowTheme:l,unAvailablePagesTheme:$a},children:e})},X={light:{background:{primary:"#F4F4F9",content:"#FFFFFF",secondary:"#F7F7F9",secondaryAlpha:"#EAE9F1",field:"#FFFFFF",fieldSecondary:"#F5F4F8",accent:"#6553F5",accentSecondaryTint:"#E8E5FE",positiveTint:"#DCF6DA",warningTint:"#FFF0DB",negativeTint:"#FFF1EC",info:"#DBDCFF",bottomActions:"rgba(255, 255, 255, 0.5)"},text:{primary:"#242424",secondary:"#6A6A71",tertiary:"#A1A0AC",fourth:"#606076",contrast:"#FFFFFF",contrastThemed:"#FFFFFF",accent:"#6553F5",accentSecondary:"#9B8EFF",positive:"#34C759",warning:"#FFA000",negative:"#FF3B30",info:"#3038F5",link:"#4285F4"},icons:{primary:"#242424",secondary:"#AAAABA",tertiary:"#CCCBD3",fourth:"#606076",contrast:"#FFFFFF",contrastThemed:"#FFFFFF",contrastThemRev:"#FFFFFF",accent:"#6553F5",accentSecondary:"#9B8EFF",positive:"#34C759",warring:"#FFA000",negative:"#FF3B30",info:"#3038F5",link:"#4285F4"},stroke:{primary:"#DDDDE3",secondary:"#D6D6DE",tertiary:"#E7E7EB",contrast:"#7D7D95",accent:"#6553F5",positive:"#34C759",warning:"#FFA000",negative:"#FF3B30",info:"#3038F5"},interactiveButtons:{brandBackground:"#6553F5",brandBackgroundHover:"#4A35F3",brandText:"#FFFFFF",secondaryBrandBackground:"#E0DDFD",secondaryBrandBackgroundHover:"#B4ADFA",secondaryBrandText:"#4A35F3",outlineBrandBackground:"#FFFFFF",outlineBrandBackgroundHover:"#FFFFFF",outlineBrandText:"#6553F5",outlineBrandBorder:"#6553F5",outlineBrandBorderHover:"#3821F2",systemBackground:"#EAE9F1",systemBackgroundHover:"#CCCADD",systemText:"#464167",successBackground:"#E1F7E6",successBackgroundHover:"#BBEDC6",successText:"#299E47",warningBackground:"#FFF1D9",warningBackgroundHover:"#FFDFA8",warningText:"#E59000",criticalBackground:"#FFE2E0",criticalBackgroundHover:"#FFC6C2",criticalText:"#FF3B30",neutralBackground:"rgba(36, 36, 36, 0.50)",neutralBackgroundHover:"rgba(36, 36, 36, 0.70)",neutralText:"#FFFFFF"},interactiveControls:{accent:"#F0EFF3",secondary:"#FFFFFF",supportive:"#E8E8ED",brand:"#6553F5",brandAlpha:"#4A35F3",accentDark:"#19181B"},other:{orange:"#FFAD30",green:"#A0DD1E",olive:"#DBDE43",violet:"#6E59EF",red:"#EB343F",red2:"#FF4747",pink:"#F969FC",turquoise:"#2ED0C7",blue:"#72E3E3",mediumBlue:"#58C9E2",darkBlue:"#28C6E9",lightBlue:"#4285F4",navyBlue:"#11408E",lightBlueTint:"rgba(66, 133, 244, 0.10)",gray:"rgba(36, 36, 36, 0.50)",orangeTint:"#FFF9EF",greenTint:"#F8FDED",oliveTint:"#FCFDF0",violetTint:"#F4F2FE",redTint:"#FEEFF0",pinkTint:"#FFF3FF",turquoiseTint:"#EFFCFB",darkBlueTint:"#EEF8FB",black:"#111011"},shadow:{basicDefault:"0px 14px 20px -4px rgba(87, 87, 87, 0.10)",basicHover:"0px 12px 28px -3px rgba(87, 87, 87, 0.20)",basicDrag:"0px 12px 32px -3px rgba(87, 87, 87, 0.32)",overlay:"0px 16px 40px -3px rgba(58, 57, 60, 0.28)"},statesBackground:{tabsHover:"#F6F6F6",tabsActive:"#383838",tabsActiveHover:"#242424",accentHover:"#7665FF",accentActive:"#5D48F5",field:"rgba(0, 0, 0, 0.06)",secondaryAlphaActive:"#DCDCDC",secondaryAlphaHover:"#E7E7E7",listHover:"#F6F6F6",notificationHover:"#F6F6F6",notificationHoverError:"#F6F6F6",sideBarActive:"#111011"},gradient:{gradient_1:"linear-gradient(90deg, #f4f4f9 0%, rgba(244, 244, 249, 0) 100%)",gradient_2:"linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)",gradient_3:"linear-gradient(90deg, rgba(244, 244, 249, 0) 0%, #f4f4f9 100%)",gradient_4:"linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)",top:"linear-gradient(180deg, #FFF 0%, rgba(255, 255, 255, 0.95) 52.08%, rgba(255, 255, 255, 0.00) 100%)",bottom:"linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.95) 53.12%, #FFF 100%)"},club:{primary:"#3C3993",primaryHover:"#5853E3",secondary:"#4833F4",secondaryHover:"#200DB8",buttonBackground:"#E7E7F2",buttonBackgroundHover:"#CAC9E1",green:"#29B279",primaryGradient:"linear-gradient(54.06deg, #162331 10.84%, #3C3993 98.2%)",secondaryGradient:"linear-gradient(90.24deg, #B92A78 0%, #6699FB 99.58%)"}},dark:{background:{primary:"#181818",content:"#202020",secondary:"#2B2B2B",secondaryAlpha:"#333333",field:"#2B2B2B",fieldSecondary:"#323232",accent:"#9B8EFF",accentSecondaryTint:"#2B293A",positiveTint:"#384436",warningTint:"#453B2B",negativeTint:"#362D2A",info:"#20213B",bottomActions:"rgba(24, 24, 24, 0.85)"},text:{primary:"#FFFFFF",secondary:"#BABAC6",tertiary:"#73738C",fourth:"#E0E0E6",contrast:"#242424",contrastThemed:"#FFFFFF",accent:"#9B8EFF",accentSecondary:"#756CBB",positive:"#30D158",warning:"#F49B06",negative:"#FF452A",info:"#3B42EA",link:"#4285F4"},icons:{primary:"#D9D9D9",secondary:"#BABAC6",tertiary:"#3E3E4C",fourth:"#E0E0E6",contrast:"#242424",contrastThemed:"#FFFFFF",contrastThemRev:"#454545",accent:"#9B8EFF",accentSecondary:"#756CBB",positive:"#30D158",warring:"#F49B06",negative:"#FF452A",info:"#3B42EA",link:"#4285F4"},stroke:{primary:"#3E3E4C",secondary:"#7D7D95",tertiary:"#454554",contrast:"#535365",accent:"#9B8EFF",positive:"#30D158",warning:"#F49B06",negative:"#FF453A",info:"#3B42EA"},interactiveButtons:{brandBackground:"#7B61FF",brandBackgroundHover:"#6142FF",brandText:"#FFFFFF",secondaryBrandBackground:"#E5DFFF",secondaryBrandBackgroundHover:"#BDADFF",secondaryBrandText:"#6142FF",outlineBrandBackground:"#202020",outlineBrandBackgroundHover:"#202020",outlineBrandText:"#9B8EFF",outlineBrandBorder:"#9B8EFF",outlineBrandBorderHover:"#9B8EFF",systemBackground:"#2E2E38",systemBackgroundHover:"#454554",systemText:"#CCCADD",successBackground:"#223B28",successBackgroundHover:"#2B4A32",successText:"#2CAA4C",warningBackground:"#40321C",warningBackgroundHover:"#634E2B",warningText:"#F99E06",criticalBackground:"#412621",criticalBackgroundHover:"#623932",criticalText:"#FF5A42",neutralBackground:"rgba(255, 255, 255, 0.50)",neutralBackgroundHover:"rgba(255, 255, 255, 0.70)",neutralText:"#FFFFFF"},interactiveControls:{accent:"#39383C",secondary:"#242424",supportive:"#2F2F37",brand:"#7B61FF",brandAlpha:"#6142FF",accentDark:"#FFFFFF"},other:{orange:"#E79D2D",green:"#91C81C",olive:"#C1C339",violet:"#6E59EF",red:"#E8343F",red2:"#F02D3A",pink:"#E05DE2",turquoise:"#229E97",blue:"#61C5C5",mediumBlue:"#51BBD2",darkBlue:"#21AFCE",lightBlue:"#317AF2",navyBlue:"#C9DEFF",lightBlueTint:"rgba(49, 122, 242, 0.04)",gray:"rgba(48, 48, 48, 0.50)",orangeTint:"rgba(255, 173, 48, 0.04)",greenTint:"rgba(160, 221, 30, 0.04)",oliveTint:"rgba(219, 222, 67, 0.04)",violetTint:"rgba(110, 89, 239, 0.04)",redTint:"rgba(235, 52, 63, 0.04)",pinkTint:"rgba(249, 105, 252, 0.04)",turquoiseTint:"rgba(46, 208, 199, 0.04)",darkBlueTint:"rgba(33, 175, 206, 0.04)",black:"#242325"},shadow:{basicDefault:null,basicHover:null,basicDrag:null,overlay:null},statesBackground:{tabsHover:"#383838",tabsActive:"#FFFFFF",tabsActiveHover:"#F6F6F6",accentHover:"#614DF5",accentActive:"#9284FF",field:"rgba(255, 255, 255, 0.06)",secondaryAlphaActive:"#505050",secondaryAlphaHover:"#404040",listHover:"#303030",notificationHover:"#303030",notificationHoverError:"#303030",sideBarActive:"#333036"},gradient:{gradient_1:"linear-gradient(90deg, #181818 0%, rgba(24, 24, 24, 0.00) 100%)",gradient_2:"linear-gradient(90deg, #2B2B2B 0%, rgba(43, 43, 43, 0.00) 100%)",gradient_3:"linear-gradient(90deg, rgba(24, 24, 24, 0.00) 0%, #181818 100%)",gradient_4:"linear-gradient(90deg, rgba(43, 43, 43, 0.00) 0%, #2B2B2B 100%)",top:"linear-gradient(180deg, #2B2B2B 0%, rgba(43, 43, 43, 0.95) 53.65%, rgba(43, 43, 43, 0.00) 100%)",bottom:" linear-gradient(180deg, rgba(43, 43, 43, 0.00) 0%, rgba(43, 43, 43, 0.95) 52.08%, #2B2B2B 100%)"},club:{primary:"#5854C6",primaryHover:"#7672F6",secondary:"#8C7CFF",secondaryHover:"#614FED",buttonBackground:"#282837",buttonBackgroundHover:"#2E2C60",green:"#2FCA89",primaryGradient:"linear-gradient(54.11deg, #2C2562 6.32%, #4641BF 116.13%)",secondaryGradient:"linear-gradient(90.24deg, #CE2680 0%, #4080FD 99.58%)"}}},mt=h.css`
319
+ */var W8=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Io=W8.join(","),P0=typeof Element>"u",L1=P0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Lo=!P0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},So=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},G8=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Y8=function(t,n,r){if(So(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Io));return n&&L1.call(t,Io)&&o.unshift(t),o=o.filter(r),o},z8=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!So(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),c=l.length?l:a.children,d=e(c,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else{var p=L1.call(a,Io);p&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),C=!So(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&C){var g=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:a,candidates:g})}else i.unshift.apply(i,a.children)}}return o},H0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},j0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||G8(t))&&!H0(t)?0:t.tabIndex},X8=function(t,n){var r=j0(t);return r<0&&n&&!H0(t)?0:r},U8=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},F0=function(t){return t.tagName==="INPUT"},J8=function(t){return F0(t)&&t.type==="hidden"},Q8=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},K8=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},q8=function(t){if(!t.name)return!0;var n=t.form||Lo(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=K8(o,t.form);return!i||i===t},ep=function(t){return F0(t)&&t.type==="radio"},tp=function(t){return ep(t)&&!q8(t)},np=function(t){var n,r=t&&Lo(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,l,c;for(i=!!((a=o)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var d,p,f;r=Lo(o),o=(d=r)===null||d===void 0?void 0:d.host,i=!!((p=o)!==null&&p!==void 0&&(f=p.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},l5=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rp=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=L1.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(L1.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,d=Lo(t);if(c&&!c.shadowRoot&&o(c)===!0)return l5(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=l}if(np(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return l5(t);return!1},op=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return L1.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ip=function(t,n){return!(n.disabled||So(n)||J8(n)||rp(n,t)||Q8(n)||op(n))},Da=function(t,n){return!(tp(n)||j0(n)<0||!ip(t,n))},ap=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sp=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,l=a?o.scopeParent:o,c=X8(l,a),d=a?e(o.candidates):l;c===0?a?n.push.apply(n,d):n.push(l):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:d})}),r.sort(U8).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ti=function(t,n){n=n||{};var r;return n.getShadowRoot?r=z8([t],n.includeContainer,{filter:Da.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ap}):r=Y8(t,n.includeContainer,Da.bind(null,n)),sp(r)},lp=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return L1.call(t,Io)===!1?!1:Da(n,t)};function c5(e,t,n){let{reference:r,floating:o}=e;const i=I1(t),a=ws(t),l=ys(a),c=Gn(t),d=i==="y",p=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,C=r[l]/2-o[l]/2;let g;switch(c){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Sr(t)){case"start":g[a]-=C*(n&&d?-1:1);break;case"end":g[a]+=C*(n&&d?-1:1);break}return g}const cp=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:f}=c5(d,r,c),C=r,g={},v=0;for(let b=0;b<l.length;b++){const{name:x,fn:y}=l[b],{x:E,y:w,data:M,reset:k}=await y({x:p,y:f,initialPlacement:r,placement:C,strategy:o,middlewareData:g,rects:d,platform:a,elements:{reference:e,floating:t}});p=E??p,f=w??f,g={...g,[x]:{...g[x],...M}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(C=k.placement),k.rects&&(d=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:p,y:f}=c5(d,C,c)),b=-1)}return{x:p,y:f,placement:C,strategy:o,middlewareData:g}};async function B0(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:C=!1,padding:g=0}=Lr(t,e),v=R0(g),x=l[C?f==="floating"?"reference":"floating":f],y=Mo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:d,rootBoundary:p,strategy:c})),E=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),M=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Mo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:w,strategy:c}):E);return{top:(y.top-k.top+v.top)/M.y,bottom:(k.bottom-y.bottom+v.bottom)/M.y,left:(y.left-k.left+v.left)/M.x,right:(k.right-y.right+v.right)/M.x}}const up=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:c}=t,{element:d,padding:p=0}=Lr(e,t)||{};if(d==null)return{};const f=R0(p),C={x:n,y:r},g=ws(o),v=ys(g),b=await a.getDimensions(d),x=g==="y",y=x?"top":"left",E=x?"bottom":"right",w=x?"clientHeight":"clientWidth",M=i.reference[v]+i.reference[g]-C[g]-i.floating[v],k=C[g]-i.reference[g],L=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let S=L?L[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(L)))&&(S=l.floating[w]||i.floating[v]);const D=M/2-k/2,_=S/2-b[v]/2-1,j=M1(f[y],_),B=M1(f[E],_),A=j,N=S-b[v]-B,R=S/2-b[v]/2+D,P=La(A,R,N),T=!c.arrow&&Sr(o)!=null&&R!==P&&i.reference[v]/2-(R<A?j:B)-b[v]/2<0,H=T?R<A?R-A:R-N:0;return{[g]:C[g]+H,data:{[g]:P,centerOffset:R-P-H,...T&&{alignmentOffset:H}},reset:T}}}),dp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:C,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...x}=Lr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Gn(o),E=I1(l),w=Gn(l)===l,M=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=C||(w||!b?[ko(l)]:V8(l)),L=v!=="none";!C&&L&&k.push(...N8(l,b,v,M));const S=[l,...k],D=await B0(t,x),_=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&_.push(D[y]),f){const R=B8(o,a,M);_.push(D[R[0]],D[R[1]])}if(j=[...j,{placement:o,overflows:_}],!_.every(R=>R<=0)){var B,A;const R=(((B=i.flip)==null?void 0:B.index)||0)+1,P=S[R];if(P)return{data:{index:R,overflows:j},reset:{placement:P}};let T=(A=j.filter(H=>H.overflows[0]<=0).sort((H,F)=>H.overflows[1]-F.overflows[1])[0])==null?void 0:A.placement;if(!T)switch(g){case"bestFit":{var N;const H=(N=j.filter(F=>{if(L){const $=I1(F.placement);return $===E||$==="y"}return!0}).map(F=>[F.placement,F.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((F,$)=>F[1]-$[1])[0])==null?void 0:N[0];H&&(T=H);break}case"initialPlacement":T=l;break}if(o!==T)return{reset:{placement:T}}}return{}}}};async function pp(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Gn(n),l=Sr(n),c=I1(n)==="y",d=["left","top"].includes(a)?-1:1,p=i&&c?-1:1,f=Lr(t,e);let{mainAxis:C,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),c?{x:g*p,y:C*d}:{x:C*d,y:g*p}}const fp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,c=await pp(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},hp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:y,y:E}=x;return{x:y,y:E}}},...c}=Lr(e,t),d={x:n,y:r},p=await B0(t,c),f=I1(Gn(o)),C=A0(f);let g=d[C],v=d[f];if(i){const x=C==="y"?"top":"left",y=C==="y"?"bottom":"right",E=g+p[x],w=g-p[y];g=La(E,g,w)}if(a){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=v+p[x],w=v-p[y];v=La(E,v,w)}const b=l.fn({...t,[C]:g,[f]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[C]:i,[f]:a}}}}}};function V0(e){const t=vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Eo(n)!==i||Eo(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Es(e){return Ee(e)?e:e.contextElement}function v1(e){const t=Es(e);if(!Xe(t))return zt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=V0(t);let a=(i?Eo(n.width):n.width)/r,l=(i?Eo(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const mp=zt(0);function O0(e){const t=Ct(e);return!qo()||!t.visualViewport?mp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ct(e)?!1:t}function Yn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Es(e);let a=zt(1);t&&(r?Ee(r)&&(a=v1(r)):a=v1(e));const l=gp(i,n,r)?O0(i):zt(0);let c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,p=o.width/a.x,f=o.height/a.y;if(i){const C=Ct(i),g=r&&Ee(r)?Ct(r):r;let v=C,b=Ma(v);for(;b&&r&&g!==v;){const x=v1(b),y=b.getBoundingClientRect(),E=vt(b),w=y.left+(b.clientLeft+parseFloat(E.paddingLeft))*x.x,M=y.top+(b.clientTop+parseFloat(E.paddingTop))*x.y;c*=x.x,d*=x.y,p*=x.x,f*=x.y,c+=w,d+=M,v=Ct(b),b=Ma(v)}}return Mo({width:p,height:f,x:c,y:d})}function ks(e,t){const n=ei(e).scrollLeft;return t?t.left+n:Yn(qt(e)).left+n}function N0(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ks(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Cp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qt(r),l=t?Ko(t.floating):!1;if(r===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},d=zt(1);const p=zt(0),f=Xe(r);if((f||!f&&!i)&&((Tn(r)!=="body"||Ir(a))&&(c=ei(r)),Xe(r))){const g=Yn(r);d=v1(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const C=a&&!f&&!i?N0(a,c,!0):zt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+p.x+C.x,y:n.y*d.y-c.scrollTop*d.y+p.y+C.y}}function vp(e){return Array.from(e.getClientRects())}function bp(e){const t=qt(e),n=ei(e),r=e.ownerDocument.body,o=On(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=On(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ks(e);const l=-n.scrollTop;return vt(r).direction==="rtl"&&(a+=On(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function xp(e,t){const n=Ct(e),r=qt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;const d=qo();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}function yp(e,t){const n=Yn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xe(e)?v1(e):zt(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,c=o*i.x,d=r*i.y;return{width:a,height:l,x:c,y:d}}function u5(e,t,n){let r;if(t==="viewport")r=xp(e,n);else if(t==="document")r=bp(qt(e));else if(Ee(t))r=yp(t,n);else{const o=O0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Mo(r)}function Z0(e,t){const n=fn(e);return n===t||!Ee(n)||Dn(n)?!1:vt(n).position==="fixed"||Z0(n,t)}function wp(e,t){const n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(l=>Ee(l)&&Tn(l)!=="body"),o=null;const i=vt(e).position==="fixed";let a=i?fn(e):e;for(;Ee(a)&&!Dn(a);){const l=vt(a),c=bs(a);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ir(a)&&!c&&Z0(e,a))?r=r.filter(p=>p!==a):o=l,a=fn(a)}return t.set(e,r),r}function Ep(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ko(t)?[]:wp(t,this._c):[].concat(n),r],l=a[0],c=a.reduce((d,p)=>{const f=u5(t,p,o);return d.top=On(f.top,d.top),d.right=M1(f.right,d.right),d.bottom=M1(f.bottom,d.bottom),d.left=On(f.left,d.left),d},u5(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kp(e){const{width:t,height:n}=V0(e);return{width:t,height:n}}function Mp(e,t,n){const r=Xe(t),o=qt(t),i=n==="fixed",a=Yn(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=zt(0);if(r||!r&&!i)if((Tn(t)!=="body"||Ir(o))&&(l=ei(t)),r){const C=Yn(t,!0,i,t);c.x=C.x+t.clientLeft,c.y=C.y+t.clientTop}else o&&(c.x=ks(o));const d=o&&!r&&!i?N0(o,l):zt(0),p=a.left+l.scrollLeft-c.x-d.x,f=a.top+l.scrollTop-c.y-d.y;return{x:p,y:f,width:a.width,height:a.height}}function Hi(e){return vt(e).position==="static"}function d5(e,t){if(!Xe(e)||vt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qt(e)===n&&(n=n.ownerDocument.body),n}function W0(e,t){const n=Ct(e);if(Ko(e))return n;if(!Xe(e)){let o=fn(e);for(;o&&!Dn(o);){if(Ee(o)&&!Hi(o))return o;o=fn(o)}return n}let r=d5(e,t);for(;r&&S8(r)&&Hi(r);)r=d5(r,t);return r&&Dn(r)&&Hi(r)&&!bs(r)?n:r||D8(e)||n}const Ip=async function(e){const t=this.getOffsetParent||W0,n=this.getDimensions,r=await n(e.floating);return{reference:Mp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lp(e){return vt(e).direction==="rtl"}const Sp={convertOffsetParentRelativeRectToViewportRelativeRect:Cp,getDocumentElement:qt,getClippingRect:Ep,getOffsetParent:W0,getElementRects:Ip,getClientRects:vp,getDimensions:kp,getScale:v1,isElement:Ee,isRTL:Lp};function G0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dp(e,t){let n=null,r;const o=qt(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:p,top:f,width:C,height:g}=d;if(l||t(),!C||!g)return;const v=Wr(f),b=Wr(o.clientWidth-(p+C)),x=Wr(o.clientHeight-(f+g)),y=Wr(p),w={rootMargin:-v+"px "+-b+"px "+-x+"px "+-y+"px",threshold:On(0,M1(1,c))||1};let M=!0;function k(L){const S=L[0].intersectionRatio;if(S!==c){if(!M)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!G0(d,e.getBoundingClientRect())&&a(),M=!1}try{n=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return a(!0),i}function r1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Es(e),p=o||i?[...d?kn(d):[],...kn(t)]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=d&&l?Dp(d,n):null;let C=-1,g=null;a&&(g=new ResizeObserver(y=>{let[E]=y;E&&E.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),d&&!c&&g.observe(d),g.observe(t));let v,b=c?Yn(e):null;c&&x();function x(){const y=Yn(e);b&&!G0(b,y)&&n(),b=y,v=requestAnimationFrame(x)}return n(),()=>{var y;p.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),f?.(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(v)}}const _p=fp,$p=hp,Tp=dp,p5=up,Ap=(e,t,n)=>{const r=new Map,o={platform:Sp,...n},i={...o.platform,_c:r};return cp(e,t,{...o,platform:i})};var so=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Do(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Do(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Do(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Y0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function f5(e,t){const n=Y0(e);return Math.round(t*n)/n}function ji(e){const t=u.useRef(e);return so(()=>{t.current=e}),t}function z0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[p,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,g]=u.useState(r);Do(C,r)||g(r);const[v,b]=u.useState(null),[x,y]=u.useState(null),E=u.useCallback(F=>{F!==L.current&&(L.current=F,b(F))},[]),w=u.useCallback(F=>{F!==S.current&&(S.current=F,y(F))},[]),M=i||v,k=a||x,L=u.useRef(null),S=u.useRef(null),D=u.useRef(p),_=c!=null,j=ji(c),B=ji(o),A=ji(d),N=u.useCallback(()=>{if(!L.current||!S.current)return;const F={placement:t,strategy:n,middleware:C};B.current&&(F.platform=B.current),Ap(L.current,S.current,F).then($=>{const W={...$,isPositioned:A.current!==!1};R.current&&!Do(D.current,W)&&(D.current=W,Oc.flushSync(()=>{f(W)}))})},[C,t,n,B,A]);so(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[d]);const R=u.useRef(!1);so(()=>(R.current=!0,()=>{R.current=!1}),[]),so(()=>{if(M&&(L.current=M),k&&(S.current=k),M&&k){if(j.current)return j.current(M,k,N);N()}},[M,k,N,j,_]);const P=u.useMemo(()=>({reference:L,floating:S,setReference:E,setFloating:w}),[E,w]),T=u.useMemo(()=>({reference:M,floating:k}),[M,k]),H=u.useMemo(()=>{const F={position:n,left:0,top:0};if(!T.floating)return F;const $=f5(T.floating,p.x),W=f5(T.floating,p.y);return l?{...F,transform:"translate("+$+"px, "+W+"px)",...Y0(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:W}},[n,l,T.floating,p.x,p.y]);return u.useMemo(()=>({...p,update:N,refs:P,elements:T,floatingStyles:H}),[p,N,P,T,H])}const Rp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?p5({element:r.current,padding:o}).fn(n):{}:r?p5({element:r,padding:o}).fn(n):{}}}},P1=(e,t)=>({..._p(e),options:[e,t]}),Dr=(e,t)=>({...$p(e),options:[e,t]}),H1=(e,t)=>({...Tp(e),options:[e,t]}),ni=(e,t)=>({...Rp(e),options:[e,t]});function en(e){return u.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const X0={...u},Pp=X0.useInsertionEffect,Hp=Pp||(e=>e());function _t(e){const t=u.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Hp(()=>{t.current=e}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var et=typeof document<"u"?m.useLayoutEffect:m.useEffect;function ur(){return ur=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},ur.apply(this,arguments)}let h5=!1,jp=0;const m5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+jp++;function Fp(){const[e,t]=u.useState(()=>h5?m5():void 0);return et(()=>{e==null&&t(m5())},[]),u.useEffect(()=>{h5=!0},[]),e}const Bp=X0.useId,zn=Bp||Fp;let dr;process.env.NODE_ENV!=="production"&&(dr=new Set);function Vp(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=dr)!=null&&e.has(o))){var i;(i=dr)==null||i.add(o),console.warn(o)}}function Op(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=dr)!=null&&e.has(o))){var i;(i=dr)==null||i.add(o),console.error(o)}}const Ms=u.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:l=14,height:c=7,tipRadius:d=0,strokeWidth:p=0,staticOffset:f,stroke:C,d:g,style:{transform:v,...b}={},...x}=t;process.env.NODE_ENV!=="production"&&(n||Vp("The `ref` prop is required for `FloatingArrow`."));const y=zn(),[E,w]=u.useState(!1);if(et(()=>{if(!o)return;vt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[M,k]=r.split("-"),L=M==="top"||M==="bottom";let S=f;(L&&a!=null&&a.x||!L&&a!=null&&a.y)&&(S=null);const D=p*2,_=D/2,j=l/2*(d/-8+1),B=c/2*d/4,A=!!g,N=S&&k==="end"?"bottom":"top";let R=S&&k==="end"?"right":"left";S&&E&&(R=k==="end"?"left":"right");const P=i?.x!=null?S||i.x:"",T=i?.y!=null?S||i.y:"",H=g||"M0,0"+(" H"+l)+(" L"+(l-j)+","+(c-B))+(" Q"+l/2+","+c+" "+j+","+(c-B))+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[M];return u.createElement("svg",ur({},x,{"aria-hidden":!0,ref:n,width:A?l:l+D,height:l,viewBox:"0 0 "+l+" "+(c>l?c:l),style:{position:"absolute",pointerEvents:"none",[R]:P,[N]:T,[M]:L||A?"100%":"calc(100% - "+D/2+"px)",transform:[F,v].filter($=>!!$).join(" "),...b}}),D>0&&u.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:C,strokeWidth:D+(g?0:1),d:H}),u.createElement("path",{stroke:D&&!g?x.fill:"none",d:H}),u.createElement("clipPath",{id:y},u.createElement("rect",{x:-_,y:_*(A?-1:1),width:l+D,height:l})))});function Np(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Zp=u.createContext(null),Wp=u.createContext(null),Is=()=>{var e;return((e=u.useContext(Zp))==null?void 0:e.id)||null},ri=()=>u.useContext(Wp);function Xn(e){return"data-floating-ui-"+e}function Gt(e){const t=m.useRef(e);return et(()=>{t.current=e}),t}const g5=Xn("safe-polygon");function Fi(e,t,n){return n&&!cr(n)?0:typeof e=="number"?e:e?.[t]}function Ls(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:d=null,mouseOnly:p=!1,restMs:f=0,move:C=!0}=t,g=ri(),v=Is(),b=Gt(d),x=Gt(c),y=Gt(n),E=u.useRef(),w=u.useRef(-1),M=u.useRef(),k=u.useRef(-1),L=u.useRef(!0),S=u.useRef(!1),D=u.useRef(()=>{}),_=u.useRef(!1),j=u.useCallback(()=>{var H;const F=(H=o.current.openEvent)==null?void 0:H.type;return F?.includes("mouse")&&F!=="mousedown"},[o]);u.useEffect(()=>{if(!l)return;function H(F){let{open:$}=F;$||(clearTimeout(w.current),clearTimeout(k.current),L.current=!0,_.current=!1)}return i.on("openchange",H),()=>{i.off("openchange",H)}},[l,i]),u.useEffect(()=>{if(!l||!b.current||!n)return;function H($){j()&&r(!1,$,"hover")}const F=rt(a.floating).documentElement;return F.addEventListener("mouseleave",H),()=>{F.removeEventListener("mouseleave",H)}},[a.floating,n,r,l,b,j]);const B=u.useCallback(function(H,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const W=Fi(x.current,"close",E.current);W&&!M.current?(clearTimeout(w.current),w.current=window.setTimeout(()=>r(!1,H,$),W)):F&&(clearTimeout(w.current),r(!1,H,$))},[x,r]),A=_t(()=>{D.current(),M.current=void 0}),N=_t(()=>{if(S.current){const H=rt(a.floating).body;H.style.pointerEvents="",H.removeAttribute(g5),S.current=!1}}),R=_t(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);u.useEffect(()=>{if(!l)return;function H(G){if(clearTimeout(w.current),L.current=!1,p&&!cr(E.current)||f>0&&!Fi(x.current,"open"))return;const ne=Fi(x.current,"open",E.current);ne?w.current=window.setTimeout(()=>{y.current||r(!0,G,"hover")},ne):n||r(!0,G,"hover")}function F(G){if(R())return;D.current();const ne=rt(a.floating);if(clearTimeout(k.current),_.current=!1,b.current&&o.current.floatingContext){n||clearTimeout(w.current),M.current=b.current({...o.current.floatingContext,tree:g,x:G.clientX,y:G.clientY,onClose(){N(),A(),R()||B(G,!0,"safe-polygon")}});const re=M.current;ne.addEventListener("mousemove",re),D.current=()=>{ne.removeEventListener("mousemove",re)};return}(E.current==="touch"?!ze(a.floating,G.relatedTarget):!0)&&B(G)}function $(G){R()||o.current.floatingContext&&(b.current==null||b.current({...o.current.floatingContext,tree:g,x:G.clientX,y:G.clientY,onClose(){N(),A(),R()||B(G)}})(G))}if(Ee(a.domReference)){var W;const G=a.domReference;return n&&G.addEventListener("mouseleave",$),(W=a.floating)==null||W.addEventListener("mouseleave",$),C&&G.addEventListener("mousemove",H,{once:!0}),G.addEventListener("mouseenter",H),G.addEventListener("mouseleave",F),()=>{var ne;n&&G.removeEventListener("mouseleave",$),(ne=a.floating)==null||ne.removeEventListener("mouseleave",$),C&&G.removeEventListener("mousemove",H),G.removeEventListener("mouseenter",H),G.removeEventListener("mouseleave",F)}}},[a,l,e,p,f,C,B,A,N,r,n,y,g,x,b,o,R]),et(()=>{var H;if(l&&n&&(H=b.current)!=null&&H.__options.blockPointerEvents&&j()){S.current=!0;const $=a.floating;if(Ee(a.domReference)&&$){var F;const W=rt(a.floating).body;W.setAttribute(g5,"");const G=a.domReference,ne=g==null||(F=g.nodesRef.current.find(Ce=>Ce.id===v))==null||(F=F.context)==null?void 0:F.elements.floating;return ne&&(ne.style.pointerEvents=""),W.style.pointerEvents="none",G.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{W.style.pointerEvents="",G.style.pointerEvents="",$.style.pointerEvents=""}}}},[l,n,v,a,g,b,j]),et(()=>{n||(E.current=void 0,_.current=!1,A(),N())},[n,A,N]),u.useEffect(()=>()=>{A(),clearTimeout(w.current),clearTimeout(k.current),N()},[l,a.domReference,A,N]);const P=u.useMemo(()=>{function H(F){E.current=F.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(F){const{nativeEvent:$}=F;function W(){!L.current&&!y.current&&r(!0,$,"hover")}p&&!cr(E.current)||n||f===0||_.current&&F.movementX**2+F.movementY**2<2||(clearTimeout(k.current),E.current==="touch"?W():(_.current=!0,k.current=window.setTimeout(W,f)))}}},[p,r,n,y,f]),T=u.useMemo(()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(H){R()||B(H.nativeEvent,!1)}}),[B,R]);return u.useMemo(()=>l?{reference:P,floating:T}:{},[l,P,T])}let C5=0;function u1(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(C5);const i=()=>e?.focus({preventScroll:n});o?i():C5=requestAnimationFrame(i)}function Gp(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function b1(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var l;return o.parentId===a.id&&((l=o.context)==null?void 0:l.open)})}),n=n.concat(r);return n}let d1=new WeakMap,Gr=new WeakSet,Yr={},Bi=0;const Yp=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,U0=e=>e&&(e.host||U0(e.parentNode)),zp=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=U0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Xp(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=zp(t,e),l=new Set,c=new Set(a),d=[];Yr[o]||(Yr[o]=new WeakMap);const p=Yr[o];a.forEach(f),C(t),l.clear();function f(g){!g||l.has(g)||(l.add(g),g.parentNode&&f(g.parentNode))}function C(g){!g||c.has(g)||[].forEach.call(g.children,v=>{if(Tn(v)!=="script")if(l.has(v))C(v);else{const b=i?v.getAttribute(i):null,x=b!==null&&b!=="false",y=(d1.get(v)||0)+1,E=(p.get(v)||0)+1;d1.set(v,y),p.set(v,E),d.push(v),y===1&&x&&Gr.add(v),E===1&&v.setAttribute(o,""),!x&&i&&v.setAttribute(i,"true")}})}return Bi++,()=>{d.forEach(g=>{const v=(d1.get(g)||0)-1,b=(p.get(g)||0)-1;d1.set(g,v),p.set(g,b),v||(!Gr.has(g)&&i&&g.removeAttribute(i),Gr.delete(g)),b||g.removeAttribute(o)}),Bi--,Bi||(d1=new WeakMap,d1=new WeakMap,Gr=new WeakSet,Yr={})}}function v5(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=rt(e[0]).body;return Xp(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const pr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function J0(e,t){const n=ti(e,pr());t==="prev"&&n.reverse();const r=n.indexOf(rn(rt(e)));return n.slice(r+1)[0]}function Q0(){return J0(document.body,"next")}function K0(){return J0(document.body,"prev")}function ir(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ze(n,r)}function Up(e){ti(e,pr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function b5(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const oi={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};let Jp;function x5(e){e.key==="Tab"&&(e.target,clearTimeout(Jp))}const _o=u.forwardRef(function(t,n){const[r,o]=u.useState();et(()=>(T0()&&o("button"),document.addEventListener("keydown",x5),()=>{document.removeEventListener("keydown",x5)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Xn("focus-guard")]:"",style:oi};return u.createElement("span",ur({},t,i))}),q0=u.createContext(null),y5=Xn("portal");function Qp(e){e===void 0&&(e={});const{id:t,root:n}=e,r=zn(),o=e3(),[i,a]=u.useState(null),l=u.useRef(null);return et(()=>()=>{i?.remove(),queueMicrotask(()=>{l.current=null})},[i]),et(()=>{if(!r||l.current)return;const c=t?document.getElementById(t):null;if(!c)return;const d=document.createElement("div");d.id=r,d.setAttribute(y5,""),c.appendChild(d),l.current=d,a(d)},[t,r]),et(()=>{if(n===null||!r||l.current)return;let c=n||o?.portalNode;c&&!Ee(c)&&(c=c.current),c=c||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,c.appendChild(d));const p=document.createElement("div");p.id=r,p.setAttribute(y5,""),c=d||c,c.appendChild(p),l.current=p,a(p)},[t,n,r,o]),i}function _r(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=Qp({id:n,root:r}),[a,l]=u.useState(null),c=u.useRef(null),d=u.useRef(null),p=u.useRef(null),f=u.useRef(null),C=a?.modal,g=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return u.useEffect(()=>{if(!i||!o||C)return;function b(x){i&&ir(x)&&(x.type==="focusin"?b5:Up)(i)}return i.addEventListener("focusin",b,!0),i.addEventListener("focusout",b,!0),()=>{i.removeEventListener("focusin",b,!0),i.removeEventListener("focusout",b,!0)}},[i,o,C]),u.useEffect(()=>{i&&(g||b5(i))},[g,i]),u.createElement(q0.Provider,{value:u.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:p,afterInsideRef:f,portalNode:i,setFocusManagerState:l}),[o,i])},v&&i&&u.createElement(_o,{"data-type":"outside",ref:c,onFocus:b=>{if(ir(b,i)){var x;(x=p.current)==null||x.focus()}else{const y=K0()||a?.refs.domReference.current;y?.focus()}}}),v&&i&&u.createElement("span",{"aria-owns":i.id,style:oi}),i&&Oc.createPortal(t,i),v&&i&&u.createElement(_o,{"data-type":"outside",ref:d,onFocus:b=>{if(ir(b,i)){var x;(x=f.current)==null||x.focus()}else{const y=Q0()||a?.refs.domReference.current;y?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,b.nativeEvent,"focus-out")}}}))}const e3=()=>u.useContext(q0),_a="data-floating-ui-focusable";function Kp(e){return e?e.hasAttribute(_a)?e:e.querySelector("["+_a+"]")||e:null}const qp=20;let Pn=[];function Vi(e){Pn=Pn.filter(n=>n.isConnected);let t=e;if(!(!t||Tn(t)==="body")){if(!lp(t,pr())){const n=ti(t,pr())[0];n&&(t=n)}Pn.push(t),Pn.length>qp&&(Pn=Pn.slice(-20))}}function w5(){return Pn.slice().reverse().find(e=>e.isConnected)}const ef=u.forwardRef(function(t,n){return u.createElement("button",ur({},t,{type:"button",ref:n,tabIndex:-1,style:oi}))});function Ss(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:d=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:f=!0}=e,{open:C,refs:g,nodeId:v,onOpenChange:b,events:x,dataRef:y,floatingId:E,elements:{domReference:w,floating:M}}=t,k=typeof a=="number"&&a<0,L=H8(w)&&k,S=Yp()?i:!0,D=Gt(o),_=Gt(a),j=Gt(l),B=ri(),A=e3(),N=u.useRef(null),R=u.useRef(null),P=u.useRef(!1),T=u.useRef(!1),H=u.useRef(-1),F=A!=null,$=Kp(M),W=_t(function(re){return re===void 0&&(re=$),re?ti(re,pr()):[]}),G=_t(re=>{const ie=W(re);return D.current.map(J=>w&&J==="reference"?w:$&&J==="floating"?$:ie).filter(Boolean).flat()});u.useEffect(()=>{if(r||!d)return;function re(J){if(J.key==="Tab"){ze($,rn(rt($)))&&W().length===0&&!L&&Pi(J);const ee=G(),q=an(J);D.current[0]==="reference"&&q===w&&(Pi(J),J.shiftKey?u1(ee[ee.length-1]):u1(ee[1])),D.current[1]==="floating"&&q===$&&J.shiftKey&&(Pi(J),u1(ee[0]))}}const ie=rt($);return ie.addEventListener("keydown",re),()=>{ie.removeEventListener("keydown",re)}},[r,w,$,d,D,L,W,G]),u.useEffect(()=>{if(r||!M)return;function re(ie){const J=an(ie),q=W().indexOf(J);q!==-1&&(H.current=q)}return M.addEventListener("focusin",re),()=>{M.removeEventListener("focusin",re)}},[r,M,W]),u.useEffect(()=>{if(r||!f)return;function re(){T.current=!0,setTimeout(()=>{T.current=!1})}function ie(J){const ee=J.relatedTarget;queueMicrotask(()=>{const q=!(ze(w,ee)||ze(M,ee)||ze(ee,M)||ze(A?.portalNode,ee)||ee!=null&&ee.hasAttribute(Xn("focus-guard"))||B&&(b1(B.nodesRef.current,v).find(ue=>{var be,He;return ze((be=ue.context)==null?void 0:be.elements.floating,ee)||ze((He=ue.context)==null?void 0:He.elements.domReference,ee)})||Gp(B.nodesRef.current,v).find(ue=>{var be,He;return((be=ue.context)==null?void 0:be.elements.floating)===ee||((He=ue.context)==null?void 0:He.elements.domReference)===ee})));if(c&&q&&rn(rt($))===rt($).body){Xe($)&&$.focus();const ue=H.current,be=W(),He=be[ue]||be[be.length-1]||$;Xe(He)&&He.focus()}(L||!d)&&ee&&q&&!T.current&&ee!==w5()&&(P.current=!0,b(!1,J,"focus-out"))})}if(M&&Xe(w))return w.addEventListener("focusout",ie),w.addEventListener("pointerdown",re),M.addEventListener("focusout",ie),()=>{w.removeEventListener("focusout",ie),w.removeEventListener("pointerdown",re),M.removeEventListener("focusout",ie)}},[r,w,M,$,d,v,B,A,b,f,c,W,L]),u.useEffect(()=>{var re;if(r)return;const ie=Array.from((A==null||(re=A.portalNode)==null?void 0:re.querySelectorAll("["+Xn("portal")+"]"))||[]);if(M){const J=[M,...ie,N.current,R.current,D.current.includes("reference")||L?w:null].filter(q=>q!=null),ee=d||L?v5(J,S,!S):v5(J);return()=>{ee()}}},[r,w,M,d,D,A,L,S]),et(()=>{if(r||!Xe($))return;const re=rt($),ie=rn(re);queueMicrotask(()=>{const J=G($),ee=_.current,q=(typeof ee=="number"?J[ee]:ee.current)||$,ue=ze($,ie);!k&&!ue&&C&&u1(q,{preventScroll:q===$})})},[r,C,$,k,G,_]),et(()=>{if(r||!$)return;let re=!1;const ie=rt($),J=rn(ie);let q=y.current.openEvent;Vi(J);function ue(Y){let{open:kt,reason:gt,event:Ue,nested:vn}=Y;kt&&(q=Ue),gt==="escape-key"&&g.domReference.current&&Vi(g.domReference.current),gt==="hover"&&Ue.type==="mouseleave"&&(P.current=!0),gt==="outside-press"&&(vn?(P.current=!1,re=!0):P.current=!(_8(Ue)||$0(Ue)))}x.on("openchange",ue);const be=ie.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,oi),F&&w&&w.insertAdjacentElement("afterend",be);function He(){return typeof j.current=="boolean"?w5()||be:j.current.current||be}return()=>{x.off("openchange",ue);const Y=rn(ie),kt=ze(M,Y)||B&&b1(B.nodesRef.current,v).some(vn=>{var N1;return ze((N1=vn.context)==null?void 0:N1.elements.floating,Y)});(kt||q&&["click","mousedown"].includes(q.type))&&g.domReference.current&&Vi(g.domReference.current);const Ue=He();queueMicrotask(()=>{j.current&&!P.current&&Xe(Ue)&&(!(Ue!==Y&&Y!==ie.body)||kt)&&Ue.focus({preventScroll:re}),be.remove()})}},[r,M,$,j,y,g,x,B,v,F,w]),u.useEffect(()=>{queueMicrotask(()=>{P.current=!1})},[r]),et(()=>{if(!r&&A)return A.setFocusManagerState({modal:d,closeOnFocusOut:f,open:C,onOpenChange:b,refs:g}),()=>{A.setFocusManagerState(null)}},[r,A,d,C,b,g,f]),et(()=>{if(r||!$||typeof MutationObserver!="function"||k)return;const re=()=>{const J=$.getAttribute("tabindex"),ee=W(),q=rn(rt(M)),ue=ee.indexOf(q);ue!==-1&&(H.current=ue),D.current.includes("floating")||q!==g.domReference.current&&ee.length===0?J!=="0"&&$.setAttribute("tabindex","0"):J!=="-1"&&$.setAttribute("tabindex","-1")};re();const ie=new MutationObserver(re);return ie.observe($,{childList:!0,subtree:!0,attributes:!0}),()=>{ie.disconnect()}},[r,M,$,g,D,W,k]);function ne(re){return r||!p||!d?null:u.createElement(ef,{ref:re==="start"?N:R,onClick:ie=>b(!1,ie.nativeEvent)},typeof p=="string"?p:"Dismiss")}const Ce=!r&&S&&(d?!L:!0)&&(F||d);return u.createElement(u.Fragment,null,Ce&&u.createElement(_o,{"data-type":"inside",ref:A?.beforeInsideRef,onFocus:re=>{if(d){const J=G();u1(o[0]==="reference"?J[0]:J[J.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(P.current=!1,ir(re,A.portalNode)){const J=Q0()||w;J?.focus()}else{var ie;(ie=A.beforeOutsideRef.current)==null||ie.focus()}}}),!L&&ne("start"),n,ne("end"),Ce&&u.createElement(_o,{"data-type":"inside",ref:A?.afterInsideRef,onFocus:re=>{if(d)u1(G()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(f&&(P.current=!0),ir(re,A.portalNode)){const J=K0()||w;J?.focus()}else{var ie;(ie=A.afterOutsideRef.current)==null||ie.focus()}}}))}function E5(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function k5(e){return xs(e)}function $r(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:d=!1,keyboardHandlers:p=!0,stickIfOpen:f=!0}=t,C=u.useRef(),g=u.useRef(!1),v=u.useMemo(()=>({onPointerDown(b){C.current=b.pointerType},onMouseDown(b){const x=C.current;b.button===0&&l!=="click"&&(cr(x,!0)&&d||(n&&c&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const x=C.current;if(l==="mousedown"&&C.current){C.current=void 0;return}cr(x,!0)&&d||(n&&c&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){C.current=void 0,!(b.defaultPrevented||!p||E5(b))&&(b.key===" "&&!k5(i)&&(b.preventDefault(),g.current=!0),b.key==="Enter"&&r(!(n&&c),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!p||E5(b)||k5(i)||b.key===" "&&g.current&&(g.current=!1,r(!(n&&c),b.nativeEvent,"click"))}}),[o,i,l,d,p,r,n,f,c]);return u.useMemo(()=>a?{reference:v}:{},[a,v])}const tf={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nf={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},M5=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Tr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:p=!1,referencePressEvent:f="pointerdown",ancestorScroll:C=!1,bubbles:g,capture:v}=t,b=ri(),x=_t(typeof c=="function"?c:()=>!1),y=typeof c=="function"?x:c,E=u.useRef(!1),w=u.useRef(!1),{escapeKey:M,outsidePress:k}=M5(g),{escapeKey:L,outsidePress:S}=M5(v),D=u.useRef(!1),_=_t(P=>{var T;if(!n||!a||!l||P.key!=="Escape"||D.current)return;const H=(T=i.current.floatingContext)==null?void 0:T.nodeId,F=b?b1(b.nodesRef.current,H):[];if(!M&&(P.stopPropagation(),F.length>0)){let $=!0;if(F.forEach(W=>{var G;if((G=W.context)!=null&&G.open&&!W.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}r(!1,A8(P)?P.nativeEvent:P,"escape-key")}),j=_t(P=>{var T;const H=()=>{var F;_(P),(F=an(P))==null||F.removeEventListener("keydown",H)};(T=an(P))==null||T.addEventListener("keydown",H)}),B=_t(P=>{var T;const H=E.current;E.current=!1;const F=w.current;if(w.current=!1,d==="click"&&F||H||typeof y=="function"&&!y(P))return;const $=an(P),W="["+Xn("inert")+"]",G=rt(o.floating).querySelectorAll(W);let ne=Ee($)?$:null;for(;ne&&!Dn(ne);){const J=fn(ne);if(Dn(J)||!Ee(J))break;ne=J}if(G.length&&Ee($)&&!R8($)&&!ze($,o.floating)&&Array.from(G).every(J=>!ze(ne,J)))return;if(Xe($)&&R){const J=$.clientWidth>0&&$.scrollWidth>$.clientWidth,ee=$.clientHeight>0&&$.scrollHeight>$.clientHeight;let q=ee&&P.offsetX>$.clientWidth;if(ee&&vt($).direction==="rtl"&&(q=P.offsetX<=$.offsetWidth-$.clientWidth),q||J&&P.offsetY>$.clientHeight)return}const Ce=(T=i.current.floatingContext)==null?void 0:T.nodeId,re=b&&b1(b.nodesRef.current,Ce).some(J=>{var ee;return Ri(P,(ee=J.context)==null?void 0:ee.elements.floating)});if(Ri(P,o.floating)||Ri(P,o.domReference)||re)return;const ie=b?b1(b.nodesRef.current,Ce):[];if(ie.length>0){let J=!0;if(ie.forEach(ee=>{var q;if((q=ee.context)!=null&&q.open&&!ee.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,P,"outside-press")}),A=_t(P=>{var T;const H=()=>{var F;B(P),(F=an(P))==null||F.removeEventListener(d,H)};(T=an(P))==null||T.addEventListener(d,H)});u.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=M,i.current.__outsidePressBubbles=k;let P=-1;function T(G){r(!1,G,"ancestor-scroll")}function H(){window.clearTimeout(P),D.current=!0}function F(){P=window.setTimeout(()=>{D.current=!1},qo()?5:0)}const $=rt(o.floating);l&&($.addEventListener("keydown",L?j:_,L),$.addEventListener("compositionstart",H),$.addEventListener("compositionend",F)),y&&$.addEventListener(d,S?A:B,S);let W=[];return C&&(Ee(o.domReference)&&(W=kn(o.domReference)),Ee(o.floating)&&(W=W.concat(kn(o.floating))),!Ee(o.reference)&&o.reference&&o.reference.contextElement&&(W=W.concat(kn(o.reference.contextElement)))),W=W.filter(G=>{var ne;return G!==((ne=$.defaultView)==null?void 0:ne.visualViewport)}),W.forEach(G=>{G.addEventListener("scroll",T,{passive:!0})}),()=>{l&&($.removeEventListener("keydown",L?j:_,L),$.removeEventListener("compositionstart",H),$.removeEventListener("compositionend",F)),y&&$.removeEventListener(d,S?A:B,S),W.forEach(G=>{G.removeEventListener("scroll",T)}),window.clearTimeout(P)}},[i,o,l,y,d,n,r,C,a,M,k,_,L,j,B,S,A]),u.useEffect(()=>{E.current=!1},[y,d]);const N=u.useMemo(()=>({onKeyDown:_,[tf[f]]:P=>{p&&r(!1,P.nativeEvent,"reference-press")}}),[_,r,p,f]),R=u.useMemo(()=>({onKeyDown:_,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[nf[d]]:()=>{E.current=!0}}),[_,d]);return u.useMemo(()=>a?{reference:N,floating:R}:{},[a,N,R])}function rf(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=zn(),i=u.useRef({}),[a]=u.useState(()=>Np()),l=Is()!=null;if(process.env.NODE_ENV!=="production"){const g=r.reference;g&&!Ee(g)&&Op("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,d]=u.useState(r.reference),p=_t((g,v,b)=>{i.current.openEvent=g?v:void 0,a.emit("openchange",{open:g,event:v,reason:b,nested:l}),n?.(g,v,b)}),f=u.useMemo(()=>({setPositionReference:d}),[]),C=u.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return u.useMemo(()=>({dataRef:i,open:t,onOpenChange:p,elements:C,events:a,floatingId:o,refs:f}),[t,p,C,a,o,f])}function Ar(e){e===void 0&&(e={});const{nodeId:t}=e,n=rf({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=u.useState(null),[l,c]=u.useState(null),p=o?.domReference||i,f=u.useRef(null),C=ri();et(()=>{p&&(f.current=p)},[p]);const g=z0({...e,elements:{...o,...l&&{reference:l}}}),v=u.useCallback(w=>{const M=Ee(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;c(M),g.refs.setReference(M)},[g.refs]),b=u.useCallback(w=>{(Ee(w)||w===null)&&(f.current=w,a(w)),(Ee(g.refs.reference.current)||g.refs.reference.current===null||w!==null&&!Ee(w))&&g.refs.setReference(w)},[g.refs]),x=u.useMemo(()=>({...g.refs,setReference:b,setPositionReference:v,domReference:f}),[g.refs,b,v]),y=u.useMemo(()=>({...g.elements,domReference:p}),[g.elements,p]),E=u.useMemo(()=>({...g,...r,refs:x,elements:y,nodeId:t}),[g,x,y,t,r]);return et(()=>{r.dataRef.current.floatingContext=E;const w=C?.nodesRef.current.find(M=>M.id===t);w&&(w.context=E)}),u.useMemo(()=>({...g,context:E,refs:x,elements:y}),[g,x,y,E])}function of(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,d=u.useRef(!1),p=u.useRef(),f=u.useRef(!0);u.useEffect(()=>{if(!l)return;const g=Ct(a.domReference);function v(){!n&&Xe(a.domReference)&&a.domReference===rn(rt(a.domReference))&&(d.current=!0)}function b(){f.current=!0}return g.addEventListener("blur",v),g.addEventListener("keydown",b,!0),()=>{g.removeEventListener("blur",v),g.removeEventListener("keydown",b,!0)}},[a.domReference,n,l]),u.useEffect(()=>{if(!l)return;function g(v){let{reason:b}=v;(b==="reference-press"||b==="escape-key")&&(d.current=!0)}return o.on("openchange",g),()=>{o.off("openchange",g)}},[o,l]),u.useEffect(()=>()=>{clearTimeout(p.current)},[]);const C=u.useMemo(()=>({onPointerDown(g){$0(g.nativeEvent)||(f.current=!1)},onMouseLeave(){d.current=!1},onFocus(g){if(d.current)return;const v=an(g.nativeEvent);if(c&&Ee(v))try{if(T0()&&$8())throw Error();if(!v.matches(":focus-visible"))return}catch{if(!f.current&&!xs(v))return}r(!0,g.nativeEvent,"focus")},onBlur(g){d.current=!1;const v=g.relatedTarget,b=g.nativeEvent,x=Ee(v)&&v.hasAttribute(Xn("focus-guard"))&&v.getAttribute("data-type")==="outside";p.current=window.setTimeout(()=>{var y;const E=rn(a.domReference?a.domReference.ownerDocument:document);!v&&E===a.domReference||ze((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,E)||ze(a.domReference,E)||x||r(!1,b,"focus")})}}),[i,a.domReference,r,c]);return u.useMemo(()=>l?{reference:C}:{},[l,C])}const I5="active",L5="selected";function Oi(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[I5]:a,[L5]:l,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1,[_a]:""},...i,...t.map(a=>{const l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[d,p]=c;if(!(o&&[I5,L5].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof p=="function"){var f;(f=r.get(d))==null||f.push(p),a[d]=function(){for(var C,g=arguments.length,v=new Array(g),b=0;b<g;b++)v[b]=arguments[b];return(C=r.get(d))==null?void 0:C.map(x=>x(...v)).find(x=>x!==void 0)}}}else a[d]=p}),a),{})}}function Rr(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=u.useCallback(l=>Oi(l,e,"reference"),t),i=u.useCallback(l=>Oi(l,e,"floating"),n),a=u.useCallback(l=>Oi(l,e,"item"),r);return u.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const af=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Pr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,l=(n=af.get(a))!=null?n:a,c=zn(),p=Is()!=null,f=u.useMemo(()=>l==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":r?o:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:c},...l==="menu"&&p&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[l,o,p,r,c,a]),C=u.useMemo(()=>{const v={id:o,...l&&{role:l}};return l==="tooltip"||a==="label"?v:{...v,...l==="menu"&&{"aria-labelledby":c}}},[l,o,c,a]),g=u.useCallback(v=>{let{active:b,selected:x}=v;const y={role:"option",...b&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":b&&x};case"combobox":return{...y,...b&&{"aria-selected":!0}}}return{}},[o,a]);return u.useMemo(()=>i?{reference:f,floating:C,item:g}:{},[i,f,C,g])}const S5=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function p1(e,t){return typeof e=="function"?e(t):e}function sf(e,t){const[n,r]=u.useState(e);return e&&!n&&r(!0),u.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function lf(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[l,c]=u.useState("unmounted"),d=sf(n,a);return!d&&l==="close"&&c("unmounted"),et(()=>{if(r){if(n){c("initial");const p=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(p)}}c("close")}},[n,r]),{isMounted:d,status:l}}function Hr(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,l=e.placement,c=l.split("-")[0],d=u.useMemo(()=>({side:c,placement:l}),[c,l]),p=typeof a=="number",f=(p?a:a.open)||0,C=(p?a:a.close)||0,[g,v]=u.useState(()=>({...p1(i,d),...p1(n,d)})),{isMounted:b,status:x}=lf(e,{duration:a}),y=Gt(n),E=Gt(r),w=Gt(o),M=Gt(i);return et(()=>{const k=p1(y.current,d),L=p1(w.current,d),S=p1(M.current,d),D=p1(E.current,d)||Object.keys(k).reduce((_,j)=>(_[j]="",_),{});if(x==="initial"&&v(_=>({transitionProperty:_.transitionProperty,...S,...k})),x==="open"&&v({transitionProperty:Object.keys(D).map(S5).join(","),transitionDuration:f+"ms",...S,...D}),x==="close"){const _=L||k;v({transitionProperty:Object.keys(_).map(S5).join(","),transitionDuration:C+"ms",...S,..._})}},[C,w,y,E,M,f,x,d]),{isMounted:b,styles:g}}function D5(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,l=i-1;a<i;l=a++){const[c,d]=t[a]||[0,0],[p,f]=t[l]||[0,0];d>=r!=f>=r&&n<=(p-c)*(r-d)/(f-d)+c&&(o=!o)}return o}function cf(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uf(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,l=null,c=performance.now();function d(f,C){const g=performance.now(),v=g-c;if(a===null||l===null||v===0)return a=f,l=C,c=g,null;const b=f-a,x=C-l,E=Math.sqrt(b*b+x*x)/v;return a=f,l=C,c=g,E}const p=f=>{let{x:C,y:g,placement:v,elements:b,onClose:x,nodeId:y,tree:E}=f;return function(M){function k(){clearTimeout(o),x()}if(clearTimeout(o),!b.domReference||!b.floating||v==null||C==null||g==null)return;const{clientX:L,clientY:S}=M,D=[L,S],_=an(M),j=M.type==="mouseleave",B=ze(b.floating,_),A=ze(b.domReference,_),N=b.domReference.getBoundingClientRect(),R=b.floating.getBoundingClientRect(),P=v.split("-")[0],T=C>R.right-R.width/2,H=g>R.bottom-R.height/2,F=cf(D,N),$=R.width>N.width,W=R.height>N.height,G=($?N:R).left,ne=($?N:R).right,Ce=(W?N:R).top,re=(W?N:R).bottom;if(B&&(i=!0,!j))return;if(A&&(i=!1),A&&!j){i=!0;return}if(j&&Ee(M.relatedTarget)&&ze(b.floating,M.relatedTarget)||E&&b1(E.nodesRef.current,y).some(ee=>{let{context:q}=ee;return q?.open}))return;if(P==="top"&&g>=N.bottom-1||P==="bottom"&&g<=N.top+1||P==="left"&&C>=N.right-1||P==="right"&&C<=N.left+1)return k();let ie=[];switch(P){case"top":ie=[[G,N.top+1],[G,R.bottom-1],[ne,R.bottom-1],[ne,N.top+1]];break;case"bottom":ie=[[G,R.top+1],[G,N.bottom-1],[ne,N.bottom-1],[ne,R.top+1]];break;case"left":ie=[[R.right-1,re],[R.right-1,Ce],[N.left+1,Ce],[N.left+1,re]];break;case"right":ie=[[N.right-1,re],[N.right-1,Ce],[R.left+1,Ce],[R.left+1,re]];break}function J(ee){let[q,ue]=ee;switch(P){case"top":{const be=[$?q+t/2:T?q+t*4:q-t*4,ue+t+1],He=[$?q-t/2:T?q+t*4:q-t*4,ue+t+1],Y=[[R.left,T||$?R.bottom-t:R.top],[R.right,T?$?R.bottom-t:R.top:R.bottom-t]];return[be,He,...Y]}case"bottom":{const be=[$?q+t/2:T?q+t*4:q-t*4,ue-t],He=[$?q-t/2:T?q+t*4:q-t*4,ue-t],Y=[[R.left,T||$?R.top+t:R.bottom],[R.right,T?$?R.top+t:R.bottom:R.top+t]];return[be,He,...Y]}case"left":{const be=[q+t+1,W?ue+t/2:H?ue+t*4:ue-t*4],He=[q+t+1,W?ue-t/2:H?ue+t*4:ue-t*4];return[...[[H||W?R.right-t:R.left,R.top],[H?W?R.right-t:R.left:R.right-t,R.bottom]],be,He]}case"right":{const be=[q-t,W?ue+t/2:H?ue+t*4:ue-t*4],He=[q-t,W?ue-t/2:H?ue+t*4:ue-t*4],Y=[[H||W?R.left+t:R.right,R.top],[H?W?R.left+t:R.right:R.left+t,R.bottom]];return[be,He,...Y]}}}if(!D5([L,S],ie)){if(i&&!F)return k();if(!j&&r){const ee=d(M.clientX,M.clientY);if(ee!==null&&ee<.1)return k()}D5([L,S],J([C,g]))?!i&&r&&(o=window.setTimeout(k,40)):k()}}};return p.__options={blockPointerEvents:n},p}const An=e=>{if(n1){const t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}},jr=(e,t,n={})=>{const r={path:"/","max-age":31104e3,...n},o=window.location.origin;o.includes("localhost")?r.domain="localhost":o.includes("profinansy.ae")?r.domain=".profinansy.ae":o.includes("qa.profinansy.dev")?r.domain=".profinansy.dev":r.domain=".profinansy.ru",n.expires instanceof Date&&(r.expires=n.expires.toUTCString());let i=encodeURIComponent(e)+"="+encodeURIComponent(t);for(const a in r){i+="; "+a;const l=r[a];l!==!0&&(i+="="+l)}document.cookie=i},df=e=>{jr(e,"",{"max-age":-1})},$a=["/login","/idv","/method"],t3=m.createContext({mode:"light",selectedMode:"light",toggleTheme:null,setShowTheme:null,unAvailablePagesTheme:$a}),K=()=>m.useContext(t3),_5="selected_theme",pf=({children:e,selectedTheme:t})=>{const[n,r]=m.useState(t??"light"),[o,i]=m.useState(t??"light");m.useEffect(()=>{let c=!0;const d=window?.location.pathname;$a.forEach(p=>{d.includes(p)&&(c=!1)}),i(c?n:"light")},[n]),m.useEffect(()=>{const c=An(_5);(c==="light"||c==="dark")&&r(c)},[]);const a=c=>{r(c),jr(_5,c)},l=c=>{i(c)};return s.jsx(t3.Provider,{value:{mode:o,selectedMode:n,toggleTheme:a,setShowTheme:l,unAvailablePagesTheme:$a},children:e})},X={light:{background:{primary:"#F4F4F9",content:"#FFFFFF",secondary:"#F7F7F9",secondaryAlpha:"#EAE9F1",field:"#FFFFFF",fieldSecondary:"#F5F4F8",accent:"#6553F5",accentSecondaryTint:"#E8E5FE",positiveTint:"#DCF6DA",warningTint:"#FFF0DB",negativeTint:"#FFF1EC",info:"#DBDCFF",bottomActions:"rgba(255, 255, 255, 0.5)"},text:{primary:"#242424",secondary:"#6A6A71",tertiary:"#A1A0AC",fourth:"#606076",contrast:"#FFFFFF",contrastThemed:"#FFFFFF",accent:"#6553F5",accentSecondary:"#9B8EFF",positive:"#34C759",warning:"#FFA000",negative:"#FF3B30",info:"#3038F5",link:"#4285F4"},icons:{primary:"#242424",secondary:"#AAAABA",tertiary:"#CCCBD3",fourth:"#606076",contrast:"#FFFFFF",contrastThemed:"#FFFFFF",contrastThemRev:"#FFFFFF",accent:"#6553F5",accentSecondary:"#9B8EFF",positive:"#34C759",warring:"#FFA000",negative:"#FF3B30",info:"#3038F5",link:"#4285F4"},stroke:{primary:"#DDDDE3",secondary:"#D6D6DE",tertiary:"#E7E7EB",contrast:"#7D7D95",accent:"#6553F5",positive:"#34C759",warning:"#FFA000",negative:"#FF3B30",info:"#3038F5"},interactiveButtons:{brandBackground:"#6553F5",brandBackgroundHover:"#4A35F3",brandText:"#FFFFFF",secondaryBrandBackground:"#E0DDFD",secondaryBrandBackgroundHover:"#B4ADFA",secondaryBrandText:"#4A35F3",outlineBrandBackground:"#FFFFFF",outlineBrandBackgroundHover:"#FFFFFF",outlineBrandText:"#6553F5",outlineBrandBorder:"#6553F5",outlineBrandBorderHover:"#3821F2",systemBackground:"#EAE9F1",systemBackgroundHover:"#CCCADD",systemText:"#464167",successBackground:"#E1F7E6",successBackgroundHover:"#BBEDC6",successText:"#299E47",warningBackground:"#FFF1D9",warningBackgroundHover:"#FFDFA8",warningText:"#E59000",criticalBackground:"#FFE2E0",criticalBackgroundHover:"#FFC6C2",criticalText:"#FF3B30",neutralBackground:"rgba(36, 36, 36, 0.50)",neutralBackgroundHover:"rgba(36, 36, 36, 0.70)",neutralText:"#FFFFFF"},interactiveControls:{accent:"#F0EFF3",secondary:"#FFFFFF",supportive:"#E8E8ED",brand:"#6553F5",brandAlpha:"#4A35F3",accentDark:"#19181B"},other:{orange:"#FFAD30",green:"#A0DD1E",olive:"#DBDE43",violet:"#6E59EF",red:"#EB343F",red2:"#FF4747",pink:"#F969FC",turquoise:"#2ED0C7",blue:"#72E3E3",mediumBlue:"#58C9E2",darkBlue:"#28C6E9",lightBlue:"#4285F4",navyBlue:"#11408E",lightBlueTint:"rgba(66, 133, 244, 0.10)",gray:"rgba(36, 36, 36, 0.50)",orangeTint:"#FFF9EF",greenTint:"#F8FDED",oliveTint:"#FCFDF0",violetTint:"#F4F2FE",redTint:"#FEEFF0",pinkTint:"#FFF3FF",turquoiseTint:"#EFFCFB",darkBlueTint:"#EEF8FB",black:"#111011"},shadow:{basicDefault:"0px 14px 20px -4px rgba(87, 87, 87, 0.10)",basicHover:"0px 12px 28px -3px rgba(87, 87, 87, 0.20)",basicDrag:"0px 12px 32px -3px rgba(87, 87, 87, 0.32)",overlay:"0px 16px 40px -3px rgba(58, 57, 60, 0.28)"},statesBackground:{tabsHover:"#F6F6F6",tabsActive:"#383838",tabsActiveHover:"#242424",accentHover:"#7665FF",accentActive:"#5D48F5",field:"rgba(0, 0, 0, 0.06)",secondaryAlphaActive:"#DCDCDC",secondaryAlphaHover:"#E7E7E7",listHover:"#F6F6F6",notificationHover:"#F6F6F6",notificationHoverError:"#F6F6F6",sideBarActive:"#111011"},gradient:{gradient_1:"linear-gradient(90deg, #f4f4f9 0%, rgba(244, 244, 249, 0) 100%)",gradient_2:"linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)",gradient_3:"linear-gradient(90deg, rgba(244, 244, 249, 0) 0%, #f4f4f9 100%)",gradient_4:"linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)",top:"linear-gradient(180deg, #FFF 0%, rgba(255, 255, 255, 0.95) 52.08%, rgba(255, 255, 255, 0.00) 100%)",bottom:"linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.95) 53.12%, #FFF 100%)"},club:{primary:"#3C3993",primaryHover:"#5853E3",secondary:"#4833F4",secondaryHover:"#200DB8",buttonBackground:"#E7E7F2",buttonBackgroundHover:"#CAC9E1",green:"#29B279",primaryGradient:"linear-gradient(54.06deg, #162331 10.84%, #3C3993 98.2%)",secondaryGradient:"linear-gradient(90.24deg, #B92A78 0%, #6699FB 99.58%)"}},dark:{background:{primary:"#181818",content:"#202020",secondary:"#2B2B2B",secondaryAlpha:"#333333",field:"#2B2B2B",fieldSecondary:"#323232",accent:"#9B8EFF",accentSecondaryTint:"#2B293A",positiveTint:"#384436",warningTint:"#453B2B",negativeTint:"#362D2A",info:"#20213B",bottomActions:"rgba(24, 24, 24, 0.85)"},text:{primary:"#FFFFFF",secondary:"#BABAC6",tertiary:"#73738C",fourth:"#E0E0E6",contrast:"#242424",contrastThemed:"#FFFFFF",accent:"#9B8EFF",accentSecondary:"#756CBB",positive:"#30D158",warning:"#F49B06",negative:"#FF452A",info:"#3B42EA",link:"#4285F4"},icons:{primary:"#D9D9D9",secondary:"#BABAC6",tertiary:"#3E3E4C",fourth:"#E0E0E6",contrast:"#242424",contrastThemed:"#FFFFFF",contrastThemRev:"#454545",accent:"#9B8EFF",accentSecondary:"#756CBB",positive:"#30D158",warring:"#F49B06",negative:"#FF452A",info:"#3B42EA",link:"#4285F4"},stroke:{primary:"#3E3E4C",secondary:"#7D7D95",tertiary:"#454554",contrast:"#535365",accent:"#9B8EFF",positive:"#30D158",warning:"#F49B06",negative:"#FF453A",info:"#3B42EA"},interactiveButtons:{brandBackground:"#7B61FF",brandBackgroundHover:"#6142FF",brandText:"#FFFFFF",secondaryBrandBackground:"#E5DFFF",secondaryBrandBackgroundHover:"#BDADFF",secondaryBrandText:"#6142FF",outlineBrandBackground:"#202020",outlineBrandBackgroundHover:"#202020",outlineBrandText:"#9B8EFF",outlineBrandBorder:"#9B8EFF",outlineBrandBorderHover:"#9B8EFF",systemBackground:"#2E2E38",systemBackgroundHover:"#454554",systemText:"#CCCADD",successBackground:"#223B28",successBackgroundHover:"#2B4A32",successText:"#2CAA4C",warningBackground:"#40321C",warningBackgroundHover:"#634E2B",warningText:"#F99E06",criticalBackground:"#412621",criticalBackgroundHover:"#623932",criticalText:"#FF5A42",neutralBackground:"rgba(255, 255, 255, 0.50)",neutralBackgroundHover:"rgba(255, 255, 255, 0.70)",neutralText:"#FFFFFF"},interactiveControls:{accent:"#39383C",secondary:"#242424",supportive:"#2F2F37",brand:"#7B61FF",brandAlpha:"#6142FF",accentDark:"#FFFFFF"},other:{orange:"#E79D2D",green:"#91C81C",olive:"#C1C339",violet:"#6E59EF",red:"#E8343F",red2:"#F02D3A",pink:"#E05DE2",turquoise:"#229E97",blue:"#61C5C5",mediumBlue:"#51BBD2",darkBlue:"#21AFCE",lightBlue:"#317AF2",navyBlue:"#C9DEFF",lightBlueTint:"rgba(49, 122, 242, 0.04)",gray:"rgba(48, 48, 48, 0.50)",orangeTint:"rgba(255, 173, 48, 0.04)",greenTint:"rgba(160, 221, 30, 0.04)",oliveTint:"rgba(219, 222, 67, 0.04)",violetTint:"rgba(110, 89, 239, 0.04)",redTint:"rgba(235, 52, 63, 0.04)",pinkTint:"rgba(249, 105, 252, 0.04)",turquoiseTint:"rgba(46, 208, 199, 0.04)",darkBlueTint:"rgba(33, 175, 206, 0.04)",black:"#242325"},shadow:{basicDefault:null,basicHover:null,basicDrag:null,overlay:null},statesBackground:{tabsHover:"#383838",tabsActive:"#FFFFFF",tabsActiveHover:"#F6F6F6",accentHover:"#614DF5",accentActive:"#9284FF",field:"rgba(255, 255, 255, 0.06)",secondaryAlphaActive:"#505050",secondaryAlphaHover:"#404040",listHover:"#303030",notificationHover:"#303030",notificationHoverError:"#303030",sideBarActive:"#333036"},gradient:{gradient_1:"linear-gradient(90deg, #181818 0%, rgba(24, 24, 24, 0.00) 100%)",gradient_2:"linear-gradient(90deg, #2B2B2B 0%, rgba(43, 43, 43, 0.00) 100%)",gradient_3:"linear-gradient(90deg, rgba(24, 24, 24, 0.00) 0%, #181818 100%)",gradient_4:"linear-gradient(90deg, rgba(43, 43, 43, 0.00) 0%, #2B2B2B 100%)",top:"linear-gradient(180deg, #2B2B2B 0%, rgba(43, 43, 43, 0.95) 53.65%, rgba(43, 43, 43, 0.00) 100%)",bottom:" linear-gradient(180deg, rgba(43, 43, 43, 0.00) 0%, rgba(43, 43, 43, 0.95) 52.08%, #2B2B2B 100%)"},club:{primary:"#5854C6",primaryHover:"#7672F6",secondary:"#8C7CFF",secondaryHover:"#614FED",buttonBackground:"#282837",buttonBackgroundHover:"#2E2C60",green:"#2FCA89",primaryGradient:"linear-gradient(54.11deg, #2C2562 6.32%, #4641BF 116.13%)",secondaryGradient:"linear-gradient(90.24deg, #CE2680 0%, #4080FD 99.58%)"}}},mt=h.css`
320
320
  &::-webkit-scrollbar {
321
321
  width: 4px;
322
322
  height: 4px;