1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5179],{2335:(t,e,n)=>{n.d(e,{BN:()=>h,ER:()=>p,Ej:()=>g,UE:()=>w,UU:()=>m,cY:()=>d,jD:()=>y,we:()=>f});var r=n(85774),i=n(91356),o=n(86669),l="u">typeof document?i.useLayoutEffect:function(){};function s(t,e){let n,r,i;if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if((n=t.length)!==e.length)return!1;for(r=n;0!=r--;)if(!s(t[r],e[r]))return!1;return!0}if((n=(i=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!t.$$typeof)&&!s(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function a(t){return"u"<typeof window?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function u(t,e){let n=a(t);return Math.round(e*n)/n}function c(t){let e=i.useRef(t);return l(()=>{e.current=t}),e}function f(t){void 0===t&&(t={});let{placement:e="bottom",strategy:n="absolute",middleware:f=[],platform:d,elements:{reference:h,floating:p}={},transform:m=!0,whileElementsMounted:g,open:y}=t,[w,x]=i.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[v,b]=i.useState(f);s(v,f)||b(f);let[R,O]=i.useState(null),[A,E]=i.useState(null),S=i.useCallback(t=>{t!==P.current&&(P.current=t,O(t))},[]),C=i.useCallback(t=>{t!==T.current&&(T.current=t,E(t))},[]),L=h||R,M=p||A,P=i.useRef(null),T=i.useRef(null),j=i.useRef(w),D=null!=g,k=c(g),H=c(d),N=c(y),F=i.useCallback(()=>{if(!P.current||!T.current)return;let t={placement:e,strategy:n,middleware:v};H.current&&(t.platform=H.current),(0,r.rD)(P.current,T.current,t).then(t=>{let e={...t,isPositioned:!1!==N.current};U.current&&!s(j.current,e)&&(j.current=e,o.flushSync(()=>{x(e)}))})},[v,e,n,H,N]);l(()=>{!1===y&&j.current.isPositioned&&(j.current.isPositioned=!1,x(t=>({...t,isPositioned:!1})))},[y]);let U=i.useRef(!1);l(()=>(U.current=!0,()=>{U.current=!1}),[]),l(()=>{if(L&&(P.current=L),M&&(T.current=M),L&&M){if(k.current)return k.current(L,M,F);F()}},[L,M,F,k,D]);let B=i.useMemo(()=>({reference:P,floating:T,setReference:S,setFloating:C}),[S,C]),W=i.useMemo(()=>({reference:L,floating:M}),[L,M]),$=i.useMemo(()=>{let t={position:n,left:0,top:0};if(!W.floating)return t;let e=u(W.floating,w.x),r=u(W.floating,w.y);return m?{...t,transform:"translate("+e+"px, "+r+"px)",...a(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}},[n,m,W.floating,w.x,w.y]);return i.useMemo(()=>({...w,update:F,refs:B,elements:W,floatingStyles:$}),[w,F,B,W,$])}let d=(t,e)=>({...(0,r.cY)(t),options:[t,e]}),h=(t,e)=>({...(0,r.BN)(t),options:[t,e]}),p=(t,e)=>({...(0,r.ER)(t),options:[t,e]}),m=(t,e)=>({...(0,r.UU)(t),options:[t,e]}),g=(t,e)=>({...(0,r.Ej)(t),options:[t,e]}),y=(t,e)=>({...(0,r.jD)(t),options:[t,e]}),w=(t,e)=>({name:"arrow",options:t,fn(e){let{element:n,padding:i}="function"==typeof t?t(e):t;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.UE)({element:n.current,padding:i}).fn(e):{}:n?(0,r.UE)({element:n,padding:i}).fn(e):{}},options:[t,e]})},17745:(t,e,n)=>{n.d(e,{n:()=>c});var r=n(91356),i=n(67730),o=n(42811),l=n(17652),s=n(20838),a=class extends l.Q{#t;#e=void 0;#n;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,s.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,s.EN)(e.mutationKey)!==(0,s.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#o(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(t,e){return this.#r=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){let t=this.#n?.state??(0,i.$)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#o(t){o.jG.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#e.variables,n=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,n,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(t.data,null,e,n,r)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,n,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(void 0,t.error,e,n,r)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},u=n(39927);function c(t,e){let n=(0,u.jE)(e),[i]=r.useState(()=>new a(n,t));r.useEffect(()=>{i.setOptions(t)},[i,t]);let l=r.useSyncExternalStore(r.useCallback(t=>i.subscribe(o.jG.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=r.useCallback((t,e)=>{i.mutate(t,e).catch(s.lQ)},[i]);if(l.error&&(0,s.GU)(i.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}},17923:(t,e,n)=>{n.d(e,{Mz:()=>D,i3:()=>H,UC:()=>k,bL:()=>j,Bk:()=>g});var r=n(91356),i=n(2335),o=n(85774),l=n(83418),s=n(4208),a=r.forwardRef((t,e)=>{let{children:n,width:r=10,height:i=5,...o}=t;return(0,s.jsx)(l.sG.svg,{...o,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:(0,s.jsx)("polygon",{points:"0,0 30,0 15,10"})})});a.displayName="Arrow";var u=n(1709),c=n(65537),f=n(19832),d=n(84844),h=n(59220),p="Popper",[m,g]=(0,c.A)(p),[y,w]=m(p),x=t=>{let{__scopePopper:e,children:n}=t,[i,o]=r.useState(null);return(0,s.jsx)(y,{scope:e,anchor:i,onAnchorChange:o,children:n})};x.displayName=p;var v="PopperAnchor",b=r.forwardRef((t,e)=>{let{__scopePopper:n,virtualRef:i,...o}=t,a=w(v,n),c=r.useRef(null),f=(0,u.s)(e,c),d=r.useRef(null);return r.useEffect(()=>{let t=d.current;d.current=i?.current||c.current,t!==d.current&&a.onAnchorChange(d.current)}),i?null:(0,s.jsx)(l.sG.div,{...o,ref:f})});b.displayName=v;var R="PopperContent",[O,A]=m(R),E=r.forwardRef((t,e)=>{let{__scopePopper:n,side:a="bottom",sideOffset:c=0,align:p="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:x=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:A=!1,updatePositionStrategy:E="optimized",onPlaced:S,...C}=t,L=w(R,n),[j,D]=r.useState(null),k=(0,u.s)(e,t=>D(t)),[H,N]=r.useState(null),F=(0,h.X)(H),U=F?.width??0,B=F?.height??0,W="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},$=Array.isArray(x)?x:[x],z=$.length>0,V={padding:W,boundary:$.filter(M),altBoundary:z},{refs:Y,floatingStyles:_,placement:G,isPositioned:I,middlewareData:K}=(0,i.we)({strategy:"fixed",placement:a+("center"!==p?"-"+p:""),whileElementsMounted:(...t)=>(0,o.ll)(...t,{animationFrame:"always"===E}),elements:{reference:L.anchor},middleware:[(0,i.cY)({mainAxis:c+B,alignmentAxis:m}),y&&(0,i.BN)({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?(0,i.ER)():void 0,...V}),y&&(0,i.UU)({...V}),(0,i.Ej)({...V,apply:({elements:t,rects:e,availableWidth:n,availableHeight:r})=>{let{width:i,height:o}=e.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${i}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),H&&(0,i.UE)({element:H,padding:g}),P({arrowWidth:U,arrowHeight:B}),A&&(0,i.jD)({strategy:"referenceHidden",...V})]}),[X,q]=T(G),Q=(0,f.c)(S);(0,d.N)(()=>{I&&Q?.()},[I,Q]);let J=K.arrow?.x,Z=K.arrow?.y,tt=K.arrow?.centerOffset!==0,[te,tn]=r.useState();return(0,d.N)(()=>{j&&tn(window.getComputedStyle(j).zIndex)},[j]),(0,s.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:I?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,s.jsx)(O,{scope:n,placedSide:X,onArrowChange:N,arrowX:J,arrowY:Z,shouldHideArrow:tt,children:(0,s.jsx)(l.sG.div,{"data-side":X,"data-align":q,...C,ref:k,style:{...C.style,animation:I?void 0:"none"}})})})});E.displayName=R;var S="PopperArrow",C={top:"bottom",right:"left",bottom:"top",left:"right"},L=r.forwardRef(function(t,e){let{__scopePopper:n,...r}=t,i=A(S,n),o=C[i.placedSide];return(0,s.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,s.jsx)(a,{...r,ref:e,style:{...r.style,display:"block"}})})});function M(t){return null!==t}L.displayName=S;var P=t=>({name:"transformOrigin",options:t,fn(e){let{placement:n,rects:r,middlewareData:i}=e,o=i.arrow?.centerOffset!==0,l=o?0:t.arrowWidth,s=o?0:t.arrowHeight,[a,u]=T(n),c={start:"0%",center:"50%",end:"100%"}[u],f=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+s/2,h="",p="";return"bottom"===a?(h=o?c:`${f}px`,p=`${-s}px`):"top"===a?(h=o?c:`${f}px`,p=`${r.floating.height+s}px`):"right"===a?(h=`${-s}px`,p=o?c:`${d}px`):"left"===a&&(h=`${r.floating.width+s}px`,p=o?c:`${d}px`),{data:{x:h,y:p}}}});function T(t){let[e,n="center"]=t.split("-");return[e,n]}var j=x,D=b,k=E,H=L},59220:(t,e,n)=>{n.d(e,{X:()=>o});var r=n(91356),i=n(84844);function o(t){let[e,n]=r.useState(void 0);return(0,i.N)(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});let e=new ResizeObserver(e=>{let r,i;if(!Array.isArray(e)||!e.length)return;let o=e[0];if("borderBoxSize"in o){let t=o.borderBoxSize,e=Array.isArray(t)?t[0]:t;r=e.inlineSize,i=e.blockSize}else r=t.offsetWidth,i=t.offsetHeight;n({width:r,height:i})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)},[t]),e}},85774:(t,e,n)=>{n.d(e,{UE:()=>tS,ll:()=>tv,rD:()=>tL,UU:()=>tO,jD:()=>tE,ER:()=>tC,cY:()=>tb,BN:()=>tR,Ej:()=>tA});let r=["top","right","bottom","left"],i=Math.min,o=Math.max,l=Math.round,s=Math.floor,a=t=>({x:t,y:t}),u={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function f(t,e){return"function"==typeof t?t(e):t}function d(t){return t.split("-")[0]}function h(t){return t.split("-")[1]}function p(t){return"x"===t?"y":"x"}function m(t){return"y"===t?"height":"width"}let g=new Set(["top","bottom"]);function y(t){return g.has(d(t))?"y":"x"}function w(t){return t.replace(/start|end/g,t=>c[t])}let x=["left","right"],v=["right","left"],b=["top","bottom"],R=["bottom","top"];function O(t){return t.replace(/left|right|bottom|top/g,t=>u[t])}function A(t){return"number"!=typeof t?{top:0,right:0,bottom:0,left:0,...t}:{top:t,right:t,bottom:t,left:t}}function E(t){let{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function S(t,e,n){let r,{reference:i,floating:o}=t,l=y(e),s=p(y(e)),a=m(s),u=d(e),c="y"===l,f=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,w=i[a]/2-o[a]/2;switch(u){case"top":r={x:f,y:i.y-o.height};break;case"bottom":r={x:f,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:g};break;case"left":r={x:i.x-o.width,y:g};break;default:r={x:i.x,y:i.y}}switch(h(e)){case"start":r[s]-=w*(n&&c?-1:1);break;case"end":r[s]+=w*(n&&c?-1:1)}return r}async function C(t,e){var n;void 0===e&&(e={});let{x:r,y:i,platform:o,rects:l,elements:s,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=f(e,t),m=A(p),g=s[h?"floating"===d?"reference":"floating":d],y=E(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),w="floating"===d?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await (null==o.isElement?void 0:o.isElement(x))&&await (null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},b=E(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:a}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}let L=async(t,e,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,s=o.filter(Boolean),a=await (null==l.isRTL?void 0:l.isRTL(e)),u=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=S(u,r,a),d=r,h={},p=0;for(let n=0;n<s.length;n++){var m;let{name:o,fn:g}=s[n],{x:y,y:w,data:x,reset:v}=await g({x:c,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:u,platform:{...l,detectOverflow:null!=(m=l.detectOverflow)?m:C},elements:{reference:t,floating:e}});c=null!=y?y:c,f=null!=w?w:f,h={...h,[o]:{...h[o],...x}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(u=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:c,y:f}=S(u,d,a)),n=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:h}};function M(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function P(t){return r.some(e=>t[e]>=0)}let T=new Set(["left","top"]);async function j(t,e){let{placement:n,platform:r,elements:i}=t,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=d(n),s=h(n),a="y"===y(n),u=T.has(l)?-1:1,c=o&&a?-1:1,p=f(e,t),{mainAxis:m,crossAxis:g,alignmentAxis:w}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof w&&(g="end"===s?-1*w:w),a?{x:g*c,y:m*u}:{x:m*u,y:g*c}}function D(){return"u">typeof window}function k(t){return F(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(F(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function F(t){return!!D()&&(t instanceof Node||t instanceof H(t).Node)}function U(t){return!!D()&&(t instanceof Element||t instanceof H(t).Element)}function B(t){return!!D()&&(t instanceof HTMLElement||t instanceof H(t).HTMLElement)}function W(t){return!(!D()||"u"<typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof H(t).ShadowRoot)}let $=new Set(["inline","contents"]);function z(t){let{overflow:e,overflowX:n,overflowY:r,display:i}=Z(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!$.has(i)}let V=new Set(["table","td","th"]),Y=[":popover-open",":modal"];function _(t){return Y.some(e=>{try{return t.matches(e)}catch(t){return!1}})}let G=["transform","translate","scale","rotate","perspective"],I=["transform","translate","scale","rotate","perspective","filter"],K=["paint","layout","strict","content"];function X(t){let e=q(),n=U(t)?Z(t):t;return G.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||I.some(t=>(n.willChange||"").includes(t))||K.some(t=>(n.contain||"").includes(t))}function q(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Q=new Set(["html","body","#document"]);function J(t){return Q.has(k(t))}function Z(t){return H(t).getComputedStyle(t)}function tt(t){return U(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function te(t){if("html"===k(t))return t;let e=t.assignedSlot||t.parentNode||W(t)&&t.host||N(t);return W(e)?e.host:e}function tn(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);let i=function t(e){let n=te(e);return J(n)?e.ownerDocument?e.ownerDocument.body:e.body:B(n)&&z(n)?n:t(n)}(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),l=H(i);if(o){let t=tr(l);return e.concat(l,l.visualViewport||[],z(i)?i:[],t&&n?tn(t):[])}return e.concat(i,tn(i,[],n))}function tr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ti(t){let e=Z(t),n=parseFloat(e.width)||0,r=parseFloat(e.height)||0,i=B(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=l(n)!==o||l(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function to(t){return U(t)?t:t.contextElement}function tl(t){let e=to(t);if(!B(e))return a(1);let n=e.getBoundingClientRect(),{width:r,height:i,$:o}=ti(e),s=(o?l(n.width):n.width)/r,u=(o?l(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),u&&Number.isFinite(u)||(u=1),{x:s,y:u}}let ts=a(0);function ta(t){let e=H(t);return q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ts}function tu(t,e,n,r){var i;void 0===e&&(e=!1),void 0===n&&(n=!1);let o=t.getBoundingClientRect(),l=to(t),s=a(1);e&&(r?U(r)&&(s=tl(r)):s=tl(t));let u=(void 0===(i=n)&&(i=!1),r&&(!i||r===H(l))&&i)?ta(l):a(0),c=(o.left+u.x)/s.x,f=(o.top+u.y)/s.y,d=o.width/s.x,h=o.height/s.y;if(l){let t=H(l),e=r&&U(r)?H(r):r,n=t,i=tr(n);for(;i&&r&&e!==n;){let t=tl(i),e=i.getBoundingClientRect(),r=Z(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;c*=t.x,f*=t.y,d*=t.x,h*=t.y,c+=o,f+=l,i=tr(n=H(i))}}return E({width:d,height:h,x:c,y:f})}function tc(t,e){let n=tt(t).scrollLeft;return e?e.left+n:tu(N(t)).left+n}function tf(t,e){let n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-tc(t,n),y:n.top+e.scrollTop}}let td=new Set(["absolute","fixed"]);function th(t,e,n){var r;let i;if("viewport"===e)i=function(t,e){let n=H(t),r=N(t),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,s=0,a=0;if(i){o=i.width,l=i.height;let t=q();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,a=i.offsetTop)}let u=tc(r);if(u<=0){let t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-e.clientWidth-i);l<=25&&(o-=l)}else u<=25&&(o+=u);return{width:o,height:l,x:s,y:a}}(t,n);else if("document"===e){let e,n,l,s,a,u,c;r=N(t),e=N(r),n=tt(r),l=r.ownerDocument.body,s=o(e.scrollWidth,e.clientWidth,l.scrollWidth,l.clientWidth),a=o(e.scrollHeight,e.clientHeight,l.scrollHeight,l.clientHeight),u=-n.scrollLeft+tc(r),c=-n.scrollTop,"rtl"===Z(l).direction&&(u+=o(e.clientWidth,l.clientWidth)-s),i={width:s,height:a,x:u,y:c}}else if(U(e)){let t,r,o,l,s,u;r=(t=tu(e,!0,"fixed"===n)).top+e.clientTop,o=t.left+e.clientLeft,l=B(e)?tl(e):a(1),s=e.clientWidth*l.x,u=e.clientHeight*l.y,i={width:s,height:u,x:o*l.x,y:r*l.y}}else{let n=ta(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return E(i)}function tp(t){return"static"===Z(t).position}function tm(t,e){if(!B(t)||"fixed"===Z(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function tg(t,e){var n;let r=H(t);if(_(t))return r;if(!B(t)){let e=te(t);for(;e&&!J(e);){if(U(e)&&!tp(e))return e;e=te(e)}return r}let i=tm(t,e);for(;i&&(n=i,V.has(k(n)))&&tp(i);)i=tm(i,e);return i&&J(i)&&tp(i)&&!X(i)?r:i||function(t){let e=te(t);for(;B(e)&&!J(e);){if(X(e))return e;if(_(e))break;e=te(e)}return null}(t)||r}let ty=async function(t){let e=this.getOffsetParent||tg,n=this.getDimensions,r=await n(t.floating);return{reference:function(t,e,n){let r=B(e),i=N(e),o="fixed"===n,l=tu(t,!0,o,e),s={scrollLeft:0,scrollTop:0},u=a(0);if(r||!r&&!o)if(("body"!==k(e)||z(i))&&(s=tt(e)),r){let t=tu(e,!0,o,e);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else i&&(u.x=tc(i));o&&!r&&i&&(u.x=tc(i));let c=!i||r||o?a(0):tf(i,s);return{x:l.left+s.scrollLeft-u.x-c.x,y:l.top+s.scrollTop-u.y-c.y,width:l.width,height:l.height}}(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},tw={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t,o="fixed"===i,l=N(r),s=!!e&&_(e.floating);if(r===l||s&&o)return n;let u={scrollLeft:0,scrollTop:0},c=a(1),f=a(0),d=B(r);if((d||!d&&!o)&&(("body"!==k(r)||z(l))&&(u=tt(r)),B(r))){let t=tu(r);c=tl(r),f.x=t.x+r.clientLeft,f.y=t.y+r.clientTop}let h=!l||d||o?a(0):tf(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+h.x,y:n.y*c.y-u.scrollTop*c.y+f.y+h.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t,s=[..."clippingAncestors"===n?_(e)?[]:function(t,e){let n=e.get(t);if(n)return n;let r=tn(t,[],!1).filter(t=>U(t)&&"body"!==k(t)),i=null,o="fixed"===Z(t).position,l=o?te(t):t;for(;U(l)&&!J(l);){let e=Z(l),n=X(l);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&!!i&&td.has(i.position)||z(l)&&!n&&function t(e,n){let r=te(e);return!(r===n||!U(r)||J(r))&&("fixed"===Z(r).position||t(r,n))}(t,l))?r=r.filter(t=>t!==l):i=e,l=te(l)}return e.set(t,r),r}(e,this._c):[].concat(n),r],a=s[0],u=s.reduce((t,n)=>{let r=th(e,n,l);return t.top=o(r.top,t.top),t.right=i(r.right,t.right),t.bottom=i(r.bottom,t.bottom),t.left=o(r.left,t.left),t},th(e,a,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:tg,getElementRects:ty,getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){let{width:e,height:n}=ti(t);return{width:e,height:n}},getScale:tl,isElement:U,isRTL:function(t){return"rtl"===Z(t).direction}};function tx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tv(t,e,n,r){let l;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,h=to(t),p=a||u?[...h?tn(h):[],...tn(e)]:[];p.forEach(t=>{a&&t.addEventListener("scroll",n,{passive:!0}),u&&t.addEventListener("resize",n)});let m=h&&f?function(t,e){let n,r=null,l=N(t);function a(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return!function u(c,f){void 0===c&&(c=!1),void 0===f&&(f=1),a();let d=t.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=d;if(c||e(),!m||!g)return;let y={rootMargin:-s(p)+"px "+-s(l.clientWidth-(h+m))+"px "+-s(l.clientHeight-(p+g))+"px "+-s(h)+"px",threshold:o(0,i(1,f))||1},w=!0;function x(e){let r=e[0].intersectionRatio;if(r!==f){if(!w)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||tx(d,t.getBoundingClientRect())||u(),w=!1}try{r=new IntersectionObserver(x,{...y,root:l.ownerDocument})}catch(t){r=new IntersectionObserver(x,y)}r.observe(t)}(!0),a}(h,n):null,g=-1,y=null;c&&(y=new ResizeObserver(t=>{let[r]=t;r&&r.target===h&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),h&&!d&&y.observe(h),y.observe(e));let w=d?tu(t):null;return d&&function e(){let r=tu(t);w&&!tx(w,r)&&n(),w=r,l=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach(t=>{a&&t.removeEventListener("scroll",n),u&&t.removeEventListener("resize",n)}),null==m||m(),null==(t=y)||t.disconnect(),y=null,d&&cancelAnimationFrame(l)}}let tb=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;let{x:i,y:o,placement:l,middlewareData:s}=e,a=await j(e,t);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:l}}}}},tR=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:r,placement:l,platform:s}=e,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...h}=f(t,e),m={x:n,y:r},g=await s.detectOverflow(e,h),w=y(d(l)),x=p(w),v=m[x],b=m[w];if(a){let t="y"===x?"top":"left",e="y"===x?"bottom":"right",n=v+g[t],r=v-g[e];v=o(n,i(v,r))}if(u){let t="y"===w?"top":"left",e="y"===w?"bottom":"right",n=b+g[t],r=b-g[e];b=o(n,i(b,r))}let R=c.fn({...e,[x]:v,[w]:b});return{...R,data:{x:R.x-n,y:R.y-r,enabled:{[x]:a,[w]:u}}}}}},tO=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r,i,o,l,s,a,u;let c,g,A,{placement:E,middlewareData:S,rects:C,initialPlacement:L,platform:M,elements:P}=e,{mainAxis:T=!0,crossAxis:j=!0,fallbackPlacements:D,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:H="none",flipAlignment:N=!0,...F}=f(t,e);if(null!=(n=S.arrow)&&n.alignmentOffset)return{};let U=d(E),B=y(L),W=d(L)===L,$=await (null==M.isRTL?void 0:M.isRTL(P.floating)),z=D||(W||!N?[O(L)]:(c=O(L),[w(L),c,w(c)])),V="none"!==H;!D&&V&&z.push(...(g=h(L),A=function(t,e,n){switch(t){case"top":case"bottom":if(n)return e?v:x;return e?x:v;case"left":case"right":return e?b:R;default:return[]}}(d(L),"start"===H,$),g&&(A=A.map(t=>t+"-"+g),N&&(A=A.concat(A.map(w)))),A));let Y=[L,...z],_=await M.detectOverflow(e,F),G=[],I=(null==(r=S.flip)?void 0:r.overflows)||[];if(T&&G.push(_[U]),j){let t,e,n,r,i=(s=E,a=C,void 0===(u=$)&&(u=!1),t=h(s),n=m(e=p(y(s))),r="x"===e?t===(u?"end":"start")?"right":"left":"start"===t?"bottom":"top",a.reference[n]>a.floating[n]&&(r=O(r)),[r,O(r)]);G.push(_[i[0]],_[i[1]])}if(I=[...I,{placement:E,overflows:G}],!G.every(t=>t<=0)){let t=((null==(i=S.flip)?void 0:i.index)||0)+1,e=Y[t];if(e&&("alignment"!==j||B===y(e)||I.every(t=>y(t.placement)!==B||t.overflows[0]>0)))return{data:{index:t,overflows:I},reset:{placement:e}};let n=null==(o=I.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:o.placement;if(!n)switch(k){case"bestFit":{let t=null==(l=I.filter(t=>{if(V){let e=y(t.placement);return e===B||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:l[0];t&&(n=t);break}case"initialPlacement":n=L}if(E!==n)return{reset:{placement:n}}}return{}}}},tA=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;let l,s,{placement:a,rects:u,platform:c,elements:p}=e,{apply:m=()=>{},...g}=f(t,e),w=await c.detectOverflow(e,g),x=d(a),v=h(a),b="y"===y(a),{width:R,height:O}=u.floating;"top"===x||"bottom"===x?(l=x,s=v===(await (null==c.isRTL?void 0:c.isRTL(p.floating))?"start":"end")?"left":"right"):(s=x,l="end"===v?"top":"bottom");let A=O-w.top-w.bottom,E=R-w.left-w.right,S=i(O-w[l],A),C=i(R-w[s],E),L=!e.middlewareData.shift,M=S,P=C;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(P=E),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(M=A),L&&!v){let t=o(w.left,0),e=o(w.right,0),n=o(w.top,0),r=o(w.bottom,0);b?P=R-2*(0!==t||0!==e?t+e:o(w.left,w.right)):M=O-2*(0!==n||0!==r?n+r:o(w.top,w.bottom))}await m({...e,availableWidth:P,availableHeight:M});let T=await c.getDimensions(p.floating);return R!==T.width||O!==T.height?{reset:{rects:!0}}:{}}}},tE=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:r}=e,{strategy:i="referenceHidden",...o}=f(t,e);switch(i){case"referenceHidden":{let t=M(await r.detectOverflow(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{let t=M(await r.detectOverflow(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}},tS=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:r,placement:l,rects:s,platform:a,elements:u,middlewareData:c}=e,{element:d,padding:g=0}=f(t,e)||{};if(null==d)return{};let w=A(g),x={x:n,y:r},v=p(y(l)),b=m(v),R=await a.getDimensions(d),O="y"===v,E=O?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[v]-x[v]-s.floating[b],C=x[v]-s.reference[v],L=await (null==a.getOffsetParent?void 0:a.getOffsetParent(d)),M=L?L[E]:0;M&&await (null==a.isElement?void 0:a.isElement(L))||(M=u.floating[E]||s.floating[b]);let P=M/2-R[b]/2-1,T=i(w[O?"top":"left"],P),j=i(w[O?"bottom":"right"],P),D=M-R[b]-j,k=M/2-R[b]/2+(S/2-C/2),H=o(T,i(k,D)),N=!c.arrow&&null!=h(l)&&k!==H&&s.reference[b]/2-(k<T?T:j)-R[b]/2<0,F=N?k<T?k-T:k-D:0;return{[v]:x[v]+F,data:{[v]:H,centerOffset:k-H-F,...N&&{alignmentOffset:F}},reset:N}}}),tC=function(t){return void 0===t&&(t={}),{options:t,fn(e){let{x:n,y:r,placement:i,rects:o,middlewareData:l}=e,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=f(t,e),c={x:n,y:r},h=y(i),m=p(h),g=c[m],w=c[h],x=f(s,e),v="number"==typeof x?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(a){let t="y"===m?"height":"width",e=o.reference[m]-o.floating[t]+v.mainAxis,n=o.reference[m]+o.reference[t]-v.mainAxis;g<e?g=e:g>n&&(g=n)}if(u){var b,R;let t="y"===m?"width":"height",e=T.has(d(i)),n=o.reference[h]-o.floating[t]+(e&&(null==(b=l.offset)?void 0:b[h])||0)+(e?0:v.crossAxis),r=o.reference[h]+o.reference[t]+(e?0:(null==(R=l.offset)?void 0:R[h])||0)-(e?v.crossAxis:0);w<n?w=n:w>r&&(w=r)}return{[m]:g,[h]:w}}}},tL=(t,e,n)=>{let r=new Map,i={platform:tw,...n},o={...i.platform,_c:r};return L(t,e,{...i,platform:o})}}}]); |