UNPKG

@gits-id/tooltip

Version:

GITS Tooltip Component

2 lines (1 loc) 40.5 kB
(function(E,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(E=typeof globalThis<"u"?globalThis:E||self,l(E.VTooltip={},E.Vue))})(this,function(E,l){"use strict";const no="";function T(e){return e.split("-")[0]}function L(e){return e.split("-")[1]}function q(e){return["top","bottom"].includes(T(e))?"x":"y"}function ue(e){return e==="y"?"height":"width"}function Te(e){let{reference:t,floating:o,placement:i}=e;const n=t.x+t.width/2-o.width/2,r=t.y+t.height/2-o.height/2;let a;switch(T(i)){case"top":a={x:n,y:t.y-o.height};break;case"bottom":a={x:n,y:t.y+t.height};break;case"right":a={x:t.x+t.width,y:r};break;case"left":a={x:t.x-o.width,y:r};break;default:a={x:t.x,y:t.y}}const s=q(i),p=ue(s);switch(L(i)){case"start":a[s]=a[s]-(t[p]/2-o[p]/2);break;case"end":a[s]=a[s]+(t[p]/2-o[p]/2);break}return a}const et=async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:a}=o;if(process.env.NODE_ENV!=="production"&&(a==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),r.filter(u=>{let{name:g}=u;return g==="autoPlacement"||g==="flip"}).length>1))throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`","middleware detected. This will lead to an infinite loop. Ensure only","one of either has been passed to the `middleware` array."].join(" "));let s=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:d}=Te({...s,placement:i}),h=i,m={},f=0;for(let u=0;u<r.length;u++){if(process.env.NODE_ENV!=="production"&&(f++,f>100))throw new Error(["Floating UI: The middleware lifecycle appears to be","running in an infinite loop. This is usually caused by a `reset`","continually being returned without a break condition."].join(" "));const{name:g,fn:v}=r[u],{x:y,y:w,data:$,reset:_}=await v({x:p,y:d,initialPlacement:i,placement:h,strategy:n,middlewareData:m,rects:s,platform:a,elements:{reference:e,floating:t}});if(p=y??p,d=w??d,m={...m,[g]:$??{}},_){typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(s=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:n}):_.rects),{x:p,y:d}=Te({...s,placement:h})),u=-1;continue}}return{x:p,y:d,placement:h,strategy:n,middlewareData:m}};function tt(e){return{top:0,right:0,bottom:0,left:0,...e}}function xe(e){return typeof e!="number"?tt(e):{top:e,right:e,bottom:e,left:e}}function fe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Z(e,t){t===void 0&&(t={});const{x:o,y:i,platform:n,rects:r,elements:a,strategy:s}=e,{boundary:p="clippingParents",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:f=0}=t,u=xe(f),v=a[m?h==="floating"?"reference":"floating":h],y=await n.getClippingClientRect({element:await n.isElement(v)?v:v.contextElement||await n.getDocumentElement({element:a.floating}),boundary:p,rootBoundary:d}),w=fe(await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h==="floating"?{...r.floating,x:o,y:i}:r.reference,offsetParent:await n.getOffsetParent({element:a.floating}),strategy:s}));return{top:y.top-w.top+u.top,bottom:w.bottom-y.bottom+u.bottom,left:y.left-w.left+u.left,right:w.right-y.right+u.right}}const ot=Math.min,D=Math.max;function me(e,t,o){return D(e,ot(t,o))}const it=e=>({name:"arrow",options:e,async fn(t){const{element:o,padding:i=0}=e??{},{x:n,y:r,placement:a,rects:s,platform:p}=t;if(o==null)return process.env.NODE_ENV!=="production"&&console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=xe(i),h={x:n,y:r},m=T(a),f=q(m),u=ue(f),g=await p.getDimensions({element:o}),v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=s.reference[u]+s.reference[f]-h[f]-s.floating[u],$=h[f]-s.reference[f],_=await p.getOffsetParent({element:o}),b=_?f==="y"?_.clientHeight||0:_.clientWidth||0:0,V=w/2-$/2,W=d[v],j=b-g[u]-d[y],P=b/2-g[u]/2+V,S=me(W,P,j);return{data:{[f]:S,centerOffset:P-S}}}}),nt={left:"right",right:"left",bottom:"top",top:"bottom"};function ee(e){return e.replace(/left|right|bottom|top/g,t=>nt[t])}function Oe(e,t){const o=L(e)==="start",i=q(e),n=ue(i);let r=i==="x"?o?"right":"left":o?"bottom":"top";return t.reference[n]>t.floating[n]&&(r=ee(r)),{main:r,cross:ee(r)}}const st={start:"end",end:"start"};function ge(e){return e.replace(/start|end/g,t=>st[t])}const rt=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function at(e,t,o){return(e?[...o.filter(n=>L(n)===e),...o.filter(n=>L(n)!==e)]:o.filter(n=>T(n)===n)).filter(n=>e?L(n)===e||(t?ge(n)!==n:!1):!0)}const lt=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,i,n,r,a,s;const{x:p,y:d,rects:h,middlewareData:m,placement:f}=t,{alignment:u=null,allowedPlacements:g=rt,autoAlignment:v=!0,...y}=e;if((o=m.autoPlacement)!=null&&o.skip)return{};const w=at(u,v,g),$=await Z(t,y),_=(i=(n=m.autoPlacement)==null?void 0:n.index)!=null?i:0,b=w[_],{main:V,cross:W}=Oe(b,h);if(f!==b)return{x:p,y:d,reset:{placement:w[0]}};const j=[$[T(b)],$[V],$[W]],P=[...(r=(a=m.autoPlacement)==null?void 0:a.overflows)!=null?r:[],{placement:b,overflows:j}],S=w[_+1];if(S)return{data:{index:_+1,overflows:P},reset:{placement:S}};const G=P.slice().sort((J,Q)=>J.overflows[0]-Q.overflows[0]),K=(s=G.find(J=>{let{overflows:Q}=J;return Q.every(N=>N<=0)}))==null?void 0:s.placement;return{data:{skip:!0},reset:{placement:K??G[0].placement}}}}};function pt(e){const t=ee(e);return[ge(e),t,ge(t)]}const dt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:a,initialPlacement:s}=t;if((o=r.flip)!=null&&o.skip)return{};const{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",flipAlignment:f=!0,...u}=e,g=T(n),y=h||(g===s||!f?[ee(s)]:pt(s)),w=[s,...y],$=await Z(t,u),_=[];let b=((i=r.flip)==null?void 0:i.overflows)||[];if(p&&_.push($[g]),d){const{main:P,cross:S}=Oe(n,a);_.push($[P],$[S])}if(b=[...b,{placement:n,overflows:_}],!_.every(P=>P<=0)){var V,W;const P=((V=(W=r.flip)==null?void 0:W.index)!=null?V:0)+1,S=w[P];if(S)return{data:{index:P,overflows:b},reset:{placement:S}};let G="bottom";switch(m){case"bestFit":{var j;const K=(j=b.slice().sort((J,Q)=>J.overflows.filter(N=>N>0).reduce((N,Se)=>N+Se,0)-Q.overflows.filter(N=>N>0).reduce((N,Se)=>N+Se,0))[0])==null?void 0:j.placement;K&&(G=K);break}case"initialPlacement":G=s;break}return{data:{skip:!0},reset:{placement:G}}}return{}}}};function ht(e){let{placement:t,rects:o,value:i}=e;const n=T(t),r=["left","top"].includes(n)?-1:1,a=typeof i=="function"?i({...o,placement:t}):i,{mainAxis:s,crossAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0}:{mainAxis:0,crossAxis:0,...a};return q(n)==="x"?{x:p,y:s*r}:{x:s*r,y:p}}const ct=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:o,y:i,placement:n,rects:r}=t,a=ht({placement:n,rects:r,value:e});return{x:o+a.x,y:i+a.y,data:a}}}};function ut(e){return e==="x"?"y":"x"}const ft=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:w,y:$}=y;return{x:w,y:$}}},...p}=e,d={x:o,y:i},h=await Z(t,p),m=q(T(n)),f=ut(m);let u=d[m],g=d[f];if(r){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",$=u+h[y],_=u-h[w];u=me($,u,_)}if(a){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",$=g+h[y],_=g-h[w];g=me($,g,_)}const v=s.fn({...t,[m]:u,[f]:g});return{...v,data:{x:v.x-o,y:v.y-i}}}}},mt=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o;const{placement:i,rects:n,middlewareData:r}=t,{apply:a,...s}=e;if((o=r.size)!=null&&o.skip)return{};const p=await Z(t,s),d=T(i),h=L(i)==="end";let m,f;d==="top"||d==="bottom"?(m=d,f=h?"left":"right"):(f=d,m=h?"top":"bottom");const u=D(p.left,0),g=D(p.right,0),v=D(p.top,0),y=D(p.bottom,0),w={height:n.floating.height-(["left","right"].includes(i)?2*(v!==0||y!==0?v+y:D(p.top,p.bottom)):p[m]),width:n.floating.width-(["top","bottom"].includes(i)?2*(u!==0||g!==0?u+g:D(p.left,p.right)):p[f])};return a?.({...w,...n}),{data:{skip:!0},reset:{rects:!0}}}}};function we(e){return e?.toString()==="[object Window]"}function A(e){if(e==null)return window;if(!we(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function te(e){return A(e).getComputedStyle(e)}function x(e){return we(e)?"":e?(e.nodeName||"").toLowerCase():""}function O(e){return e instanceof A(e).HTMLElement}function oe(e){return e instanceof A(e).Element}function gt(e){return e instanceof A(e).Node}function Ne(e){const t=A(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ie(e){const{overflow:t,overflowX:o,overflowY:i}=te(e);return/auto|scroll|overlay|hidden/.test(t+i+o)}function wt(e){return["table","td","th"].includes(x(e))}function Ee(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),o=te(e);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||t&&o.willChange==="filter"||t&&(o.filter?o.filter!=="none":!1)}const Ae=Math.min,X=Math.max,ne=Math.round;function I(e,t){t===void 0&&(t=!1);const o=e.getBoundingClientRect();let i=1,n=1;return t&&O(e)&&(i=e.offsetWidth>0&&ne(o.width)/e.offsetWidth||1,n=e.offsetHeight>0&&ne(o.height)/e.offsetHeight||1),{width:o.width/i,height:o.height/n,top:o.top/n,right:o.right/i,bottom:o.bottom/n,left:o.left/i,x:o.left/i,y:o.top/n}}function k(e){return((gt(e)?e.ownerDocument:e.document)||window.document).documentElement}function se(e){return we(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ke(e){return I(k(e)).left+se(e).scrollLeft}function yt(e){const t=I(e);return ne(t.width)!==e.offsetWidth||ne(t.height)!==e.offsetHeight}function _t(e,t,o){const i=O(t),n=k(t),r=I(e,i&&yt(t));let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(i||!i&&o!=="fixed")if((x(t)!=="body"||ie(n))&&(a=se(t)),O(t)){const p=I(t,!0);s.x=p.x+t.clientLeft,s.y=p.y+t.clientTop}else n&&(s.x=ke(n));return{x:r.left+a.scrollLeft-s.x,y:r.top+a.scrollTop-s.y,width:r.width,height:r.height}}function re(e){return x(e)==="html"?e:e.assignedSlot||e.parentNode||(Ne(e)?e.host:null)||k(e)}function ze(e){return!O(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function $t(e){let t=re(e);for(;O(t)&&!["html","body"].includes(x(t));){if(Ee(t))return t;t=t.parentNode}return null}function ye(e){const t=A(e);let o=ze(e);for(;o&&wt(o)&&getComputedStyle(o).position==="static";)o=ze(o);return o&&(x(o)==="html"||x(o)==="body"&&getComputedStyle(o).position==="static"&&!Ee(o))?t:o||$t(e)||t}function Be(e){return{width:e.offsetWidth,height:e.offsetHeight}}function vt(e){let{rect:t,offsetParent:o,strategy:i}=e;const n=O(o),r=k(o);if(o===r)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((n||!n&&i!=="fixed")&&((x(o)!=="body"||ie(r))&&(a=se(o)),O(o))){const p=I(o,!0);s.x=p.x+o.clientLeft,s.y=p.y+o.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function bt(e){const t=A(e),o=k(e),i=t.visualViewport;let n=o.clientWidth,r=o.clientHeight,a=0,s=0;return i&&(n=i.width,r=i.height,Math.abs(t.innerWidth/i.scale-i.width)<.01&&(a=i.offsetLeft,s=i.offsetTop)),{width:n,height:r,x:a,y:s}}function Pt(e){var t;const o=k(e),i=se(e),n=(t=e.ownerDocument)==null?void 0:t.body,r=X(o.scrollWidth,o.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=X(o.scrollHeight,o.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0);let s=-i.scrollLeft+ke(e);const p=-i.scrollTop;return te(n||o).direction==="rtl"&&(s+=X(o.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:s,y:p}}function He(e){return["html","body","#document"].includes(x(e))?e.ownerDocument.body:O(e)&&ie(e)?e:He(re(e))}function ae(e,t){var o;t===void 0&&(t=[]);const i=He(e),n=i===((o=e.ownerDocument)==null?void 0:o.body),r=A(i),a=n?[r].concat(r.visualViewport||[],ie(i)?i:[]):i,s=t.concat(a);return n?s:s.concat(ae(re(a)))}function Ct(e,t){const o=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&Ne(o)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function St(e){const t=I(e),o=t.top+e.clientTop,i=t.left+e.clientLeft;return{top:o,left:i,x:i,y:o,right:i+e.clientWidth,bottom:o+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function De(e,t){return t==="viewport"?fe(bt(e)):oe(t)?St(t):fe(Pt(k(e)))}function Tt(e){const t=ae(re(e)),i=["absolute","fixed"].includes(te(e).position)&&O(e)?ye(e):e;return oe(i)?t.filter(n=>oe(n)&&Ct(n,i)&&x(n)!=="body"):[]}function xt(e){let{element:t,boundary:o,rootBoundary:i}=e;const r=[...o==="clippingParents"?Tt(t):[].concat(o),i],a=r[0],s=r.reduce((p,d)=>{const h=De(t,d);return p.top=X(h.top,p.top),p.right=Ae(h.right,p.right),p.bottom=Ae(h.bottom,p.bottom),p.left=X(h.left,p.left),p},De(t,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}const Ot={getElementRects:e=>{let{reference:t,floating:o,strategy:i}=e;return{reference:_t(t,ye(o),i),floating:{...Be(o),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>vt(e),getOffsetParent:e=>{let{element:t}=e;return ye(t)},isElement:e=>oe(e),getDocumentElement:e=>{let{element:t}=e;return k(t)},getClippingClientRect:e=>xt(e),getDimensions:e=>{let{element:t}=e;return Be(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},Nt=(e,t,o)=>et(e,t,{platform:Ot,...o});var Et=Object.defineProperty,At=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Me=(e,t,o)=>t in e?Et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,z=(e,t)=>{for(var o in t||(t={}))zt.call(t,o)&&Me(e,o,t[o]);if(Re)for(var o of Re(t))Bt.call(t,o)&&Me(e,o,t[o]);return e},le=(e,t)=>At(e,kt(t));const R={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function pe(e,t){let o=R.themes[e]||{},i;do i=o[t],typeof i>"u"?o.$extend?o=R.themes[o.$extend]||{}:(o=null,i=R[t]):o=null;while(o);return i}function Ht(e){const t=[e];let o=R.themes[e]||{};do o.$extend&&!o.$resetCss?(t.push(o.$extend),o=R.themes[o.$extend]||{}):o=null;while(o);return t.map(i=>`v-popper--theme-${i}`)}function Le(e){const t=[e];let o=R.themes[e]||{};do o.$extend?(t.push(o.$extend),o=R.themes[o.$extend]||{}):o=null;while(o);return t}let F=!1;if(typeof window<"u"){F=!1;try{const e=Object.defineProperty({},"passive",{get(){F=!0}});window.addEventListener("test",null,e)}catch{}}let Ie=!1;typeof window<"u"&&typeof navigator<"u"&&(Ie=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Dt=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Fe={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},Ve={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function We(e,t){const o=e.indexOf(t);o!==-1&&e.splice(o,1)}function _e(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const C=[];let M=null;const je={};function Ge(e){let t=je[e];return t||(t=je[e]=[]),t}let $e=function(){};typeof window<"u"&&($e=window.Element);function c(e){return function(t){return pe(t.theme,e)}}const ve="__floating-vue__popper";var qe=()=>l.defineComponent({name:"VPopper",provide(){return{[ve]:{parentPopper:this}}},inject:{[ve]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:c("disabled")},positioningDisabled:{type:Boolean,default:c("positioningDisabled")},placement:{type:String,default:c("placement"),validator:e=>Dt.includes(e)},delay:{type:[String,Number,Object],default:c("delay")},distance:{type:[Number,String],default:c("distance")},skidding:{type:[Number,String],default:c("skidding")},triggers:{type:Array,default:c("triggers")},showTriggers:{type:[Array,Function],default:c("showTriggers")},hideTriggers:{type:[Array,Function],default:c("hideTriggers")},popperTriggers:{type:Array,default:c("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:c("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:c("popperHideTriggers")},container:{type:[String,Object,$e,Boolean],default:c("container")},boundary:{type:[String,$e],default:c("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:c("strategy")},autoHide:{type:[Boolean,Function],default:c("autoHide")},handleResize:{type:Boolean,default:c("handleResize")},instantMove:{type:Boolean,default:c("instantMove")},eagerMount:{type:Boolean,default:c("eagerMount")},popperClass:{type:[String,Array,Object],default:c("popperClass")},computeTransformOrigin:{type:Boolean,default:c("computeTransformOrigin")},autoMinSize:{type:Boolean,default:c("autoMinSize")},autoSize:{type:[Boolean,String],default:c("autoSize")},autoMaxSize:{type:Boolean,default:c("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:c("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:c("preventOverflow")},overflowPadding:{type:[Number,String],default:c("overflowPadding")},arrowPadding:{type:[Number,String],default:c("arrowPadding")},arrowOverflow:{type:Boolean,default:c("arrowOverflow")},flip:{type:Boolean,default:c("flip")},shift:{type:Boolean,default:c("shift")},shiftCrossAxis:{type:Boolean,default:c("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:c("noAutoFocus")}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},shownChildren:new Set,lastAutoHide:!0}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:le(z({},this.classes),{popperClass:this.popperClass}),result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ve])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:z(z({shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())}},["triggers","positioningDisabled"].reduce((e,t)=>(e[t]="$_refreshListeners",e),{})),["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})),created(){this.$_isDisposed=!0,this.randomId=`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:o=!1}={}){var i,n;((i=this.parentPopper)==null?void 0:i.lockedChild)&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(o||!this.disabled)&&(((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var o;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((o=this.parentPopper)==null?void 0:o.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e,t;!this.$_isDisposed||(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(t=(e=this.referenceNode)==null?void 0:e.call(this))!=null?t:this.$el,this.$_targetNodes=this.targetNodes().filter(o=>o.nodeType===o.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){var e;if(this.$_isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(ct({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(lt({alignment:(e=this.placement.split("-")[1])!=null?e:""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(ft({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(dt({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(it({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:r,middlewareData:a})=>{let s;const{centerOffset:p}=a.arrow;return n.startsWith("top")||n.startsWith("bottom")?s=Math.abs(p)>r.reference.width/2:s=Math.abs(p)>r.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:r,placement:a,middlewareData:s})=>{var p;if((p=s.autoSize)!=null&&p.skip)return{};let d,h;return a.startsWith("top")||a.startsWith("bottom")?d=r.reference.width:h=r.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=d!=null?`${d}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=h!=null?`${h}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(mt({boundary:this.boundary,padding:this.overflowPadding,apply:({width:n,height:r})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=r!=null?`${r}px`:null}})));const i=await Nt(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:z(z({},i.middlewareData.arrow),i.middlewareData.arrowOverflow)})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),M&&this.instantMove&&M.instantMove&&M!==this.parentPopper){M.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e=null,t=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(M=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await _e(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...ae(this.$_referenceNode),...ae(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),o=this.$_popperNode.querySelector(".v-popper__wrapper"),i=o.parentNode.getBoundingClientRect(),n=t.x+t.width/2-(i.left+o.offsetLeft),r=t.y+t.height/2-(i.top+o.offsetTop);this.result.transformOrigin=`${n}px ${r}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let o=0;o<C.length;o++)t=C[o],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}C.push(this),document.body.classList.add("v-popper--some-open");for(const t of Le(this.theme))Ge(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await _e(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,We(C,this),C.length===0&&document.body.classList.remove("v-popper--some-open");for(const o of Le(this.theme)){const i=Ge(o);We(i,this),i.length===0&&document.body.classList.remove(`v-popper--some-open--${o}`)}M===this&&(M=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=pe(this.theme,"disposeTimeout");t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await _e(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.$_isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=o=>{this.isShown&&!this.$_hideInProgress||(o.usedByTooltip=!0,!this.$_preventShow&&this.show({event:o}))};this.$_registerTriggerListeners(this.$_targetNodes,Fe,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Fe,this.popperTriggers,this.popperShowTriggers,e);const t=o=>{o.usedByTooltip||this.hide({event:o})};this.$_registerTriggerListeners(this.$_targetNodes,Ve,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Ve,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,o){this.$_events.push({targetNodes:e,eventType:t,handler:o}),e.forEach(i=>i.addEventListener(t,o,F?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,o,i,n){let r=o;i!=null&&(r=typeof i=="function"?i(r):i),r.forEach(a=>{const s=t[a];s&&this.$_registerEventListeners(e,s,n)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(o=>{const{targetNodes:i,eventType:n,handler:r}=o;!e||e===n?i.forEach(a=>a.removeEventListener(n,r)):t.push(o)}),this.$_events=t},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const o of this.$_targetNodes){const i=o.getAttribute(e);i&&(o.removeAttribute(e),o.setAttribute(t,i))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const o in e){const i=e[o];i==null?t.removeAttribute(o):t.setAttribute(o,i)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.$_pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(Y>=e.left&&Y<=e.right&&U>=e.top&&U<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),o=Y-B,i=U-H,r=t.left+t.width/2-B+(t.top+t.height/2)-H+t.width+t.height,a=B+o*r,s=H+i*r;return de(B,H,a,s,t.left,t.top,t.left,t.bottom)||de(B,H,a,s,t.left,t.top,t.right,t.top)||de(B,H,a,s,t.right,t.top,t.right,t.bottom)||de(B,H,a,s,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});typeof document<"u"&&typeof window<"u"&&(Ie?(document.addEventListener("touchstart",Xe,F?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",Mt,F?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",Xe,!0),window.addEventListener("click",Rt,!0)),window.addEventListener("resize",Ft));function Xe(e){for(let t=0;t<C.length;t++){const o=C[t];try{const i=o.popperNode();o.$_mouseDownContains=i.contains(e.target)}catch{}}}function Rt(e){Ye(e)}function Mt(e){Ye(e,!0)}function Ye(e,t=!1){const o={};for(let i=C.length-1;i>=0;i--){const n=C[i];try{const r=n.$_containsGlobalTarget=Lt(n,e);n.$_pendingHide=!1,requestAnimationFrame(()=>{if(n.$_pendingHide=!1,!o[n.randomId]&&Ue(n,r,e)){if(n.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let s=n.parentPopper;for(;s;)o[s.randomId]=!0,s=s.parentPopper;return}let a=n.parentPopper;for(;a&&Ue(a,a.$_containsGlobalTarget,e);){a.$_handleGlobalClose(e,t);a=a.parentPopper}}})}catch{}}}function Lt(e,t){const o=e.popperNode();return e.$_mouseDownContains||o.contains(t.target)}function Ue(e,t,o){return o.closeAllPopover||o.closePopover&&t||It(e,o)&&!t}function It(e,t){if(typeof e.autoHide=="function"){const o=e.autoHide(t);return e.lastAutoHide=o,o}return e.autoHide}function Ft(e){for(let t=0;t<C.length;t++)C[t].$_computePosition(e)}let B=0,H=0,Y=0,U=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{B=Y,H=U,Y=e.clientX,U=e.clientY},F?{passive:!0}:void 0);function de(e,t,o,i,n,r,a,s){const p=((a-n)*(t-r)-(s-r)*(e-n))/((s-r)*(o-e)-(a-n)*(i-t)),d=((o-e)*(t-r)-(i-t)*(e-n))/((s-r)*(o-e)-(a-n)*(i-t));return p>=0&&p<=1&&d>=0&&d<=1}var be=(e,t)=>{const o=e.__vccOpts||e;for(const[i,n]of t)o[i]=n;return o};const Vt={extends:qe()};function Wt(e,t,o,i,n,r){return l.openBlock(),l.createElementBlock("div",{ref:"reference",class:l.normalizeClass(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[l.renderSlot(e.$slots,"default",l.normalizeProps(l.guardReactiveProps(e.slotData)))],2)}var jt=be(Vt,[["render",Wt]]);function Gt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var o=e.indexOf("Trident/");if(o>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}let he;function Pe(){Pe.init||(Pe.init=!0,he=Gt()!==-1)}var ce={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Pe(),l.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",he&&this.$el.appendChild(e),e.data="about:blank",he||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!he&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const qt=l.withScopeId("data-v-b329ee4c");l.pushScopeId("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};l.popScopeId();const Yt=qt((e,t,o,i,n,r)=>(l.openBlock(),l.createBlock("div",Xt)));ce.render=Yt,ce.__scopeId="data-v-b329ee4c",ce.__file="src/components/ResizeObserver.vue";var Ke=(e="theme")=>({computed:{themeClass(){return Ht(this[e])}}});const Ut=l.defineComponent({name:"VPopperContent",components:{ResizeObserver:ce},mixins:[Ke()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Kt=["id","aria-hidden","tabindex","data-popper-placement"],Jt={ref:"inner",class:"v-popper__inner"},Qt=[l.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),l.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1)];function Zt(e,t,o,i,n,r){const a=l.resolveComponent("ResizeObserver");return l.openBlock(),l.createElementBlock("div",{id:e.popperId,ref:"popover",class:l.normalizeClass(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:l.normalizeStyle(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=l.withKeys(s=>e.autoHide&&e.$emit("hide"),["esc"]))},[l.createElementVNode("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=s=>e.autoHide&&e.$emit("hide"))}),l.createElementVNode("div",{class:"v-popper__wrapper",style:l.normalizeStyle(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[l.createElementVNode("div",Jt,[e.mounted?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",null,[l.renderSlot(e.$slots,"default")]),e.handleResize?(l.openBlock(),l.createBlock(a,{key:0,onNotify:t[1]||(t[1]=s=>e.$emit("resize",s))})):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)],512),l.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:l.normalizeStyle(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Qt,4)],4)],46,Kt)}var Je=be(Ut,[["render",Zt]]),Qe={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};const eo=l.defineComponent({name:"VPopperWrapper",components:{Popper:jt,PopperContent:Je},mixins:[Qe,Ke("finalTheme")],props:{theme:{type:String,default:null}},computed:{finalTheme(){var e;return(e=this.theme)!=null?e:this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function to(e,t,o,i,n,r){const a=l.resolveComponent("PopperContent"),s=l.resolveComponent("Popper");return l.openBlock(),l.createBlock(s,{ref:"popper",theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:l.normalizeClass([e.themeClass])},{default:l.withCtx(({popperId:p,isShown:d,shouldMountContent:h,skipTransition:m,autoHide:f,show:u,hide:g,handleResize:v,onResize:y,classes:w,result:$})=>[l.renderSlot(e.$slots,"default",{shown:d,show:u,hide:g}),l.createVNode(a,{ref:"popperContent","popper-id":p,theme:e.finalTheme,shown:d,mounted:h,"skip-transition":m,"auto-hide":f,"handle-resize":v,classes:w,result:$,onHide:g,onResize:y},{default:l.withCtx(()=>[l.renderSlot(e.$slots,"popper",{shown:d,hide:g})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},8,["theme","target-nodes","popper-node","class"])}var Ce=be(eo,[["render",to]]);l.defineComponent(le(z({},Ce),{name:"VDropdown",vPopperTheme:"dropdown"})),l.defineComponent(le(z({},Ce),{name:"VMenu",vPopperTheme:"menu"}));const oo=l.defineComponent(le(z({},Ce),{name:"VTooltip",vPopperTheme:"tooltip"}));l.defineComponent({name:"VTooltipDirective",components:{Popper:qe(),PopperContent:Je},mixins:[Qe],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>pe(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>pe(e.theme,"loadingContent")}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,o=this.content(this);o.then?o.then(i=>this.onResult(t,i)):this.onResult(t,o)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const io=oo,Ze=l.defineComponent({__name:"VTooltip",props:{placement:{type:String,default:"top"},options:{type:Object,default:()=>({})},activatorClass:{type:String,default:""},tooltipClass:{type:String,default:""}},setup(e){return(t,o)=>(l.openBlock(),l.createBlock(l.unref(io),{placement:e.placement},{popper:l.withCtx(()=>[l.renderSlot(t.$slots,"default")]),default:l.withCtx(()=>[l.renderSlot(t.$slots,"activator")]),_:3},8,["placement"]))}});E.VTooltip=Ze,E.default=Ze,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});