import{e as S,g as l,h as m,r as x,w as H,o as Q,aa as j,a9 as A,T as oe,j as ne,O as se}from"./index.91710347.js";import{b as w}from"./QBtn.941b3ca0.js";import{ah as le,u as ie,ai as y,aj as D,ak as re,al as ue,b as ce,am as de,d as fe,an as ve,ao as he,ap as me,e as ge,aq as Te,ar as M,as as pe,at as B,au as be,av as L,aw as ye}from"./QTable.5a47bc39.js";var Oe=S({name:"QToolbar",props:{inset:Boolean},setup(e,{slots:i}){const s=l(()=>"q-toolbar row no-wrap items-center"+(e.inset===!0?" q-toolbar--inset":""));return()=>m("div",{class:s.value,role:"toolbar"},w(i.default))}}),ke=S({name:"QTooltip",inheritAttrs:!1,props:{...le,...ie,...y,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{...y.transitionShow,default:"jump-down"},transitionHide:{...y.transitionHide,default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:D},self:{type:String,default:"top middle",validator:D},offset:{type:Array,default:()=>[14,14],validator:re},scrollTarget:ue,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:Boolean},emits:[...ce],setup(e,{slots:i,emit:s,attrs:g}){let r,u;const T=ne(),{proxy:{$q:a}}=T,c=x(null),v=x(!1),_=l(()=>L(e.anchor,a.lang.rtl)),W=l(()=>L(e.self,a.lang.rtl)),N=l(()=>e.persistent!==!0),{registerTick:R,removeTick:I}=de(),{registerTimeout:h}=fe(),{transitionProps:U,transitionStyle:V}=ve(e),{localScrollTarget:P,changeScrollEvent:$,unconfigureScrollTarget:z}=he(e,E),{anchorEl:o,canShow:F,anchorEvents:d}=me({showing:v,configureAnchorEl:ee}),{show:G,hide:p}=ge({showing:v,canShow:F,handleShow:K,handleHide:X,hideOnRouteChange:N,processOnMount:!0});Object.assign(d,{delayShow:Y,delayHide:Z});const{showPortal:O,hidePortal:k,renderPortal:J}=Te(T,c,ae,"tooltip");if(a.platform.is.mobile===!0){const t={anchorEl:o,innerRef:c,onClickOutside(n){return p(n),n.target.classList.contains("q-dialog__backdrop")&&se(n),!0}},b=l(()=>e.modelValue===null&&e.persistent!==!0&&v.value===!0);H(b,n=>{(n===!0?ye:M)(t)}),Q(()=>{M(t)})}function K(t){O(),R(()=>{u=new MutationObserver(()=>f()),u.observe(c.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),f(),E()}),r===void 0&&(r=H(()=>a.screen.width+"|"+a.screen.height+"|"+e.self+"|"+e.anchor+"|"+a.lang.rtl,f)),h(()=>{O(!0),s("show",t)},e.transitionDuration)}function X(t){I(),k(),C(),h(()=>{k(!0),s("hide",t)},e.transitionDuration)}function C(){u!==void 0&&(u.disconnect(),u=void 0),r!==void 0&&(r(),r=void 0),z(),j(d,"tooltipTemp")}function f(){pe({targetEl:c.value,offset:e.offset,anchorEl:o.value,anchorOrigin:_.value,selfOrigin:W.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function Y(t){if(a.platform.is.mobile===!0){B(),document.body.classList.add("non-selectable");const b=o.value,n=["touchmove","touchcancel","touchend","click"].map(q=>[b,q,"delayHide","passiveCapture"]);A(d,"tooltipTemp",n)}h(()=>{G(t)},e.delay)}function Z(t){a.platform.is.mobile===!0&&(j(d,"tooltipTemp"),B(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),h(()=>{p(t)},e.hideDelay)}function ee(){if(e.noParentEvent===!0||o.value===null)return;const t=a.platform.is.mobile===!0?[[o.value,"touchstart","delayShow","passive"]]:[[o.value,"mouseenter","delayShow","passive"],[o.value,"mouseleave","delayHide","passive"]];A(d,"anchor",t)}function E(){if(o.value!==null||e.scrollTarget!==void 0){P.value=be(o.value,e.scrollTarget);const t=e.noParentEvent===!0?f:p;$(P.value,t)}}function te(){return v.value===!0?m("div",{...g,ref:c,class:["q-tooltip q-tooltip--style q-position-engine no-pointer-events",g.class],style:[g.style,V.value],role:"tooltip"},w(i.default)):null}function ae(){return m(oe,U.value,te)}return Q(C),Object.assign(T.proxy,{updatePosition:f}),J}}),Ce=S({name:"QToolbarTitle",props:{shrink:Boolean},setup(e,{slots:i}){const s=l(()=>"q-toolbar__title ellipsis"+(e.shrink===!0?" col-shrink":""));return()=>m("div",{class:s.value},w(i.default))}});export{ke as Q,Ce as a,Oe as b};
