import{a1 as F,a0 as x,E as G,a2 as H,W as T,a3 as k,U as M,C as D,V as E,B as K}from"./app-CPb3bToC.js";import{b as _,c as J}from"./chunk-CusLMHK2.js";import{m as R,g as O,a as m,w as Z,l as b,a3 as ee,aF as te}from"./chunk-DhYw-kuD.js";import{u as ne,a as ae}from"./chunk-8e5kB75k.js";import{g as Q,s as j}from"./chunk-BjYP5sR0.js";import{f as ie}from"./chunk-DBKH8df9.js";import{a as oe}from"./chunk-xwEmqXCW.js";import{g as re}from"./chunk-DfTn_VfD.js";function se(t){const n=[.06,6,50];return typeof t=="string"&&t.length&&t.split(":").forEach((s,c)=>{const v=parseFloat(s);v&&(n[c]=v)}),n}const ue=F({name:"touch-swipe",beforeMount(t,{value:n,arg:s,modifiers:c}){if(c.mouse!==!0&&x.has.touch!==!0)return;const v=c.mouseCapture===!0?"Capture":"",e={handler:n,sensitivity:se(s),direction:Q(c),noop:G,mouseStart(i){j(i,e)&&H(i)&&(T(e,"temp",[[document,"mousemove","move",`notPassive${v}`],[document,"mouseup","end","notPassiveCapture"]]),e.start(i,!0))},touchStart(i){if(j(i,e)){const o=i.target;T(e,"temp",[[o,"touchmove","move","notPassiveCapture"],[o,"touchcancel","end","notPassiveCapture"],[o,"touchend","end","notPassiveCapture"]]),e.start(i)}},start(i,o){x.is.firefox===!0&&k(t,!0);const p=M(i);e.event={x:p.left,y:p.top,time:Date.now(),mouse:o===!0,dir:!1}},move(i){if(e.event===void 0)return;if(e.event.dir!==!1){D(i);return}const o=Date.now()-e.event.time;if(o===0)return;const p=M(i),h=p.left-e.event.x,u=Math.abs(h),g=p.top-e.event.y,l=Math.abs(g);if(e.event.mouse!==!0){if(ue.sensitivity[0]&&(e.event.dir=g<0?"up":"down"),e.direction.horizontal===!0&&u>l&&l<100&&P>e.sensitivity[0]&&(e.event.dir=h<0?"left":"right"),e.direction.up===!0&&ue.sensitivity[0]&&(e.event.dir="up"),e.direction.down===!0&&u0&&u<100&&f>e.sensitivity[0]&&(e.event.dir="down"),e.direction.left===!0&&u>l&&h<0&&l<100&&P>e.sensitivity[0]&&(e.event.dir="left"),e.direction.right===!0&&u>l&&h>0&&l<100&&P>e.sensitivity[0]&&(e.event.dir="right"),e.event.dir!==!1?(D(i),e.event.mouse===!0&&(document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),ie(),e.styleCleanup=w=>{e.styleCleanup=void 0,document.body.classList.remove("non-selectable");const y=()=>{document.body.classList.remove("no-pointer-events--children")};w===!0?setTimeout(y,50):y()}),e.handler({evt:i,touch:e.event.mouse!==!0,mouse:e.event.mouse,direction:e.event.dir,duration:o,distance:{x:u,y:l}})):e.end(i)},end(i){e.event!==void 0&&(E(e,"temp"),x.is.firefox===!0&&k(t,!1),e.styleCleanup!==void 0&&e.styleCleanup(!0),i!==void 0&&e.event.dir!==!1&&D(i),e.event=void 0)}};if(t.__qtouchswipe=e,c.mouse===!0){const i=c.mouseCapture===!0||c.mousecapture===!0?"Capture":"";T(e,"main",[[t,"mousedown","mouseStart",`passive${i}`]])}x.has.touch===!0&&T(e,"main",[[t,"touchstart","touchStart",`passive${c.capture===!0?"Capture":""}`],[t,"touchmove","noop","notPassiveCapture"]])},updated(t,n){const s=t.__qtouchswipe;s!==void 0&&(n.oldValue!==n.value&&(typeof n.value!="function"&&s.end(),s.handler=n.value),s.direction=Q(n.modifiers))},beforeUnmount(t){const n=t.__qtouchswipe;n!==void 0&&(E(n,"main"),E(n,"temp"),x.is.firefox===!0&&k(t,!1),n.styleCleanup!==void 0&&n.styleCleanup(),delete t.__qtouchswipe)}});function le(){let t=Object.create(null);return{getCache:(n,s)=>t[n]===void 0?t[n]=typeof s=="function"?s():s:t[n],setCache(n,s){t[n]=s},hasCache(n){return Object.hasOwnProperty.call(t,n)},clearCache(n){n!==void 0?delete t[n]:t=Object.create(null)}}}const ce={name:{required:!0},disable:Boolean},z={setup(t,{slots:n}){return()=>b("div",{class:"q-panel scroll",role:"tabpanel"},_(n.default))}},pe={modelValue:{required:!0},animated:Boolean,infinite:Boolean,swipeable:Boolean,vertical:Boolean,transitionPrev:String,transitionNext:String,transitionDuration:{type:[String,Number],default:300},keepAlive:Boolean,keepAliveInclude:[String,Array,RegExp],keepAliveExclude:[String,Array,RegExp],keepAliveMax:Number},de=["update:modelValue","beforeTransition","transition"];function ve(){const{props:t,emit:n,proxy:s}=R(),{getCache:c}=le(),{registerTimeout:v}=oe();let e,i;const o=O(null),p=O(null);function h(a){const r=t.vertical===!0?"up":"left";C((s.$q.lang.rtl===!0?-1:1)*(a.direction===r?1:-1))}const u=m(()=>[[ue,h,void 0,{horizontal:t.vertical!==!0,vertical:t.vertical,mouse:!0}]]),g=m(()=>t.transitionPrev||`slide-${t.vertical===!0?"down":"right"}`),l=m(()=>t.transitionNext||`slide-${t.vertical===!0?"up":"left"}`),P=m(()=>`--q-transition-duration: ${t.transitionDuration}ms`),f=m(()=>typeof t.modelValue=="string"||typeof t.modelValue=="number"?t.modelValue:String(t.modelValue)),w=m(()=>({include:t.keepAliveInclude,exclude:t.keepAliveExclude,max:t.keepAliveMax})),y=m(()=>t.keepAliveInclude!==void 0||t.keepAliveExclude!==void 0);Z(()=>t.modelValue,(a,r)=>{const d=q(a)===!0?A(a):-1;i!==!0&&$(d===-1?0:d{n("transition",a,r)},t.transitionDuration))});function B(){C(1)}function N(){C(-1)}function V(a){n("update:modelValue",a)}function q(a){return a!=null&&a!==""}function A(a){return e.findIndex(r=>r.props.name===a&&r.props.disable!==""&&r.props.disable!==!0)}function U(){return e.filter(a=>a.props.disable!==""&&a.props.disable!==!0)}function $(a){const r=a!==0&&t.animated===!0&&o.value!==-1?"q-transition--"+(a===-1?g.value:l.value):null;p.value!==r&&(p.value=r)}function C(a,r=o.value){let d=r+a;for(;d!==-1&&d{i=!1});return}d+=a}t.infinite===!0&&e.length!==0&&r!==-1&&r!==e.length&&C(a,a===-1?e.length:-1)}function I(){const a=A(t.modelValue);return o.value!==a&&(o.value=a),!0}function L(){const a=q(t.modelValue)===!0&&I()&&e[o.value];return t.keepAlive===!0?[b(te,w.value,[b(y.value===!0?c(f.value,()=>({...z,name:f.value})):z,{key:f.value,style:P.value},()=>a)])]:[b("div",{class:"q-panel scroll",style:P.value,key:f.value,role:"tabpanel"},[a])]}function W(){if(e.length!==0)return t.animated===!0?[b(ee,{name:p.value},L)]:L()}function X(a){return e=re(_(a.default,[])).filter(r=>r.props!==null&&r.props.slot===void 0&&q(r.props.name)===!0),e.length}function Y(){return e}return Object.assign(s,{next:B,previous:N,goTo:V}),{panelIndex:o,panelDirectives:u,updatePanelsList:X,updatePanelIndex:I,getPanelContent:W,getEnabledPanels:U,getPanels:Y,isValidPanelName:q,keepAliveProps:w,needsUniqueKeepAliveWrapper:y,goToPanelByOffset:C,goToPanel:V,nextPanel:B,previousPanel:N}}const xe=K({name:"QTabPanel",props:ce,setup(t,{slots:n}){return()=>b("div",{class:"q-tab-panel",role:"tabpanel"},_(n.default))}}),we=K({name:"QTabPanels",props:{...pe,...ne},emits:de,setup(t,{slots:n}){const s=R(),c=ae(t,s.proxy.$q),{updatePanelsList:v,getPanelContent:e,panelDirectives:i}=ve(),o=m(()=>"q-tab-panels q-panel-parent"+(c.value===!0?" q-tab-panels--dark q-dark":""));return()=>(v(n),J("div",{class:o.value},e(),"pan",t.swipeable,()=>i.value))}});export{we as Q,xe as a,le as u};