flyonui
Version:
The easiest, free and open-source Tailwind CSS component library with semantic classes.
16 lines • 33.4 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,()=>(()=>{"use strict";var t={287:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}createCollection(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})}fireEvent(t,e=null){if(this.events.hasOwnProperty(t))return this.events[t](e)}on(t,e){this.events[t]=e}}},487:function(t,e,n){
/*
* HSTooltip
* @version: 3.2.2
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(949),r=n(806),s=o(n(287)),l=n(917);class a extends s.default{constructor(t,e,n){super(t,e,n),this.cleanupAutoUpdate=null,this.el&&(this.toggle=this.el.querySelector(".tooltip-toggle")||this.el,this.content=this.el.querySelector(".tooltip-content"),this.eventMode=(0,r.getClassProperty)(this.el,"--trigger")||"hover",this.preventFloatingUI=(0,r.getClassProperty)(this.el,"--prevent-popper","false"),this.placement=(0,r.getClassProperty)(this.el,"--placement"),this.strategy=(0,r.getClassProperty)(this.el,"--strategy"),this.scope=(0,r.getClassProperty)(this.el,"--scope")||"parent"),this.el&&this.toggle&&this.content&&this.init()}toggleClick(){this.click()}toggleMouseEnter(){this.enter()}toggleMouseLeave(){this.leave()}toggleHandle(){this.hide(),this.toggle.removeEventListener("click",this.onToggleHandleListener,!0),this.toggle.removeEventListener("blur",this.onToggleHandleListener,!0)}init(){this.createCollection(window.$hsTooltipCollection,this),this.onToggleFocusListener=()=>this.enter(),this.onToggleBlurListener=()=>this.hide(),this.toggle.addEventListener("focus",this.onToggleFocusListener),this.toggle.addEventListener("blur",this.onToggleBlurListener),"click"===this.eventMode?(this.onToggleClickListener=()=>this.toggleClick(),this.toggle.addEventListener("click",this.onToggleClickListener)):"hover"===this.eventMode&&(this.onToggleMouseEnterListener=()=>this.toggleMouseEnter(),this.onToggleMouseLeaveListener=()=>this.toggleMouseLeave(),this.toggle.addEventListener("mouseenter",this.onToggleMouseEnterListener),this.toggle.addEventListener("mouseleave",this.onToggleMouseLeaveListener)),"false"===this.preventFloatingUI&&this.buildFloatingUI()}enter(){this._show()}leave(){this.hide()}click(){this.el.classList.contains("show")?this.hide():(this._show(),this.onToggleHandleListener=()=>{setTimeout(()=>this.toggleHandle())},this.toggle.addEventListener("click",this.onToggleHandleListener,!0),this.toggle.addEventListener("blur",this.onToggleHandleListener,!0))}buildFloatingUI(){var t;"window"===this.scope&&document.body.appendChild(this.content);const e=null!==(t=l.POSITIONS[this.placement])&&void 0!==t?t:"top",n=new Set(["top","top-start","top-end","bottom","bottom-start","bottom-end"]).has(e),o="false"===this.preventFloatingUI,r=o&&n,s=o,a=[(0,i.offset)(0),...r?[(0,i.shift)()]:[],...s?[(0,i.flip)()]:[]];(0,i.computePosition)(this.toggle,this.content,{placement:l.POSITIONS[this.placement]||"top",strategy:this.strategy||"fixed",middleware:a}).then(({x:t,y:e})=>{Object.assign(this.content.style,{position:this.strategy||"fixed",left:`${t}px`,top:`${e}px`})}),this.cleanupAutoUpdate=(0,i.autoUpdate)(this.toggle,this.content,()=>{(0,i.computePosition)(this.toggle,this.content,{placement:l.POSITIONS[this.placement]||"top",strategy:this.strategy||"fixed",middleware:a}).then(({x:t,y:e})=>{Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})})})}_show(){this.content.classList.remove("hidden"),"window"===this.scope&&this.content.classList.add("show"),"false"!==this.preventFloatingUI||this.cleanupAutoUpdate||this.buildFloatingUI(),setTimeout(()=>{this.el.classList.add("show"),this.fireEvent("show",this.el),(0,r.dispatch)("show.tooltip",this.el,this.el)})}show(){"click"===this.eventMode?this.click():this.enter(),this.toggle.focus(),this.toggle.style.outline="none"}hide(){this.el.classList.remove("show"),"window"===this.scope&&this.content.classList.remove("show"),"false"===this.preventFloatingUI&&this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this.fireEvent("hide",this.el),(0,r.dispatch)("hide.tooltip",this.el,this.el),(0,r.afterTransition)(this.content,()=>{if(this.el.classList.contains("show"))return!1;this.content.classList.add("hidden"),this.toggle.style.outline=""})}destroy(){this.el.classList.remove("show"),this.content.classList.add("hidden"),this.toggle.removeEventListener("focus",this.onToggleFocusListener),this.toggle.removeEventListener("blur",this.onToggleBlurListener),"click"===this.eventMode?this.toggle.removeEventListener("click",this.onToggleClickListener):"hover"===this.eventMode&&(this.toggle.removeEventListener("mouseenter",this.onToggleMouseEnterListener),this.toggle.removeEventListener("mouseleave",this.onToggleMouseLeaveListener)),this.toggle.removeEventListener("click",this.onToggleHandleListener,!0),this.toggle.removeEventListener("blur",this.onToggleHandleListener,!0),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),window.$hsTooltipCollection=window.$hsTooltipCollection.filter(({element:t})=>t.el!==this.el)}static findInCollection(t){return window.$hsTooltipCollection.find(e=>t instanceof a?e.element.el===t.el:"string"==typeof t?e.element.el===document.querySelector(t):e.element.el===t)||null}static getInstance(t,e=!1){const n=window.$hsTooltipCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return n?e?n:n.element.el:null}static autoInit(){window.$hsTooltipCollection||(window.$hsTooltipCollection=[]),window.$hsTooltipCollection&&(window.$hsTooltipCollection=window.$hsTooltipCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll(".tooltip:not(.--prevent-on-load-init)").forEach(t=>{window.$hsTooltipCollection.find(e=>{var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t})||new a(t)})}static show(t){const e=a.findInCollection(t);e&&e.element.show()}static hide(t){const e=a.findInCollection(t);e&&e.element.hide()}static on(t,e,n){const o=a.findInCollection(e);o&&(o.element.events[t]=n)}}window.addEventListener("load",()=>{a.autoInit()}),"undefined"!=typeof window&&(window.HSTooltip=a),e.default=a},806:function(t,e){
/*
* @version: 3.2.2
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
Object.defineProperty(e,"__esModule",{value:!0}),e.stringToBoolean=e.menuSearchHistory=e.isScrollable=e.isParentOrElementHidden=e.isJson=e.isIpadOS=e.isIOS=e.isFormElement=e.isFocused=e.isEnoughSpace=e.isDirectChild=e.htmlToElement=e.getZIndex=e.getHighestZIndex=e.getClassPropertyAlt=e.getClassProperty=e.dispatch=e.debounce=e.classToClassList=e.afterTransition=void 0;e.stringToBoolean=t=>"true"===t;e.getClassProperty=(t,e,n="")=>(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","");e.getClassPropertyAlt=(t,e,n="")=>{let o="";return t.classList.forEach(t=>{t.includes(e)&&(o=t)}),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};const n=t=>window.getComputedStyle(t).getPropertyValue("z-index");e.getZIndex=n;e.getHighestZIndex=t=>{let e=Number.NEGATIVE_INFINITY;return t.forEach(t=>{let o=n(t);"auto"!==o&&(o=parseInt(o,10),o>e&&(e=o))}),e};e.isDirectChild=(t,e)=>{const n=t.children;for(let t=0;t<n.length;t++)if(n[t]===e)return!0;return!1};e.isEnoughSpace=(t,e,n="auto",o=10,i=null)=>{const r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,f=t.clientHeight+o;return"bottom"===n?c>=f:"top"===n?a>=f:a>=f||c>=f};e.isFocused=t=>document.activeElement===t;e.isFormElement=t=>t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement;e.isIOS=()=>!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform);e.isIpadOS=()=>navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform);e.isJson=t=>{if("string"!=typeof t)return!1;const e=t.trim()[0],n=t.trim().slice(-1);if("{"===e&&"}"===n||"["===e&&"]"===n)try{return JSON.parse(t),!0}catch(t){return!1}return!1};const o=t=>{if(!t)return!1;return"none"===window.getComputedStyle(t).display||o(t.parentElement)};e.isParentOrElementHidden=o;e.isScrollable=t=>{const e=window.getComputedStyle(t),n=e.overflowY,o=e.overflowX,i=("scroll"===n||"auto"===n)&&t.scrollHeight>t.clientHeight,r=("scroll"===o||"auto"===o)&&t.scrollWidth>t.clientWidth;return i||r};e.debounce=(t,e=200)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{t.apply(this,o)},e)}};e.dispatch=(t,e,n=null)=>{const o=new CustomEvent(t,{detail:{payload:n},bubbles:!0,cancelable:!0,composed:!1});e.dispatchEvent(o)};e.afterTransition=(t,e)=>{const n=()=>{e(),t.removeEventListener("transitionend",n,!0)},o=window.getComputedStyle(t),i=o.getPropertyValue("transition-duration");"none"!==o.getPropertyValue("transition-property")&&parseFloat(i)>0?t.addEventListener("transitionend",n,!0):e()};e.htmlToElement=t=>{const e=document.createElement("template");return t=t.trim(),e.innerHTML=t,e.content.firstChild};e.classToClassList=(t,e,n=" ",o="add")=>{t.split(n).forEach(t=>{t.trim()&&("add"===o?e.classList.add(t):e.classList.remove(t))})};const i={historyIndex:-1,addHistory(t){this.historyIndex=t},existsInHistory(t){return t>this.historyIndex},clearHistory(){this.historyIndex=-1}};e.menuSearchHistory=i},917:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-start":"top-start","top-end":"top-end",bottom:"bottom","bottom-start":"bottom-start","bottom-end":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Space","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},949:(t,e,n)=>{n.r(e),n.d(e,{arrow:()=>Dt,autoPlacement:()=>Rt,autoUpdate:()=>It,computePosition:()=>Yt,detectOverflow:()=>Ot,flip:()=>Ht,getOverflowAncestors:()=>ct,hide:()=>Bt,inline:()=>Ft,limitShift:()=>kt,offset:()=>Pt,platform:()=>Ct,shift:()=>_t,size:()=>Mt});const o=["top","right","bottom","left"],i=["start","end"],r=o.reduce((t,e)=>t.concat(e,e+"-"+i[0],e+"-"+i[1]),[]),s=Math.min,l=Math.max,a=Math.round,c=Math.floor,f=t=>({x:t,y:t}),u={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function d(t,e,n){return l(t,s(e,n))}function g(t,e){return"function"==typeof t?t(e):t}function p(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function w(t){return"x"===t?"y":"x"}function y(t){return"y"===t?"height":"width"}const v=new Set(["top","bottom"]);function x(t){return v.has(p(t))?"y":"x"}function b(t){return w(x(t))}function T(t,e,n){void 0===n&&(n=!1);const o=m(t),i=b(t),r=y(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=O(s)),[s,O(s)]}function E(t){return t.replace(/start|end/g,t=>h[t])}const L=["left","right"],S=["right","left"],C=["top","bottom"],A=["bottom","top"];function I(t,e,n,o){const i=m(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?S:L:e?L:S;case"left":case"right":return e?C:A;default:return[]}}(p(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(E)))),r}function O(t){return t.replace(/left|right|bottom|top/g,t=>u[t])}function P(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function R(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function _(t,e,n){let{reference:o,floating:i}=t;const r=x(e),s=b(e),l=y(s),a=p(e),c="y"===r,f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let d;switch(a){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(m(e)){case"start":d[s]-=h*(n&&c?-1:1);break;case"end":d[s]+=h*(n&&c?-1:1)}return d}async function H(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=g(e,t),p=P(d),m=l[h?"floating"===u?"reference":"floating":u],w=R(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(m)))||n?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),y="floating"===u?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),x=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},b=R(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(w.top-b.top+p.top)/x.y,bottom:(b.bottom-w.bottom+p.bottom)/x.y,left:(w.left-b.left+p.left)/x.x,right:(b.right-w.right+p.right)/x.x}}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 B(t){return o.some(e=>t[e]>=0)}function D(t){const e=s(...t.map(t=>t.left)),n=s(...t.map(t=>t.top));return{x:e,y:n,width:l(...t.map(t=>t.right))-e,height:l(...t.map(t=>t.bottom))-n}}const F=new Set(["left","top"]);function k(){return"undefined"!=typeof window}function Y(t){return $(t)?(t.nodeName||"").toLowerCase():"#document"}function U(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=($(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function $(t){return!!k()&&(t instanceof Node||t instanceof U(t).Node)}function V(t){return!!k()&&(t instanceof Element||t instanceof U(t).Element)}function W(t){return!!k()&&(t instanceof HTMLElement||t instanceof U(t).HTMLElement)}function j(t){return!(!k()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof U(t).ShadowRoot)}const K=new Set(["inline","contents"]);function z(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!K.has(i)}const q=new Set(["table","td","th"]);function X(t){return q.has(Y(t))}const Z=[":popover-open",":modal"];function J(t){return Z.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const G=["transform","translate","scale","rotate","perspective"],Q=["transform","translate","scale","rotate","perspective","filter"],tt=["paint","layout","strict","content"];function et(t){const e=nt(),n=V(t)?rt(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||Q.some(t=>(n.willChange||"").includes(t))||tt.some(t=>(n.contain||"").includes(t))}function nt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ot=new Set(["html","body","#document"]);function it(t){return ot.has(Y(t))}function rt(t){return U(t).getComputedStyle(t)}function st(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function lt(t){if("html"===Y(t))return t;const e=t.assignedSlot||t.parentNode||j(t)&&t.host||N(t);return j(e)?e.host:e}function at(t){const e=lt(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&z(e)?e:at(e)}function ct(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=at(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),s=U(i);if(r){const t=ft(s);return e.concat(s,s.visualViewport||[],z(i)?i:[],t&&n?ct(t):[])}return e.concat(i,ct(i,[],n))}function ft(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ut(t){const e=rt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=W(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,l=a(n)!==r||a(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function ht(t){return V(t)?t:t.contextElement}function dt(t){const e=ht(t);if(!W(e))return f(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ut(e);let s=(r?a(n.width):n.width)/o,l=(r?a(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const gt=f(0);function pt(t){const e=U(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:gt}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=ht(t);let s=f(1);e&&(o?V(o)&&(s=dt(o)):s=dt(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==U(t))&&e}(r,n,o)?pt(r):f(0);let a=(i.left+l.x)/s.x,c=(i.top+l.y)/s.y,u=i.width/s.x,h=i.height/s.y;if(r){const t=U(r),e=o&&V(o)?U(o):o;let n=t,i=ft(n);for(;i&&o&&e!==n;){const t=dt(i),e=i.getBoundingClientRect(),o=rt(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,h*=t.y,a+=r,c+=s,n=U(i),i=ft(n)}}return R({width:u,height:h,x:a,y:c})}function wt(t,e){const n=st(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function yt(t,e,n){void 0===n&&(n=!1);const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-(n?0:wt(t,o)),y:o.top+e.scrollTop}}const vt=new Set(["absolute","fixed"]);function xt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=U(t),o=N(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;const t=nt();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l,y:a}}(t,n);else if("document"===e)o=function(t){const e=N(t),n=st(t),o=t.ownerDocument.body,i=l(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=l(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+wt(t);const a=-n.scrollTop;return"rtl"===rt(o).direction&&(s+=l(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}(N(t));else if(V(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=W(t)?dt(t):f(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=pt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return R(o)}function bt(t,e){const n=lt(t);return!(n===e||!V(n)||it(n))&&("fixed"===rt(n).position||bt(n,e))}function Tt(t,e,n){const o=W(e),i=N(e),r="fixed"===n,s=mt(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=f(0);function c(){a.x=wt(i)}if(o||!o&&!r)if(("body"!==Y(e)||z(i))&&(l=st(e)),o){const t=mt(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&c();r&&!o&&i&&c();const u=!i||o||r?f(0):yt(i,l);return{x:s.left+l.scrollLeft-a.x-u.x,y:s.top+l.scrollTop-a.y-u.y,width:s.width,height:s.height}}function Et(t){return"static"===rt(t).position}function Lt(t,e){if(!W(t)||"fixed"===rt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function St(t,e){const n=U(t);if(J(t))return n;if(!W(t)){let e=lt(t);for(;e&&!it(e);){if(V(e)&&!Et(e))return e;e=lt(e)}return n}let o=Lt(t,e);for(;o&&X(o)&&Et(o);)o=Lt(o,e);return o&&it(o)&&Et(o)&&!et(o)?n:o||function(t){let e=lt(t);for(;W(e)&&!it(e);){if(et(e))return e;if(J(e))return null;e=lt(e)}return null}(t)||n}const Ct={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,s=N(o),l=!!e&&J(e.floating);if(o===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=f(1);const u=f(0),h=W(o);if((h||!h&&!r)&&(("body"!==Y(o)||z(s))&&(a=st(o)),W(o))){const t=mt(o);c=dt(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const d=!s||h||r?f(0):yt(s,a,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-a.scrollTop*c.y+u.y+d.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?J(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=ct(t,[],!1).filter(t=>V(t)&&"body"!==Y(t)),i=null;const r="fixed"===rt(t).position;let s=r?lt(t):t;for(;V(s)&&!it(s);){const e=rt(s),n=et(s);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&vt.has(i.position)||z(s)&&!n&&bt(t,s))?o=o.filter(t=>t!==s):i=e,s=lt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],a=r[0],c=r.reduce((t,n)=>{const o=xt(e,n,i);return t.top=l(o.top,t.top),t.right=s(o.right,t.right),t.bottom=s(o.bottom,t.bottom),t.left=l(o.left,t.left),t},xt(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:St,getElementRects:async function(t){const e=this.getOffsetParent||St,n=this.getDimensions,o=await n(t.floating);return{reference:Tt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=ut(t);return{width:e,height:n}},getScale:dt,isElement:V,isRTL:function(t){return"rtl"===rt(t).direction}};function At(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function It(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,h=ht(t),d=i||r?[...h?ct(h):[],...ct(e)]:[];d.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const g=h&&f?function(t,e){let n,o=null;const i=N(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function a(f,u){void 0===f&&(f=!1),void 0===u&&(u=1),r();const h=t.getBoundingClientRect(),{left:d,top:g,width:p,height:m}=h;if(f||e(),!p||!m)return;const w={rootMargin:-c(g)+"px "+-c(i.clientWidth-(d+p))+"px "+-c(i.clientHeight-(g+m))+"px "+-c(d)+"px",threshold:l(0,s(1,u))||1};let y=!0;function v(e){const o=e[0].intersectionRatio;if(o!==u){if(!y)return a();o?a(!1,o):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==o||At(h,t.getBoundingClientRect())||a(),y=!1}try{o=new IntersectionObserver(v,{...w,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(v,w)}o.observe(t)}(!0),r}(h,n):null;let p,m=-1,w=null;a&&(w=new ResizeObserver(t=>{let[o]=t;o&&o.target===h&&w&&(w.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var t;null==(t=w)||t.observe(e)})),n()}),h&&!u&&w.observe(h),w.observe(e));let y=u?mt(t):null;return u&&function e(){const o=mt(t);y&&!At(y,o)&&n();y=o,p=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==g||g(),null==(t=w)||t.disconnect(),w=null,u&&cancelAnimationFrame(p)}}const Ot=H,Pt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=e,a=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=p(n),l=m(n),a="y"===x(n),c=F.has(s)?-1:1,f=r&&a?-1:1,u=g(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:w}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof w&&(d="end"===l?-1*w:w),a?{x:d*f,y:h*c}:{x:h*c,y:d*f}}(e,t);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},Rt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:l,placement:a,platform:c,elements:f}=e,{crossAxis:u=!1,alignment:h,allowedPlacements:d=r,autoAlignment:w=!0,...y}=g(t,e),v=void 0!==h||d===r?function(t,e,n){return(t?[...n.filter(e=>m(e)===t),...n.filter(e=>m(e)!==t)]:n.filter(t=>p(t)===t)).filter(n=>!t||m(n)===t||!!e&&E(n)!==n)}(h||null,w,d):d,x=await H(e,y),b=(null==(n=l.autoPlacement)?void 0:n.index)||0,L=v[b];if(null==L)return{};const S=T(L,s,await(null==c.isRTL?void 0:c.isRTL(f.floating)));if(a!==L)return{reset:{placement:v[0]}};const C=[x[p(L)],x[S[0]],x[S[1]]],A=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:L,overflows:C}],I=v[b+1];if(I)return{data:{index:b+1,overflows:A},reset:{placement:I}};const O=A.map(t=>{const e=m(t.placement);return[t.placement,e&&u?t.overflows.slice(0,2).reduce((t,e)=>t+e,0):t.overflows[0],t.overflows]}).sort((t,e)=>t[1]-e[1]),P=(null==(i=O.filter(t=>t[2].slice(0,m(t[0])?2:3).every(t=>t<=0))[0])?void 0:i[0])||O[0][0];return P!==a?{data:{index:b+1,overflows:A},reset:{placement:P}}:{}}}},_t=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=g(t,e),c={x:n,y:o},f=await H(e,a),u=x(p(i)),h=w(u);let m=c[h],y=c[u];if(r){const t="y"===h?"bottom":"right";m=d(m+f["y"===h?"top":"left"],m,m-f[t])}if(s){const t="y"===u?"bottom":"right";y=d(y+f["y"===u?"top":"left"],y,y-f[t])}const v=l.fn({...e,[h]:m,[u]:y});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[h]:r,[u]:s}}}}}},Ht=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...y}=g(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const v=p(i),b=x(l),L=p(l)===l,S=await(null==a.isRTL?void 0:a.isRTL(c.floating)),C=h||(L||!w?[O(l)]:function(t){const e=O(t);return[E(t),e,E(e)]}(l)),A="none"!==m;!h&&A&&C.push(...I(l,w,m,S));const P=[l,...C],R=await H(e,y),_=[];let M=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&_.push(R[v]),u){const t=T(i,s,S);_.push(R[t[0]],R[t[1]])}if(M=[...M,{placement:i,overflows:_}],!_.every(t=>t<=0)){var B,D;const t=((null==(B=r.flip)?void 0:B.index)||0)+1,e=P[t];if(e){if(!("alignment"===u&&b!==x(e))||M.every(t=>x(t.placement)!==b||t.overflows[0]>0))return{data:{index:t,overflows:M},reset:{placement:e}}}let n=null==(D=M.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:D.placement;if(!n)switch(d){case"bestFit":{var F;const t=null==(F=M.filter(t=>{if(A){const e=x(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:F[0];t&&(n=t);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}},Mt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:c}=e,{apply:f=()=>{},...u}=g(t,e),h=await H(e,u),d=p(i),w=m(i),y="y"===x(i),{width:v,height:b}=r.floating;let T,E;"top"===d||"bottom"===d?(T=d,E=w===(await(null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(E=d,T="end"===w?"top":"bottom");const L=b-h.top-h.bottom,S=v-h.left-h.right,C=s(b-h[T],L),A=s(v-h[E],S),I=!e.middlewareData.shift;let O=C,P=A;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(P=S),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(O=L),I&&!w){const t=l(h.left,0),e=l(h.right,0),n=l(h.top,0),o=l(h.bottom,0);y?P=v-2*(0!==t||0!==e?t+e:l(h.left,h.right)):O=b-2*(0!==n||0!==o?n+o:l(h.top,h.bottom))}await f({...e,availableWidth:P,availableHeight:O});const R=await a.getDimensions(c.floating);return v!==R.width||b!==R.height?{reset:{rects:!0}}:{}}}},Bt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=g(t,e);switch(o){case"referenceHidden":{const t=M(await H(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:B(t)}}}case"escaped":{const t=M(await H(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:B(t)}}}default:return{}}}}},Dt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:l,elements:a,middlewareData:c}=e,{element:f,padding:u=0}=g(t,e)||{};if(null==f)return{};const h=P(u),p={x:n,y:o},w=b(i),v=y(w),x=await l.getDimensions(f),T="y"===w,E=T?"top":"left",L=T?"bottom":"right",S=T?"clientHeight":"clientWidth",C=r.reference[v]+r.reference[w]-p[w]-r.floating[v],A=p[w]-r.reference[w],I=await(null==l.getOffsetParent?void 0:l.getOffsetParent(f));let O=I?I[S]:0;O&&await(null==l.isElement?void 0:l.isElement(I))||(O=a.floating[S]||r.floating[v]);const R=C/2-A/2,_=O/2-x[v]/2-1,H=s(h[E],_),M=s(h[L],_),B=H,D=O-x[v]-M,F=O/2-x[v]/2+R,k=d(B,F,D),Y=!c.arrow&&null!=m(i)&&F!==k&&r.reference[v]/2-(F<B?H:M)-x[v]/2<0,U=Y?F<B?F-B:F-D:0;return{[w]:p[w]+U,data:{[w]:k,centerOffset:F-k-U,...Y&&{alignmentOffset:U}},reset:Y}}}),Ft=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:a}=e,{padding:c=2,x:f,y:u}=g(t,e),h=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(o.reference))||[]),d=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let o=null;for(let t=0;t<e.length;t++){const i=e[t];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i}return n.map(t=>R(D(t)))}(h),m=R(D(h)),w=P(c);const y=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===d.length&&d[0].left>d[1].right&&null!=f&&null!=u)return d.find(t=>f>t.left-w.left&&f<t.right+w.right&&u>t.top-w.top&&u<t.bottom+w.bottom)||m;if(d.length>=2){if("y"===x(n)){const t=d[0],e=d[d.length-1],o="top"===p(n),i=t.top,r=e.bottom,s=o?t.left:e.left,l=o?t.right:e.right;return{top:i,bottom:r,left:s,right:l,width:l-s,height:r-i,x:s,y:i}}const t="left"===p(n),e=l(...d.map(t=>t.right)),o=s(...d.map(t=>t.left)),i=d.filter(n=>t?n.left===o:n.right===e),r=i[0].top,a=i[i.length-1].bottom;return{top:r,bottom:a,left:o,right:e,width:e-o,height:a-r,x:o,y:r}}return m}},floating:o.floating,strategy:a});return i.reference.x!==y.reference.x||i.reference.y!==y.reference.y||i.reference.width!==y.reference.width||i.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},kt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=g(t,e),f={x:n,y:o},u=x(i),h=w(u);let d=f[h],m=f[u];const y=g(l,e),v="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(a){const t="y"===h?"height":"width",e=r.reference[h]-r.floating[t]+v.mainAxis,n=r.reference[h]+r.reference[t]-v.mainAxis;d<e?d=e:d>n&&(d=n)}if(c){var b,T;const t="y"===h?"width":"height",e=F.has(p(i)),n=r.reference[u]-r.floating[t]+(e&&(null==(b=s.offset)?void 0:b[u])||0)+(e?0:v.crossAxis),o=r.reference[u]+r.reference[t]+(e?0:(null==(T=s.offset)?void 0:T[u])||0)-(e?v.crossAxis:0);m<n?m=n:m>o&&(m=o)}return{[h]:d,[u]:m}}}},Yt=(t,e,n)=>{const o=new Map,i={platform:Ct,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=_(c,o,a),h=o,d={},g=0;for(let n=0;n<l.length;n++){const{name:r,fn:p}=l[n],{x:m,y:w,data:y,reset:v}=await p({x:f,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});f=null!=m?m:f,u=null!=w?w:u,d={...d,[r]:{...d[r],...y}},v&&g<=50&&(g++,"object"==typeof v&&(v.placement&&(h=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:f,y:u}=_(c,h,a))),n=-1)}return{x:f,y:u,placement:h,strategy:i,middlewareData:d}})(t,e,{...i,platform:r})}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(487)})());