anq-modal-form
Version:
A powerful, customizable modal form component for Quasar Framework and Vue 3 applications. Features include responsive design, dynamic form generation, validation, animations, and seamless integration with Quasar's design system.
3 lines (2 loc) • 48 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.flex{display:flex}.hidden{display:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.border{border-width:1px}.border-solid{border-style:solid}.p-5{padding:1.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-bold{font-weight:700}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
(function(z,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(z=typeof globalThis<"u"?globalThis:z||self,o(z.anqModalForm={},z.Vue))})(this,function(z,o){"use strict";const ue={xs:18,sm:24,md:32,lg:38,xl:46},Se={size:String};function Ce(e,t=ue){return o.computed(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Ee(e,t,i,r){return Object.defineProperty(e,t,{get:i,set:r,enumerable:!0}),e}function V(e){return o.markRaw(o.defineComponent(e))}function Le(e){return o.markRaw(e)}function Y(e,t){return e!==void 0&&e()||t}function G(e,t){return e!==void 0?t.concat(e()):t}const $e="0 0 24 24",ce=e=>e,de=e=>`ionicons ${e}`,Pe={"mdi-":e=>`mdi ${e}`,"icon-":ce,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":de,"ion-ios":de,"ion-logo":de,"iconfont ":ce,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`,"i-":ce},_e={o_:"-outlined",r_:"-round",s_:"-sharp"},Te={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},ft=new RegExp("^("+Object.keys(Pe).join("|")+")"),mt=new RegExp("^("+Object.keys(_e).join("|")+")"),Be=new RegExp("^("+Object.keys(Te).join("|")+")"),ht=/^[Mm]\s?[-+]?\.?\d/,pt=/^img:/,gt=/^svguse:/,bt=/^ion-/,vt=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,Me=V({name:"QIcon",props:{...Se,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=o.getCurrentInstance(),r=Ce(e),n=o.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),s=o.computed(()=>{let a,l=e.name;if(l==="none"||!l)return{none:!0};if(i.iconMapFn!==null){const u=i.iconMapFn(l);if(u!==void 0)if(u.icon!==void 0){if(l=u.icon,l==="none"||!l)return{none:!0}}else return{cls:u.cls,content:u.content!==void 0?u.content:" "}}if(ht.test(l)===!0){const[u,w=$e]=l.split("|");return{svg:!0,viewBox:w,nodes:u.split("&&").map(d=>{const[f,y,q]=d.split("@@");return o.h("path",{style:y,d:f,transform:q})})}}if(pt.test(l)===!0)return{img:!0,src:l.substring(4)};if(gt.test(l)===!0){const[u,w=$e]=l.split("|");return{svguse:!0,src:u.substring(7),viewBox:w}}let m=" ";const h=l.match(ft);if(h!==null)a=Pe[h[1]](l);else if(vt.test(l)===!0)a=l;else if(bt.test(l)===!0)a=`ionicons ion-${i.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(Be.test(l)===!0){a="notranslate material-symbols";const u=l.match(Be);u!==null&&(l=l.substring(6),a+=Te[u[1]]),m=l}else{a="notranslate material-icons";const u=l.match(mt);u!==null&&(l=l.substring(2),a+=_e[u[1]]),m=l}return{cls:a,content:m}});return()=>{const a={class:n.value,style:r.value,"aria-hidden":"true"};return s.value.none===!0?o.h(e.tag,a,Y(t.default)):s.value.img===!0?o.h(e.tag,a,G(t.default,[o.h("img",{src:s.value.src})])):s.value.svg===!0?o.h(e.tag,a,G(t.default,[o.h("svg",{viewBox:s.value.viewBox||"0 0 24 24"},s.value.nodes)])):s.value.svguse===!0?o.h(e.tag,a,G(t.default,[o.h("svg",{viewBox:s.value.viewBox},[o.h("use",{"xlink:href":s.value.src})])])):(s.value.cls!==void 0&&(a.class+=" "+s.value.cls),o.h(e.tag,a,G(t.default,[s.value.content])))}}}),yt={size:{type:[String,Number],default:"1em"},color:String};function wt(e){return{cSize:o.computed(()=>e.size in ue?`${ue[e.size]}px`:e.size),classes:o.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const kt=V({name:"QSpinner",props:{...yt,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=wt(e);return()=>o.h("svg",{class:i.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[o.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function xt(e,t){const i=e.style;for(const r in t)i[r]=t[r]}function qt(e,t){if(e==null||e.contains(t)===!0)return!0;for(let i=e.nextElementSibling;i!==null;i=i.nextElementSibling)if(i.contains(t))return!0;return!1}const B={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(B,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch{}function St(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function Ct(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();const t=[];let i=e.target;for(;i;){if(t.push(i),i.tagName==="HTML")return t.push(document),t.push(window),t;i=i.parentElement}}function Oe(e){e.stopPropagation()}function Et(e){e.cancelable!==!1&&e.preventDefault()}function j(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Lt(e,t,i){const r=`__q_${t}_evt`;e[r]=e[r]!==void 0?e[r].concat(i):i,i.forEach(n=>{n[0].addEventListener(n[1],e[n[2]],B[n[3]])})}function $t(e,t){const i=`__q_${t}_evt`;e[i]!==void 0&&(e[i].forEach(r=>{r[0].removeEventListener(r[1],e[r[2]],B[r[3]])}),e[i]=void 0)}function Pt(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function J(e,t){return Pt(e)===!0?!1:[].concat(t).includes(e.keyCode)}function _t(e,t=250){let i=!1,r;return function(){return i===!1&&(i=!0,setTimeout(()=>{i=!1},t),r=e.apply(this,arguments)),r}}function Re(e,t,i,r){i.modifiers.stop===!0&&Oe(e);const n=i.modifiers.color;let s=i.modifiers.center;s=s===!0||r===!0;const a=document.createElement("span"),l=document.createElement("span"),m=St(e),{left:h,top:u,width:w,height:d}=t.getBoundingClientRect(),f=Math.sqrt(w*w+d*d),y=f/2,q=`${(w-f)/2}px`,p=s?q:`${m.left-h-y}px`,S=`${(d-f)/2}px`,g=s?S:`${m.top-u-y}px`;l.className="q-ripple__inner",xt(l,{height:`${f}px`,width:`${f}px`,transform:`translate3d(${p},${g},0) scale3d(.2,.2,1)`,opacity:0}),a.className=`q-ripple${n?" text-"+n:""}`,a.setAttribute("dir","ltr"),a.appendChild(l),t.appendChild(a);const v=()=>{a.remove(),clearTimeout(C)};i.abort.push(v);let C=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${q},${S},0) scale3d(1,1,1)`,l.style.opacity=.2,C=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,C=setTimeout(()=>{a.remove(),i.abort.splice(i.abort.indexOf(v),1)},275)},250)},50)}function Ve(e,{modifiers:t,value:i,arg:r}){const n=Object.assign({},e.cfg.ripple,t,i);e.modifiers={early:n.early===!0,stop:n.stop===!0,center:n.center===!0,color:n.color||r,keyCodes:[].concat(n.keyCodes||13)}}const Tt=Le({name:"ripple",beforeMount(e,t){const i=t.instance.$.appContext.config.globalProperties.$q.config||{};if(i.ripple===!1)return;const r={cfg:i,enabled:t.value!==!1,modifiers:{},abort:[],start(n){r.enabled===!0&&n.qSkipRipple!==!0&&n.type===(r.modifiers.early===!0?"pointerdown":"click")&&Re(n,e,r,n.qKeyEvent===!0)},keystart:_t(n=>{r.enabled===!0&&n.qSkipRipple!==!0&&J(n,r.modifiers.keyCodes)===!0&&n.type===`key${r.modifiers.early===!0?"down":"up"}`&&Re(n,e,r,!0)},300)};Ve(r,t),e.__qripple=r,Lt(r,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const i=e.__qripple;i!==void 0&&(i.enabled=t.value!==!1,i.enabled===!0&&Object(t.value)===t.value&&Ve(i,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(i=>{i()}),$t(t,"main"),delete e._qripple)}}),je={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Bt=Object.keys(je),Mt={align:{type:String,validator:e=>Bt.includes(e)}};function Ot(e){return o.computed(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${je[t]}`})}function oe(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:t}=e.$;for(;Object(t)===t;){if(Object(t.proxy)===t.proxy)return t.proxy;t=t.parent}}function De(e){return e.appContext.config.globalProperties.$router!==void 0}function fe(e){return e.isUnmounted===!0||e.isDeactivated===!0}function Fe(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function ze(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Rt(e,t){for(const i in t){const r=t[i],n=e[i];if(typeof r=="string"){if(r!==n)return!1}else if(Array.isArray(n)===!1||n.length!==r.length||r.some((s,a)=>s!==n[a]))return!1}return!0}function Ie(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((i,r)=>i===t[r]):e.length===1&&e[0]===t}function Vt(e,t){return Array.isArray(e)===!0?Ie(e,t):Array.isArray(t)===!0?Ie(t,e):e===t}function jt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(Vt(e[i],t[i])===!1)return!1;return!0}const Dt={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function Ft({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const i=o.getCurrentInstance(),{props:r,proxy:n,emit:s}=i,a=De(i),l=o.computed(()=>r.disable!==!0&&r.href!==void 0),m=t===!0?o.computed(()=>a===!0&&r.disable!==!0&&l.value!==!0&&r.to!==void 0&&r.to!==null&&r.to!==""):o.computed(()=>a===!0&&l.value!==!0&&r.to!==void 0&&r.to!==null&&r.to!==""),h=o.computed(()=>m.value===!0?g(r.to):null),u=o.computed(()=>h.value!==null),w=o.computed(()=>l.value===!0||u.value===!0),d=o.computed(()=>r.type==="a"||w.value===!0?"a":r.tag||e||"div"),f=o.computed(()=>l.value===!0?{href:r.href,target:r.target}:u.value===!0?{href:h.value.href,target:r.target}:{}),y=o.computed(()=>{if(u.value===!1)return-1;const{matched:b}=h.value,{length:E}=b,$=b[E-1];if($===void 0)return-1;const P=n.$route.matched;if(P.length===0)return-1;const R=P.findIndex(ze.bind(null,$));if(R!==-1)return R;const D=Fe(b[E-2]);return E>1&&Fe($)===D&&P[P.length-1].path!==D?P.findIndex(ze.bind(null,b[E-2])):R}),q=o.computed(()=>u.value===!0&&y.value!==-1&&Rt(n.$route.params,h.value.params)),p=o.computed(()=>q.value===!0&&y.value===n.$route.matched.length-1&&jt(n.$route.params,h.value.params)),S=o.computed(()=>u.value===!0?p.value===!0?` ${r.exactActiveClass} ${r.activeClass}`:r.exact===!0?"":q.value===!0?` ${r.activeClass}`:"":"");function g(b){try{return n.$router.resolve(b)}catch{}return null}function v(b,{returnRouterError:E,to:$=r.to,replace:P=r.replace}={}){if(r.disable===!0)return b.preventDefault(),Promise.resolve(!1);if(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey||b.button!==void 0&&b.button!==0||r.target==="_blank")return Promise.resolve(!1);b.preventDefault();const R=n.$router[P===!0?"replace":"push"]($);return E===!0?R:R.then(()=>{}).catch(()=>{})}function C(b){if(u.value===!0){const E=$=>v(b,$);s("click",b,E),b.defaultPrevented!==!0&&E()}else s("click",b)}return{hasRouterLink:u,hasHrefLink:l,hasLink:w,linkTag:d,resolvedLink:h,linkIsActive:q,linkIsExactActive:p,linkClass:S,linkAttrs:f,getLink:g,navigateToRouterLink:v,navigateOnClick:C}}const He={none:0,xs:4,sm:8,md:16,lg:24,xl:32},zt={xs:8,sm:10,md:14,lg:20,xl:24},It=["button","submit","reset"],Ht=/[^\s]\/[^\s]/,Nt=["flat","outline","push","unelevated"];function At(e,t){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t}const Kt={...{...Se,...Dt,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Nt.reduce((e,t)=>(e[t]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Mt.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},round:Boolean};function Qt(e){const t=Ce(e,zt),i=Ot(e),{hasRouterLink:r,hasLink:n,linkTag:s,linkAttrs:a,navigateOnClick:l}=Ft({fallbackTag:"button"}),m=o.computed(()=>{const p=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},p,{padding:e.padding.split(/\s+/).map(S=>S in He?He[S]+"px":S).join(" "),minWidth:"0",minHeight:"0"}):p}),h=o.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),u=o.computed(()=>e.disable!==!0&&e.loading!==!0),w=o.computed(()=>u.value===!0?e.tabindex||0:-1),d=o.computed(()=>At(e,"standard")),f=o.computed(()=>{const p={tabindex:w.value};return n.value===!0?Object.assign(p,a.value):It.includes(e.type)===!0&&(p.type=e.type),s.value==="a"?(e.disable===!0?p["aria-disabled"]="true":p.href===void 0&&(p.role="button"),r.value!==!0&&Ht.test(e.type)===!0&&(p.type=e.type)):e.disable===!0&&(p.disabled="",p["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(p,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),p}),y=o.computed(()=>{let p;e.color!==void 0?e.flat===!0||e.outline===!0?p=`text-${e.textColor||e.color}`:p=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(p=`text-${e.textColor}`);const S=e.round===!0?"round":`rectangle${h.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${d.value} q-btn--${S}`+(p!==void 0?" "+p:"")+(u.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),q=o.computed(()=>i.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:y,style:m,innerClasses:q,attributes:f,hasLink:n,linkTag:s,navigateOnClick:l,isActionable:u}}const{passiveCapture:_}=B;let Q=null,W=null,U=null;const me=V({name:"QBtn",props:{...Kt,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:i}){const{proxy:r}=o.getCurrentInstance(),{classes:n,style:s,innerClasses:a,attributes:l,hasLink:m,linkTag:h,navigateOnClick:u,isActionable:w}=Qt(e),d=o.ref(null),f=o.ref(null);let y=null,q,p=null;const S=o.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),g=o.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:m.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),v=o.computed(()=>({center:e.round})),C=o.computed(()=>{const c=Math.max(0,Math.min(100,e.percentage));return c>0?{transition:"transform 0.6s",transform:`translateX(${c-100}%)`}:{}}),b=o.computed(()=>{if(e.loading===!0)return{onMousedown:K,onTouchstart:K,onClick:K,onKeydown:K,onKeyup:K};if(w.value===!0){const c={onClick:$,onKeydown:P,onMousedown:D};if(r.$q.platform.has.touch===!0){const x=e.onTouchstart!==void 0?"":"Passive";c[`onTouchstart${x}`]=R}return c}return{onClick:j}}),E=o.computed(()=>({ref:d,class:"q-btn q-btn-item non-selectable no-outline "+n.value,style:s.value,...l.value,...b.value}));function $(c){if(d.value!==null){if(c!==void 0){if(c.defaultPrevented===!0)return;const x=document.activeElement;if(e.type==="submit"&&x!==document.body&&d.value.contains(x)===!1&&x.contains(d.value)===!1){c.qAvoidFocus!==!0&&d.value.focus();const O=()=>{var F;document.removeEventListener("keydown",j,!0),document.removeEventListener("keyup",O,_),(F=d.value)==null||F.removeEventListener("blur",O,_)};document.addEventListener("keydown",j,!0),document.addEventListener("keyup",O,_),d.value.addEventListener("blur",O,_)}}u(c)}}function P(c){d.value!==null&&(i("keydown",c),J(c,[13,32])===!0&&W!==d.value&&(W!==null&&A(),c.defaultPrevented!==!0&&(c.qAvoidFocus!==!0&&d.value.focus(),W=d.value,d.value.classList.add("q-btn--active"),document.addEventListener("keyup",T,!0),d.value.addEventListener("blur",T,_)),j(c)))}function R(c){d.value!==null&&(i("touchstart",c),c.defaultPrevented!==!0&&(Q!==d.value&&(Q!==null&&A(),Q=d.value,y=c.target,y.addEventListener("touchcancel",T,_),y.addEventListener("touchend",T,_)),q=!0,p!==null&&clearTimeout(p),p=setTimeout(()=>{p=null,q=!1},200)))}function D(c){d.value!==null&&(c.qSkipRipple=q===!0,i("mousedown",c),c.defaultPrevented!==!0&&U!==d.value&&(U!==null&&A(),U=d.value,d.value.classList.add("q-btn--active"),document.addEventListener("mouseup",T,_)))}function T(c){if(d.value!==null&&!((c==null?void 0:c.type)==="blur"&&document.activeElement===d.value)){if((c==null?void 0:c.type)==="keyup"){if(W===d.value&&J(c,[13,32])===!0){const x=new MouseEvent("click",c);x.qKeyEvent=!0,c.defaultPrevented===!0&&Et(x),c.cancelBubble===!0&&Oe(x),d.value.dispatchEvent(x),j(c),c.qKeyEvent=!0}i("keyup",c)}A()}}function A(c){var O,F;const x=f.value;c!==!0&&(Q===d.value||U===d.value)&&x!==null&&x!==document.activeElement&&(x.setAttribute("tabindex",-1),x.focus()),Q===d.value&&(y!==null&&(y.removeEventListener("touchcancel",T,_),y.removeEventListener("touchend",T,_)),Q=y=null),U===d.value&&(document.removeEventListener("mouseup",T,_),U=null),W===d.value&&(document.removeEventListener("keyup",T,!0),(O=d.value)==null||O.removeEventListener("blur",T,_),W=null),(F=d.value)==null||F.classList.remove("q-btn--active")}function K(c){j(c),c.qSkipRipple=!0}return o.onBeforeUnmount(()=>{A(!0)}),Object.assign(r,{click:c=>{w.value===!0&&$(c)}}),()=>{let c=[];e.icon!==void 0&&c.push(o.h(Me,{name:e.icon,left:e.stack!==!0&&S.value===!0,role:"img"})),S.value===!0&&c.push(o.h("span",{class:"block"},[e.label])),c=G(t.default,c),e.iconRight!==void 0&&e.round===!1&&c.push(o.h(Me,{name:e.iconRight,right:e.stack!==!0&&S.value===!0,role:"img"}));const x=[o.h("span",{class:"q-focus-helper",ref:f})];return e.loading===!0&&e.percentage!==void 0&&x.push(o.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[o.h("span",{class:"q-btn__progress-indicator fit block",style:C.value})])),x.push(o.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+a.value},c)),e.loading!==null&&x.push(o.h(o.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[o.h("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[o.h(kt)])]:null)),o.withDirectives(o.h(h.value,E.value,x),[[Tt,g.value,void 0,v.value]])}}}),he=V({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(e,{slots:t}){const i=o.computed(()=>`q-card__section q-card__section--${e.horizontal===!0?"horiz row no-wrap":"vert"}`);return()=>o.h(e.tag,{class:i.value},Y(t.default))}}),Ne={dark:{type:Boolean,default:null}};function Ae(e,t){return o.computed(()=>e.dark===null?t.dark.isActive:e.dark)}const Wt={true:"inset",item:"item-inset","item-thumbnail":"item-thumbnail-inset"},pe={xs:2,sm:4,md:8,lg:16,xl:24},Ut=V({name:"QSeparator",props:{...Ne,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){const t=o.getCurrentInstance(),i=Ae(e,t.proxy.$q),r=o.computed(()=>e.vertical===!0?"vertical":"horizontal"),n=o.computed(()=>` q-separator--${r.value}`),s=o.computed(()=>e.inset!==!1?`${n.value}-${Wt[e.inset]}`:""),a=o.computed(()=>`q-separator${n.value}${s.value}`+(e.color!==void 0?` bg-${e.color}`:"")+(i.value===!0?" q-separator--dark":"")),l=o.computed(()=>{const m={};if(e.size!==void 0&&(m[e.vertical===!0?"width":"height"]=e.size),e.spaced!==!1){const h=e.spaced===!0?`${pe.md}px`:e.spaced in pe?`${pe[e.spaced]}px`:e.spaced,u=e.vertical===!0?["Left","Right"]:["Top","Bottom"];m[`margin${u[0]}`]=m[`margin${u[1]}`]=h}return m});return()=>o.h("hr",{class:a.value,style:l.value,"aria-orientation":r.value})}});let Z=[],ee=[];function Ke(e){ee=ee.filter(t=>t!==e)}function Xt(e){Ke(e),ee.push(e)}function Qe(e){Ke(e),ee.length===0&&Z.length!==0&&(Z[Z.length-1](),Z=[])}function We(e){ee.length===0?e():Z.push(e)}const Yt="_q_fo_",Gt=V({name:"QForm",props:{autofocus:Boolean,noErrorFocus:Boolean,noResetFocus:Boolean,greedy:Boolean,onSubmit:Function},emits:["reset","validationSuccess","validationError"],setup(e,{slots:t,emit:i}){const r=o.getCurrentInstance(),n=o.ref(null);let s=0;const a=[];function l(f){const y=typeof f=="boolean"?f:e.noErrorFocus!==!0,q=++s,p=(v,C)=>{i(`validation${v===!0?"Success":"Error"}`,C)},S=v=>{const C=v.validate();return typeof C.then=="function"?C.then(b=>({valid:b,comp:v}),b=>({valid:!1,comp:v,err:b})):Promise.resolve({valid:C,comp:v})};return(e.greedy===!0?Promise.all(a.map(S)).then(v=>v.filter(C=>C.valid!==!0)):a.reduce((v,C)=>v.then(()=>S(C).then(b=>{if(b.valid===!1)return Promise.reject(b)})),Promise.resolve()).catch(v=>[v])).then(v=>{if(v===void 0||v.length===0)return q===s&&p(!0),!0;if(q===s){const{comp:C,err:b}=v[0];if(b!==void 0&&console.error(b),p(!1,C),y===!0){const E=v.find(({comp:$})=>typeof $.focus=="function"&&fe($.$)===!1);E!==void 0&&E.comp.focus()}}return!1})}function m(){s++,a.forEach(f=>{typeof f.resetValidation=="function"&&f.resetValidation()})}function h(f){f!==void 0&&j(f);const y=s+1;l().then(q=>{y===s&&q===!0&&(e.onSubmit!==void 0?i("submit",f):(f==null?void 0:f.target)!==void 0&&typeof f.target.submit=="function"&&f.target.submit())})}function u(f){f!==void 0&&j(f),i("reset"),o.nextTick(()=>{m(),e.autofocus===!0&&e.noResetFocus!==!0&&w()})}function w(){We(()=>{if(n.value===null)return;const f=n.value.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||n.value.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||n.value.querySelector("[autofocus], [data-autofocus]")||Array.prototype.find.call(n.value.querySelectorAll("[tabindex]"),y=>y.tabIndex!==-1);f==null||f.focus({preventScroll:!0})})}o.provide(Yt,{bindComponent(f){a.push(f)},unbindComponent(f){const y=a.indexOf(f);y!==-1&&a.splice(y,1)}});let d=!1;return o.onDeactivated(()=>{d=!0}),o.onActivated(()=>{d===!0&&e.autofocus===!0&&w()}),o.onMounted(()=>{e.autofocus===!0&&w()}),Object.assign(r.proxy,{validate:l,resetValidation:m,submit:h,reset:u,focus:w,getValidationComponents:()=>a}),()=>o.h("form",{class:"q-form",ref:n,onSubmit:h,onReset:u},Y(t.default))}}),ie=o.ref(!1);let ge;function Jt(e,t){const i=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[4]||i[2]||"0",platform:t[0]||""}}function Zt(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}const Ue="ontouchstart"in window||window.navigator.maxTouchPoints>0;function en(e){const t=e.toLowerCase(),i=Zt(t),r=Jt(t,i),n={mobile:!1,desktop:!1,cordova:!1,capacitor:!1,nativeMobile:!1,electron:!1,bex:!1,linux:!1,mac:!1,win:!1,cros:!1,chrome:!1,firefox:!1,opera:!1,safari:!1,vivaldi:!1,edge:!1,edgeChromium:!1,ie:!1,webkit:!1,android:!1,ios:!1,ipad:!1,iphone:!1,ipod:!1,kindle:!1,winphone:!1,blackberry:!1,playbook:!1,silk:!1};r.browser&&(n[r.browser]=!0,n.version=r.version,n.versionNumber=parseInt(r.version,10)),r.platform&&(n[r.platform]=!0);const s=n.android||n.ios||n.bb||n.blackberry||n.ipad||n.iphone||n.ipod||n.kindle||n.playbook||n.silk||n["windows phone"];if(s===!0||t.indexOf("mobile")!==-1?n.mobile=!0:n.desktop=!0,n["windows phone"]&&(n.winphone=!0,delete n["windows phone"]),n.edga||n.edgios||n.edg?(n.edge=!0,r.browser="edge"):n.crios?(n.chrome=!0,r.browser="chrome"):n.fxios&&(n.firefox=!0,r.browser="firefox"),(n.ipod||n.ipad||n.iphone)&&(n.ios=!0),n.vivaldi&&(r.browser="vivaldi",n.vivaldi=!0),(n.chrome||n.opr||n.safari||n.vivaldi||n.mobile===!0&&n.ios!==!0&&s!==!0)&&(n.webkit=!0),n.opr&&(r.browser="opera",n.opera=!0),n.safari&&(n.blackberry||n.bb?(r.browser="blackberry",n.blackberry=!0):n.playbook?(r.browser="playbook",n.playbook=!0):n.android?(r.browser="android",n.android=!0):n.kindle?(r.browser="kindle",n.kindle=!0):n.silk&&(r.browser="silk",n.silk=!0)),n.name=r.browser,n.platform=r.platform,t.indexOf("electron")!==-1)n.electron=!0;else if(document.location.href.indexOf("-extension://")!==-1)n.bex=!0;else{if(window.Capacitor!==void 0?(n.capacitor=!0,n.nativeMobile=!0,n.nativeMobileWrapper="capacitor"):(window._cordovaNative!==void 0||window.cordova!==void 0)&&(n.cordova=!0,n.nativeMobile=!0,n.nativeMobileWrapper="cordova"),ie.value===!0&&(ge={is:{...n}}),Ue===!0&&n.mac===!0&&(n.desktop===!0&&n.safari===!0||n.nativeMobile===!0&&n.android!==!0&&n.ios!==!0&&n.ipad!==!0)){delete n.mac,delete n.desktop;const a=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(n,{mobile:!0,ios:!0,platform:a,[a]:!0})}n.mobile!==!0&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete n.desktop,n.mobile=!0)}return n}const Xe=navigator.userAgent||navigator.vendor||window.opera,tn={has:{touch:!1,webStorage:!1},within:{iframe:!1}},M={userAgent:Xe,is:en(Xe),has:{touch:Ue},within:{iframe:window.self!==window.top}},Ye={install(e){const{$q:t}=e;ie.value===!0?(e.onSSRHydrated.push(()=>{Object.assign(t.platform,M),ie.value=!1}),t.platform=o.reactive(this)):t.platform=this}};{let e;Ee(M.has,"webStorage",()=>{if(e!==void 0)return e;try{if(window.localStorage)return e=!0,!0}catch{}return e=!1,!1}),Object.assign(Ye,M),ie.value===!0&&(Object.assign(Ye,ge,tn),ge=null)}function nn(e,t,i){function r(){}return o.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:r,addToHistory(){}}}function on(){let e=null;const t=o.getCurrentInstance();function i(){e!==null&&(clearTimeout(e),e=null)}return o.onDeactivated(i),o.onBeforeUnmount(i),{removeTimeout:i,registerTimeout(r,n){i(),fe(t)===!1&&(e=setTimeout(()=>{e=null,r()},n))}}}function rn(){let e;const t=o.getCurrentInstance();function i(){e=void 0}return o.onDeactivated(i),o.onBeforeUnmount(i),{removeTick:i,registerTick(r){e=r,o.nextTick(()=>{e===r&&(fe(t)===!1&&e(),e=void 0)})}}}const ln={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},an=["beforeShow","show","beforeHide","hide"];function sn({showing:e,canShow:t,hideOnRouteChange:i,handleShow:r,handleHide:n,processOnMount:s}){const a=o.getCurrentInstance(),{props:l,emit:m,proxy:h}=a;let u;function w(g){e.value===!0?y(g):d(g)}function d(g){if(l.disable===!0||(g==null?void 0:g.qAnchorHandled)===!0||t!==void 0&&t(g)!==!0)return;const v=l["onUpdate:modelValue"]!==void 0;v===!0&&(m("update:modelValue",!0),u=g,o.nextTick(()=>{u===g&&(u=void 0)})),(l.modelValue===null||v===!1)&&f(g)}function f(g){e.value!==!0&&(e.value=!0,m("beforeShow",g),r!==void 0?r(g):m("show",g))}function y(g){if(l.disable===!0)return;const v=l["onUpdate:modelValue"]!==void 0;v===!0&&(m("update:modelValue",!1),u=g,o.nextTick(()=>{u===g&&(u=void 0)})),(l.modelValue===null||v===!1)&&q(g)}function q(g){e.value!==!1&&(e.value=!1,m("beforeHide",g),n!==void 0?n(g):m("hide",g))}function p(g){l.disable===!0&&g===!0?l["onUpdate:modelValue"]!==void 0&&m("update:modelValue",!1):g===!0!==e.value&&(g===!0?f:q)(u)}o.watch(()=>l.modelValue,p),i!==void 0&&De(a)===!0&&o.watch(()=>h.$route.fullPath,()=>{i.value===!0&&e.value===!0&&y()}),o.onMounted(()=>{p(l.modelValue)});const S={show:d,hide:y,toggle:w};return Object.assign(h,S),S}const un={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function cn(e,t=()=>{},i=()=>{}){return{transitionProps:o.computed(()=>{const r=`q-transition--${e.transitionShow||t()}`,n=`q-transition--${e.transitionHide||i()}`;return{appear:!0,enterFromClass:`${r}-enter-from`,enterActiveClass:`${r}-enter-active`,enterToClass:`${r}-enter-to`,leaveFromClass:`${n}-leave-from`,leaveActiveClass:`${n}-leave-active`,leaveToClass:`${n}-leave-to`}}),transitionStyle:o.computed(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}const Ge={};let dn=1,fn=document.body;function mn(e,t){const i=document.createElement("div");if(i.id=`q-portal--${t}--${dn++}`,Ge.globalNodes!==void 0){const r=Ge.globalNodes.class;r!==void 0&&(i.className=r)}return fn.appendChild(i),i}function hn(e){e.remove()}const re=[];function pn(e){return re.find(t=>t.contentEl!==null&&t.contentEl.contains(e))}function gn(e,t){do{if(e.$options.name==="QMenu"){if(e.hide(t),e.$props.separateClosePopup===!0)return oe(e)}else if(e.__qPortal===!0){const i=oe(e);return(i==null?void 0:i.$options.name)==="QPopupProxy"?(e.hide(t),i):e}e=oe(e)}while(e!=null)}function bn(e,t,i){for(;i!==0&&e!==void 0&&e!==null;){if(e.__qPortal===!0){if(i--,e.$options.name==="QMenu"){e=gn(e,t);continue}e.hide(t)}e=oe(e)}}const vn=V({name:"QPortal",setup(e,{slots:t}){return()=>t.default()}});function yn(e){for(e=e.parent;e!=null;){if(e.type.name==="QGlobalDialog")return!0;if(e.type.name==="QDialog"||e.type.name==="QMenu")return!1;e=e.parent}return!1}function wn(e,t,i,r){const n=o.ref(!1),s=o.ref(!1);let a=null;const l={},m=yn(e);function h(w){if(w===!0){Qe(l),s.value=!0;return}s.value=!1,n.value===!1&&(m===!1&&a===null&&(a=mn(!1,r)),n.value=!0,re.push(e.proxy),Xt(l))}function u(w){if(s.value=!1,w!==!0)return;Qe(l),n.value=!1;const d=re.indexOf(e.proxy);d!==-1&&re.splice(d,1),a!==null&&(hn(a),a=null)}return o.onUnmounted(()=>{u(!0)}),e.proxy.__qPortal=!0,Ee(e.proxy,"contentEl",()=>t.value),{showPortal:h,hidePortal:u,portalIsActive:n,portalIsAccessible:s,renderPortal:()=>m===!0?i():n.value===!0?[o.h(o.Teleport,{to:a},o.h(vn,i))]:void 0}}function kn(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function xn(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function qn(e,t=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}let te=0,be,ve,ne,ye=!1,Je,Ze,et,I=null;function Sn(e){Cn(e)&&j(e)}function Cn(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=Ct(e),i=e.shiftKey&&!e.deltaX,r=!i&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),n=i||r?e.deltaY:e.deltaX;for(let s=0;s<t.length;s++){const a=t[s];if(qn(a,r))return r?n<0&&a.scrollTop===0?!0:n>0&&a.scrollTop+a.clientHeight===a.scrollHeight:n<0&&a.scrollLeft===0?!0:n>0&&a.scrollLeft+a.clientWidth===a.scrollWidth}return!0}function tt(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function le(e){ye!==!0&&(ye=!0,requestAnimationFrame(()=>{ye=!1;const{height:t}=e.target,{clientHeight:i,scrollTop:r}=document.scrollingElement;(ne===void 0||t!==window.innerHeight)&&(ne=i-t,document.scrollingElement.scrollTop=r),r>ne&&(document.scrollingElement.scrollTop-=Math.ceil((r-ne)/8))}))}function nt(e){const t=document.body,i=window.visualViewport!==void 0;if(e==="add"){const{overflowY:r,overflowX:n}=window.getComputedStyle(t);be=xn(window),ve=kn(window),Je=t.style.left,Ze=t.style.top,et=window.location.href,t.style.left=`-${be}px`,t.style.top=`-${ve}px`,n!=="hidden"&&(n==="scroll"||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),r!=="hidden"&&(r==="scroll"||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,M.is.ios===!0&&(i===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",le,B.passiveCapture),window.visualViewport.addEventListener("scroll",le,B.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",tt,B.passiveCapture))}M.is.desktop===!0&&M.is.mac===!0&&window[`${e}EventListener`]("wheel",Sn,B.notPassive),e==="remove"&&(M.is.ios===!0&&(i===!0?(window.visualViewport.removeEventListener("resize",le,B.passiveCapture),window.visualViewport.removeEventListener("scroll",le,B.passiveCapture)):window.removeEventListener("scroll",tt,B.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=Je,t.style.top=Ze,window.location.href===et&&window.scrollTo(be,ve),ne=void 0)}function En(e){let t="add";if(e===!0){if(te++,I!==null){clearTimeout(I),I=null;return}if(te>1)return}else{if(te===0||(te--,te>0))return;if(t="remove",M.is.ios===!0&&M.is.nativeMobile===!0){I!==null&&clearTimeout(I),I=setTimeout(()=>{nt(t),I=null},100);return}}nt(t)}function Ln(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t===!0)&&(e=t,En(t))}}}const H=[];let X;function $n(e){X=e.keyCode===27}function Pn(){X===!0&&(X=!1)}function _n(e){X===!0&&(X=!1,J(e,27)===!0&&H[H.length-1](e))}function ot(e){window[e]("keydown",$n),window[e]("blur",Pn),window[e]("keyup",_n),X=!1}function Tn(e){M.is.desktop===!0&&(H.push(e),H.length===1&&ot("addEventListener"))}function it(e){const t=H.indexOf(e);t!==-1&&(H.splice(t,1),H.length===0&&ot("removeEventListener"))}const N=[];function rt(e){N[N.length-1](e)}function Bn(e){M.is.desktop===!0&&(N.push(e),N.length===1&&document.body.addEventListener("focusin",rt))}function lt(e){const t=N.indexOf(e);t!==-1&&(N.splice(t,1),N.length===0&&document.body.removeEventListener("focusin",rt))}let ae=0;const Mn={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},at={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},On=V({name:"QDialog",inheritAttrs:!1,props:{...ln,...un,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...an,"shake","click","escapeKey"],setup(e,{slots:t,emit:i,attrs:r}){const n=o.getCurrentInstance(),s=o.ref(null),a=o.ref(!1),l=o.ref(!1);let m=null,h=null,u,w;const d=o.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:f}=Ln(),{registerTimeout:y}=on(),{registerTick:q,removeTick:p}=rn(),{transitionProps:S,transitionStyle:g}=cn(e,()=>at[e.position][0],()=>at[e.position][1]),v=o.computed(()=>g.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:C,hidePortal:b,portalIsAccessible:E,renderPortal:$}=wn(n,s,zn,"dialog"),{hide:P}=sn({showing:a,hideOnRouteChange:d,handleShow:K,handleHide:c,processOnMount:!0});nn(a);const R=o.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${Mn[e.position]}`+(l.value===!0?" q-dialog__inner--animating":"")+(e.fullWidth===!0?" q-dialog__inner--fullwidth":"")+(e.fullHeight===!0?" q-dialog__inner--fullheight":"")+(e.square===!0?" q-dialog__inner--square":"")),D=o.computed(()=>a.value===!0&&e.seamless!==!0),T=o.computed(()=>e.autoClose===!0?{onClick:Dn}:{}),A=o.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${D.value===!0?"modal":"seamless"}`,r.class]);o.watch(()=>e.maximized,k=>{a.value===!0&&we(k)}),o.watch(D,k=>{f(k),k===!0?(Bn(ke),Tn(F)):(lt(ke),it(F))});function K(k){var L;h=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,we(e.maximized),C(),l.value=!0,e.noFocus!==!0?((L=document.activeElement)==null||L.blur(),q(x)):p(),y(()=>{if(n.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:se,bottom:xe}=document.activeElement.getBoundingClientRect(),{innerHeight:dt}=window,qe=window.visualViewport!==void 0?window.visualViewport.height:dt;se>0&&xe>qe/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-qe,xe>=dt?1/0:Math.ceil(document.scrollingElement.scrollTop+xe-qe/2))),document.activeElement.scrollIntoView()}w=!0,s.value.click(),w=!1}C(!0),l.value=!1,i("show",k)},e.transitionDuration)}function c(k){p(),ct(!0),l.value=!0,b(),h!==null&&((((k==null?void 0:k.type.indexOf("key"))===0?h.closest('[tabindex]:not([tabindex^="-"])'):void 0)||h).focus(),h=null),y(()=>{b(!0),l.value=!1,i("hide",k)},e.transitionDuration)}function x(k){We(()=>{let L=s.value;if(L!==null){if(k!==void 0){const se=L.querySelector(k);if(se!==null){se.focus({preventScroll:!0});return}}L.contains(document.activeElement)!==!0&&(L=L.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||L.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||L.querySelector("[autofocus], [data-autofocus]")||L,L.focus({preventScroll:!0}))}})}function O(k){k&&typeof k.focus=="function"?k.focus({preventScroll:!0}):x(),i("shake");const L=s.value;L!==null&&(L.classList.remove("q-animate--scale"),L.classList.add("q-animate--scale"),m!==null&&clearTimeout(m),m=setTimeout(()=>{m=null,s.value!==null&&(L.classList.remove("q-animate--scale"),x())},170))}function F(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&O():(i("escapeKey"),P()))}function ct(k){m!==null&&(clearTimeout(m),m=null),(k===!0||a.value===!0)&&(we(!1),e.seamless!==!0&&(f(!1),lt(ke),it(F))),k!==!0&&(h=null)}function we(k){k===!0?u!==!0&&(ae<1&&document.body.classList.add("q-body--dialog"),ae++,u=!0):u===!0&&(ae<2&&document.body.classList.remove("q-body--dialog"),ae--,u=!1)}function Dn(k){w!==!0&&(P(k),i("click",k))}function Fn(k){e.persistent!==!0&&e.noBackdropDismiss!==!0?P(k):e.noShake!==!0&&O()}function ke(k){e.allowFocusOutside!==!0&&E.value===!0&&qt(s.value,k.target)!==!0&&x('[tabindex]:not([tabindex="-1"])')}Object.assign(n.proxy,{focus:x,shake:O,__updateRefocusTarget(k){h=k||null}}),o.onBeforeUnmount(ct);function zn(){return o.h("div",{role:"dialog","aria-modal":D.value===!0?"true":"false",...r,class:A.value},[o.h(o.Transition,{name:"q-transition--fade",appear:!0},()=>D.value===!0?o.h("div",{class:"q-dialog__backdrop fixed-full",style:v.value,"aria-hidden":"true",tabindex:-1,onClick:Fn}):null),o.h(o.Transition,S.value,()=>a.value===!0?o.h("div",{ref:s,class:R.value,style:g.value,tabindex:-1,...T.value},Y(t.default)):null)])}return $}});function st(e){if(e===!1)return 0;if(e===!0||e===void 0)return 1;const t=parseInt(e,10);return isNaN(t)?0:t}const ut=Le({name:"close-popup",beforeMount(e,{value:t}){const i={depth:st(t),handler(r){i.depth!==0&&setTimeout(()=>{const n=pn(e);n!==void 0&&bn(n,r,i.depth)})},handlerKey(r){J(r,13)===!0&&i.handler(r)}};e.__qclosepopup=i,e.addEventListener("click",i.handler),e.addEventListener("keyup",i.handlerKey)},updated(e,{value:t,oldValue:i}){t!==i&&(e.__qclosepopup.depth=st(t))},beforeUnmount(e){const t=e.__qclosepopup;e.removeEventListener("click",t.handler),e.removeEventListener("keyup",t.handlerKey),delete e.__qclosepopup}}),Rn=V({name:"QCard",props:{...Ne,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=o.getCurrentInstance(),r=Ae(e,i),n=o.computed(()=>"q-card"+(r.value===!0?" q-card--dark q-dark":"")+(e.bordered===!0?" q-card--bordered":"")+(e.square===!0?" q-card--square no-border-radius":"")+(e.flat===!0?" q-card--flat no-shadow":""));return()=>o.h(e.tag,{class:n.value},Y(t.default))}}),Vn={class:"font-bold text-2xl"},jn=o.defineComponent({__name:"AnqModalForm",props:{isLoading:{type:Boolean,default:!1},formIsLoading:{type:Boolean,default:!1},okLabel:{type:String,default:"Ok"},cancelLabel:{type:String,default:"Cancel"},title:{type:String,default:"Title"},btnsColor:{type:Object,default:"primary"},modalCardProps:{type:Object,required:!1}},emits:["submit","hide"],setup(e,{expose:t,emit:i}){const r=i,n=e,s=o.reactive({open:!1}),a=()=>{s.open=!0},l=()=>{s.open=!1,r("hide")};return t({show:a,hide:l}),(m,h)=>(o.openBlock(),o.createBlock(On,{modelValue:s.open,"onUpdate:modelValue":h[1]||(h[1]=u=>s.open=u),persistent:n.isLoading||n.formIsLoading,onHide:l},{default:o.withCtx(()=>{var u;return[o.createVNode(o.unref(Rn),o.mergeProps(n.modalCardProps,{class:`container ${((u=n.modalCardProps)==null?void 0:u.class)||""}`}),{default:o.withCtx(()=>[o.createVNode(he,{class:"flex items-center justify-between"},{default:o.withCtx(()=>[o.createElementVNode("h2",Vn,o.toDisplayString(n.title),1),o.renderSlot(m.$slots,"close-icon-btn",{color:n.btnsColor,disable:n.isLoading||n.formIsLoading},()=>[o.withDirectives(o.createVNode(me,{icon:"close",color:n.btnsColor,round:"",flat:"",disable:n.isLoading||n.formIsLoading},null,8,["color","disable"]),[[ut]])])]),_:3}),o.createVNode(Gt,{onSubmit:h[0]||(h[0]=w=>r("submit",w)),class:"flex flex-col"},{default:o.withCtx(()=>[o.createVNode(he,{class:"flex flex-col gap-2"},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"content")]),_:3}),o.createVNode(Ut),o.createVNode(he,{class:"flex items-center justify-end gap-2"},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"cancel-btn",{color:n.btnsColor,disable:n.isLoading||n.formIsLoading,label:n.cancelLabel},()=>[o.withDirectives(o.createVNode(me,{color:n.btnsColor,type:"button",unelevated:"",flat:"",class:"border border-solid",disable:n.isLoading||n.formIsLoading,label:n.cancelLabel,"no-caps":""},null,8,["color","disable","label"]),[[ut]])]),o.renderSlot(m.$slots,"ok-btn",{color:n.btnsColor,label:n.okLabel,disable:n.isLoading,loading:n.formIsLoading},()=>[o.createVNode(me,{color:n.btnsColor,type:"submit",unelevated:"",label:n.okLabel,"no-caps":"",disable:n.isLoading,loading:n.formIsLoading},null,8,["color","label","disable","loading"])])]),_:3})]),_:3})]),_:3},16,["class"])]}),_:3},8,["modelValue","persistent"]))}});z.AnqModalForm=jn,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});