@quidgest/ui 0.17.9 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/api.json +169 -17
- package/dist/manifest/components.json +2 -0
- package/dist/ui.css +231 -25
- package/dist/ui.esm.js +573 -608
- package/dist/ui.js +457 -493
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +457 -493
- package/dist/ui.scss +225 -27
- package/esm/components/QAccordion/QAccordionItem.vue.js +1 -0
- package/esm/components/QCarousel/QCarousel.vue.js +1 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +2 -0
- package/esm/components/QCollapsible/QCollapsible.d.ts +2 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +50 -47
- package/esm/components/QCollapsible/constants.d.ts +6 -0
- package/esm/components/QCollapsible/constants.d.ts.map +1 -1
- package/esm/components/QCollapsible/constants.js +3 -2
- package/esm/components/QCollapsible/index.d.ts +6 -0
- package/esm/components/QCollapsible/index.d.ts.map +1 -1
- package/esm/components/QCollapsible/types.d.ts +11 -1
- package/esm/components/QCollapsible/types.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +505 -597
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +32 -16
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +179 -86
- package/esm/components/QDropdownMenu/types.d.ts +6 -0
- package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
- package/esm/components/QField/types.d.ts +3 -0
- package/esm/components/QField/types.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.vue.js +19 -17
- package/esm/components/QLabel/types.d.ts +3 -0
- package/esm/components/QLabel/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +172 -0
- package/esm/components/QTabs/QTab.d.ts.map +1 -0
- package/esm/components/QTabs/QTab.vue.js +122 -0
- package/esm/components/QTabs/QTab2.vue.js +5 -0
- package/esm/components/QTabs/QTabs.d.ts +35 -0
- package/esm/components/QTabs/QTabs.d.ts.map +1 -0
- package/esm/components/QTabs/QTabs.vue.js +83 -0
- package/esm/components/QTabs/QTabs2.vue.js +5 -0
- package/esm/components/QTabs/constants.d.ts +5 -0
- package/esm/components/QTabs/constants.d.ts.map +1 -0
- package/esm/components/QTabs/context.d.ts +78 -0
- package/esm/components/QTabs/context.d.ts.map +1 -0
- package/esm/components/QTabs/context.js +4 -0
- package/esm/components/QTabs/index.d.ts +164 -0
- package/esm/components/QTabs/index.d.ts.map +1 -0
- package/esm/components/QTabs/index.js +7 -0
- package/esm/components/QTabs/types.d.ts +106 -0
- package/esm/components/QTabs/types.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.d.ts +7 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.vue.js +24 -0
- package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator2.vue.js +5 -0
- package/esm/components/__internal__/QRequiredIndicator/constants.d.ts +7 -0
- package/esm/components/__internal__/QRequiredIndicator/constants.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/constants.js +4 -0
- package/esm/components/__internal__/QRequiredIndicator/index.d.ts +6 -0
- package/esm/components/__internal__/QRequiredIndicator/index.d.ts.map +1 -0
- package/esm/components/__internal__/QRequiredIndicator/index.js +6 -0
- package/esm/components/__internal__/QRequiredIndicator/types.d.ts +18 -0
- package/esm/components/__internal__/QRequiredIndicator/types.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts +10 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.vue.js +31 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle2.vue.js +5 -0
- package/esm/components/__internal__/QSafeTriangle/index.d.ts +10 -0
- package/esm/components/__internal__/QSafeTriangle/index.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/index.js +6 -0
- package/esm/components/__internal__/QSafeTriangle/types.d.ts +33 -0
- package/esm/components/__internal__/QSafeTriangle/types.d.ts.map +1 -0
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +17 -14
- package/esm/composables/useSafeTriangle/index.d.ts +31 -0
- package/esm/composables/useSafeTriangle/index.d.ts.map +1 -0
- package/esm/composables/useSafeTriangle/index.js +87 -0
- package/esm/index.d.ts +2 -0
- package/esm/utils/date.d.ts +36 -1
- package/esm/utils/date.d.ts.map +1 -1
- package/esm/utils/date.js +90 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +30 -24
- package/esm/utils/mask.d.ts +17 -0
- package/esm/utils/mask.d.ts.map +1 -0
- package/esm/utils/mask.js +154 -0
- package/esm/utils/safeTriangle.d.ts +68 -0
- package/esm/utils/safeTriangle.d.ts.map +1 -0
- package/esm/utils/safeTriangle.js +83 -0
- package/package.json +6 -6
- package/esm/composables/useInputMask/index.d.ts +0 -50
- package/esm/composables/useInputMask/index.d.ts.map +0 -1
- package/esm/composables/useInputMask/index.js +0 -408
package/dist/ui.esm.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.
|
|
2
|
+
* Quidgest UI v0.18.0
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import{Fragment as e,Teleport as t,Transition as l,TransitionGroup as a,computed as n,createBlock as o,createCommentVNode as i,createElementBlock as s,createElementVNode as r,createSlots as u,createTextVNode as d,createVNode as c,defineComponent as v,getCurrentInstance as p,guardReactiveProps as f,h as m,inject as h,isRef as
|
|
7
|
-
var
|
|
8
|
-
for(var a in e)
|
|
9
|
-
return t||
|
|
10
|
-
function
|
|
6
|
+
import{Fragment as e,Teleport as t,Transition as l,TransitionGroup as a,computed as n,createBlock as o,createCommentVNode as i,createElementBlock as s,createElementVNode as r,createSlots as u,createTextVNode as d,createVNode as c,defineComponent as v,getCurrentInstance as p,guardReactiveProps as f,h as m,inject as h,isRef as g,mergeModels as y,mergeProps as b,nextTick as k,normalizeClass as _,normalizeProps as q,normalizeStyle as w,onBeforeMount as x,onBeforeUnmount as $,onMounted as M,onUnmounted as B,openBlock as C,provide as L,reactive as D,ref as E,renderList as V,renderSlot as S,resolveComponent as A,resolveDynamicComponent as Q,shallowRef as T,toDisplayString as I,toHandlers as z,toRef as P,toValue as F,unref as H,useAttrs as R,useId as U,useModel as O,useSlots as W,useTemplateRef as N,vModelCheckbox as j,vModelDynamic as Y,vModelText as G,vShow as K,watch as X,watchEffect as Z,withCtx as J,withDirectives as ee,withKeys as te,withModifiers as le}from"vue"
|
|
7
|
+
var ae=Object.defineProperty,ne=(e,t)=>{let l={}
|
|
8
|
+
for(var a in e)ae(l,a,{get:e[a],enumerable:!0})
|
|
9
|
+
return t||ae(l,Symbol.toStringTag,{value:"Module"}),l},oe={primary:"#008ad2",primaryLight:"#cde5ff",primaryDark:"#006398",secondary:"#001d31",secondaryLight:"#e6eef3",secondaryDark:"#001425",highlight:"#ff8241",highlightLight:"#ffe4d6",highlightDark:"#cc4700",info:"#17a2b8",infoLight:"#bceff7",infoDark:"#11798a",success:"#28a745",successLight:"#c2f0cd",successDark:"#1e7d34",warning:"#ffa900",warningLight:"#ffeabf",warningDark:"#bf7f00",danger:"#b71c1c",dangerLight:"#f7cccc",dangerDark:"#891515",background:"#fff",container:"#fff",neutral:"#7c858d",neutralLight:"#c4c5ca",neutralDark:"#40474f",onPrimary:"#fff",onPrimaryLight:"#202428",onPrimaryDark:"#fff",onSecondary:"#fff",onSecondaryLight:"#202428",onSecondaryDark:"#fff",onHighlight:"#fff",onHighlightLight:"#202428",onHighlightDark:"#fff",onInfo:"#fff",onInfoLight:"#202428",onInfoDark:"#fff",onSuccess:"#fff",onSuccessLight:"#202428",onSuccessDark:"#fff",onWarning:"#fff",onWarningLight:"#202428",onWarningDark:"#fff",onDanger:"#fff",onDangerLight:"#202428",onDangerDark:"#fff",onBackground:"#202428",onContainer:"#202428",onNeutral:"#fff",onNeutralLight:"#202428",onNeutralDark:"#fff"},ie={primary:"#4da6e0",primaryLight:"#1a2832",primaryDark:"#87c5f0",secondary:"#b8d4e6",secondaryLight:"#1a2832",secondaryDark:"#e6f2ff",highlight:"#ff9966",highlightLight:"#2d1a0f",highlightDark:"#ffb899",info:"#4cb8d1",infoLight:"#1f2a2d",infoDark:"#7dcce0",success:"#5cb85c",successLight:"#1e2a20",successDark:"#85d085",warning:"#ffcc4d",warningLight:"#332a1a",warningDark:"#ffd966",danger:"#e74c3c",dangerLight:"#2d1a1a",dangerDark:"#f17066",background:"#121212",container:"#1e1e1e",neutral:"#9ca3ab",neutralLight:"#2a2d31",neutralDark:"#c8ced6",onPrimary:"#000",onPrimaryLight:"#e0e0e0",onPrimaryDark:"#000",onSecondary:"#000",onSecondaryLight:"#e0e0e0",onSecondaryDark:"#000",onHighlight:"#000",onHighlightLight:"#e0e0e0",onHighlightDark:"#000",onInfo:"#000",onInfoLight:"#e0e0e0",onInfoDark:"#000",onSuccess:"#000",onSuccessLight:"#e0e0e0",onSuccessDark:"#000",onWarning:"#000",onWarningLight:"#e0e0e0",onWarningDark:"#000",onDanger:"#000",onDangerLight:"#e0e0e0",onDangerDark:"#000",onBackground:"#e0e0e0",onContainer:"#e0e0e0",onNeutral:"#000",onNeutralLight:"#e0e0e0",onNeutralDark:"#000"},se=/* @__PURE__ */ne({defaultDarkColorScheme:()=>ie,defaultLightColorScheme:()=>oe})
|
|
10
|
+
function re(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)}function ue(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function de(e={},t={}){const l={},a=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)])
|
|
11
11
|
for(const n of a){if("__proto__"===n||"constructor"===n||"prototype"===n)continue
|
|
12
12
|
const a=e[n],o=t[n]
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
const t=
|
|
16
|
-
|
|
13
|
+
ue(a)&&ue(o)?l[n]=de(a,o):l[n]=void 0!==o?o:a}return l}var ce="q-defaults"
|
|
14
|
+
function ve(e){if(re(e))return
|
|
15
|
+
const t=pe(),l=E(F(e))
|
|
16
|
+
L(ce,n(()=>re(l.value)?t.value:de(t.value,l.value)))}function pe(){const e=h(ce,void 0)
|
|
17
17
|
if(!e)throw new Error("[Quidgest UI] Could not find defaults instance")
|
|
18
|
-
return e}var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
18
|
+
return e}var fe=Symbol.for("q-group")
|
|
19
|
+
function me(e){const t={active:E(ge(e)),multiple:n(()=>H(e.multiple)||!1),required:n(()=>H(e.required)||!1)}
|
|
20
|
+
return g(e.active)&&X(e.active,e=>{t.active.value=e}),X(()=>t.multiple.value,e=>{e?t.active.value?t.active.value=[t.active.value]:t.active.value=[]:Array.isArray(t.active.value)&&1===t.active.value.length?t.active.value=t.active.value[0]:t.active.value=void 0}),L(fe,t),t}function he(e){const t=h(fe,void 0)
|
|
21
21
|
if(!t)return
|
|
22
|
-
const l=n(()=>{const l=
|
|
22
|
+
const l=n(()=>{const l=H(e)
|
|
23
23
|
return Array.isArray(t.active.value)?t.active.value?.includes(l):t.active.value===l})
|
|
24
|
-
return{isActive:l,toggle:()=>{const a=
|
|
25
|
-
Array.isArray(t.active.value)?l.value?(!t.required?.value||t.active.value.length>1)&&(t.active.value=t.active.value?.filter(e=>e!==a)):t.active.value=[...t.active.value,a]:t.active.value!==a?t.active.value=a:t.required?.value||(t.active.value=void 0)}}}function
|
|
26
|
-
return t?Array.isArray(l)?l:void 0!==l?[l]:[]:Array.isArray(l)?1===l.length?l[0]:void 0:l}var
|
|
27
|
-
|
|
28
|
-
const l=
|
|
29
|
-
return
|
|
30
|
-
function
|
|
24
|
+
return{isActive:l,toggle:()=>{const a=H(e)
|
|
25
|
+
Array.isArray(t.active.value)?l.value?(!t.required?.value||t.active.value.length>1)&&(t.active.value=t.active.value?.filter(e=>e!==a)):t.active.value=[...t.active.value,a]:t.active.value!==a?t.active.value=a:t.required?.value||(t.active.value=void 0)}}}function ge(e){const t=H(e.multiple),l=H(e.active)
|
|
26
|
+
return t?Array.isArray(l)?l:void 0!==l?[l]:[]:Array.isArray(l)?1===l.length?l[0]:void 0:l}var ye=["id"],be=/*@__PURE__*/v({__name:"QAccordion",props:/*@__PURE__*/y({id:{},class:{},variant:{},spacing:{},iconRight:{type:Boolean},multiple:{type:Boolean}},{modelValue:{type:[String,Number,Boolean,Symbol,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e
|
|
27
|
+
ve({QCollapsible:{iconRight:P(t,"iconRight"),spacing:P(t,"spacing"),variant:P(t,"variant"),width:"block"}})
|
|
28
|
+
const l=O(e,"modelValue"),{active:a}=me({active:l,multiple:P(t,"multiple")})
|
|
29
|
+
return X(a,e=>{l.value=e}),(e,l)=>(C(),s("div",{id:t.id,class:_(["q-accordion",t.class])},[S(e.$slots,"default")],10,ye))}}),ke={chevron:{icon:"chevron-down"}},_e={required:"required"},qe={...ke},we={..._e},xe=["id"]
|
|
30
|
+
function $e(e){return function(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").trim().split(/\s+/)}(e).join("-").toLowerCase()}function Me(e){const t=e,l=t.setup
|
|
31
31
|
return l?(t.setup=(e,t)=>{const a=function(){const e=p()
|
|
32
32
|
if(!e)throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function")
|
|
33
33
|
const t=e.type.name??e.type.__name
|
|
34
34
|
if(!t)throw new Error("[Quidgest UI] Could not determine component name")
|
|
35
|
-
const l=
|
|
36
|
-
return n(()=>
|
|
37
|
-
if(
|
|
35
|
+
const l=pe(),a=l.value?.Global,o=l.value?.[t]
|
|
36
|
+
return n(()=>de(a,o))}()
|
|
37
|
+
if(re(a.value))return l(e,t)
|
|
38
38
|
const o=p()
|
|
39
39
|
return l(null===o?e:new Proxy(e,{get(e,t){const l=Reflect.get(e,t),n=a.value?.[t]
|
|
40
|
-
return"string"!=typeof t||function(e,t){const l
|
|
41
|
-
return!!l&&void 0!==e.props?.[l]}(o.vnode,t)?l:n??l}}),t)},e):e}var
|
|
42
|
-
return(e,a)=>(C(),s("div",{id:t.id,class:_(["q-spinner-loader",t.class]),style:w(l.value)},null,14,
|
|
43
|
-
function
|
|
40
|
+
return"string"!=typeof t||function(e,t){const l=$e(t)
|
|
41
|
+
return!!l&&void 0!==e.props?.[l]}(o.vnode,t)?l:n??l}}),t)},e):e}var Be=Me(/*@__PURE__*/v({__name:"QSpinnerLoader",props:{id:{},class:{},size:{default:48}},setup(e){const t=e,l=n(()=>({"font-size":48!==t.size?`${t.size}px`:void 0}))
|
|
42
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(["q-spinner-loader",t.class]),style:w(l.value)},null,14,xe))}}))
|
|
43
|
+
function Ce(e){const t=e.r/255,l=e.g/255,a=e.b/255,n=Math.max(t,l,a),o=Math.min(t,l,a)
|
|
44
44
|
let i,s=0
|
|
45
45
|
const r=(n+o)/2
|
|
46
46
|
if(n===o)s=i=0
|
|
@@ -49,70 +49,70 @@ switch(i=r>.5?e/(2-n-o):e/(n+o),n){case t:s=(l-a)/e+(l<a?6:0)
|
|
|
49
49
|
break
|
|
50
50
|
case l:s=(a-t)/e+2
|
|
51
51
|
break
|
|
52
|
-
case a:s=(t-l)/e+4}s/=6}return{h:Math.round(360*s),s:Math.round(100*i),l:Math.round(100*r)}}function
|
|
52
|
+
case a:s=(t-l)/e+4}s/=6}return{h:Math.round(360*s),s:Math.round(100*i),l:Math.round(100*r)}}function Le(e){const t=e.h/360,l=e.s/100,a=e.l/100
|
|
53
53
|
let n,o,i
|
|
54
54
|
if(0===l)n=o=i=a
|
|
55
55
|
else{const e=a<.5?a*(1+l):a+l-a*l,s=2*a-e
|
|
56
|
-
n=
|
|
57
|
-
if(t)return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}}function
|
|
58
|
-
{const t=
|
|
59
|
-
if(t)return t}throw new Error("Invalid color format")}function
|
|
60
|
-
return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,
|
|
56
|
+
n=De(s,e,t+1/3),o=De(s,e,t),i=De(s,e,t-1/3)}return{r:Math.round(255*n),g:Math.round(255*o),b:Math.round(255*i)}}function De(e,t,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?e+6*(t-e)*l:l<.5?t:l<2/3?e+(t-e)*(2/3-l)*6:e}function Ee(e){return`#${e.r.toString(16).padStart(2,"0")}${e.g.toString(16).padStart(2,"0")}${e.b.toString(16).padStart(2,"0")}`}function Ve(e){return`${e.r} ${e.g} ${e.b}`}function Se(e,t=!1){return t?/^#[a-fA-F0-9]{6}$/.test(e):/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(e)}function Ae(e){const t=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/)
|
|
57
|
+
if(t)return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}}function Qe(e){if(Se(e))return 4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}
|
|
58
|
+
{const t=Ae(e)
|
|
59
|
+
if(t)return t}throw new Error("Invalid color format")}function Te(e){return e>50?"#000":"#fff"}function Ie(e){const t=Qe(e)
|
|
60
|
+
return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,Ee(t)}function ze(e,t){if(t<0||t>100)throw new Error("Amount must be in the range [0, 100]")
|
|
61
61
|
if(0===t)return e
|
|
62
|
-
const l=
|
|
63
|
-
return l.l=l.l+a*(100-l.l)
|
|
62
|
+
const l=Ce(e),a=t/100
|
|
63
|
+
return l.l=l.l+a*(100-l.l),Le(l)}function Pe(e,t){if(t<0||t>100)throw new Error("Amount must be in the range [0, 100]")
|
|
64
64
|
if(0===t)return e
|
|
65
|
-
const l=
|
|
66
|
-
return l.l=l.l-a*l.l
|
|
67
|
-
return{[o]:e,[`${o}Light`]:a,[`${o}Dark`]:n}},n=e=>
|
|
65
|
+
const l=Ce(e),a=t/100
|
|
66
|
+
return l.l=l.l-a*l.l,Le(l)}function Fe(e,t){const l={...e},a=(e,t)=>{const l=Qe(e),a=Ee(ze(l,85)),n=Ee(Pe(l,25)),o=t.toString().replace(/(Light|Dark)$/,"")
|
|
67
|
+
return{[o]:e,[`${o}Light`]:a,[`${o}Dark`]:n}},n=e=>Te(Ce(Qe(e)).l)
|
|
68
68
|
for(const o of["primary","secondary","highlight","info","success","warning","danger","neutral"]){const e=o,i=`${o}Light`,s=`${o}Dark`,r=`on${o.charAt(0).toUpperCase()+o.slice(1)}`,u=`on${o.charAt(0).toUpperCase()+o.slice(1)}Light`,d=`on${o.charAt(0).toUpperCase()+o.slice(1)}Dark`
|
|
69
69
|
if(t[e]){const o=a(t[e],e)
|
|
70
|
-
Object.assign(l,o),l[r]=n(t[e]),l[u]=n(o[i]),l[d]=n(o[s])}t[e]||(t[i]&&(l[i]=t[i],t[u]||(l[u]=n(t[i]))),t[s]&&(l[s]=t[s],t[d]||(l[d]=n(t[s])))),t[r]&&(l[r]=t[r]),t[u]&&(l[u]=t[u]),t[d]&&(l[d]=t[d])}if(t.primary&&!t.highlight){const e=
|
|
70
|
+
Object.assign(l,o),l[r]=n(t[e]),l[u]=n(o[i]),l[d]=n(o[s])}t[e]||(t[i]&&(l[i]=t[i],t[u]||(l[u]=n(t[i]))),t[s]&&(l[s]=t[s],t[d]||(l[d]=n(t[s])))),t[r]&&(l[r]=t[r]),t[u]&&(l[u]=t[u]),t[d]&&(l[d]=t[d])}if(t.primary&&!t.highlight){const e=Ie(t.primary),o=a(e,"highlight")
|
|
71
71
|
Object.assign(l,o),l.onHighlight=n(e),l.onHighlightLight=n(o.highlightLight),l.onHighlightDark=n(o.highlightDark)}for(const o of["background","container"])if(t[o]){l[o]=t[o]
|
|
72
72
|
const e=`on${o.charAt(0).toUpperCase()+o.slice(1)}`
|
|
73
|
-
t[e]||(l[e]=n(t[o]))}return t.onBackground&&(l.onBackground=t.onBackground),t.onContainer&&(l.onContainer=t.onContainer),l}var
|
|
74
|
-
function
|
|
73
|
+
t[e]||(l[e]=n(t[o]))}return t.onBackground&&(l.onBackground=t.onBackground),t.onContainer&&(l.onContainer=t.onContainer),l}var He="q-theme"
|
|
74
|
+
function Re(e){let t=`.${Ne(e.name)} {\n`
|
|
75
75
|
const l=e.scheme
|
|
76
76
|
let a
|
|
77
77
|
for(a in l){const e=l[a]
|
|
78
|
-
if(e){t+=` ${
|
|
79
|
-
const l=
|
|
80
|
-
t+=` ${
|
|
81
|
-
return e||(e=document.createElement("style"),e.id=
|
|
78
|
+
if(e){t+=` ${Oe(a)}: ${e};\n`
|
|
79
|
+
const l=Qe(e)
|
|
80
|
+
t+=` ${Oe(a)}-rgb: ${l.r} ${l.g} ${l.b};\n`}}return t+="}\n",t}function Ue(e){const t=e.map(Re).join("\n");(function(){let e=document.getElementById(He)
|
|
81
|
+
return e||(e=document.createElement("style"),e.id=He,document.head.appendChild(e)),e}()).textContent=t}function Oe(e){return e?`--q-theme-${$e(e)}`:""}function We(e,t){const l=n(()=>{const l=t.value.find(t=>t.name===e.value)
|
|
82
82
|
if(!l)throw new Error(`[Quidgest UI] Theme "${e.value}" not found`)
|
|
83
83
|
return l})
|
|
84
|
-
return{name:e,current:l,themes:t,class:n(()=>
|
|
85
|
-
function
|
|
84
|
+
return{name:e,current:l,themes:t,class:n(()=>Ne(l.value.name)),css:n(()=>Re(l.value))}}function Ne(e){return`q-theme--${$e(e)}`}var je=Symbol.for("q-theme")
|
|
85
|
+
function Ye(){const e=h(je)
|
|
86
86
|
if(!e)throw new Error("[Quidgest UI] Could not find theme instance")
|
|
87
|
-
return e}function
|
|
88
|
-
return
|
|
87
|
+
return e}function Ge(e){const{themes:t}=Ye(),l=n(()=>F(e)),a=n(()=>"string"!=typeof l.value),o=We(n(()=>a.value?l.value.name:l.value),n(()=>a.value?[...t.value,l.value]:t.value))
|
|
88
|
+
return L(je,o),o}function Ke(e){const t=n(()=>H(e)),l=n(()=>!!t.value&&!function(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}(t.value))
|
|
89
89
|
return{isUtilityColor:l,style:n(()=>{const e=t.value
|
|
90
90
|
if(!e)return
|
|
91
91
|
let a=e
|
|
92
|
-
const n=
|
|
92
|
+
const n=Ye()
|
|
93
93
|
if(l.value){const t=e
|
|
94
94
|
a=n.current.value.scheme[t]??e}let o
|
|
95
|
-
try{if(o=
|
|
96
|
-
return{mainColor:a,mainColorRgb:
|
|
97
|
-
function u(e){o.value||a("click",e)}const{isUtilityColor:v,style:p}=
|
|
95
|
+
try{if(o=Qe(a),!o)return}catch(u){return void console.error("Failed to parse color:",u)}const i=Te(Ce(o).l),s=Pe(o,25),r=Ee(s)
|
|
96
|
+
return{mainColor:a,mainColorRgb:Ve(o),onMainColor:i,hoverColor:r,hoverColorRgb:Ve(s),onHoverColor:i}})}}var Xe=["id","disabled"],Ze={key:0,class:"q-button__spinner"},Je={class:"q-button__content"},et=Me(/*@__PURE__*/v({__name:"QButton",props:{id:{},class:{},label:{},variant:{default:"outlined"},color:{default:"primary"},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},size:{default:"regular"},iconPos:{default:"start"},pill:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,o=n(()=>l.disabled||l.loading)
|
|
97
|
+
function u(e){o.value||a("click",e)}const{isUtilityColor:v,style:p}=Ke(P(l,"color")),f=n(()=>{const e=v.value?`q-button--${l.color}`:void 0,t="regular"!==l.size?`q-button--${l.size}`:void 0,a="start"!==l.iconPos?`q-button--icon-${l.iconPos}`:void 0
|
|
98
98
|
return["q-button",`q-button--${l.variant}`,e,t,a,{"q-button--labeled":l.label,"q-button--borderless":l.borderless,"q-button--elevated":l.elevated,"q-button--block":l.block,"q-button--loading":l.loading,"q-button--pill":l.pill},l.class]}),m=n(()=>{if(!v.value)return{"--q-button-main-color":p.value?.mainColor,"--q-button-main-color-rgb":p.value?.mainColorRgb,"--q-button-on-main-color":p.value?.onMainColor,"--q-button-hover-color":p.value?.hoverColor,"--q-button-hover-color-rgb":p.value?.hoverColorRgb,"--q-button-on-hover-color":p.value?.onHoverColor}})
|
|
99
|
-
return(e,t)=>(C(),s("button",{id:l.id,type:"button",class:_(f.value),disabled:o.value,style:w(m.value),onClick:
|
|
100
|
-
function p(e){v.value&&e.stopImmediatePropagation()}return(t,n)=>(C(),o(
|
|
101
|
-
case"font":return
|
|
102
|
-
case"img":return
|
|
103
|
-
default:return}}),{style:a}=
|
|
104
|
-
return(e,a)=>(C(),o(
|
|
105
|
-
return(e,n)=>(C(),s("i",{id:t.id,class:_(["q-icon","q-icon__font",l.value,a.value,t.class])},null,10,
|
|
106
|
-
return(e,l)=>(C(),s("img",{id:t.id,src:t.icon,class:_(["q-icon","q-icon__img",t.class])},null,10,
|
|
99
|
+
return(e,t)=>(C(),s("button",{id:l.id,type:"button",class:_(f.value),disabled:o.value,style:w(m.value),onClick:le(u,["stop","prevent"])},[l.loading?(C(),s("div",Ze,[c(H(Be))])):i("",!0),r("span",Je,[S(e.$slots,"default"),d(" "+I(l.label)+" ",1),S(e.$slots,"append")])],14,Xe))}})),tt={class:"q-card__header"},lt={key:0,class:"q-card__header-content"},at={class:"q-card__header-text"},nt={key:0,class:"q-card__title",role:"cell"},ot={key:1,class:"q-card__subtitle",role:"cell"},it={class:"q-card__content"},st={key:0,class:"q-card__footer"},rt=Me(/*@__PURE__*/v({__name:"QCard",props:{id:{},class:{},title:{},subtitle:{},href:{},borderless:{type:Boolean},variant:{default:"default"},elevation:{default:"none"},width:{},disabled:{type:Boolean},loading:{type:Boolean}},setup(t){const l=t,a=n(()=>["q-card",l.width?`q-card--${l.width}`:void 0,l.variant&&"default"!==l.variant?`q-card--${l.variant}`:void 0,l.elevation&&"none"!==l.elevation?`q-card--elevation-${l.elevation}`:void 0,{"q-card--clickable":c.value,"q-card--loading":l.loading,"q-card--borderless":l.borderless,"q-card--disabled":l.disabled},l.class]),u=R(),c=n(()=>!!u.onClick||l.href),v=n(()=>l.disabled||l.loading)
|
|
100
|
+
function p(e){v.value&&e.stopImmediatePropagation()}return(t,n)=>(C(),o(Q(l.href?"a":"div"),{id:l.id,class:_(a.value),href:l.href&&!v.value?l.href:void 0,onClick:p},{default:J(()=>[l.loading?(C(),o(H(Be),{key:0,size:36})):(C(),s(e,{key:1},[r("div",tt,[S(t.$slots,"header",{},()=>[S(t.$slots,"header.prepend"),t.$slots.title||l.title||t.$slots.subtitle||l.subtitle?(C(),s("div",lt,[S(t.$slots,"header.content.prepend"),r("div",at,[t.$slots.title||l.title?(C(),s("p",nt,[t.$slots.title?S(t.$slots,"title",{key:0}):(C(),s(e,{key:1},[d(I(t.$props.title),1)],64))])):i("",!0),t.$slots.subtitle||l.subtitle?(C(),s("p",ot,[t.$slots.subtitle?S(t.$slots,"subtitle",{key:0}):(C(),s(e,{key:1},[d(I(t.$props.subtitle),1)],64))])):i("",!0)]),S(t.$slots,"header.content.append")])):i("",!0),S(t.$slots,"header.append")])]),r("div",it,[S(t.$slots,"default")]),t.$slots.footer?(C(),s("div",st,[S(t.$slots,"footer")])):i("",!0)],64))]),_:3},8,["id","class","href"]))}})),ut=/*@__PURE__*/v({__name:"QIcon",props:{id:{},class:{},icon:{},size:{},color:{},type:{default:"svg"}},setup(e){const t=e,l=n(()=>{switch(t.type){case"svg":return _t
|
|
101
|
+
case"font":return bt
|
|
102
|
+
case"img":return kt
|
|
103
|
+
default:return}}),{style:a}=Ke(P(t,"color")),i=n(()=>({"font-size":void 0!==t.size?`${t.size}px`:void 0,color:void 0!==t.color&&"primary"!==t.color?a.value?.mainColor:void 0}))
|
|
104
|
+
return(e,a)=>(C(),o(Q(l.value),{id:t.id,class:_(t.class),icon:t.icon,style:w(i.value)},null,8,["id","class","icon","style"]))}}),dt=["id"],ct=/*@__PURE__*/v({__name:"QIconFont",props:{id:{},class:{},icon:{},variant:{},library:{default:""}},setup(e){const t=e,l=n(()=>t.variant?`${t.library}-${t.variant}`:t.library),a=n(()=>t.library&&t.icon?`${t.library}-${t.icon}`:t.icon)
|
|
105
|
+
return(e,n)=>(C(),s("i",{id:t.id,class:_(["q-icon","q-icon__font",l.value,a.value,t.class])},null,10,dt))}}),vt=["id","src"],pt=/*@__PURE__*/v({__name:"QIconImg",props:{id:{},class:{},icon:{}},setup(e){const t=e
|
|
106
|
+
return(e,l)=>(C(),s("img",{id:t.id,src:t.icon,class:_(["q-icon","q-icon__img",t.class])},null,10,vt))}}),ft={},mt=v({name:"InlineSvg",inheritAttrs:!1,props:{src:{type:String,required:!0},symbol:{type:String,default:""},title:{type:String,default:""},transformSource:{type:Function,default:void 0},keepDuringLoading:{type:Boolean,default:!0}},emits:{loaded:e=>"object"==typeof e,unloaded:()=>!0,error:e=>"object"==typeof e},expose:[],data:()=>({svgElSource:null}),watch:{src(e){this.getSource(e)}},async mounted(){await this.getSource(this.src)},methods:{copySvgAttrs(e,t){const l=t.attributes
|
|
107
107
|
if(l)for(const a of l)e[a.name]=a.value},copyComponentAttrs(e,t){for(const[l,a]of Object.entries(t))!1!==a&&null!=a&&(e[l]=a)},getSvgContent(e){return this.symbol&&!(e=e.getElementById(this.symbol))?null:(this.transformSource&&(e=e.cloneNode(!0),e=this.transformSource(e)),this.title&&(this.transformSource||(e=e.cloneNode(!0)),function(e,t){const l=e.getElementsByTagName("title")
|
|
108
108
|
if(l.length)l[0].textContent=t
|
|
109
109
|
else{const l=document.createElementNS("http://www.w3.org/2000/svg","title")
|
|
110
|
-
l.textContent=t,e.insertBefore(l,e.firstChild)}}(e,this.title)),e)},async getSource(e){try{
|
|
110
|
+
l.textContent=t,e.insertBefore(l,e.firstChild)}}(e,this.title)),e)},async getSource(e){try{ft[e]||(ft[e]=function(e){if(e.getIsPending)return e
|
|
111
111
|
let t=!0
|
|
112
112
|
const l=e.then(e=>(t=!1,e),e=>{throw t=!1,e})
|
|
113
|
-
return l.getIsPending=()=>t,l}(this.download(e))),this.svgElSource&&
|
|
114
|
-
const t=await
|
|
115
|
-
this.svgElSource=t,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(t){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete
|
|
113
|
+
return l.getIsPending=()=>t,l}(this.download(e))),this.svgElSource&&ft[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded"))
|
|
114
|
+
const t=await ft[e]
|
|
115
|
+
this.svgElSource=t,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(t){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete ft[e],this.$emit("error",t)}},async download(e){const t=await fetch(e)
|
|
116
116
|
if(!t.ok)throw new Error("Error loading SVG")
|
|
117
117
|
const l=await t.text(),a=(new DOMParser).parseFromString(l,"text/xml").getElementsByTagName("svg")[0]
|
|
118
118
|
if(!a)throw new Error("Loaded file is not a valid SVG")
|
|
@@ -121,66 +121,67 @@ const e=this.getSvgContent(this.svgElSource)
|
|
|
121
121
|
if(!e)return m("div",this.$attrs)
|
|
122
122
|
const t={}
|
|
123
123
|
return this.copySvgAttrs(t,this.svgElSource),this.copySvgAttrs(t,e),this.copyComponentAttrs(t,this.$attrs),t.innerHTML=e.innerHTML,this.$attrs.id||delete t.id,m("svg",t)}})
|
|
124
|
-
var
|
|
125
|
-
function n(e){a("loaded",e)}function i(){a("unloaded")}return(e,t)=>(C(),o(
|
|
126
|
-
return(e,l)=>(C(),o(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
var ht,gt=/*@__PURE__*/v({__name:"QIconSvg",props:{id:{},class:{},icon:{},bundle:{default:""}},emits:["loaded","unloaded"],setup(e,{emit:t}){const l=e,a=t
|
|
125
|
+
function n(e){a("loaded",e)}function i(){a("unloaded")}return(e,t)=>(C(),o(H(mt),{id:l.id,class:_(["q-icon","q-icon__svg",l.class]),src:l.bundle,symbol:l.icon,onLoaded:n,onUnloaded:i},null,8,["id","class","src","symbol"]))}}),yt=Me(ut),bt=Me(ct),kt=Me(pt),_t=Me(gt),qt=Me(/*@__PURE__*/v({__name:"QChevron",props:/*@__PURE__*/y({id:{},class:{},icons:{default:()=>ke}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n(()=>["q-chevron",{"q-chevron--expanded":l.value},t.class])
|
|
126
|
+
return(e,l)=>(C(),o(H(yt),b({id:t.id,class:a.value},t.icons.chevron),null,16,["id","class"]))}})),wt={key:0,class:"q-sr-only"},xt=Me(/*@__PURE__*/v({__name:"QRequiredIndicator",props:{id:{},class:{},announce:{type:Boolean},texts:{default:()=>_e}},setup(e){const t=e
|
|
127
|
+
return(e,l)=>(C(),s("span",{class:_(["q-required-indicator",t.class])},[l[0]||(l[0]=r("span",{class:"q-required-indicator__mark","aria-hidden":"true"}," * ",-1)),t.announce?(C(),s("span",wt,I(t.texts.required),1)):i("",!0)],2))}})),$t={key:0,class:"q-collapsible__header"},Mt={class:"q-collapsible__title"},Bt={class:"q-collapsible__title-text"},Ct={key:0,class:"q-collapsible__subtitle"},Lt={class:"q-collapsible__content-inner"},Dt={class:"q-collapsible__content"},Et=Me(/*@__PURE__*/v({__name:"QCollapsible",props:/*@__PURE__*/y({id:{},class:{},title:{},subtitle:{},variant:{},iconRight:{type:Boolean},spacing:{},width:{default:"fit-content"},required:{type:Boolean},icons:{default:()=>qe},texts:{default:()=>we}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n(()=>"block"===t.width?"block":void 0),u=n(()=>["q-collapsible",t.spacing&&"comfortable"!==t.spacing?`q-collapsible--${t.spacing}`:void 0,t.variant&&"default"!==t.variant?`q-collapsible--${t.variant}`:void 0,{"q-collapsible--icon-right":t.iconRight},t.class]),v=n(()=>["q-collapsible__content-wrapper",{"q-collapsible__content-show":l.value}])
|
|
128
|
+
function p(){l.value=!l.value}return(n,f)=>(C(),o(H(rt),{id:t.id,class:_(u.value),width:a.value},{header:J(()=>[e.title?(C(),s("div",$t,[c(H(et),{variant:"text",block:"",class:"q-collapsible__btn","aria-expanded":l.value,onClick:p},{default:J(()=>[r("div",Mt,[e.iconRight?i("",!0):S(n.$slots,"icon",{key:0},()=>[c(H(qt),{"model-value":l.value,icons:t.icons},null,8,["model-value","icons"])]),S(n.$slots,"title.prepend"),r("h4",Bt,I(e.title),1),t.required?(C(),o(H(xt),{key:1,announce:"",texts:t.texts},null,8,["texts"])):i("",!0),S(n.$slots,"title.append"),e.iconRight?S(n.$slots,"icon",{key:2},()=>[c(H(qt),{"model-value":l.value,class:"q-collapsible__chevron-right",icons:t.icons},null,8,["model-value","icons"])]):i("",!0)]),n.$slots.subtitle||e.subtitle?(C(),s("div",Ct,[S(n.$slots,"subtitle",{},()=>[d(I(e.subtitle),1)])])):i("",!0)]),_:3},8,["aria-expanded"])])):i("",!0)]),default:J(()=>[r("div",{class:_(v.value)},[r("div",Lt,[r("div",Dt,[S(n.$slots,"default")])])],2)]),_:3},8,["id","class","width"]))}})),Vt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},St=/* @__PURE__ */new Uint8Array(16)
|
|
129
|
+
var At=[]
|
|
130
|
+
for(let sr=0;sr<256;++sr)At.push((sr+256).toString(16).slice(1))
|
|
131
|
+
function Qt(e,t,l){const a=(e=e||{}).random??e.rng?.()??function(){if(!ht){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")
|
|
132
|
+
ht=crypto.getRandomValues.bind(crypto)}return ht(St)}()
|
|
132
133
|
if(a.length<16)throw new Error("Random bytes length must be >= 16")
|
|
133
134
|
if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((l=l||0)<0||l+16>t.length)throw new RangeError(`UUID byte range ${l}:${l+15} is out of buffer bounds`)
|
|
134
135
|
for(let e=0;e<16;++e)t[l+e]=a[e]
|
|
135
|
-
return t}return function(e,t=0){return(
|
|
136
|
+
return t}return function(e,t=0){return(At[e[t+0]]+At[e[t+1]]+At[e[t+2]]+At[e[t+3]]+"-"+At[e[t+4]]+At[e[t+5]]+"-"+At[e[t+6]]+At[e[t+7]]+"-"+At[e[t+8]]+At[e[t+9]]+"-"+At[e[t+10]]+At[e[t+11]]+At[e[t+12]]+At[e[t+13]]+At[e[t+14]]+At[e[t+15]]).toLowerCase()}(a)}function Tt(e){return E(F(e)??`uid-${function(e,t,l){return!Vt.randomUUID||t||e?Qt(e,t,l):Vt.randomUUID()}()}`)}var It=/*@__PURE__*/v({__name:"QAccordionItem",props:{id:{},class:{},title:{},subtitle:{},variant:{},iconRight:{type:Boolean},spacing:{},width:{},required:{type:Boolean},icons:{},texts:{},value:{}},setup(e){const t=e,l=he(Tt(P(t,"value")))
|
|
136
137
|
if(!l)throw new Error("QAccordionItem: Failed to retrieve group item. Ensure the component is used within a QAccordion context.")
|
|
137
|
-
return(e,a)=>(C(),o(
|
|
138
|
+
return(e,a)=>(C(),o(H(Et),b(t,{"model-value":H(l).isActive.value,"onUpdate:modelValue":H(l).toggle}),{default:J(()=>[S(e.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"]))}}),zt=Me(be),Pt=Me(It),Ft=["src","alt"],Ht={key:1,class:"q-avatar-initials"},Rt=Me(/*@__PURE__*/v({__name:"QAvatar",props:{src:{},initials:{},color:{},size:{default:"medium"},shape:{default:"circle"},alt:{default:"Avatar"}},setup(e){const t=e,l=n(()=>["small","large"].includes(t.size)?`q-avatar--${t.size}`:""),a=n(()=>"circle"===t.shape?void 0:"q-avatar--square"),{style:o}=Ke(P(t,"color")),i=n(()=>{const e={}
|
|
138
139
|
return["small","medium","large"].includes(t.size)||(e["--q-avatar-size"]=t.size),o.value&&(e["--q-avatar-color"]=o.value?.mainColor,e["--q-avatar-text-color"]=o.value?.onMainColor),e})
|
|
139
|
-
return(t,n)=>(C(),s("div",{class:_(["q-avatar",l.value,a.value]),style:w(i.value)},[e.src?(C(),s("img",{key:0,src:e.src,alt:e.alt,class:"q-avatar-img"},null,8,
|
|
140
|
-
return
|
|
140
|
+
return(t,n)=>(C(),s("div",{class:_(["q-avatar",l.value,a.value]),style:w(i.value)},[e.src?(C(),s("img",{key:0,src:e.src,alt:e.alt,class:"q-avatar-img"},null,8,Ft)):e.initials?(C(),s("span",Ht,I(e.initials.slice(0,2).toUpperCase()),1)):S(t.$slots,"fallback",{key:2})],6))}})),Ut={remove:{icon:"close"}},Ot={removeText:"Remove"},Wt=["id"],Nt=Me(/*@__PURE__*/v({__name:"QButtonGroup",props:{id:{},class:{},block:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e
|
|
141
|
+
return ve({QButton:{disabled:P(t,"disabled"),borderless:P(t,"borderless")}}),(e,l)=>(C(),s("div",{id:t.id,class:_(["q-button-group",{"q-button-group--elevated":t.elevated,"q-button-group--block":t.block},t.class]),role:"group"},[S(e.$slots,"default")],10,Wt))}})),jt=["id"],Yt={key:0,class:"q-badge__underlay q-button--background"},Gt={class:"q-badge__content"},Kt=Me(/*@__PURE__*/v({__name:"QBadge",props:{id:{},class:{},variant:{default:"tonal"},color:{default:"primary"},pill:{type:Boolean},size:{default:"default"},disabled:{type:Boolean},removable:{type:Boolean},icons:{default:()=>Ut},texts:{default:()=>Ot}},emits:["click:remove"],setup(e,{emit:t}){const l=e,a=t,u=R(),d=n(()=>!!u.onClick),v=n(()=>{const e="default"!==l.size?`q-badge--${l.size}`:void 0
|
|
141
142
|
return[{"q-badge--pill":l.pill},e,l.class]}),p=n(()=>{const e=m.value?`q-badge--${l.color}`:void 0
|
|
142
|
-
return["q-badge",`q-badge--${l.variant}`,{"q-badge--removable":l.removable,"q-badge--disabled":l.disabled},e,v.value]}),{isUtilityColor:m,style:h}=
|
|
143
|
-
function x(){a("click:remove")}return(e,t)=>d.value?(C(),o(
|
|
144
|
-
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-badge-indicator__wrapper",t.class])},[
|
|
145
|
-
return(e,n)=>(C(),s("div",{id:t.id,class:_(["q-skeleton-loader",l.value,t.class]),style:w(a.value)},[...n[0]||(n[0]=[r("div",{class:"q-skeleton-loader__bone"},null,-1)])],14,
|
|
143
|
+
return["q-badge",`q-badge--${l.variant}`,{"q-badge--removable":l.removable,"q-badge--disabled":l.disabled},e,v.value]}),{isUtilityColor:m,style:h}=Ke(P(l,"color")),g=n(()=>{if(!m.value)return{"--q-badge-main-color":h.value?.mainColor,"--q-badge-on-main-color":h.value?.onMainColor,"--q-badge-hover-color":h.value?.hoverColor,"--q-badge-on-hover-color":h.value?.onHoverColor}}),y=n(()=>u.onClick),k=n(()=>({class:"q-badge__remove",variant:l.variant,color:l.color,ariaLabel:l.texts.removeText,title:l.texts.removeText,disabled:l.disabled}))
|
|
144
|
+
function x(){a("click:remove")}return(e,t)=>d.value?(C(),o(Q(l.removable?H(Nt):"span"),{key:1,class:_(v.value)},{default:J(()=>[c(H(et),{class:"q-badge__content",variant:l.variant,color:l.color,disabled:l.disabled,onClick:y.value},{default:J(()=>[S(e.$slots,"default")]),_:3},8,["variant","color","disabled","onClick"]),l.removable?(C(),o(H(et),b({key:0},k.value,{onClick:x}),{default:J(()=>[c(H(yt),q(f(l.icons.remove)),null,16)]),_:1},16)):i("",!0)]),_:3},8,["class"])):(C(),s("span",{key:0,id:l.id,class:_(p.value),style:w(g.value)},["tonal"===l.variant?(C(),s("div",Yt)):i("",!0),r("span",null,[r("div",Gt,[S(e.$slots,"default")]),l.removable?(C(),o(H(et),b({key:0},k.value,{onClick:x}),{default:J(()=>[c(H(yt),q(f(l.icons.remove)),null,16)]),_:1},16)):i("",!0)])],14,jt))}})),Xt=["id"],Zt=Me(/*@__PURE__*/v({__name:"QBadgeIndicator",props:{id:{},class:{},content:{},color:{default:"highlight"},placement:{default:"top-right"},enabled:{type:Boolean,default:!0}},setup(e){const t=e,l=W(),a=n(()=>!t.content&&!l.content),r=n(()=>["q-badge-indicator",`q-badge-indicator--${t.placement}`,{"q-badge-indicator--dot":a.value}])
|
|
145
|
+
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-badge-indicator__wrapper",t.class])},[S(e.$slots,"default"),t.enabled?(C(),o(H(Kt),{key:0,pill:"",variant:"bold",class:_(r.value),color:t.color},{default:J(()=>[S(e.$slots,"content",{},()=>[d(I(t.content),1)])]),_:3},8,["class","color"])):i("",!0)],10,Xt))}})),Jt={back:{icon:"chevron-left"},forward:{icon:"chevron-right"}},el={previousText:"Previous",nextText:"Next",goToSlide:"Go to slide {0}"},tl=["id"],ll=Me(/*@__PURE__*/v({__name:"QSkeletonLoader",props:{id:{},class:{},width:{},height:{},type:{}},setup(e){const t=e,l=n(()=>t.type?`q-skeleton-loader--${t.type}`:void 0),a=n(()=>({width:"number"==typeof t.width?`${t.width}px`:t.width,height:"number"==typeof t.height?`${t.height}px`:t.height}))
|
|
146
|
+
return(e,n)=>(C(),s("div",{id:t.id,class:_(["q-skeleton-loader",l.value,t.class]),style:w(a.value)},[...n[0]||(n[0]=[r("div",{class:"q-skeleton-loader__bone"},null,-1)])],14,tl))}})),al=["id"],nl={key:0,class:"q-carousel__skeleton"},ol={class:"q-carousel__skeleton-caption"},il={key:0,class:"q-carousel__skeleton-controls"},sl=["onClick"],rl=["src","alt"],ul={key:1,class:"q-carousel__empty-container"},dl={key:2,class:"q-carousel__caption-global"},cl={key:0,class:"q-carousel__title"},vl={key:1,class:"q-carousel__subtitle"},pl={key:3,class:"q-carousel__indicators"},fl=["aria-label","aria-current","onClick"],ml={class:"q-sr-only"},hl={class:"q-sr-only"},gl=Me(/*@__PURE__*/v({__name:"QCarousel",props:/*@__PURE__*/y({id:{},class:{},slides:{default:()=>[]},showIndicators:{type:Boolean},showControls:{type:Boolean},autoCycleInterval:{default:5e3},autoCyclePause:{default:"hover"},ride:{default:"carousel"},swipeThreshold:{default:50},wrap:{type:Boolean,default:!0},animationDuration:{default:500},loading:{type:Boolean},icons:{default:()=>Jt},texts:{default:()=>el}},{currentSlide:{default:0},currentSlideModifiers:{}}),emits:/*@__PURE__*/y(["slide:before-change","slide:after-change","slide:click"],["update:currentSlide"]),setup(t,{emit:l}){const a=t,o=l,u=O(t,"currentSlide"),d=E(0)
|
|
146
147
|
let v=!1,p=!1,f=0,m=0
|
|
147
|
-
const h=E(0),
|
|
148
|
-
let
|
|
148
|
+
const h=E(0),g=E(0)
|
|
149
|
+
let y,q
|
|
149
150
|
const x=n(()=>({transform:`translateX(-${100*d.value}%)`,transition:v?`transform ${a.animationDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`:"none"})),$=n(()=>({"--q-carousel-progress-duration":`${a.autoCycleInterval}ms`,"--q-carousel-progress-width":`${h.value}%`}))
|
|
150
|
-
function
|
|
151
|
+
function L(e){if(e<0||e>=a.slides.length)return
|
|
151
152
|
if(e===d.value||v)return
|
|
152
153
|
const t=d.value,l=a.slides[t],n=a.slides[e]
|
|
153
|
-
o("slide:before-change",n.id,l?.id),d.value=e,u.value=e,a.animationDuration>0?(v=!0,setTimeout(()=>{v=!1,o("slide:after-change",n.id,l?.id)},a.animationDuration)):k(()=>{o("slide:after-change",n.id,l?.id)})}function
|
|
154
|
-
e>=a.slides.length?a.wrap&&
|
|
155
|
-
e<0?a.wrap&&
|
|
156
|
-
return e?.colorPlaceholder&&(t["background-color"]=e.colorPlaceholder),t}function T(){!a.autoCycleInterval||a.slides.length<=1||(z(),"carousel"!==a.ride||p||(
|
|
154
|
+
o("slide:before-change",n.id,l?.id),d.value=e,u.value=e,a.animationDuration>0?(v=!0,setTimeout(()=>{v=!1,o("slide:after-change",n.id,l?.id)},a.animationDuration)):k(()=>{o("slide:after-change",n.id,l?.id)})}function D(){const e=d.value+1
|
|
155
|
+
e>=a.slides.length?a.wrap&&L(0):L(e)}function A(){const e=d.value-1
|
|
156
|
+
e<0?a.wrap&&L(a.slides.length-1):L(e)}function Q(e){const t={}
|
|
157
|
+
return e?.colorPlaceholder&&(t["background-color"]=e.colorPlaceholder),t}function T(){!a.autoCycleInterval||a.slides.length<=1||(z(),"carousel"!==a.ride||p||(g.value=Date.now(),a.autoCycleInterval&&(q=window.setInterval(()=>{h.value=(Date.now()-g.value)/a.autoCycleInterval*100},50)),y=window.setTimeout(D,a.autoCycleInterval)))}function z(){y&&window.clearTimeout(y),q&&window.clearInterval(q),y=void 0,q=void 0,g.value=0,h.value=0}function P(){"hover"===a.autoCyclePause&&(p=!0,z())}function F(){"hover"===a.autoCyclePause&&(p=!1,T())}function R(e){if(!v)switch(e.key){case"ArrowLeft":e.preventDefault(),A()
|
|
157
158
|
break
|
|
158
|
-
case"ArrowRight":e.preventDefault(),
|
|
159
|
+
case"ArrowRight":e.preventDefault(),D()
|
|
159
160
|
break
|
|
160
|
-
case"Home":e.preventDefault(),
|
|
161
|
+
case"Home":e.preventDefault(),L(0)
|
|
161
162
|
break
|
|
162
|
-
case"End":e.preventDefault(),
|
|
163
|
+
case"End":e.preventDefault(),L(a.slides.length-1)}}function U(e){v||(f=e.touches[0].clientX,z())}function W(e){v||(m=e.touches[0].clientX)}function N(){if(v)return
|
|
163
164
|
const e=f-m
|
|
164
|
-
Math.abs(e)>a.swipeThreshold&&(e>0?
|
|
165
|
-
d.value>=e.length&&
|
|
165
|
+
Math.abs(e)>a.swipeThreshold&&(e>0?D():A()),f=0,m=0,T()}function j(e){return a.texts.goToSlide.replace("{0}",`${e+1}`)}return X(()=>a.slides,function(e){if(0===e.length)return d.value=0,u.value=0,void z()
|
|
166
|
+
d.value>=e.length&&L(0)},{immediate:!0,deep:!0}),X(d,function(){z(),T()}),X(u,e=>{e!==d.value&&L(e)}),M(T),B(z),(l,n)=>(C(),s("div",{id:a.id,class:_(["q-carousel",a.class]),tabindex:"0",onMouseenter:P,onMouseleave:F,onKeydown:R},[t.loading?(C(),s("div",nl,[c(H(ll),{width:"100%",height:"100%"}),r("div",ol,[c(H(ll),{type:"text",width:"40%",height:"24px",class:"q-carousel__skeleton-title"}),c(H(ll),{type:"text",width:"60%",height:"16px",class:"q-carousel__skeleton-subtitle"})]),a.showControls?(C(),s("div",il,[c(H(ll),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"}),c(H(ll),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"})])):i("",!0)])):(C(),s(e,{key:1},[t.slides?.length?(C(),s("div",{key:0,class:"q-carousel__track",style:w(x.value),onTouchstart:U,onTouchmove:W,onTouchend:N},[(C(!0),s(e,null,V(t.slides,(e,t)=>(C(),s("div",{key:e.id,class:_(["q-carousel__slide",{"q-carousel__slide--active":t===d.value}]),style:w(Q(e)),onClick:le(()=>function(e){if(window.getSelection()?.toString().length)return
|
|
166
167
|
const t=a.slides[e]
|
|
167
|
-
o("slide:click",t.id)}(t),["stop","prevent"])},[e.image?(C(),s("img",{key:0,src:e.image,alt:e.title||`Slide ${t+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,
|
|
168
|
-
function p(){t.disabled||t.readonly||(l.value=!l.value)}function f(){c.value?.focus()}return
|
|
169
|
-
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[
|
|
170
|
-
return(e,l)=>(C(),s("div",
|
|
171
|
-
return t({fieldRef:a}),(e,t)=>(C(),s("div",{id:l.id,class:_(d.value)},[l.label?(C(),o(
|
|
172
|
-
function n(e){a("click",e)}return(e,t)=>(C(),o(
|
|
168
|
+
o("slide:click",t.id)}(t),["stop","prevent"])},[e.image?(C(),s("img",{key:0,src:e.image,alt:e.title||`Slide ${t+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,rl)):i("",!0)],14,sl))),128))],36)):(C(),s("div",ul,[S(l.$slots,"empty")])),t.slides[d.value]?(C(),s("div",dl,[t.slides[d.value]?.title?(C(),s("h2",cl,I(t.slides[d.value].title),1)):i("",!0),t.slides[d.value]?.subtitle?(C(),s("p",vl,I(t.slides[d.value].subtitle),1)):i("",!0)])):i("",!0),t.showIndicators&&t.slides.length>1?(C(),s("ol",pl,[(C(!0),s(e,null,V(t.slides,(e,t)=>(C(),s("li",{key:e.id,class:_(["q-carousel__indicator",{"q-carousel__indicator--active":t===d.value}]),"data-testid":"carousel-indicator",style:w(t===d.value?$.value:{}),"aria-label":j(t),"aria-current":t===d.value,onClick:()=>L(t)},null,14,fl))),128))])):i("",!0),t.showControls&&t.slides.length>1?(C(),s(e,{key:4},[c(H(et),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":t.texts.previousText,onClick:A},{default:J(()=>[c(H(yt),b({class:"q-carousel__control-icon q-carousel__control-icon--prev"},a.icons.back),null,16),r("span",ml,I(t.texts.previousText),1)]),_:1},8,["aria-label"]),c(H(et),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":t.texts.nextText,onClick:D},{default:J(()=>[c(H(yt),b({class:"q-carousel__control-icon q-carousel__control-icon--next"},a.icons.forward),null,16),r("span",hl,I(t.texts.nextText),1)]),_:1},8,["aria-label"])],64)):i("",!0)],64))],42,al))}})),yl={checked:{icon:"check"},indeterminate:{icon:"minus"}},bl=["checked","disabled","readonly","required","aria-label","aria-readonly"],kl=["id","aria-label","aria-checked","aria-required","disabled","readonly","onKeydown"],_l=/*@__PURE__*/v({inheritAttrs:!1,__name:"QCheckbox",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>yl},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=Tt(P(t,"id")),d=N("inputEl"),c=N("buttonEl"),v=n(()=>["q-checkbox",`q-checkbox--${t.size}`,`q-checkbox--${t.color}`,{"q-checkbox--readonly":t.readonly,"q-checkbox--disabled":t.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":t.indeterminate,"q-checkbox--focus-style":t.hasFocusOutline,"q-checkbox--borderless":t.borderless},t.class])
|
|
169
|
+
function p(){t.disabled||t.readonly||(l.value=!l.value)}function f(){c.value?.focus()}return X(l,e=>{d.value&&(d.value.checked=!!e)}),(n,d)=>(C(),s("div",{class:_(v.value),onClick:le(p,["prevent"]),onMousedown:le(f,["prevent"])},[t.label&&"right"!==t.labelPlacement?(C(),o(H(Ll),{key:0,for:H(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:J(()=>[S(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0),r("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:t.disabled,readonly:t.readonly,required:t.required,"aria-label":t.label,"aria-readonly":t.readonly,tabindex:"-1","aria-hidden":"true"},null,8,bl),r("button",b({id:H(a),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-label":t.label,"aria-checked":t.indeterminate?"mixed":l.value,"aria-required":t.required||void 0,disabled:t.disabled,readonly:t.readonly},n.$attrs,{onClick:le(p,["stop","prevent"]),onKeydown:[te(le(p,["prevent"]),["space"]),d[0]||(d[0]=te(le(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?(C(),o(H(yt),b({key:0},l.value?t.icons.checked:t.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):i("",!0)],16,kl),t.label&&"right"===t.labelPlacement?(C(),o(H(Ll),{key:1,for:H(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:J(()=>[S(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0)],34))}}),ql=["id"],wl=["for"],xl=Me(/*@__PURE__*/v({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e,l=n(()=>["q-label",t.labelPosition?`q-label--${t.labelPosition}`:"",{"q-label--required":t.required},t.class])
|
|
170
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[S(e.$slots,"prepend"),t.label||e.$slots.default?(C(),s("label",{key:0,for:t.for},[S(e.$slots,"default",{},()=>[d(I(t.label),1)])],8,wl)):S(e.$slots,"default",{key:1}),S(e.$slots,"append"),t.required?(C(),o(H(xt),{key:2})):i("",!0)],10,ql))}})),$l={class:"q-checkbox__label-wrapper"},Ml={key:0,class:"q-field__extras"},Bl=/*@__PURE__*/v({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e
|
|
171
|
+
return(e,l)=>(C(),s("div",$l,[c(H(xl),{class:"q-checkbox__label",for:t.for,label:t.label,required:t.required},null,8,["for","label","required"]),e.$slots.extras?(C(),s("div",Ml,[S(e.$slots,"extras")])):i("",!0)]))}}),Cl=Me(_l),Ll=Me(Bl),Dl={selectColor:"Select a color"},El=["id"],Vl={key:0,class:"q-field__prepend"},Sl={key:1,class:"q-field__append"},Al={key:1,class:"q-field__extras"},Ql=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(e,{expose:t}){const l=e,a=N("field"),u=n(()=>l.required&&!l.readonly&&!l.disabled),d=n(()=>["q-field",`q-field--${l.size}`,`q-field--label-${l.labelPosition}`,{"q-field--readonly":l.readonly,"q-field--disabled":l.disabled,"q-field--required":u.value,"q-field--invalid":l.invalid},l.class])
|
|
172
|
+
return t({fieldRef:a}),(e,t)=>(C(),s("div",{id:l.id,class:_(d.value)},[l.label?(C(),o(H(xl),{key:0,class:"q-field__label",label:l.label,"label-position":l.labelPosition,for:l.for,required:l.required},{prepend:J(()=>[S(e.$slots,"label.prepend")]),append:J(()=>[S(e.$slots,"label.append")]),_:3},8,["label","label-position","for","required"])):i("",!0),S(e.$slots,"control",{},()=>[r("div",b({ref:"field",class:"q-field__control"},e.$attrs),[e.$slots.prepend?(C(),s("div",Vl,[S(e.$slots,"prepend")])):i("",!0),S(e.$slots,"default"),e.$slots.append?(C(),s("div",Sl,[S(e.$slots,"append")])):i("",!0)],16)]),e.$slots.extras?(C(),s("div",Al,[S(e.$slots,"extras")])):i("",!0)],10,El))}})),Tl={clearValue:"Clear value"},Il={clear:{icon:"close"}},zl=Me(/*@__PURE__*/v({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Il},texts:{default:()=>Tl}},emits:["click"],setup(e,{emit:t}){const l=e,a=t
|
|
173
|
+
function n(e){a("click",e)}return(e,t)=>(C(),o(H(et),{id:l.id,class:_(["q-clear-btn",l.class]),"aria-label":l.texts.clearValue,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",onClick:n},{default:J(()=>[c(H(yt),q(f(l.icons.clear)),null,16)]),_:1},8,["id","class","aria-label"]))}})),Pl=["id","type","maxlength","required","placeholder","readonly","disabled"],Fl=/*@__PURE__*/v({inheritAttrs:!1,__name:"QTextField",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},clearable:{type:Boolean},type:{default:"text"},texts:{}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/y(["click:clear"],["update:modelValue"]),setup(e,{expose:t,emit:l}){const a=e,s=l,d=O(e,"modelValue"),c=n({get:()=>d.value,set:e=>{const t=a.maxLength
|
|
173
174
|
d.value=t?e?.slice(0,t):e}})
|
|
174
|
-
|
|
175
|
-
const v=
|
|
176
|
-
function
|
|
177
|
-
function d(e){return
|
|
178
|
-
l.value=d(t.value)?t.value:""}function v(){d(i.value)?l.value=i.value:(l.value="",i.value="")}return
|
|
179
|
-
function m(){u.value=!0}function h(){u.value=!1}function
|
|
175
|
+
X(d,e=>c.value=e,{immediate:!0})
|
|
176
|
+
const v=Tt(P(a,"id")),p=N("field"),f=N("input"),m=n(()=>a.readonly||a.disabled?void 0:a.placeholder),h=n(()=>a.clearable&&!a.readonly&&!a.disabled),g=n(()=>h.value&&d.value)
|
|
177
|
+
function y(e){h.value&&(d.value="",s("click:clear",e))}return t({fieldRef:n(()=>p.value?.fieldRef),inputRef:f}),(e,t)=>(C(),o(H(Ql),{ref:"field",class:_(["q-text-field",a.class]),for:H(v),label:a.label,"label-position":a.labelPosition,size:a.size,readonly:a.readonly,disabled:a.disabled,required:a.required,invalid:a.invalid},u({"label.prepend":J(()=>[S(e.$slots,"label.prepend")]),"label.append":J(()=>[S(e.$slots,"label.append")]),default:J(()=>[ee(r("input",b({id:H(v),ref:"input","onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e),class:"q-text-field__input",type:a.type,maxlength:a.maxLength,required:a.required,placeholder:m.value,readonly:a.readonly,disabled:a.disabled},e.$attrs),null,16,Pl),[[Y,c.value]])]),_:2},[e.$slots.prepend?{name:"prepend",fn:J(()=>[S(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append||g.value?{name:"append",fn:J(()=>[S(e.$slots,"append"),g.value?(C(),o(H(zl),{key:0,"data-testid":"q-text-field__clear-button",texts:a.texts,onClick:y},null,8,["texts"])):i("",!0)]),key:"1"}:void 0,e.$slots.extras?{name:"extras",fn:J(()=>[S(e.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","label-position","size","readonly","disabled","required","invalid"]))}}),Hl={...Tl},Rl=Me(Fl),Ul=["readonly","disabled","aria-label"],Ol=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QColorPicker",props:/*@__PURE__*/y({id:{},class:{},placeholder:{},label:{},size:{default:"small"},readonly:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},texts:{default:()=>Dl}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=E(""),i=E(""),s=n(()=>t.readonly||t.disabled)
|
|
178
|
+
function d(e){return Se(e,!0)}function c(e){const t=e.target
|
|
179
|
+
l.value=d(t.value)?t.value:""}function v(){d(i.value)?l.value=i.value:(l.value="",i.value="")}return X(l,function(e){e&&d(e)?a.value=e:a.value="#000000"},{immediate:!0}),X(l,function(e){e&&d(e)?i.value=e:i.value=""},{immediate:!0}),(e,l)=>(C(),o(H(Rl),{id:t.id,modelValue:i.value,"onUpdate:modelValue":l[2]||(l[2]=e=>i.value=e),"max-length":7,class:_(["q-color-picker",t.class]),label:t.label,size:t.size,readonly:t.readonly,disabled:t.disabled,required:t.required,placeholder:t.placeholder,onChange:v},u({"label.prepend":J(()=>[S(e.$slots,"label.prepend")]),"label.append":J(()=>[S(e.$slots,"label.append")]),prepend:J(()=>[S(e.$slots,"prepend"),ee(r("input",b({"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),type:"color",class:"q-color-picker__swatch",readonly:t.readonly,disabled:s.value,"aria-label":t.texts.selectColor},e.$attrs,{onChange:c,onClick:l[1]||(l[1]=le(()=>{},["stop"]))}),null,16,Ul),[[G,a.value]])]),_:2},[e.$slots.append?{name:"append",fn:J(()=>[S(e.$slots,"append")]),key:"0"}:void 0,e.$slots.extras?{name:"extras",fn:J(()=>[S(e.$slots,"extras")]),key:"1"}:void 0]),1032,["id","modelValue","class","label","size","readonly","disabled","required","placeholder"]))}})),Wl={...Tl,noData:"No data available",showOptions:"Show options"},Nl={...ke,...Il},jl=/*@__PURE__*/v({__name:"QList",props:{id:{},class:{},modelValue:{},highlighted:{},items:{},groups:{default:()=>[]},selectable:{type:Boolean},selectOnTab:{type:Boolean,default:!0},multiple:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},itemValue:{default:"key"},itemLabel:{default:"label"}},emits:["update:modelValue","click","mouseenter:item"],setup(t,{expose:l,emit:a}){const i=t,r=a,u=E(!1),d=n(()=>c.value.length>1?"div":"ul"),c=n(()=>i.groups.length?i.groups.filter(e=>i.items?.some(t=>t.group===e.id)):[{id:"",title:""}]),{active:v}=me({active:P(i,"modelValue"),required:P(i,"required"),multiple:P(i,"multiple")}),p=E(null),f=E(null)
|
|
180
|
+
function m(){u.value=!0}function h(){u.value=!1}function g(e){if(!i.items)return
|
|
180
181
|
if(p.value?.contains(e.relatedTarget))return
|
|
181
182
|
let t=-1
|
|
182
183
|
i.multiple?v.value?.length>0&&(t=i.items.findIndex(e=>v.value.includes(e[i.itemValue]))):v.value&&(t=i.items.findIndex(e=>e[i.itemValue]===v.value)),-1===t&&(t=M())
|
|
183
|
-
w(t,u.value)}const
|
|
184
|
+
w(t,u.value)}const y=E("")
|
|
184
185
|
let b
|
|
185
186
|
function k(e){switch(window.clearTimeout(b),["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&e.preventDefault(),e.key){case"ArrowDown":q("next")
|
|
186
187
|
break
|
|
@@ -188,29 +189,29 @@ case"ArrowUp":q("prev")
|
|
|
188
189
|
break
|
|
189
190
|
case"Home":q("first")
|
|
190
191
|
break
|
|
191
|
-
case"End":q("last")}if(/^[a-z]$/i.test(e.key)){
|
|
192
|
+
case"End":q("last")}if(/^[a-z]$/i.test(e.key)){y.value+=e.key.toLowerCase()
|
|
192
193
|
const t=i.items?.length||0
|
|
193
|
-
for(let e=0;e<t;e++)if(i.items[e][i.itemLabel].toLowerCase().startsWith(
|
|
194
|
-
break}e.preventDefault(),e.stopPropagation()}b=window.setTimeout(function(){
|
|
194
|
+
for(let e=0;e<t;e++)if(i.items[e][i.itemLabel].toLowerCase().startsWith(y.value)){w(e)
|
|
195
|
+
break}e.preventDefault(),e.stopPropagation()}b=window.setTimeout(function(){y.value=""},500)}function q(e){switch(e){case"next":case"prev":w(function(e){return D($(),e)}(e))
|
|
195
196
|
break
|
|
196
197
|
case"first":w(M())
|
|
197
198
|
break
|
|
198
199
|
case"last":w(B())}}function w(e,t=!1){x()[e]?.focus({preventScroll:t})}function x(){const e=p.value?.querySelectorAll("li")
|
|
199
200
|
return e?Array.from(e):[]}function $(){return x().indexOf(document.activeElement)}function M(){const e=x(),t=e.find(e=>A(e))
|
|
200
201
|
return t?e.indexOf(t):-1}function B(){const e=x(),t=[...e].reverse().find(e=>A(e))
|
|
201
|
-
return t?e.indexOf(t):-1}function
|
|
202
|
-
if(
|
|
202
|
+
return t?e.indexOf(t):-1}function L(e,t,l){return"prev"===t&&e<=0||"next"===t&&e===l.length-1}function D(e,t){const l=x()
|
|
203
|
+
if(L(e,t,l))return e
|
|
203
204
|
let a=e+("next"===t?1:-1)
|
|
204
|
-
for(;!A(l[a]);){if(
|
|
205
|
-
a+="next"===t?1:-1}return a}function A(e){return-2===e.tabIndex}function
|
|
205
|
+
for(;!A(l[a]);){if(L(a,t,l))return e
|
|
206
|
+
a+="next"===t?1:-1}return a}function A(e){return-2===e.tabIndex}function T(e){return e?i.items?.filter(t=>t.group===e):i.items}return X(v,e=>{r("update:modelValue",e)}),l({getItem:function(e){return x()[e]},getActiveItemIndex:$,getAdjacentItemIndex:D,getFirstFocusableItemIndex:M,getLastFocusableItemIndex:B}),(t,l)=>(C(),o(Q(d.value),{id:i.id,ref_key:"listRef",ref:p,class:_(["q-list",{"q-list--disabled":i.disabled},i.class]),role:"listbox",tabindex:i.disabled?-1:0,onFocus:g,onMousedown:m,onMouseup:h,onKeydown:k},{default:J(()=>[S(t.$slots,"default",{},()=>[(C(!0),s(e,null,V(c.value,(l,a)=>(C(),o(H(ia),{id:l.id,key:l.id,title:1===c.value.length?void 0:l.title},{default:J(()=>[(C(!0),s(e,null,V(T(l.id),(e,n)=>(C(),o(H(oa),{key:e[i.itemValue],ref_for:!0,ref_key:"listItemsRef",ref:f,value:e[i.itemValue],label:e[i.itemLabel],description:e.description,icon:e.icon,disabled:i.disabled||l.disabled||e.disabled,highlighted:i.highlighted===e[i.itemValue],selectable:i.selectable||i.multiple||e.selectable,checkboxless:!i.multiple,"select-on-tab":i.selectOnTab,onClick:()=>{return t=e[i.itemValue],void r("click",t)
|
|
206
207
|
var t},onMouseenter:()=>{return t=e[i.itemValue],void r("mouseenter:item",t)
|
|
207
|
-
var t}},{append:
|
|
208
|
+
var t}},{append:J(()=>[S(t.$slots,"item.append",{item:e,element:f.value?.[n+a*c.value.length]?.$el})]),default:J(()=>[S(t.$slots,"item",{item:e,element:f.value?.[n+a*c.value.length]?.$el})]),_:2},1032,["value","label","description","icon","disabled","highlighted","selectable","checkboxless","select-on-tab","onClick","onMouseenter"]))),128))]),_:2},1032,["id","title"]))),128))])]),_:3},40,["id","class","tabindex"]))}}),Yl={check:{icon:"check"},description:{icon:"information-outline"}},Gl=["id","data-key","tabindex","aria-label","aria-selected"],Kl={class:"q-list-item__container"},Xl={class:"q-list-item__content"},Zl={key:0,class:"q-list-item__description"},Jl={key:0,class:"q-list-item__check-container"},ea=/*@__PURE__*/v({__name:"QListItem",props:/*@__PURE__*/y({value:{},label:{},icon:{},description:{},selectable:{type:Boolean},selectOnTab:{type:Boolean,default:!0},highlighted:{type:Boolean},disabled:{type:Boolean},icons:{default:()=>Yl},checkboxless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:/*@__PURE__*/y(["click"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,n=O(e,"modelValue"),u=Tt(),v=he(l.value)
|
|
208
209
|
if(!v)throw new Error("QListItem: Failed to retrieve group item. Ensure the component is used within a QList context.")
|
|
209
|
-
function p(){l.disabled||(a("click"),l.selectable&&v?.toggle())}function m(e){"Tab"===e.key&&l.selectOnTab&&p(),"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),p())}return
|
|
210
|
-
return(e,a)=>(C(),s("ul",{class:"q-list-item-group",role:"group","data-key":t.id,"aria-labelledby":t.title?
|
|
211
|
-
var
|
|
210
|
+
function p(){l.disabled||(a("click"),l.selectable&&v?.toggle())}function m(e){"Tab"===e.key&&l.selectOnTab&&p(),"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),p())}return X(v.isActive,e=>{n.value=e},{immediate:!0}),(e,t)=>(C(),s("li",{id:H(u),"data-key":l.value,role:"option",tabindex:l.disabled?void 0:-2,class:_(["q-list-item",{"q-list-item--selected":n.value,"q-list-item--selectable":l.selectable,"q-list-item--disabled":l.disabled,"q-list-item--highlighted":l.highlighted}]),"aria-label":l.label,"aria-selected":l.disabled?void 0:n.value,onKeydown:m,onClick:le(p,["stop","prevent"])},[S(e.$slots,"prepend"),r("div",Kl,[r("div",Xl,[S(e.$slots,"default",{},()=>[l.icon?(C(),o(H(yt),q(b({key:0},l.icon)),null,16)):i("",!0),d(" "+I(l.label),1)])]),l.description?(C(),s("div",Zl,[c(H(yt),q(f(l.icons.description)),null,16),r("span",null,I(l.description),1)])):i("",!0)]),S(e.$slots,"append"),l.selectable?(C(),s("div",Jl,[c(H(Cl),{borderless:l.checkboxless,disabled:l.disabled,"model-value":n.value,"onUpdate:modelValue":p},null,8,["borderless","disabled","model-value"])])):i("",!0)],42,Gl))}}),ta=["data-key","aria-labelledby"],la=["id"],aa=/*@__PURE__*/v({__name:"QListItemGroup",props:{id:{},title:{}},setup(e){const t=e,l=Tt()
|
|
211
|
+
return(e,a)=>(C(),s("ul",{class:"q-list-item-group",role:"group","data-key":t.id,"aria-labelledby":t.title?H(l):void 0},[t.title?(C(),s("li",{key:0,id:H(l),class:"q-list-item-group__title",role:"presentation"},I(t.title),9,la)):i("",!0),S(e.$slots,"default")],8,ta))}}),na=Me(jl),oa=Me(ea),ia=Me(aa),sa=Symbol.for("DismissibleLayer")
|
|
212
|
+
var ra={ref:"layer"},ua=Me(/*@__PURE__*/v({__name:"QDismissibleLayer",emits:["escape-key-down","pointer-down-outside","focus-outside","interact-outside","dismiss"],setup(e,{emit:t}){const l=t,a=N("layer"),n=function(e){const t=h(sa)
|
|
212
213
|
if(!t)throw new Error("useDismissibleLayerStackItem must be used within a dismissible layer stack context.")
|
|
213
|
-
return{register:()=>t.register(e),unregister:()=>t.unregister(e),isTop:()=>t.isTop(e)}}(
|
|
214
|
+
return{register:()=>t.register(e),unregister:()=>t.unregister(e),isTop:()=>t.isTop(e)}}(U())
|
|
214
215
|
let o=[]
|
|
215
216
|
function i(e){"Escape"===e.key&&n?.isTop()&&(l("escape-key-down",e),e.defaultPrevented||l("dismiss",e))}function r(e){if(!a.value)return
|
|
216
217
|
const t=e.target
|
|
@@ -218,32 +219,32 @@ if(!a.value.contains(t)&&n?.isTop()){const t=new CustomEvent("focus-outside",{bu
|
|
|
218
219
|
l("focus-outside",t),l("interact-outside",t),t.defaultPrevented||l("dismiss",t)}}function u(e){if(!a.value||!n?.isTop())return
|
|
219
220
|
const t=e.target
|
|
220
221
|
if(!a.value.contains(t)){const t=new CustomEvent("pointer-down-outside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}})
|
|
221
|
-
l("pointer-down-outside",t),l("interact-outside",t),t.defaultPrevented||l("dismiss",t)}}return M(()=>{n?.register(),document.addEventListener("keydown",i),o.push(()=>{document.removeEventListener("keydown",i)}),document.addEventListener("focusin",r),o.push(()=>{document.removeEventListener("focusin",r)}),["mousedown","touchstart"].forEach(e=>{document.addEventListener(e,u,{passive:!0,capture:!0}),o.push(()=>{document.removeEventListener(e,u,{capture:!0})})})}),B(()=>{n?.unregister(),o.forEach(e=>e()),o=[]}),(e,t)=>(C(),s("div",
|
|
222
|
+
l("pointer-down-outside",t),l("interact-outside",t),t.defaultPrevented||l("dismiss",t)}}return M(()=>{n?.register(),document.addEventListener("keydown",i),o.push(()=>{document.removeEventListener("keydown",i)}),document.addEventListener("focusin",r),o.push(()=>{document.removeEventListener("focusin",r)}),["mousedown","touchstart"].forEach(e=>{document.addEventListener(e,u,{passive:!0,capture:!0}),o.push(()=>{document.removeEventListener(e,u,{capture:!0})})})}),B(()=>{n?.unregister(),o.forEach(e=>e()),o=[]}),(e,t)=>(C(),s("div",ra,[S(e.$slots,"default")],512))}})),da="data-scroll-locked",ca="right-scroll-bar-position",va="width-before-scroll-bar",pa={left:0,top:0,right:0,gap:0},fa=e=>parseInt(e||"",10)||0,ma=(e="margin")=>{if("undefined"==typeof window)return pa
|
|
222
223
|
const t=(e=>{const t=window.getComputedStyle(document.body),l=t["padding"===e?"paddingLeft":"marginLeft"],a=t["padding"===e?"paddingTop":"marginTop"],n=t["padding"===e?"paddingRight":"marginRight"]
|
|
223
|
-
return[
|
|
224
|
+
return[fa(l),fa(a),fa(n)]})(e),l=document.documentElement.clientWidth,a=window.innerWidth
|
|
224
225
|
return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-l+t[2]-t[0])}}
|
|
225
|
-
var
|
|
226
|
+
var ha=()=>{let e=0,t=null
|
|
226
227
|
return{add:l=>{var a
|
|
227
|
-
0===e&&(t=document?document.createElement("style"):null)&&(a=l,t.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:()=>{e--,!e&&t&&(t.parentNode?.removeChild(t),t=null)}}},
|
|
228
|
+
0===e&&(t=document?document.createElement("style"):null)&&(a=l,t.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:()=>{e--,!e&&t&&(t.parentNode?.removeChild(t),t=null)}}},ga=/*@__PURE__*/v({__name:"QRemoveScrollBar",props:{gapMode:{default:"margin"},noRelative:{type:Boolean},noImportant:{type:Boolean}},setup(e){const t=e,l=ha(),a=()=>{const e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10)
|
|
228
229
|
return isFinite(e)?e:0}
|
|
229
|
-
return M(()=>{document.body.setAttribute(
|
|
230
|
-
const e=
|
|
231
|
-
l.add((({left:e,top:t,right:l,gap:a},n,o="margin",i)=>`\n .with-scroll-bars-hidden {\n overflow: hidden ${i};\n padding-right: ${a}px ${i};\n }\n body[${
|
|
232
|
-
e<=0?document.body.removeAttribute(
|
|
230
|
+
return M(()=>{document.body.setAttribute(da,(a()+1).toString())
|
|
231
|
+
const e=ma(t.gapMode)
|
|
232
|
+
l.add((({left:e,top:t,right:l,gap:a},n,o="margin",i)=>`\n .with-scroll-bars-hidden {\n overflow: hidden ${i};\n padding-right: ${a}px ${i};\n }\n body[${da}] {\n overflow: hidden ${i};\n overscroll-behavior: contain;\n ${[n&&`position: relative ${i};`,"margin"===o&&`\n padding-left: ${e}px;\n padding-top: ${t}px;\n padding-right: ${l}px;\n margin-left:0;\n margin-top:0;\n margin-right: ${a}px ${i};\n `,"padding"===o&&`padding-right: ${a}px ${i};`].filter(Boolean).join("")}\n }\n\n .${ca} {\n right: ${a}px ${i};\n }\n\n .${va} {\n margin-right: ${a}px ${i};\n }\n\n .${ca} .${ca} {\n right: 0 ${i};\n }\n\n .${va} .${va} {\n margin-right: 0 ${i};\n }\n\n body[${da}] {\n --removed-body-scroll-bar-size: ${a}px;\n }\n`)(e,!t.noRelative,t.gapMode,t.noImportant?"":"!important"))}),B(()=>{const e=a()-1
|
|
233
|
+
e<=0?document.body.removeAttribute(da):document.body.setAttribute(da,e.toString()),l.remove()}),(e,t)=>S(e.$slots,"default")}}),ya=Me(ga),ba={ref:"container"},ka=Me(/*@__PURE__*/v({__name:"QFocusWrap",props:{id:{},class:{},active:{type:Boolean,default:!0},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!0},closingFocus:{},returnFocusOnDeactivate:{type:Boolean}},setup(t){const l=t,a=N("container"),n=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed",'[tabindex]:not([tabindex="-1"])',"[contenteditable]"].join(",")
|
|
233
234
|
let o
|
|
234
235
|
function u(e){const t=function(e){if(e)return Array.prototype.slice.call(e.querySelectorAll(n)).filter(e=>(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0)&&!e.getAttribute("data-focus-wall"))}(a.value)
|
|
235
236
|
if(!t||0===t.length)return
|
|
236
237
|
const l=t["first"===e?0:t.length-1]
|
|
237
238
|
"function"==typeof l?.focus&&l.focus()}function d(){u("first")}function c(){u("last")}function v(e){let t
|
|
238
|
-
t="string"==typeof e?document.querySelector(e):e,"function"==typeof t?.focus&&t?.focus()}return $(()=>{l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})}),
|
|
239
|
-
function
|
|
240
|
-
if(
|
|
239
|
+
t="string"==typeof e?document.querySelector(e):e,"function"==typeof t?.focus&&t?.focus()}return $(()=>{l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})}),X(()=>l.active,()=>{l.active?(l.returnFocusOnDeactivate&&(o=document.activeElement),l.initialFocus?k(()=>{v(l.initialFocus)}):l.focusWithinOnActivate&&k(()=>{d()})):l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})},{immediate:!0}),(t,a)=>(C(),s(e,null,[l.active?(C(),s("span",{key:0,class:"q-focus-wrap",tabindex:"0","data-focus-wall":"true",onFocus:c},null,32)):i("",!0),r("span",ba,[S(t.$slots,"default")],512),l.active?(C(),s("span",{key:1,class:"q-focus-wrap",tabindex:"0","data-focus-wall":"true",onFocus:d},null,32)):i("",!0)],64))}}))
|
|
240
|
+
function _a(e,t,l,a){const n=a?.offset??0,o=a?.crossOffset??0,i=a?.placement??"bottom",s=e.getBoundingClientRect(),r=t.getBoundingClientRect(),u=l?.getBoundingClientRect(),d=function(e,t,l,a){if($a(qa(e,t,l,a))){const n={top:"bottom",bottom:"top",left:"right",right:"left"}[xa(l)]
|
|
241
|
+
if($a(qa(e,t,n,a)))return l
|
|
241
242
|
const o=function(e){const[,t]=e.split("-")
|
|
242
243
|
return t}(l)
|
|
243
|
-
return o?`${n}-${o}`:n}return l}(s,r,i,n),c=function(e,t,l){const a=
|
|
244
|
+
return o?`${n}-${o}`:n}return l}(s,r,i,n),c=function(e,t,l){const a=wa(l),n=(e,t,l)=>Math.min(Math.max(e,t),l),o={...e}
|
|
244
245
|
"x"===a?o.x=n(e.x,8,window.innerWidth-t.width-8):o.y=n(e.y,8,window.innerHeight-t.height-8)
|
|
245
|
-
return o}(function(e,t,l){const a=
|
|
246
|
-
return{x:e.x+("top"===a||"bottom"===a?l:0),y:e.y+("right"===a||"left"===a?l:0)}}(function(e,t,l){const a=
|
|
246
|
+
return o}(function(e,t,l){const a=xa(t)
|
|
247
|
+
return{x:e.x+("top"===a||"bottom"===a?l:0),y:e.y+("right"===a||"left"===a?l:0)}}(function(e,t,l){const a=xa(t)
|
|
247
248
|
return{x:e.x+("left"===a?-l:"right"===a?l:0),y:e.y+("top"===a?-l:"bottom"===a?l:0)}}(function(e,t,l){const[a,n]=l.split("-"),o=e.x+e.width/2-t.width/2,i=e.y+e.height/2-t.height/2
|
|
248
249
|
let s
|
|
249
250
|
switch(a){case"top":s={x:o,y:e.y-t.height}
|
|
@@ -255,7 +256,7 @@ break
|
|
|
255
256
|
case"right":s={x:e.x+e.width,y:i}
|
|
256
257
|
break
|
|
257
258
|
default:throw new Error(`[Quidgest UI] Invalid placement value: ${l}`)}if(!n)return s
|
|
258
|
-
const r="y"===
|
|
259
|
+
const r="y"===wa(l)?"height":"width",u=wa(l),d=e[r]/2-t[r]/2
|
|
259
260
|
switch(n){case"start":s[u]-=d
|
|
260
261
|
break
|
|
261
262
|
case"end":s[u]+=d
|
|
@@ -263,9 +264,9 @@ break
|
|
|
263
264
|
default:throw new Error(`[Quidgest UI] Invalid alignment value: ${n}`)}return s}(s,r,d),d,n),d,o),r,d)
|
|
264
265
|
let v
|
|
265
266
|
if(a?.arrow){if(!u)throw new Error("[Quidgest UI] The arrow element must exist to compute its position")
|
|
266
|
-
v=function(e,t,l,a,n){if("y"===
|
|
267
|
+
v=function(e,t,l,a,n){if("y"===wa(n)){const n=t.top+t.height/2,o=e.y+l.height/2-n,i=l.height/2-o-a.height/2+2
|
|
267
268
|
if(i>0&&i<l.height-a.height)return{y:i}}else{const n=t.left+t.width/2,o=e.x+l.width/2-n,i=l.width/2-o-a.width/2+2
|
|
268
|
-
if(i>0&&i<l.width-a.width)return{x:i}}}(c,s,r,u,d)}return{overlayCoords:c,arrowCoords:v,placement:d}}function
|
|
269
|
+
if(i>0&&i<l.width-a.width)return{x:i}}}(c,s,r,u,d)}return{overlayCoords:c,arrowCoords:v,placement:d}}function qa(e,t,l,a){const n=xa(l)
|
|
269
270
|
let o=0
|
|
270
271
|
switch(n){case"top":o=e.top-(t.height+a)
|
|
271
272
|
break
|
|
@@ -275,189 +276,51 @@ case"left":o=e.left-(t.width+a)
|
|
|
275
276
|
break
|
|
276
277
|
case"right":o=window.innerWidth-e.right-(t.width+a)
|
|
277
278
|
break
|
|
278
|
-
default:throw new Error(`[Quidgest UI] Invalid side value: ${n}`)}return o}function
|
|
279
|
+
default:throw new Error(`[Quidgest UI] Invalid side value: ${n}`)}return o}function wa(e){return t=function(e){const t=xa(e)
|
|
279
280
|
return["left","right"].includes(t)?"x":"y"}(e),"x"===t?"y":"x"
|
|
280
|
-
var t}function
|
|
281
|
-
return t}function
|
|
282
|
-
|
|
281
|
+
var t}function xa(e){const[t]=e.split("-")
|
|
282
|
+
return t}function $a(e){return e<0}function Ma(e){return"string"==typeof e?document.querySelector(e):e}var Ba=["id"],Ca=["role"],La=/*@__PURE__*/v({inheritAttrs:!1,__name:"QOverlay",props:{id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{default:8},crossOffset:{default:0},placement:{default:"right"},transition:{default:"fade"},width:{default:"auto"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{default:"click"},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!1},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0}},emits:["update:modelValue","enter","leave"],setup(a,{emit:u}){const d=a,v=u,{class:p}=Ye(),f=n(()=>["q-overlay",`q-overlay--${xa(q.placement)}`,p.value,{"q-overlay--independent":m.value,"q-overlay--inverted":"inverted"===d.appearance,"q-overlay--center":d.centerVertically},d.class]),m=n(()=>void 0===d.anchor),h=n(()=>d.modelValue&&!d.nonModal),g=n(()=>(d.modelValue||q.animating)&&d.scrollLock),y=n(()=>!d.inline&&(d.modelValue||q.animating)),q=D({animating:!1,top:0,left:0,width:0,placement:d.placement}),x=D({top:void 0,left:void 0,hidden:!0})
|
|
283
|
+
X(()=>d.modelValue,function(){q.animating=!0})
|
|
283
284
|
const B=n(()=>{if(m.value)return
|
|
284
|
-
const e=
|
|
285
|
-
return{top:`${q.top}px`,left:`${q.left}px`,width:void 0!==t?`${t}px`:void 0}}),
|
|
286
|
-
function
|
|
285
|
+
const e=Z(),t="anchor"===d.width?e?.getBoundingClientRect().width:void 0
|
|
286
|
+
return{top:`${q.top}px`,left:`${q.left}px`,width:void 0!==t?`${t}px`:void 0}}),L=n(()=>{if(d.arrow)return{top:void 0!==x.top?`${x.top}px`:void 0,left:void 0!==x.left?`${x.left}px`:void 0,opacity:x.hidden?0:1}}),E=N("arrow"),V=N("overlay"),A=N("overlayContainer")
|
|
287
|
+
function Q(){const e=Z()
|
|
287
288
|
if(!e||!A.value)return
|
|
288
|
-
const t={placement:d.placement,width:d.width,offset:d.offset,crossOffset:d.crossOffset,arrow:d.arrow},l=
|
|
289
|
-
q.left=l.overlayCoords.x,q.top=l.overlayCoords.y,q.placement=l.placement,x.hidden=void 0===l.arrowCoords,l.arrowCoords&&(x.top=l.arrowCoords.y,x.left=l.arrowCoords.x)}let
|
|
290
|
-
function P(){R(0)}function
|
|
291
|
-
k(()=>e?.focus())}}function
|
|
292
|
-
d.spy&&(clearTimeout(z),z=void 0)}()}function
|
|
289
|
+
const t={placement:d.placement,width:d.width,offset:d.offset,crossOffset:d.crossOffset,arrow:d.arrow},l=_a(e,A.value,E?.value??void 0,t)
|
|
290
|
+
q.left=l.overlayCoords.x,q.top=l.overlayCoords.y,q.placement=l.placement,x.hidden=void 0===l.arrowCoords,l.arrowCoords&&(x.top=l.arrowCoords.y,x.left=l.arrowCoords.x)}let T,I,z
|
|
291
|
+
function P(){R(0)}function F(){R(d.delay)}function R(e){T&&O(),T=window.setTimeout(()=>{v("update:modelValue",!0)},e)}function U(){if(T&&O(),v("update:modelValue",!1),d.anchor&&"click"===d.trigger){const e=Z()
|
|
292
|
+
k(()=>e?.focus())}}function O(){clearTimeout(T),T=void 0}function W(){k(ie),v("enter")}function j(){K()}function Y(){v("leave")}function G(){K(),function(){m.value||(window.removeEventListener("resize",Q),d.scrollLock||window.removeEventListener("scroll",Q))
|
|
293
|
+
d.spy&&(clearTimeout(z),z=void 0)}()}function K(){q.animating=!1}function Z(){return d.anchor?Ma(d.anchor):null}function ee(e){d.persistent&&e.preventDefault()}function te(e){if(d.persistent)return void e.preventDefault()
|
|
293
294
|
let t=!1
|
|
294
295
|
e.defaultPrevented||"pointerdown"===e.detail.originalEvent.type&&(t=!0)
|
|
295
|
-
const l=e.detail.originalEvent.target;(
|
|
296
|
-
if(e)switch(
|
|
296
|
+
const l=e.detail.originalEvent.target;(Z()?.contains(l)||"focusin"===e.detail.originalEvent.type&&t)&&e.preventDefault()}function ae(){U()}function ne(){const e=Z()
|
|
297
|
+
if(e)switch(I=new MutationObserver(Q),I.observe(e,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),d.trigger){case"click":e.addEventListener("click",P)
|
|
297
298
|
break
|
|
298
|
-
case"hover":e.addEventListener("mouseenter",
|
|
299
|
-
if(e)switch(
|
|
299
|
+
case"hover":e.addEventListener("mouseenter",F),e.addEventListener("mouseleave",U),e.addEventListener("focusin",P),e.addEventListener("focusout",U)}}function oe(){Z()?(Q(),z=window.setTimeout(oe,100)):U()}function ie(){m.value||(window.addEventListener("resize",Q),d.scrollLock||window.addEventListener("scroll",Q),d.spy?oe():Q()),!m.value&&"click"!==d.trigger||d.initialFocus||d.focusWithinOnActivate||V.value?.focus()}return X(()=>d.placement,()=>k(Q)),M(()=>{k(ne)}),$(function(){const e=Z()
|
|
300
|
+
if(e)switch(I?.disconnect(),d.trigger){case"click":e.removeEventListener("click",P)
|
|
300
301
|
break
|
|
301
|
-
case"hover":e.removeEventListener("mouseenter",
|
|
302
|
+
case"hover":e.removeEventListener("mouseenter",F),e.removeEventListener("mouseleave",U),e.removeEventListener("focusin",P),e.removeEventListener("focusout",U)}}),(a,n)=>(C(),s(e,null,[(C(),o(t,{disabled:!y.value,to:d.attach},[c(l,{name:"fade",appear:""},{default:J(()=>[h.value?(C(),s("div",{key:0,class:_([d.backdropClass,"q-overlay__underlay",{"q-overlay__underlay--blur":d.backdropBlur}]),onMousedown:n[0]||(n[0]=le(()=>{},["prevent"]))},null,34)):i("",!0)]),_:1}),c(l,{name:d.transition,appear:"",onEnter:W,onAfterEnter:j,onLeave:Y,onAfterLeave:G},{default:J(()=>[d.modelValue?(C(),s("div",{key:0,id:d.id,ref:"overlayContainer",tabindex:"-1",class:_(f.value),style:w(B.value)},[c(H(ua),{onDismiss:ae,onInteractOutside:te,onPointerDownOutside:ee},{default:J(()=>[A.value?(C(),o(H(ka),{key:0,active:!d.nonModal&&d.modelValue&&d.focusWrap,"initial-focus":d.initialFocus,"focus-within-on-activate":d.focusWithinOnActivate,"closing-focus":d.closingFocus,"return-focus-on-deactivate":d.returnFocusOnDeactivate},{default:J(()=>[r("div",b({ref:"overlay",class:"q-overlay__content",tabindex:"-1",role:h.value?"dialog":void 0},a.$attrs),[d.arrow?(C(),s("div",{key:0,ref:"arrow",role:"presentation",class:"q-overlay__arrow",style:w(L.value)},null,4)):i("",!0),S(a.$slots,"default")],16,Ca)]),_:3},8,["active","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate"])):i("",!0)]),_:3})],14,Ba)):i("",!0)]),_:3},8,["name"])],8,["disabled","to"])),g.value?(C(),o(H(ya),{key:0})):i("",!0)],64))}}),Da=Me(La),Ea=["data-key"],Va={key:0,class:"q-select__loader"},Sa={key:2,class:"q-select__loader"},Aa=/*@__PURE__*/v({inheritAttrs:!1,__name:"QCombobox",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},clearable:{type:Boolean},texts:{default:()=>Wl},itemValue:{default:"key"},itemLabel:{default:"label"},items:{},groups:{default:()=>[]},selectionMode:{default:"automatic"},filterMode:{default:"builtin"},inline:{type:Boolean},loading:{type:Boolean},emptyValue:{},icons:{default:()=>Nl}},{modelValue:{},modelModifiers:{},open:{type:Boolean},openModifiers:{},search:{default:""},searchModifiers:{}}),emits:/*@__PURE__*/y(["before-show","before-hide","show","hide"],["update:modelValue","update:open","update:search"]),setup(t,{expose:l,emit:a}){const d=t,v=a,p=O(t,"modelValue"),f=O(t,"open"),m=O(t,"search"),h=E(void 0),g=E(null),y=E(null),_=E(null),q=E(null),w=E(null)
|
|
302
303
|
M(T)
|
|
303
|
-
const x=n(()=>d.clearable&&!d.readonly&&!d.disabled),$=n(()=>"manual"!==d.filterMode&&A.value?d.items?.filter(e=>e[d.itemLabel].toLowerCase().startsWith(m.value.toLowerCase()))??[]:d.items??[]),B=n(()=>d.items?.find(e=>e[d.itemValue]===p.value)),
|
|
304
|
-
if(void 0!==e&&$.value[e])return $.value[e]}),
|
|
305
|
-
function
|
|
306
|
-
m.value!==e&&(m.value=e)}function z(){f.value||d.readonly||d.disabled||(v("before-show"),f.value=!0,Y())}function P(){f.value&&(v("before-hide"),f.value=!1,h.value=void 0)}function
|
|
304
|
+
const x=n(()=>d.clearable&&!d.readonly&&!d.disabled),$=n(()=>"manual"!==d.filterMode&&A.value?d.items?.filter(e=>e[d.itemLabel].toLowerCase().startsWith(m.value.toLowerCase()))??[]:d.items??[]),B=n(()=>d.items?.find(e=>e[d.itemValue]===p.value)),L=n(()=>void 0===B.value),D=n(()=>{const e=h.value
|
|
305
|
+
if(void 0!==e&&$.value[e])return $.value[e]}),V=n(()=>{if(void 0!==h.value)return(y.value?.getItem(h.value))?.id}),A=n(()=>m.value.length>0&&m.value!==B.value?.[d.itemLabel])
|
|
306
|
+
function Q(e){p.value=e,P()}function T(){const e=B.value?.[d.itemLabel]||""
|
|
307
|
+
m.value!==e&&(m.value=e)}function z(){f.value||d.readonly||d.disabled||(v("before-show"),f.value=!0,Y())}function P(){f.value&&(v("before-hide"),f.value=!1,h.value=void 0)}function F(){f.value?P():U()}function R(){x.value&&(p.value=d.emptyValue,h.value=void 0,Y())}function U(){if(z(),void 0!==B.value){const e=$.value.indexOf(B.value);-1!==e&&k(()=>ee(e))}}function W(e){if(e.key&&!d.readonly&&!d.disabled)if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),"Escape"===e.key)T(),f.value&&(e.preventDefault(),e.stopPropagation(),P())
|
|
307
308
|
else if(["ArrowDown","ArrowUp"].includes(e.key))f.value?k(()=>{if(void 0===h.value)N()
|
|
308
309
|
else{const t="ArrowDown"===e.key?"next":"prev"
|
|
309
|
-
!function(e,t){h.value=
|
|
310
|
-
else if("Enter"===e.key){if(void 0===
|
|
311
|
-
|
|
312
|
-
else if("End"===e.key)h.value=
|
|
313
|
-
else if("Tab"===e.key){if(void 0===
|
|
314
|
-
|
|
310
|
+
!function(e,t){h.value=y.value?.getAdjacentItemIndex(e,t)}(h.value,t)}}):(z(),k(()=>{"ArrowDown"===e.key?N():h.value=y.value?.getLastFocusableItemIndex()}))
|
|
311
|
+
else if("Enter"===e.key){if(void 0===D.value)return
|
|
312
|
+
Q(D.value[d.itemValue])}else if("Home"===e.key)h.value=y.value?.getFirstFocusableItemIndex()
|
|
313
|
+
else if("End"===e.key)h.value=y.value?.getLastFocusableItemIndex()
|
|
314
|
+
else if("Tab"===e.key){if(void 0===D.value)return
|
|
315
|
+
Q(D.value[d.itemValue])}else(/^[a-z0-9]$/i.test(e.key)||"Backspace"===e.key)&&z()}function N(){if(L.value)h.value=y.value?.getFirstFocusableItemIndex()
|
|
315
316
|
else{const e=$.value.findIndex(e=>e[d.itemValue]===p.value)
|
|
316
|
-
h.value=-1===e?
|
|
317
|
+
h.value=-1===e?y.value?.getFirstFocusableItemIndex():e}}function j(e){const t=_?.value?.$el===e.relatedTarget,l=q?.value?.$el===e.relatedTarget,a=g?.value?.$el?.contains(e.relatedTarget),n=w?.value?.contains(e.relatedTarget)
|
|
317
318
|
if(t||l||n||a)return e.preventDefault(),void e.stopPropagation()
|
|
318
|
-
P(),x.value&&!m.value&&(p.value=d.emptyValue),T()}function Y(){
|
|
319
|
-
|
|
320
|
-
m.value===e?.[d.itemLabel]&&T()}},{deep:!0}),
|
|
321
|
-
return(t,n)=>(C(),s("div",{class:"q-switch__container",onClick:n[1]||(n[1]=
|
|
322
|
-
function
|
|
323
|
-
if(!n)return
|
|
324
|
-
const o=e=>{const l=e.target
|
|
325
|
-
if(l.readOnly||l.disabled)return
|
|
326
|
-
const a=Fa(t),n=l.value,o=l.selectionStart??n.length,i=Ra(n,a)
|
|
327
|
-
if(n!==i){const e=Ua(n,i,o)
|
|
328
|
-
l.value=i,l.setSelectionRange(e,e),l.dispatchEvent(new Event("input",{bubbles:!0}))}},i=e=>{const l=e.target
|
|
329
|
-
if(l.readOnly||l.disabled)return
|
|
330
|
-
const a=Fa(t),n=function(e){const t=[]
|
|
331
|
-
for(let l=0;l<e.length;l++)"!"!==e[l]?t.push(e[l]):l+1<e.length&&(t.push(e[l+1]),l++)
|
|
332
|
-
return t}(a)
|
|
333
|
-
if(e.ctrlKey||e.metaKey||e.altKey)return
|
|
334
|
-
if(["ArrowLeft","ArrowRight","Delete","Tab","Enter"].includes(e.key))return
|
|
335
|
-
if("Backspace"===e.key)return void function(e,t,l,a){const n=t.selectionStart,o=t.selectionEnd
|
|
336
|
-
if(null===n||null===o)return
|
|
337
|
-
if(n!==o||n<=0)return
|
|
338
|
-
const i=Ka(t.value,a)
|
|
339
|
-
if(i>=0&&n>i){e.preventDefault()
|
|
340
|
-
const l=function(e,t){return t+Ga(e,t).consumed}(t.value,i)
|
|
341
|
-
let n=i
|
|
342
|
-
return n>0&&" "===t.value[n-1]&&(n-=1),t.value=Ra(`${t.value.slice(0,n)}${t.value.slice(l)}`,a),t.setSelectionRange(n,n),void t.dispatchEvent(new Event("input",{bubbles:!0}))}if(i>=0&&n===i&&n>0&&" "===t.value[n-1])return e.preventDefault(),t.value=Ra(`${t.value.slice(0,n-1)}${t.value.slice(n)}`,a),t.setSelectionRange(n-1,n-1),void t.dispatchEvent(new Event("input",{bubbles:!0}))
|
|
343
|
-
const s=l[n-1]
|
|
344
|
-
if(void 0===s)return
|
|
345
|
-
if("#"===s||"n"===s||"A"===s||"a"===s||"W"===s||"p"===s)return
|
|
346
|
-
let r=n-1
|
|
347
|
-
for(;r>0;){const e=l[r-1]
|
|
348
|
-
if("#"===e||"n"===e||"A"===e||"a"===e||"W"===e){r-=1
|
|
349
|
-
break}r-=1}e.preventDefault(),t.value=Ra(`${t.value.slice(0,r)}${t.value.slice(n)}`,a),t.setSelectionRange(r,r),t.dispatchEvent(new Event("input",{bubbles:!0}))}(e,l,n,a)
|
|
350
|
-
if(!e.key||1!==e.key.length)return
|
|
351
|
-
const o=l.selectionStart??0,i=l.selectionEnd??0
|
|
352
|
-
if(a.includes("W"))return
|
|
353
|
-
if(o===i&&o<l.value.length){const t=function(e,t,l,a,n){const o=Ya(a,t)
|
|
354
|
-
if(void 0===o||o>=e.length)return null
|
|
355
|
-
const i=a[o]
|
|
356
|
-
if(!i)return null
|
|
357
|
-
if("p"===i){if(!Ja(l,Za(e,n,o)))return null}else if(!Xa(l,i))return null
|
|
358
|
-
const s="A"===i?l.toUpperCase():"a"===i?l.toLowerCase():"p"===i?l.toUpperCase():l,r=Ra(`${e.slice(0,o)}${s}${e.slice(o+1)}`,n)
|
|
359
|
-
return r.length!==e.length?null:{value:r,cursor:Ya(a,o+1)??r.length}}(l.value,o,e.key,n,a)
|
|
360
|
-
if(t)return e.preventDefault(),l.value=t.value,l.setSelectionRange(t.cursor,t.cursor),void l.dispatchEvent(new Event("input",{bubbles:!0}))}const s=function(e,t){const l=Ya(e,t)
|
|
361
|
-
return void 0===l?void 0:e[l]}(n,o)
|
|
362
|
-
if(void 0!==s){if("p"===s){const t=Za(l.value,a,o),n=e.key.toUpperCase()
|
|
363
|
-
if("AM"===t||"PM"===t)return void e.preventDefault()
|
|
364
|
-
if(!t&&("A"===n||"P"===n)){e.preventDefault()
|
|
365
|
-
const t=Ka(l.value,a),o=Ra(`${t>=0?l.value.slice(0,t):l.value}${n}M`,a)
|
|
366
|
-
return l.value=o,l.setSelectionRange(o.length,o.length),void l.dispatchEvent(new Event("input",{bubbles:!0}))}return void(Ja(e.key,t)||e.preventDefault())}Xa(e.key,s)||en(e.key,a,o,l.value,o)||e.preventDefault()}else{if(en(e.key,a,o,l.value,o))return
|
|
367
|
-
e.preventDefault()}}
|
|
368
|
-
n.addEventListener("input",o),n.addEventListener("keydown",i),a(()=>{n.removeEventListener("input",o),n.removeEventListener("keydown",i)})},{flush:"post"})}function Ra(e,t){let l="",a=0,n=0
|
|
369
|
-
for(;n<t.length&&a<e.length;){const o=t[n],i=e[a]
|
|
370
|
-
if("!"===o){const e=t[n+1]
|
|
371
|
-
if(!e)break
|
|
372
|
-
i===e?(l+=e,a++):l+=e,n+=2
|
|
373
|
-
continue}if("#"===o||"n"===o){if(!/\d/.test(i)){a++
|
|
374
|
-
continue}l+=i,a++}else if("A"===o||"a"===o){if(!tn(i)){a++
|
|
375
|
-
continue}l+="A"===o?i.toUpperCase():i.toLowerCase(),a++}else{if("p"===o){const t=Ga(e,a)
|
|
376
|
-
if(0===t.consumed)break
|
|
377
|
-
a+=t.consumed,t.text&&(l+=t.text),n++
|
|
378
|
-
continue}if("W"===o){const o=t[n+1]
|
|
379
|
-
let i=!1
|
|
380
|
-
for(;a<e.length;){const t=e[a]
|
|
381
|
-
if(o&&t===o&&i)break
|
|
382
|
-
if(tn(t))l+=t,a++,i=!0
|
|
383
|
-
else{if(o&&t===o)break
|
|
384
|
-
a++}}}else if(i===o)l+=o,a++
|
|
385
|
-
else if(/\d/.test(i))l+=o
|
|
386
|
-
else{if(en(i,t,n+1,e,a)){l+=o,n++
|
|
387
|
-
continue}a++}}n++}return l}function Ua(e,t,l){const a=(e.slice(0,l).match(/[\da-z]/gi)??[]).length
|
|
388
|
-
if(0===a)return 0
|
|
389
|
-
let n=0
|
|
390
|
-
for(let o=0;o<t.length;o++)if(/[\da-z]/i.test(t[o]??"")&&(n++,n===a))return o+1
|
|
391
|
-
return t.length}function Wa(e,t,l){if(l.startsWith("'")){const a=l.slice(1,-1).replace(/''/g,"'")
|
|
392
|
-
return e.slice(t).startsWith(a)?t+a.length:null}if("a"===l){const l=e.slice(t),a=l.match(/^\s*(AM|PM)/i)
|
|
393
|
-
return a?t+a[0].length:l.startsWith(" ")?t+1:null}return t>=e.length||e[t]!==l?null:t+1}function Oa(e,t){const l=t.match(/yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g)??[]
|
|
394
|
-
let a=e,n=0
|
|
395
|
-
for(const o of l){if(o.startsWith("'")){const e=Wa(a,n,o)
|
|
396
|
-
if(null===e)break
|
|
397
|
-
n=e
|
|
398
|
-
continue}const e="yyyy"===o?4:"yy"===o?2:"SSS"===o?3:"S"===o?1:["MM","dd","HH","hh","mm","ss","M","d","H","h","m","s"].includes(o)?2:0
|
|
399
|
-
if(0===e){const e=Wa(a,n,o)
|
|
400
|
-
if(null===e)break
|
|
401
|
-
n=e
|
|
402
|
-
continue}const t=a.slice(n).match(/^\d+/)?.[0]?.slice(0,e)??""
|
|
403
|
-
if(!t)continue
|
|
404
|
-
const l=n+t.length
|
|
405
|
-
if(!(t.length===e||l<a.length&&!/\d/.test(a[l])))continue
|
|
406
|
-
const i=Number.parseInt(t,10)
|
|
407
|
-
if(Number.isNaN(i))continue
|
|
408
|
-
const s=ja(o,t,i)
|
|
409
|
-
a=`${a.slice(0,n)}${s}${a.slice(l)}`,n+=s.length}return function(e,t){let l=null,a=null,n=-1,o=0,i=null,s=0
|
|
410
|
-
for(const d of t){if(d.startsWith("'")){const t=Wa(e,s,d)
|
|
411
|
-
if(null===t)break
|
|
412
|
-
s=t
|
|
413
|
-
continue}const t="yyyy"===d?4:"yy"===d||["MM","dd","M","d"].includes(d)?2:0
|
|
414
|
-
if(0===t){const t=Wa(e,s,d)
|
|
415
|
-
if(null===t)break
|
|
416
|
-
s=t
|
|
417
|
-
continue}const r=e.slice(s).match(/^\d+/)?.[0]?.slice(0,t)??""
|
|
418
|
-
if(!r)continue
|
|
419
|
-
const u=s+r.length
|
|
420
|
-
if(!(r.length===t||u<e.length&&!/\d/.test(e[u])))continue
|
|
421
|
-
const c=Number.parseInt(r,10)
|
|
422
|
-
Number.isNaN(c)||("MM"!==d&&"M"!==d||(l=Math.min(12,Math.max(1,c))),"yyyy"===d&&(a=c),"yy"===d&&(a=c<50?2e3+c:1900+c),"dd"!==d&&"d"!==d||(n=s,o=r.length,i=Math.max(1,c)),s=u)}if(n<0||null===i)return e
|
|
423
|
-
const r=function(e,t){if(!e)return 31
|
|
424
|
-
if([1,3,5,7,8,10,12].includes(e))return 31
|
|
425
|
-
if([4,6,9,11].includes(e))return 30
|
|
426
|
-
const l=t??/* @__PURE__ */(new Date).getFullYear()
|
|
427
|
-
return l%4==0&&l%100!=0||l%400==0?29:28}(l,a)
|
|
428
|
-
if(i<=r)return e
|
|
429
|
-
const u=o>1?Na(r,o):String(r)
|
|
430
|
-
return`${e.slice(0,n)}${u}${e.slice(n+o)}`}(a,l)}function Na(e,t=2){return String(e).padStart(t,"0")}function ja(e,t,l){let a=l
|
|
431
|
-
return"MM"!==e&&"M"!==e||(a=Math.min(12,Math.max(1,l))),"dd"!==e&&"d"!==e||(a=Math.min(31,Math.max(1,l))),"HH"!==e&&"H"!==e||(a=Math.min(23,Math.max(0,l))),"hh"!==e&&"h"!==e||(a=Math.min(12,Math.max(1,l))),"mm"!==e&&"m"!==e&&"ss"!==e&&"s"!==e||(a=Math.min(59,Math.max(0,l))),t.length>1?Na(a,t.length):0!==a||"hh"!==e&&"h"!==e&&"MM"!==e&&"M"!==e&&"dd"!==e&&"d"!==e?String(a):"1"}function Ya(e,t){for(let l=t;l<e.length;l++){const t=e[l]
|
|
432
|
-
if("#"===t||"n"===t||"A"===t||"a"===t||"W"===t||"p"===t)return l}}function Ga(e,t){let l=t
|
|
433
|
-
for(;l<e.length&&" "===e[l];)l+=1
|
|
434
|
-
let a="",n=l
|
|
435
|
-
for(;n<e.length&&/[A-Za-z]/.test(e[n]??"");){const t=(e[n]??"").toUpperCase()
|
|
436
|
-
if(0===a.length){if("A"===t||"P"===t){a=`${t}M`,n+=1,n<e.length&&"M"===(e[n]??"").toUpperCase()&&(n+=1)
|
|
437
|
-
break}}else if(1===a.length&&"M"===t){a+="M",n+=1
|
|
438
|
-
break}n+=1}for(;n<e.length&&/[A-Za-z]/.test(e[n]??"");)n+=1
|
|
439
|
-
return{consumed:n-t,text:a}}function Ka(e,t){let l=0,a=0
|
|
440
|
-
for(;a<t.length;){const n=t[a]
|
|
441
|
-
if("p"===n)return l
|
|
442
|
-
if("!"===n){const n=t[a+1]
|
|
443
|
-
n&&e[l]===n&&(l+=1),a+=2
|
|
444
|
-
continue}if("#"===n||"n"===n){if(/\d/.test(e[l]??"")){l+=1,a+=1
|
|
445
|
-
continue}return-1}if("A"===n||"a"===n){if(tn(e[l]??"")){l+=1,a+=1
|
|
446
|
-
continue}return-1}if("W"===n){const n=t[a+1]
|
|
447
|
-
if(tn(e[l]??"")&&e[l]!==n){l+=1
|
|
448
|
-
continue}a+=1
|
|
449
|
-
continue}if(e[l]!==n){if(" "===n&&"p"===t[a+1]){const n=e[l]
|
|
450
|
-
if((void 0===n||" "===n||/[A-Za-z]/.test(n))&&(a+=1,"p"===t[a]))return l}return-1}l+=1,a+=1}return-1}function Za(e,t,l){const a=Ka(e,t)
|
|
451
|
-
return a<0||l<=a?"":Ga(e.slice(0,l),a).text}function Ja(e,t){const l=t.toUpperCase()
|
|
452
|
-
if("AM"===l||"PM"===l)return!1
|
|
453
|
-
const a=e.toUpperCase()
|
|
454
|
-
return t?1===l.length&&("A"===l||"P"===l)&&"M"===a:"A"===a||"P"===a}function Xa(e,t){return"#"===t||"n"===t?/\d/.test(e):"p"===t?Ja(e,""):"A"===t||"a"===t||"W"===t?tn(e):e===t}function en(e,t,l,a,n){const o=function(e,t){let l=t
|
|
455
|
-
for(;l<e.length;){const t=e[l]
|
|
456
|
-
if("!"!==t){if("#"===t||"n"===t||"A"===t||"a"===t||"W"===t||"p"===t)return l
|
|
457
|
-
l+=1}else l+=2}return-1}(t,l)
|
|
458
|
-
if(o<0)return!1
|
|
459
|
-
const i=t[o]
|
|
460
|
-
return!(!i||"!"===i)&&("p"===i?Ja(e,void 0!==a&&void 0!==n?Za(a,t,n):""):Xa(e,i))}function tn(e){return/[\p{L}\s.'-]/u.test(e)}function ln(e){let t="",l=0,a=!1
|
|
319
|
+
P(),x.value&&!m.value&&(p.value=d.emptyValue),T()}function Y(){g.value?.inputRef?.focus()}function G(){Y()}function K(){v("show")}function Z(){v("hide")}function ee(e){const t=y.value?.getItem(e)
|
|
320
|
+
y.value&&(y.value.$el.scrollTop=t?.offsetTop)}return X(p,T),X(()=>d.items,(e,t)=>{if(!L.value){const e=t?.find(e=>e[d.itemValue]===p.value)
|
|
321
|
+
m.value===e?.[d.itemLabel]&&T()}},{deep:!0}),X(h,e=>{void 0!==e&&ee(e)}),X(m,e=>{e&&f.value&&"automatic"===d.selectionMode&&k(N)}),X(()=>d.loading,e=>{!e&&f.value&&k(N)}),l({triggerEl:g}),(l,a)=>(C(),s(e,null,[c(H(Rl),b({id:d.id,ref_key:"triggerEl",ref:g,modelValue:m.value,"onUpdate:modelValue":a[0]||(a[0]=e=>m.value=e),label:d.label,required:d.required,role:"combobox",placeholder:d.placeholder,class:["q-combobox",{"q-combobox--readonly":d.readonly,"q-combobox--disabled":d.disabled},d.class],readonly:d.readonly,disabled:d.disabled,"data-loading":d.loading,autocomplete:"off","aria-expanded":f.value,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":V.value,size:d.size},l.$attrs,{onClick:U,onFocusout:j,onKeydown:W}),u({"label.prepend":J(()=>[S(l.$slots,"label.prepend")]),"label.append":J(()=>[S(l.$slots,"label.append")]),append:J(()=>[S(l.$slots,"append"),x.value&&m.value?(C(),o(H(zl),{key:0,ref_key:"clearRef",ref:q,icons:d.icons,texts:d.texts,onClick:R},null,8,["icons","texts"])):i("",!0),d.readonly?i("",!0):(C(),o(H(et),{key:1,ref_key:"toggleRef",ref:_,class:"q-combobox__chevron","aria-label":d.texts.showOptions,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",disabled:d.disabled,onMousedown:le(F,["stop","prevent"])},{default:J(()=>[c(H(qt),{"model-value":f.value,icons:d.icons},null,8,["model-value","icons"])]),_:1},8,["aria-label","disabled"]))]),_:2},[l.$slots.prepend?{name:"prepend",fn:J(()=>[S(l.$slots,"prepend")]),key:"0"}:void 0,l.$slots.extras?{name:"extras",fn:J(()=>[S(l.$slots,"extras")]),key:"1"}:void 0]),1040,["id","modelValue","label","required","placeholder","class","readonly","disabled","data-loading","aria-expanded","aria-activedescendant","size"]),c(H(Da),{modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),spy:"","non-modal":"",trigger:"manual",placement:"bottom-start",width:"anchor",offset:4,inline:d.inline,anchor:g.value?.$el,onEnter:K,onLeave:Z},{default:J(()=>[r("div",{ref_key:"contentRef",ref:w,class:"q-select__body","data-testid":"combobox-dropdown","data-key":d.id,onFocusout:j},[S(l.$slots,"body.prepend"),d.loading?(C(),s("div",Va,[c(H(Be),{size:24})])):$.value.length?(C(),o(H(na),{key:1,ref_key:"listRef",ref:y,"model-value":p.value,class:"q-select__items",selectable:"",required:"",highlighted:D.value?.[d.itemValue],items:$.value,groups:t.groups,"item-label":d.itemLabel,"item-value":d.itemValue,onMouseup:G,"onUpdate:modelValue":Q},{item:J(({item:e})=>[S(l.$slots,"item",{item:e})]),_:3},8,["model-value","highlighted","items","groups","item-label","item-value"])):(C(),s("div",Sa,I(d.texts.noData),1)),S(l.$slots,"body.append")],40,Ea)]),_:3},8,["modelValue","inline","anchor"])],64))}}),Qa=Me(Aa),Ta={...Il,calendar:{icon:"calendar"},clock:{icon:"clock"},today:{icon:"calendar-check"},back:{icon:"chevron-left"},forward:{icon:"chevron-right"},up:{icon:"chevron-up"},down:{icon:"chevron-down"},delete:{icon:"delete"}},Ia={...Tl,today:"Today",toggleMode:"Toggle view mode",previousYears:"Previous years",nextYears:"Next years",previousMonth:"Previous month",nextMonth:"Next month",pickMonth:"Pick month",pickYear:"Pick year",increaseHour:"Increase hour",decreaseHour:"Decrease hour",increaseMinute:"Increase minute",decreaseMinute:"Decrease minute",increaseSecond:"Increase second",decreaseSecond:"Decrease second",am:"AM",pm:"PM",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday"},za=["january","february","march","april","may","june","july","august","september","october","november","december"],Pa=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],Fa=["id","aria-checked","disabled"],Ha={class:"q-switch__labels"},Ra={class:"q-switch__label q-switch__label--off","aria-hidden":"true"},Ua={class:"q-switch__label q-switch__label--on","aria-hidden":"true"},Oa=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QSwitch",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},labelPosition:{},trueLabel:{default:"On"},falseLabel:{default:"Off"},showStateLabels:{type:Boolean},checkedColor:{},uncheckedColor:{},size:{default:"medium"},disabled:{type:Boolean},readonly:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const l=t,a=O(t,"modelValue"),u=e=>{l.readonly&&(e.preventDefault(),e.stopImmediatePropagation(),e.target.checked=!!a.value)},c=Tt(P(l,"id")),{style:v}=Ke(P(l,"checkedColor")),{style:p}=Ke(P(l,"uncheckedColor")),f=n(()=>["q-switch","medium"!==l.size?`q-switch--${l.size}`:void 0,{"q-switch--checked":a.value,"q-switch--disabled":l.disabled,"q-switch--readonly":l.readonly,"q-switch--with-labels":l.showStateLabels&&(l.trueLabel||l.falseLabel)},l.class]),m=n(()=>({"--q-switch-checked-background":v.value?.mainColor,"--q-switch-on-checked-background":v.value?.onMainColor,"--q-switch-unchecked-background":p.value?.mainColor,"--q-switch-on-unchecked-background":p.value?.onMainColor}))
|
|
322
|
+
return(t,n)=>(C(),s("div",{class:"q-switch__container",onClick:n[1]||(n[1]=le(()=>{},["stop"]))},[l.label?(C(),o(H(xl),{key:0,for:H(c),label:l.label,required:l.required},null,8,["for","label","required"])):i("",!0),r("div",{class:_(f.value),style:w(m.value)},[ee(r("input",b({id:H(c),"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),class:"q-switch__input",type:"checkbox",role:"switch","aria-checked":a.value,disabled:l.disabled},t.$attrs,{onInput:u}),null,16,Fa),[[j,a.value]]),r("div",Ha,[r("span",Ra,[l.showStateLabels?(C(),s(e,{key:0},[d(I(l.falseLabel),1)],64)):i("",!0)]),r("span",Ua,[l.showStateLabels?(C(),s(e,{key:0},[d(I(l.trueLabel),1)],64)):i("",!0)])])],6)]))}}))
|
|
323
|
+
function Wa(e){let t="",l=0,a=!1
|
|
461
324
|
for(;l<e.length;){const n=e[l]
|
|
462
325
|
if("'"===n){if("'"===e[l+1]){t+="!'",l+=2
|
|
463
326
|
continue}a=!a,l++
|
|
@@ -465,18 +328,18 @@ continue}if(a){t+=`!${n}`,l++
|
|
|
465
328
|
continue}if(!/[A-Za-z]/.test(n)){t+=n,l++
|
|
466
329
|
continue}let o=1
|
|
467
330
|
for(;l+o<e.length&&e[l+o]===n;)o++
|
|
468
|
-
t+="d"===n?1===o?"#n":"##":"M"===n?o<=1?"#n":2===o?"##":3===o?"Aaa":"W":"y"===n?o<=2?"##":"####":"H"===n||"h"===n||"m"===n||"s"===n?1===o?"#n":"#".repeat(Math.min(o,2)):"a"===n?"p":"E"===n?o>=4?"W":"Aaa":"S"===n?"#".repeat(o):"X"===n?1===o?"Z":2===o?"+####":"-##:##":n.repeat(o),l+=o}return t}function
|
|
469
|
-
function
|
|
470
|
-
if(!t||!
|
|
331
|
+
t+="d"===n?1===o?"#n":"##":"M"===n?o<=1?"#n":2===o?"##":3===o?"Aaa":"W":"y"===n?o<=2?"##":"####":"H"===n||"h"===n||"m"===n||"s"===n?1===o?"#n":"#".repeat(Math.min(o,2)):"a"===n?"p":"E"===n?o>=4?"W":"Aaa":"S"===n?"#".repeat(o):"X"===n?1===o?"Z":2===o?"+####":"-##:##":n.repeat(o),l+=o}return t}function Na(e){return/[Hh]|m|s|a/.test(e)}function ja(e){return/s/.test(e)}function Ya(e){return/h|a/.test(e)}function Ga(e){return/^[^dMy]*$/.test(e)&&Na(e)}function Ka(e,t=2){return String(e).padStart(t,"0")}var Xa=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}(?::?\d{2})?)?)?$/
|
|
332
|
+
function Za(e){const t=e.trim()
|
|
333
|
+
if(!t||!Xa.test(t))return null
|
|
471
334
|
const l=new Date(t)
|
|
472
|
-
return Number.isNaN(l.getTime())?null:l}var
|
|
473
|
-
function
|
|
335
|
+
return Number.isNaN(l.getTime())?null:l}var Ja=/yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g,en=/* @__PURE__ */new Set(["HH","H","hh","h","mm","m","ss","s","SSS","S","a"])
|
|
336
|
+
function tn(e){switch(e){case"yyyy":return{min:4,max:4}
|
|
474
337
|
case"yy":case"MM":case"dd":case"HH":case"hh":case"mm":case"ss":return{min:2,max:2}
|
|
475
338
|
case"M":case"d":case"H":case"h":case"m":case"s":return{min:1,max:2}
|
|
476
339
|
case"SSS":return{min:3,max:3}
|
|
477
340
|
case"S":return{min:1,max:1}
|
|
478
|
-
default:return null}}function
|
|
479
|
-
const l=t.match(
|
|
341
|
+
default:return null}}function ln(e,t){if(!e.trim())return null
|
|
342
|
+
const l=t.match(Ja)??[]
|
|
480
343
|
let a=0,n="",o=!1
|
|
481
344
|
const i=t=>{let l=""
|
|
482
345
|
for(;l.length<t&&a<e.length;){const t=e[a]
|
|
@@ -485,11 +348,11 @@ l+=t,a+=1}return l}
|
|
|
485
348
|
for(const s of l){if(s.startsWith("'")){const t=s.slice(1,-1).replace(/''/g,"'")
|
|
486
349
|
if(e.slice(a,a+t.length)===t){n+=t,a+=t.length
|
|
487
350
|
continue}if(a>=e.length){o=!0,n+=t
|
|
488
|
-
continue}return null}const t=
|
|
351
|
+
continue}return null}const t=tn(s)
|
|
489
352
|
if(t){if(o||a>=e.length){o=!0,n+="0".repeat(t.max)
|
|
490
353
|
continue}const l=i(t.max)
|
|
491
354
|
if(!l)return null
|
|
492
|
-
if(l.length<t.max){if(!
|
|
355
|
+
if(l.length<t.max){if(!en.has(s))return null
|
|
493
356
|
o=!0,n+=l.padEnd(t.max,"0")
|
|
494
357
|
continue}n+=l
|
|
495
358
|
continue}if("MMMM"===s||"MMM"===s||"EEEE"===s||"EEE"===s){if(a>=e.length)return null
|
|
@@ -501,17 +364,17 @@ continue}const t=e.slice(a,a+2).toUpperCase()
|
|
|
501
364
|
if("AM"!==t&&"PM"!==t)return null
|
|
502
365
|
n+=t,a+=2
|
|
503
366
|
continue}if(e.slice(a,a+s.length)!==s){if(!(a>=e.length))return null
|
|
504
|
-
o=!0,n+=s}else n+=s,a+=s.length}return e.slice(a).trim()||n===e?null:n}function
|
|
505
|
-
const l=t.match(
|
|
367
|
+
o=!0,n+=s}else n+=s,a+=s.length}return e.slice(a).trim()||n===e?null:n}function an(e,t){if(!Na(t))return!1
|
|
368
|
+
const l=t.match(Ja)??[]
|
|
506
369
|
let a=0,n=!1
|
|
507
370
|
const o=t=>{let l=""
|
|
508
371
|
for(;l.length<t&&a<e.length;){const t=e[a]
|
|
509
372
|
if(!/\d/.test(t))break
|
|
510
373
|
l+=t,a+=1}return l}
|
|
511
|
-
for(const i of l){if(
|
|
374
|
+
for(const i of l){if(en.has(i)&&(n=!0),i.startsWith("'")){const t=i.slice(1,-1).replace(/''/g,"'")
|
|
512
375
|
if(e.slice(a,a+t.length)!==t)break
|
|
513
376
|
a+=t.length
|
|
514
|
-
continue}const t=
|
|
377
|
+
continue}const t=tn(i)
|
|
515
378
|
if(t){const e=o(t.max)
|
|
516
379
|
if(n&&e.length>0)return!0
|
|
517
380
|
if(!e)break
|
|
@@ -522,76 +385,76 @@ continue}if("a"===i){if(!n)continue
|
|
|
522
385
|
const t=e.slice(a,a+2).toUpperCase()
|
|
523
386
|
if("AM"===t||"PM"===t)return!0
|
|
524
387
|
break}if(e.slice(a,a+i.length)!==i)break
|
|
525
|
-
a+=i.length}return!1}function
|
|
388
|
+
a+=i.length}return!1}function nn(e,t,l){const a=vn(e,t,l)
|
|
526
389
|
if(a)return a
|
|
527
|
-
const n=
|
|
528
|
-
return n?
|
|
390
|
+
const n=ln(e,t)
|
|
391
|
+
return n?vn(n,t,l):null}function on(e){return e%4==0&&e%100!=0||e%400==0}function sn(e,t){return 1===e&&on(t)?29:[31,28,31,30,31,30,31,31,30,31,30,31][e]}function rn(e){return e.getDay()}function un(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function dn(e,t,l){return e>t&&e<l}function cn(e,t,l){const a=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),i=e.getDay(),s=e.getHours(),r=e.getMinutes(),u=e.getSeconds(),d=s%12||12,c=s>=12,v=["January","February","March","April","May","June","July","August","September","October","November","December"],p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=l?.getMonthName??((e,t)=>{const l=v[e]
|
|
529
392
|
return t?l.substring(0,3):l}),m=l?.getWeekdayName??((e,t)=>{const l=p[e]
|
|
530
393
|
return t?l.substring(0,3):l})
|
|
531
|
-
return t.replace(/(yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|a|'(?:''|[^'])*'|.)/g,e=>e.startsWith("'")?e.slice(1,-1).replace(/''/g,"'"):"yyyy"===e?String(a):"yy"===e?String(a).slice(-2):"MMMM"===e?f(n-1,!1):"MMM"===e?f(n-1,!0):"MM"===e?
|
|
532
|
-
const a=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=t.match(
|
|
394
|
+
return t.replace(/(yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|a|'(?:''|[^'])*'|.)/g,e=>e.startsWith("'")?e.slice(1,-1).replace(/''/g,"'"):"yyyy"===e?String(a):"yy"===e?String(a).slice(-2):"MMMM"===e?f(n-1,!1):"MMM"===e?f(n-1,!0):"MM"===e?Ka(n):"M"===e?String(n):"dd"===e?Ka(o):"d"===e?String(o):"EEEE"===e?m(i,!1):"EEE"===e?m(i,!0):"HH"===e?Ka(s):"H"===e?String(s):"hh"===e?Ka(d):"h"===e?String(d):"mm"===e?Ka(r):"m"===e?String(r):"ss"===e?Ka(u):"s"===e?String(u):"a"===e?c?"PM":"AM":e)}function vn(e,t,l){if(!e)return null
|
|
395
|
+
const a=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=t.match(Ja)??[],i=o.includes("a")
|
|
533
396
|
let s=0,r=null,u=null,d=null,c=null,v=null,p=null,f=0,m=0,h=0
|
|
534
|
-
const
|
|
397
|
+
const g=(t,l)=>{let a=""
|
|
535
398
|
for(let n=0;n<l&&s+n<e.length;n++){const t=e[s+n]
|
|
536
399
|
if(!/\d/.test(t))break
|
|
537
|
-
a+=t}return a.length<t?null:(s+=a.length,Number.parseInt(a,10))},
|
|
400
|
+
a+=t}return a.length<t?null:(s+=a.length,Number.parseInt(a,10))},y=t=>{const l=[...t].sort((e,t)=>t.length-e.length),a=e.slice(s).toLowerCase()
|
|
538
401
|
for(const e of l)if(a.startsWith(e.toLowerCase()))return s+=e.length,e
|
|
539
402
|
return null}
|
|
540
403
|
for(const _ of o){if(_.startsWith("'")){const t=_.slice(1,-1).replace(/''/g,"'")
|
|
541
404
|
if(!e.slice(s).startsWith(t))return null
|
|
542
405
|
s+=t.length
|
|
543
|
-
continue}if("yyyy"===_){const e=
|
|
406
|
+
continue}if("yyyy"===_){const e=g(4,4)
|
|
544
407
|
if(null===e)return null
|
|
545
408
|
r=e
|
|
546
|
-
continue}if("yy"===_){const e=
|
|
409
|
+
continue}if("yy"===_){const e=g(2,2)
|
|
547
410
|
if(null===e)return null
|
|
548
411
|
r=e<50?2e3+e:1900+e
|
|
549
|
-
continue}if("MMMM"===_||"MMM"===_){const e="MMM"===_,t=e?a.map(e=>e.slice(0,3)):a,n=
|
|
412
|
+
continue}if("MMMM"===_||"MMM"===_){const e="MMM"===_,t=e?a.map(e=>e.slice(0,3)):a,n=y(t)
|
|
550
413
|
if(!n)return null
|
|
551
414
|
if(u=l?.getMonthIndex?.(n,e)??t.findIndex(e=>e.toLowerCase()===n.toLowerCase()),u<0)return null
|
|
552
|
-
continue}if("MM"===_){const e=
|
|
415
|
+
continue}if("MM"===_){const e=g(2,2)
|
|
553
416
|
if(null===e)return null
|
|
554
417
|
u=e-1
|
|
555
|
-
continue}if("M"===_){const e=
|
|
418
|
+
continue}if("M"===_){const e=g(1,2)
|
|
556
419
|
if(null===e)return null
|
|
557
420
|
u=e-1
|
|
558
|
-
continue}if("dd"===_){const e=
|
|
421
|
+
continue}if("dd"===_){const e=g(2,2)
|
|
559
422
|
if(null===e)return null
|
|
560
423
|
d=e
|
|
561
|
-
continue}if("d"===_){const e=
|
|
424
|
+
continue}if("d"===_){const e=g(1,2)
|
|
562
425
|
if(null===e)return null
|
|
563
426
|
d=e
|
|
564
|
-
continue}if("EEEE"===_||"EEE"===_){const e="EEE"===_,t=e?n.map(e=>e.slice(0,3)):n,a=
|
|
427
|
+
continue}if("EEEE"===_||"EEE"===_){const e="EEE"===_,t=e?n.map(e=>e.slice(0,3)):n,a=y(t)
|
|
565
428
|
if(!a)return null
|
|
566
429
|
if((l?.getWeekdayIndex?.(a,e)??t.findIndex(e=>e.toLowerCase()===a.toLowerCase()))<0)return null
|
|
567
|
-
continue}if("HH"===_){const e=
|
|
430
|
+
continue}if("HH"===_){const e=g(2,2)
|
|
568
431
|
if(null===e)return null
|
|
569
432
|
c=e
|
|
570
|
-
continue}if("H"===_){const e=
|
|
433
|
+
continue}if("H"===_){const e=g(1,2)
|
|
571
434
|
if(null===e)return null
|
|
572
435
|
c=e
|
|
573
|
-
continue}if("hh"===_){const e=
|
|
436
|
+
continue}if("hh"===_){const e=g(2,2)
|
|
574
437
|
if(null===e)return null
|
|
575
438
|
v=e
|
|
576
|
-
continue}if("h"===_){const e=
|
|
439
|
+
continue}if("h"===_){const e=g(1,2)
|
|
577
440
|
if(null===e)return null
|
|
578
441
|
v=e
|
|
579
|
-
continue}if("mm"===_){const e=
|
|
442
|
+
continue}if("mm"===_){const e=g(2,2)
|
|
580
443
|
if(null===e)return null
|
|
581
444
|
f=e
|
|
582
|
-
continue}if("m"===_){const e=
|
|
445
|
+
continue}if("m"===_){const e=g(1,2)
|
|
583
446
|
if(null===e)return null
|
|
584
447
|
f=e
|
|
585
|
-
continue}if("ss"===_){const e=
|
|
448
|
+
continue}if("ss"===_){const e=g(2,2)
|
|
586
449
|
if(null===e)return null
|
|
587
450
|
m=e
|
|
588
|
-
continue}if("s"===_){const e=
|
|
451
|
+
continue}if("s"===_){const e=g(1,2)
|
|
589
452
|
if(null===e)return null
|
|
590
453
|
m=e
|
|
591
|
-
continue}if("SSS"===_){const e=
|
|
454
|
+
continue}if("SSS"===_){const e=g(3,3)
|
|
592
455
|
if(null===e)return null
|
|
593
456
|
h=e
|
|
594
|
-
continue}if("S"===_){const e=
|
|
457
|
+
continue}if("S"===_){const e=g(1,1)
|
|
595
458
|
if(null===e)return null
|
|
596
459
|
h=e
|
|
597
460
|
continue}if("a"===_){const t=e.slice(s,s+2).toUpperCase()
|
|
@@ -607,97 +470,178 @@ if(i){if(null===p)return null
|
|
|
607
470
|
b="PM"===p?12===v?12:v+12:12===v?0:v}else b=v}if(null===r&&null===u&&null===d&&(null!==c||null!==v)){const e=/* @__PURE__ */new Date
|
|
608
471
|
return new Date(e.getFullYear(),e.getMonth(),e.getDate(),b,f,m,h)}if(null===r||null===u||null===d)return null
|
|
609
472
|
const k=new Date(r,u,d,b,f,m,h)
|
|
610
|
-
return k.getFullYear()!==r||k.getMonth()!==u||k.getDate()!==d||k.getHours()!==b||k.getMinutes()!==f||k.getSeconds()!==m?null:k}function
|
|
611
|
-
return t.setHours(0,0,0,0),t}function
|
|
612
|
-
return t.setHours(23,59,59,999),t}function
|
|
613
|
-
return l.setDate(l.getDate()+t),l}function
|
|
614
|
-
return l.setMonth(l.getMonth()+t),l}function
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
let
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
473
|
+
return k.getFullYear()!==r||k.getMonth()!==u||k.getDate()!==d||k.getHours()!==b||k.getMinutes()!==f||k.getSeconds()!==m?null:k}function pn(e){const t=new Date(e)
|
|
474
|
+
return t.setHours(0,0,0,0),t}function fn(e){const t=new Date(e)
|
|
475
|
+
return t.setHours(23,59,59,999),t}function mn(e,t){const l=new Date(e)
|
|
476
|
+
return l.setDate(l.getDate()+t),l}function hn(e,t){const l=new Date(e)
|
|
477
|
+
return l.setMonth(l.getMonth()+t),l}function gn(e){return new Date(e.getFullYear(),e.getMonth(),1)}function yn(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function bn(e,t,l){if(l.startsWith("'")){const a=l.slice(1,-1).replace(/''/g,"'")
|
|
478
|
+
return e.slice(t).startsWith(a)?t+a.length:null}if("a"===l){const l=e.slice(t),a=l.match(/^\s*(AM|PM)/i)
|
|
479
|
+
return a?t+a[0].length:l.startsWith(" ")?t+1:null}return t>=e.length||e[t]!==l?null:t+1}function kn(e,t,l){let a=l
|
|
480
|
+
return"MM"!==e&&"M"!==e||(a=Math.min(12,Math.max(1,l))),"dd"!==e&&"d"!==e||(a=Math.min(31,Math.max(1,l))),"HH"!==e&&"H"!==e||(a=Math.min(23,Math.max(0,l))),"hh"!==e&&"h"!==e||(a=Math.min(12,Math.max(1,l))),"mm"!==e&&"m"!==e&&"ss"!==e&&"s"!==e||(a=Math.min(59,Math.max(0,l))),t.length>1?Ka(a,t.length):0!==a||"hh"!==e&&"h"!==e&&"MM"!==e&&"M"!==e&&"dd"!==e&&"d"!==e?String(a):"1"}function _n(e,t){let l=null,a=null,n=-1,o=0,i=null,s=0
|
|
481
|
+
for(const d of t){if(d.startsWith("'")){const t=bn(e,s,d)
|
|
482
|
+
if(null===t)break
|
|
483
|
+
s=t
|
|
484
|
+
continue}const t="yyyy"===d?4:"yy"===d||["MM","dd","M","d"].includes(d)?2:0
|
|
485
|
+
if(0===t){const t=bn(e,s,d)
|
|
486
|
+
if(null===t)break
|
|
487
|
+
s=t
|
|
488
|
+
continue}const r=e.slice(s).match(/^\d+/)?.[0]?.slice(0,t)??""
|
|
489
|
+
if(!r)continue
|
|
490
|
+
const u=s+r.length
|
|
491
|
+
if(!(r.length===t||u<e.length&&!/\d/.test(e[u])))continue
|
|
492
|
+
const c=Number.parseInt(r,10)
|
|
493
|
+
Number.isNaN(c)||("MM"!==d&&"M"!==d||(l=Math.min(12,Math.max(1,c))),"yyyy"===d&&(a=c),"yy"===d&&(a=c<50?2e3+c:1900+c),"dd"!==d&&"d"!==d||(n=s,o=r.length,i=Math.max(1,c)),s=u)}if(n<0||null===i||null===l||null===a)return e
|
|
494
|
+
const r=sn(l-1,a)
|
|
495
|
+
if(i<=r)return e
|
|
496
|
+
const u=o>1?Ka(r,o):String(r)
|
|
497
|
+
return`${e.slice(0,n)}${u}${e.slice(n+o)}`}function qn(e,t,l){const a=t.match(/yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g)??[]
|
|
498
|
+
let n=e,o=0
|
|
499
|
+
for(const i of a){if(i.startsWith("'")){const e=bn(n,o,i)
|
|
500
|
+
if(null===e)break
|
|
501
|
+
o=e
|
|
502
|
+
continue}const e="yyyy"===i?4:"yy"===i?2:"SSS"===i?3:"S"===i?1:["MM","dd","HH","hh","mm","ss","M","d","H","h","m","s"].includes(i)?2:0
|
|
503
|
+
if(0===e){const e=bn(n,o,i)
|
|
504
|
+
if(null===e)break
|
|
505
|
+
o=e
|
|
506
|
+
continue}const t=n.slice(o).match(/^\d+/)?.[0]?.slice(0,e)??""
|
|
507
|
+
if(!t)continue
|
|
508
|
+
const a=o+t.length
|
|
509
|
+
if(!(t.length===e||a<n.length&&!/\d/.test(n[a])))continue
|
|
510
|
+
const s=Number.parseInt(t,10)
|
|
511
|
+
if(Number.isNaN(s))continue
|
|
512
|
+
const r=kn(i,l?.padMaxDigits?Ka(t,e):t,s)
|
|
513
|
+
n=`${n.slice(0,o)}${r}${n.slice(a)}`,o+=r.length}return _n(n,a)}function wn(e){return/[\p{L}\s.'-]/u.test(e)}function xn(e,t){let l=t
|
|
514
|
+
for(;l<e.length&&" "===e[l];)l+=1
|
|
515
|
+
let a="",n=l
|
|
516
|
+
for(;n<e.length&&/[A-Za-z]/.test(e[n]??"");){const t=(e[n]??"").toUpperCase()
|
|
517
|
+
if(0===a.length){if("A"===t||"P"===t){a=`${t}M`,n+=1,n<e.length&&"M"===(e[n]??"").toUpperCase()&&(n+=1)
|
|
518
|
+
break}}else if(1===a.length&&"M"===t){a+="M",n+=1
|
|
519
|
+
break}n+=1}for(;n<e.length&&/[A-Za-z]/.test(e[n]??"");)n+=1
|
|
520
|
+
return{consumed:n-t,text:a}}function $n(e,t,l){const a=function(e,t){let l=0,a=0
|
|
521
|
+
for(;a<t.length;){const n=t[a]
|
|
522
|
+
if("p"===n)return l
|
|
523
|
+
if("!"===n){const n=t[a+1]
|
|
524
|
+
n&&e[l]===n&&(l+=1),a+=2
|
|
525
|
+
continue}if("#"===n||"n"===n){if(/\d/.test(e[l]??"")){l+=1,a+=1
|
|
526
|
+
continue}return-1}if("A"===n||"a"===n){if(wn(e[l]??"")){l+=1,a+=1
|
|
527
|
+
continue}return-1}if("W"===n){const n=t[a+1]
|
|
528
|
+
if(wn(e[l]??"")&&e[l]!==n){l+=1
|
|
529
|
+
continue}a+=1
|
|
530
|
+
continue}if(e[l]!==n){if(" "===n&&"p"===t[a+1]){const n=e[l]
|
|
531
|
+
if((void 0===n||" "===n||/[A-Za-z]/.test(n))&&(a+=1,"p"===t[a]))return l}return-1}l+=1,a+=1}return-1}(e,t)
|
|
532
|
+
return a<0||l<=a?"":xn(e.slice(0,l),a).text}function Mn(e,t){const l=t.toUpperCase()
|
|
533
|
+
if("AM"===l||"PM"===l)return!1
|
|
534
|
+
const a=e.toUpperCase()
|
|
535
|
+
return t?1===l.length&&("A"===l||"P"===l)&&"M"===a:"A"===a||"P"===a}function Bn(e,t,l,a,n){const o=function(e,t){let l=t
|
|
536
|
+
for(;l<e.length;){const t=e[l]
|
|
537
|
+
if("!"!==t){if("#"===t||"n"===t||"A"===t||"a"===t||"W"===t||"p"===t)return l
|
|
538
|
+
l+=1}else l+=2}return-1}(t,l)
|
|
539
|
+
if(o<0)return!1
|
|
540
|
+
const i=t[o]
|
|
541
|
+
return!(!i||"!"===i)&&("p"===i?Mn(e,void 0!==a&&void 0!==n?$n(a,t,n):""):function(e,t){return"#"===t||"n"===t?/\d/.test(e):"p"===t?Mn(e,""):"A"===t||"a"===t||"W"===t?wn(e):e===t}(e,i))}function Cn(e,t){let l="",a=0,n=0
|
|
542
|
+
for(;n<t.length&&a<e.length;){const o=t[n],i=e[a]
|
|
543
|
+
if("!"===o){const e=t[n+1]
|
|
544
|
+
if(!e)break
|
|
545
|
+
i===e?(l+=e,a++):l+=e,n+=2
|
|
546
|
+
continue}if("#"===o){if(!/\d/.test(i)){a++
|
|
547
|
+
continue}l+=i,a++}else if("n"===o)/\d/.test(i)&&(l+=i,a++)
|
|
548
|
+
else if("A"===o||"a"===o){if(!wn(i)){a++
|
|
549
|
+
continue}l+="A"===o?i.toUpperCase():i.toLowerCase(),a++}else{if("p"===o){const t=xn(e,a)
|
|
550
|
+
if(0===t.consumed)break
|
|
551
|
+
a+=t.consumed,t.text&&(l+=t.text),n++
|
|
552
|
+
continue}if("W"===o){const o=t[n+1]
|
|
553
|
+
let i=!1
|
|
554
|
+
for(;a<e.length;){const t=e[a]
|
|
555
|
+
if(o&&t===o&&i)break
|
|
556
|
+
if(wn(t))l+=t,a++,i=!0
|
|
557
|
+
else{if(o&&t===o)break
|
|
558
|
+
a++}}}else if(i===o)l+=o,a++
|
|
559
|
+
else if(/\d/.test(i))l+=o
|
|
560
|
+
else{if(Bn(i,t,n+1,e,a)){l+=o,n++
|
|
561
|
+
continue}a++}}n++}return l}var Ln={key:0,ref:"calendar",class:"q-date-time-picker__calendar"},Dn={class:"q-date-time-picker__header"},En={class:"q-date-time-picker__weekdays"},Vn={key:1,class:"q-date-time-picker__time"},Sn={key:0,class:"q-date-time-picker__time-period"},An={class:"q-date-time-picker__time-inputs"},Qn={class:"q-date-time-picker__time-input-group"},Tn={class:"q-date-time-picker__time-input-group"},In={class:"q-date-time-picker__time-input-group"},zn={key:2,class:"q-date-time-picker__month-grid"},Pn={key:3,class:"q-date-time-picker__year"},Fn={class:"q-date-time-picker__year-change"},Hn={class:"q-date-time-picker__year-interval"},Rn={class:"q-date-time-picker__year-grid"},Un={class:"q-date-time-picker__bottom-bar"},On=1001,Wn=9999,Nn=26,jn=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QDateTimePicker",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},inline:{type:Boolean,default:!1},clearable:{type:Boolean},format:{default:"dd/MM/yyyy HH:mm"},range:{type:Boolean},icons:{default:()=>Ta},texts:{default:()=>Ia}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/y(["open","close"],["update:modelValue"]),setup(t,{emit:l}){const a=t,d=l,v=O(t,"modelValue"),p=n({get:()=>v.value,set:e=>v.value=e||void 0}),m=n(()=>a.readonly||a.disabled?void 0:a.placeholder),h=n(()=>Na(a.format)),g=n(()=>ja(a.format)),y=n(()=>Ya(a.format)),w=n(()=>Ga(a.format)),x=n(()=>Q.value===/* @__PURE__ */(new Date).getMonth()&&T.value===/* @__PURE__ */(new Date).getFullYear()),M=E(!1),B=E(!1),L=E(""),D=E(null),A=E("date"),Q=E(/* @__PURE__ */(new Date).getMonth()),T=E(/* @__PURE__ */(new Date).getFullYear()),z=E(/* @__PURE__ */(new Date).getFullYear())
|
|
562
|
+
let P=null,F=!1,R=!1,U=!1,W=null
|
|
563
|
+
function j(){queueMicrotask(()=>{requestAnimationFrame(()=>{const e=Lt(),t=document.activeElement
|
|
564
|
+
e&&(t===e||t instanceof Node&&G.value?.contains(t))&&(F=!0)})})}const Y=N("field"),G=N("menu"),K=N("calendar"),Z=N("monthHeader"),ee=N("yearHeader"),te=N("toggleTime"),le=/* @__PURE__ */new Map,ae=/* @__PURE__ */new Map
|
|
565
|
+
function ne(e){if(!e)return null
|
|
621
566
|
if(e instanceof HTMLElement)return e
|
|
622
567
|
if("object"==typeof e&&"$el"in e){const t=e.$el
|
|
623
|
-
return t instanceof HTMLElement?t:null}return null}const
|
|
624
|
-
return
|
|
568
|
+
return t instanceof HTMLElement?t:null}return null}const oe=n(()=>({getMonthIndex:(e,t)=>{const l=e.toLowerCase()
|
|
569
|
+
return za.findIndex(e=>{const n=a.texts[e]??e
|
|
625
570
|
return(t?n.substring(0,3):n).toLowerCase()===l})},getWeekdayIndex:(e,t)=>{const l=e.toLowerCase()
|
|
626
|
-
for(let n=0;n<7;n++){const e=
|
|
627
|
-
if((t?o.substring(0,3):o).toLowerCase()===l)return n}return null}})),
|
|
628
|
-
return e?e instanceof Date?e:Array.isArray(e)&&e.length>0?e[0]:"string"==typeof e?
|
|
629
|
-
return Array.isArray(e)&&e.length>1?e[1]:null}),
|
|
630
|
-
if(!
|
|
631
|
-
const e=
|
|
632
|
-
return e?e<
|
|
633
|
-
return t?l.substring(0,3):l},getWeekdayName:(e,t)=>{const l=
|
|
634
|
-
return t?n.substring(0,3):n}})),
|
|
571
|
+
for(let n=0;n<7;n++){const e=Pa[(n+6)%7],o=a.texts[e]??e
|
|
572
|
+
if((t?o.substring(0,3):o).toLowerCase()===l)return n}return null}})),ie=n(()=>{const e=p.value
|
|
573
|
+
return e?e instanceof Date?e:Array.isArray(e)&&e.length>0?e[0]:"string"==typeof e?vt(e):null:null}),se=n(()=>{const e=p.value
|
|
574
|
+
return Array.isArray(e)&&e.length>1?e[1]:null}),re=E(null),ue=E(null),de=E(null),ce=E(!1),ve=n(()=>ce.value&&re.value?de.value&&de.value<re.value?de.value:re.value:ie.value),pe=n(()=>{if(!a.range)return ie.value
|
|
575
|
+
if(!ce.value||!re.value)return se.value
|
|
576
|
+
const e=de.value??ue.value
|
|
577
|
+
return e?e<re.value?re.value:e:null}),fe=n(()=>({getMonthName:(e,t)=>{const l=qe(e)
|
|
578
|
+
return t?l.substring(0,3):l},getWeekdayName:(e,t)=>{const l=Pa[(e+6)%7],n=a.texts[l]??l
|
|
579
|
+
return t?n.substring(0,3):n}})),me=n(()=>{const e=p.value
|
|
635
580
|
if(!e)return""
|
|
636
|
-
if(Array.isArray(e))return e.map(e=>e instanceof Date?
|
|
637
|
-
if(e instanceof Date)return
|
|
638
|
-
if("string"==typeof e){const t=
|
|
639
|
-
return t?
|
|
640
|
-
function
|
|
641
|
-
const
|
|
642
|
-
for(let u=l-1;u>=0;u--)
|
|
643
|
-
for(let u=1;u<=t;u++)
|
|
581
|
+
if(Array.isArray(e))return e.map(e=>e instanceof Date?cn(e,a.format,fe.value):e).join(" - ")
|
|
582
|
+
if(e instanceof Date)return cn(e,a.format,fe.value)
|
|
583
|
+
if("string"==typeof e){const t=vt(e)
|
|
584
|
+
return t?cn(t,a.format,fe.value):String(e)}return String(e)}),he=n(()=>D.value??me.value)
|
|
585
|
+
function ge(){L.value=he.value}X(he,()=>{B.value||ge()},{immediate:!0})
|
|
586
|
+
const ye=n(()=>{const e=gn(new Date(T.value,Q.value,1)),t=sn(Q.value,T.value),l=(e.getDay()+6)%7,a=[],n=0===Q.value?11:Q.value-1,o=0===Q.value?T.value-1:T.value,i=sn(n,o)
|
|
587
|
+
for(let u=l-1;u>=0;u--)be(a,new Date(o,n,i-u),!1)
|
|
588
|
+
for(let u=1;u<=t;u++)be(a,new Date(T.value,Q.value,u),!0)
|
|
644
589
|
const s=7-a.length%7,r=7===s?0:s
|
|
645
|
-
for(let u=1;u<=r;u++)
|
|
590
|
+
for(let u=1;u<=r;u++)be(a,new Date(T.value,Q.value+1,u),!1)
|
|
646
591
|
return a})
|
|
647
|
-
function
|
|
648
|
-
e.push({date:t,isCurrentMonth:l,isToday:
|
|
649
|
-
return a.texts[t]?.substring(0,2)??e})),
|
|
650
|
-
function
|
|
651
|
-
return t<=0?n:n.substring(0,t)}function
|
|
652
|
-
return t<On&&(t=On,l=Math.min(t+
|
|
653
|
-
return Array.from({length:l-t+1},(e,l)=>t+l)}(
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
const Pe=n(()=>
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
!t||l&&t.contains(l)||Re()}function We(e){if(!a.range||!pe.value||!de.value)return
|
|
592
|
+
function be(e,t,l){const a=ve.value,n=pe.value,o=t.getFullYear(),i=o<On||o>Wn
|
|
593
|
+
e.push({date:t,isCurrentMonth:l,isToday:un(t,/* @__PURE__ */new Date),isSelected:!!a&&un(t,a),isRangeStart:!!a&&un(t,a),isRangeEnd:!!n&&un(t,n),isInRange:!(!a||!n)&&dn(t,a,n),isDisabled:i})}const ke=n(()=>Pa.map(e=>{const t=e
|
|
594
|
+
return a.texts[t]?.substring(0,2)??e})),_e=n(()=>Array.from({length:12},(e,t)=>qe(t,3)))
|
|
595
|
+
function qe(e,t=0){const l=za[e],n=a.texts[l]??za[e]
|
|
596
|
+
return t<=0?n:n.substring(0,t)}function we(e){let t=e-Math.floor(13),l=t+Nn
|
|
597
|
+
return t<On&&(t=On,l=Math.min(t+Nn,Wn)),l>Wn&&(l=Wn,t=Math.max(On,l-Nn)),{startYear:t,endYear:l}}function xe(){Be.value&&(z.value-=Nn)}function $e(){Ce.value&&(z.value+=Nn)}const Me=n(()=>we(z.value)),Be=n(()=>Me.value.startYear>On),Ce=n(()=>Me.value.endYear<Wn),Le=n(()=>0===Q.value?T.value-1:T.value),De=n(()=>11===Q.value?T.value+1:T.value),Ee=n(()=>Le.value>=On),Ve=n(()=>De.value<=Wn),Se=n(()=>function(e){const{startYear:t,endYear:l}=we(e)
|
|
598
|
+
return Array.from({length:l-t+1},(e,l)=>t+l)}(z.value)),Ae=n(()=>w.value?a.icons.clock:a.icons.calendar),Qe=n(()=>`${a.format} - ${a.format}`),Te=n(()=>Wa(a.format)),Ie=n(()=>`${Te.value} - ${Te.value}`)
|
|
599
|
+
function ze(e){return void 0!==e&&("string"==typeof e?e.trim().length>0:e instanceof Date||!!Array.isArray(e)&&e.length>0)}X(()=>Y?.value?.inputRef,(e,t,l)=>{const a=Ct(e)
|
|
600
|
+
W=a,a&&(a.addEventListener("click",Mt),l(()=>{W=null,a.removeEventListener("click",Mt)}))},{flush:"post"}),X(p,()=>{D.value=null,ge()})
|
|
601
|
+
const Pe=n(()=>a.clearable&&!a.readonly&&!a.disabled&&ze(p.value))
|
|
602
|
+
function Fe(){Pe.value&&(Xe(),p.value=void 0,L.value="",Rt())}function He(e){a.range&&ce.value&&re.value&&(e.getFullYear()<On||e.getFullYear()>Wn||(de.value=new Date(e)))}function Re(){de.value=null}function Ue(e){const t=e.currentTarget,l=e.relatedTarget
|
|
603
|
+
!t||l&&t.contains(l)||Re()}function Oe(e){if(!a.range||!ce.value||!re.value)return
|
|
660
604
|
const t=e.touches.item(0)
|
|
661
605
|
if(!t)return
|
|
662
606
|
const l=document.elementFromPoint(t.clientX,t.clientY)?.closest("[data-day-index]")
|
|
663
607
|
if(!l)return
|
|
664
608
|
const n=Number(l.dataset.dayIndex)
|
|
665
609
|
if(Number.isNaN(n))return
|
|
666
|
-
const o=
|
|
667
|
-
o&&He(o.date)}function
|
|
610
|
+
const o=ye.value[n]
|
|
611
|
+
o&&He(o.date)}function We(e,t){T.value=e,t&&It("year")}function Ne(e,t){Q.value=e,t&&It("month")}function je(){Ee.value&&(0===Q.value?(Ne(11),We(T.value-1)):Ne(Q.value-1))}function Ye(){Ve.value&&(11===Q.value?(Ne(0),We(T.value+1)):Ne(Q.value+1))}function Ge(){Ne(/* @__PURE__ */(new Date).getMonth()),We(/* @__PURE__ */(new Date).getFullYear()),Tt()}function Ke(e){return a.range?1===e?se.value??ue.value:ie.value??re.value:ie.value}function Xe(){re.value=null,ue.value=null,de.value=null,ce.value=!1}function Ze(){if(!a.range||!w.value)return
|
|
668
612
|
const e=p.value
|
|
669
613
|
if(!Array.isArray(e)||e.length<2)return
|
|
670
614
|
const t=e[0],l=e[1]
|
|
671
|
-
t instanceof Date&&l instanceof Date&&!(l>=t)&&(p.value=function(e,t){return t<e?[new Date(t),new Date(e)]:[new Date(e),new Date(t)]}(t,l))}function
|
|
615
|
+
t instanceof Date&&l instanceof Date&&!(l>=t)&&(p.value=function(e,t){return t<e?[new Date(t),new Date(e)]:[new Date(e),new Date(t)]}(t,l))}function Je(e,t){const l=Ke(e)??(()=>{const e=/* @__PURE__ */new Date
|
|
672
616
|
return e.setHours(0,0,0,0),e})(),n=new Date(l)
|
|
673
617
|
t(n),function(e,t){if(!a.range)return void(p.value=t)
|
|
674
|
-
if(w.value){0===e?
|
|
675
|
-
const l=0===e?t:
|
|
618
|
+
if(w.value){0===e?re.value=t:ue.value=t
|
|
619
|
+
const l=0===e?t:ie.value??re.value,a=1===e?t:se.value
|
|
676
620
|
if(!l||!a)return
|
|
677
|
-
return p.value=[new Date(l),new Date(a)],void
|
|
678
|
-
const l=
|
|
679
|
-
l&&n&&(p.value=1===e?[l,t]:[t,n])}(e,n)}function tt(e){const t=
|
|
680
|
-
if(!t)return
|
|
621
|
+
return p.value=[new Date(l),new Date(a)],void Xe()}if(ce.value)return void(0===e&&(re.value=t))
|
|
622
|
+
const l=ie.value,n=se.value
|
|
623
|
+
l&&n&&(p.value=1===e?[l,t]:[t,n])}(e,n)}function tt(e){const t=Ke(e)
|
|
624
|
+
if(!t)return y.value?12:0
|
|
681
625
|
const l=t.getHours()
|
|
682
|
-
return
|
|
626
|
+
return y.value?l%12||12:l}function lt(e){return Ke(e)?.getSeconds()??0}function at(e){const t=Ke(e)
|
|
683
627
|
return!!t&&t.getHours()>=12}function nt(e,t){return t?12===e?12:e+12:12===e?0:e}function ot(e,t){const l=e>=12,a=e%12||12
|
|
684
628
|
return 1===t?a>=12?nt(1,l):11===a?nt(12,!l):nt(a+1,l):a<=1?nt(12,l):12===a?nt(11,!l):nt(a-1,l)}function it(e){return(e??"").replace(/\D/g,"")}function st(e){return Math.min(59,Math.max(0,e))}function rt(e,t){const l=it(e).slice(0,2)
|
|
685
629
|
if(""===l)return
|
|
686
630
|
const a=Number.parseInt(l,10)
|
|
687
631
|
if(Number.isNaN(a))return
|
|
688
|
-
const n=
|
|
632
|
+
const n=y.value?(o=a,Math.min(12,Math.max(1,o))):function(e){return Math.min(23,Math.max(0,e))}(a)
|
|
689
633
|
var o
|
|
690
|
-
|
|
634
|
+
Je(t,e=>{y.value?e.setHours(nt(n,e.getHours()>=12)):e.setHours(n)})}function ut(e,t){const l=it(e).slice(0,2)
|
|
691
635
|
if(""===l)return
|
|
692
636
|
const a=Number.parseInt(l,10)
|
|
693
637
|
if(Number.isNaN(a))return
|
|
694
638
|
const n=st(a)
|
|
695
|
-
|
|
639
|
+
Je(t,e=>{e.setMinutes(n)})}function dt(e,t){const l=it(e).slice(0,2)
|
|
696
640
|
if(""===l)return
|
|
697
641
|
const a=Number.parseInt(l,10)
|
|
698
642
|
if(Number.isNaN(a))return
|
|
699
643
|
const n=st(a)
|
|
700
|
-
|
|
644
|
+
Je(t,e=>{e.setSeconds(n)})}async function ct(e,t,l){if(e.ctrlKey||e.altKey||e.metaKey)return
|
|
701
645
|
if(!/^\d$/.test(e.key))return
|
|
702
646
|
const a=e.target
|
|
703
647
|
if(!a)return
|
|
@@ -708,279 +652,300 @@ e.preventDefault()
|
|
|
708
652
|
const i=`${a.value.slice(0,n)}${e.key}${a.value.slice(n+1)}`
|
|
709
653
|
"hours"===t?rt(i,l):"minutes"===t?ut(i,l):dt(i,l)
|
|
710
654
|
const s=Math.min(n+1,a.maxLength)
|
|
711
|
-
await k(),a.setSelectionRange(s,s)}
|
|
712
|
-
const n=Ua(t,l,a),o=()=>e.setSelectionRange(n,n)
|
|
713
|
-
o(),await k(),o(),await new Promise(e=>{requestAnimationFrame(()=>{o(),e()})})}async function pt(e,t,l,a){l!==t?(D.value=l,await vt(e,t,l,a)):D.value!==l&&(D.value=l)}function mt(e,t){const l=e.trim()
|
|
655
|
+
await k(),a.setSelectionRange(s,s)}function vt(e,t){const l=e.trim()
|
|
714
656
|
if(!l)return null
|
|
715
|
-
const n=
|
|
657
|
+
const n=vn(l,a.format,oe.value)
|
|
716
658
|
if(n)return n
|
|
717
|
-
const o=
|
|
659
|
+
const o=Za(l)
|
|
718
660
|
if(o)return o
|
|
719
|
-
const i=
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
if(!n)return p.value=void 0,L.value=null,D.value="",void(A.value=!1)
|
|
724
|
-
if(a.range){const e=yt(n)
|
|
725
|
-
if(e)return p.value=e,L.value=null,D.value=e.map(e=>qn(e,a.format,he.value)).join(" - "),void(A.value=!1)
|
|
726
|
-
const o=Ra(n,ze.value)
|
|
727
|
-
await pt(t,n,o,l),L.value=o
|
|
728
|
-
const i=yt(o)
|
|
729
|
-
if(i){p.value=i,L.value=null
|
|
730
|
-
const e=i.map(e=>qn(e,a.format,he.value)).join(" - ")
|
|
731
|
-
e!==o&&(D.value=e,await vt(t,o,e,l)),A.value=!1}return}const o=mt(n)
|
|
732
|
-
if(o){const e=kt(o,n)
|
|
733
|
-
return p.value=e,L.value=null,D.value=qn(e,a.format,he.value),void(A.value=!1)}const i=Oa(Ra(n,Te.value),a.format)
|
|
734
|
-
let s=i,r=wn(i,a.format,se.value)
|
|
735
|
-
if(!r){const e=wn(n,a.format,se.value)
|
|
736
|
-
e&&(s=n,r=e)}if(!r){const e=gt(a.format)
|
|
737
|
-
e&&(r=wn(i,e,se.value)??wn(n,e,se.value))}if(await pt(t,n,s,l),L.value=s,r){const e=kt(r,n)
|
|
738
|
-
p.value=e,L.value=null
|
|
739
|
-
const o=qn(e,a.format,he.value)
|
|
740
|
-
o!==s&&(D.value=o,await vt(t,s,o,l)),A.value=!1}}function yt(e,t){const l=e.split(" - ")
|
|
741
|
-
if(2!==l.length)return null
|
|
742
|
-
const a=e=>mt(e,t),n=a(l[0]??""),o=a(l[1]??"")
|
|
743
|
-
return n&&o?o<n?[o,n]:[n,o]:null}function gt(e){const t=e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i,"").trim()
|
|
744
|
-
return t&&t!==e?t:null}function bt(e){const t=/* @__PURE__ */new Date
|
|
745
|
-
e.setHours(t.getHours(),t.getMinutes(),y.value?t.getSeconds():0,y.value?t.getMilliseconds():0)}function kt(e,t){if(a.range||!h.value)return e
|
|
746
|
-
if(void 0!==t&&(l=t,!h.value||mt(l)||mn(l,a.format)||/\dT\d|\d{1,2}:\d{2}/.test(l)))return e
|
|
747
|
-
var l
|
|
661
|
+
const i=function(e){const t=Za(e)
|
|
662
|
+
if(t)return t
|
|
663
|
+
const l=/[A-Za-z]/.test(e),a=/^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(e)
|
|
664
|
+
if(!l&&!a)return null
|
|
748
665
|
const n=new Date(e)
|
|
749
|
-
return
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
if(
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
return
|
|
766
|
-
|
|
767
|
-
|
|
666
|
+
return Number.isNaN(n.getTime())?null:n}(l)
|
|
667
|
+
return i||(t?.complete?nn(l,a.format,oe.value):null)}function pt(e){if(a.readonly||a.disabled)return void ge()
|
|
668
|
+
const t=e??""
|
|
669
|
+
D.value=t,L.value=t}function ft(e,t){const l=e.split(" - ")
|
|
670
|
+
if(2!==l.length)return null
|
|
671
|
+
const a=l[0]?.trim()??"",n=l[1]?.trim()??"",o=vt(a,t),i=vt(n,t)
|
|
672
|
+
return o&&i?(ht(a)&&ht(n)?i<o:Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())<Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))?{range:[i,o],startSource:n,endSource:a}:{range:[o,i],startSource:a,endSource:n}:null}function mt(){if(a.readonly||a.disabled)return!1
|
|
673
|
+
const e=qn(D.value??L.value,a.range?Qe.value:a.format,{padMaxDigits:!0})
|
|
674
|
+
if(!e)return D.value=null,ze(p.value)&&(p.value=void 0),L.value="",!1
|
|
675
|
+
if(a.range){const t=Cn(e,Ie.value),l=ft(e,{complete:!0})??ft(t,{complete:!0})
|
|
676
|
+
if(l){const e=function(e,t,l){if(!h.value)return e
|
|
677
|
+
const[a,n]=e,o=new Date(a),i=new Date(n)
|
|
678
|
+
ht(t)||o.setHours(0,0,0,0)
|
|
679
|
+
ht(l)||i.setHours(23,59,g.value?59:0,0)
|
|
680
|
+
return[o,i]}(l.range,l.startSource,l.endSource)
|
|
681
|
+
return p.value=e,D.value=null,L.value=e.map(e=>cn(e,a.format,fe.value)).join(" - "),!0}return D.value=null,ge(),!1}const t=qn(Cn(e,Te.value),a.format),l=vt(e,{complete:!0})??nn(t,a.format,oe.value)
|
|
682
|
+
if(!l)return D.value=null,ge(),!1
|
|
683
|
+
const n=function(e,...t){if(!h.value||a.range)return e
|
|
684
|
+
if(t.some(e=>ht(e)))return e
|
|
685
|
+
const l=new Date(e)
|
|
686
|
+
return gt(l),l}(l,e,t)
|
|
687
|
+
return p.value=n,D.value=null,L.value=cn(n,a.format,fe.value),!0}function ht(e){return!h.value||(!!an(e,a.format)||(/\dT\d/i.test(e)||/\d{1,2}:\d{2}/.test(e)))}function gt(e){const t=/* @__PURE__ */new Date
|
|
688
|
+
e.setHours(t.getHours(),t.getMinutes(),g.value?t.getSeconds():0,g.value?t.getMilliseconds():0)}function bt(e){if(!(e.target instanceof Node&&G.value?.contains(e.target)))return
|
|
689
|
+
R=!0
|
|
768
690
|
const t=function(e){const t=e.target
|
|
769
|
-
if(!(t instanceof Element&&
|
|
691
|
+
if(!(t instanceof Element&&G.value))return null
|
|
770
692
|
const l=t.closest("button, input, select, textarea, a[href], [tabindex], [contenteditable]")
|
|
771
|
-
return l&&
|
|
693
|
+
return l&&G.value.contains(l)?l:null}(e)
|
|
772
694
|
var l
|
|
773
|
-
t&&((l=t).matches(":disabled")||"true"===l.getAttribute("aria-disabled")||"-1"===l.getAttribute("tabindex"))&&e.preventDefault()}function
|
|
774
|
-
if(
|
|
775
|
-
if(e.
|
|
776
|
-
const[t]=
|
|
777
|
-
|
|
778
|
-
|
|
695
|
+
t&&((l=t).matches(":disabled")||"true"===l.getAttribute("aria-disabled")||"-1"===l.getAttribute("tabindex"))&&e.preventDefault()}function kt(){return G.value?Array.from(G.value.querySelectorAll('a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]')).filter(e=>e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0):[]}async function _t(e){if(!a.readonly&&!a.disabled){if("Enter"===e.key)return e.preventDefault(),void mt()
|
|
696
|
+
if("Tab"===e.key)G.value?.setAttribute("inert",""),U=!0,M.value=!1
|
|
697
|
+
else if("ArrowDown"===e.key){M.value=!0,await k()
|
|
698
|
+
const[t]=kt()
|
|
699
|
+
if(!t)return
|
|
700
|
+
e.preventDefault(),R=!0,t.focus()}}}function qt(){Rt()}async function wt(e){if("Tab"!==e.key)return
|
|
701
|
+
const t=kt()
|
|
779
702
|
if(!t.length)return
|
|
780
703
|
const l=t[0],a=t[t.length-1],n=document.activeElement
|
|
781
704
|
if(e.shiftKey){if(n!==l)return
|
|
782
|
-
return e.preventDefault(),
|
|
783
|
-
if(!e)return
|
|
784
|
-
const t=Array.from(document.querySelectorAll(Yn)).filter(e=>e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0),l=t.indexOf(e)
|
|
785
|
-
l>=0&&l<t.length-1&&t[l+1]?.focus()}())}async function Mt(e){if(function(){if(a.readonly||a.disabled)return!1
|
|
786
|
-
const e=L.value??D.value
|
|
787
|
-
if(!e)return!1
|
|
788
|
-
if(a.range){const t=yt(Ra(e,ze.value),{complete:!0})
|
|
789
|
-
return t?(p.value=t,L.value=null,A.value=!1,D.value=t.map(e=>qn(e,a.format,he.value)).join(" - "),!0):(L.value=null,p.value=void 0,A.value=!0,D.value="",!1)}const t=Oa(Ra(e,Te.value),a.format),l=mt(e,{complete:!0})??hn(t,a.format,se.value)
|
|
790
|
-
if(!l)return L.value=null,p.value=void 0,A.value=!0,D.value="",!1
|
|
791
|
-
const n=Boolean(mt(e))||mn(t,a.format)?l:kt(l,t)
|
|
792
|
-
p.value=n,L.value=null,A.value=!1,D.value=qn(n,a.format,he.value)}(),N)return void(N=!1)
|
|
705
|
+
return e.preventDefault(),R=!1,void Rt()}n===a&&(Rt(),U=!1,M.value=!1)}async function xt(e){if(mt(),R)return void(R=!1)
|
|
793
706
|
const t=e?.relatedTarget
|
|
794
|
-
if(t instanceof Node&&
|
|
707
|
+
if(t instanceof Node&&G.value?.contains(t))return
|
|
795
708
|
await k()
|
|
796
|
-
const l=
|
|
797
|
-
l!==
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
X.value?.focus(),Pt(),await k(),t="year"===e?le.value:"month"===e?te.value:"time"===e?ae.value:null,ie(t)?.focus()}function Ht(){const e=T.value
|
|
808
|
-
"date"!==e&&Ft(e)}async function Rt(){Qt(),T.value="month",await k()
|
|
809
|
-
const e=ne.get(z.value)
|
|
810
|
-
e?.scrollIntoView({block:"center"}),e?.focus()}async function Ut(){Qt(),H.value=P.value,T.value="year",await k(),oe.get(H.value)?.scrollIntoView({block:"center"})}async function Wt(e){if("Escape"!==e.key)return
|
|
811
|
-
if(W=!0,"date"===T.value||w.value)return e.preventDefault(),M.value=!1,await k(),void jt()
|
|
709
|
+
const l=Lt(),a=document.activeElement
|
|
710
|
+
l!==a&&(a instanceof Node&&G.value?.contains(a)||(F=!1,M.value=!1,B.value=!1))}function $t(){a.readonly||a.disabled||(B.value=!0,F?F=!1:M.value||(M.value=!0))}function Mt(){a.readonly||a.disabled||(F=!1,M.value=!0)}function Bt(e){e||j(),M.value=e}function Ct(e){return e instanceof HTMLInputElement?e:"object"==typeof e&&null!==e&&"value"in e&&e.value instanceof HTMLInputElement?e.value:null}function Lt(){if(W)return W
|
|
711
|
+
const e=Ct(Y.value?.inputRef)
|
|
712
|
+
if(e)return W=e,e
|
|
713
|
+
const t=ne(Y.value?.fieldRef)?.querySelector(".q-text-field__input")??null
|
|
714
|
+
return t?(W=t,t):null}function Dt(e){return e.isSelected||e.isRangeStart||e.isRangeEnd?"bold":e.isInRange?"tonal":"ghost"}function Et(e){G.value?.style.setProperty("--q-date-view-height",`${Math.max(0,e)}px`)}async function Vt(){M.value&&!w.value?"date"===A.value&&(await k(),Et(K.value?.getBoundingClientRect().height??0)):Et(0)}function St(){P?.disconnect(),P=null}async function At(){M.value&&!w.value&&"date"===A.value&&(await k(),K.value&&(St(),P=new MutationObserver(()=>{Vt()}),P.observe(K.value,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),Vt()))}function Qt(){A.value="time",St()}function Tt(){A.value="date",At()}async function It(e){var t
|
|
715
|
+
G.value?.focus(),Tt(),await k(),t="year"===e?ee.value:"month"===e?Z.value:"time"===e?te.value:null,ne(t)?.focus()}function zt(){const e=A.value
|
|
716
|
+
"date"!==e&&It(e)}async function Pt(){St(),A.value="month",await k()
|
|
717
|
+
const e=le.get(Q.value)
|
|
718
|
+
e?.scrollIntoView({block:"center"}),e?.focus()}async function Ft(){St(),z.value=T.value,A.value="year",await k(),ae.get(z.value)?.scrollIntoView({block:"center"})}async function Ht(e){if("Escape"!==e.key)return
|
|
719
|
+
if(F=!0,"date"===A.value||w.value)return e.preventDefault(),M.value=!1,await k(),void Ot()
|
|
812
720
|
e.preventDefault()
|
|
813
|
-
const t=
|
|
814
|
-
await
|
|
815
|
-
return!!t&&(e===t||(!e||!e.isConnected||(!!function(e){return!e||e===document.body||e===document.documentElement}(e)||(!!
|
|
816
|
-
const e=
|
|
817
|
-
e&&
|
|
818
|
-
const e=
|
|
819
|
-
|
|
820
|
-
|
|
721
|
+
const t=A.value
|
|
722
|
+
await It(t)}function Rt(){Lt()?.focus()}function Ut(e){const t=Lt()
|
|
723
|
+
return!!t&&(e===t||(!e||!e.isConnected||(!!function(e){return!e||e===document.body||e===document.documentElement}(e)||(!!G.value?.contains(e)||!function(e,t){return!e.closest(".q-date-time-picker__menu")&&!t.closest(".q-date-time-picker")?.contains(e)&&e instanceof HTMLElement&&(e.tabIndex>=0||e.matches('input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'))}(e,t)))))}function Ot(){k().then(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{!function(){if(U)return
|
|
724
|
+
const e=Lt()
|
|
725
|
+
e&&Ut(document.activeElement)&&(F=!0,e.focus())}()})})})}function Wt(){j()
|
|
726
|
+
const e=U
|
|
727
|
+
U=!1,e||(F=!0,Ot())}return X(p,()=>{ie.value&&(Ne(ie.value.getMonth()),We(ie.value.getFullYear()))}),X(M,(e,t)=>{if(e&&!1===t?d("open"):e||!0!==t||d("close"),w.value)return St(),Et(0),void(e?(document.addEventListener("keydown",Ht,{capture:!0}),Qt()):(t&&(Ze(),Wt()),document.removeEventListener("keydown",Ht,{capture:!0})))
|
|
728
|
+
Xe(),e?(document.addEventListener("keydown",Ht,{capture:!0}),function(){let e=ie.value
|
|
821
729
|
const t=p.value
|
|
822
730
|
if(a.range&&Array.isArray(t)&&t.length>0){const l=t[0]
|
|
823
|
-
l instanceof Date?e=l:"string"==typeof l&&(e=
|
|
824
|
-
h.value&&n.setHours(23,59,
|
|
825
|
-
h.value&&
|
|
826
|
-
|
|
827
|
-
t.setHours(nt(l,e))})}(e??!1,t-1)},null,8,["model-value","false-label","true-label","onUpdate:modelValue"])])):i("",!0),r("div",
|
|
828
|
-
var n}),128))])):"month"===
|
|
829
|
-
l?
|
|
830
|
-
l?
|
|
831
|
-
function
|
|
832
|
-
e.action?.(
|
|
833
|
-
function
|
|
834
|
-
return
|
|
835
|
-
return(t,l)=>(C(!0),s(e,null,
|
|
731
|
+
l instanceof Date?e=l:"string"==typeof l&&(e=vn(l,a.format,oe.value))}e=e??/* @__PURE__ */new Date,Ne(e.getMonth()),We(e.getFullYear()),Tt()}(),At()):(t&&Wt(),document.removeEventListener("keydown",Ht,{capture:!0}),St(),Et(0))}),X(w,e=>{e&&St(),M.value=!1,e&&Et(0),e?Qt():Tt()},{immediate:!0}),$(()=>{St(),document.removeEventListener("keydown",Ht,{capture:!0})}),(t,l)=>(C(),s(e,null,[c(H(Rl),b({id:a.id,ref:"field","model-value":L.value,class:["q-date-time-picker",a.class],clearable:Pe.value,"aria-label":a.label,label:a.label,"label-position":a.labelPosition,readonly:a.readonly,disabled:a.disabled,placeholder:m.value,required:a.required,size:a.size,invalid:a.invalid},t.$attrs,{onBlur:xt,"onClick:clear":Fe,onDrop:qt,onFocusin:$t,onKeydown:_t,"onUpdate:modelValue":pt}),u({prepend:J(()=>[c(H(yt),b({class:"q-date-time-picker__input-icon"},Ae.value),null,16)]),_:2},[t.$slots.extras?{name:"extras",fn:J(()=>[S(t.$slots,"extras")]),key:"0"}:void 0]),1040,["id","model-value","class","clearable","aria-label","label","label-position","readonly","disabled","placeholder","required","size","invalid"]),a.readonly||a.disabled?i("",!0):(C(),o(H(Da),{key:0,"model-value":M.value,anchor:Y.value?.fieldRef,inline:a.inline,offset:8,placement:"bottom",trigger:"manual",arrow:"","non-modal":"",spy:"","onUpdate:modelValue":Bt},{default:J(()=>[r("div",{ref:"menu",class:"q-date-time-picker__menu",tabindex:"-1",onPointerdownCapture:bt,onKeydown:wt},["date"===A.value?(C(),s("div",Ln,[r("div",Dn,[c(H(et),{variant:"ghost",disabled:!Ee.value,title:a.texts.previousMonth,onClick:je},{default:J(()=>[c(H(yt),q(f(a.icons.back)),null,16)]),_:1},8,["disabled","title"]),c(H(et),{ref:"monthHeader","data-testid":"q-date-time-picker-month-header",variant:"ghost",label:qe(Q.value,3),title:a.texts.pickMonth,onClick:Pt},null,8,["label","title"]),c(H(et),{ref:"yearHeader","data-testid":"q-date-time-picker-year-header",variant:"ghost",label:T.value.toString(),title:a.texts.pickYear,onClick:Ft},null,8,["label","title"]),c(H(et),{variant:"ghost",disabled:!Ve.value,title:a.texts.nextMonth,onClick:Ye},{default:J(()=>[c(H(yt),q(f(a.icons.forward)),null,16)]),_:1},8,["disabled","title"])]),r("div",En,[(C(!0),s(e,null,V(ke.value,e=>(C(),s("div",{key:e,class:"q-date-time-picker__weekday"},I(e),1))),128))]),r("div",{class:"q-date-time-picker__days",onMouseleave:Re,onFocusout:Ue,onTouchstartPassive:Oe,onTouchmovePassive:Oe},[(C(!0),s(e,null,V(ye.value,(e,t)=>(C(),o(H(et),{key:t,"data-day-index":t,class:_(["q-date-time-picker__day",{"q-date-time-picker__day--other-month":!e.isCurrentMonth,"q-date-time-picker__day--today":e.isToday,"q-date-time-picker__day--selected":e.isSelected,"q-date-time-picker__day--in-range":e.isInRange,"q-date-time-picker__day--range-start":e.isRangeStart,"q-date-time-picker__day--range-end":e.isRangeEnd}]),label:e.date.getDate().toString(),variant:Dt(e),disabled:e.isDisabled,onMouseenter:()=>He(e.date),onFocus:()=>He(e.date),onClick:()=>function(e){if(!a.readonly&&!a.disabled&&!(e.getFullYear()<On||e.getFullYear()>Wn))if(a.range)if(ce.value){const t=re.value??new Date(e),l=new Date(e),[a,n]=l<t?[l,t]:[t,l]
|
|
732
|
+
h.value&&n.setHours(23,59,g.value?59:0,0),p.value=[a,n],re.value=null,ue.value=null,de.value=null,ce.value=!1}else{const t=new Date(e)
|
|
733
|
+
h.value&&re.value&&t.setHours(re.value.getHours(),re.value.getMinutes(),re.value.getSeconds(),re.value.getMilliseconds()),re.value=t,ue.value=null,de.value=null,ce.value=!0}else{const t=new Date(e)
|
|
734
|
+
ie.value&&!function(e){return 0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds()}(ie.value)?t.setHours(ie.value.getHours(),ie.value.getMinutes(),ie.value.getSeconds()):h.value&>(t),p.value=t}}(e.date)},null,8,["data-day-index","class","label","variant","disabled","onMouseenter","onFocus","onClick"]))),128))],32)],512)):"time"===A.value?(C(),s("div",Vn,[(C(!0),s(e,null,V(a.range?2:1,t=>{return C(),s("div",{key:t,class:"q-date-time-picker__time-group"},[y.value?(C(),s("div",Sn,[c(H(Oa),{"model-value":at(t-1),"show-state-labels":"",size:"small","false-label":a.texts.am,"true-label":a.texts.pm,"onUpdate:modelValue":e=>function(e,t){Je(t,t=>{const l=t.getHours()%12||12
|
|
735
|
+
t.setHours(nt(l,e))})}(e??!1,t-1)},null,8,["model-value","false-label","true-label","onUpdate:modelValue"])])):i("",!0),r("div",An,[r("div",Qn,[c(H(et),{variant:"ghost",title:a.texts.increaseHour,onClick:e=>{Je(t-1,e=>{y.value?e.setHours(ot(e.getHours(),1)):e.setHours(e.getHours()>=23?0:e.getHours()+1)})}},{default:J(()=>[c(H(yt),b({ref_for:!0},a.icons.up),null,16)]),_:1},8,["title","onClick"]),c(H(Rl),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":H(Ka)(tt(t-1)),onKeydown:e=>ct(e,"hours",t-1),"onUpdate:modelValue":e=>rt(e,t-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),c(H(et),{variant:"ghost",title:a.texts.decreaseHour,onClick:e=>{Je(t-1,e=>{y.value?e.setHours(ot(e.getHours(),-1)):e.setHours(e.getHours()<=0?23:e.getHours()-1)})}},{default:J(()=>[c(H(yt),b({ref_for:!0},a.icons.down),null,16)]),_:1},8,["title","onClick"])]),l[1]||(l[1]=r("div",{class:"q-date-time-picker__time-separator"},":",-1)),r("div",Tn,[c(H(et),{variant:"ghost",title:a.texts.increaseMinute,onClick:e=>{Je(t-1,e=>{e.setMinutes(e.getMinutes()>=59?0:e.getMinutes()+1)})}},{default:J(()=>[c(H(yt),b({ref_for:!0},a.icons.up),null,16)]),_:1},8,["title","onClick"]),c(H(Rl),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":H(Ka)((n=t-1,Ke(n)?.getMinutes()??0)),onKeydown:e=>ct(e,"minutes",t-1),"onUpdate:modelValue":e=>ut(e,t-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),c(H(et),{variant:"ghost",title:a.texts.decreaseMinute,onClick:e=>function(e){Je(e,e=>{e.setMinutes(e.getMinutes()<=0?59:e.getMinutes()-1)})}(t-1)},{default:J(()=>[c(H(yt),b({ref_for:!0},a.icons.down),null,16)]),_:1},8,["title","onClick"])]),g.value?(C(),s(e,{key:0},[l[0]||(l[0]=r("div",{class:"q-date-time-picker__time-separator"},":",-1)),r("div",In,[c(H(et),{variant:"ghost",title:a.texts.increaseSecond,onClick:e=>function(e){Je(e,e=>{e.setSeconds(e.getSeconds()>=59?0:e.getSeconds()+1)})}(t-1)},{default:J(()=>[c(H(yt),b({ref_for:!0},a.icons.up),null,16)]),_:1},8,["title","onClick"]),c(H(Rl),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":H(Ka)(lt(t-1)),onKeydown:e=>ct(e,"seconds",t-1),"onUpdate:modelValue":e=>dt(e,t-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),c(H(et),{variant:"ghost",title:a.texts.decreaseSecond,onClick:e=>function(e){Je(e,e=>{e.setSeconds(e.getSeconds()<=0?59:e.getSeconds()-1)})}(t-1)},{default:J(()=>[c(H(yt),b({ref_for:!0},a.icons.down),null,16)]),_:1},8,["title","onClick"])])],64)):i("",!0)])])
|
|
736
|
+
var n}),128))])):"month"===A.value?(C(),s("div",zn,[(C(!0),s(e,null,V(_e.value,(e,t)=>(C(),o(H(et),{key:t,ref_for:!0,ref:e=>function(e,t){const l=ne(e)
|
|
737
|
+
l?le.set(t,l):le.delete(t)}(e,t),"data-testid":"q-date-time-picker-month-option","data-month-index":t,disabled:Q.value===t,label:e,title:qe(t),variant:"ghost",onClick:()=>Ne(t,!0)},null,8,["data-month-index","disabled","label","title","onClick"]))),128))])):"year"===A.value?(C(),s("div",Pn,[r("div",Fn,[c(H(et),{variant:"ghost",disabled:!Be.value,title:a.texts.previousYears,onClick:xe},{default:J(()=>[c(H(yt),q(f(a.icons.back)),null,16)]),_:1},8,["disabled","title"]),r("div",Hn,I(Me.value.startYear)+" - "+I(Me.value.endYear),1),c(H(et),{variant:"ghost",disabled:!Ce.value,title:a.texts.nextYears,onClick:$e},{default:J(()=>[c(H(yt),q(f(a.icons.forward)),null,16)]),_:1},8,["disabled","title"])]),r("div",Rn,[(C(!0),s(e,null,V(Se.value,(e,t)=>(C(),o(H(et),{key:t,ref_for:!0,ref:t=>function(e,t){const l=ne(e)
|
|
738
|
+
l?ae.set(t,l):ae.delete(t)}(t,e),"data-testid":"q-date-time-picker-year-option","data-year":e,disabled:T.value===e,label:e.toString(),title:e,variant:"ghost",onClick:()=>We(e,!0)},null,8,["data-year","disabled","label","title","onClick"]))),128))])])):i("",!0),r("div",Un,[w.value?i("",!0):(C(),o(H(et),{key:0,variant:"ghost",disabled:x.value,title:a.texts.today,onClick:Ge},{default:J(()=>[c(H(yt),q(f(a.icons.today)),null,16)]),_:1},8,["disabled","title"])),h.value&&"date"===A.value?(C(),o(H(et),{key:1,ref:"toggleTime","data-testid":"q-date-time-picker-toggle-time",variant:"ghost",title:a.texts.toggleMode,onClick:Qt},{default:J(()=>[c(H(yt),q(f(a.icons.clock)),null,16)]),_:1},8,["title"])):"date"===A.value||w.value?i("",!0):(C(),o(H(et),{key:2,"data-testid":"q-date-time-picker-toggle-date",variant:"ghost",title:a.texts.toggleMode,onClick:zt},{default:J(()=>[c(H(yt),q(f(a.icons.calendar)),null,16)]),_:1},8,["title"])),a.clearable?(C(),o(H(et),{key:3,"data-testid":"q-date-time-picker-clear",variant:"ghost",disabled:!Pe.value,title:a.texts.clearValue,onClick:Fe},{default:J(()=>[c(H(yt),q(f(a.icons.delete)),null,16)]),_:1},8,["disabled","title"])):i("",!0)])],544)]),_:1},8,["model-value","anchor","inline"]))],64))}})),Yn=Me(/*@__PURE__*/v({__name:"QDefaultsProvider",props:{id:{},class:{},defaults:{}},setup:e=>(ve(P(e,"defaults")),(e,t)=>S(e.$slots,"default"))})),Gn=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],Kn={icon:"check-circle-outline"},Xn={close:{icon:"close"}},Zn={key:0,class:"q-dialog__header"},Jn={key:0,class:"q-dialog__header-title"},eo={key:1,class:"q-dialog__body"},to={key:0,class:"q-dialog__body-icon"},lo={class:"q-dialog__body-text"},ao=["innerHTML"],no={key:1},oo={key:0,class:"q-dialog__input"},io={key:2,class:"q-dialog__footer"},so={key:0,class:"q-dialog__footer-buttons"},ro=/*@__PURE__*/v({__name:"QDialog",props:{id:{},class:{},modelValue:{type:Boolean},title:{},text:{},icon:{default:()=>Kn},buttons:{default:()=>Gn},backdropBlur:{type:Boolean,default:!0},size:{default:"small"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},focusWrap:{type:Boolean,default:!0},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!0},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},input:{},icons:{default:()=>Xn}},emits:["update:modelValue","action"],setup(t,{emit:l}){const a=t,u=l,v=E(""),p=E(""),m=n(()=>["q-dialog",a.class]),h=n(()=>`q-overlay--${a.size}`)
|
|
739
|
+
function g(){k(!0)}function y(){k(!1)}function k(e){u("update:modelValue",e)}return(t,l)=>(C(),o(H(Da),{id:a.id,"model-value":a.modelValue,"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:a.inline,attach:a.attach,"backdrop-blur":a.backdropBlur,"center-vertically":a.centerVertically,"focus-wrap":a.focusWrap,"initial-focus":a.initialFocus,"focus-within-on-activate":a.focusWithinOnActivate,"closing-focus":a.closingFocus,"return-focus-on-deactivate":a.returnFocusOnDeactivate,class:_(h.value),onEnter:g,"onUpdate:modelValue":k},{default:J(()=>[r("div",{class:_(m.value)},[a.title||t.$slots.header||t.$slots["header.prepend"]||t.$slots["header.append"]?(C(),s("div",Zn,[S(t.$slots,"header",{},()=>[S(t.$slots,"header.prepend"),a.title?(C(),s("span",Jn,I(a.title),1)):i("",!0),S(t.$slots,"header.append")])])):i("",!0),a.icon||a.text||t.$slots.body?(C(),s("div",eo,[S(t.$slots,"body",{},()=>[S(t.$slots,"body.icon",{},()=>[a.icon?(C(),s("span",to,[c(H(yt),q(f(a.icon)),null,16)])):i("",!0)]),r("div",lo,[a.html?(C(),s("div",{key:0,innerHTML:a.text},null,8,ao)):(C(),s("div",no,I(a.text),1))]),a.input?(C(),s("div",oo,[c(H(Rl),{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value=e),invalid:!!p.value,placeholder:a.input?.placeholder,size:"block"},{extras:J(()=>[p.value?(C(),o(H(yt),{key:0,icon:"exclamation-sign"})):i("",!0),d(" "+I(p.value),1)]),_:1},8,["modelValue","invalid","placeholder"])])):i("",!0),S(t.$slots,"body.append")])])):i("",!0),a.buttons||t.$slots["footer.append"]?(C(),s("div",io,[a.buttons?(C(),s("span",so,[(C(!0),s(e,null,V(a.buttons,e=>(C(),o(H(et),b({ref_for:!0},e.props,{key:e.id,onClick:()=>function(e){if(u("action",e.id),e.action){if(a.input?.validator&&(p.value=a.input.validator(H(v)),H(p)))return
|
|
740
|
+
e.action?.(H(v))}y()}(e)}),{default:J(()=>[e.icon?(C(),o(H(yt),b({key:0,ref_for:!0},e.icon),null,16)):i("",!0)]),_:2},1040,["onClick"]))),128))])):i("",!0),S(t.$slots,"footer.append")])):i("",!0),a.dismissible?(C(),o(H(et),{key:3,class:"q-dialog__close",variant:"text",onClick:y},{default:J(()=>[c(H(yt),q(f(a.icons.close)),null,16)]),_:1})):i("",!0)],2)]),_:3},8,["id","model-value","inline","attach","backdrop-blur","center-vertically","focus-wrap","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate","class"]))}}),uo=D({dialogs:[]})
|
|
741
|
+
function co(){return{...uo,addDialog:function(e,t,l,a){const n=Tt(t).value
|
|
742
|
+
return uo.dialogs.push({id:n,props:{...e,modelValue:!0},options:l,handlers:a}),a?.onEnter&&a.onEnter(),n},removeDialog:function(e){const t=uo.dialogs.findIndex(t=>t.id===e);-1!==t&&(uo.dialogs[t]?.handlers?.onLeave?.()??1)&&uo.dialogs.splice(t,1)}}}var vo=/*@__PURE__*/v({inheritAttrs:!1,__name:"QDialogProvider",props:{inline:{type:Boolean}},emits:["leave"],setup(t,{emit:l}){const a=t,n=l,{dialogs:i,removeDialog:r}=co()
|
|
743
|
+
return(t,l)=>(C(!0),s(e,null,V(H(i),e=>(C(),o(H(po),b({key:e.id},{ref_for:!0},e.props,{inline:a.inline,onAction:e.handlers?.onAction,"onUpdate:modelValue":t=>function(e,t){t||(r(e),n("leave",e))}(e.id,t)}),null,16,["inline","onAction","onUpdate:modelValue"]))),128))}}),po=Me(ro),fo=Me(vo),mo=["id"],ho={class:"q-divider__label"},go=Me(/*@__PURE__*/v({__name:"QDivider",props:{id:{},class:{},direction:{default:"horizontal"},inset:{type:Boolean},thickness:{default:1},color:{default:"neutral"}},setup(t){const l=t,a=n(()=>!!W().default),o=n(()=>["q-divider",`q-divider--${l.direction}`,{"q-divider--inset":l.inset,"q-divider--labeled":a.value},l.class]),{isUtilityColor:u,style:d}=Ke(P(l,"color")),c=n(()=>{const e={}
|
|
836
744
|
return l.thickness>=0&&1!==l.thickness&&(e["--q-divider-thickness"]=`${l.thickness}px`),"neutral"!==l.color&&(e["--q-divider-color"]=u.value?`var(--q-theme-${l.color})`:d.value?.mainColor),e})
|
|
837
|
-
return(t,n)=>(C(),s("div",{id:l.id,class:_(o.value),style:w(c.value),role:"separator"},[a.value?(C(),s(e,{key:0},[n[0]||(n[0]=r("div",{class:"q-divider__line"},null,-1)),r("span",
|
|
838
|
-
|
|
839
|
-
const t=
|
|
840
|
-
|
|
841
|
-
|
|
745
|
+
return(t,n)=>(C(),s("div",{id:l.id,class:_(o.value),style:w(c.value),role:"separator"},[a.value?(C(),s(e,{key:0},[n[0]||(n[0]=r("div",{class:"q-divider__line"},null,-1)),r("span",ho,[S(t.$slots,"default")]),n[1]||(n[1]=r("div",{class:"q-divider__line"},null,-1))],64)):i("",!0)],14,mo))}})),yo={expand:{icon:"chevron-right"}},bo=["d"],ko=Me(/*@__PURE__*/v({__name:"QSafeTriangle",props:{top:{default:0},left:{default:0},width:{default:0},height:{default:0},path:{default:""}},setup(e){const l=e,a=n(()=>({top:`${l.top}px`,left:`${l.left}px`,width:`${l.width}px`,height:`${l.height}px`}))
|
|
746
|
+
return(e,n)=>(C(),o(t,{to:"body"},[l.path?(C(),s("svg",{key:0,class:"q-safe-triangle","aria-hidden":"true",style:w(a.value)},[r("path",{class:"q-safe-triangle__path",d:l.path},null,8,bo)],4)):i("",!0)]))}}))
|
|
747
|
+
function _o(e,t,l){return e>=l.left&&e<=l.right&&t>=l.top&&t<=l.bottom}function qo(e,t,l){return!!l&&Array.from(l.querySelectorAll(".q-dropdown-menu__body")).some(l=>_o(e,t,l.getBoundingClientRect()))}function wo(e){const t=E(!1),l=E(0),a=E(0),n=E(0),o=E(0),i=E("")
|
|
748
|
+
let s=!1,r={x:0,y:0},u=null,d=!1
|
|
749
|
+
function c(t,l){return function(e,t,l){if(!t||!l)return e
|
|
750
|
+
const a=(t.left+t.right)/2,n=(l.left+l.right)/2>=a?"right":"left",o=e.split("-")[1]
|
|
751
|
+
return o?`${n}-${o}`:n}(e.placement.value,t,l)}function v(e,s,r,u){if(!u)return void(t.value=!1)
|
|
752
|
+
const d=function(e,t,l,a){const n=e.split("-")[0]
|
|
753
|
+
if("right"===n){if(l>=t.left)return null
|
|
754
|
+
const e=l,n=t.top,o=t.left-l,i=t.height
|
|
755
|
+
return o<=0||i<=0?null:{left:e,top:n,width:o,height:i,path:`M 0, ${a-n} L ${o}, ${i} L ${o}, 0 z`}}if("left"===n){if(l<=t.right)return null
|
|
756
|
+
const e=t.right,n=t.top,o=l-t.right,i=t.height
|
|
757
|
+
return o<=0||i<=0?null:{left:e,top:n,width:o,height:i,path:`M ${o}, ${a-n} L 0, ${i} L 0, 0 z`}}return null}(c(r,u),u,e,s)
|
|
758
|
+
d?(t.value=!0,l.value=d.top,a.value=d.left,n.value=d.width,o.value=d.height,i.value=d.path):t.value=!1}function p(l,a){const n=e.getParentRect(),o=e.getContentRect(),i=e.getContentRoot()
|
|
759
|
+
return function(t,l){const a=e.getContentRect(),n=e.getContentRoot()
|
|
760
|
+
return null!==a&&_o(t,l,a)||null!==n&&qo(t,l,n)}(l,a)?(t.value=!1,d||e.onEnterContent?.(l,a),void(d=!0)):(d=!1,n&&_o(l,a,n)?(u={x:l,y:a},void v(l,a,n,o)):o&&u?function(e,t,l,a,n,o,i){if(l&&_o(e,t,l))return!0
|
|
761
|
+
if(a&&_o(e,t,a))return!0
|
|
762
|
+
if(i&&qo(e,t,i))return!0
|
|
763
|
+
if(!a||!o)return!1
|
|
764
|
+
const s=function(e,t,l,a){switch(e.split("-")[0]){case"right":return{a:{x:t.left,y:t.top},b:{x:t.left,y:t.bottom},c:{x:l,y:a}}
|
|
765
|
+
case"left":return{a:{x:t.right,y:t.top},b:{x:t.right,y:t.bottom},c:{x:l,y:a}}
|
|
766
|
+
default:return null}}(n,a,o.x,o.y)
|
|
767
|
+
return!!s&&function(e,t,l,a,n){const o=(e,t,l,a,n,o)=>(e-n)*(a-o)-(l-n)*(t-o),i=o(e,t,l.x,l.y,a.x,a.y),s=o(e,t,a.x,a.y,n.x,n.y),r=o(e,t,n.x,n.y,l.x,l.y)
|
|
768
|
+
return!((i<0||s<0||r<0)&&(i>0||s>0||r>0))}(e,t,s.a,s.b,s.c)}(l,a,n,o,c(n,o),u,i)?void v(u.x,u.y,n,o):(t.value=!1,void(e.shouldSuppressLeave()||e.onLeave())):void(t.value=!1))}function f(t){r={x:t.clientX,y:t.clientY},e.enabled.value&&p(t.clientX,t.clientY)}function m(t,l){void 0!==t&&void 0!==l&&(r={x:t,y:l}),e.enabled.value&&p(r.x,r.y)}function h(){s&&(s=!1,document.removeEventListener("pointermove",f,!0),t.value=!1,d=!1,u=null)}return X(e.enabled,t=>{if(t){d=!1
|
|
769
|
+
const t=e.getParentRect()
|
|
770
|
+
u=t&&_o(r.x,r.y,t)?{...r}:null,s||(s=!0,document.addEventListener("pointermove",f,!0)),m()}else h()},{immediate:!0}),$(h),{visible:t,top:l,left:a,width:n,height:o,path:i,refresh:m,getLastPointer:()=>({...r})}}var xo={key:0,class:"q-dropdown-menu__extra"},$o=/*@__PURE__*/v({__name:"QDropdownMenuContent",props:/*@__PURE__*/y({id:{},class:{},activator:{},itemValue:{default:"key"},itemLabel:{default:"label"},items:{},groups:{default:()=>[]},appearance:{default:"regular"},placement:{default:"bottom-start"},transition:{default:"fade"},inline:{type:Boolean},delay:{default:500},trigger:{default:"hover"},depth:{default:0},icons:{default:()=>yo},offset:{default:6},crossOffset:{default:-5}},{modelValue:{type:Boolean},modelModifiers:{},highlighted:{},highlightedModifiers:{}}),emits:/*@__PURE__*/y(["select","open","hide","focus-previous"],["update:modelValue","update:highlighted"]),setup(t,{expose:l,emit:a}){const u=t,d=a,v=O(t,"modelValue"),p=O(t,"highlighted"),m=E(void 0),h=E([]),g=n(()=>0!==u.depth?u.offset:4),y=n(()=>0!==u.depth?u.crossOffset:void 0),w=N("list"),x=N("body"),$=E(null),M=n(()=>"right-start"),B=n(()=>"hover"===u.trigger&&void 0!==m.value&&((u.items?.find(e=>e[u.itemValue]===m.value))?.items?.length??0)>0)
|
|
771
|
+
const{visible:L,top:D,left:V,width:Q,height:T,path:z,refresh:P,getLastPointer:F}=wo({enabled:B,placement:M,getParentRect:()=>x.value?.getBoundingClientRect()??null,getContentRect:function(){return $.value?.getMenuRect()??null},getContentRoot:function(){return $.value?.getMenuRoot()??null},shouldSuppressLeave:function(){return $.value?.hasOpenSubmenu()??!1},onLeave:ee,onEnterContent:(e,t)=>{$.value?.syncHoverFromPoint(e,t)}})
|
|
772
|
+
function R(e,t){if("hover"!==u.trigger)return
|
|
773
|
+
const l=function(e,t){const l=x.value
|
|
774
|
+
if(!l)return
|
|
775
|
+
const a=document.elementsFromPoint(e,t)
|
|
776
|
+
for(const n of a){if(!(n instanceof Element))continue
|
|
777
|
+
const e=n.closest(".q-list-item")
|
|
778
|
+
if(!e||!l.contains(e))continue
|
|
779
|
+
if(e.closest(".q-dropdown-menu__body")!==l)continue
|
|
780
|
+
const t=e.getAttribute("data-key")
|
|
781
|
+
if(null===t)continue
|
|
782
|
+
const a=u.items?.find(e=>String(e[u.itemValue])===t)
|
|
783
|
+
if(a)return a[u.itemValue]}}(e,t)
|
|
784
|
+
void 0!==l&&G(l)}function U(e){P(e.clientX,e.clientY),R(e.clientX,e.clientY)}function W(e){B.value&&R(e.clientX,e.clientY),P(e.clientX,e.clientY)}function j(e){h.value=(u.items?.find(t=>t[u.itemValue]===e))?.items??[]
|
|
785
|
+
const t=h.value.length>0
|
|
786
|
+
p.value=e,t?ne(e):K(e)}function Y(e){if(e.key)switch(["Enter","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),e.key){case"ArrowRight":const e=w.value?.getActiveItemIndex()
|
|
787
|
+
u.items&&(e||0===e)&&u.items[e]&&(p.value=u.items[e].key,ne(u.items[e].key))
|
|
842
788
|
break
|
|
843
|
-
case"ArrowLeft":
|
|
789
|
+
case"ArrowLeft":te()
|
|
844
790
|
break
|
|
845
|
-
case"Escape":case"Tab":
|
|
791
|
+
case"Escape":case"Tab":ae()}}function G(e){"hover"===u.trigger&&(p.value=e,ne(e))}function K(e){d("select",e),ae()}function Z(){te()}function ee(){m.value=void 0,p.value=void 0}function te(){ee(),v.value=!1,d("focus-previous")}function ae(){te(),d("hide")}function ne(e){m.value=(u.items?.find(t=>t[u.itemValue]===e))?.items?.length?e:void 0}function oe(){const e=u.items?.findIndex(e=>e[u.itemValue]===m.value)
|
|
846
792
|
if(!e&&0!==e)return
|
|
847
|
-
const t=
|
|
848
|
-
|
|
849
|
-
return
|
|
793
|
+
const t=w.value?.getItem(e)
|
|
794
|
+
m.value=void 0,p.value=void 0,t?.focus()}function ie(){d("open"),k(()=>w.value?.$el.focus())}return X(m,()=>{$.value=null}),l({getMenuRect:()=>{const e=x.value
|
|
795
|
+
return e?(e.closest(".q-overlay")??e).getBoundingClientRect():null},getMenuRoot:()=>x.value?.closest(".q-overlay")??x.value,hasOpenSubmenu:()=>void 0!==m.value&&((u.items?.find(e=>e[u.itemValue]===m.value))?.items?.length??0)>0,syncHoverFromPoint:R}),(t,l)=>{const a=A("q-dropdown-menu-content",!0)
|
|
796
|
+
return C(),o(H(Da),{id:u.id,modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value=e),anchor:u.activator,appearance:u.appearance,inline:u.inline,delay:u.delay,offset:g.value,"cross-offset":y.value,placement:u.placement,transition:u.transition,class:_(u.class),trigger:"click","scroll-lock":"","non-modal":"",onEnter:ie,onLeave:Z},{default:J(()=>[r("div",{ref:"body",class:"q-dropdown-menu__body","data-testid":"dropdown-content",tabindex:"-1",onPointerenter:U,onPointermove:W,onKeydown:le(Y,["stop"])},[S(t.$slots,"prepend"),c(H(na),{ref:"list",class:"q-dropdown-menu__items",highlighted:p.value,items:u.items,groups:u.groups,"item-label":u.itemLabel,"item-value":u.itemValue,selectable:!1,"select-on-tab":!1,onClick:j,"onMouseenter:item":G},{item:J(({item:e})=>[S(t.$slots,"item",{item:e})]),"item.append":J(({item:l,element:n})=>[S(t.$slots,"item.append",{item:l},()=>[l.extraInfo?(C(),s("span",xo,I(l.extraInfo),1)):i("",!0)]),l.items?.length>0?(C(),s(e,{key:0},[c(H(yt),q(f(u.icons.expand)),null,16),m.value===l.key?(C(),o(a,b({key:0,ref:e=>function(e,t){if(e&&m.value===t&&function(e){return"syncHoverFromPoint"in e&&"getMenuRect"in e&&"getMenuRoot"in e&&"hasOpenSubmenu"in e}(e))return $.value=e,void k(()=>{P()
|
|
797
|
+
const{x:e,y:t}=F()
|
|
798
|
+
$.value?.syncHoverFromPoint(e,t)})
|
|
799
|
+
e||m.value!==t||($.value=null)}(e,l.key),"model-value":""},u,{activator:n,items:l.items,groups:l.groups,depth:u.depth+1,delay:u.delay,placement:"right-start","non-modal":"",inline:"",onHide:ae,onSelect:K,onFocusPrevious:oe}),{item:J(e=>[S(t.$slots,"item",q(f(e)))]),"item.append":J(e=>[S(t.$slots,"item.append",q(f(e)))]),_:3},16,["activator","items","groups","depth","delay"])):i("",!0)],64)):i("",!0)]),_:3},8,["highlighted","items","groups","item-label","item-value"]),S(t.$slots,"append")],544),H(L)?(C(),o(H(ko),{key:0,top:H(D),left:H(V),width:H(Q),height:H(T),path:H(z)},null,8,["top","left","width","height","path"])):i("",!0)]),_:3},8,["id","modelValue","anchor","appearance","inline","delay","offset","cross-offset","placement","transition","class"])}}}),Mo=$o,Bo=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QDropdownMenu",props:/*@__PURE__*/y({id:{},class:{},activator:{},itemValue:{},itemLabel:{},items:{},groups:{},appearance:{},placement:{},transition:{},inline:{type:Boolean},delay:{},trigger:{},depth:{},icons:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:/*@__PURE__*/y(["select"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,n=O(e,"modelValue")
|
|
850
800
|
let i
|
|
851
|
-
function s(e){a("select",e)}function r(){i=document.activeElement}async function u(){await k(),i?.focus()}return(e,t)=>(C(),o(
|
|
852
|
-
var
|
|
853
|
-
|
|
801
|
+
function s(e){a("select",e)}function r(){i=document.activeElement}async function u(){await k(),i?.focus()}return(e,t)=>(C(),o(Mo,b(l,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),onSelect:s,onOpen:r,onFocusPrevious:u}),{prepend:J(()=>[S(e.$slots,"prepend")]),append:J(()=>[S(e.$slots,"append")]),item:J(({item:t})=>[S(e.$slots,"item",{item:t})]),"item.append":J(({item:t})=>[S(e.$slots,"item.append",{item:t})]),_:3},16,["modelValue"]))}})),Co={remove:{icon:"close"},download:{icon:"download"},upload:{icon:"upload"},file:{icon:"file"},empty:{icon:"diameter-variant"}},Lo={dropHereOr:"Drop here or",chooseFile:"Choose file",preview:"Preview",download:"Download attached file",remove:"Remove attached file",empty:"No document attached"}
|
|
802
|
+
var Do=["id","accept","required","readonly","disabled"],Eo={key:0,class:"q-file-input__drop-area"},Vo={key:1,class:"q-file-input__file-details"},So={class:"q-file-input__attached-file"},Ao={key:0,class:"q-file-input__preview q-file-input__image-preview"},Qo=["src","alt"],To={class:"q-file-input__file-meta"},Io={class:"q-file-input__file-name"},zo={class:"q-file-input__file-type"},Po={key:0,class:"q-file-input__action-buttons"},Fo={key:2,class:"q-file-input__empty-container"},Ho=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QFileUpload",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{default:"large"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},accept:{},icons:{default:()=>Co},texts:{default:()=>Lo}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=Tt(P(t,"id")),v=n(()=>!t.readonly&&!t.disabled),p=E(null)
|
|
803
|
+
X(l,e=>{p.value&&URL.revokeObjectURL(p.value),p.value=e&&e.type.startsWith("image/")?URL.createObjectURL(e):null})
|
|
854
804
|
const m=E(null)
|
|
855
|
-
function h(){m.value?.click()}function
|
|
805
|
+
function h(){m.value?.click()}function y(e){const t=e.target
|
|
856
806
|
t?.files?.[0]&&(l.value=t.files[0])}function k(){l.value&&function(e){const t=new FileReader
|
|
857
807
|
t.onload=()=>{const l=e.type||"application/octet-stream",a=new Blob([t.result],{type:l}),n=Object.assign(document.createElement("a"),{href:URL.createObjectURL(a),download:e.name||"download"})
|
|
858
|
-
document.body.appendChild(n),n.click(),setTimeout(()=>{URL.revokeObjectURL(n.href),n.parentNode?.removeChild(n)},100)},t.readAsArrayBuffer(e)}(l.value)}function w(){l.value=void 0,m.value&&(m.value.value="")}const x=E(null),$=n(()=>Array.isArray(t.accept)?t.accept:t.accept?t.accept.split(",").map(e=>e.trim()):[]),
|
|
808
|
+
document.body.appendChild(n),n.click(),setTimeout(()=>{URL.revokeObjectURL(n.href),n.parentNode?.removeChild(n)},100)},t.readAsArrayBuffer(e)}(l.value)}function w(){l.value=void 0,m.value&&(m.value.value="")}const x=E(null),$=n(()=>Array.isArray(t.accept)?t.accept:t.accept?t.accept.split(",").map(e=>e.trim()):[]),L=n(()=>$.value?.join(",")),{isOverDropZone:D,isValid:V}=function(e,t={}){const{onDrop:l,onDragOver:a,onDragLeave:n,accept:o=[],multiple:i,maxSize:s,enabled:r=!0}=t
|
|
859
809
|
let u=0
|
|
860
|
-
const d=E(!1),c=E(!1),v=E(
|
|
810
|
+
const d=E(!1),c=E(!1),v=E(H(r)),p=e=>{const t=H(o)
|
|
861
811
|
return 0===t.length||t.some(t=>e.match(t))},f=e=>!(s&&e.size>s||!p(e.type)),m=()=>{u=0,d.value=!1,c.value=!1},h=e=>{if(!v.value)return
|
|
862
812
|
e.preventDefault(),m()
|
|
863
813
|
const t=Array.from(e.dataTransfer?.files||[])
|
|
864
|
-
if(!
|
|
814
|
+
if(!H(i)&&t.length>1)return
|
|
865
815
|
const a=t.filter(f)
|
|
866
|
-
a.length&&l&&l(a)},
|
|
867
|
-
return t.enabled&&
|
|
868
|
-
t&&(t.addEventListener("drop",h),t.addEventListener("dragenter",
|
|
869
|
-
t&&(t.removeEventListener("drop",h),t.removeEventListener("dragenter",
|
|
816
|
+
a.length&&l&&l(a)},y=e=>{v.value&&(e.preventDefault(),c.value=Array.from(e.dataTransfer?.items||[]).map(e=>e.type).some(p),u++,1===u&&(d.value=!0,a?.(e)))},b=e=>{v.value&&(e.preventDefault(),u--,0===u&&(d.value=!1,c.value=!1,n?.(e)))},k=e=>{v.value&&e.preventDefault()}
|
|
817
|
+
return t.enabled&&g(t.enabled)&&X(t.enabled,e=>{v.value=e,e||m()}),M(()=>{const t=e.value
|
|
818
|
+
t&&(t.addEventListener("drop",h),t.addEventListener("dragenter",y),t.addEventListener("dragleave",b),t.addEventListener("dragover",k))}),B(()=>{const t=e.value
|
|
819
|
+
t&&(t.removeEventListener("drop",h),t.removeEventListener("dragenter",y),t.removeEventListener("dragleave",b),t.removeEventListener("dragover",k))}),{isOverDropZone:d,isValid:c,isEnabled:v,enable:()=>{v.value=!0},disable:()=>{v.value=!1,m()}}}(x,{onDrop:function(e){if(!v.value)return
|
|
870
820
|
const t=e?.[0]
|
|
871
|
-
t&&(l.value=t)},accept:$,enabled:n(()=>v.value&&!l.value)}),A=n(()=>["q-field__control","q-file-input",{"q-file-input--highlighted":
|
|
872
|
-
return(e,n)=>(C(),o(
|
|
873
|
-
function a(e,t){if(t)return"auto"===t?`q-col${e?`-${e}`:""}-auto`:`q-col${e?`-${e}`:""}-${t}`}return
|
|
874
|
-
return(e,t)=>(C(),s("div",{class:_(l.value)},[
|
|
821
|
+
t&&(l.value=t)},accept:$,enabled:n(()=>v.value&&!l.value)}),A=n(()=>["q-field__control","q-file-input",{"q-file-input--highlighted":D.value&&V.value},t.class])
|
|
822
|
+
return(e,n)=>(C(),o(H(Ql),{for:H(a),label:t.label,"label-position":t.labelPosition,size:t.size,readonly:t.readonly,disabled:t.disabled,required:t.required,invalid:t.invalid},u({control:J(()=>[r("div",{ref_key:"dropZoneRef",ref:x,class:_(A.value)},[r("input",b({id:H(a),ref_key:"fileInput",ref:m,type:"file",class:"q-file-input__file-input",accept:L.value,required:t.required,readonly:t.readonly,disabled:t.disabled},e.$attrs,{onChange:y}),null,16,Do),!l.value&&v.value?(C(),s("div",Eo,[c(H(yt),q(f(t.icons.upload)),null,16),r("span",null,I(t.texts.dropHereOr),1),c(H(et),{label:t.texts.chooseFile,onClick:h},null,8,["label"])])):l.value?(C(),s("div",Vo,[r("div",So,[p.value?(C(),s("div",Ao,[r("img",{src:p.value,alt:t.texts.preview},null,8,Qo)])):(C(),o(H(yt),b({key:1,class:"q-file-input__preview"},t.icons.file),null,16)),r("div",To,[r("span",Io,I(l.value.name),1),r("span",zo,I(l.value.type),1)])]),v.value?(C(),s("div",Po,[c(H(et),{title:t.texts.download,borderless:"",onClick:k},{default:J(()=>[c(H(yt),q(f(t.icons.download)),null,16)]),_:1},8,["title"]),c(H(et),{title:t.texts.remove,borderless:"",onClick:w},{default:J(()=>[c(H(yt),q(f(t.icons.remove)),null,16)]),_:1},8,["title"])])):i("",!0)])):(C(),s("div",Fo,[c(H(yt),q(f(t.icons.empty)),null,16),d(" "+I(t.texts.empty),1)]))],2)]),_:2},[e.$slots.extras?{name:"extras",fn:J(()=>[S(e.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","label-position","size","readonly","disabled","required","invalid"]))}})),Ro=/*@__PURE__*/v({__name:"QCol",props:{cols:{},sm:{},md:{},lg:{},xl:{},xxl:{}},setup(e){const t=e,l=n(()=>["q-col",a("",t.cols),a("sm",t.sm),a("md",t.md),a("lg",t.lg),a("xl",t.xl),a("xxl",t.xxl)].filter(Boolean))
|
|
823
|
+
function a(e,t){if(t)return"auto"===t?`q-col${e?`-${e}`:""}-auto`:`q-col${e?`-${e}`:""}-${t}`}return ve({QGroupBox:{block:n(()=>"auto"!==t.cols||void 0)},QField:{size:n(()=>"auto"===t.cols?void 0:"block")}}),(e,t)=>(C(),s("div",{class:_(l.value)},[S(e.$slots,"default")],2))}}),Uo=/*@__PURE__*/v({__name:"QContainer",props:{fluid:{type:Boolean}},setup(e){const t=e,l=n(()=>["q-container",{"q-container--fluid":t.fluid}])
|
|
824
|
+
return(e,t)=>(C(),s("div",{class:_(l.value)},[S(e.$slots,"default")],2))}}),Oo=/*@__PURE__*/v({__name:"QRow",props:{gutter:{default:16},justify:{default:"start"},align:{default:"stretch"}},setup(e){const t=e,l=n(()=>["q-row",{[`q-row--justify-${t.justify}`]:"start"!==t.justify,[`q-row--align-${t.align}`]:"stretch"!==t.align}]),a=n(()=>{const e={}
|
|
875
825
|
return 16!==t.gutter&&(e["--q-row-gutter"]=`${t.gutter}px`),e})
|
|
876
|
-
return(e,t)=>(C(),s("div",{class:_(l.value),style:w(a.value)},[
|
|
877
|
-
var
|
|
826
|
+
return(e,t)=>(C(),s("div",{class:_(l.value),style:w(a.value)},[S(e.$slots,"default")],6))}}),Wo={class:"q-spacer"}
|
|
827
|
+
var No=/*#__PURE__*/((e,t)=>{const l=e.__vccOpts||e
|
|
878
828
|
for(const[a,n]of t)l[a]=n
|
|
879
|
-
return l})({},[["render",function(e,t){return C(),s("div",
|
|
880
|
-
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[t.title?(C(),s("div",
|
|
881
|
-
return
|
|
882
|
-
return(e,a)=>(C(),s("div",{id:t.id,class:_(["q-line-loader",{"q-line-loader--rounded":t.rounded},t.class]),style:w(l.value)},null,14,
|
|
883
|
-
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-meter",t.class])},[r("div",
|
|
884
|
-
|
|
885
|
-
const
|
|
886
|
-
function
|
|
887
|
-
return(t,a)=>(C(),s("ul",
|
|
829
|
+
return l})({},[["render",function(e,t){return C(),s("div",Wo)}]]),jo=Me(Ro),Yo=Me(Uo),Go=Me(Oo),Ko=Me(No),Xo=["id"],Zo={key:0,class:"q-group-box__title"},Jo={class:"q-group-box__content"},ei=Me(/*@__PURE__*/v({__name:"QGroupBox",props:{id:{},class:{},title:{},borderless:{type:Boolean},variant:{default:"default"},block:{type:Boolean}},setup(e){const t=e,l=n(()=>["q-group-box","default"===t.variant?void 0:`q-group-box--${t.variant}`,{"q-group-box--block":t.block,"q-group-box--borderless":t.borderless},t.class])
|
|
830
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[t.title?(C(),s("div",Zo,I(t.title),1)):i("",!0),r("div",Jo,[S(e.$slots,"default")])],10,Xo))}})),ti={key:0,class:"q-input-group__prepend"},li={key:0},ai={key:1,class:"q-input-group__append"},ni={key:0},oi=Me(/*@__PURE__*/v({__name:"QInputGroup",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{default:"large"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},prependIcon:{},appendIcon:{}},setup(e){const t=e
|
|
831
|
+
return ve({QField:{size:"block"}}),(e,l)=>(C(),o(H(Ql),{id:t.id,class:_(["q-input-group",t.class]),label:t.label,"label-position":t.labelPosition,required:t.required,size:t.size,invalid:t.invalid},u({"label.prepend":J(()=>[S(e.$slots,"label.prepend")]),"label.append":J(()=>[S(e.$slots,"label.append")]),default:J(()=>[e.$slots.prepend||t.prependIcon?(C(),s("div",ti,[t.prependIcon?(C(),s("span",li,[c(H(yt),q(f(t.prependIcon)),null,16)])):i("",!0),S(e.$slots,"prepend")])):i("",!0),S(e.$slots,"default"),e.$slots.append||t.appendIcon?(C(),s("div",ai,[t.appendIcon?(C(),s("span",ni,[c(H(yt),q(f(t.appendIcon)),null,16)])):i("",!0),S(e.$slots,"append")])):i("",!0)]),_:2},[e.$slots.extras?{name:"extras",fn:J(()=>[S(e.$slots,"extras")]),key:"0"}:void 0]),1032,["id","class","label","label-position","required","size","invalid"]))}})),ii=["id"],si=Me(/*@__PURE__*/v({__name:"QLineLoader",props:{id:{},class:{},height:{},rounded:{type:Boolean}},setup(e){const t=e,l=n(()=>{if(void 0!==t.height)return{"--q-line-loader-height":`${Math.min(12,Math.max(4,t.height))}px`}})
|
|
832
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(["q-line-loader",{"q-line-loader--rounded":t.rounded},t.class]),style:w(l.value)},null,14,ii))}})),ri=["id"],ui={class:"q-meter__labels"},di={class:"q-meter__track"},ci=Me(/*@__PURE__*/v({__name:"QMeter",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},valueLabel:{},color:{},max:{default:100}},{modelValue:{default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n(()=>l.value/t.max*100),{style:o}=Ke(P(t,"color")),i=n(()=>({width:`${Math.max(0,Math.min(a.value,100))}%`,backgroundColor:o.value?.mainColor})),u=n(()=>"string"==typeof t.valueLabel?t.valueLabel:t.valueLabel?.(l.value,t.max))
|
|
833
|
+
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-meter",t.class])},[r("div",ui,[c(H(xl),{label:t.label},null,8,["label"]),c(H(xl),{label:u.value,class:"q-meter__value-label"},null,8,["label"])]),r("div",di,[r("div",{class:"q-meter__fill",style:w(i.value)},null,4)])],10,ri))}})),vi={restricted:{icon:"lock"},show:{icon:"lock"},hide:{icon:"lock-open-variant"}},pi={restricted:"Restricted",showData:"Show data",hideData:"Hide data"},fi=["id"],mi=["id"],hi={key:1,class:"q-obfuscation__mask"},gi=Me(/*@__PURE__*/v({__name:"QObfuscation",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean,default:!1},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},revealable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},mask:{default:"restricted"},bulletCount:{default:12},icons:{default:()=>vi},texts:{default:()=>pi}},{revealed:{type:Boolean,default:!1},revealedModifiers:{}}),emits:/*@__PURE__*/y(["reveal","hide"],["update:revealed"]),setup(e,{emit:t}){const l=e,a=t,r=O(e,"revealed"),p=Tt(),f=E(0),h=E(!1),g=n(()=>({...pi,...l.texts})),y=n(()=>l.revealable&&r.value&&!l.loading),q=n(()=>f.value>0),w=n(()=>{if(!y.value||h.value&&!q.value)return l.label}),M=n(()=>y.value&&h.value&&!q.value),B=n(()=>"bullets"===l.mask?"•".repeat(l.bulletCount):g.value.restricted),L=n(()=>["q-obfuscation",{"q-obfuscation--revealable":l.revealable,"q-obfuscation--revealed":y.value,"q-obfuscation--loading":l.loading},l.class])
|
|
834
|
+
X(y,async e=>{e?(h.value=!1,await k(),h.value=!0):h.value=!1},{immediate:!0})
|
|
835
|
+
const D=v({name:"QObfuscationHideAction",props:{track:{type:Boolean,default:!0}},setup:e=>(e.track&&(x(()=>{f.value++}),$(()=>{f.value--})),()=>m(et,{variant:"text",borderless:!0,size:"small",class:"q-obfuscation__label-action",disabled:l.disabled,title:g.value.hideData,"aria-label":g.value.hideData,"aria-expanded":!0,"aria-controls":p.value,"data-testid":"q-obfuscation__hide",onClick:V},()=>m(yt,{...l.icons.hide,class:"q-obfuscation__icon"})))})
|
|
836
|
+
function V(){l.revealable&&!l.loading&&(r.value=!r.value,r.value?a("reveal"):a("hide"))}return(e,t)=>(C(),o(H(Ql),{id:l.id,class:_(L.value),for:l.for??H(p),label:w.value,"label-position":l.labelPosition,size:l.size,readonly:l.readonly,disabled:l.disabled,required:l.required,invalid:l.invalid},u({"label.prepend":J(()=>[S(e.$slots,"label.prepend")]),"label.append":J(()=>[S(e.$slots,"label.append"),M.value?(C(),o(H(D),{key:0,track:!1})):i("",!0)]),control:J(()=>[y.value?(C(),s("div",{key:0,id:H(p),class:"q-obfuscation__content"},[S(e.$slots,"default",{qObfuscationHideAction:H(D),toggle:V,revealed:r.value,loading:l.loading})],8,fi)):(C(),s("div",{key:1,id:H(p),class:"q-field__control q-obfuscation__value"},[l.revealable?S(e.$slots,"reveal",{key:0,revealed:r.value,toggle:V,loading:l.loading},()=>[c(H(et),{variant:"text",borderless:"",block:"",class:"q-obfuscation__action",disabled:l.disabled,loading:l.loading,label:g.value.showData,"aria-expanded":!1,"aria-controls":H(p),"data-testid":"q-obfuscation__reveal",onClick:V},{default:J(()=>[c(H(yt),b(l.icons.show,{class:"q-obfuscation__icon"}),null,16)]),_:1},8,["disabled","loading","label","aria-controls"])]):(C(),s("span",hi,[c(H(yt),b(l.icons.restricted,{class:"q-obfuscation__icon","aria-hidden":"true"}),null,16),S(e.$slots,"mask",{},()=>[d(I(B.value),1)])]))],8,mi))]),_:2},[e.$slots.extras?{name:"extras",fn:J(()=>[S(e.$slots,"extras")]),key:"0"}:void 0]),1032,["id","class","for","label","label-position","size","readonly","disabled","required","invalid"]))}})),yi={show:{icon:"eye"},hide:{icon:"eye-off"}},bi={class:"q-password-field__messages"},ki=/*@__PURE__*/v({__name:"QPasswordFieldMessages",props:{messages:{}},setup(t){const l=t
|
|
837
|
+
return(t,a)=>(C(),s("ul",bi,[(C(!0),s(e,null,V(l.messages,e=>(C(),s("li",{key:e},I(e),1))),128))]))}}),_i={class:"q-password-field__meter"},qi={key:0,class:"q-password-field__meter-score"},wi=/*@__PURE__*/v({inheritAttrs:!1,__name:"QPasswordFieldMeterOverlay",props:/*@__PURE__*/y({id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{},crossOffset:{},placement:{},transition:{},width:{},centerVertically:{type:Boolean},attach:{},inline:{type:Boolean},delay:{},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean},closingFocus:{},returnFocusOnDeactivate:{type:Boolean},messages:{},score:{},levels:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n(()=>{if(!t.levels.length)return void console.warn("Levels array is empty.")
|
|
888
838
|
const e=[...t.levels].sort((e,t)=>(e.threshold??1/0)-(t.threshold??1/0))
|
|
889
839
|
for(const l of e){const e=l.threshold??1/0
|
|
890
840
|
if(t.score<e)return l}return t.levels[t.levels.length-1]})
|
|
891
|
-
return(n,u)=>(C(),o(
|
|
841
|
+
return(n,u)=>(C(),o(H(Da),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=e=>l.value=e),trigger:"manual",anchor:t.anchor,width:"anchor","non-modal":"",placement:"bottom"},{default:J(()=>[r("div",_i,[a.value?(C(),s("div",qi,[c(H(ci),{"model-value":t.score,max:1,color:a.value.color},null,8,["model-value","color"]),r("span",null,I(a.value.label),1)])):i("",!0),e.messages?.length?(C(),o(ki,{key:1,messages:e.messages},null,8,["messages"])):i("",!0)])]),_:1},8,["modelValue","anchor"]))}}),xi=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QPasswordField",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},toggle:{type:Boolean},meter:{type:Boolean},meterLevels:{},rules:{},icons:{default:()=>yi}},{modelValue:{},modelModifiers:{},masked:{type:Boolean,default:!0},maskedModifiers:{}}),emits:["update:modelValue","update:masked"],setup(t){const l=t,a=O(t,"modelValue"),r=O(t,"masked"),d=E(null),v=E(!1),p=n(()=>r.value?"password":"text"),m=n(()=>l.rules?.reduce((e,t)=>e+t.weight,0)),h=n(()=>function(e,t){if(!e||!t)return
|
|
892
842
|
let l=0
|
|
893
843
|
const a=[]
|
|
894
844
|
return t.forEach(t=>{const n=t.test instanceof RegExp?t.test.test(e):t.test(e)
|
|
895
845
|
!0===n?l+=t.weight:"string"==typeof n&&a.push(n)}),{score:m.value?l/m.value:0,messages:a}}(a.value,l.rules))
|
|
896
|
-
function
|
|
897
|
-
return(t,n)=>(C(),o(
|
|
898
|
-
function m(){v.value?.contains(document.activeElement)||(c.value=void 0)}function h(e){return e?a.fields.filter(t=>t.group===e):a.fields}function
|
|
846
|
+
function g(){r.value=!r.value}function y(){v.value=!0}function k(){v.value=!1}return(t,n)=>(C(),s(e,null,[c(H(Rl),b({id:l.id,ref_key:"fieldRef",ref:d,modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),class:l.class,type:p.value,placeholder:l.placeholder,disabled:l.disabled,readonly:l.readonly,required:l.required,label:l.label,size:l.size,invalid:l.invalid||!!h.value?.messages.length},t.$attrs,{onFocusin:y,onFocusout:k}),u({"label.prepend":J(()=>[S(t.$slots,"label.prepend")]),"label.append":J(()=>[S(t.$slots,"label.append")]),_:2},[t.$slots.prepend?{name:"prepend",fn:J(()=>[S(t.$slots,"prepend")]),key:"0"}:void 0,l.toggle?{name:"append",fn:J(()=>[S(t.$slots,"append"),c(H(et),{size:"small",borderless:"","data-testid":"q-password-toggle",disabled:l.disabled,onClick:g},{default:J(()=>[c(H(yt),q(f(r.value?l.icons.show:l.icons.hide)),null,16)]),_:1},8,["disabled"])]),key:"1"}:void 0,t.$slots.extras||l.rules&&!l.meter?{name:"extras",fn:J(()=>[S(t.$slots,"extras",{},()=>[h.value?.messages.length?(C(),o(ki,{key:0,class:"q-password-field__inline-messages",messages:h.value.messages},null,8,["messages"])):i("",!0)])]),key:"2"}:void 0]),1040,["id","modelValue","class","type","placeholder","disabled","readonly","required","label","size","invalid"]),l.meter&&l.meterLevels&&h.value?(C(),o(wi,{key:0,modelValue:v.value,"onUpdate:modelValue":n[1]||(n[1]=e=>v.value=e),score:h.value.score,levels:l.meterLevels,messages:h.value.messages,anchor:d.value?.$el},null,8,["modelValue","score","levels","messages","anchor"])):i("",!0)],64))}})),$i={class:"q-popover__content"},Mi={key:0,class:"q-popover__header"},Bi=["innerHTML"],Ci={key:1},Li=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QPopover",props:/*@__PURE__*/y({id:{},class:{},anchor:{},text:{},title:{},headingLevel:{default:2},arrow:{type:Boolean,default:!0},placement:{default:"right"},attach:{default:"body"},inline:{type:Boolean},html:{type:Boolean,default:!0},disabled:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const l=t,a=O(t,"modelValue"),u=n(()=>l.headingLevel>=1&&l.headingLevel<=6?"h"+l.headingLevel:"div")
|
|
847
|
+
return(t,n)=>(C(),o(H(Da),{id:l.id,modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),class:_(["q-popover",l.class]),trigger:"click",anchor:l.anchor,arrow:l.arrow,attach:l.attach,inline:l.inline,disabled:l.disabled,placement:l.placement},{default:J(()=>[r("div",$i,[l.title||t.$slots.header?(C(),s("div",Mi,[t.$slots.header?S(t.$slots,"header",{key:0}):(C(),s(e,{key:1},[S(t.$slots,"header.prepend"),(C(),o(Q(u.value),{class:"q-popover__title"},{default:J(()=>[d(I(l.title),1)]),_:1})),S(t.$slots,"header.append")],64))])):i("",!0),S(t.$slots,"default",{},()=>[l.text?(C(),s(e,{key:0},[l.html?(C(),s("span",{key:0,innerHTML:l.text},null,8,Bi)):(C(),s("span",Ci,I(l.text),1))],64)):i("",!0)])])]),_:3},8,["id","modelValue","class","anchor","arrow","attach","inline","disabled","placement"]))}})),Di={emptyMessage:"Select a field to view details."},Ei={open:{icon:"minus-box"},close:{icon:"plus-box"}},Vi=["id"],Si={class:"q-property-list__table"},Ai=/*@__PURE__*/v({__name:"QPropertyList",props:{id:{},class:{},fields:{default:()=>[]},groups:{default:()=>[]},panelPosition:{default:"bottom"},block:{type:Boolean},noPanel:{type:Boolean},noToggle:{type:Boolean},readonly:{type:Boolean},icons:{default:()=>Ei},texts:{default:()=>Di}},emits:["field-change","select-field"],setup(t,{emit:l}){const a=t,u=l,d=E(a.groups.map(e=>e.id)),c=E(void 0),v=E(null),p=n(()=>a.groups.length?a.groups.filter(e=>a.fields.some(t=>t.group===e.id)):[{id:"",title:""}]),f=n(()=>["q-property-list",{"q-property-list--side-panel":"right"===a.panelPosition,"q-property-list--block":a.block},a.class])
|
|
848
|
+
function m(){v.value?.contains(document.activeElement)||(c.value=void 0)}function h(e){return e?a.fields.filter(t=>t.group===e):a.fields}function g(e){return[{"q-property-list__row--selected":c.value?.id===e.id}]}function y(e){c.value=e,u("select-field",c.value.id)}return X(()=>a.block,async e=>{await k(),e?v.value?.removeAttribute("style"):function(){if(!v.value)return
|
|
899
849
|
const e=v.value.offsetWidth
|
|
900
|
-
v.value.style.minWidth=`${e}px`}()},{immediate:!0}),(t,l)=>(C(),s("div",{id:a.id,ref_key:"componentRoot",ref:v,tabindex:"0",class:_(f.value),onFocusout:m},[r("table",
|
|
901
|
-
function
|
|
902
|
-
function h(){l.noToggle||(u.value=!u.value,a("click"))}return(e,t)=>(C(),s("tr",{id:l.id,class:_(m.value),role:"group","aria-labelledby":
|
|
903
|
-
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-property-list-panel",t.class])},[t.field?
|
|
850
|
+
v.value.style.minWidth=`${e}px`}()},{immediate:!0}),(t,l)=>(C(),s("div",{id:a.id,ref_key:"componentRoot",ref:v,tabindex:"0",class:_(f.value),onFocusout:m},[r("table",Si,[l[0]||(l[0]=r("thead",{class:"q-property-list__header"},[r("tr",null,[r("th",{colspan:"2"})])],-1)),r("tbody",null,[(C(!0),s(e,null,V(p.value,l=>(C(),s(e,{key:l.id},[l.title?(C(),o(H(Gi),{key:0,"data-key":l.id,title:l.title,icons:a.icons,"no-toggle":a.noToggle,onClick:()=>function(e){const t=d.value.indexOf(e);-1===t?d.value.push(e):d.value.splice(t,1)}(l.id??"")},null,8,["data-key","title","icons","no-toggle","onClick"])):i("",!0),""===l.id||d.value.includes(l.id??"")?(C(!0),s(e,{key:1},V(h(l.id),e=>(C(),o(H(Yi),{key:e.id,class:_(g(e)),field:e,"model-value":e.props.modelValue,readonly:a.readonly,onFocus:y,onFieldChange:t=>function(e,t){a.readonly||e.props.readonly||u("field-change",e,t)}(e,t)},{default:J(()=>[S(t.$slots,e.id,{field:e})]),_:2},1032,["class","field","model-value","readonly","onFieldChange"]))),128)):i("",!0)],64))),128))])]),a.noPanel?i("",!0):(C(),o(H(Ki),{key:0,field:c.value,texts:a.texts},{default:J(()=>[c.value?S(t.$slots,"panel",{key:0,field:c.value}):i("",!0)]),_:3},8,["field","texts"]))],42,Vi))}}),Qi=["id","data-group"],Ti={key:0,class:"q-property-list-field__container"},Ii=/*@__PURE__*/v({__name:"QPropertyListRow",props:/*@__PURE__*/y({id:{},class:{},field:{},readonly:{type:Boolean},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/y(["focus","field-change"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,u=O(e,"modelValue"),d=n(()=>["q-property-list__row",l.class]),v=n(()=>["q-property-list__cell","q-property-list__cell-label"]),p=n(()=>l.readonly||(l.field.props.readonly??!1)),f=n(()=>l.required||!!l.field.props?.required),m=Tt(P(l,"id")),h=n(()=>({id:m.value,...l.field.props,readonly:p.value,required:f.value}))
|
|
851
|
+
function g(){a("focus",l.field)}function y(e){u.value=e,a("field-change",e)}return(e,t)=>(C(),s("tr",{id:l.id,class:_(d.value),"data-group":l.field.group,onFocusin:g},[r("td",{class:_(v.value),onClick:le(g,["prevent","stop"])},[c(H(xl),{for:H(m),label:l.field.label,required:f.value,onClick:t[0]||(t[0]=le(()=>{},["stop"]))},null,8,["for","label","required"])],2),r("td",{class:"q-property-list__cell",onClick:le(g,["prevent","stop"])},[S(e.$slots,"default",{},()=>[l.field.component?(C(),s("div",Ti,[(C(),o(Q(l.field.component),b(h.value,{modelValue:u.value,"onUpdate:modelValue":[t[1]||(t[1]=e=>u.value=e),y]}),null,16,["modelValue"]))])):i("",!0)])])],42,Qi))}}),zi=["id","aria-labelledby"],Pi=["id"],Fi={class:"q-property-list-group__content"},Hi=/*@__PURE__*/v({__name:"QPropertyListGroup",props:{id:{},class:{},title:{},noToggle:{type:Boolean},icons:{default:()=>Ei},texts:{}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,u=E(!0),v=Tt(),p=n(()=>u.value?l.icons.open:l.icons.close),m=n(()=>["q-property-list-group",{"q-property-list-group--no-toggle":l.noToggle},l.class])
|
|
852
|
+
function h(){l.noToggle||(u.value=!u.value,a("click"))}return(e,t)=>(C(),s("tr",{id:l.id,class:_(m.value),role:"group","aria-labelledby":H(v),onClick:h},[r("td",{id:H(v),colspan:"2"},[r("div",Fi,[l.noToggle?i("",!0):(C(),o(H(et),{key:0,variant:"text",onClick:h},{default:J(()=>[c(H(yt),q(f(p.value)),null,16)]),_:1})),d(" "+I(l.title),1)])],8,Pi)],10,zi))}}),Ri=["id"],Ui={class:"q-property-list-panel__label"},Oi={class:"q-property-list-panel__description"},Wi={key:1,class:"q-property-list-panel__empty"},Ni=/*@__PURE__*/v({__name:"QPropertyListPanel",props:{id:{},class:{},field:{},icons:{},texts:{default:()=>Di}},setup(e){const t=e
|
|
853
|
+
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-property-list-panel",t.class])},[t.field?S(e.$slots,"default",{key:0},()=>[r("div",Ui,I(t.field.label),1),r("div",Oi,I(t.field.description),1)]):(C(),s("div",Wi,I(t.texts.emptyMessage),1))],10,Ri))}}),ji=Me(Ai),Yi=Me(Ii),Gi=Me(Hi),Ki=Me(Ni),Xi=["id","checked","name","value","disabled","readonly"],Zi=/*@__PURE__*/v({inheritAttrs:!1,__name:"QRadioButton",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},value:{},name:{},labelPlacement:{default:"end"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean}},setup(e){const t=e,l=Tt(P(t,"id")),a=N("inputEl"),s=he(t.value)
|
|
904
854
|
if(!s)throw new Error("QRadioButton must be used inside a QRadioGroup")
|
|
905
855
|
const d=n(()=>"start"===t.labelPlacement?"append":"prepend"),c=n(()=>["q-radio-button","regular"!==t.size?`q-radio-button--${t.size}`:void 0,"primary"!==t.color?`q-radio-button--${t.color}`:void 0,{"q-radio-button--readonly":t.readonly,"q-radio-button--disabled":t.disabled,"q-radio-button--invalid":t.invalid},t.class])
|
|
906
|
-
function v(e){(t.readonly||t.disabled)&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault()}function p(e){(t.readonly||t.disabled)&&e.preventDefault()}function f(e){t.readonly||t.disabled?e.preventDefault():s?.toggle()}function m(){a.value?.focus()}return(a,n)=>(C(),o(
|
|
907
|
-
|
|
908
|
-
const u=
|
|
909
|
-
return
|
|
910
|
-
let T=null,
|
|
911
|
-
M(()=>{
|
|
912
|
-
const e=
|
|
913
|
-
e&&(T=new ResizeObserver(()=>{
|
|
914
|
-
const
|
|
915
|
-
const e=void 0!==p.value?
|
|
916
|
-
return e?[e]:[]}),
|
|
917
|
-
return a.items?.forEach((t,l)=>{e.set(t.key,l)}),e}),
|
|
918
|
-
function
|
|
919
|
-
const e=
|
|
856
|
+
function v(e){(t.readonly||t.disabled)&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault()}function p(e){(t.readonly||t.disabled)&&e.preventDefault()}function f(e){t.readonly||t.disabled?e.preventDefault():s?.toggle()}function m(){a.value?.focus()}return(a,n)=>(C(),o(H(xl),{for:H(l),class:_(c.value),label:t.label,tabindex:t.disabled?void 0:-1,onMousedown:le(m,["prevent"]),onClick:f},u({[d.value]:J(()=>[r("input",b({id:H(l),ref:"inputEl",checked:H(s).isActive.value,type:"radio",class:"q-radio-button__input",name:t.name,value:e.value,disabled:t.disabled,readonly:t.readonly},a.$attrs,{onChange:n[0]||(n[0]=(...e)=>H(s).toggle&&H(s).toggle(...e)),onClick:le(p,["stop"]),onKeydown:v}),null,16,Xi),"end"===t.labelPlacement?S(a.$slots,"default",{key:0}):i("",!0)]),_:2},["start"===t.labelPlacement?{name:"prepend",fn:J(()=>[S(a.$slots,"default")]),key:"0"}:void 0]),1032,["for","class","label","tabindex"]))}}),Ji=["id"],es={key:1,class:"q-field__extras"},ts=/*@__PURE__*/v({inheritAttrs:!1,__name:"QRadioGroup",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},name:{},orientation:{default:"vertical"},size:{default:"regular"},columns:{default:1},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean},hasFocusOutline:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),{active:a}=me({active:l,required:!0})
|
|
857
|
+
X(a,e=>{l.value=e})
|
|
858
|
+
const u=Tt(P(t,"id")),d=n(()=>t.name?Tt(P(t,"name")).value:u.value),c=n(()=>["q-radio-group",{"q-radio-group--horizontal":"horizontal"===t.orientation,"q-radio-group--focus-style":t.hasFocusOutline},t.class]),v=n(()=>t.columns>1?{"--q-radio-group-columns":t.columns}:{})
|
|
859
|
+
return ve({QRadioButton:{size:P(t,"size"),disabled:P(t,"disabled"),readonly:P(t,"readonly"),invalid:P(t,"invalid"),name:d}}),(e,l)=>(C(),s("div",{class:_(c.value)},[t.label?(C(),o(H(xl),{key:0,for:H(u),label:t.label,required:t.required},null,8,["for","label","required"])):i("",!0),r("div",b({id:H(u),class:["q-radio-group__group",{"q-radio-group--grid":t.columns>1}],role:"radiogroup",style:v.value},e.$attrs),[S(e.$slots,"default")],16,Ji),e.$slots.extras?(C(),s("div",es,[S(e.$slots,"extras")])):i("",!0)],2))}}),ls=Me(Zi),as=Me(ts),ns={...Tl,...Ot,placeholder:"Choose...",showOptions:"Show options"},os={...ke,...Il},is={key:0,ref:"valueContainer",class:"q-select__value-container"},ss={key:1,class:"q-select__multi-value"},rs={key:1,class:"q-select__value"},us={key:1,class:"q-select__placeholder"},ds=["id","tabindex","aria-expanded","aria-keyshortcuts"],cs=["data-key"],vs={key:0,class:"q-select__loader"},ps=/*@__PURE__*/v({inheritAttrs:!1,__name:"QSelect",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},items:{},groups:{default:()=>[]},clearable:{type:Boolean},inline:{type:Boolean},multiple:{type:Boolean},badges:{type:Boolean},loading:{type:Boolean},emptyValue:{},itemValue:{default:"key"},itemLabel:{default:"label"},icons:{default:()=>os},texts:{default:()=>ns}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/y(["before-show","before-hide","show","hide"],["update:modelValue"]),setup(t,{emit:l}){const a=t,v=l,p=O(t,"modelValue"),f=Tt(P(a,"id")),{active:m}=me({active:p,required:P(a,"required"),multiple:P(a,"multiple")}),h=E(!1),g=E(0),y=N("trigger"),w=N("input"),x=N("list"),B=N("content"),L=N("valueContainer"),D=N("allBadges"),A=N("allPlainTexts"),Q=N("hiddenItemsCountBadge")
|
|
860
|
+
let T=null,z=null
|
|
861
|
+
M(()=>{fe()
|
|
862
|
+
const e=y.value?.fieldRef
|
|
863
|
+
e&&(T=new ResizeObserver(()=>{z&&clearTimeout(z),z=setTimeout(()=>{fe()},120)}),T.observe(e))}),$(()=>{T?.disconnect(),z&&clearTimeout(z)})
|
|
864
|
+
const F=n(()=>0===R.value.length),R=n(()=>{if(a.multiple)return(p.value??[]).map(e=>Y(e)).filter(e=>Boolean(e))
|
|
865
|
+
const e=void 0!==p.value?Y(p.value):void 0
|
|
866
|
+
return e?[e]:[]}),U=n(()=>{const e=/* @__PURE__ */new Map
|
|
867
|
+
return a.items?.forEach((t,l)=>{e.set(t.key,l)}),e}),W=n(()=>R.value?.map(K).filter(Boolean).join(", ")),j=n(()=>a.clearable&&!a.readonly&&!a.disabled&&!a.loading&&!F.value)
|
|
868
|
+
function Y(e){return a.items?.find(t=>t[a.itemValue]===e)}function K(e){return e?.[a.itemLabel]??""}function Z(e){return e+1<R.value.length-g.value?", ":""}function te(e){Array.isArray(e)?p.value=e.sort((e,t)=>U.value.get(e)-U.value.get(t)):(p.value=e,ie())}function ae(){te(a.emptyValue),ve()}function ne(e){B.value?.contains(e.relatedTarget)||y.value?.fieldRef?.contains(e.relatedTarget)||ie()}function oe(){h.value||(v("before-show"),h.value=!0)}function ie(){h.value&&(v("before-hide"),h.value=!1)}function se(){a.readonly||a.disabled||(h.value?ie():oe())}function re(e){!e.key||a.readonly||a.disabled||(["Enter"," ","ArrowDown","ArrowUp","Home","End","Delete"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),["Enter"," ","ArrowDown"].includes(e.key)&&oe(),["Escape","Tab"].includes(e.key)&&(h.value?ie():j.value&&"Escape"===e.key&&ae()),j.value&&"Delete"===e.key&&ae())}function ue(e){1===e.key.length&&e.preventDefault(),re(e)}async function de(){await k(),a.loading?B.value?.focus():pe(),v("show")}function ce(){ve(),v("hide")}function ve(){w.value?.focus()}function pe(){x.value?.$el.focus()}async function fe(){if(await k(),await k(),!a.multiple||!L.value||F.value)return void(g.value=0)
|
|
869
|
+
const e=L.value.offsetWidth,t=Q.value?.$el.scrollWidth??30
|
|
920
870
|
let l=t,n=0
|
|
921
|
-
if(a.badges)for(const a of
|
|
871
|
+
if(a.badges)for(const a of D.value??[]){const o=a.$el.scrollWidth+4
|
|
922
872
|
if(!(l+t+o<=e))break
|
|
923
873
|
l+=o,n++}else for(const a of A.value??[]){const o=a.scrollWidth+4
|
|
924
874
|
if(!(l+t+o<=e))break
|
|
925
|
-
l+=o,n++}
|
|
926
|
-
function i(){l.value=!l.value}return(e,n)=>(C(),o(
|
|
875
|
+
l+=o,n++}g.value=(a.badges?D.value?.length??0:A.value?.length??0)-n}return X(()=>a.loading,e=>{!e&&h.value&&k(pe)}),X(()=>a.badges,fe),X(R,fe,{deep:!0}),X(()=>a.clearable,fe),X(m,te),(l,n)=>(C(),s(e,null,[c(H(Ql),{id:H(f),ref:"trigger",label:a.label,"label-position":a.labelPosition,required:a.required,class:_(["q-select",{"q-select--readonly":a.readonly,"q-select--disabled":a.disabled},a.class]),readonly:a.readonly,disabled:a.disabled,"data-loading":a.loading,size:a.size,invalid:a.invalid,onClick:se,onKeydown:re},u({append:J(()=>[S(l.$slots,"append"),j.value?(C(),o(H(zl),{key:0,icons:a.icons,texts:a.texts,onClick:ae},null,8,["icons","texts"])):i("",!0),a.readonly?i("",!0):(C(),o(H(et),{key:1,class:"q-select__chevron","aria-label":a.texts.showOptions,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",disabled:a.disabled,onClick:se},{default:J(()=>[c(H(qt),{"model-value":h.value,icons:a.icons},null,8,["model-value","icons"])]),_:1},8,["aria-label","disabled"]))]),default:J(()=>[F.value?(C(),s("span",us,[a.readonly||a.disabled?i("",!0):(C(),s(e,{key:0},[d(I(a.texts.placeholder),1)],64))])):(C(),s(e,{key:0},[a.badges||a.multiple?(C(),s("span",is,[a.multiple?(C(),s(e,{key:0},[(C(!0),s(e,null,V(R.value,(t,l)=>(C(),s(e,{key:`visible-${l}`},[l<R.value.length-g.value?(C(),s(e,{key:0},[a.badges?(C(),o(H(Kt),{key:0,pill:"",color:a.readonly||a.disabled?"neutral":void 0,disabled:a.readonly||a.disabled,removable:!a.readonly&&!a.disabled&&(!a.required||R.value.length>1),texts:a.texts,"onClick:remove":()=>function(e){a.multiple&&e<p.value.length&&(!a.required||p.value.length>1)?m.value=p.value.toSpliced(e,1):ae()}(l)},{default:J(()=>[t?.icon?(C(),o(H(yt),b({key:0,ref_for:!0},t.icon),null,16)):i("",!0),d(" "+I(K(t)),1)]),_:2},1032,["color","disabled","removable","texts","onClick:remove"])):a.multiple?(C(),s("span",ss,I(K(t)+Z(l)),1)):i("",!0)],64)):i("",!0)],64))),128)),g.value>0?(C(),s(e,{key:0},[c(H(Kt),{ref:"hiddenItemsCountBadge",pill:"",class:_(["q-select__badge-count",{"q-select__badge-count--clickable":a.readonly||a.disabled}])},{default:J(()=>[d(" +"+I(g.value),1)]),_:1},8,["class"]),a.readonly||a.disabled?(C(),o(H(Li),{key:0,anchor:Q.value?.$el,text:W.value,placement:"bottom-start"},{default:J(()=>[d(I(W.value),1)]),_:1},8,["anchor","text"])):i("",!0)],64)):i("",!0),(C(!0),s(e,null,V(R.value,(t,l)=>(C(),s(e,{key:`measure-${l}`},[a.badges?(C(),o(H(Kt),{key:0,ref_for:!0,ref:"allBadges",pill:"",color:a.readonly||a.disabled?"neutral":void 0,disabled:"",class:"q-select__badge-hidden",removable:!a.readonly&&!a.disabled&&(!a.required||R.value.length>1)},{default:J(()=>[t?.icon?(C(),o(H(yt),b({key:0,ref_for:!0},t.icon),null,16)):i("",!0),d(" "+I(K(t)),1)]),_:2},1032,["color","removable"])):a.multiple?(C(),s("span",{key:1,ref_for:!0,ref:"allPlainTexts",class:"q-select__multi-value--hidden"},I(K(t)+Z(l)),513)):i("",!0)],64))),128))],64)):(C(),o(H(Kt),{key:1,pill:"",disabled:a.readonly||a.disabled,removable:!a.readonly&&!a.disabled&&!a.required,texts:a.texts,"onClick:remove":ae},{default:J(()=>[R.value[0]?.icon?(C(),o(H(yt),q(b({key:0},R.value[0].icon)),null,16)):i("",!0),d(" "+I(K(R.value[0])),1)]),_:1},8,["disabled","removable","texts"]))],512)):(C(),s("span",rs,I(W.value),1))],64)),ee(r("input",b({id:`${H(f)}_input`,ref:"input"},l.$attrs,{"onUpdate:modelValue":n[0]||(n[0]=e=>W.value=e),class:"q-select__input",inputmode:"none",type:"text",autocomplete:"off",tabindex:a.disabled?-1:0,role:"combobox","aria-expanded":h.value,"aria-haspopup":"listbox","aria-keyshortcuts":j.value?"Delete":void 0,onKeydown:ue}),null,16,ds),[[G,W.value]])]),_:2},[1===R.value.length&&R.value[0].icon&&!a.badges||l.$slots.prepend?{name:"prepend",fn:J(()=>[S(l.$slots,"prepend"),1===R.value.length&&R.value[0].icon&&!a.badges?(C(),o(H(yt),q(b({key:0},R.value[0].icon)),null,16)):i("",!0)]),key:"0"}:void 0,l.$slots.extras?{name:"extras",fn:J(()=>[S(l.$slots,"extras")]),key:"1"}:void 0]),1032,["id","label","label-position","required","class","readonly","disabled","data-loading","size","invalid"]),c(H(Da),{modelValue:h.value,"onUpdate:modelValue":n[1]||(n[1]=e=>h.value=e),spy:"",trigger:"manual",placement:"bottom-start",width:"anchor","scroll-lock":"",inline:a.inline,anchor:y.value?.fieldRef,offset:2,onEnter:de,onLeave:ce},{default:J(()=>[r("div",{ref:"content","data-testid":"combobox-dropdown","data-key":H(f),class:"q-select__body",tabindex:"-1",onFocusout:ne,onKeydown:le(re,["stop"])},[S(l.$slots,"body.prepend"),a.loading?(C(),s("div",vs,[c(H(Be),{size:24})])):(C(),o(H(na),{key:1,ref:"list",class:"q-select__items",selectable:"",required:a.required,multiple:a.multiple,"model-value":p.value,items:a.items,groups:t.groups,"item-label":a.itemLabel,"item-value":a.itemValue,"onUpdate:modelValue":te},{item:J(({item:e})=>[S(l.$slots,"item",{item:e})]),_:3},8,["required","multiple","model-value","items","groups","item-label","item-value"])),S(l.$slots,"body.append")],40,cs)]),_:3},8,["modelValue","inline","anchor"])],64))}}),fs=Me(ps),ms=Me(/*@__PURE__*/v({__name:"QToggle",props:/*@__PURE__*/y({id:{},class:{},label:{},variant:{},color:{},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},size:{},iconPos:{},pill:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n(()=>["q-toggle",{"q-toggle--active":l.value}])
|
|
876
|
+
function i(){l.value=!l.value}return(e,n)=>(C(),o(H(et),b({class:a.value},t,{"aria-pressed":l.value,onClick:i}),{default:J(()=>[S(e.$slots,"default")]),_:3},16,["class","aria-pressed"]))}})),hs={class:"q-sidebar__items"},gs=/*@__PURE__*/v({__name:"QSidebarAnchor",props:/*@__PURE__*/y({panels:{},anchorWidth:{},showLabels:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/y(["click:item"],["update:modelValue"]),setup(t,{emit:l}){const a=t,n=l,u=O(t,"modelValue"),d=E({height:"0",transform:"translateY(0)",opacity:"0",transition:"transform 0.3s ease, height 0.3s ease, opacity 0.2s ease"}),c=E([])
|
|
927
877
|
function v(){if(!u.value)return void(d.value={...d.value,opacity:"0",height:"0"})
|
|
928
878
|
const e=a.panels?.findIndex(e=>e.id===u.value)??-1
|
|
929
879
|
if(-1===e||!c.value[e])return
|
|
930
880
|
const t=c.value[e].$el||c.value[e]
|
|
931
881
|
if(!t)return
|
|
932
882
|
const l=e===c.value.length-1?t.offsetHeight:t.offsetHeight-1,n=t.offsetTop
|
|
933
|
-
d.value={...d.value,height:`${l}px`,transform:`translateY(${n}px)`,opacity:"1"}}return
|
|
934
|
-
var t}},{default:
|
|
883
|
+
d.value={...d.value,height:`${l}px`,transform:`translateY(${n}px)`,opacity:"1"}}return X(u,()=>k(v),{immediate:!0}),(l,v)=>(C(),s("div",{class:"q-sidebar-anchor",style:w({width:a.anchorWidth+"px"})},[r("div",hs,[r("div",{class:"q-sidebar__indicator",style:w(d.value)},null,4),(C(!0),s(e,null,V(t.panels,e=>(C(),o(H(ms),{key:e.id,ref_for:!0,ref_key:"itemRefs",ref:c,"data-testid":"q-sidebar-panel-button","model-value":u.value===e.id,label:a.showLabels?e.title:void 0,title:a.showLabels?void 0:e.title,"icon-pos":"top",class:"q-sidebar__item",onClick:()=>{return t=e.id,u.value=u.value===t?void 0:t,void n("click:item",t)
|
|
884
|
+
var t}},{default:J(()=>[S(l.$slots,e.id,{item:e},()=>[e.icon?(C(),o(H(yt),b({key:0,ref_for:!0},e.icon),null,16)):i("",!0)])]),_:2},1032,["model-value","label","title","onClick"]))),128))])],4))}}),ys={ref:"panel",class:"q-sidebar-panel"},bs={class:"q-sidebar-panel__header"},ks={key:0,class:"q-sidebar-panel__title"},_s={class:"q-sidebar-panel__content"},qs={key:0,class:"q-sidebar-panel__footer"},ws={key:0,class:"q-sidebar-panel__grip"},xs=/*@__PURE__*/v({__name:"QSidebarPanel",props:{title:{},icon:{},resizable:{type:Boolean},showGrip:{type:Boolean,default:!0},initialWidth:{default:"medium"},minWidth:{default:"small"},maxWidth:{default:"large"},resizePosition:{default:"right"}},emits:["resize","resize:start","resize:end"],setup(e,{emit:t}){const l=e,a=t,n=N("panel"),o=E(!1)
|
|
935
885
|
let u=0,d=0
|
|
936
886
|
function c(e){l.resizable&&(o.value=!0,u=e.clientX,d=n.value.clientWidth,document.addEventListener("mousemove",v),document.addEventListener("mouseup",p),document.body.style.userSelect="none",a("resize:start"))}function v(e){if(!l.resizable||!o.value)return
|
|
937
887
|
const t="right"===l.resizePosition?e.clientX-u:u-e.clientX
|
|
938
|
-
a("resize",d+t)}function p(){l.resizable&&(o.value=!1,a("resize:end",n.value.clientWidth),f())}function f(){l.resizable&&(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",p),document.body.style.userSelect="")}return B(f),(t,a)=>(C(),s("div",
|
|
939
|
-
|
|
940
|
-
const p=n(()=>a.panels?.find(e=>e.id===v.value)),f=n(()=>!!p.value),m=E(),h=n(()=>{if(void 0!==m.value)return f.value?"number"==typeof m.value?`${a.anchorWidth+m.value}px`:`calc(${a.anchorWidth}px + ${m.value})`:`${a.anchorWidth}px`}),
|
|
941
|
-
function b(){r("resize:start")}function k(e){m.value=e,r("resize",e)}function q(){r("resize:end",m.value)}function x(e){r("click:item",e)}function $(){d.value||(v.value=void 0)}return
|
|
942
|
-
m.value="number"==typeof e?e:void 0},{immediate:!0,deep:!0}),(t,n)=>(C(),s("div",{class:_(
|
|
943
|
-
|
|
888
|
+
a("resize",d+t)}function p(){l.resizable&&(o.value=!1,a("resize:end",n.value.clientWidth),f())}function f(){l.resizable&&(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",p),document.body.style.userSelect="")}return B(f),(t,a)=>(C(),s("div",ys,[r("div",bs,[S(t.$slots,"header",{},()=>[S(t.$slots,"header.prepend"),l.title?(C(),s("h3",ks,I(l.title),1)):i("",!0),S(t.$slots,"header.append")])]),r("div",_s,[S(t.$slots,"content")]),t.$slots.footer?(C(),s("div",qs,[S(t.$slots,"footer")])):i("",!0),e.resizable?(C(),s("div",{key:1,class:_(["q-sidebar-panel__handle",`q-sidebar-panel__handle--${e.resizePosition}`]),"data-testid":"q-sidebar-panel-handle",onMousedown:c},[e.showGrip?(C(),s("div",ws)):i("",!0)],34)):i("",!0)],512))}}),$s=Me(/*@__PURE__*/v({__name:"QSidebar",props:/*@__PURE__*/y({panels:{},anchorWidth:{default:50},showLabels:{type:Boolean},position:{default:"left"}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/y(["click:item","resize","resize:start","resize:end"],["update:modelValue"]),setup(e,{emit:t}){const a=e,r=t,d=O(e,"modelValue"),v=E()
|
|
889
|
+
X(d,e=>{e&&(v.value=e)},{immediate:!0})
|
|
890
|
+
const p=n(()=>a.panels?.find(e=>e.id===v.value)),f=n(()=>!!p.value),m=E(),h=n(()=>{if(void 0!==m.value)return f.value?"number"==typeof m.value?`${a.anchorWidth+m.value}px`:`calc(${a.anchorWidth}px + ${m.value})`:`${a.anchorWidth}px`}),g=n(()=>["q-sidebar",`q-sidebar--${p.value?.initialWidth??"small"}`,`q-sidebar--${a.position}`,{"q-sidebar--expanded":f.value,[`q-sidebar--min-${p.value?.minWidth}`]:p.value?.resizable&&void 0!==p.value?.minWidth,[`q-sidebar--max-${p.value?.maxWidth}`]:p.value?.resizable&&void 0!==p.value?.maxWidth}]),y=n(()=>"left"===a.position?"right":"left")
|
|
891
|
+
function b(){r("resize:start")}function k(e){m.value=e,r("resize",e)}function q(){r("resize:end",m.value)}function x(e){r("click:item",e)}function $(){d.value||(v.value=void 0)}return X([()=>a.anchorWidth,p],function(){const e=p.value?.initialWidth
|
|
892
|
+
m.value="number"==typeof e?e:void 0},{immediate:!0,deep:!0}),(t,n)=>(C(),s("div",{class:_(g.value),style:w({width:h.value})},[c(gs,{modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=e=>d.value=e),panels:a.panels,"anchor-width":a.anchorWidth,"show-labels":a.showLabels,"onClick:item":x},u({_:2},[V(a.panels,e=>({name:e.id,fn:J(()=>[S(t.$slots,`anchor:${e.id}`,{item:e})])}))]),1032,["modelValue","panels","anchor-width","show-labels"]),c(l,{name:"left"===e.position?"slide-right":"slide-left",onAfterLeave:$},{default:J(()=>[d.value&&p.value?(C(),o(xs,{key:0,"show-grip":"",title:p.value.title,"initial-width":p.value.initialWidth,"min-width":p.value.minWidth,"max-width":p.value.maxWidth,resizable:p.value.resizable,"resize-position":y.value,"onResize:start":b,onResize:k,"onResize:end":q},u({_:2},[t.$slots[`header.prepend:${d.value}`]?{name:"header.prepend",fn:J(()=>[S(t.$slots,`header.prepend:${d.value}`)]),key:"0"}:void 0,t.$slots[`header:${d.value}`]?{name:"header",fn:J(()=>[S(t.$slots,`header:${d.value}`)]),key:"1"}:void 0,t.$slots[`header.append:${d.value}`]?{name:"header.append",fn:J(()=>[S(t.$slots,`header.append:${d.value}`)]),key:"2"}:void 0,t.$slots[`content:${d.value}`]?{name:"content",fn:J(()=>[S(t.$slots,`content:${d.value}`)]),key:"3"}:void 0,t.$slots[`footer:${d.value}`]?{name:"footer",fn:J(()=>[S(t.$slots,`footer:${d.value}`)]),key:"4"}:void 0]),1032,["title","initial-width","min-width","max-width","resizable","resize-position"])):i("",!0)]),_:3},8,["name"])],6))}})),Ms=Symbol("q-tabs"),Bs=["id"],Cs=["aria-orientation"],Ls={class:"q-tabs__panels"},Ds=/*@__PURE__*/v({__name:"QTabs",props:/*@__PURE__*/y({id:{},class:{},direction:{default:"horizontal"},align:{default:"start"},variant:{default:"line"},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=N("tabListEl"),o=T([]),{active:i}=me({active:l,required:!0})
|
|
893
|
+
X(i,e=>{l.value=e}),ve({QTab:{disabled:P(t,"disabled")}})
|
|
894
|
+
const u=n(()=>["q-tabs",`q-tabs--${t.direction}`,`q-tabs--${t.variant}`,`q-tabs--align-${t.align}`,t.class])
|
|
895
|
+
function d(){return o.value.filter(e=>!H(e.disabled))}function c(){const e=d()
|
|
896
|
+
e.length&&(e.some(e=>e.value===l.value)||(l.value=e[0].value))}return X(()=>o.value.map(e=>[e.value,H(e.disabled)]),()=>c()),L(Ms,{tabListEl:a,direction:n(()=>t.direction),register:function(e){o.value=[...o.value,e],c()},unregister:function(e){o.value=o.value.filter(t=>t.value!==e)},focusAdjacent:function(e,t){const l=d()
|
|
897
|
+
if(!l.length)return
|
|
898
|
+
const a=l.findIndex(t=>t.value===e),n=l[-1===a?0:(a+t+l.length)%l.length]
|
|
899
|
+
n.select(),n.focus()},focusFirst:function(){const e=d()[0]
|
|
900
|
+
e&&(e.select(),e.focus())},focusLast:function(){const e=d(),t=e[e.length-1]
|
|
901
|
+
t&&(t.select(),t.focus())}}),(e,l)=>(C(),s("div",{id:t.id,class:_(u.value)},[r("div",{ref_key:"tabListEl",ref:a,class:"q-tabs__list",role:"tablist","aria-orientation":t.direction},null,8,Cs),r("div",Ls,[S(e.$slots,"default")])],10,Bs))}}),Es={class:"q-tab__title"},Vs={class:"q-tab__title-text"},Ss=["id","aria-labelledby","tabindex"],As=/*@__PURE__*/v({__name:"QTab",props:{id:{},class:{},title:{},required:{type:Boolean},disabled:{type:Boolean},value:{},texts:{default:()=>_e}},setup(l){const a=l,u=h(Ms,void 0)
|
|
902
|
+
if(!u)throw new Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.")
|
|
903
|
+
const d=Tt(P(a,"value")),v=Tt(),p=Tt(),f=he(d)
|
|
904
|
+
if(!f)throw new Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.")
|
|
905
|
+
const m=N("tabBtn"),g=n(()=>u.tabListEl.value),y=n(()=>!!a.disabled),b=n(()=>{if(!y.value)return f.isActive.value?0:-1}),k=n(()=>["q-tab",{"q-tab--active":f.isActive.value,"q-tab--disabled":y.value},a.class])
|
|
906
|
+
function q(){(m.value?.$el)?.focus?.()}function w(){y.value||f?.isActive.value||f?.toggle()}function M(){w()}function B(e){const t="horizontal"===u?.direction.value
|
|
907
|
+
return t&&"ArrowRight"===e.key||!t&&"ArrowDown"===e.key?(e.preventDefault(),void u?.focusAdjacent(d.value,1)):t&&"ArrowLeft"===e.key||!t&&"ArrowUp"===e.key?(e.preventDefault(),void u?.focusAdjacent(d.value,-1)):"Home"===e.key?(e.preventDefault(),void u?.focusFirst()):void("End"===e.key&&(e.preventDefault(),u?.focusLast()))}return x(()=>{u.register({value:d.value,disabled:y,focus:q,select:w})}),$(()=>{u.unregister(d.value)}),(l,n)=>(C(),s(e,null,[g.value?(C(),o(t,{key:0,to:g.value},[c(H(et),{id:H(v),ref:"tabBtn",borderless:"",role:"tab",variant:"text",class:_(k.value),disabled:y.value,"data-value":H(d),"aria-selected":H(f).isActive.value,"aria-controls":H(p),"aria-required":a.required||void 0,tabindex:b.value,onClick:M,onKeydown:B},{default:J(()=>[r("span",Es,[S(l.$slots,"title.prepend"),r("span",Vs,I(a.title),1),a.required?(C(),o(H(xt),{key:0,announce:"",texts:a.texts},null,8,["texts"])):i("",!0),S(l.$slots,"title.append")])]),_:3},8,["id","class","disabled","data-value","aria-selected","aria-controls","aria-required","tabindex"])],8,["to"])):i("",!0),ee(r("div",{id:H(p),class:"q-tabs__panel",role:"tabpanel","aria-labelledby":H(v),tabindex:H(f).isActive.value?0:void 0},[S(l.$slots,"default")],8,Ss),[[K,H(f).isActive.value]])],64))}}),Qs=Me(Ds),Ts=Me(As)
|
|
908
|
+
var Is=["id","required","placeholder","readonly","disabled","maxlength","rows","cols","resize","wrap"],zs=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QTextArea",props:/*@__PURE__*/y({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},rows:{default:3},cols:{},resize:{default:"vertical"},wrap:{default:"soft"},autosize:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n({get:()=>l.value,set:e=>{const a=t.maxLength
|
|
944
909
|
l.value=a?e?.slice(0,a):e}})
|
|
945
|
-
|
|
946
|
-
const i=
|
|
910
|
+
X(l,e=>a.value=e,{immediate:!0})
|
|
911
|
+
const i=Tt(P(t,"id")),s=n(()=>t.readonly||t.disabled?void 0:t.placeholder),d=n(()=>({input:t.autosize?v:null})),c=E(),{triggerResize:v,stop:p}=function(e){const{element:t,styleProp:l="height"}=e,a=()=>{const e=t.value
|
|
947
912
|
if(!e)return
|
|
948
913
|
e.style[l]="auto"
|
|
949
914
|
const a=e.scrollHeight
|
|
950
|
-
e.style[l]=`${a}px`},n=
|
|
915
|
+
e.style[l]=`${a}px`},n=X(t,a),o=X(()=>t.value?.value,a)
|
|
951
916
|
return{triggerResize:a,stop:()=>{n(),o()}}}({element:n(()=>t.autosize?c.value:void 0),styleProp:"minHeight"})
|
|
952
|
-
return $(p),(e,l)=>(C(),o(
|
|
953
|
-
function
|
|
917
|
+
return $(p),(e,l)=>(C(),o(H(Ql),{class:_(["q-text-area",t.class]),for:H(i),label:t.label,"label-position":t.labelPosition,size:t.size,readonly:t.readonly,disabled:t.disabled,required:t.required},u({"label.prepend":J(()=>[S(e.$slots,"label.prepend")]),"label.append":J(()=>[S(e.$slots,"label.append")]),default:J(()=>[ee(r("textarea",b({id:H(i),ref_key:"textareaRef",ref:c,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),class:"q-text-area__input",required:t.required,placeholder:s.value,readonly:t.readonly,disabled:t.disabled,maxlength:t.maxLength,rows:t.rows,cols:t.cols,resize:t.resize,wrap:t.wrap},e.$attrs,z(d.value,!0)),null,16,Is),[[G,a.value]])]),_:2},[e.$slots.prepend?{name:"prepend",fn:J(()=>[S(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:J(()=>[S(e.$slots,"append")]),key:"1"}:void 0,e.$slots.extras?{name:"extras",fn:J(()=>[S(e.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","label-position","size","readonly","disabled","required"]))}})),Ps=Symbol.for("q-toast")
|
|
918
|
+
function Fs(){const{toasts:e}=function(){const e=h(Ps)
|
|
954
919
|
if(!e)throw new Error("useInjectedToast must be used after provideToast")
|
|
955
920
|
return e}()
|
|
956
|
-
return{toasts:e,addToast:function(t,l){const a=
|
|
957
|
-
return e.value.push({id:a,props:t}),a},removeToast:function(t){const l=e.value.findIndex(e=>e.id===t);-1!==l&&e.value.splice(l,1)}}}var
|
|
921
|
+
return{toasts:e,addToast:function(t,l){const a=Tt(l).value
|
|
922
|
+
return e.value.push({id:a,props:t}),a},removeToast:function(t){const l=e.value.findIndex(e=>e.id===t);-1!==l&&e.value.splice(l,1)}}}var Hs=["id"],Rs=Me(/*@__PURE__*/v({__name:"QThemeProvider",props:{id:{},class:{},theme:{}},setup(e){const t=e,{class:l,css:a}=Ge(P(t,"theme")),n=Tt(P(t,"id"))
|
|
958
923
|
let o=null,i=null
|
|
959
|
-
return
|
|
960
|
-
i=e,o=document.getElementById(e),o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=a.value}}),$(()=>{o&&i&&!Array.from(document.querySelectorAll(`.q-theme-provider.${l.value}:not(#${n.value})`)).length&&o.parentNode&&o.parentNode.removeChild(o)}),(e,a)=>(C(),s("div",{id:
|
|
924
|
+
return Z(()=>{if(a.value){const e=l.value
|
|
925
|
+
i=e,o=document.getElementById(e),o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=a.value}}),$(()=>{o&&i&&!Array.from(document.querySelectorAll(`.q-theme-provider.${l.value}:not(#${n.value})`)).length&&o.parentNode&&o.parentNode.removeChild(o)}),(e,a)=>(C(),s("div",{id:H(n),class:_(["q-theme-provider",H(l),t.class])},[S(e.$slots,"default")],10,Hs))}})),Us={close:{icon:"close"}},Os={class:"q-toast__title"},Ws=/*@__PURE__*/v({__name:"QToast",props:{id:{},class:{},title:{},text:{},block:{type:Boolean},color:{default:"info"},elevation:{default:"medium"},variant:{default:"tonal"},timeout:{default:5e3},icons:{default:()=>Us}},emits:["dismiss"],setup(e,{emit:t}){const l=e,a=t,s=Ye(),{isUtilityColor:d,style:v}=Ke(P(l,"color")),p=n(()=>{const e=d.value?`q-toast--${l.color}`:void 0,t=l.block?"q-toast--block":void 0,a=l.title?"q-toast--vertical":void 0
|
|
961
926
|
return["q-toast",`q-toast--${l.variant}`,e,t,a,l.class]}),m=n(()=>{const e=d.value?function(e){const t=s.current.value.scheme
|
|
962
927
|
if(e in t)return t[e]}(l.color):v.value?.mainColor
|
|
963
|
-
if(e)return
|
|
964
|
-
let
|
|
965
|
-
function b(){void 0!==
|
|
928
|
+
if(e)return Ee(ze(Qe(e),88))}),h=n(()=>d.value?{"--q-toast-tonal-color":m.value}:{"--q-toast-main-color":v.value?.mainColor,"--q-toast-on-main-color":v.value?.onMainColor,"--q-toast-hover-color":v.value?.hoverColor,"--q-toast-tonal-color":m.value}),g=n(()=>"bold"===l.variant?"bold":"ghost")
|
|
929
|
+
let y
|
|
930
|
+
function b(){void 0!==y&&window.clearTimeout(y),a("dismiss")}return M(()=>{l.timeout>0&&(y=window.setTimeout(b,l.timeout))}),B(()=>{void 0!==y&&window.clearTimeout(y)}),(e,t)=>(C(),o(H(rt),{id:l.id,elevation:l.elevation,width:l.block?"block":void 0,class:_(p.value),style:w(h.value)},u({default:J(()=>[c(H(Yo),{fluid:"",class:"q-toast__body"},{default:J(()=>[c(H(Go),{align:"center",justify:"between"},{default:J(()=>[c(H(jo),null,{default:J(()=>[S(e.$slots,"default",{},()=>[r("span",null,I(l.text),1)])]),_:3}),l.title?i("",!0):(C(),o(H(jo),{key:0,cols:"auto"},{default:J(()=>[S(e.$slots,"dismiss",{},()=>[c(H(et),{class:"q-toast__dismiss",variant:g.value,color:l.color,onClick:b},{default:J(()=>[c(H(yt),q(f(l.icons.close)),null,16)]),_:1},8,["variant","color"])])]),_:3}))]),_:3})]),_:3})]),_:2},[l.title?{name:"header",fn:J(()=>[c(H(Yo),{fluid:""},{default:J(()=>[c(H(Go),{align:"center",justify:"between"},{default:J(()=>[c(H(jo),null,{default:J(()=>[r("div",Os,[e.$slots["title.prepend"]?S(e.$slots,"title.prepend",{key:0}):i("",!0),r("h4",null,I(l.title),1),e.$slots["title.append"]?S(e.$slots,"title.append",{key:1}):i("",!0)])]),_:3}),c(H(jo),{cols:"auto"},{default:J(()=>[S(e.$slots,"dismiss",{},()=>[c(H(et),{class:"q-toast__dismiss",variant:g.value,color:l.color,onClick:b},{default:J(()=>[c(H(yt),q(f(l.icons.close)),null,16)]),_:1},8,["variant","color"])])]),_:3})]),_:3})]),_:3})]),key:"0"}:void 0]),1032,["id","elevation","width","class","style"]))}}),Ns=/*@__PURE__*/v({__name:"QToaster",props:{id:{},class:{},placement:{default:"top-right"},maxToasts:{},reverseOrder:{type:Boolean}},setup(t){const l=t,{toasts:i,removeToast:r}=Fs(),u=n(()=>{let e=[...i.value]
|
|
966
931
|
return l.reverseOrder&&(e=e.reverse()),e.slice(0,l.maxToasts)})
|
|
967
|
-
return(t,n)=>(C(),o(a,{id:l.id,name:"toast-stack",tag:"div",class:_(["q-toaster",l.class]),"data-placement":l.placement},{default:
|
|
968
|
-
return
|
|
932
|
+
return(t,n)=>(C(),o(a,{id:l.id,name:"toast-stack",tag:"div",class:_(["q-toaster",l.class]),"data-placement":l.placement},{default:J(()=>[(C(!0),s(e,null,V(u.value,e=>(C(),s("div",{key:e.id,class:"q-toast__container"},[c(H(js),b({ref_for:!0},e.props,{onDismiss:()=>H(r)(e.id)}),null,16,["onDismiss"])]))),128))]),_:1},8,["id","class","data-placement"]))}}),js=Me(Ws),Ys=Me(Ns),Gs=/*@__PURE__*/v({__name:"QToggleGroup",props:/*@__PURE__*/y({id:{},class:{},block:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},disabled:{type:Boolean},multiple:{type:Boolean},required:{type:Boolean}},{modelValue:{type:[String,Number,Boolean,Symbol,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),{active:a}=me({active:l,required:P(t,"required"),multiple:P(t,"multiple")})
|
|
933
|
+
return X(a,e=>{l.value=e}),ve({QToggleGroupItem:{disabled:P(t,"disabled"),borderless:P(t,"borderless")}}),(e,l)=>(C(),o(H(Nt),{id:t.id,class:_(t.class),block:t.block,elevated:t.elevated},{default:J(()=>[S(e.$slots,"default")]),_:3},8,["id","class","block","elevated"]))}}),Ks=/*@__PURE__*/v({__name:"QToggleGroupItem",props:{id:{},class:{},label:{},variant:{},color:{},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},size:{},iconPos:{},pill:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},value:{}},setup(e){const t=e,l=he(Tt(P(t,"value")))
|
|
969
934
|
if(!l)throw new Error("QToggleGroupItem: Failed to retrieve group item. Ensure the component is used within a QToggleGroup context.")
|
|
970
|
-
return(e,a)=>(C(),o(
|
|
971
|
-
function u(){return l.anchor?
|
|
972
|
-
function
|
|
935
|
+
return(e,a)=>(C(),o(H(ms),b({"model-value":H(l).isActive.value},t,{"onUpdate:modelValue":H(l).toggle}),{default:J(()=>[S(e.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"]))}}),Xs=Me(Gs),Zs=Me(Ks),Js={class:"q-tooltip__content"},er=["innerHTML"],tr=Me(/*@__PURE__*/v({__name:"QTooltip",props:/*@__PURE__*/y({id:{},class:{},anchor:{},text:{},icon:{},appearance:{default:"inverted"},placement:{default:"right"},arrow:{type:Boolean,default:!0},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},html:{type:Boolean,default:!0},trigger:{default:"hover"},disabled:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const l=t,a=O(t,"modelValue"),n=Tt(P(l,"id"))
|
|
936
|
+
function u(){return l.anchor?Ma(l.anchor):void 0}function v(){u()?.setAttribute("aria-describedby",n.value)}function p(){u()?.removeAttribute("aria-describedby")}return B(function(){l.anchor&&p()}),X(()=>l.anchor,function(e,t){t&&p(),e&&a&&v()}),(t,u)=>(C(),s(e,null,[S(t.$slots,"anchor",{props:{"aria-describedby":H(n)}}),c(H(Da),{id:H(n),modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=e=>a.value=e),anchor:l.anchor,role:"tooltip","non-modal":"",appearance:l.appearance,arrow:l.arrow,attach:l.attach,inline:l.inline,class:_(["q-tooltip",l.class]),delay:l.delay,disabled:l.disabled,placement:l.placement,trigger:l.trigger,onEnter:v,onLeave:p},{default:J(()=>[r("div",Js,[S(t.$slots,"default",{},()=>[l.icon?(C(),o(H(yt),q(b({key:0},l.icon)),null,16)):i("",!0),l.html?(C(),s("span",{key:1,innerHTML:l.text},null,8,er)):(C(),s(e,{key:2},[d(I(l.text),1)],64))])])]),_:3},8,["id","modelValue","anchor","appearance","arrow","attach","inline","class","delay","disabled","placement","trigger"])],64))}})),lr=/* @__PURE__ */ne({DEFAULT_TEXTS:()=>Hl,QAccordion:()=>zt,QAccordionItem:()=>Pt,QAvatar:()=>Rt,QBadge:()=>Kt,QBadgeIndicator:()=>Zt,QButton:()=>et,QButtonGroup:()=>Nt,QCard:()=>rt,QCarousel:()=>gl,QCheckbox:()=>Cl,QCheckboxLabel:()=>Ll,QCol:()=>jo,QCollapsible:()=>Et,QColorPicker:()=>Ol,QCombobox:()=>Qa,QContainer:()=>Yo,QDateTimePicker:()=>jn,QDefaultsProvider:()=>Yn,QDialog:()=>po,QDialogProvider:()=>fo,QDismissibleLayer:()=>ua,QDivider:()=>go,QDropdownMenu:()=>Bo,QField:()=>Ql,QFileUpload:()=>Ho,QFocusWrap:()=>ka,QGroupBox:()=>ei,QIcon:()=>yt,QIconFont:()=>bt,QIconImg:()=>kt,QIconSvg:()=>_t,QInputGroup:()=>oi,QLabel:()=>xl,QLineLoader:()=>si,QList:()=>na,QListItem:()=>oa,QListItemGroup:()=>ia,QMeter:()=>ci,QObfuscation:()=>gi,QOverlay:()=>Da,QPasswordField:()=>xi,QPopover:()=>Li,QPropertyList:()=>ji,QPropertyListGroup:()=>Gi,QPropertyListPanel:()=>Ki,QPropertyListRow:()=>Yi,QRadioButton:()=>ls,QRadioGroup:()=>as,QRow:()=>Go,QSelect:()=>fs,QSidebar:()=>$s,QSkeletonLoader:()=>ll,QSpacer:()=>Ko,QSpinnerLoader:()=>Be,QSwitch:()=>Oa,QTab:()=>Ts,QTabs:()=>Qs,QTextArea:()=>zs,QTextField:()=>Rl,QThemeProvider:()=>Rs,QToast:()=>js,QToaster:()=>Ys,QToggle:()=>ms,QToggleGroup:()=>Xs,QToggleGroupItem:()=>Zs,QTooltip:()=>tr}),ar=/* @__PURE__ */ne({addDays:()=>mn,addMonths:()=>hn,advancePastFormatLiteral:()=>bn,applyMask:()=>Cn,clampDayByMonthYear:()=>_n,clampNumericSegments:()=>qn,completePartialDateInput:()=>ln,convertDatePatternToMask:()=>Wa,darken:()=>Pe,formatDate:()=>cn,formatUsesSeconds:()=>ja,formatUsesTime:()=>Na,getComplementaryColor:()=>Ie,getContrastingColor:()=>Te,getDaysInMonth:()=>sn,getEndOfDay:()=>fn,getFirstDayOfMonth:()=>gn,getFirstDayOfWeek:()=>rn,getLastDayOfMonth:()=>yn,getStartOfDay:()=>pn,hslToRgb:()=>Le,hueToRgb:()=>De,inputIncludesTimePortion:()=>an,isBetween:()=>dn,isLeapYear:()=>on,isSameDay:()=>un,isTimeOnlyFormat:()=>Ga,isValidHex:()=>Se,lighten:()=>ze,mergeColorSchemes:()=>Fe,normalizeNumericToken:()=>kn,padNumber:()=>Ka,parseColor:()=>Qe,parseDate:()=>vn,parseDateWithCompletion:()=>nn,parseIsoDate:()=>Za,rgbToHex:()=>Ee,rgbToHsl:()=>Ce,rgbToVariableString:()=>Ve,tryParseRgb:()=>Ae,uses12HourFormat:()=>Ya})
|
|
937
|
+
function nr(e={}){return{install:t=>{const l=e.components||{}
|
|
973
938
|
for(const e in l)t.component(e,l[e])
|
|
974
939
|
const a=e.defaults||{}
|
|
975
|
-
t.provide(
|
|
940
|
+
t.provide(ce,E(a)),function(e,t){const l=[]
|
|
976
941
|
let a
|
|
977
|
-
if(t)for(const n of t.themes){const e={..."light"===n.mode?
|
|
978
|
-
l.push({name:n.name,mode:n.mode,scheme:e}),n.name===t.defaultTheme&&(a=n.name)}else{const e=[{name:"light",mode:"light",scheme:
|
|
979
|
-
l.push(...e),a="light"}if(a){const t=
|
|
980
|
-
|
|
942
|
+
if(t)for(const n of t.themes){const e={..."light"===n.mode?oe:ie,...n.colors}
|
|
943
|
+
l.push({name:n.name,mode:n.mode,scheme:e}),n.name===t.defaultTheme&&(a=n.name)}else{const e=[{name:"light",mode:"light",scheme:oe},{name:"dark",mode:"dark",scheme:ie}]
|
|
944
|
+
l.push(...e),a="light"}if(a){const t=We(E(a),E(l))
|
|
945
|
+
Ue(l),X(t.class,or,{immediate:!0}),e.provide(je,t)}}(t,e.themes)
|
|
981
946
|
const n=function(){const e=E([])
|
|
982
947
|
return{layers:e,register:function(t){e.value.push(t)},unregister:function(t){const l=e.value.indexOf(t);-1!==l&&e.value.splice(l,1)},isTop:function(t){return e.value[e.value.length-1]===t}}}()
|
|
983
|
-
t.provide(
|
|
984
|
-
e.provide(
|
|
985
|
-
t.className=Array.from(t.classList).filter(e=>!e.startsWith("q-theme")).join(" "),t.classList.add(e)}var
|
|
986
|
-
export{
|
|
948
|
+
t.provide(sa,n),function(e){const t={toasts:E([])}
|
|
949
|
+
e.provide(Ps,t)}(t)}}}function or(e){const t=document.documentElement
|
|
950
|
+
t.className=Array.from(t.classList).filter(e=>!e.startsWith("q-theme")).join(" "),t.classList.add(e)}var ir=(e={})=>nr({components:lr,...e})
|
|
951
|
+
export{lr as components,ir as createFramework,Ge as provideTheme,se as templates,co as useDialog,Ye as useTheme,Fs as useToast,ar as utils}
|