1import{A as e,M as t,O as n,_ as r,dt as i,i as a,it as o,t as ee,yt as s,z as c}from"./vue.runtime.esm-bundler-CgzNcaVs.js";import{M as l,N as u,V as d}from"./storage-KZ_Nb2-5.js";import{f as te,m as f}from"./use-router-link-W1ICWkHL.js";import{B as p,L as ne,O as m,R as h,S as re,V as g,j as ie,k as _,z as v}from"./quasarPluginUtils-JC-064X3.js";import{l as ae,o as y,r as oe,u as b}from"./scroll-BxvIHwUH.js";import{t as x}from"./selection-CPrVVsoZ.js";import{a as se,c as ce,i as S,n as C,o as w,r as T,s as le,t as E,u as D}from"./position-engine-DJKpDYGz.js";a(),t(),i();var O=0,k=f({name:`QTooltip`,inheritAttrs:!1,props:{...D,...g,...h,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{...h.transitionShow,default:`jump-down`},transitionHide:{...h.transitionHide,default:`jump-up`},anchor:{type:String,default:`bottom middle`,validator:S},self:{type:String,default:`top middle`,validator:S},offset:{type:Array,default:()=>[14,14],validator:T},scrollTarget:y,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:Boolean},emits:[...p],setup(t,{slots:i,emit:a,attrs:f}){let p,h,g,y=!1,S,T=n(),{proxy:{$q:D}}=T,k=s(null),A=s(!1),ue=re(),j=r(()=>f.id||ue.value),M=r(()=>E(t.anchor,D.lang.rtl)),N=r(()=>E(t.self,D.lang.rtl)),P=r(()=>!t.persistent),{registerTick:F,removeTick:I}=ae(),{registerTimeout:L}=b(),{transitionProps:R,transitionStyle:z}=ne(t),{localScrollTarget:B,changeScrollEvent:V,unconfigureScrollTarget:H}=le(t,$),{anchorEl:U,canShow:de,anchorEvents:W}=ce({showing:A,configureAnchorEl:ve}),{show:fe,hide:G}=v({showing:A,canShow:de,handleShow:me,handleHide:he,hideOnRouteChange:P,processOnMount:!0});Object.assign(W,{delayShow:X,delayHide:ge,onFocusin:_e});let{showPortal:K,hidePortal:q,renderPortal:pe}=ie(T,k,Se,`tooltip`);if(D.platform.is.mobile){let e={anchorEl:U,innerRef:k,onClickOutside(e){return G(e),e.target.classList.contains(`q-dialog__backdrop`)&&d(e),!0}};o(r(()=>t.modelValue===null&&!t.persistent&&A.value),t=>{(t?se:w)(e)}),c(()=>{w(e)})}else o(()=>(t.modelValue===null||t[`onUpdate:modelValue`])&&A.value===!0&&t.persistent!==!0,e=>{(e===!0?m:_)(Z)});function me(e){K(),ye(),F(()=>{if(h?.disconnect(),k.value===null){h=void 0;return}h=new MutationObserver(()=>Y()),h.observe(k.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),Y(),$()}),p===void 0&&(p=o(()=>D.screen.width+`|`+D.screen.height+`|`+t.self+`|`+t.anchor+`|`+D.lang.rtl,Y)),L(()=>{K(!0),a(`show`,e)},t.transitionDuration)}function he(e){I(),q(),J(),L(()=>{q(!0),a(`hide`,e)},t.transitionDuration)}function J(){h!==void 0&&(h.disconnect(),h=void 0),p!==void 0&&(p(),p=void 0),H(),_(Z),u(W,`tooltipTemp`),be(),Q(!1)}function Y(){C({targetEl:k.value,offset:t.offset,anchorEl:U.value,anchorOrigin:M.value,selfOrigin:N.value,maxHeight:t.maxHeight,maxWidth:t.maxWidth})}function X(e){if(D.platform.is.mobile){g!==void 0&&(clearTimeout(g),g=void 0),x(),Q(!0);let e=U.value,t=[`touchmove`,`touchcancel`,`touchend`,`click`].map(t=>[e,t,`delayHide`,`passiveCapture`]);l(W,`tooltipTemp`,t)}L(()=>{fe(e)},t.delay)}function ge(e){D.platform.is.mobile&&(u(W,`tooltipTemp`),x(),g=setTimeout(()=>{g=void 0,Q(!1)},10)),L(()=>{G(e)},t.hideDelay)}function _e(e){let t=e.target;if(t){try{if(t.matches(`:focus-visible`)===!1)return}catch{}X(e)}}function Z(e){G(e)}function ve(){if(t.noParentEvent||U.value===null)return;let e=D.platform.is.mobile?[[U.value,`touchstart`,`delayShow`,`passive`]]:[[U.value,`mouseenter`,`delayShow`,`passive`],[U.value,`mouseleave`,`delayHide`,`passive`],[U.value,`focusin`,`onFocusin`,`passive`],[U.value,`focusout`,`delayHide`,`passive`]];l(W,`anchor`,e)}function Q(e){y!==e&&(y=e,O+=e?1:-1,document.body.classList.toggle(`non-selectable`,O>0),!e&&g!==void 0&&(clearTimeout(g),g=void 0))}function ye(){let e=U.value,t=j.value;if(e===null||t===void 0)return;let n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);S={el:e,id:t,added:!n.includes(t)},S.added&&(n.push(t),e.setAttribute(`aria-describedby`,n.join(` `)))}function be(){if(S?.added===!0){let{el:e,id:t}=S,n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e!==``&&e!==t);n.length===0?e.removeAttribute(`aria-describedby`):e.setAttribute(`aria-describedby`,n.join(` `))}S=void 0}function $(){if(U.value!==null||t.scrollTarget!==void 0){B.value=oe(U.value,t.scrollTarget);let e=t.noParentEvent?Y:G;V(B.value,e)}}function xe(){return A.value?e(`div`,{...f,id:j.value,ref:k,class:[`q-tooltip q-tooltip--style q-position-engine no-pointer-events`,f.class],style:[f.style,z.value],role:`tooltip`},te(i.default)):null}function Se(){return e(ee,R.value,xe)}return c(J),Object.assign(T.proxy,{updatePosition:Y}),pe}});export{k as t}; 2//# sourceMappingURL=QTooltip-DHJ3fgNu.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.