-
Notifications
You must be signed in to change notification settings - Fork 0
/
5259.efb48712.iframe.bundle.js
1 lines (1 loc) · 94.2 KB
/
5259.efb48712.iframe.bundle.js
1
"use strict";(self.webpackChunk_haaretz_a_htz_sg=self.webpackChunk_haaretz_a_htz_sg||[]).push([[5259],{"../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/core/dist/floating-ui.core.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{RR:()=>flip,cv:()=>offset,oo:()=>computePosition,uY:()=>shift,x7:()=>arrow});var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs");function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref;const sideAxis=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.Qq)(placement),alignmentAxis=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.Wh)(placement),alignLength=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.I4)(alignmentAxis),side=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.k3)(placement),isVertical="y"===sideAxis,commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch((0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.hp)(placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1)}return coords}const computePosition=async(reference,floating,config)=>{const{placement="bottom",strategy="absolute",middleware=[],platform}=config,validMiddleware=middleware.filter(Boolean),rtl=await(null==platform.isRTL?void 0:platform.isRTL(floating));let rects=await platform.getElementRects({reference,floating,strategy}),{x,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i<validMiddleware.length;i++){const{name,fn}=validMiddleware[i],{x:nextX,y:nextY,data,reset}=await fn({x,y,initialPlacement:placement,placement:statefulPlacement,strategy,middlewareData,rects,platform,elements:{reference,floating}});x=null!=nextX?nextX:x,y=null!=nextY?nextY:y,middlewareData={...middlewareData,[name]:{...middlewareData[name],...data}},reset&&resetCount<=50&&(resetCount++,"object"==typeof reset&&(reset.placement&&(statefulPlacement=reset.placement),reset.rects&&(rects=!0===reset.rects?await platform.getElementRects({reference,floating,strategy}):reset.rects),({x,y}=computeCoordsFromPlacement(rects,statefulPlacement,rtl))),i=-1)}return{x,y,placement:statefulPlacement,strategy,middlewareData}};async function detectOverflow(state,options){var _await$platform$isEle;void 0===options&&(options={});const{x,y,platform,rects,elements,strategy}=state,{boundary="clippingAncestors",rootBoundary="viewport",elementContext="floating",altBoundary=!1,padding=0}=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.ku)(options,state),paddingObject=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.yd)(padding),element=elements[altBoundary?"floating"===elementContext?"reference":"floating":elementContext],clippingClientRect=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.JB)(await platform.getClippingRect({element:null==(_await$platform$isEle=await(null==platform.isElement?void 0:platform.isElement(element)))||_await$platform$isEle?element:element.contextElement||await(null==platform.getDocumentElement?void 0:platform.getDocumentElement(elements.floating)),boundary,rootBoundary,strategy})),rect="floating"===elementContext?{...rects.floating,x,y}:rects.reference,offsetParent=await(null==platform.getOffsetParent?void 0:platform.getOffsetParent(elements.floating)),offsetScale=await(null==platform.isElement?void 0:platform.isElement(offsetParent))&&await(null==platform.getScale?void 0:platform.getScale(offsetParent))||{x:1,y:1},elementClientRect=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.JB)(platform.convertOffsetParentRelativeRectToViewportRelativeRect?await platform.convertOffsetParentRelativeRectToViewportRelativeRect({rect,offsetParent,strategy}):rect);return{top:(clippingClientRect.top-elementClientRect.top+paddingObject.top)/offsetScale.y,bottom:(elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom)/offsetScale.y,left:(clippingClientRect.left-elementClientRect.left+paddingObject.left)/offsetScale.x,right:(elementClientRect.right-clippingClientRect.right+paddingObject.right)/offsetScale.x}}const arrow=options=>({name:"arrow",options,async fn(state){const{x,y,placement,rects,platform,elements}=state,{element,padding=0}=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.ku)(options,state)||{};if(null==element)return{};const paddingObject=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.yd)(padding),coords={x,y},axis=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.Wh)(placement),length=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.I4)(axis),arrowDimensions=await platform.getDimensions(element),isYAxis="y"===axis,minProp=isYAxis?"top":"left",maxProp=isYAxis?"bottom":"right",clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await(null==platform.getOffsetParent?void 0:platform.getOffsetParent(element));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;clientSize&&await(null==platform.isElement?void 0:platform.isElement(arrowOffsetParent))||(clientSize=elements.floating[clientProp]||rects.floating[length]);const centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.VV)(paddingObject[minProp],largestPossiblePadding),maxPadding=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.VV)(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.uZ)(min$1,center,max),alignmentOffset=null!=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.hp)(placement)&¢er!=offset&&rects.reference[length]/2-(center<min$1?minPadding:maxPadding)-arrowDimensions[length]/2<0?center<min$1?min$1-center:max-center:0;return{[axis]:coords[axis]-alignmentOffset,data:{[axis]:offset,centerOffset:center-offset+alignmentOffset}}}});const flip=function(options){return void 0===options&&(options={}),{name:"flip",options,async fn(state){var _middlewareData$flip;const{placement,middlewareData,rects,initialPlacement,platform,elements}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy="bestFit",fallbackAxisSideDirection="none",flipAlignment=!0,...detectOverflowOptions}=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.ku)(options,state),side=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.k3)(placement),isBasePlacement=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.k3)(initialPlacement)===initialPlacement,rtl=await(null==platform.isRTL?void 0:platform.isRTL(elements.floating)),fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.pw)(initialPlacement)]:(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.gy)(initialPlacement));specifiedFallbackPlacements||"none"===fallbackAxisSideDirection||fallbackPlacements.push(...(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.KX)(initialPlacement,flipAlignment,fallbackAxisSideDirection,rtl));const placements=[initialPlacement,...fallbackPlacements],overflow=await detectOverflow(state,detectOverflowOptions),overflows=[];let overflowsData=(null==(_middlewareData$flip=middlewareData.flip)?void 0:_middlewareData$flip.overflows)||[];if(checkMainAxis&&overflows.push(overflow[side]),checkCrossAxis){const sides=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.i8)(placement,rects,rtl);overflows.push(overflow[sides[0]],overflow[sides[1]])}if(overflowsData=[...overflowsData,{placement,overflows}],!overflows.every((side=>side<=0))){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=((null==(_middlewareData$flip2=middlewareData.flip)?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements[nextIndex];if(nextPlacement)return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=null==(_overflowsData$filter=overflowsData.filter((d=>d.overflows[0]<=0)).sort(((a,b)=>a.overflows[1]-b.overflows[1]))[0])?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{var _overflowsData$map$so;const placement=null==(_overflowsData$map$so=overflowsData.map((d=>[d.placement,d.overflows.filter((overflow=>overflow>0)).reduce(((acc,overflow)=>acc+overflow),0)])).sort(((a,b)=>a[1]-b[1]))[0])?void 0:_overflowsData$map$so[0];placement&&(resetPlacement=placement);break}case"initialPlacement":resetPlacement=initialPlacement}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};const offset=function(options){return void 0===options&&(options=0),{name:"offset",options,async fn(state){const{x,y}=state,diffCoords=await async function convertValueToCoords(state,options){const{placement,platform,elements}=state,rtl=await(null==platform.isRTL?void 0:platform.isRTL(elements.floating)),side=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.k3)(placement),alignment=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.hp)(placement),isVertical="y"===(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.Qq)(placement),mainAxisMulti=["left","top"].includes(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.ku)(options,state);let{mainAxis,crossAxis,alignmentAxis}="number"==typeof rawValue?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...rawValue};return alignment&&"number"==typeof alignmentAxis&&(crossAxis="end"===alignment?-1*alignmentAxis:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}(state,options);return{x:x+diffCoords.x,y:y+diffCoords.y,data:diffCoords}}}},shift=function(options){return void 0===options&&(options={}),{name:"shift",options,async fn(state){const{x,y,placement}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x,y}=_ref;return{x,y}}},...detectOverflowOptions}=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.ku)(options,state),coords={x,y},overflow=await detectOverflow(state,detectOverflowOptions),crossAxis=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.Qq)((0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.k3)(placement)),mainAxis=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.Rn)(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){const maxSide="y"===mainAxis?"bottom":"right",min=mainAxisCoord+overflow["y"===mainAxis?"top":"left"],max=mainAxisCoord-overflow[maxSide];mainAxisCoord=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.uZ)(min,mainAxisCoord,max)}if(checkCrossAxis){const maxSide="y"===crossAxis?"bottom":"right",min=crossAxisCoord+overflow["y"===crossAxis?"top":"left"],max=crossAxisCoord-overflow[maxSide];crossAxisCoord=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__.uZ)(min,crossAxisCoord,max)}const limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y}}}}}},"../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Me:()=>autoUpdate,oo:()=>computePosition});var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"),_floating_ui_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs");function getCssDimensions(element){const css=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(element);let width=parseFloat(css.width)||0,height=parseFloat(css.height)||0;const hasOffset=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(element),offsetWidth=hasOffset?element.offsetWidth:width,offsetHeight=hasOffset?element.offsetHeight:height,shouldFallback=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.NM)(width)!==offsetWidth||(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.NM)(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element){return(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(element)?element:element.contextElement}function getScale(element){const domElement=unwrapElement(element);if(!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(domElement))return(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(1);const rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement);let x=($?(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.NM)(rect.width):rect.width)/width,y=($?(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.NM)(rect.height):rect.height)/height;return x&&Number.isFinite(x)||(x=1),y&&Number.isFinite(y)||(y=1),{x,y}}const noOffsets=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(0);function getVisualOffsets(element){const win=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(element);return(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Pf)()&&win.visualViewport?{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}:noOffsets}function getBoundingClientRect(element,includeScale,isFixedStrategy,offsetParent){void 0===includeScale&&(includeScale=!1),void 0===isFixedStrategy&&(isFixedStrategy=!1);const clientRect=element.getBoundingClientRect(),domElement=unwrapElement(element);let scale=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(1);includeScale&&(offsetParent?(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(offsetParent)&&(scale=getScale(offsetParent)):scale=getScale(element));const visualOffsets=function shouldAddVisualOffsets(element,isFixed,floatingOffsetParent){return void 0===isFixed&&(isFixed=!1),!(!floatingOffsetParent||isFixed&&floatingOffsetParent!==(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(element))&&isFixed}(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(0);let x=(clientRect.left+visualOffsets.x)/scale.x,y=(clientRect.top+visualOffsets.y)/scale.y,width=clientRect.width/scale.x,height=clientRect.height/scale.y;if(domElement){const win=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(domElement),offsetWin=offsetParent&&(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(offsetParent)?(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(offsetParent):offsetParent;let currentIFrame=win.frameElement;for(;currentIFrame&&offsetParent&&offsetWin!==win;){const iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentIFrame=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(currentIFrame).frameElement}}return(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.JB)({width,height,x,y})}function getWindowScrollBarX(element){return getBoundingClientRect((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(element)).left+(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Lw)(element).scrollLeft}function getClientRectFromClippingAncestor(element,clippingAncestor,strategy){let rect;if("viewport"===clippingAncestor)rect=function getViewportRect(element,strategy){const win=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(element),html=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(element),visualViewport=win.visualViewport;let width=html.clientWidth,height=html.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;const visualViewportBased=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Pf)();(!visualViewportBased||visualViewportBased&&"fixed"===strategy)&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x,y}}(element,strategy);else if("document"===clippingAncestor)rect=function getDocumentRect(element){const html=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(element),scroll=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Lw)(element),body=element.ownerDocument.body,width=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.Fp)(html.scrollWidth,html.clientWidth,body.scrollWidth,body.clientWidth),height=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.Fp)(html.scrollHeight,html.clientHeight,body.scrollHeight,body.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(element);const y=-scroll.scrollTop;return"rtl"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(body).direction&&(x+=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.Fp)(html.clientWidth,body.clientWidth)-width),{width,height,x,y}}((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(element));else if((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(clippingAncestor))rect=function getInnerBoundingClientRect(element,strategy){const clientRect=getBoundingClientRect(element,!0,"fixed"===strategy),top=clientRect.top+element.clientTop,left=clientRect.left+element.clientLeft,scale=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(element)?getScale(element):(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(1);return{width:element.clientWidth*scale.x,height:element.clientHeight*scale.y,x:left*scale.x,y:top*scale.y}}(clippingAncestor,strategy);else{const visualOffsets=getVisualOffsets(element);rect={...clippingAncestor,x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y}}return(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.JB)(rect)}function hasFixedPositionAncestor(element,stopNode){const parentNode=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Ow)(element);return!(parentNode===stopNode||!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(parentNode)||(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Py)(parentNode))&&("fixed"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(parentNode).position||hasFixedPositionAncestor(parentNode,stopNode))}function getRectRelativeToOffsetParent(element,offsetParent,strategy){const isOffsetParentAnElement=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(offsetParent),documentElement=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(offsetParent),isFixed="fixed"===strategy,rect=getBoundingClientRect(element,!0,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if(("body"!==(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.wk)(offsetParent)||(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.ao)(documentElement))&&(scroll=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Lw)(offsetParent)),isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&(offsets.x=getWindowScrollBarX(documentElement));return{x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height}}function getTrueOffsetParent(element,polyfill){return(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(element)&&"fixed"!==(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(element).position?polyfill?polyfill(element):element.offsetParent:null}function getOffsetParent(element,polyfill){const window=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Jj)(element);if(!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(element))return window;let offsetParent=getTrueOffsetParent(element,polyfill);for(;offsetParent&&(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Ze)(offsetParent)&&"static"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(offsetParent).position;)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&("html"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.wk)(offsetParent)||"body"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.wk)(offsetParent)&&"static"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(offsetParent).position&&!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.hT)(offsetParent))?window:offsetParent||(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.gQ)(element)||window}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{rect,offsetParent,strategy}=_ref;const isOffsetParentAnElement=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(offsetParent),documentElement=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(offsetParent);if(offsetParent===documentElement)return rect;let scroll={scrollLeft:0,scrollTop:0},scale=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(1);const offsets=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.ze)(0);if((isOffsetParentAnElement||!isOffsetParentAnElement&&"fixed"!==strategy)&&(("body"!==(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.wk)(offsetParent)||(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.ao)(documentElement))&&(scroll=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Lw)(offsetParent)),(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Re)(offsetParent))){const offsetRect=getBoundingClientRect(offsetParent);scale=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}return{width:rect.width*scale.x,height:rect.height*scale.y,x:rect.x*scale.x-scroll.scrollLeft*scale.x+offsets.x,y:rect.y*scale.y-scroll.scrollTop*scale.y+offsets.y}},getDocumentElement:_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF,getClippingRect:function getClippingRect(_ref){let{element,boundary,rootBoundary,strategy}=_ref;const clippingAncestors=[..."clippingAncestors"===boundary?function getClippingElementAncestors(element,cache){const cachedResult=cache.get(element);if(cachedResult)return cachedResult;let result=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Kx)(element).filter((el=>(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(el)&&"body"!==(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.wk)(el))),currentContainingBlockComputedStyle=null;const elementIsFixed="fixed"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(element).position;let currentNode=elementIsFixed?(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Ow)(element):element;for(;(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK)(currentNode)&&!(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Py)(currentNode);){const computedStyle=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(currentNode),currentNodeIsContaining=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.hT)(currentNode);currentNodeIsContaining||"fixed"!==computedStyle.position||(currentContainingBlockComputedStyle=null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&"static"===computedStyle.position&¤tContainingBlockComputedStyle&&["absolute","fixed"].includes(currentContainingBlockComputedStyle.position)||(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.ao)(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element,currentNode))?result=result.filter((ancestor=>ancestor!==currentNode)):currentContainingBlockComputedStyle=computedStyle,currentNode=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Ow)(currentNode)}return cache.set(element,result),result}(element,this._c):[].concat(boundary),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce(((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor(element,clippingAncestor,strategy);return accRect.top=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.Fp)(rect.top,accRect.top),accRect.right=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.VV)(rect.right,accRect.right),accRect.bottom=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.VV)(rect.bottom,accRect.bottom),accRect.left=(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.Fp)(rect.left,accRect.left),accRect}),getClientRectFromClippingAncestor(element,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}},getOffsetParent,getElementRects:async function(_ref){let{reference,floating,strategy}=_ref;const getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions;return{reference:getRectRelativeToOffsetParent(reference,await getOffsetParentFn(floating),strategy),floating:{x:0,y:0,...await getDimensionsFn(floating)}}},getClientRects:function getClientRects(element){return Array.from(element.getClientRects())},getDimensions:function getDimensions(element){return getCssDimensions(element)},getScale,isElement:_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.kK,isRTL:function isRTL(element){return"rtl"===(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Dx)(element).direction}};function autoUpdate(reference,floating,update,options){void 0===options&&(options={});const{ancestorScroll=!0,ancestorResize=!0,elementResize="function"==typeof ResizeObserver,layoutShift="function"==typeof IntersectionObserver,animationFrame=!1}=options,referenceEl=unwrapElement(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Kx)(referenceEl):[],...(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.Kx)(floating)]:[];ancestors.forEach((ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update,{passive:!0}),ancestorResize&&ancestor.addEventListener("resize",update)}));const cleanupIo=referenceEl&&layoutShift?function observeMove(element,onMove){let timeoutId,io=null;const root=(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__.tF)(element);function cleanup(){clearTimeout(timeoutId),io&&io.disconnect(),io=null}return function refresh(skip,threshold){void 0===skip&&(skip=!1),void 0===threshold&&(threshold=1),cleanup();const{left,top,width,height}=element.getBoundingClientRect();if(skip||onMove(),!width||!height)return;const options={rootMargin:-(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.GW)(top)+"px "+-(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.GW)(root.clientWidth-(left+width))+"px "+-(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.GW)(root.clientHeight-(top+height))+"px "+-(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.GW)(left)+"px",threshold:(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.Fp)(0,(0,_floating_ui_utils__WEBPACK_IMPORTED_MODULE_1__.VV)(1,threshold))||1};let isFirstUpdate=!0;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout((()=>{refresh(!1,1e-7)}),100)}isFirstUpdate=!1}try{io=new IntersectionObserver(handleObserve,{...options,root:root.ownerDocument})}catch(e){io=new IntersectionObserver(handleObserve,options)}io.observe(element)}(!0),cleanup}(referenceEl,update):null;let frameId,reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver((_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame((()=>{resizeObserver&&resizeObserver.observe(floating)}))),update()})),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let prevRefRect=animationFrame?getBoundingClientRect(reference):null;return animationFrame&&function frameLoop(){const nextRefRect=getBoundingClientRect(reference);!prevRefRect||nextRefRect.x===prevRefRect.x&&nextRefRect.y===prevRefRect.y&&nextRefRect.width===prevRefRect.width&&nextRefRect.height===prevRefRect.height||update();prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}(),update(),()=>{ancestors.forEach((ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update),ancestorResize&&ancestor.removeEventListener("resize",update)})),cleanupIo&&cleanupIo(),resizeObserver&&resizeObserver.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const computePosition=(reference,floating,options)=>{const cache=new Map,mergedOptions={platform,...options},platformWithCache={...mergedOptions.platform,_c:cache};return(0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_2__.oo)(reference,floating,{...mergedOptions,platform:platformWithCache})}},"../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{YF:()=>useFloating,x7:()=>arrow});var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),_floating_ui_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),react_dom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react-dom/index.js");const arrow=options=>{const{element,padding}=options;return{name:"arrow",options,fn:args=>function isRef(value){return Object.prototype.hasOwnProperty.call(value,"current")}(element)?null!=element.current?(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_2__.x7)({element:element.current,padding}).fn(args):{}:element?(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_2__.x7)({element,padding}).fn(args):{}}};var index="undefined"!=typeof document?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:react__WEBPACK_IMPORTED_MODULE_0__.useEffect;function deepEqual(a,b){if(a===b)return!0;if(typeof a!=typeof b)return!1;if("function"==typeof a&&a.toString()===b.toString())return!0;let length,i,keys;if(a&&b&&"object"==typeof a){if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;0!=i--;)if(!deepEqual(a[i],b[i]))return!1;return!0}if(keys=Object.keys(a),length=keys.length,length!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){const key=keys[i];if(("_owner"!==key||!a.$$typeof)&&!deepEqual(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}function useLatestRef(value){const ref=react__WEBPACK_IMPORTED_MODULE_0__.useRef(value);return index((()=>{ref.current=value})),ref}function useFloating(options){void 0===options&&(options={});const{placement="bottom",strategy="absolute",middleware=[],platform,whileElementsMounted,open}=options,[data,setData]=react__WEBPACK_IMPORTED_MODULE_0__.useState({x:null,y:null,strategy,placement,middlewareData:{},isPositioned:!1}),[latestMiddleware,setLatestMiddleware]=react__WEBPACK_IMPORTED_MODULE_0__.useState(middleware);deepEqual(latestMiddleware,middleware)||setLatestMiddleware(middleware);const referenceRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),floatingRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),dataRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef(data),whileElementsMountedRef=useLatestRef(whileElementsMounted),platformRef=useLatestRef(platform),[reference,_setReference]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),[floating,_setFloating]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),setReference=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((node=>{referenceRef.current!==node&&(referenceRef.current=node,_setReference(node))}),[]),setFloating=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((node=>{floatingRef.current!==node&&(floatingRef.current=node,_setFloating(node))}),[]),update=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((()=>{if(!referenceRef.current||!floatingRef.current)return;const config={placement,strategy,middleware:latestMiddleware};platformRef.current&&(config.platform=platformRef.current),(0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_3__.oo)(referenceRef.current,floatingRef.current,config).then((data=>{const fullData={...data,isPositioned:!0};isMountedRef.current&&!deepEqual(dataRef.current,fullData)&&(dataRef.current=fullData,react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync((()=>{setData(fullData)})))}))}),[latestMiddleware,placement,strategy,platformRef]);index((()=>{!1===open&&dataRef.current.isPositioned&&(dataRef.current.isPositioned=!1,setData((data=>({...data,isPositioned:!1}))))}),[open]);const isMountedRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef(!1);index((()=>(isMountedRef.current=!0,()=>{isMountedRef.current=!1})),[]),index((()=>{if(reference&&floating){if(whileElementsMountedRef.current)return whileElementsMountedRef.current(reference,floating,update);update()}}),[reference,floating,update,whileElementsMountedRef]);const refs=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({reference:referenceRef,floating:floatingRef,setReference,setFloating})),[setReference,setFloating]),elements=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({reference,floating})),[reference,floating]);return react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({...data,update,refs,elements,reference:setReference,floating:setFloating})),[data,update,refs,elements,setReference,setFloating])}},"../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@floating-ui/react/dist/floating-ui.react.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{wD:()=>FloatingFocusManager,ll:()=>FloatingPortal,eS:()=>useClick,bQ:()=>useDismiss,YF:()=>useFloating,KK:()=>useFocus,XI:()=>useHover,NI:()=>useInteractions,qs:()=>useRole});var floating_ui_utils_dom=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs"),floating_ui_react_dom_esm=__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js"),react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),react_namespaceObject=__webpack_require__.t(react,2),console=__webpack_require__("../../../node_modules/.pnpm/[email protected]/node_modules/console-browserify/index.js"),getDefaultParent=function(originalTarget){return"undefined"==typeof document?null:(Array.isArray(originalTarget)?originalTarget[0]:originalTarget).ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node){return node&&(node.host||unwrapHost(node.parentNode))},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=function(parent,targets){return targets.map((function(target){if(parent.contains(target))return target;var correctedTarget=unwrapHost(target);return correctedTarget&&parent.contains(correctedTarget)?correctedTarget:(console.error("aria-hidden",target,"in not contained inside",parent,". Doing nothing"),null)})).filter((function(x){return Boolean(x)}))}(parentNode,Array.isArray(originalTarget)?originalTarget:[originalTarget]);markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el){el&&!elementsToKeep.has(el)&&(elementsToKeep.add(el),keep(el.parentNode))};targets.forEach(keep);var deep=function(parent){parent&&!elementsToStop.has(parent)&&Array.prototype.forEach.call(parent.children,(function(node){if(elementsToKeep.has(node))deep(node);else{var attr=node.getAttribute(controlAttribute),alreadyHidden=null!==attr&&"false"!==attr,counterValue=(counterMap.get(node)||0)+1,markerValue=(markerCounter.get(node)||0)+1;counterMap.set(node,counterValue),markerCounter.set(node,markerValue),hiddenNodes.push(node),1===counterValue&&alreadyHidden&&uncontrolledNodes.set(node,!0),1===markerValue&&node.setAttribute(markerName,"true"),alreadyHidden||node.setAttribute(controlAttribute,"true")}}))};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach((function(node){var counterValue=counterMap.get(node)-1,markerValue=markerCounter.get(node)-1;counterMap.set(node,counterValue),markerCounter.set(node,markerValue),counterValue||(uncontrolledNodes.has(node)||node.removeAttribute(controlAttribute),uncontrolledNodes.delete(node)),markerValue||node.removeAttribute(markerName)})),--lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){void 0===markerName&&(markerName="data-aria-hidden");var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||getDefaultParent(originalTarget);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll("[aria-live]"))),applyAttributeToOthers(targets,activeParentNode,markerName,"aria-hidden")):function(){return null}},index_esm_console=__webpack_require__("../../../node_modules/.pnpm/[email protected]/node_modules/console-browserify/index.js"),candidateSelectors=["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])"],candidateSelector=candidateSelectors.join(","),NoElement="undefined"==typeof Element,matches=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode=!NoElement&&Element.prototype.getRootNode?function(element){var _element$getRootNode;return null==element||null===(_element$getRootNode=element.getRootNode)||void 0===_element$getRootNode?void 0:_element$getRootNode.call(element)}:function(element){return null==element?void 0:element.ownerDocument},isInert=function isInert(node,lookUp){var _node$getAttribute;void 0===lookUp&&(lookUp=!0);var inertAtt=null==node||null===(_node$getAttribute=node.getAttribute)||void 0===_node$getAttribute?void 0:_node$getAttribute.call(node,"inert");return""===inertAtt||"true"===inertAtt||lookUp&&node&&isInert(node.parentNode)},getCandidates=function getCandidates(el,includeContainer,filter){if(isInert(el))return[];var candidates=Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));return includeContainer&&matches.call(el,candidateSelector)&&candidates.unshift(el),candidates=candidates.filter(filter)},getCandidatesIteratively=function getCandidatesIteratively(elements,includeContainer,options){for(var candidates=[],elementsToCheck=Array.from(elements);elementsToCheck.length;){var element=elementsToCheck.shift();if(!isInert(element,!1))if("SLOT"===element.tagName){var assigned=element.assignedElements(),nestedCandidates=getCandidatesIteratively(assigned.length?assigned:element.children,!0,options);options.flatten?candidates.push.apply(candidates,nestedCandidates):candidates.push({scopeParent:element,candidates:nestedCandidates})}else{matches.call(element,candidateSelector)&&options.filter(element)&&(includeContainer||!elements.includes(element))&&candidates.push(element);var shadowRoot=element.shadowRoot||"function"==typeof options.getShadowRoot&&options.getShadowRoot(element),validShadowRoot=!isInert(shadowRoot,!1)&&(!options.shadowRootFilter||options.shadowRootFilter(element));if(shadowRoot&&validShadowRoot){var _nestedCandidates=getCandidatesIteratively(!0===shadowRoot?element.children:shadowRoot.children,!0,options);options.flatten?candidates.push.apply(candidates,_nestedCandidates):candidates.push({scopeParent:element,candidates:_nestedCandidates})}else elementsToCheck.unshift.apply(elementsToCheck,element.children)}}return candidates},hasTabIndex=function hasTabIndex(node){return!isNaN(parseInt(node.getAttribute("tabindex"),10))},getTabIndex=function getTabIndex(node){if(!node)throw new Error("No node provided");return node.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName)||function isContentEditable(node){var _node$getAttribute2,attValue=null==node||null===(_node$getAttribute2=node.getAttribute)||void 0===_node$getAttribute2?void 0:_node$getAttribute2.call(node,"contenteditable");return""===attValue||"true"===attValue}(node))&&!hasTabIndex(node)?0:node.tabIndex},sortOrderedTabbables=function sortOrderedTabbables(a,b){return a.tabIndex===b.tabIndex?a.documentOrder-b.documentOrder:a.tabIndex-b.tabIndex},isInput=function isInput(node){return"INPUT"===node.tagName},isNonTabbableRadio=function isNonTabbableRadio(node){return function isRadio(node){return isInput(node)&&"radio"===node.type}(node)&&!function isTabbableRadio(node){if(!node.name)return!0;var radioSet,radioScope=node.form||getRootNode(node),queryRadios=function queryRadios(name){return radioScope.querySelectorAll('input[type="radio"][name="'+name+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)radioSet=queryRadios(window.CSS.escape(node.name));else try{radioSet=queryRadios(node.name)}catch(err){return index_esm_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",err.message),!1}var checked=function getCheckedRadio(nodes,form){for(var i=0;i<nodes.length;i++)if(nodes[i].checked&&nodes[i].form===form)return nodes[i]}(radioSet,node.form);return!checked||checked===node}(node)},isZeroArea=function isZeroArea(node){var _node$getBoundingClie=node.getBoundingClientRect(),width=_node$getBoundingClie.width,height=_node$getBoundingClie.height;return 0===width&&0===height},isHidden=function isHidden(node,_ref){var displayCheck=_ref.displayCheck,getShadowRoot=_ref.getShadowRoot;if("hidden"===getComputedStyle(node).visibility)return!0;var nodeUnderDetails=matches.call(node,"details>summary:first-of-type")?node.parentElement:node;if(matches.call(nodeUnderDetails,"details:not([open]) *"))return!0;if(displayCheck&&"full"!==displayCheck&&"legacy-full"!==displayCheck){if("non-zero-area"===displayCheck)return isZeroArea(node)}else{if("function"==typeof getShadowRoot){for(var originalNode=node;node;){var parentElement=node.parentElement,rootNode=getRootNode(node);if(parentElement&&!parentElement.shadowRoot&&!0===getShadowRoot(parentElement))return isZeroArea(node);node=node.assignedSlot?node.assignedSlot:parentElement||rootNode===node.ownerDocument?parentElement:rootNode.host}node=originalNode}if(function isNodeAttached(node){var _nodeRoot,_nodeRootHost,_nodeRootHost$ownerDo,_node$ownerDocument,nodeRoot=node&&getRootNode(node),nodeRootHost=null===(_nodeRoot=nodeRoot)||void 0===_nodeRoot?void 0:_nodeRoot.host,attached=!1;if(nodeRoot&&nodeRoot!==node)for(attached=!!(null!==(_nodeRootHost=nodeRootHost)&&void 0!==_nodeRootHost&&null!==(_nodeRootHost$ownerDo=_nodeRootHost.ownerDocument)&&void 0!==_nodeRootHost$ownerDo&&_nodeRootHost$ownerDo.contains(nodeRootHost)||null!=node&&null!==(_node$ownerDocument=node.ownerDocument)&&void 0!==_node$ownerDocument&&_node$ownerDocument.contains(node));!attached&&nodeRootHost;){var _nodeRoot2,_nodeRootHost2,_nodeRootHost2$ownerD;attached=!(null===(_nodeRootHost2=nodeRootHost=null===(_nodeRoot2=nodeRoot=getRootNode(nodeRootHost))||void 0===_nodeRoot2?void 0:_nodeRoot2.host)||void 0===_nodeRootHost2||null===(_nodeRootHost2$ownerD=_nodeRootHost2.ownerDocument)||void 0===_nodeRootHost2$ownerD||!_nodeRootHost2$ownerD.contains(nodeRootHost))}return attached}(node))return!node.getClientRects().length;if("legacy-full"!==displayCheck)return!0}return!1},isNodeMatchingSelectorFocusable=function isNodeMatchingSelectorFocusable(options,node){return!(node.disabled||isInert(node)||function isHiddenInput(node){return isInput(node)&&"hidden"===node.type}(node)||isHidden(node,options)||function isDetailsWithSummary(node){return"DETAILS"===node.tagName&&Array.prototype.slice.apply(node.children).some((function(child){return"SUMMARY"===child.tagName}))}(node)||function isDisabledFromFieldset(node){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName))for(var parentNode=node.parentElement;parentNode;){if("FIELDSET"===parentNode.tagName&&parentNode.disabled){for(var i=0;i<parentNode.children.length;i++){var child=parentNode.children.item(i);if("LEGEND"===child.tagName)return!!matches.call(parentNode,"fieldset[disabled] *")||!child.contains(node)}return!0}parentNode=parentNode.parentElement}return!1}(node))},isNodeMatchingSelectorTabbable=function isNodeMatchingSelectorTabbable(options,node){return!(isNonTabbableRadio(node)||getTabIndex(node)<0||!isNodeMatchingSelectorFocusable(options,node))},isValidShadowRootTabbable=function isValidShadowRootTabbable(shadowHostNode){var tabIndex=parseInt(shadowHostNode.getAttribute("tabindex"),10);return!!(isNaN(tabIndex)||tabIndex>=0)},sortByOrder=function sortByOrder(candidates){var regularTabbables=[],orderedTabbables=[];return candidates.forEach((function(item,i){var isScope=!!item.scopeParent,element=isScope?item.scopeParent:item,candidateTabindex=function getSortOrderTabIndex(node,isScope){var tabIndex=getTabIndex(node);return tabIndex<0&&isScope&&!hasTabIndex(node)?0:tabIndex}(element,isScope),elements=isScope?sortByOrder(item.candidates):element;0===candidateTabindex?isScope?regularTabbables.push.apply(regularTabbables,elements):regularTabbables.push(element):orderedTabbables.push({documentOrder:i,tabIndex:candidateTabindex,item,isScope,content:elements})})),orderedTabbables.sort(sortOrderedTabbables).reduce((function(acc,sortable){return sortable.isScope?acc.push.apply(acc,sortable.content):acc.push(sortable.content),acc}),[]).concat(regularTabbables)},tabbable=function tabbable(container,options){var candidates;return candidates=(options=options||{}).getShadowRoot?getCandidatesIteratively([container],options.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,options),flatten:!1,getShadowRoot:options.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):getCandidates(container,options.includeContainer,isNodeMatchingSelectorTabbable.bind(null,options)),sortByOrder(candidates)},react_dom=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react-dom/index.js");function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}var index="undefined"!=typeof document?react.useLayoutEffect:react.useEffect;let serverHandoffComplete=!1,count=0;const genId=()=>"floating-ui-"+count++;const useId=react_namespaceObject["useId".toString()]||function useFloatingId(){const[id,setId]=react.useState((()=>serverHandoffComplete?genId():void 0));return index((()=>{null==id&&setId(genId())}),[]),react.useEffect((()=>{serverHandoffComplete||(serverHandoffComplete=!0)}),[]),id};function createPubSub(){const map=new Map;return{emit(event,data){var _map$get;null==(_map$get=map.get(event))||_map$get.forEach((handler=>handler(data)))},on(event,listener){map.set(event,[...map.get(event)||[],listener])},off(event,listener){var _map$get2;map.set(event,(null==(_map$get2=map.get(event))?void 0:_map$get2.filter((l=>l!==listener)))||[])}}}const FloatingNodeContext=react.createContext(null),FloatingTreeContext=react.createContext(null),useFloatingParentNodeId=()=>{var _React$useContext;return(null==(_React$useContext=react.useContext(FloatingNodeContext))?void 0:_React$useContext.id)||null},useFloatingTree=()=>react.useContext(FloatingTreeContext);function getDocument(node){return(null==node?void 0:node.ownerDocument)||document}function getPlatform(){const uaData=navigator.userAgentData;return null!=uaData&&uaData.platform?uaData.platform:navigator.platform}function getUserAgent(){const uaData=navigator.userAgentData;return uaData&&Array.isArray(uaData.brands)?uaData.brands.map((_ref=>{let{brand,version}=_ref;return brand+"/"+version})).join(" "):navigator.userAgent}function getWindow(value){return getDocument(value).defaultView||window}function isElement(value){return!!value&&value instanceof getWindow(value).Element}function isHTMLElement(value){return!!value&&value instanceof getWindow(value).HTMLElement}function isVirtualClick(event){if(0===event.mozInputSource&&event.isTrusted)return!0;const androidRe=/Android/i;return(androidRe.test(getPlatform())||androidRe.test(getUserAgent()))&&event.pointerType?"click"===event.type&&1===event.buttons:0===event.detail&&!event.pointerType}function isVirtualPointerEvent(event){return 0===event.width&&0===event.height||1===event.width&&1===event.height&&0===event.pressure&&0===event.detail&&"mouse"!==event.pointerType||event.width<1&&event.height<1&&0===event.pressure&&0===event.detail}function isSafari(){return/apple/i.test(navigator.vendor)}function isMouseLikePointerType(pointerType,strict){const values=["mouse","pen"];return strict||values.push("",void 0),values.includes(pointerType)}function contains(parent,child){if(!parent||!child)return!1;const rootNode=child.getRootNode&&child.getRootNode();if(parent.contains(child))return!0;if(rootNode&&function isShadowRoot(node){return"undefined"!=typeof ShadowRoot&&(node instanceof getWindow(node).ShadowRoot||node instanceof ShadowRoot)}(rootNode)){let next=child;for(;next;){if(parent===next)return!0;next=next.parentNode||next.host}}return!1}function useLatestRef(value){const ref=(0,react.useRef)(value);return index((()=>{ref.current=value})),ref}function getDelay(value,prop,pointerType){return pointerType&&!isMouseLikePointerType(pointerType)?0:"number"==typeof value?value:null==value?void 0:value[prop]}const useHover=function(context,props){void 0===props&&(props={});const{open,onOpenChange,dataRef,events,elements:{domReference,floating},refs}=context,{enabled=!0,delay=0,handleClose=null,mouseOnly=!1,restMs=0,move=!0}=props,tree=useFloatingTree(),parentId=useFloatingParentNodeId(),handleCloseRef=useLatestRef(handleClose),delayRef=useLatestRef(delay),pointerTypeRef=react.useRef(),timeoutRef=react.useRef(),handlerRef=react.useRef(),restTimeoutRef=react.useRef(),blockMouseMoveRef=react.useRef(!0),performedPointerEventsMutationRef=react.useRef(!1),unbindMouseMoveRef=react.useRef((()=>{})),isHoverOpen=react.useCallback((()=>{var _dataRef$current$open;const type=null==(_dataRef$current$open=dataRef.current.openEvent)?void 0:_dataRef$current$open.type;return(null==type?void 0:type.includes("mouse"))&&"mousedown"!==type}),[dataRef]);react.useEffect((()=>{if(enabled)return events.on("dismiss",onDismiss),()=>{events.off("dismiss",onDismiss)};function onDismiss(){clearTimeout(timeoutRef.current),clearTimeout(restTimeoutRef.current),blockMouseMoveRef.current=!0}}),[enabled,events]),react.useEffect((()=>{if(!enabled||!handleCloseRef.current||!open)return;function onLeave(){isHoverOpen()&&onOpenChange(!1)}const html=getDocument(floating).documentElement;return html.addEventListener("mouseleave",onLeave),()=>{html.removeEventListener("mouseleave",onLeave)}}),[floating,open,onOpenChange,enabled,handleCloseRef,dataRef,isHoverOpen]);const closeWithDelay=react.useCallback((function(runElseBranch){void 0===runElseBranch&&(runElseBranch=!0);const closeDelay=getDelay(delayRef.current,"close",pointerTypeRef.current);closeDelay&&!handlerRef.current?(clearTimeout(timeoutRef.current),timeoutRef.current=setTimeout((()=>onOpenChange(!1)),closeDelay)):runElseBranch&&(clearTimeout(timeoutRef.current),onOpenChange(!1))}),[delayRef,onOpenChange]),cleanupMouseMoveHandler=react.useCallback((()=>{unbindMouseMoveRef.current(),handlerRef.current=void 0}),[]),clearPointerEvents=react.useCallback((()=>{if(performedPointerEventsMutationRef.current){const body=getDocument(refs.floating.current).body;body.style.pointerEvents="",body.removeAttribute("data-floating-ui-safe-polygon"),performedPointerEventsMutationRef.current=!1}}),[refs]);return react.useEffect((()=>{if(enabled&&isElement(domReference)){const ref=domReference;return open&&ref.addEventListener("mouseleave",onScrollMouseLeave),null==floating||floating.addEventListener("mouseleave",onScrollMouseLeave),move&&ref.addEventListener("mousemove",onMouseEnter,{once:!0}),ref.addEventListener("mouseenter",onMouseEnter),ref.addEventListener("mouseleave",onMouseLeave),()=>{open&&ref.removeEventListener("mouseleave",onScrollMouseLeave),null==floating||floating.removeEventListener("mouseleave",onScrollMouseLeave),move&&ref.removeEventListener("mousemove",onMouseEnter),ref.removeEventListener("mouseenter",onMouseEnter),ref.removeEventListener("mouseleave",onMouseLeave)}}function isClickLikeOpenEvent(){return!!dataRef.current.openEvent&&["click","mousedown"].includes(dataRef.current.openEvent.type)}function onMouseEnter(event){if(clearTimeout(timeoutRef.current),blockMouseMoveRef.current=!1,mouseOnly&&!isMouseLikePointerType(pointerTypeRef.current)||restMs>0&&0===getDelay(delayRef.current,"open"))return;dataRef.current.openEvent=event;const openDelay=getDelay(delayRef.current,"open",pointerTypeRef.current);openDelay?timeoutRef.current=setTimeout((()=>{onOpenChange(!0)}),openDelay):onOpenChange(!0)}function onMouseLeave(event){if(isClickLikeOpenEvent())return;unbindMouseMoveRef.current();const doc=getDocument(floating);if(clearTimeout(restTimeoutRef.current),handleCloseRef.current){open||clearTimeout(timeoutRef.current),handlerRef.current=handleCloseRef.current({...context,tree,x:event.clientX,y:event.clientY,onClose(){clearPointerEvents(),cleanupMouseMoveHandler(),closeWithDelay()}});const handler=handlerRef.current;return doc.addEventListener("mousemove",handler),void(unbindMouseMoveRef.current=()=>{doc.removeEventListener("mousemove",handler)})}("touch"!==pointerTypeRef.current||!contains(floating,event.relatedTarget))&&closeWithDelay()}function onScrollMouseLeave(event){isClickLikeOpenEvent()||null==handleCloseRef.current||handleCloseRef.current({...context,tree,x:event.clientX,y:event.clientY,onClose(){clearPointerEvents(),cleanupMouseMoveHandler(),closeWithDelay()}})(event)}}),[domReference,floating,enabled,context,mouseOnly,restMs,move,closeWithDelay,cleanupMouseMoveHandler,clearPointerEvents,onOpenChange,open,tree,delayRef,handleCloseRef,dataRef]),index((()=>{var _handleCloseRef$curre;if(enabled&&open&&null!=(_handleCloseRef$curre=handleCloseRef.current)&&_handleCloseRef$curre.__options.blockPointerEvents&&isHoverOpen()){const body=getDocument(floating).body;if(body.setAttribute("data-floating-ui-safe-polygon",""),body.style.pointerEvents="none",performedPointerEventsMutationRef.current=!0,isElement(domReference)&&floating){var _tree$nodesRef$curren,_tree$nodesRef$curren2;const ref=domReference,parentFloating=null==tree||null==(_tree$nodesRef$curren=tree.nodesRef.current.find((node=>node.id===parentId)))||null==(_tree$nodesRef$curren2=_tree$nodesRef$curren.context)?void 0:_tree$nodesRef$curren2.elements.floating;return parentFloating&&(parentFloating.style.pointerEvents=""),ref.style.pointerEvents="auto",floating.style.pointerEvents="auto",()=>{ref.style.pointerEvents="",floating.style.pointerEvents=""}}}}),[enabled,open,parentId,floating,domReference,tree,handleCloseRef,dataRef,isHoverOpen]),index((()=>{open||(pointerTypeRef.current=void 0,cleanupMouseMoveHandler(),clearPointerEvents())}),[open,cleanupMouseMoveHandler,clearPointerEvents]),react.useEffect((()=>()=>{cleanupMouseMoveHandler(),clearTimeout(timeoutRef.current),clearTimeout(restTimeoutRef.current),clearPointerEvents()}),[enabled,cleanupMouseMoveHandler,clearPointerEvents]),react.useMemo((()=>{if(!enabled)return{};function setPointerRef(event){pointerTypeRef.current=event.pointerType}return{reference:{onPointerDown:setPointerRef,onPointerEnter:setPointerRef,onMouseMove(){open||0===restMs||(clearTimeout(restTimeoutRef.current),restTimeoutRef.current=setTimeout((()=>{blockMouseMoveRef.current||onOpenChange(!0)}),restMs))}},floating:{onMouseEnter(){clearTimeout(timeoutRef.current)},onMouseLeave(){events.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),closeWithDelay(!1)}}}}),[events,enabled,restMs,open,onOpenChange,closeWithDelay])};function activeElement(doc){let activeElement=doc.activeElement;for(;null!=(null==(_activeElement=activeElement)||null==(_activeElement$shadow=_activeElement.shadowRoot)?void 0:_activeElement$shadow.activeElement);){var _activeElement,_activeElement$shadow;activeElement=activeElement.shadowRoot.activeElement}return activeElement}let rafId=0;function enqueueFocus(el,options){void 0===options&&(options={});const{preventScroll=!1,cancelPrevious=!0,sync=!1}=options;cancelPrevious&&cancelAnimationFrame(rafId);const exec=()=>null==el?void 0:el.focus({preventScroll});sync?exec():rafId=requestAnimationFrame(exec)}function getChildren(nodes,id){let allChildren=nodes.filter((node=>{var _node$context;return node.parentId===id&&(null==(_node$context=node.context)?void 0:_node$context.open)})),currentChildren=allChildren;for(;currentChildren.length;)currentChildren=nodes.filter((node=>{var _currentChildren;return null==(_currentChildren=currentChildren)?void 0:_currentChildren.some((n=>{var _node$context2;return node.parentId===n.id&&(null==(_node$context2=node.context)?void 0:_node$context2.open)}))})),allChildren=allChildren.concat(currentChildren);return allChildren}function getTarget(event){return"composedPath"in event?event.composedPath()[0]:event.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(element){return isHTMLElement(element)&&element.matches(TYPEABLE_SELECTOR)}function stopEvent(event){event.preventDefault(),event.stopPropagation()}const getTabbableOptions=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function getTabbableIn(container,direction){const allTabbable=tabbable(container,getTabbableOptions());"prev"===direction&&allTabbable.reverse();const activeIndex=allTabbable.indexOf(activeElement(getDocument(container)));return allTabbable.slice(activeIndex+1)[0]}function getNextTabbable(){return getTabbableIn(document.body,"next")}function getPreviousTabbable(){return getTabbableIn(document.body,"prev")}function isOutsideEvent(event,container){const containerElement=container||event.currentTarget,relatedTarget=event.relatedTarget;return!relatedTarget||!contains(containerElement,relatedTarget)}function disableFocusInside(container){tabbable(container,getTabbableOptions()).forEach((element=>{element.dataset.tabindex=element.getAttribute("tabindex")||"",element.setAttribute("tabindex","-1")}))}function enableFocusInside(container){container.querySelectorAll("[data-tabindex]").forEach((element=>{const tabindex=element.dataset.tabindex;delete element.dataset.tabindex,tabindex?element.setAttribute("tabindex",tabindex):element.removeAttribute("tabindex")}))}const HIDDEN_STYLES={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function setActiveElementOnTab(event){"Tab"===event.key&&(event.target,clearTimeout(undefined))}const FocusGuard=react.forwardRef((function FocusGuard(props,ref){const[role,setRole]=react.useState();return index((()=>(isSafari()&&setRole("button"),document.addEventListener("keydown",setActiveElementOnTab),()=>{document.removeEventListener("keydown",setActiveElementOnTab)})),[]),react.createElement("span",_extends({},props,{ref,tabIndex:0,role,"aria-hidden":!role||void 0,"data-floating-ui-focus-guard":"",style:HIDDEN_STYLES}))})),PortalContext=react.createContext(null),FloatingPortal=_ref=>{let{children,id,root=null,preserveTabOrder=!0}=_ref;const portalNode=function(_temp){let{id,root}=void 0===_temp?{}:_temp;const[portalNode,setPortalNode]=react.useState(null),uniqueId=useId(),portalContext=usePortalContext(),data=react.useMemo((()=>({id,root,portalContext,uniqueId})),[id,root,portalContext,uniqueId]),dataRef=react.useRef();return index((()=>()=>{null==portalNode||portalNode.remove()}),[portalNode,data]),index((()=>{if(dataRef.current===data)return;dataRef.current=data;const{id,root,portalContext,uniqueId}=data,existingIdRoot=id?document.getElementById(id):null,attr="data-floating-ui-portal";if(existingIdRoot){const subRoot=document.createElement("div");subRoot.id=uniqueId,subRoot.setAttribute(attr,""),existingIdRoot.appendChild(subRoot),setPortalNode(subRoot)}else{let container=(null==portalContext?void 0:portalContext.portalNode)||root||document.body,idWrapper=null;id&&(idWrapper=document.createElement("div"),idWrapper.id=id,container.appendChild(idWrapper));const subRoot=document.createElement("div");subRoot.id=uniqueId,subRoot.setAttribute(attr,""),container=idWrapper||container,container.appendChild(subRoot),setPortalNode(subRoot)}}),[data]),portalNode}({id,root}),[focusManagerState,setFocusManagerState]=react.useState(null),beforeOutsideRef=react.useRef(null),afterOutsideRef=react.useRef(null),beforeInsideRef=react.useRef(null),afterInsideRef=react.useRef(null),shouldRenderGuards=!!focusManagerState&&!focusManagerState.modal&&focusManagerState.open&&preserveTabOrder&&!(!root&&!portalNode);return react.useEffect((()=>{if(portalNode&&preserveTabOrder&&(null==focusManagerState||!focusManagerState.modal))return portalNode.addEventListener("focusin",onFocus,!0),portalNode.addEventListener("focusout",onFocus,!0),()=>{portalNode.removeEventListener("focusin",onFocus,!0),portalNode.removeEventListener("focusout",onFocus,!0)};function onFocus(event){if(portalNode&&isOutsideEvent(event)){("focusin"===event.type?enableFocusInside:disableFocusInside)(portalNode)}}}),[portalNode,preserveTabOrder,null==focusManagerState?void 0:focusManagerState.modal]),react.createElement(PortalContext.Provider,{value:react.useMemo((()=>({preserveTabOrder,beforeOutsideRef,afterOutsideRef,beforeInsideRef,afterInsideRef,portalNode,setFocusManagerState})),[preserveTabOrder,portalNode])},shouldRenderGuards&&portalNode&&react.createElement(FocusGuard,{"data-type":"outside",ref:beforeOutsideRef,onFocus:event=>{if(isOutsideEvent(event,portalNode)){var _beforeInsideRef$curr;null==(_beforeInsideRef$curr=beforeInsideRef.current)||_beforeInsideRef$curr.focus()}else{const prevTabbable=getPreviousTabbable()||(null==focusManagerState?void 0:focusManagerState.refs.domReference.current);null==prevTabbable||prevTabbable.focus()}}}),shouldRenderGuards&&portalNode&&react.createElement("span",{"aria-owns":portalNode.id,style:HIDDEN_STYLES}),portalNode&&(0,react_dom.createPortal)(children,portalNode),shouldRenderGuards&&portalNode&&react.createElement(FocusGuard,{"data-type":"outside",ref:afterOutsideRef,onFocus:event=>{if(isOutsideEvent(event,portalNode)){var _afterInsideRef$curre;null==(_afterInsideRef$curre=afterInsideRef.current)||_afterInsideRef$curre.focus()}else{const nextTabbable=getNextTabbable()||(null==focusManagerState?void 0:focusManagerState.refs.domReference.current);null==nextTabbable||nextTabbable.focus(),(null==focusManagerState?void 0:focusManagerState.closeOnFocusOut)&&(null==focusManagerState||focusManagerState.onOpenChange(!1))}}}))},usePortalContext=()=>react.useContext(PortalContext),VisuallyHiddenDismiss=react.forwardRef((function VisuallyHiddenDismiss(props,ref){return react.createElement("button",_extends({},props,{type:"button",ref,tabIndex:-1,style:HIDDEN_STYLES}))}));function FloatingFocusManager(_ref){let{context,children,order=["content"],guards=!0,initialFocus=0,returnFocus=!0,modal=!0,visuallyHiddenDismiss=!1,closeOnFocusOut=!0}=_ref;const{open,refs,nodeId,onOpenChange,events,dataRef,elements:{domReference,floating}}=context,orderRef=useLatestRef(order),initialFocusRef=useLatestRef(initialFocus),returnFocusRef=useLatestRef(returnFocus),tree=useFloatingTree(),portalContext=usePortalContext(),[tabbableContentLength,setTabbableContentLength]=react.useState(null),ignoreInitialFocus="number"==typeof initialFocus&&initialFocus<0,startDismissButtonRef=react.useRef(null),endDismissButtonRef=react.useRef(null),preventReturnFocusRef=react.useRef(!1),previouslyFocusedElementRef=react.useRef(null),isPointerDownRef=react.useRef(!1),isInsidePortal=null!=portalContext,isTypeableCombobox=domReference&&"combobox"===domReference.getAttribute("role")&&isTypeableElement(domReference),getTabbableContent=react.useCallback((function(container){return void 0===container&&(container=floating),container?tabbable(container,getTabbableOptions()):[]}),[floating]),getTabbableElements=react.useCallback((container=>{const content=getTabbableContent(container);return orderRef.current.map((type=>domReference&&"reference"===type?domReference:floating&&"floating"===type?floating:content)).filter(Boolean).flat()}),[domReference,floating,orderRef,getTabbableContent]);react.useEffect((()=>{if(!modal)return;function onKeyDown(event){if("Tab"===event.key){0!==getTabbableContent().length||isTypeableCombobox||stopEvent(event);const els=getTabbableElements(),target=getTarget(event);"reference"===orderRef.current[0]&&target===domReference&&(stopEvent(event),event.shiftKey?enqueueFocus(els[els.length-1]):enqueueFocus(els[1])),"floating"===orderRef.current[1]&&target===floating&&event.shiftKey&&(stopEvent(event),enqueueFocus(els[0]))}}const doc=getDocument(floating);return doc.addEventListener("keydown",onKeyDown),()=>{doc.removeEventListener("keydown",onKeyDown)}}),[domReference,floating,modal,orderRef,refs,isTypeableCombobox,getTabbableContent,getTabbableElements]),react.useEffect((()=>{if(closeOnFocusOut)return floating&&isHTMLElement(domReference)?(domReference.addEventListener("focusout",handleFocusOutside),domReference.addEventListener("pointerdown",handlePointerDown),!modal&&floating.addEventListener("focusout",handleFocusOutside),()=>{domReference.removeEventListener("focusout",handleFocusOutside),domReference.removeEventListener("pointerdown",handlePointerDown),!modal&&floating.removeEventListener("focusout",handleFocusOutside)}):void 0;function handlePointerDown(){isPointerDownRef.current=!0,setTimeout((()=>{isPointerDownRef.current=!1}))}function handleFocusOutside(event){const relatedTarget=event.relatedTarget;queueMicrotask((()=>{const movedToUnrelatedNode=!(contains(domReference,relatedTarget)||contains(floating,relatedTarget)||contains(relatedTarget,floating)||contains(null==portalContext?void 0:portalContext.portalNode,relatedTarget)||null!=relatedTarget&&relatedTarget.hasAttribute("data-floating-ui-focus-guard")||tree&&(getChildren(tree.nodesRef.current,nodeId).find((node=>{var _node$context,_node$context2;return contains(null==(_node$context=node.context)?void 0:_node$context.elements.floating,relatedTarget)||contains(null==(_node$context2=node.context)?void 0:_node$context2.elements.domReference,relatedTarget)}))||function getAncestors(nodes,id){var _nodes$find;let allAncestors=[],currentParentId=null==(_nodes$find=nodes.find((node=>node.id===id)))?void 0:_nodes$find.parentId;for(;currentParentId;){const currentNode=nodes.find((node=>node.id===currentParentId));currentParentId=null==currentNode?void 0:currentNode.parentId,currentNode&&(allAncestors=allAncestors.concat(currentNode))}return allAncestors}(tree.nodesRef.current,nodeId).find((node=>{var _node$context3,_node$context4;return(null==(_node$context3=node.context)?void 0:_node$context3.elements.floating)===relatedTarget||(null==(_node$context4=node.context)?void 0:_node$context4.elements.domReference)===relatedTarget}))));relatedTarget&&movedToUnrelatedNode&&!isPointerDownRef.current&&relatedTarget!==previouslyFocusedElementRef.current&&(preventReturnFocusRef.current=!0,onOpenChange(!1))}))}}),[domReference,floating,modal,nodeId,tree,portalContext,onOpenChange,closeOnFocusOut]),react.useEffect((()=>{var _portalContext$portal;const portalNodes=Array.from((null==portalContext||null==(_portalContext$portal=portalContext.portalNode)?void 0:_portalContext$portal.querySelectorAll("[data-floating-ui-portal]"))||[]);if(floating&&modal){const insideNodes=[floating,...portalNodes,...function getDismissButtons(){return[startDismissButtonRef.current,endDismissButtonRef.current].filter(Boolean)}()],cleanup=hideOthers(orderRef.current.includes("reference")||isTypeableCombobox?insideNodes.concat(domReference||[]):insideNodes);return()=>{cleanup()}}}),[domReference,floating,modal,orderRef,portalContext,isTypeableCombobox]),react.useEffect((()=>{if(modal&&!guards&&floating){const tabIndexValues=[],options=getTabbableOptions(),allTabbable=tabbable(getDocument(floating).body,options),floatingTabbable=getTabbableElements(),elements=allTabbable.filter((el=>!floatingTabbable.includes(el)));return elements.forEach(((el,i)=>{tabIndexValues[i]=el.getAttribute("tabindex"),el.setAttribute("tabindex","-1")})),()=>{elements.forEach(((el,i)=>{const value=tabIndexValues[i];null==value?el.removeAttribute("tabindex"):el.setAttribute("tabindex",value)}))}}}),[floating,modal,guards,getTabbableElements]),index((()=>{if(!floating)return;const previouslyFocusedElement=activeElement(getDocument(floating));queueMicrotask((()=>{const focusableElements=getTabbableElements(floating),initialFocusValue=initialFocusRef.current,elToFocus=("number"==typeof initialFocusValue?focusableElements[initialFocusValue]:initialFocusValue.current)||floating,focusAlreadyInsideFloatingEl=contains(floating,previouslyFocusedElement);ignoreInitialFocus||focusAlreadyInsideFloatingEl||!open||enqueueFocus(elToFocus,{preventScroll:elToFocus===floating})}))}),[open,floating,ignoreInitialFocus,getTabbableElements,initialFocusRef]),index((()=>{if(!floating)return;let preventReturnFocusScroll=!1;const doc=getDocument(floating),previouslyFocusedElement=activeElement(doc),contextData=dataRef.current;function onDismiss(payload){if("escapeKey"===payload.type&&refs.domReference.current&&(previouslyFocusedElementRef.current=refs.domReference.current),["referencePress","escapeKey"].includes(payload.type))return;const returnFocus=payload.data.returnFocus;"object"==typeof returnFocus?(preventReturnFocusRef.current=!1,preventReturnFocusScroll=returnFocus.preventScroll):preventReturnFocusRef.current=!returnFocus}return previouslyFocusedElementRef.current=previouslyFocusedElement,events.on("dismiss",onDismiss),()=>{events.off("dismiss",onDismiss);const activeEl=activeElement(doc);(contains(floating,activeEl)||tree&&getChildren(tree.nodesRef.current,nodeId).some((node=>{var _node$context5;return contains(null==(_node$context5=node.context)?void 0:_node$context5.elements.floating,activeEl)}))||contextData.openEvent&&["click","mousedown"].includes(contextData.openEvent.type))&&refs.domReference.current&&(previouslyFocusedElementRef.current=refs.domReference.current),returnFocusRef.current&&isHTMLElement(previouslyFocusedElementRef.current)&&!preventReturnFocusRef.current&&enqueueFocus(previouslyFocusedElementRef.current,{cancelPrevious:!1,preventScroll:preventReturnFocusScroll})}}),[floating,returnFocusRef,dataRef,refs,events,tree,nodeId]),index((()=>{if(portalContext)return portalContext.setFocusManagerState({...context,modal,closeOnFocusOut,open}),()=>{portalContext.setFocusManagerState(null)}}),[portalContext,modal,open,closeOnFocusOut,context]),index((()=>{if(!ignoreInitialFocus&&floating&&(setState(),"function"==typeof MutationObserver)){const observer=new MutationObserver(setState);return observer.observe(floating,{childList:!0,subtree:!0}),()=>{observer.disconnect()}}function setState(){activeElement(getDocument(floating))!==refs.domReference.current&&setTabbableContentLength(getTabbableContent().length)}}),[floating,getTabbableContent,ignoreInitialFocus,refs]);const shouldRenderGuards=guards&&!isTypeableCombobox&&(isInsidePortal||modal);function renderDismissButton(location){return visuallyHiddenDismiss&&modal?react.createElement(VisuallyHiddenDismiss,{ref:"start"===location?startDismissButtonRef:endDismissButtonRef,onClick:()=>onOpenChange(!1)},"string"==typeof visuallyHiddenDismiss?visuallyHiddenDismiss:"Dismiss"):null}return react.createElement(react.Fragment,null,shouldRenderGuards&&react.createElement(FocusGuard,{"data-type":"inside",ref:null==portalContext?void 0:portalContext.beforeInsideRef,onFocus:event=>{if(modal){const els=getTabbableElements();enqueueFocus("reference"===order[0]?els[0]:els[els.length-1])}else if(null!=portalContext&&portalContext.preserveTabOrder&&portalContext.portalNode)if(preventReturnFocusRef.current=!1,isOutsideEvent(event,portalContext.portalNode)){const nextTabbable=getNextTabbable()||domReference;null==nextTabbable||nextTabbable.focus()}else{var _portalContext$before;null==(_portalContext$before=portalContext.beforeOutsideRef.current)||_portalContext$before.focus()}}}),isTypeableCombobox?null:renderDismissButton("start"),react.cloneElement(children,0===tabbableContentLength||order.includes("floating")?{tabIndex:0}:{}),renderDismissButton("end"),shouldRenderGuards&&react.createElement(FocusGuard,{"data-type":"inside",ref:null==portalContext?void 0:portalContext.afterInsideRef,onFocus:event=>{if(modal)enqueueFocus(getTabbableElements()[0]);else if(null!=portalContext&&portalContext.preserveTabOrder&&portalContext.portalNode)if(closeOnFocusOut&&(preventReturnFocusRef.current=!0),isOutsideEvent(event,portalContext.portalNode)){const prevTabbable=getPreviousTabbable()||domReference;null==prevTabbable||prevTabbable.focus()}else{var _portalContext$afterO;null==(_portalContext$afterO=portalContext.afterOutsideRef.current)||_portalContext$afterO.focus()}}}))}function isButtonTarget(event){return isHTMLElement(event.target)&&"BUTTON"===event.target.tagName}function isSpaceIgnored(element){return isTypeableElement(element)}const useClick=function(context,props){void 0===props&&(props={});const{open,onOpenChange,dataRef,elements:{domReference}}=context,{enabled=!0,event:eventOption="click",toggle=!0,ignoreMouse=!1,keyboardHandlers=!0}=props,pointerTypeRef=react.useRef(),didKeyDownRef=react.useRef(!1);return react.useMemo((()=>enabled?{reference:{onPointerDown(event){pointerTypeRef.current=event.pointerType},onMouseDown(event){0===event.button&&(isMouseLikePointerType(pointerTypeRef.current,!0)&&ignoreMouse||"click"!==eventOption&&(open?!toggle||dataRef.current.openEvent&&"mousedown"!==dataRef.current.openEvent.type||onOpenChange(!1):(event.preventDefault(),onOpenChange(!0)),dataRef.current.openEvent=event.nativeEvent))},onClick(event){"mousedown"===eventOption&&pointerTypeRef.current?pointerTypeRef.current=void 0:isMouseLikePointerType(pointerTypeRef.current,!0)&&ignoreMouse||(open?!toggle||dataRef.current.openEvent&&"click"!==dataRef.current.openEvent.type||onOpenChange(!1):onOpenChange(!0),dataRef.current.openEvent=event.nativeEvent)},onKeyDown(event){pointerTypeRef.current=void 0,keyboardHandlers&&!isButtonTarget(event)&&(" "!==event.key||isSpaceIgnored(domReference)||(event.preventDefault(),didKeyDownRef.current=!0),"Enter"===event.key&&(open?toggle&&onOpenChange(!1):onOpenChange(!0)))},onKeyUp(event){!keyboardHandlers||isButtonTarget(event)||isSpaceIgnored(domReference)||" "===event.key&&didKeyDownRef.current&&(didKeyDownRef.current=!1,open?toggle&&onOpenChange(!1):onOpenChange(!0))}}}:{}),[enabled,dataRef,eventOption,ignoreMouse,keyboardHandlers,domReference,toggle,open,onOpenChange])},useSafeInsertionEffect=react_namespaceObject["useInsertionEffect".toString()]||(fn=>fn());function useEvent(callback){const ref=react.useRef((()=>{0}));return useSafeInsertionEffect((()=>{ref.current=callback})),react.useCallback((function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return null==ref.current?void 0:ref.current(...args)}),[])}function isEventTargetWithin(event,node){if(null==node)return!1;if("composedPath"in event)return event.composedPath().includes(node);const e=event;return null!=e.target&&node.contains(e.target)}const bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},useDismiss=function(context,props){void 0===props&&(props={});const{open,onOpenChange,events,nodeId,elements:{reference,domReference,floating},dataRef}=context,{enabled=!0,escapeKey=!0,outsidePress:unstable_outsidePress=!0,outsidePressEvent="pointerdown",referencePress=!1,referencePressEvent="pointerdown",ancestorScroll=!1,bubbles}=props,tree=useFloatingTree(),nested=null!=useFloatingParentNodeId(),outsidePressFn=useEvent("function"==typeof unstable_outsidePress?unstable_outsidePress:()=>!1),outsidePress="function"==typeof unstable_outsidePress?outsidePressFn:unstable_outsidePress,insideReactTreeRef=react.useRef(!1),{escapeKeyBubbles,outsidePressBubbles}=(bubbles=>{var _bubbles$escapeKey,_bubbles$outsidePress;return{escapeKeyBubbles:"boolean"==typeof bubbles?bubbles:null!=(_bubbles$escapeKey=null==bubbles?void 0:bubbles.escapeKey)&&_bubbles$escapeKey,outsidePressBubbles:"boolean"==typeof bubbles?bubbles:null==(_bubbles$outsidePress=null==bubbles?void 0:bubbles.outsidePress)||_bubbles$outsidePress}})(bubbles),closeOnEscapeKeyDown=useEvent((event=>{if(!open||!enabled||!escapeKey||"Escape"!==event.key)return;const children=tree?getChildren(tree.nodesRef.current,nodeId):[];if(!escapeKeyBubbles&&(event.stopPropagation(),children.length>0)){let shouldDismiss=!0;if(children.forEach((child=>{var _child$context;null==(_child$context=child.context)||!_child$context.open||child.context.dataRef.current.__escapeKeyBubbles||(shouldDismiss=!1)})),!shouldDismiss)return}events.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),onOpenChange(!1)})),closeOnPressOutside=useEvent((event=>{const insideReactTree=insideReactTreeRef.current;if(insideReactTreeRef.current=!1,insideReactTree)return;if("function"==typeof outsidePress&&!outsidePress(event))return;const target=getTarget(event);if(isHTMLElement(target)&&floating){const canScrollX=target.clientWidth>0&&target.scrollWidth>target.clientWidth,canScrollY=target.clientHeight>0&&target.scrollHeight>target.clientHeight;let xCond=canScrollY&&event.offsetX>target.clientWidth;if(canScrollY){"rtl"===getWindow(floating).getComputedStyle(target).direction&&(xCond=event.offsetX<=target.offsetWidth-target.clientWidth)}if(xCond||canScrollX&&event.offsetY>target.clientHeight)return}const targetIsInsideChildren=tree&&getChildren(tree.nodesRef.current,nodeId).some((node=>{var _node$context;return isEventTargetWithin(event,null==(_node$context=node.context)?void 0:_node$context.elements.floating)}));if(isEventTargetWithin(event,floating)||isEventTargetWithin(event,domReference)||targetIsInsideChildren)return;const children=tree?getChildren(tree.nodesRef.current,nodeId):[];if(children.length>0){let shouldDismiss=!0;if(children.forEach((child=>{var _child$context2;null==(_child$context2=child.context)||!_child$context2.open||child.context.dataRef.current.__outsidePressBubbles||(shouldDismiss=!1)})),!shouldDismiss)return}events.emit("dismiss",{type:"outsidePress",data:{returnFocus:nested?{preventScroll:!0}:isVirtualClick(event)||isVirtualPointerEvent(event)}}),onOpenChange(!1)}));return react.useEffect((()=>{if(!open||!enabled)return;function onScroll(){onOpenChange(!1)}dataRef.current.__escapeKeyBubbles=escapeKeyBubbles,dataRef.current.__outsidePressBubbles=outsidePressBubbles;const doc=getDocument(floating);escapeKey&&doc.addEventListener("keydown",closeOnEscapeKeyDown),outsidePress&&doc.addEventListener(outsidePressEvent,closeOnPressOutside);let ancestors=[];return ancestorScroll&&(isElement(domReference)&&(ancestors=(0,floating_ui_utils_dom.Kx)(domReference)),isElement(floating)&&(ancestors=ancestors.concat((0,floating_ui_utils_dom.Kx)(floating))),!isElement(reference)&&reference&&reference.contextElement&&(ancestors=ancestors.concat((0,floating_ui_utils_dom.Kx)(reference.contextElement)))),ancestors=ancestors.filter((ancestor=>{var _doc$defaultView;return ancestor!==(null==(_doc$defaultView=doc.defaultView)?void 0:_doc$defaultView.visualViewport)})),ancestors.forEach((ancestor=>{ancestor.addEventListener("scroll",onScroll,{passive:!0})})),()=>{escapeKey&&doc.removeEventListener("keydown",closeOnEscapeKeyDown),outsidePress&&doc.removeEventListener(outsidePressEvent,closeOnPressOutside),ancestors.forEach((ancestor=>{ancestor.removeEventListener("scroll",onScroll)}))}}),[dataRef,floating,domReference,reference,escapeKey,outsidePress,outsidePressEvent,open,onOpenChange,ancestorScroll,enabled,escapeKeyBubbles,outsidePressBubbles,closeOnEscapeKeyDown,closeOnPressOutside]),react.useEffect((()=>{insideReactTreeRef.current=!1}),[outsidePress,outsidePressEvent]),react.useMemo((()=>enabled?{reference:{onKeyDown:closeOnEscapeKeyDown,[bubbleHandlerKeys[referencePressEvent]]:()=>{referencePress&&(events.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),onOpenChange(!1))}},floating:{onKeyDown:closeOnEscapeKeyDown,[captureHandlerKeys[outsidePressEvent]]:()=>{insideReactTreeRef.current=!0}}}:{}),[enabled,events,referencePress,outsidePressEvent,referencePressEvent,onOpenChange,closeOnEscapeKeyDown])},useFocus=function(context,props){void 0===props&&(props={});const{open,onOpenChange,dataRef,events,refs,elements:{floating,domReference}}=context,{enabled=!0,keyboardOnly=!0}=props,pointerTypeRef=react.useRef(""),blockFocusRef=react.useRef(!1),timeoutRef=react.useRef();return react.useEffect((()=>{if(!enabled)return;const win=getDocument(floating).defaultView||window;function onBlur(){!open&&isHTMLElement(domReference)&&domReference===activeElement(getDocument(domReference))&&(blockFocusRef.current=!0)}return win.addEventListener("blur",onBlur),()=>{win.removeEventListener("blur",onBlur)}}),[floating,domReference,open,enabled]),react.useEffect((()=>{if(enabled)return events.on("dismiss",onDismiss),()=>{events.off("dismiss",onDismiss)};function onDismiss(payload){"referencePress"!==payload.type&&"escapeKey"!==payload.type||(blockFocusRef.current=!0)}}),[events,enabled]),react.useEffect((()=>()=>{clearTimeout(timeoutRef.current)}),[]),react.useMemo((()=>enabled?{reference:{onPointerDown(_ref){let{pointerType}=_ref;pointerTypeRef.current=pointerType,blockFocusRef.current=!(!pointerType||!keyboardOnly)},onMouseLeave(){blockFocusRef.current=!1},onFocus(event){var _dataRef$current$open;blockFocusRef.current||"focus"===event.type&&"mousedown"===(null==(_dataRef$current$open=dataRef.current.openEvent)?void 0:_dataRef$current$open.type)&&dataRef.current.openEvent&&isEventTargetWithin(dataRef.current.openEvent,domReference)||(dataRef.current.openEvent=event.nativeEvent,onOpenChange(!0))},onBlur(event){blockFocusRef.current=!1;const relatedTarget=event.relatedTarget,movedToFocusGuard=isElement(relatedTarget)&&relatedTarget.hasAttribute("data-floating-ui-focus-guard")&&"outside"===relatedTarget.getAttribute("data-type");timeoutRef.current=setTimeout((()=>{contains(refs.floating.current,relatedTarget)||contains(domReference,relatedTarget)||movedToFocusGuard||onOpenChange(!1)}))}}}:{}),[enabled,keyboardOnly,domReference,refs,dataRef,onOpenChange])};const useRole=function(context,props){void 0===props&&(props={});const{open,floatingId}=context,{enabled=!0,role="dialog"}=props,referenceId=useId();return react.useMemo((()=>{const floatingProps={id:floatingId,role};return enabled?"tooltip"===role?{reference:{"aria-describedby":open?floatingId:void 0},floating:floatingProps}:{reference:{"aria-expanded":open?"true":"false","aria-haspopup":"alertdialog"===role?"dialog":role,"aria-controls":open?floatingId:void 0,..."listbox"===role&&{role:"combobox"},..."menu"===role&&{id:referenceId}},floating:{...floatingProps,..."menu"===role&&{"aria-labelledby":referenceId}}}:{}}),[enabled,role,open,floatingId,referenceId])};function useFloating(options){void 0===options&&(options={});const{open=!1,onOpenChange:unstable_onOpenChange,nodeId}=options,position=(0,floating_ui_react_dom_esm.YF)(options),tree=useFloatingTree(),domReferenceRef=react.useRef(null),dataRef=react.useRef({}),events=react.useState((()=>createPubSub()))[0],floatingId=useId(),[domReference,setDomReference]=react.useState(null),setPositionReference=react.useCallback((node=>{const positionReference=isElement(node)?{getBoundingClientRect:()=>node.getBoundingClientRect(),contextElement:node}:node;position.refs.setReference(positionReference)}),[position.refs]),setReference=react.useCallback((node=>{(isElement(node)||null===node)&&(domReferenceRef.current=node,setDomReference(node)),(isElement(position.refs.reference.current)||null===position.refs.reference.current||null!==node&&!isElement(node))&&position.refs.setReference(node)}),[position.refs]),refs=react.useMemo((()=>({...position.refs,setReference,setPositionReference,domReference:domReferenceRef})),[position.refs,setReference,setPositionReference]),elements=react.useMemo((()=>({...position.elements,domReference})),[position.elements,domReference]),onOpenChange=useEvent(unstable_onOpenChange),context=react.useMemo((()=>({...position,refs,elements,dataRef,nodeId,floatingId,events,open,onOpenChange})),[position,nodeId,floatingId,events,open,onOpenChange,refs,elements]);return index((()=>{const node=null==tree?void 0:tree.nodesRef.current.find((node=>node.id===nodeId));node&&(node.context=context)})),react.useMemo((()=>({...position,context,refs,elements,reference:setReference,positionReference:setPositionReference})),[position,refs,elements,context,setReference,setPositionReference])}function mergeProps(userProps,propsList,elementKey){const map=new Map;return{..."floating"===elementKey&&{tabIndex:-1},...userProps,...propsList.map((value=>value?value[elementKey]:null)).concat(userProps).reduce(((acc,props)=>props?(Object.entries(props).forEach((_ref=>{let[key,value]=_ref;var _map$get;0===key.indexOf("on")?(map.has(key)||map.set(key,[]),"function"==typeof value&&(null==(_map$get=map.get(key))||_map$get.push(value),acc[key]=function(){for(var _map$get2,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return null==(_map$get2=map.get(key))?void 0:_map$get2.map((fn=>fn(...args))).find((val=>void 0!==val))})):acc[key]=value})),acc):acc),{})}}const useInteractions=function(propsList){void 0===propsList&&(propsList=[]);const deps=propsList,getReferenceProps=react.useCallback((userProps=>mergeProps(userProps,propsList,"reference")),deps),getFloatingProps=react.useCallback((userProps=>mergeProps(userProps,propsList,"floating")),deps),getItemProps=react.useCallback((userProps=>mergeProps(userProps,propsList,"item")),propsList.map((key=>null==key?void 0:key.item)));return react.useMemo((()=>({getReferenceProps,getFloatingProps,getItemProps})),[getReferenceProps,getFloatingProps,getItemProps])}},"../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Fp:()=>max,GW:()=>floor,I4:()=>getAxisLength,JB:()=>rectToClientRect,KX:()=>getOppositeAxisPlacements,NM:()=>round,Qq:()=>getSideAxis,Rn:()=>getOppositeAxis,VV:()=>min,Wh:()=>getAlignmentAxis,gy:()=>getExpandedPlacements,hp:()=>getAlignment,i8:()=>getAlignmentSides,k3:()=>getSide,ku:()=>evaluate,pw:()=>getOppositePlacement,uZ:()=>clamp,yd:()=>getPaddingObject,ze:()=>createCoords});const min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(start,value,end){return max(start,min(value,end))}function evaluate(value,param){return"function"==typeof value?value(param):value}function getSide(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return"x"===axis?"y":"x"}function getAxisLength(axis){return"y"===axis?"height":"width"}function getSideAxis(placement){return["top","bottom"].includes(getSide(placement))?"y":"x"}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){void 0===rtl&&(rtl=!1);const alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis);let mainAlignmentSide="x"===alignmentAxis?alignment===(rtl?"end":"start")?"right":"left":"start"===alignment?"bottom":"top";return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,(alignment=>oppositeAlignmentMap[alignment]))}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){const alignment=getAlignment(placement);let list=function getSideList(side,isStart,rtl){const lr=["left","right"],rl=["right","left"],tb=["top","bottom"],bt=["bottom","top"];switch(side){case"top":case"bottom":return rtl?isStart?rl:lr:isStart?lr:rl;case"left":case"right":return isStart?tb:bt;default:return[]}}(getSide(placement),"start"===direction,rtl);return alignment&&(list=list.map((side=>side+"-"+alignment)),flipAlignment&&(list=list.concat(list.map(getOppositeAlignmentPlacement)))),list}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,(side=>oppositeSideMap[side]))}function getPaddingObject(padding){return"number"!=typeof padding?function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}(padding):{top:padding,right:padding,bottom:padding,left:padding}}function rectToClientRect(rect){return{...rect,top:rect.y,left:rect.x,right:rect.x+rect.width,bottom:rect.y+rect.height}}},"../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{function getNodeName(node){return isNode(node)?(node.nodeName||"").toLowerCase():"#document"}function getWindow(node){var _node$ownerDocument;return(null==node||null==(_node$ownerDocument=node.ownerDocument)?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node){var _ref;return null==(_ref=(isNode(node)?node.ownerDocument:node.document)||window.document)?void 0:_ref.documentElement}function isNode(value){return value instanceof Node||value instanceof getWindow(value).Node}function isElement(value){return value instanceof Element||value instanceof getWindow(value).Element}function isHTMLElement(value){return value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement}function isShadowRoot(value){return"undefined"!=typeof ShadowRoot&&(value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot)}function isOverflowElement(element){const{overflow,overflowX,overflowY,display}=getComputedStyle(element);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!["inline","contents"].includes(display)}function isTableElement(element){return["table","td","th"].includes(getNodeName(element))}function isContainingBlock(element){const webkit=isWebKit(),css=getComputedStyle(element);return"none"!==css.transform||"none"!==css.perspective||!!css.containerType&&"normal"!==css.containerType||!webkit&&!!css.backdropFilter&&"none"!==css.backdropFilter||!webkit&&!!css.filter&&"none"!==css.filter||["transform","perspective","filter"].some((value=>(css.willChange||"").includes(value)))||["paint","layout","strict","content"].some((value=>(css.contain||"").includes(value)))}function getContainingBlock(element){let currentNode=getParentNode(element);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(node){return["html","body","#document"].includes(getNodeName(node))}function getComputedStyle(element){return getWindow(element).getComputedStyle(element)}function getNodeScroll(element){return isElement(element)?{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}:{scrollLeft:element.pageXOffset,scrollTop:element.pageYOffset}}function getParentNode(node){if("html"===getNodeName(node))return node;const result=node.assignedSlot||node.parentNode||isShadowRoot(node)&&node.host||getDocumentElement(node);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node){const parentNode=getParentNode(node);return isLastTraversableNode(parentNode)?node.ownerDocument?node.ownerDocument.body:node.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node,list,traverseIframes){var _node$ownerDocument2;void 0===list&&(list=[]),void 0===traverseIframes&&(traverseIframes=!0);const scrollableAncestor=getNearestOverflowAncestor(node),isBody=scrollableAncestor===(null==(_node$ownerDocument2=node.ownerDocument)?void 0:_node$ownerDocument2.body),win=getWindow(scrollableAncestor);return isBody?list.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],win.frameElement&&traverseIframes?getOverflowAncestors(win.frameElement):[]):list.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}__webpack_require__.d(__webpack_exports__,{Dx:()=>getComputedStyle,Jj:()=>getWindow,Kx:()=>getOverflowAncestors,Lw:()=>getNodeScroll,Ow:()=>getParentNode,Pf:()=>isWebKit,Py:()=>isLastTraversableNode,Re:()=>isHTMLElement,Ze:()=>isTableElement,ao:()=>isOverflowElement,gQ:()=>getContainingBlock,hT:()=>isContainingBlock,kK:()=>isElement,tF:()=>getDocumentElement,wk:()=>getNodeName})}}]);