@kong-ui-public/app-layout 5.0.2-pr.3869.e876c8c8a.0 → 5.0.2

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.
Files changed (40) hide show
  1. package/dist/app-layout.es.js +2614 -0
  2. package/dist/app-layout.umd.js +3 -0
  3. package/dist/style.css +1 -0
  4. package/dist/types/components/AppLayout.vue.d.ts +134 -0
  5. package/dist/types/components/AppLayout.vue.d.ts.map +1 -0
  6. package/dist/types/components/aboutSection/AppAboutSection.vue.d.ts +37 -0
  7. package/dist/types/components/aboutSection/AppAboutSection.vue.d.ts.map +1 -0
  8. package/dist/types/components/errors/AppError.vue.d.ts +14 -0
  9. package/dist/types/components/errors/AppError.vue.d.ts.map +1 -0
  10. package/dist/types/components/gradientBadge/GradientBadge.vue.d.ts +35 -0
  11. package/dist/types/components/gradientBadge/GradientBadge.vue.d.ts.map +1 -0
  12. package/dist/types/components/icons/BananaSplit.vue.d.ts +4 -0
  13. package/dist/types/components/icons/BananaSplit.vue.d.ts.map +1 -0
  14. package/dist/types/components/navbar/AccountDropdown.vue.d.ts +51 -0
  15. package/dist/types/components/navbar/AccountDropdown.vue.d.ts.map +1 -0
  16. package/dist/types/components/navbar/AppNavbar.vue.d.ts +54 -0
  17. package/dist/types/components/navbar/AppNavbar.vue.d.ts.map +1 -0
  18. package/dist/types/components/pageHeader/AppPageHeader.vue.d.ts +30 -0
  19. package/dist/types/components/pageHeader/AppPageHeader.vue.d.ts.map +1 -0
  20. package/dist/types/components/pageInfoSection/AppPageInfoSection.vue.d.ts +61 -0
  21. package/dist/types/components/pageInfoSection/AppPageInfoSection.vue.d.ts.map +1 -0
  22. package/dist/types/components/sidebar/AppSidebar.vue.d.ts +165 -0
  23. package/dist/types/components/sidebar/AppSidebar.vue.d.ts.map +1 -0
  24. package/dist/types/components/sidebar/ItemBadge.vue.d.ts +18 -0
  25. package/dist/types/components/sidebar/ItemBadge.vue.d.ts.map +1 -0
  26. package/dist/types/components/sidebar/SidebarItem.vue.d.ts +44 -0
  27. package/dist/types/components/sidebar/SidebarItem.vue.d.ts.map +1 -0
  28. package/dist/types/components/sidebar/SidebarToggle.vue.d.ts +20 -0
  29. package/dist/types/components/sidebar/SidebarToggle.vue.d.ts.map +1 -0
  30. package/dist/types/composables/index.d.ts +2 -0
  31. package/dist/types/composables/index.d.ts.map +1 -0
  32. package/dist/types/composables/useDebounce.d.ts +4 -0
  33. package/dist/types/composables/useDebounce.d.ts.map +1 -0
  34. package/dist/types/index.d.ts +21 -0
  35. package/dist/types/index.d.ts.map +1 -0
  36. package/dist/types/types/index.d.ts +2 -0
  37. package/dist/types/types/index.d.ts.map +1 -0
  38. package/dist/types/types/sidebar.d.ts +39 -0
  39. package/dist/types/types/sidebar.d.ts.map +1 -0
  40. package/package.json +1 -1
@@ -0,0 +1,2614 @@
1
+ import { defineComponent as ae, resolveComponent as ke, openBlock as p, createBlock as Z, withCtx as L, renderSlot as O, createElementBlock as T, Fragment as Ee, renderList as we, normalizeClass as te, createTextVNode as Me, toDisplayString as V, computed as C, createSlots as Ye, createVNode as Qe, createCommentVNode as F, createElementVNode as I, createStaticVNode as An, useCssVars as St, useSlots as rt, reactive as qe, onMounted as je, getCurrentInstance as ta, getCurrentScope as Nn, hasInjectionContext as aa, inject as Fn, watch as Fe, shallowRef as Xe, watchEffect as na, toValue as Ae, unref as be, resolveDynamicComponent as Ne, withKeys as Dn, ref as ee, onUnmounted as Rn, Comment as xn, cloneVNode as Pn, nextTick as zt, onBeforeUnmount as ra, withModifiers as Ln, toRef as Bn } from "vue";
2
+ import { ChevronRightIcon as ia, ChevronDownIcon as Mn } from "@kong/icons";
3
+ import { KButton as jn, HeaderTags as Kn } from "@kong/kongponents";
4
+ const Zn = /* @__PURE__ */ ae({
5
+ __name: "AccountDropdown",
6
+ props: {
7
+ options: {
8
+ type: Array,
9
+ required: !0
10
+ },
11
+ width: {
12
+ type: String,
13
+ default: "240"
14
+ },
15
+ userInitials: {
16
+ type: String,
17
+ required: !0,
18
+ // Important: default to a string with a single empty space to force the dropdown to always be visible
19
+ default: " "
20
+ }
21
+ },
22
+ setup(a) {
23
+ return (e, r) => {
24
+ const n = ke("KDropdownItem"), s = ke("KDropdown");
25
+ return p(), Z(s, {
26
+ class: "account-dropdown",
27
+ "kpop-attributes": { placement: "bottom-end" },
28
+ "trigger-text": a.userInitials,
29
+ width: a.width
30
+ }, {
31
+ items: L(({ handleSelection: c }) => [
32
+ O(e.$slots, "default", {}, () => [
33
+ (p(!0), T(Ee, null, we(a.options, (i) => (p(), Z(n, {
34
+ key: i.value,
35
+ class: te({ "has-divider": i.hasDivider }),
36
+ "data-testid": "select-" + i.value,
37
+ "has-divider": i.hasDivider,
38
+ onClick: (v) => c(i)
39
+ }, {
40
+ default: L(() => [
41
+ O(e.$slots, "default", { option: i }, () => [
42
+ Me(V(i.label), 1)
43
+ ], !0)
44
+ ]),
45
+ _: 2
46
+ }, 1032, ["class", "data-testid", "has-divider", "onClick"]))), 128))
47
+ ], !0)
48
+ ]),
49
+ _: 3
50
+ }, 8, ["trigger-text", "width"]);
51
+ };
52
+ }
53
+ }), oe = (a, e) => {
54
+ const r = a.__vccOpts || a;
55
+ for (const [n, s] of e)
56
+ r[n] = s;
57
+ return r;
58
+ }, go = /* @__PURE__ */ oe(Zn, [["__scopeId", "data-v-740b4c70"]]), Hn = {
59
+ class: "about-section-title",
60
+ "data-testid": "about-section-title"
61
+ }, Wn = { class: "about-section-header-end" }, Gn = {
62
+ key: 0,
63
+ class: "about-section-timestamps-created",
64
+ "data-testid": "about-section-timestamps-created"
65
+ }, zn = {
66
+ key: 1,
67
+ class: "about-section-timestamps-arrow"
68
+ }, Un = {
69
+ key: 2,
70
+ class: "about-section-timestamps-modified",
71
+ "data-testid": "about-section-timestamps-modified"
72
+ }, Vn = {
73
+ key: 1,
74
+ class: "about-section-actions",
75
+ "data-testid": "about-section-actions"
76
+ }, qn = {
77
+ key: 0,
78
+ "data-testid": "about-section-loading-skeleton"
79
+ }, Xn = { key: 1 }, Yn = {
80
+ key: 0,
81
+ class: "about-section-description",
82
+ "data-testid": "about-section-description"
83
+ }, Qn = {
84
+ key: 1,
85
+ class: "about-section-content",
86
+ "data-testid": "about-section-content"
87
+ }, Jn = {
88
+ key: 2,
89
+ "data-testid": "about-divider-section-separator"
90
+ }, er = {
91
+ key: 3,
92
+ class: "about-divider-section",
93
+ "data-testid": "about-divider-section"
94
+ }, tr = /* @__PURE__ */ ae({
95
+ __name: "AppAboutSection",
96
+ props: {
97
+ title: { default: "" },
98
+ description: { default: "" },
99
+ created: { default: "" },
100
+ createdLabel: { default: "Created" },
101
+ modified: { default: "" },
102
+ modifiedLabel: { default: "Modified" },
103
+ isLoading: { type: Boolean, default: !1 }
104
+ },
105
+ setup(a) {
106
+ const e = a, r = C(() => !!e.modified && e.modified !== e.created);
107
+ return (n, s) => {
108
+ const c = ke("KSkeletonBox"), i = ke("KCard");
109
+ return p(), Z(i, {
110
+ class: "kong-ui-app-about-section",
111
+ "title-tag": "h2"
112
+ }, Ye({
113
+ default: L(() => [
114
+ a.isLoading ? (p(), T("div", qn, [
115
+ Qe(c, {
116
+ height: "2",
117
+ width: "100"
118
+ }),
119
+ Qe(c, {
120
+ height: "2",
121
+ width: "100"
122
+ })
123
+ ])) : (p(), T("div", Xn, [
124
+ a.description ? (p(), T("p", Yn, V(a.description), 1)) : F("", !0),
125
+ n.$slots.default ? (p(), T("div", Qn, [
126
+ O(n.$slots, "default", {}, void 0, !0)
127
+ ])) : F("", !0),
128
+ n.$slots["divider-section"] ? (p(), T("hr", Jn)) : F("", !0),
129
+ n.$slots["divider-section"] ? (p(), T("div", er, [
130
+ O(n.$slots, "divider-section", {}, void 0, !0)
131
+ ])) : F("", !0)
132
+ ]))
133
+ ]),
134
+ _: 2
135
+ }, [
136
+ n.$slots.title || a.title ? {
137
+ name: "title",
138
+ fn: L(() => [
139
+ I("span", Hn, [
140
+ O(n.$slots, "title", {}, () => [
141
+ Me(V(a.title), 1)
142
+ ], !0)
143
+ ])
144
+ ]),
145
+ key: "0"
146
+ } : void 0,
147
+ n.$slots.actions || a.created || a.modified ? {
148
+ name: "actions",
149
+ fn: L(() => [
150
+ I("div", Wn, [
151
+ a.created || a.modified ? (p(), T("div", {
152
+ key: 0,
153
+ class: te(["about-section-timestamps", { "has-actions": n.$slots.actions }])
154
+ }, [
155
+ a.created ? (p(), T("span", Gn, V(a.createdLabel) + ": " + V(a.created), 1)) : F("", !0),
156
+ a.created && r.value ? (p(), T("span", zn, "->")) : F("", !0),
157
+ r.value ? (p(), T("span", Un, V(a.modifiedLabel) + ": " + V(a.modified), 1)) : F("", !0)
158
+ ], 2)) : F("", !0),
159
+ n.$slots.actions ? (p(), T("div", Vn, [
160
+ O(n.$slots, "actions", {}, void 0, !0)
161
+ ])) : F("", !0)
162
+ ])
163
+ ]),
164
+ key: "1"
165
+ } : void 0
166
+ ]), 1024);
167
+ };
168
+ }
169
+ }), yo = /* @__PURE__ */ oe(tr, [["__scopeId", "data-v-90b5a21c"]]), ar = "#ffffff", nr = "#0044f4", rr = "#0d0e14", ir = "#0d0e14", or = "#ffffff", sr = "0px", lr = "4px", cr = "640px", ur = "16px", dr = "#bee2ff", fr = {
170
+ fill: "none",
171
+ height: "130",
172
+ width: "130",
173
+ xmlns: "http://www.w3.org/2000/svg"
174
+ }, vr = ["stroke"], br = /* @__PURE__ */ ae({
175
+ __name: "BananaSplit",
176
+ setup(a) {
177
+ const e = C(() => `var(--kui-color-background-accent, ${nr})`);
178
+ return (r, n) => (p(), T("svg", fr, [
179
+ n[1] || (n[1] = I("path", {
180
+ "clip-rule": "evenodd",
181
+ d: "M19.111 120.198c-.226 0-.409-.164-.409-.368v-4.812c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.165-.409-.368v-4.812c0-.204.183-.368.409-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.164-.409-.367V66.89c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368V47.64c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.164-.409-.368v-4.812c0-.204.183-.368.409-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.369v-4.812c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.165-.409-.368V9.138c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368ZM110.889 120.198c-.225 0-.408-.164-.408-.368v-4.812c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.165-.408-.368v-4.812c0-.204.183-.368.408-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.164-.408-.367V66.89c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368V47.64c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.164-.408-.368v-4.812c0-.204.183-.368.408-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.369v-4.812c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.165-.408-.368V9.138c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Z",
182
+ fill: "#D6D6D6",
183
+ "fill-rule": "evenodd"
184
+ }, null, -1)),
185
+ n[2] || (n[2] = I("path", {
186
+ "clip-rule": "evenodd",
187
+ d: "M123.553 107.758a.399.399 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.399.399 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408H87.69a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.135 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408H37.01a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.067a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.067c.215 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408H6.603a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409ZM123.553 21.434a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.399.399 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409H87.69a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.135 0a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409H37.01a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.387.409H6.603a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Z",
188
+ fill: "#D6D6D6",
189
+ "fill-rule": "evenodd"
190
+ }, null, -1)),
191
+ n[3] || (n[3] = I("circle", {
192
+ cx: "65",
193
+ cy: "65",
194
+ opacity: ".5",
195
+ r: "64",
196
+ stroke: "#B6B6BD",
197
+ "stroke-dasharray": "5.69 5.69",
198
+ "stroke-linecap": "round",
199
+ "stroke-width": ".854"
200
+ }, null, -1)),
201
+ I("g", {
202
+ "clip-path": "url(#a)",
203
+ stroke: e.value,
204
+ "stroke-miterlimit": "10",
205
+ "stroke-width": "1.42"
206
+ }, [...n[0] || (n[0] = [
207
+ An('<path d="m33.523 104.868-5.72-.695a1.214 1.214 0 0 1-.766-.386 1.182 1.182 0 0 1-.312-.788v-7.448c0-.095.038-.186.106-.253a.365.365 0 0 1 .256-.104l5.254-.263M61.471 22.733a1.761 1.761 0 0 1 1.45.235 49.628 49.628 0 0 1 15.613 17.6 48.797 48.797 0 0 1 5.65 22.702 47.236 47.236 0 0 1-.333 5.325 41.34 41.34 0 0 0-12.501-.441 48.503 48.503 0 0 0-1.813-23.734 49.117 49.117 0 0 0-12.91-20.119c1.602-.591 3.223-1.136 4.844-1.568Z"></path><path d="M71.35 68.154a39.493 39.493 0 0 0-10.813 3.757 51.298 51.298 0 0 0 3.251-18.062c0-9.392-4.939-19.179-9.783-27.237-.257-.432 0-1.616 2.642-2.32"></path><path d="M56.236 78.58a13.605 13.605 0 0 0-4.29-9.289 14.017 14.017 0 0 0-9.622-3.786 9.617 9.617 0 0 1-6.456-2.446 9.341 9.341 0 0 1-3.079-6.1l-.286-4.256c3.09 0 9.46 4.105 13.216 4.866 3.757.76 8.21.253 11.862 3.437a13.303 13.303 0 0 1 4.357 6.575"></path><path d="M68.594 75.442c-3.432 6.95-7.914 11.59-14.303 16.033a47.076 47.076 0 0 1-21.702 8.058v-4.696c11.642-4.809 22.208-11.806 27.948-22.88"></path><path d="M76.499 84.815a46.939 46.939 0 0 1-17.392 14.511 50.925 50.925 0 0 1-22.885 5.457c-2.317 0-3.662.47-3.662-.695v-4.555"></path><path d="M83.85 68.595c22.304 16.22 4.044 39.25-19.652 37.663.954-.939 29.95-22.222-3.661-34.3"></path><path d="M84.184 58.47c13.607 0 25.746 26.242 17.383 30.995-1.182-17.508-17.716-20.87-17.716-20.87"></path>', 7)
208
+ ])], 8, vr),
209
+ n[4] || (n[4] = I("defs", null, [
210
+ I("clipPath", { id: "a" }, [
211
+ I("path", {
212
+ d: "M0 0h79v85H0z",
213
+ fill: "#fff",
214
+ transform: "translate(26 22)"
215
+ })
216
+ ])
217
+ ], -1))
218
+ ]));
219
+ }
220
+ }), pr = { class: "kong-ui-app-error" }, hr = { class: "banana-icon" }, mr = { class: "kong-ui-app-error-content" }, gr = /* @__PURE__ */ ae({
221
+ __name: "AppError",
222
+ setup(a) {
223
+ return (e, r) => (p(), T("section", pr, [
224
+ I("div", hr, [
225
+ Qe(br)
226
+ ]),
227
+ I("div", mr, [
228
+ O(e.$slots, "default", {}, () => [
229
+ r[0] || (r[0] = I("h2", null, "An unexpected error has occurred", -1)),
230
+ r[1] || (r[1] = I("p", null, [
231
+ Me("Go back to the previous page or "),
232
+ I("a", { href: "/" }, "return home"),
233
+ Me(".")
234
+ ], -1))
235
+ ], !0)
236
+ ])
237
+ ]));
238
+ }
239
+ }), wo = /* @__PURE__ */ oe(gr, [["__scopeId", "data-v-b083aa95"]]), yr = { class: "kong-ui-app-navbar" }, wr = { class: "header-content" }, kr = { class: "mobile-header-left" }, Sr = {
240
+ key: 0,
241
+ class: "app-navbar-logo"
242
+ }, Tr = { class: "navbar-content" }, Ir = { class: "navbar-content-left" }, Cr = { class: "navbar-content-center" }, _r = { class: "navbar-content-right" }, Or = /* @__PURE__ */ ae({
243
+ __name: "AppNavbar",
244
+ props: {
245
+ topOffset: {
246
+ type: Number,
247
+ default: 0
248
+ },
249
+ leftOffset: {
250
+ type: Number,
251
+ default: 240
252
+ // Defaults to the width of AppSidebar.vue
253
+ },
254
+ zIndex: {
255
+ type: Number,
256
+ default: 3
257
+ }
258
+ },
259
+ setup(a) {
260
+ St((i) => ({
261
+ v4b7bbbb4: c.value.top,
262
+ v1c1e69b9: c.value.zIndex,
263
+ v23f7f188: c.value.left,
264
+ v72a8a150: s.marginRight,
265
+ v0b2fff88: s.width
266
+ }));
267
+ const e = a, r = rt(), n = C(() => !!r.logo), s = qe({
268
+ marginRight: "0",
269
+ width: "0"
270
+ });
271
+ je(() => {
272
+ document?.querySelector(".kong-ui-app-navbar .app-navbar-logo")?.children?.length ? (s.marginRight = "32px", s.width = "calc(240px - 32px)") : (s.marginRight = "0", s.width = "0");
273
+ });
274
+ const c = C(() => ({
275
+ top: e.topOffset ? `${e.topOffset}px` : "0",
276
+ left: e.leftOffset ? `${e.leftOffset}px` : "0",
277
+ zIndex: e.zIndex
278
+ }));
279
+ return (i, v) => (p(), T("header", yr, [
280
+ I("div", wr, [
281
+ I("div", kr, [
282
+ O(i.$slots, "mobile-sidebar-toggle"),
283
+ O(i.$slots, "mobile-logo")
284
+ ]),
285
+ n.value ? (p(), T("div", Sr, [
286
+ O(i.$slots, "logo")
287
+ ])) : F("", !0),
288
+ I("div", Tr, [
289
+ I("div", Ir, [
290
+ O(i.$slots, "left")
291
+ ]),
292
+ I("div", Cr, [
293
+ O(i.$slots, "center")
294
+ ]),
295
+ I("div", _r, [
296
+ O(i.$slots, "right")
297
+ ])
298
+ ])
299
+ ])
300
+ ]));
301
+ }
302
+ }), $r = /* @__PURE__ */ oe(Or, [["__scopeId", "data-v-537ba5e0"]]), ht = /* @__PURE__ */ new WeakMap(), Er = /* @__NO_SIDE_EFFECTS__ */ (...a) => {
303
+ var e;
304
+ const r = a[0], n = (e = ta()) === null || e === void 0 ? void 0 : e.proxy, s = n ?? Nn();
305
+ if (s == null && !aa()) throw new Error("injectLocal must be called in setup");
306
+ return s && ht.has(s) && r in ht.get(s) ? ht.get(s)[r] : Fn(...a);
307
+ }, Ar = typeof window < "u" && typeof document < "u";
308
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
309
+ const Nr = Object.prototype.toString, Fr = (a) => Nr.call(a) === "[object Object]";
310
+ function Ut(a) {
311
+ return a.endsWith("rem") ? Number.parseFloat(a) * 16 : Number.parseFloat(a);
312
+ }
313
+ function mt(a) {
314
+ return Array.isArray(a) ? a : [a];
315
+ }
316
+ function Dr(a, e, r) {
317
+ return Fe(a, e, {
318
+ ...r,
319
+ immediate: !0
320
+ });
321
+ }
322
+ const oa = Ar ? window : void 0;
323
+ function Rr(a) {
324
+ var e;
325
+ const r = Ae(a);
326
+ return (e = r?.$el) !== null && e !== void 0 ? e : r;
327
+ }
328
+ function xr(...a) {
329
+ const e = (n, s, c, i) => (n.addEventListener(s, c, i), () => n.removeEventListener(s, c, i)), r = C(() => {
330
+ const n = mt(Ae(a[0])).filter((s) => s != null);
331
+ return n.every((s) => typeof s != "string") ? n : void 0;
332
+ });
333
+ return Dr(() => {
334
+ var n, s;
335
+ return [
336
+ (n = (s = r.value) === null || s === void 0 ? void 0 : s.map((c) => Rr(c))) !== null && n !== void 0 ? n : [oa].filter((c) => c != null),
337
+ mt(Ae(r.value ? a[1] : a[0])),
338
+ mt(be(r.value ? a[2] : a[1])),
339
+ Ae(r.value ? a[3] : a[2])
340
+ ];
341
+ }, ([n, s, c, i], v, g) => {
342
+ if (!n?.length || !s?.length || !c?.length) return;
343
+ const D = Fr(i) ? { ...i } : i, $ = n.flatMap((A) => s.flatMap((P) => c.map((B) => e(A, P, B, D))));
344
+ g(() => {
345
+ $.forEach((A) => A());
346
+ });
347
+ }, { flush: "post" });
348
+ }
349
+ // @__NO_SIDE_EFFECTS__
350
+ function Pr() {
351
+ const a = Xe(!1), e = ta();
352
+ return e && je(() => {
353
+ a.value = !0;
354
+ }, e), a;
355
+ }
356
+ // @__NO_SIDE_EFFECTS__
357
+ function Lr(a) {
358
+ const e = /* @__PURE__ */ Pr();
359
+ return C(() => (e.value, !!a()));
360
+ }
361
+ const Br = /* @__PURE__ */ Symbol("vueuse-ssr-width");
362
+ // @__NO_SIDE_EFFECTS__
363
+ function Mr() {
364
+ const a = aa() ? /* @__PURE__ */ Er(Br, null) : null;
365
+ return typeof a == "number" ? a : void 0;
366
+ }
367
+ function jr(a, e = {}) {
368
+ const { window: r = oa, ssrWidth: n = /* @__PURE__ */ Mr() } = e, s = /* @__PURE__ */ Lr(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), c = Xe(typeof n == "number"), i = Xe(), v = Xe(!1), g = (D) => {
369
+ v.value = D.matches;
370
+ };
371
+ return na(() => {
372
+ if (c.value) {
373
+ c.value = !s.value;
374
+ const D = Ae(a).split(",");
375
+ v.value = D.some(($) => {
376
+ const A = $.includes("not all"), P = $.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), B = $.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
377
+ let E = !!(P || B);
378
+ return P && E && (E = n >= Ut(P[1])), B && E && (E = n <= Ut(B[1])), A ? !E : E;
379
+ });
380
+ return;
381
+ }
382
+ s.value && (i.value = r.matchMedia(Ae(a)), v.value = i.value.matches);
383
+ }), xr(i, "change", g, { passive: !0 }), C(() => v.value);
384
+ }
385
+ const Kr = ["title"], gt = 99, Zr = /* @__PURE__ */ ae({
386
+ __name: "ItemBadge",
387
+ props: {
388
+ count: {
389
+ type: Number,
390
+ required: !0,
391
+ default: void 0
392
+ }
393
+ },
394
+ setup(a) {
395
+ const e = a, r = C(() => e.count ? e.count > gt ? `${gt}+` : e.count.toString() : "");
396
+ return (n, s) => r.value ? (p(), T("div", {
397
+ key: 0,
398
+ class: "item-badge",
399
+ title: (a.count || 0) > gt ? String(a.count) : void 0
400
+ }, V(r.value), 9, Kr)) : F("", !0);
401
+ }
402
+ }), Hr = /* @__PURE__ */ oe(Zr, [["__scopeId", "data-v-a0c9b043"]]), Wr = ["data-testid"], Gr = ["aria-controls", "aria-current", "aria-expanded", "href", "target", "onClick", "onKeypress"], zr = {
403
+ key: 0,
404
+ class: "sidebar-item-icon"
405
+ }, Ur = { class: "sidebar-item-name-container" }, Vr = { class: "sidebar-item-name has-tooltip" }, qr = {
406
+ key: 2,
407
+ class: "sidebar-item-label truncate-text truncate-18"
408
+ }, Xr = {
409
+ key: 1,
410
+ class: "sidebar-item-after"
411
+ }, Yr = ["id"], Qr = /* @__PURE__ */ ae({
412
+ __name: "SidebarItem",
413
+ props: {
414
+ item: {
415
+ type: Object,
416
+ required: !0
417
+ },
418
+ /** True if the item is not an L1 primary sidebar item */
419
+ subnavItem: {
420
+ type: Boolean,
421
+ default: !1
422
+ }
423
+ },
424
+ emits: ["click"],
425
+ setup(a, { emit: e }) {
426
+ const r = e, n = a, s = rt(), c = C(() => typeof n.item.to != "string" ? !1 : !!n.item.newWindow || !!n.item.external || n.item.to.startsWith("http")), i = C(() => !n.item.to || typeof n.item.to != "string" || !n.item.newWindow ? !1 : n.item.newWindow && (n.item.to.startsWith("http") || n.item.to.startsWith("/"))), v = C(
427
+ () => n.subnavItem && // item has non-zero badgeCount OR
428
+ n.item.badgeCount !== void 0 && n.item.badgeCount !== 0 || // slot content for the badge
429
+ !!s[`sidebar-after-${n.item.key}`]
430
+ ), g = ($) => {
431
+ r("click", $);
432
+ }, D = ($, A, P) => {
433
+ g(A), typeof P == "function" && ($.preventDefault(), P());
434
+ };
435
+ return ($, A) => {
436
+ const P = ke("KTooltip"), B = ke("SidebarItem", !0);
437
+ return p(), T("li", {
438
+ class: te([a.subnavItem ? "sidebar-item-secondary" : "sidebar-item-primary", { expanded: a.item.expanded }, { active: a.item.active }]),
439
+ "data-testid": a.item.testId ? `sidebar-item-${a.item.testId}` : void 0
440
+ }, [
441
+ (p(), Z(Ne(c.value ? "div" : "router-link"), {
442
+ custom: c.value ? void 0 : !0,
443
+ to: !c.value && !i.value ? a.item.to : void 0
444
+ }, {
445
+ default: L((E) => [
446
+ I("a", {
447
+ "aria-controls": a.item.items?.length && a.item.expanded ? `subnav-${a.item.key}` : void 0,
448
+ "aria-current": a.item.active ? "page" : void 0,
449
+ "aria-expanded": a.item.items?.length && a.item.expanded ? !0 : void 0,
450
+ class: te(["sidebar-item-link", { "sidebar-item-external-link": i.value, "router-link": !c.value }]),
451
+ href: c.value ? String(a.item.to || "#") : E?.href,
452
+ target: i.value ? "_blank" : void 0,
453
+ onClick: (H) => D(H, a.item, E?.navigate),
454
+ onKeypress: Dn((H) => D(H, a.item, E?.navigate), ["enter"])
455
+ }, [
456
+ I("div", {
457
+ class: te(["sidebar-item-display", { "has-label": !!a.item.label && a.item.expanded, "has-after-content": v.value }])
458
+ }, [
459
+ $.$slots[`sidebar-icon-${a.item.key}`] ? (p(), T("div", zr, [
460
+ a.subnavItem ? F("", !0) : O($.$slots, `sidebar-icon-${a.item.key}`, {}, void 0, !0, 0)
461
+ ])) : F("", !0),
462
+ I("div", Ur, [
463
+ (a.subnavItem && !v.value ? a.item.name.length < 25 : a.item.name.length < 18) ? (p(), T("div", {
464
+ key: 0,
465
+ class: te(["sidebar-item-name truncate-text", [a.subnavItem ? "has-after-content-max-width truncate-24" : "truncate-17"]])
466
+ }, V(a.item.name), 3)) : (p(), Z(P, {
467
+ key: 1,
468
+ class: "sidebar-item-tooltip",
469
+ placement: "right",
470
+ "position-fixed": "",
471
+ text: a.item.name
472
+ }, {
473
+ default: L(() => [
474
+ I("div", Vr, [
475
+ I("span", {
476
+ class: te(["truncate-text", [a.subnavItem ? "truncate-18" : "truncate-17", { "has-after-content-max-width": v.value }]])
477
+ }, V(a.item.name), 3)
478
+ ])
479
+ ]),
480
+ _: 1
481
+ }, 8, ["text"])),
482
+ a.item.label && a.item.expanded ? (p(), T("div", qr, V(a.item.label), 1)) : F("", !0)
483
+ ]),
484
+ v.value ? (p(), T("div", Xr, [
485
+ a.item.badgeCount ? (p(), Z(Hr, {
486
+ key: 0,
487
+ count: a.item.badgeCount
488
+ }, null, 8, ["count"])) : O($.$slots, `sidebar-after-${a.item.key}`, {}, void 0, !0, 1)
489
+ ])) : F("", !0)
490
+ ], 2)
491
+ ], 42, Gr)
492
+ ]),
493
+ _: 3
494
+ }, 8, ["custom", "to"])),
495
+ a.item.items?.length && a.item.expanded ? (p(), T("ul", {
496
+ key: 0,
497
+ id: `subnav-${a.item.key}`,
498
+ class: "level-secondary"
499
+ }, [
500
+ (p(!0), T(Ee, null, we(a.item.items, (E) => (p(), Z(B, {
501
+ key: E.name,
502
+ item: E,
503
+ "subnav-item": !0,
504
+ onClick: (H) => g(E)
505
+ }, null, 8, ["item", "onClick"]))), 128))
506
+ ], 8, Yr)) : F("", !0)
507
+ ], 10, Wr);
508
+ };
509
+ }
510
+ }), Vt = /* @__PURE__ */ oe(Qr, [["__scopeId", "data-v-8b23b588"]]);
511
+ var sa = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "area[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], Je = /* @__PURE__ */ sa.join(","), la = typeof Element > "u", Se = la ? function() {
512
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, et = !la && Element.prototype.getRootNode ? function(a) {
513
+ var e;
514
+ return a == null || (e = a.getRootNode) === null || e === void 0 ? void 0 : e.call(a);
515
+ } : function(a) {
516
+ return a?.ownerDocument;
517
+ }, tt = function(e, r) {
518
+ var n;
519
+ r === void 0 && (r = !0);
520
+ var s = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "inert"), c = s === "" || s === "true", i = c || r && e && // closest does not exist on shadow roots, so we fall back to a manual
521
+ // lookup upward, in case it is not defined.
522
+ (typeof e.closest == "function" ? e.closest("[inert]") : tt(e.parentNode));
523
+ return i;
524
+ }, Jr = function(e) {
525
+ var r, n = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "contenteditable");
526
+ return n === "" || n === "true";
527
+ }, ca = function(e, r, n) {
528
+ if (tt(e))
529
+ return [];
530
+ var s = Array.prototype.slice.apply(e.querySelectorAll(Je));
531
+ return r && Se.call(e, Je) && s.unshift(e), s = s.filter(n), s;
532
+ }, at = function(e, r, n) {
533
+ for (var s = [], c = Array.from(e); c.length; ) {
534
+ var i = c.shift();
535
+ if (!tt(i, !1))
536
+ if (i.tagName === "SLOT") {
537
+ var v = i.assignedElements(), g = v.length ? v : i.children, D = at(g, !0, n);
538
+ n.flatten ? s.push.apply(s, D) : s.push({
539
+ scopeParent: i,
540
+ candidates: D
541
+ });
542
+ } else {
543
+ var $ = Se.call(i, Je);
544
+ $ && n.filter(i) && (r || !e.includes(i)) && s.push(i);
545
+ var A = i.shadowRoot || // check for an undisclosed shadow
546
+ typeof n.getShadowRoot == "function" && n.getShadowRoot(i), P = !tt(A, !1) && (!n.shadowRootFilter || n.shadowRootFilter(i));
547
+ if (A && P) {
548
+ var B = at(A === !0 ? i.children : A.children, !0, n);
549
+ n.flatten ? s.push.apply(s, B) : s.push({
550
+ scopeParent: i,
551
+ candidates: B
552
+ });
553
+ } else
554
+ c.unshift.apply(c, i.children);
555
+ }
556
+ }
557
+ return s;
558
+ }, ua = function(e) {
559
+ return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
560
+ }, ye = function(e) {
561
+ if (!e)
562
+ throw new Error("No node provided");
563
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Jr(e)) && !ua(e) ? 0 : e.tabIndex;
564
+ }, ei = function(e, r) {
565
+ var n = ye(e);
566
+ return n < 0 && r && !ua(e) ? 0 : n;
567
+ }, ti = function(e, r) {
568
+ return e.tabIndex === r.tabIndex ? e.documentOrder - r.documentOrder : e.tabIndex - r.tabIndex;
569
+ }, da = function(e) {
570
+ return e.tagName === "INPUT";
571
+ }, ai = function(e) {
572
+ return da(e) && e.type === "hidden";
573
+ }, ni = function(e) {
574
+ var r = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(n) {
575
+ return n.tagName === "SUMMARY";
576
+ });
577
+ return r;
578
+ }, ri = function(e, r) {
579
+ for (var n = 0; n < e.length; n++)
580
+ if (e[n].checked && e[n].form === r)
581
+ return e[n];
582
+ }, ii = function(e) {
583
+ if (!e.name)
584
+ return !0;
585
+ var r = e.form || et(e), n = function(v) {
586
+ return r.querySelectorAll('input[type="radio"][name="' + v + '"]');
587
+ }, s;
588
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
589
+ s = n(window.CSS.escape(e.name));
590
+ else
591
+ try {
592
+ s = n(e.name);
593
+ } catch (i) {
594
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
595
+ }
596
+ var c = ri(s, e.form);
597
+ return !c || c === e;
598
+ }, oi = function(e) {
599
+ return da(e) && e.type === "radio";
600
+ }, si = function(e) {
601
+ return oi(e) && !ii(e);
602
+ }, li = function(e) {
603
+ var r, n = e && et(e), s = (r = n) === null || r === void 0 ? void 0 : r.host, c = !1;
604
+ if (n && n !== e) {
605
+ var i, v, g;
606
+ for (c = !!((i = s) !== null && i !== void 0 && (v = i.ownerDocument) !== null && v !== void 0 && v.contains(s) || e != null && (g = e.ownerDocument) !== null && g !== void 0 && g.contains(e)); !c && s; ) {
607
+ var D, $, A;
608
+ n = et(s), s = (D = n) === null || D === void 0 ? void 0 : D.host, c = !!(($ = s) !== null && $ !== void 0 && (A = $.ownerDocument) !== null && A !== void 0 && A.contains(s));
609
+ }
610
+ }
611
+ return c;
612
+ }, qt = function(e) {
613
+ var r = e.getBoundingClientRect(), n = r.width, s = r.height;
614
+ return n === 0 && s === 0;
615
+ }, ci = function(e, r) {
616
+ var n = r.displayCheck, s = r.getShadowRoot;
617
+ if (n === "full-native" && "checkVisibility" in e) {
618
+ var c = e.checkVisibility({
619
+ // Checking opacity might be desirable for some use cases, but natively,
620
+ // opacity zero elements _are_ focusable and tabbable.
621
+ checkOpacity: !1,
622
+ opacityProperty: !1,
623
+ contentVisibilityAuto: !0,
624
+ visibilityProperty: !0,
625
+ // This is an alias for `visibilityProperty`. Contemporary browsers
626
+ // support both. However, this alias has wider browser support (Chrome
627
+ // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
628
+ // we include it anyway.
629
+ checkVisibilityCSS: !0
630
+ });
631
+ return !c;
632
+ }
633
+ var i = getComputedStyle(e), v = i.visibility;
634
+ if (v === "hidden" || v === "collapse")
635
+ return !0;
636
+ var g = Se.call(e, "details>summary:first-of-type"), D = g ? e.parentElement : e;
637
+ if (Se.call(D, "details:not([open]) *"))
638
+ return !0;
639
+ if (!n || n === "full" || // full-native can run this branch when it falls through in case
640
+ // Element#checkVisibility is unsupported
641
+ n === "full-native" || n === "legacy-full") {
642
+ if (typeof s == "function") {
643
+ for (var $ = e; e; ) {
644
+ var A = e.parentElement, P = et(e);
645
+ if (A && !A.shadowRoot && s(A) === !0)
646
+ return qt(e);
647
+ e.assignedSlot ? e = e.assignedSlot : !A && P !== e.ownerDocument ? e = P.host : e = A;
648
+ }
649
+ e = $;
650
+ }
651
+ if (li(e))
652
+ return !e.getClientRects().length;
653
+ if (n !== "legacy-full")
654
+ return !0;
655
+ } else if (n === "non-zero-area")
656
+ return qt(e);
657
+ return !1;
658
+ }, ui = function(e) {
659
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
660
+ for (var r = e.parentElement; r; ) {
661
+ if (r.tagName === "FIELDSET" && r.disabled) {
662
+ for (var n = 0; n < r.children.length; n++) {
663
+ var s = r.children.item(n);
664
+ if (s.tagName === "LEGEND")
665
+ return Se.call(r, "fieldset[disabled] *") ? !0 : !s.contains(e);
666
+ }
667
+ return !0;
668
+ }
669
+ r = r.parentElement;
670
+ }
671
+ return !1;
672
+ }, nt = function(e, r) {
673
+ return !(r.disabled || ai(r) || ci(r, e) || // For a details element with a summary, the summary element gets the focus
674
+ ni(r) || ui(r));
675
+ }, wt = function(e, r) {
676
+ return !(si(r) || ye(r) < 0 || !nt(e, r));
677
+ }, di = function(e) {
678
+ var r = parseInt(e.getAttribute("tabindex"), 10);
679
+ return !!(isNaN(r) || r >= 0);
680
+ }, fa = function(e) {
681
+ var r = [], n = [];
682
+ return e.forEach(function(s, c) {
683
+ var i = !!s.scopeParent, v = i ? s.scopeParent : s, g = ei(v, i), D = i ? fa(s.candidates) : v;
684
+ g === 0 ? i ? r.push.apply(r, D) : r.push(v) : n.push({
685
+ documentOrder: c,
686
+ tabIndex: g,
687
+ item: s,
688
+ isScope: i,
689
+ content: D
690
+ });
691
+ }), n.sort(ti).reduce(function(s, c) {
692
+ return c.isScope ? s.push.apply(s, c.content) : s.push(c.content), s;
693
+ }, []).concat(r);
694
+ }, fi = function(e, r) {
695
+ r = r || {};
696
+ var n;
697
+ return r.getShadowRoot ? n = at([e], r.includeContainer, {
698
+ filter: wt.bind(null, r),
699
+ flatten: !1,
700
+ getShadowRoot: r.getShadowRoot,
701
+ shadowRootFilter: di
702
+ }) : n = ca(e, r.includeContainer, wt.bind(null, r)), fa(n);
703
+ }, vi = function(e, r) {
704
+ r = r || {};
705
+ var n;
706
+ return r.getShadowRoot ? n = at([e], r.includeContainer, {
707
+ filter: nt.bind(null, r),
708
+ flatten: !0,
709
+ getShadowRoot: r.getShadowRoot
710
+ }) : n = ca(e, r.includeContainer, nt.bind(null, r)), n;
711
+ }, $e = function(e, r) {
712
+ if (r = r || {}, !e)
713
+ throw new Error("No node provided");
714
+ return Se.call(e, Je) === !1 ? !1 : wt(r, e);
715
+ }, bi = /* @__PURE__ */ sa.concat("iframe:not([inert]):not([inert] *)").join(","), yt = function(e, r) {
716
+ if (r = r || {}, !e)
717
+ throw new Error("No node provided");
718
+ return Se.call(e, bi) === !1 ? !1 : nt(r, e);
719
+ };
720
+ function kt(a, e) {
721
+ (e == null || e > a.length) && (e = a.length);
722
+ for (var r = 0, n = Array(e); r < e; r++) n[r] = a[r];
723
+ return n;
724
+ }
725
+ function pi(a) {
726
+ if (Array.isArray(a)) return kt(a);
727
+ }
728
+ function Xt(a, e) {
729
+ var r = typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
730
+ if (!r) {
731
+ if (Array.isArray(a) || (r = va(a)) || e) {
732
+ r && (a = r);
733
+ var n = 0, s = function() {
734
+ };
735
+ return {
736
+ s,
737
+ n: function() {
738
+ return n >= a.length ? {
739
+ done: !0
740
+ } : {
741
+ done: !1,
742
+ value: a[n++]
743
+ };
744
+ },
745
+ e: function(g) {
746
+ throw g;
747
+ },
748
+ f: s
749
+ };
750
+ }
751
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
752
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
753
+ }
754
+ var c, i = !0, v = !1;
755
+ return {
756
+ s: function() {
757
+ r = r.call(a);
758
+ },
759
+ n: function() {
760
+ var g = r.next();
761
+ return i = g.done, g;
762
+ },
763
+ e: function(g) {
764
+ v = !0, c = g;
765
+ },
766
+ f: function() {
767
+ try {
768
+ i || r.return == null || r.return();
769
+ } finally {
770
+ if (v) throw c;
771
+ }
772
+ }
773
+ };
774
+ }
775
+ function hi(a, e, r) {
776
+ return (e = ki(e)) in a ? Object.defineProperty(a, e, {
777
+ value: r,
778
+ enumerable: !0,
779
+ configurable: !0,
780
+ writable: !0
781
+ }) : a[e] = r, a;
782
+ }
783
+ function mi(a) {
784
+ if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
785
+ }
786
+ function gi() {
787
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
788
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
789
+ }
790
+ function Yt(a, e) {
791
+ var r = Object.keys(a);
792
+ if (Object.getOwnPropertySymbols) {
793
+ var n = Object.getOwnPropertySymbols(a);
794
+ e && (n = n.filter(function(s) {
795
+ return Object.getOwnPropertyDescriptor(a, s).enumerable;
796
+ })), r.push.apply(r, n);
797
+ }
798
+ return r;
799
+ }
800
+ function Qt(a) {
801
+ for (var e = 1; e < arguments.length; e++) {
802
+ var r = arguments[e] != null ? arguments[e] : {};
803
+ e % 2 ? Yt(Object(r), !0).forEach(function(n) {
804
+ hi(a, n, r[n]);
805
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(r)) : Yt(Object(r)).forEach(function(n) {
806
+ Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(r, n));
807
+ });
808
+ }
809
+ return a;
810
+ }
811
+ function yi(a) {
812
+ return pi(a) || mi(a) || va(a) || gi();
813
+ }
814
+ function wi(a, e) {
815
+ if (typeof a != "object" || !a) return a;
816
+ var r = a[Symbol.toPrimitive];
817
+ if (r !== void 0) {
818
+ var n = r.call(a, e);
819
+ if (typeof n != "object") return n;
820
+ throw new TypeError("@@toPrimitive must return a primitive value.");
821
+ }
822
+ return (e === "string" ? String : Number)(a);
823
+ }
824
+ function ki(a) {
825
+ var e = wi(a, "string");
826
+ return typeof e == "symbol" ? e : e + "";
827
+ }
828
+ function va(a, e) {
829
+ if (a) {
830
+ if (typeof a == "string") return kt(a, e);
831
+ var r = {}.toString.call(a).slice(8, -1);
832
+ return r === "Object" && a.constructor && (r = a.constructor.name), r === "Map" || r === "Set" ? Array.from(a) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? kt(a, e) : void 0;
833
+ }
834
+ }
835
+ var de = {
836
+ // Returns the trap from the top of the stack.
837
+ getActiveTrap: function(e) {
838
+ return e?.length > 0 ? e[e.length - 1] : null;
839
+ },
840
+ // Pauses the currently active trap, then adds a new trap to the stack.
841
+ activateTrap: function(e, r) {
842
+ var n = de.getActiveTrap(e);
843
+ r !== n && de.pauseTrap(e);
844
+ var s = e.indexOf(r);
845
+ s === -1 || e.splice(s, 1), e.push(r);
846
+ },
847
+ // Removes the trap from the top of the stack, then unpauses the next trap down.
848
+ deactivateTrap: function(e, r) {
849
+ var n = e.indexOf(r);
850
+ n !== -1 && e.splice(n, 1), de.unpauseTrap(e);
851
+ },
852
+ // Pauses the trap at the top of the stack.
853
+ pauseTrap: function(e) {
854
+ var r = de.getActiveTrap(e);
855
+ r?._setPausedState(!0);
856
+ },
857
+ // Unpauses the trap at the top of the stack.
858
+ unpauseTrap: function(e) {
859
+ var r = de.getActiveTrap(e);
860
+ r && !r._isManuallyPaused() && r._setPausedState(!1);
861
+ }
862
+ }, Si = function(e) {
863
+ return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
864
+ }, Ti = function(e) {
865
+ return e?.key === "Escape" || e?.key === "Esc" || e?.keyCode === 27;
866
+ }, Be = function(e) {
867
+ return e?.key === "Tab" || e?.keyCode === 9;
868
+ }, Ii = function(e) {
869
+ return Be(e) && !e.shiftKey;
870
+ }, Ci = function(e) {
871
+ return Be(e) && e.shiftKey;
872
+ }, Jt = function(e) {
873
+ return setTimeout(e, 0);
874
+ }, Pe = function(e) {
875
+ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
876
+ n[s - 1] = arguments[s];
877
+ return typeof e == "function" ? e.apply(void 0, n) : e;
878
+ }, Ue = function(e) {
879
+ return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
880
+ }, _i = [], Oi = function(e, r) {
881
+ var n = r?.document || document, s = r?.trapStack || _i, c = Qt({
882
+ returnFocusOnDeactivate: !0,
883
+ escapeDeactivates: !0,
884
+ delayInitialFocus: !0,
885
+ delayReturnFocus: !0,
886
+ isolateSubtrees: !1,
887
+ isKeyForward: Ii,
888
+ isKeyBackward: Ci
889
+ }, r), i = {
890
+ // containers given to createFocusTrap()
891
+ /** @type {Array<HTMLElement>} */
892
+ containers: [],
893
+ // list of objects identifying tabbable nodes in `containers` in the trap
894
+ // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
895
+ // is active, but the trap should never get to a state where there isn't at least one group
896
+ // with at least one tabbable node in it (that would lead to an error condition that would
897
+ // result in an error being thrown)
898
+ /** @type {Array<{
899
+ * container: HTMLElement,
900
+ * tabbableNodes: Array<HTMLElement>, // empty if none
901
+ * focusableNodes: Array<HTMLElement>, // empty if none
902
+ * posTabIndexesFound: boolean,
903
+ * firstTabbableNode: HTMLElement|undefined,
904
+ * lastTabbableNode: HTMLElement|undefined,
905
+ * firstDomTabbableNode: HTMLElement|undefined,
906
+ * lastDomTabbableNode: HTMLElement|undefined,
907
+ * nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
908
+ * }>}
909
+ */
910
+ containerGroups: [],
911
+ // same order/length as `containers` list
912
+ // references to objects in `containerGroups`, but only those that actually have
913
+ // tabbable nodes in them
914
+ // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
915
+ // the same length
916
+ tabbableGroups: [],
917
+ // references to nodes that are siblings to the ancestors of this trap's containers.
918
+ /** @type {Set<HTMLElement>} */
919
+ adjacentElements: /* @__PURE__ */ new Set(),
920
+ // references to nodes that were inert or aria-hidden before the trap was activated.
921
+ /** @type {Set<HTMLElement>} */
922
+ alreadySilent: /* @__PURE__ */ new Set(),
923
+ nodeFocusedBeforeActivation: null,
924
+ mostRecentlyFocusedNode: null,
925
+ active: !1,
926
+ paused: !1,
927
+ manuallyPaused: !1,
928
+ // timer ID for when delayInitialFocus is true and initial focus in this trap
929
+ // has been delayed during activation
930
+ delayInitialFocusTimer: void 0,
931
+ // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
932
+ recentNavEvent: void 0
933
+ }, v, g = function(l, d, h) {
934
+ return l && l[d] !== void 0 ? l[d] : c[h || d];
935
+ }, D = function(l, d) {
936
+ var h = typeof d?.composedPath == "function" ? d.composedPath() : void 0;
937
+ return i.containerGroups.findIndex(function(_) {
938
+ var S = _.container, N = _.tabbableNodes;
939
+ return S.contains(l) || h?.includes(S) || N.find(function(b) {
940
+ return b === l;
941
+ });
942
+ });
943
+ }, $ = function(l) {
944
+ var d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = d.hasFallback, _ = h === void 0 ? !1 : h, S = d.params, N = S === void 0 ? [] : S, b = c[l];
945
+ if (typeof b == "function" && (b = b.apply(void 0, yi(N))), b === !0 && (b = void 0), !b) {
946
+ if (b === void 0 || b === !1)
947
+ return b;
948
+ throw new Error("`".concat(l, "` was specified but was not a node, or did not return a node"));
949
+ }
950
+ var f = b;
951
+ if (typeof b == "string") {
952
+ try {
953
+ f = n.querySelector(b);
954
+ } catch (m) {
955
+ throw new Error("`".concat(l, '` appears to be an invalid selector; error="').concat(m.message, '"'));
956
+ }
957
+ if (!f && !_)
958
+ throw new Error("`".concat(l, "` as selector refers to no known node"));
959
+ }
960
+ return f;
961
+ }, A = function(l) {
962
+ var d = l.activeElement;
963
+ return d ? d.shadowRoot && d.shadowRoot.activeElement !== null ? A(d.shadowRoot) : d : null;
964
+ }, P = function() {
965
+ var l = $("initialFocus", {
966
+ hasFallback: !0
967
+ });
968
+ if (l === !1)
969
+ return !1;
970
+ if (l === void 0 || l && !yt(l, c.tabbableOptions)) {
971
+ var d = A(n);
972
+ if (D(d) >= 0)
973
+ l = d;
974
+ else {
975
+ var h = i.tabbableGroups[0], _ = h && h.firstTabbableNode;
976
+ l = _ || $("fallbackFocus");
977
+ }
978
+ } else l === null && (l = $("fallbackFocus"));
979
+ if (!l)
980
+ throw new Error("Your focus-trap needs to have at least one focusable element");
981
+ return l;
982
+ }, B = function() {
983
+ if (i.containerGroups = i.containers.map(function(l) {
984
+ var d = fi(l, c.tabbableOptions), h = vi(l, c.tabbableOptions), _ = d.length > 0 ? d[0] : void 0, S = d.length > 0 ? d[d.length - 1] : void 0, N = h.find(function(m) {
985
+ return $e(m);
986
+ }), b = h.slice().reverse().find(function(m) {
987
+ return $e(m);
988
+ }), f = !!d.find(function(m) {
989
+ return ye(m) > 0;
990
+ });
991
+ return {
992
+ container: l,
993
+ tabbableNodes: d,
994
+ focusableNodes: h,
995
+ /** True if at least one node with positive `tabindex` was found in this container. */
996
+ posTabIndexesFound: f,
997
+ /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
998
+ firstTabbableNode: _,
999
+ /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
1000
+ lastTabbableNode: S,
1001
+ // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
1002
+ // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
1003
+ // because that API doesn't work with Shadow DOM as well as it should (@see
1004
+ // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
1005
+ // to address an edge case related to positive tabindex support, this seems like a much easier,
1006
+ // "close enough most of the time" alternative for positive tabindexes which should generally
1007
+ // be avoided anyway...
1008
+ /** First tabbable node in container, __DOM__ order; `undefined` if none. */
1009
+ firstDomTabbableNode: N,
1010
+ /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
1011
+ lastDomTabbableNode: b,
1012
+ /**
1013
+ * Finds the __tabbable__ node that follows the given node in the specified direction,
1014
+ * in this container, if any.
1015
+ * @param {HTMLElement} node
1016
+ * @param {boolean} [forward] True if going in forward tab order; false if going
1017
+ * in reverse.
1018
+ * @returns {HTMLElement|undefined} The next tabbable node, if any.
1019
+ */
1020
+ nextTabbableNode: function(y) {
1021
+ var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, j = d.indexOf(y);
1022
+ return j < 0 ? k ? h.slice(h.indexOf(y) + 1).find(function(M) {
1023
+ return $e(M);
1024
+ }) : h.slice(0, h.indexOf(y)).reverse().find(function(M) {
1025
+ return $e(M);
1026
+ }) : d[j + (k ? 1 : -1)];
1027
+ }
1028
+ };
1029
+ }), i.tabbableGroups = i.containerGroups.filter(function(l) {
1030
+ return l.tabbableNodes.length > 0;
1031
+ }), i.tabbableGroups.length <= 0 && !$("fallbackFocus"))
1032
+ throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1033
+ if (i.containerGroups.find(function(l) {
1034
+ return l.posTabIndexesFound;
1035
+ }) && i.containerGroups.length > 1)
1036
+ throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
1037
+ }, E = function(l) {
1038
+ if (l !== !1 && l !== A(document)) {
1039
+ if (!l || !l.focus) {
1040
+ E(P());
1041
+ return;
1042
+ }
1043
+ l.focus({
1044
+ preventScroll: !!c.preventScroll
1045
+ }), i.mostRecentlyFocusedNode = l, Si(l) && l.select();
1046
+ }
1047
+ }, H = function(l) {
1048
+ var d = $("setReturnFocus", {
1049
+ params: [l]
1050
+ });
1051
+ return d || (d === !1 ? !1 : l);
1052
+ }, le = function(l) {
1053
+ var d = l.target, h = l.event, _ = l.isBackward, S = _ === void 0 ? !1 : _;
1054
+ d = d || Ue(h), B();
1055
+ var N = null;
1056
+ if (i.tabbableGroups.length > 0) {
1057
+ var b = D(d, h), f = b >= 0 ? i.containerGroups[b] : void 0;
1058
+ if (b < 0)
1059
+ S ? N = i.tabbableGroups[i.tabbableGroups.length - 1].lastTabbableNode : N = i.tabbableGroups[0].firstTabbableNode;
1060
+ else if (S) {
1061
+ var m = i.tabbableGroups.findIndex(function(Te) {
1062
+ var De = Te.firstTabbableNode;
1063
+ return d === De;
1064
+ });
1065
+ if (m < 0 && (f.container === d || yt(d, c.tabbableOptions) && !$e(d, c.tabbableOptions) && !f.nextTabbableNode(d, !1)) && (m = b), m >= 0) {
1066
+ var y = m === 0 ? i.tabbableGroups.length - 1 : m - 1, k = i.tabbableGroups[y];
1067
+ N = ye(d) >= 0 ? k.lastTabbableNode : k.lastDomTabbableNode;
1068
+ } else Be(h) || (N = f.nextTabbableNode(d, !1));
1069
+ } else {
1070
+ var j = i.tabbableGroups.findIndex(function(Te) {
1071
+ var De = Te.lastTabbableNode;
1072
+ return d === De;
1073
+ });
1074
+ if (j < 0 && (f.container === d || yt(d, c.tabbableOptions) && !$e(d, c.tabbableOptions) && !f.nextTabbableNode(d)) && (j = b), j >= 0) {
1075
+ var M = j === i.tabbableGroups.length - 1 ? 0 : j + 1, ie = i.tabbableGroups[M];
1076
+ N = ye(d) >= 0 ? ie.firstTabbableNode : ie.firstDomTabbableNode;
1077
+ } else Be(h) || (N = f.nextTabbableNode(d));
1078
+ }
1079
+ } else
1080
+ N = $("fallbackFocus");
1081
+ return N;
1082
+ }, G = function(l) {
1083
+ var d = Ue(l);
1084
+ if (!(D(d, l) >= 0)) {
1085
+ if (Pe(c.clickOutsideDeactivates, l)) {
1086
+ v.deactivate({
1087
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
1088
+ // which will result in the outside click setting focus to the node
1089
+ // that was clicked (and if not focusable, to "nothing"); by setting
1090
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
1091
+ // on activation (or the configured `setReturnFocus` node), whether the
1092
+ // outside click was on a focusable node or not
1093
+ returnFocus: c.returnFocusOnDeactivate
1094
+ });
1095
+ return;
1096
+ }
1097
+ Pe(c.allowOutsideClick, l) || l.preventDefault();
1098
+ }
1099
+ }, q = function(l) {
1100
+ var d = Ue(l), h = D(d, l) >= 0;
1101
+ if (h || d instanceof Document)
1102
+ h && (i.mostRecentlyFocusedNode = d);
1103
+ else {
1104
+ l.stopImmediatePropagation();
1105
+ var _, S = !0;
1106
+ if (i.mostRecentlyFocusedNode)
1107
+ if (ye(i.mostRecentlyFocusedNode) > 0) {
1108
+ var N = D(i.mostRecentlyFocusedNode), b = i.containerGroups[N].tabbableNodes;
1109
+ if (b.length > 0) {
1110
+ var f = b.findIndex(function(m) {
1111
+ return m === i.mostRecentlyFocusedNode;
1112
+ });
1113
+ f >= 0 && (c.isKeyForward(i.recentNavEvent) ? f + 1 < b.length && (_ = b[f + 1], S = !1) : f - 1 >= 0 && (_ = b[f - 1], S = !1));
1114
+ }
1115
+ } else
1116
+ i.containerGroups.some(function(m) {
1117
+ return m.tabbableNodes.some(function(y) {
1118
+ return ye(y) > 0;
1119
+ });
1120
+ }) || (S = !1);
1121
+ else
1122
+ S = !1;
1123
+ S && (_ = le({
1124
+ // move FROM the MRU node, not event-related node (which will be the node that is
1125
+ // outside the trap causing the focus escape we're trying to fix)
1126
+ target: i.mostRecentlyFocusedNode,
1127
+ isBackward: c.isKeyBackward(i.recentNavEvent)
1128
+ })), E(_ || i.mostRecentlyFocusedNode || P());
1129
+ }
1130
+ i.recentNavEvent = void 0;
1131
+ }, fe = function(l) {
1132
+ var d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1133
+ i.recentNavEvent = l;
1134
+ var h = le({
1135
+ event: l,
1136
+ isBackward: d
1137
+ });
1138
+ h && (Be(l) && l.preventDefault(), E(h));
1139
+ }, se = function(l) {
1140
+ (c.isKeyForward(l) || c.isKeyBackward(l)) && fe(l, c.isKeyBackward(l));
1141
+ }, X = function(l) {
1142
+ Ti(l) && Pe(c.escapeDeactivates, l) !== !1 && (l.preventDefault(), v.deactivate());
1143
+ }, z = function(l) {
1144
+ var d = Ue(l);
1145
+ D(d, l) >= 0 || Pe(c.clickOutsideDeactivates, l) || Pe(c.allowOutsideClick, l) || (l.preventDefault(), l.stopImmediatePropagation());
1146
+ }, ne = function() {
1147
+ if (i.active) {
1148
+ de.activateTrap(s, v);
1149
+ var l;
1150
+ return c.delayInitialFocus ? l = new Promise(function(d) {
1151
+ i.delayInitialFocusTimer = Jt(function() {
1152
+ E(P()), d();
1153
+ });
1154
+ }) : E(P()), n.addEventListener("focusin", q, !0), n.addEventListener("mousedown", G, {
1155
+ capture: !0,
1156
+ passive: !1
1157
+ }), n.addEventListener("touchstart", G, {
1158
+ capture: !0,
1159
+ passive: !1
1160
+ }), n.addEventListener("click", z, {
1161
+ capture: !0,
1162
+ passive: !1
1163
+ }), n.addEventListener("keydown", se, {
1164
+ capture: !0,
1165
+ passive: !1
1166
+ }), n.addEventListener("keydown", X), l;
1167
+ }
1168
+ }, x = function(l) {
1169
+ i.active && !i.paused && v._setSubtreeIsolation(!1), i.adjacentElements.clear(), i.alreadySilent.clear();
1170
+ var d = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), _ = Xt(l), S;
1171
+ try {
1172
+ for (_.s(); !(S = _.n()).done; ) {
1173
+ var N = S.value;
1174
+ d.add(N);
1175
+ for (var b = typeof ShadowRoot < "u" && N.getRootNode() instanceof ShadowRoot, f = N; f; ) {
1176
+ d.add(f);
1177
+ var m = f.parentElement, y = [];
1178
+ m ? y = m.children : !m && b && (y = f.getRootNode().children, m = f.getRootNode().host, b = typeof ShadowRoot < "u" && m.getRootNode() instanceof ShadowRoot);
1179
+ var k = Xt(y), j;
1180
+ try {
1181
+ for (k.s(); !(j = k.n()).done; ) {
1182
+ var M = j.value;
1183
+ h.add(M);
1184
+ }
1185
+ } catch (ie) {
1186
+ k.e(ie);
1187
+ } finally {
1188
+ k.f();
1189
+ }
1190
+ f = m;
1191
+ }
1192
+ }
1193
+ } catch (ie) {
1194
+ _.e(ie);
1195
+ } finally {
1196
+ _.f();
1197
+ }
1198
+ d.forEach(function(ie) {
1199
+ h.delete(ie);
1200
+ }), i.adjacentElements = h;
1201
+ }, K = function() {
1202
+ if (i.active)
1203
+ return n.removeEventListener("focusin", q, !0), n.removeEventListener("mousedown", G, !0), n.removeEventListener("touchstart", G, !0), n.removeEventListener("click", z, !0), n.removeEventListener("keydown", se, !0), n.removeEventListener("keydown", X), v;
1204
+ }, U = function(l) {
1205
+ var d = i.mostRecentlyFocusedNode;
1206
+ if (d) {
1207
+ var h = l.some(function(S) {
1208
+ var N = Array.from(S.removedNodes);
1209
+ return N.some(function(b) {
1210
+ return b === d || typeof b.contains == "function" && b.contains(d);
1211
+ });
1212
+ });
1213
+ if (h && i.containers.some(function(S) {
1214
+ return S?.isConnected;
1215
+ })) {
1216
+ B();
1217
+ var _ = P();
1218
+ E(_);
1219
+ }
1220
+ }
1221
+ }, Y = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(U) : void 0, re = function() {
1222
+ Y && (Y.disconnect(), i.active && !i.paused && i.containers.map(function(l) {
1223
+ Y.observe(l, {
1224
+ subtree: !0,
1225
+ childList: !0
1226
+ });
1227
+ }));
1228
+ };
1229
+ return v = {
1230
+ get active() {
1231
+ return i.active;
1232
+ },
1233
+ get paused() {
1234
+ return i.paused;
1235
+ },
1236
+ activate: function(l) {
1237
+ if (i.active)
1238
+ return this;
1239
+ var d = g(l, "onActivate"), h = g(l, "onPostActivate"), _ = g(l, "checkCanFocusTrap"), S = de.getActiveTrap(s), N = !1;
1240
+ if (S && !S.paused) {
1241
+ var b;
1242
+ (b = S._setSubtreeIsolation) === null || b === void 0 || b.call(S, !1), N = !0;
1243
+ }
1244
+ try {
1245
+ _ || B(), i.active = !0, i.paused = !1, i.nodeFocusedBeforeActivation = A(n), d?.({
1246
+ trap: v
1247
+ });
1248
+ var f = function() {
1249
+ _ && B();
1250
+ var k = function() {
1251
+ v._setSubtreeIsolation(!0), re(), h?.({
1252
+ trap: v
1253
+ });
1254
+ }, j = ne();
1255
+ j ? j.then(k) : k();
1256
+ };
1257
+ if (_)
1258
+ return _(i.containers.concat()).then(f, f), this;
1259
+ f();
1260
+ } catch (y) {
1261
+ if (S === de.getActiveTrap(s) && N) {
1262
+ var m;
1263
+ (m = S._setSubtreeIsolation) === null || m === void 0 || m.call(S, !0);
1264
+ }
1265
+ throw y;
1266
+ }
1267
+ return this;
1268
+ },
1269
+ deactivate: function(l) {
1270
+ if (!i.active)
1271
+ return this;
1272
+ var d = Qt({
1273
+ onDeactivate: c.onDeactivate,
1274
+ onPostDeactivate: c.onPostDeactivate,
1275
+ checkCanReturnFocus: c.checkCanReturnFocus
1276
+ }, l);
1277
+ clearTimeout(i.delayInitialFocusTimer), i.delayInitialFocusTimer = void 0, i.paused || v._setSubtreeIsolation(!1), i.alreadySilent.clear(), K(), i.active = !1, i.paused = !1, re(), de.deactivateTrap(s, v);
1278
+ var h = g(d, "onDeactivate"), _ = g(d, "onPostDeactivate"), S = g(d, "checkCanReturnFocus"), N = g(d, "delayReturnFocus"), b = g(d, "returnFocus", "returnFocusOnDeactivate");
1279
+ h?.({
1280
+ trap: v
1281
+ });
1282
+ var f = function() {
1283
+ b && E(H(i.nodeFocusedBeforeActivation)), _?.({
1284
+ trap: v
1285
+ });
1286
+ }, m = function() {
1287
+ N && b ? Jt(f) : f();
1288
+ };
1289
+ return b && S ? (S(H(i.nodeFocusedBeforeActivation)).then(m, m), this) : (m(), this);
1290
+ },
1291
+ pause: function(l) {
1292
+ return i.active ? (i.manuallyPaused = !0, this._setPausedState(!0, l)) : this;
1293
+ },
1294
+ unpause: function(l) {
1295
+ return i.active ? (i.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, l)) : this;
1296
+ },
1297
+ updateContainerElements: function(l) {
1298
+ var d = [].concat(l).filter(Boolean);
1299
+ return i.containers = d.map(function(h) {
1300
+ return typeof h == "string" ? n.querySelector(h) : h;
1301
+ }), c.isolateSubtrees && x(i.containers), i.active && (B(), i.paused || v._setSubtreeIsolation(!0)), re(), this;
1302
+ }
1303
+ }, Object.defineProperties(v, {
1304
+ _isManuallyPaused: {
1305
+ value: function() {
1306
+ return i.manuallyPaused;
1307
+ }
1308
+ },
1309
+ _setPausedState: {
1310
+ value: function(l, d) {
1311
+ if (i.paused === l)
1312
+ return this;
1313
+ if (i.paused = l, l) {
1314
+ var h = g(d, "onPause"), _ = g(d, "onPostPause");
1315
+ h?.({
1316
+ trap: v
1317
+ }), K(), v._setSubtreeIsolation(!1), re(), _?.({
1318
+ trap: v
1319
+ });
1320
+ } else {
1321
+ var S = g(d, "onUnpause"), N = g(d, "onPostUnpause");
1322
+ S?.({
1323
+ trap: v
1324
+ });
1325
+ var b = function() {
1326
+ B();
1327
+ var m = function() {
1328
+ v._setSubtreeIsolation(!0), re(), N?.({
1329
+ trap: v
1330
+ });
1331
+ }, y = ne();
1332
+ y ? y.then(m) : m();
1333
+ };
1334
+ b();
1335
+ }
1336
+ return this;
1337
+ }
1338
+ },
1339
+ _setSubtreeIsolation: {
1340
+ value: function(l) {
1341
+ c.isolateSubtrees && i.adjacentElements.forEach(function(d) {
1342
+ var h;
1343
+ l ? c.isolateSubtrees === "aria-hidden" ? ((d.ariaHidden === "true" || ((h = d.getAttribute("aria-hidden")) === null || h === void 0 ? void 0 : h.toLowerCase()) === "true") && i.alreadySilent.add(d), d.setAttribute("aria-hidden", "true")) : ((d.inert || d.hasAttribute("inert")) && i.alreadySilent.add(d), d.setAttribute("inert", !0)) : i.alreadySilent.has(d) || (c.isolateSubtrees === "aria-hidden" ? d.removeAttribute("aria-hidden") : d.removeAttribute("inert"));
1344
+ });
1345
+ }
1346
+ }
1347
+ }), v.updateContainerElements(e), v;
1348
+ };
1349
+ const $i = {
1350
+ escapeDeactivates: {
1351
+ type: Boolean,
1352
+ default: !0
1353
+ },
1354
+ returnFocusOnDeactivate: {
1355
+ type: Boolean,
1356
+ default: !0
1357
+ },
1358
+ allowOutsideClick: {
1359
+ type: [Boolean, Function],
1360
+ default: !0
1361
+ },
1362
+ clickOutsideDeactivates: [Boolean, Function],
1363
+ initialFocus: [String, Function, Boolean],
1364
+ fallbackFocus: [String, Function],
1365
+ checkCanFocusTrap: Function,
1366
+ checkCanReturnFocus: Function,
1367
+ delayInitialFocus: {
1368
+ type: Boolean,
1369
+ default: !0
1370
+ },
1371
+ document: Object,
1372
+ preventScroll: Boolean,
1373
+ setReturnFocus: [Object, String, Boolean, Function],
1374
+ tabbableOptions: Object
1375
+ }, Ei = ae({
1376
+ name: "FocusTrap",
1377
+ props: Object.assign({
1378
+ active: {
1379
+ // TODO: could be options for activate but what about the options for deactivating?
1380
+ type: Boolean,
1381
+ default: !0
1382
+ }
1383
+ }, $i),
1384
+ emits: [
1385
+ "update:active",
1386
+ "activate",
1387
+ "postActivate",
1388
+ "deactivate",
1389
+ "postDeactivate"
1390
+ ],
1391
+ render() {
1392
+ return this.renderImpl();
1393
+ },
1394
+ setup(a, { slots: e, emit: r }) {
1395
+ let n;
1396
+ const s = ee(null), c = C(() => {
1397
+ const v = s.value;
1398
+ return v && (v instanceof HTMLElement ? v : v.$el);
1399
+ });
1400
+ function i() {
1401
+ return n || (n = Oi(c.value, {
1402
+ escapeDeactivates: a.escapeDeactivates,
1403
+ allowOutsideClick: a.allowOutsideClick,
1404
+ returnFocusOnDeactivate: a.returnFocusOnDeactivate,
1405
+ clickOutsideDeactivates: a.clickOutsideDeactivates,
1406
+ onActivate: () => {
1407
+ r("update:active", !0), r("activate");
1408
+ },
1409
+ onDeactivate: () => {
1410
+ r("update:active", !1), r("deactivate");
1411
+ },
1412
+ onPostActivate: () => r("postActivate"),
1413
+ onPostDeactivate: () => r("postDeactivate"),
1414
+ initialFocus: a.initialFocus,
1415
+ fallbackFocus: a.fallbackFocus,
1416
+ tabbableOptions: a.tabbableOptions,
1417
+ delayInitialFocus: a.delayInitialFocus,
1418
+ preventScroll: a.preventScroll
1419
+ }));
1420
+ }
1421
+ return je(() => {
1422
+ Fe(() => a.active, (v) => {
1423
+ v && c.value ? i().activate() : n && (n.deactivate(), (!c.value || c.value.nodeType === Node.COMMENT_NODE) && (n = null));
1424
+ }, { immediate: !0, flush: "post" });
1425
+ }), Rn(() => {
1426
+ n && n.deactivate(), n = null;
1427
+ }), {
1428
+ activate() {
1429
+ i().activate();
1430
+ },
1431
+ deactivate() {
1432
+ n && n.deactivate();
1433
+ },
1434
+ renderImpl() {
1435
+ if (!e.default)
1436
+ return null;
1437
+ const v = e.default().filter((D) => D.type !== xn);
1438
+ return !v || !v.length || v.length > 1 ? (console.error("[focus-trap-vue]: FocusTrap requires exactly one child."), v) : Pn(v[0], { ref: s });
1439
+ }
1440
+ };
1441
+ }
1442
+ });
1443
+ function ba() {
1444
+ return {
1445
+ debounce: (e, r) => {
1446
+ let n;
1447
+ return (...s) => {
1448
+ clearTimeout(n), n = window?.setTimeout(() => {
1449
+ e(...s);
1450
+ }, r);
1451
+ };
1452
+ }
1453
+ };
1454
+ }
1455
+ var Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1456
+ function Ai(a) {
1457
+ return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
1458
+ }
1459
+ var Le = { exports: {} };
1460
+ Le.exports;
1461
+ var ea;
1462
+ function Ni() {
1463
+ return ea || (ea = 1, (function(a, e) {
1464
+ var r = 200, n = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", i = "[object Array]", v = "[object Boolean]", g = "[object Date]", D = "[object Error]", $ = "[object Function]", A = "[object GeneratorFunction]", P = "[object Map]", B = "[object Number]", E = "[object Object]", H = "[object Promise]", le = "[object RegExp]", G = "[object Set]", q = "[object String]", fe = "[object Symbol]", se = "[object WeakMap]", X = "[object ArrayBuffer]", z = "[object DataView]", ne = "[object Float32Array]", x = "[object Float64Array]", K = "[object Int8Array]", U = "[object Int16Array]", Y = "[object Int32Array]", re = "[object Uint8Array]", R = "[object Uint8ClampedArray]", l = "[object Uint16Array]", d = "[object Uint32Array]", h = /[\\^$.*+?()[\]{}|]/g, _ = /\w*$/, S = /^\[object .+?Constructor\]$/, N = /^(?:0|[1-9]\d*)$/, b = {};
1465
+ b[c] = b[i] = b[X] = b[z] = b[v] = b[g] = b[ne] = b[x] = b[K] = b[U] = b[Y] = b[P] = b[B] = b[E] = b[le] = b[G] = b[q] = b[fe] = b[re] = b[R] = b[l] = b[d] = !0, b[D] = b[$] = b[se] = !1;
1466
+ var f = typeof Ve == "object" && Ve && Ve.Object === Object && Ve, m = typeof self == "object" && self && self.Object === Object && self, y = f || m || Function("return this")(), k = e && !e.nodeType && e, j = k && !0 && a && !a.nodeType && a, M = j && j.exports === k;
1467
+ function ie(t, o) {
1468
+ return t.set(o[0], o[1]), t;
1469
+ }
1470
+ function Te(t, o) {
1471
+ return t.add(o), t;
1472
+ }
1473
+ function De(t, o) {
1474
+ for (var u = -1, w = t ? t.length : 0; ++u < w && o(t[u], u, t) !== !1; )
1475
+ ;
1476
+ return t;
1477
+ }
1478
+ function pa(t, o) {
1479
+ for (var u = -1, w = o.length, W = t.length; ++u < w; )
1480
+ t[W + u] = o[u];
1481
+ return t;
1482
+ }
1483
+ function Tt(t, o, u, w) {
1484
+ for (var W = -1, Q = t ? t.length : 0; ++W < Q; )
1485
+ u = o(u, t[W], W, t);
1486
+ return u;
1487
+ }
1488
+ function ha(t, o) {
1489
+ for (var u = -1, w = Array(t); ++u < t; )
1490
+ w[u] = o(u);
1491
+ return w;
1492
+ }
1493
+ function ma(t, o) {
1494
+ return t?.[o];
1495
+ }
1496
+ function It(t) {
1497
+ var o = !1;
1498
+ if (t != null && typeof t.toString != "function")
1499
+ try {
1500
+ o = !!(t + "");
1501
+ } catch {
1502
+ }
1503
+ return o;
1504
+ }
1505
+ function Ct(t) {
1506
+ var o = -1, u = Array(t.size);
1507
+ return t.forEach(function(w, W) {
1508
+ u[++o] = [W, w];
1509
+ }), u;
1510
+ }
1511
+ function it(t, o) {
1512
+ return function(u) {
1513
+ return t(o(u));
1514
+ };
1515
+ }
1516
+ function _t(t) {
1517
+ var o = -1, u = Array(t.size);
1518
+ return t.forEach(function(w) {
1519
+ u[++o] = w;
1520
+ }), u;
1521
+ }
1522
+ var ga = Array.prototype, ya = Function.prototype, Ke = Object.prototype, ot = y["__core-js_shared__"], Ot = (function() {
1523
+ var t = /[^.]+$/.exec(ot && ot.keys && ot.keys.IE_PROTO || "");
1524
+ return t ? "Symbol(src)_1." + t : "";
1525
+ })(), $t = ya.toString, ve = Ke.hasOwnProperty, Ze = Ke.toString, wa = RegExp(
1526
+ "^" + $t.call(ve).replace(h, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1527
+ ), Et = M ? y.Buffer : void 0, At = y.Symbol, Nt = y.Uint8Array, ka = it(Object.getPrototypeOf, Object), Sa = Object.create, Ta = Ke.propertyIsEnumerable, Ia = ga.splice, Ft = Object.getOwnPropertySymbols, Ca = Et ? Et.isBuffer : void 0, _a = it(Object.keys, Object), st = _e(y, "DataView"), Re = _e(y, "Map"), lt = _e(y, "Promise"), ct = _e(y, "Set"), ut = _e(y, "WeakMap"), xe = _e(Object, "create"), Oa = me(st), $a = me(Re), Ea = me(lt), Aa = me(ct), Na = me(ut), Dt = At ? At.prototype : void 0, Rt = Dt ? Dt.valueOf : void 0;
1528
+ function pe(t) {
1529
+ var o = -1, u = t ? t.length : 0;
1530
+ for (this.clear(); ++o < u; ) {
1531
+ var w = t[o];
1532
+ this.set(w[0], w[1]);
1533
+ }
1534
+ }
1535
+ function Fa() {
1536
+ this.__data__ = xe ? xe(null) : {};
1537
+ }
1538
+ function Da(t) {
1539
+ return this.has(t) && delete this.__data__[t];
1540
+ }
1541
+ function Ra(t) {
1542
+ var o = this.__data__;
1543
+ if (xe) {
1544
+ var u = o[t];
1545
+ return u === n ? void 0 : u;
1546
+ }
1547
+ return ve.call(o, t) ? o[t] : void 0;
1548
+ }
1549
+ function xa(t) {
1550
+ var o = this.__data__;
1551
+ return xe ? o[t] !== void 0 : ve.call(o, t);
1552
+ }
1553
+ function Pa(t, o) {
1554
+ var u = this.__data__;
1555
+ return u[t] = xe && o === void 0 ? n : o, this;
1556
+ }
1557
+ pe.prototype.clear = Fa, pe.prototype.delete = Da, pe.prototype.get = Ra, pe.prototype.has = xa, pe.prototype.set = Pa;
1558
+ function ce(t) {
1559
+ var o = -1, u = t ? t.length : 0;
1560
+ for (this.clear(); ++o < u; ) {
1561
+ var w = t[o];
1562
+ this.set(w[0], w[1]);
1563
+ }
1564
+ }
1565
+ function La() {
1566
+ this.__data__ = [];
1567
+ }
1568
+ function Ba(t) {
1569
+ var o = this.__data__, u = He(o, t);
1570
+ if (u < 0)
1571
+ return !1;
1572
+ var w = o.length - 1;
1573
+ return u == w ? o.pop() : Ia.call(o, u, 1), !0;
1574
+ }
1575
+ function Ma(t) {
1576
+ var o = this.__data__, u = He(o, t);
1577
+ return u < 0 ? void 0 : o[u][1];
1578
+ }
1579
+ function ja(t) {
1580
+ return He(this.__data__, t) > -1;
1581
+ }
1582
+ function Ka(t, o) {
1583
+ var u = this.__data__, w = He(u, t);
1584
+ return w < 0 ? u.push([t, o]) : u[w][1] = o, this;
1585
+ }
1586
+ ce.prototype.clear = La, ce.prototype.delete = Ba, ce.prototype.get = Ma, ce.prototype.has = ja, ce.prototype.set = Ka;
1587
+ function Ie(t) {
1588
+ var o = -1, u = t ? t.length : 0;
1589
+ for (this.clear(); ++o < u; ) {
1590
+ var w = t[o];
1591
+ this.set(w[0], w[1]);
1592
+ }
1593
+ }
1594
+ function Za() {
1595
+ this.__data__ = {
1596
+ hash: new pe(),
1597
+ map: new (Re || ce)(),
1598
+ string: new pe()
1599
+ };
1600
+ }
1601
+ function Ha(t) {
1602
+ return We(this, t).delete(t);
1603
+ }
1604
+ function Wa(t) {
1605
+ return We(this, t).get(t);
1606
+ }
1607
+ function Ga(t) {
1608
+ return We(this, t).has(t);
1609
+ }
1610
+ function za(t, o) {
1611
+ return We(this, t).set(t, o), this;
1612
+ }
1613
+ Ie.prototype.clear = Za, Ie.prototype.delete = Ha, Ie.prototype.get = Wa, Ie.prototype.has = Ga, Ie.prototype.set = za;
1614
+ function Ce(t) {
1615
+ this.__data__ = new ce(t);
1616
+ }
1617
+ function Ua() {
1618
+ this.__data__ = new ce();
1619
+ }
1620
+ function Va(t) {
1621
+ return this.__data__.delete(t);
1622
+ }
1623
+ function qa(t) {
1624
+ return this.__data__.get(t);
1625
+ }
1626
+ function Xa(t) {
1627
+ return this.__data__.has(t);
1628
+ }
1629
+ function Ya(t, o) {
1630
+ var u = this.__data__;
1631
+ if (u instanceof ce) {
1632
+ var w = u.__data__;
1633
+ if (!Re || w.length < r - 1)
1634
+ return w.push([t, o]), this;
1635
+ u = this.__data__ = new Ie(w);
1636
+ }
1637
+ return u.set(t, o), this;
1638
+ }
1639
+ Ce.prototype.clear = Ua, Ce.prototype.delete = Va, Ce.prototype.get = qa, Ce.prototype.has = Xa, Ce.prototype.set = Ya;
1640
+ function Qa(t, o) {
1641
+ var u = vt(t) || Tn(t) ? ha(t.length, String) : [], w = u.length, W = !!w;
1642
+ for (var Q in t)
1643
+ ve.call(t, Q) && !(W && (Q == "length" || yn(Q, w))) && u.push(Q);
1644
+ return u;
1645
+ }
1646
+ function xt(t, o, u) {
1647
+ var w = t[o];
1648
+ (!(ve.call(t, o) && Mt(w, u)) || u === void 0 && !(o in t)) && (t[o] = u);
1649
+ }
1650
+ function He(t, o) {
1651
+ for (var u = t.length; u--; )
1652
+ if (Mt(t[u][0], o))
1653
+ return u;
1654
+ return -1;
1655
+ }
1656
+ function Ja(t, o) {
1657
+ return t && Pt(o, bt(o), t);
1658
+ }
1659
+ function dt(t, o, u, w, W, Q, ue) {
1660
+ var J;
1661
+ if (w && (J = Q ? w(t, W, Q, ue) : w(t)), J !== void 0)
1662
+ return J;
1663
+ if (!Ge(t))
1664
+ return t;
1665
+ var Zt = vt(t);
1666
+ if (Zt) {
1667
+ if (J = hn(t), !o)
1668
+ return vn(t, J);
1669
+ } else {
1670
+ var Oe = he(t), Ht = Oe == $ || Oe == A;
1671
+ if (Cn(t))
1672
+ return on(t, o);
1673
+ if (Oe == E || Oe == c || Ht && !Q) {
1674
+ if (It(t))
1675
+ return Q ? t : {};
1676
+ if (J = mn(Ht ? {} : t), !o)
1677
+ return bn(t, Ja(J, t));
1678
+ } else {
1679
+ if (!b[Oe])
1680
+ return Q ? t : {};
1681
+ J = gn(t, Oe, dt, o);
1682
+ }
1683
+ }
1684
+ ue || (ue = new Ce());
1685
+ var Wt = ue.get(t);
1686
+ if (Wt)
1687
+ return Wt;
1688
+ if (ue.set(t, J), !Zt)
1689
+ var Gt = u ? pn(t) : bt(t);
1690
+ return De(Gt || t, function(pt, ze) {
1691
+ Gt && (ze = pt, pt = t[ze]), xt(J, ze, dt(pt, o, u, w, ze, t, ue));
1692
+ }), J;
1693
+ }
1694
+ function en(t) {
1695
+ return Ge(t) ? Sa(t) : {};
1696
+ }
1697
+ function tn(t, o, u) {
1698
+ var w = o(t);
1699
+ return vt(t) ? w : pa(w, u(t));
1700
+ }
1701
+ function an(t) {
1702
+ return Ze.call(t);
1703
+ }
1704
+ function nn(t) {
1705
+ if (!Ge(t) || kn(t))
1706
+ return !1;
1707
+ var o = Kt(t) || It(t) ? wa : S;
1708
+ return o.test(me(t));
1709
+ }
1710
+ function rn(t) {
1711
+ if (!Bt(t))
1712
+ return _a(t);
1713
+ var o = [];
1714
+ for (var u in Object(t))
1715
+ ve.call(t, u) && u != "constructor" && o.push(u);
1716
+ return o;
1717
+ }
1718
+ function on(t, o) {
1719
+ if (o)
1720
+ return t.slice();
1721
+ var u = new t.constructor(t.length);
1722
+ return t.copy(u), u;
1723
+ }
1724
+ function ft(t) {
1725
+ var o = new t.constructor(t.byteLength);
1726
+ return new Nt(o).set(new Nt(t)), o;
1727
+ }
1728
+ function sn(t, o) {
1729
+ var u = o ? ft(t.buffer) : t.buffer;
1730
+ return new t.constructor(u, t.byteOffset, t.byteLength);
1731
+ }
1732
+ function ln(t, o, u) {
1733
+ var w = o ? u(Ct(t), !0) : Ct(t);
1734
+ return Tt(w, ie, new t.constructor());
1735
+ }
1736
+ function cn(t) {
1737
+ var o = new t.constructor(t.source, _.exec(t));
1738
+ return o.lastIndex = t.lastIndex, o;
1739
+ }
1740
+ function un(t, o, u) {
1741
+ var w = o ? u(_t(t), !0) : _t(t);
1742
+ return Tt(w, Te, new t.constructor());
1743
+ }
1744
+ function dn(t) {
1745
+ return Rt ? Object(Rt.call(t)) : {};
1746
+ }
1747
+ function fn(t, o) {
1748
+ var u = o ? ft(t.buffer) : t.buffer;
1749
+ return new t.constructor(u, t.byteOffset, t.length);
1750
+ }
1751
+ function vn(t, o) {
1752
+ var u = -1, w = t.length;
1753
+ for (o || (o = Array(w)); ++u < w; )
1754
+ o[u] = t[u];
1755
+ return o;
1756
+ }
1757
+ function Pt(t, o, u, w) {
1758
+ u || (u = {});
1759
+ for (var W = -1, Q = o.length; ++W < Q; ) {
1760
+ var ue = o[W], J = void 0;
1761
+ xt(u, ue, J === void 0 ? t[ue] : J);
1762
+ }
1763
+ return u;
1764
+ }
1765
+ function bn(t, o) {
1766
+ return Pt(t, Lt(t), o);
1767
+ }
1768
+ function pn(t) {
1769
+ return tn(t, bt, Lt);
1770
+ }
1771
+ function We(t, o) {
1772
+ var u = t.__data__;
1773
+ return wn(o) ? u[typeof o == "string" ? "string" : "hash"] : u.map;
1774
+ }
1775
+ function _e(t, o) {
1776
+ var u = ma(t, o);
1777
+ return nn(u) ? u : void 0;
1778
+ }
1779
+ var Lt = Ft ? it(Ft, Object) : $n, he = an;
1780
+ (st && he(new st(new ArrayBuffer(1))) != z || Re && he(new Re()) != P || lt && he(lt.resolve()) != H || ct && he(new ct()) != G || ut && he(new ut()) != se) && (he = function(t) {
1781
+ var o = Ze.call(t), u = o == E ? t.constructor : void 0, w = u ? me(u) : void 0;
1782
+ if (w)
1783
+ switch (w) {
1784
+ case Oa:
1785
+ return z;
1786
+ case $a:
1787
+ return P;
1788
+ case Ea:
1789
+ return H;
1790
+ case Aa:
1791
+ return G;
1792
+ case Na:
1793
+ return se;
1794
+ }
1795
+ return o;
1796
+ });
1797
+ function hn(t) {
1798
+ var o = t.length, u = t.constructor(o);
1799
+ return o && typeof t[0] == "string" && ve.call(t, "index") && (u.index = t.index, u.input = t.input), u;
1800
+ }
1801
+ function mn(t) {
1802
+ return typeof t.constructor == "function" && !Bt(t) ? en(ka(t)) : {};
1803
+ }
1804
+ function gn(t, o, u, w) {
1805
+ var W = t.constructor;
1806
+ switch (o) {
1807
+ case X:
1808
+ return ft(t);
1809
+ case v:
1810
+ case g:
1811
+ return new W(+t);
1812
+ case z:
1813
+ return sn(t, w);
1814
+ case ne:
1815
+ case x:
1816
+ case K:
1817
+ case U:
1818
+ case Y:
1819
+ case re:
1820
+ case R:
1821
+ case l:
1822
+ case d:
1823
+ return fn(t, w);
1824
+ case P:
1825
+ return ln(t, w, u);
1826
+ case B:
1827
+ case q:
1828
+ return new W(t);
1829
+ case le:
1830
+ return cn(t);
1831
+ case G:
1832
+ return un(t, w, u);
1833
+ case fe:
1834
+ return dn(t);
1835
+ }
1836
+ }
1837
+ function yn(t, o) {
1838
+ return o = o ?? s, !!o && (typeof t == "number" || N.test(t)) && t > -1 && t % 1 == 0 && t < o;
1839
+ }
1840
+ function wn(t) {
1841
+ var o = typeof t;
1842
+ return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? t !== "__proto__" : t === null;
1843
+ }
1844
+ function kn(t) {
1845
+ return !!Ot && Ot in t;
1846
+ }
1847
+ function Bt(t) {
1848
+ var o = t && t.constructor, u = typeof o == "function" && o.prototype || Ke;
1849
+ return t === u;
1850
+ }
1851
+ function me(t) {
1852
+ if (t != null) {
1853
+ try {
1854
+ return $t.call(t);
1855
+ } catch {
1856
+ }
1857
+ try {
1858
+ return t + "";
1859
+ } catch {
1860
+ }
1861
+ }
1862
+ return "";
1863
+ }
1864
+ function Sn(t) {
1865
+ return dt(t, !0, !0);
1866
+ }
1867
+ function Mt(t, o) {
1868
+ return t === o || t !== t && o !== o;
1869
+ }
1870
+ function Tn(t) {
1871
+ return In(t) && ve.call(t, "callee") && (!Ta.call(t, "callee") || Ze.call(t) == c);
1872
+ }
1873
+ var vt = Array.isArray;
1874
+ function jt(t) {
1875
+ return t != null && _n(t.length) && !Kt(t);
1876
+ }
1877
+ function In(t) {
1878
+ return On(t) && jt(t);
1879
+ }
1880
+ var Cn = Ca || En;
1881
+ function Kt(t) {
1882
+ var o = Ge(t) ? Ze.call(t) : "";
1883
+ return o == $ || o == A;
1884
+ }
1885
+ function _n(t) {
1886
+ return typeof t == "number" && t > -1 && t % 1 == 0 && t <= s;
1887
+ }
1888
+ function Ge(t) {
1889
+ var o = typeof t;
1890
+ return !!t && (o == "object" || o == "function");
1891
+ }
1892
+ function On(t) {
1893
+ return !!t && typeof t == "object";
1894
+ }
1895
+ function bt(t) {
1896
+ return jt(t) ? Qa(t) : rn(t);
1897
+ }
1898
+ function $n() {
1899
+ return [];
1900
+ }
1901
+ function En() {
1902
+ return !1;
1903
+ }
1904
+ a.exports = Sn;
1905
+ })(Le, Le.exports)), Le.exports;
1906
+ }
1907
+ var Fi = Ni();
1908
+ const Di = /* @__PURE__ */ Ai(Fi), Ri = {
1909
+ key: 0,
1910
+ class: "sidebar-header"
1911
+ }, xi = { class: "sidebar-content-container" }, Pi = {
1912
+ key: 0,
1913
+ class: "sidebar-top"
1914
+ }, Li = { "aria-label": "Main menu" }, Bi = ["id"], Mi = ["aria-labelledby"], ji = {
1915
+ key: 1,
1916
+ class: "sidebar-level-divider",
1917
+ role: "separator"
1918
+ }, Ki = {
1919
+ key: 2,
1920
+ class: "level-primary bottom-items"
1921
+ }, Zi = { class: "sidebar-footer" }, ge = "_ungrouped", Hi = /* @__PURE__ */ ae({
1922
+ __name: "AppSidebar",
1923
+ props: {
1924
+ topItems: {
1925
+ type: Array,
1926
+ default: () => []
1927
+ },
1928
+ bottomItems: {
1929
+ type: Array,
1930
+ default: () => []
1931
+ },
1932
+ groupConfig: {
1933
+ type: Object,
1934
+ default: () => ({})
1935
+ },
1936
+ headerHeight: {
1937
+ type: Number,
1938
+ default: 60
1939
+ },
1940
+ topOffset: {
1941
+ type: Number,
1942
+ default: 0
1943
+ },
1944
+ zIndex: {
1945
+ type: Number,
1946
+ default: 3
1947
+ },
1948
+ // Props that only impact mobile
1949
+ open: {
1950
+ type: Boolean,
1951
+ default: !1
1952
+ },
1953
+ mobileEnabled: {
1954
+ type: Boolean,
1955
+ default: !1
1956
+ },
1957
+ mobileTopOffset: {
1958
+ type: Number,
1959
+ default: 0
1960
+ },
1961
+ mobileHeaderVisible: {
1962
+ type: Boolean,
1963
+ default: !1
1964
+ },
1965
+ mobileCloseDelay: {
1966
+ type: Number,
1967
+ default: 350
1968
+ },
1969
+ mobileOverlay: {
1970
+ type: Boolean,
1971
+ default: !0
1972
+ },
1973
+ mobileOverlayZIndex: {
1974
+ type: Number,
1975
+ default: null
1976
+ },
1977
+ mobileOverlayCloseOnClick: {
1978
+ type: Boolean,
1979
+ default: !0
1980
+ }
1981
+ },
1982
+ emits: ["click", "toggle", "toggle-collapse"],
1983
+ setup(a, { emit: e }) {
1984
+ St((f) => ({
1985
+ v0340c522: v.value.mobileHeight,
1986
+ v7ecf873a: v.value.mobileTop,
1987
+ v9b443174: a.zIndex,
1988
+ v682f08a0: v.value.height,
1989
+ b2c3b708: v.value.top,
1990
+ v537cb660: D.value.marginTop,
1991
+ v766c92ce: N.value,
1992
+ v05a90ebc: g.value.display,
1993
+ v28e7fd93: g.value.minHeight,
1994
+ f5f71bea: $.value.top,
1995
+ v68798002: $.value.zIndex
1996
+ }));
1997
+ const r = e, n = a, s = rt(), c = C(() => !!s.header), i = C(() => !!s.top), v = C(() => ({
1998
+ mobileTop: n.mobileTopOffset && n.mobileEnabled ? `${n.mobileTopOffset}px` : n.topOffset ? `${n.topOffset}px` : "0",
1999
+ top: n.topOffset ? `${n.topOffset}px` : "0",
2000
+ mobileHeight: n.mobileTopOffset && n.mobileEnabled ? `calc(100% - ${n.mobileTopOffset}px)` : "100%",
2001
+ height: n.topOffset ? `calc(100% - ${n.topOffset}px)` : "100%"
2002
+ })), g = C(() => ({
2003
+ display: !n.mobileHeaderVisible && n.mobileEnabled ? "none" : "flex",
2004
+ minHeight: `${n.headerHeight}px`
2005
+ })), D = C(() => ({
2006
+ marginTop: c.value ? `${n.headerHeight}px` : "0"
2007
+ })), $ = C(() => ({
2008
+ top: n.mobileTopOffset && n.mobileEnabled ? `${n.mobileTopOffset}px` : "0",
2009
+ zIndex: n.mobileOverlayZIndex !== null ? n.mobileOverlayZIndex : n.zIndex > 1 ? n.zIndex - 1 : 1
2010
+ })), A = (f) => Di(f).map((y) => {
2011
+ if (y) {
2012
+ (!y.key || !y.key?.trim()) && (y.key = String(y.name || "").trim().toLowerCase().replace(/[^[a-z]/gi, "-")), (!y.testId || !y.testId?.trim()) && (y.testId = String(y.name || "").trim().toLowerCase().replace(/[^[a-z]/gi, "-"));
2013
+ for (const k of y.items || [])
2014
+ k.parentKey = y.key, (!k.testId || !k.testId?.trim()) && (k.testId = String(k.name || "").trim().toLowerCase().replace(/[^[a-z]/gi, "-"));
2015
+ }
2016
+ return y;
2017
+ }), P = C(() => n.topItems.length ? A(n.topItems) : []), B = C(() => n.bottomItems.length ? A(n.bottomItems) : []), E = (f = "") => f.trim().replace(" ", "").replace(/[^a-z0-9]+/gi, "-").toLowerCase(), H = C(() => {
2018
+ const f = /* @__PURE__ */ new Map();
2019
+ f.set(ge, []);
2020
+ for (const m of P.value) {
2021
+ const y = m.group || ge;
2022
+ f.has(y) || f.set(y, []), f.get(y)?.push(m);
2023
+ }
2024
+ return f;
2025
+ }), le = jr(`max-width: ${cr}`), G = (f = "") => {
2026
+ if (f === ge || !f.trim())
2027
+ return null;
2028
+ const m = {
2029
+ label: f,
2030
+ collapsible: !1,
2031
+ collapsed: !1
2032
+ };
2033
+ let y = f.trim().replace(" ", "");
2034
+ return y = y.charAt(0).toLowerCase() + y.slice(1), f && n.groupConfig && (n.groupConfig[f] || n.groupConfig[y]) ? n.groupConfig[f] || n.groupConfig[y] : m;
2035
+ }, q = (f) => !!G(f)?.collapsible, fe = (f) => !!G(f)?.collapsed, se = (f, m, y) => {
2036
+ const k = G(f);
2037
+ k && (k.collapsed = !m), y(), r("toggle-collapse", f, k);
2038
+ }, X = ee(n.open), z = (f) => {
2039
+ X.value !== f && (X.value = f, r("toggle", f)), f ? document?.body?.classList.add("kong-ui-app-sidebar-open") : document?.body?.classList.remove("kong-ui-app-sidebar-open"), x.value = !1;
2040
+ }, ne = () => {
2041
+ n.mobileOverlayCloseOnClick && z(!1);
2042
+ }, x = ee(!1), K = (f) => {
2043
+ x.value = !0, r("click", f), setTimeout(() => {
2044
+ z(!1);
2045
+ }, n.mobileCloseDelay);
2046
+ };
2047
+ Fe(() => n.open, (f) => {
2048
+ z(f);
2049
+ });
2050
+ const { debounce: U } = ba(), Y = U(() => {
2051
+ X.value && re.value !== window?.innerWidth && (re.value = window?.innerWidth, z(!1));
2052
+ }, 200), re = ee(), R = ee(!1), l = ee(), d = () => {
2053
+ R.value || (R.value = !0, clearTimeout(l.value), l.value = setTimeout(() => R.value = !1, 1300));
2054
+ }, h = ee(null), _ = C(() => X.value && n.mobileEnabled), S = async (f) => {
2055
+ f ? (await zt(), await new Promise((m) => setTimeout(m, 300)), h.value?.activate()) : h.value?.deactivate();
2056
+ };
2057
+ Fe(_, async (f) => {
2058
+ f ? await S(!0) : await S(!1);
2059
+ }, { immediate: !0 });
2060
+ const N = ee("0px"), b = () => {
2061
+ if (!(/Mac|iPhone|iPod|iPad/i.test(navigator?.platform) || /macOS|Mac|iPhone|iPod|iPad/i.test(navigator?.userAgentData?.platform)))
2062
+ return;
2063
+ const m = document.createElement("div");
2064
+ m.style.visibility = "hidden", m.style.width = "100px", document.body.appendChild(m);
2065
+ const y = m.offsetWidth;
2066
+ m.style.overflow = "scroll";
2067
+ const k = document.createElement("div");
2068
+ k.style.width = "100%", m.appendChild(k);
2069
+ const j = k.offsetWidth;
2070
+ m.parentNode && m.parentNode.removeChild(m), y - j === 0 && (N.value = "8px");
2071
+ };
2072
+ return je(async () => {
2073
+ if (re.value = window?.innerWidth, window.addEventListener("resize", Y), window.addEventListener("resize", d), n.groupConfig && le.value)
2074
+ for (const f in n.groupConfig) {
2075
+ const m = n.groupConfig[f];
2076
+ m.collapsed = !1;
2077
+ }
2078
+ await zt(), b();
2079
+ }), ra(() => {
2080
+ window.removeEventListener("resize", Y), window.removeEventListener("resize", d);
2081
+ }), (f, m) => {
2082
+ const y = ke("KCollapse");
2083
+ return p(), T(Ee, null, [
2084
+ X.value && a.mobileOverlay && a.mobileEnabled ? (p(), T("div", {
2085
+ key: 0,
2086
+ class: "kong-ui-app-sidebar-overlay",
2087
+ onClick: ne
2088
+ })) : F("", !0),
2089
+ Qe(be(Ei), {
2090
+ ref_key: "focusTrap",
2091
+ ref: h,
2092
+ active: !1,
2093
+ "allow-outside-click": "",
2094
+ "fallback-focus": ".kong-ui-app-sidebar"
2095
+ }, {
2096
+ default: L(() => [
2097
+ I("aside", {
2098
+ class: te(["kong-ui-app-sidebar", {
2099
+ "sidebar-open": X.value,
2100
+ "no-sidebar-header": !c.value,
2101
+ "mobile-header-hidden": a.mobileEnabled && (!c.value || !a.mobileHeaderVisible),
2102
+ "mobile-disabled": !a.mobileEnabled,
2103
+ "disable-transitions": R.value
2104
+ }]),
2105
+ tabindex: "-1"
2106
+ }, [
2107
+ c.value ? (p(), T("div", Ri, [
2108
+ O(f.$slots, "header", {}, void 0, !0)
2109
+ ])) : F("", !0),
2110
+ I("div", xi, [
2111
+ i.value ? (p(), T("div", Pi, [
2112
+ O(f.$slots, "top", {}, void 0, !0)
2113
+ ])) : F("", !0),
2114
+ I("nav", Li, [
2115
+ H.value.size > 0 ? (p(!0), T(Ee, { key: 0 }, we(H.value, ([k, j]) => (p(), Z(y, {
2116
+ key: k,
2117
+ class: te(["level-primary-group-collapse", {
2118
+ "not-collapsible": !q(k),
2119
+ ungrouped: k === ge
2120
+ }]),
2121
+ "data-testid": k === ge ? "level-primary-group-collapse-ungrouped" : `level-primary-group-collapse-${k}`,
2122
+ "model-value": q(k) && fe(k) || !1
2123
+ }, {
2124
+ trigger: L(({ isCollapsed: M, toggle: ie }) => [
2125
+ (p(), Z(Ne(q(k) ? be(jn) : "div"), {
2126
+ appearance: q(k) ? "none" : void 0,
2127
+ class: "level-primary-group-collapse-trigger",
2128
+ onClick: (Te) => q(k) ? se(k, M, ie) : void 0
2129
+ }, {
2130
+ default: L(() => [
2131
+ k !== ge ? (p(), T("div", {
2132
+ key: 0,
2133
+ id: `level-primary-group-${E(k)}`,
2134
+ class: "level-primary-group-name",
2135
+ "data-testid": "level-primary-group-name",
2136
+ role: "presentation"
2137
+ }, V(G(k)?.label || k), 9, Bi)) : F("", !0),
2138
+ q(k) ? (p(), Z(Ne(M ? be(ia) : be(Mn)), {
2139
+ key: 1,
2140
+ class: "level-primary-group-collapse-icon",
2141
+ color: `var(--kui-navigation-color-text, ${be(dr)})`,
2142
+ "data-testid": "level-primary-group-collapse-icon",
2143
+ size: `var(--kui-icon-size-30, ${be(ur)})`
2144
+ }, null, 8, ["color", "size"])) : F("", !0)
2145
+ ]),
2146
+ _: 2
2147
+ }, 1032, ["appearance", "onClick"]))
2148
+ ]),
2149
+ default: L(() => [
2150
+ I("ul", {
2151
+ "aria-labelledby": k !== ge ? `level-primary-group-${E(k)}` : void 0,
2152
+ class: "level-primary top-items"
2153
+ }, [
2154
+ (p(!0), T(Ee, null, we(j, (M) => (p(), Z(Vt, {
2155
+ key: M.name,
2156
+ item: M,
2157
+ onClick: K
2158
+ }, Ye({
2159
+ [`sidebar-icon-${M.key}`]: L(() => [
2160
+ O(f.$slots, `sidebar-icon-${M.key}`, {}, void 0, !0)
2161
+ ]),
2162
+ _: 2
2163
+ }, [
2164
+ f.$slots[`sidebar-after-${M.key}`] ? {
2165
+ name: `sidebar-after-${M.key}`,
2166
+ fn: L(() => [
2167
+ O(f.$slots, `sidebar-after-${M.key}`, {}, void 0, !0)
2168
+ ]),
2169
+ key: "0"
2170
+ } : void 0
2171
+ ]), 1032, ["item"]))), 128))
2172
+ ], 8, Mi)
2173
+ ]),
2174
+ _: 2
2175
+ }, 1032, ["class", "data-testid", "model-value"]))), 128)) : F("", !0),
2176
+ H.value.size > 0 && B.value.length ? (p(), T("div", ji)) : F("", !0),
2177
+ B.value.length ? (p(), T("ul", Ki, [
2178
+ (p(!0), T(Ee, null, we(B.value, (k) => (p(), Z(Vt, {
2179
+ key: k.name,
2180
+ item: k,
2181
+ onClick: K
2182
+ }, {
2183
+ [`sidebar-icon-${k.key}`]: L(() => [
2184
+ O(f.$slots, `sidebar-icon-${k.key}`, {}, void 0, !0)
2185
+ ]),
2186
+ _: 2
2187
+ }, 1032, ["item"]))), 128))
2188
+ ])) : F("", !0)
2189
+ ])
2190
+ ]),
2191
+ I("div", Zi, [
2192
+ O(f.$slots, "footer", {}, void 0, !0)
2193
+ ])
2194
+ ], 2)
2195
+ ]),
2196
+ _: 3
2197
+ }, 512)
2198
+ ], 64);
2199
+ };
2200
+ }
2201
+ }), Wi = /* @__PURE__ */ oe(Hi, [["__scopeId", "data-v-2fffff37"]]), Gi = ["aria-label"], zi = /* @__PURE__ */ ae({
2202
+ __name: "SidebarToggle",
2203
+ props: {
2204
+ active: {
2205
+ type: Boolean,
2206
+ default: !1
2207
+ }
2208
+ },
2209
+ emits: ["toggle"],
2210
+ setup(a, { emit: e }) {
2211
+ const r = e, n = a, s = ee(n.active || !1), c = (i) => {
2212
+ i.preventDefault(), s.value = !s.value, r("toggle", s.value);
2213
+ };
2214
+ return Fe(() => n.active, (i) => {
2215
+ s.value = i;
2216
+ }), (i, v) => (p(), T("a", {
2217
+ "aria-haspopup": "true",
2218
+ "aria-label": s.value ? "Close Main Menu" : "Open Main Menu",
2219
+ class: te(["sidebar-menu-toggle", { active: s.value }]),
2220
+ href: "#",
2221
+ role: "button",
2222
+ onClick: Ln(c, ["prevent"])
2223
+ }, [...v[0] || (v[0] = [
2224
+ I("span", { class: "line" }, null, -1),
2225
+ I("span", { class: "line" }, null, -1),
2226
+ I("span", { class: "line" }, null, -1)
2227
+ ])], 10, Gi));
2228
+ }
2229
+ }), Ui = /* @__PURE__ */ oe(zi, [["__scopeId", "data-v-2238b0de"]]), Vi = { id: "kong-ui-app-layout-notification" }, qi = { class: "mobile-logo" }, Xi = {
2230
+ key: 0,
2231
+ class: "navbar-logo"
2232
+ }, Yi = {
2233
+ class: "kong-ui-app-layout-main",
2234
+ "data-testid": "kong-ui-app-layout-main"
2235
+ }, Qi = { class: "kong-ui-app-layout-content" }, Ji = /* @__PURE__ */ ae({
2236
+ __name: "AppLayout",
2237
+ props: {
2238
+ hideDefaultSlot: {
2239
+ type: Boolean,
2240
+ default: !1
2241
+ },
2242
+ // Navbar props
2243
+ navbarHidden: {
2244
+ type: Boolean,
2245
+ default: !1
2246
+ },
2247
+ // Sidebar props
2248
+ sidebarHidden: {
2249
+ type: Boolean,
2250
+ default: !1
2251
+ },
2252
+ sidebarOpen: {
2253
+ type: Boolean,
2254
+ default: !1
2255
+ },
2256
+ sidebarTopItems: {
2257
+ type: Array,
2258
+ default: () => []
2259
+ },
2260
+ sidebarBottomItems: {
2261
+ type: Array,
2262
+ default: () => []
2263
+ },
2264
+ groupConfig: {
2265
+ type: Object,
2266
+ default: () => ({})
2267
+ },
2268
+ theme: {
2269
+ type: String,
2270
+ default: "light",
2271
+ validator: (a) => ["light", "dark"].includes(a)
2272
+ },
2273
+ removeContentInnerPadding: {
2274
+ type: Boolean,
2275
+ default: !1
2276
+ }
2277
+ },
2278
+ emits: ["sidebar-click", "update:topOffset", "toggle-collapse"],
2279
+ setup(a, { emit: e }) {
2280
+ St((x) => ({
2281
+ v5526a015: G.value,
2282
+ v3240b80b: q.value,
2283
+ v71472eba: le.value,
2284
+ v709f53f2: fe.value,
2285
+ v0010e23a: se.value
2286
+ }));
2287
+ const r = a, n = e, s = rt(), c = qe({
2288
+ navbarLeft: C(() => !!s["navbar-left"]),
2289
+ navbarCenter: C(() => !!s["navbar-center"]),
2290
+ navbarRight: C(() => !!s["navbar-right"]),
2291
+ navbarLogo: C(() => !!s["navbar-logo"]),
2292
+ navbarMobileLogo: C(() => !!s["navbar-mobile-logo"]),
2293
+ sidebarHeader: C(() => !!s["sidebar-header"]),
2294
+ sidebarTop: C(() => !!s["sidebar-top"]),
2295
+ sidebarFooter: C(() => !!s["sidebar-footer"])
2296
+ }), i = C(() => r.hideDefaultSlot), v = qe({
2297
+ hidden: C(() => r.navbarHidden)
2298
+ }), g = qe({
2299
+ topItems: C(() => r.sidebarTopItems),
2300
+ bottomItems: C(() => r.sidebarBottomItems),
2301
+ open: C(() => r.sidebarOpen),
2302
+ hidden: C(() => r.sidebarHidden)
2303
+ }), D = (x) => {
2304
+ n("sidebar-click", x);
2305
+ }, $ = ee(!1), A = (x) => {
2306
+ $.value = x;
2307
+ };
2308
+ na(() => {
2309
+ $.value = Bn(g, "open").value || !1;
2310
+ });
2311
+ const P = ee(0), B = ee(60), E = ee(0), H = C(() => v.hidden ? E.value : B.value + E.value), le = C(() => r.theme === "light" ? ir : or), G = C(() => r.theme === "light" ? ar : rr), q = C(() => r.theme === "light" ? "var(--kong-ui-app-layout-main-box-shadow, -30px 174px 250px #0023db)" : "none"), fe = C(() => `${H.value}px`), se = C(() => g.hidden || v.hidden ? sr : lr), { debounce: X } = ba(), z = X((x = !1) => {
2312
+ if (x || P.value !== window?.innerWidth) {
2313
+ P.value = window?.innerWidth;
2314
+ const K = document?.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");
2315
+ K && (E.value = K.offsetHeight);
2316
+ }
2317
+ }, 200), ne = ee();
2318
+ return Fe(E, (x) => {
2319
+ n("update:topOffset", x || 0);
2320
+ }, { immediate: !0 }), je(() => {
2321
+ document?.body?.classList.add("kong-ui-app-layout-body"), document?.documentElement?.classList.add("kong-ui-app-layout-html"), P.value = window?.innerWidth, z(!0);
2322
+ const x = document?.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");
2323
+ x && (ne.value = new ResizeObserver((K) => {
2324
+ window.requestAnimationFrame(() => {
2325
+ if (!(!Array.isArray(K) || !K.length))
2326
+ for (const U of K) {
2327
+ const Y = U.contentRect.height;
2328
+ E.value !== Y && (E.value = Y);
2329
+ }
2330
+ });
2331
+ }), ne.value.observe(x)), window.addEventListener("resize", z);
2332
+ }), ra(() => {
2333
+ ne.value && ne.value.disconnect(), window.removeEventListener("resize", z);
2334
+ }), (x, K) => (p(), T("div", {
2335
+ class: te(["kong-ui-app-layout", [
2336
+ { "navbar-hidden": v.hidden },
2337
+ { "sidebar-hidden": g.hidden }
2338
+ ]])
2339
+ }, [
2340
+ I("div", Vi, [
2341
+ O(x.$slots, "notification", {}, void 0, !0)
2342
+ ]),
2343
+ v.hidden ? F("", !0) : (p(), Z($r, {
2344
+ key: String(g.hidden),
2345
+ "left-offset": g.hidden ? 0 : void 0,
2346
+ "top-offset": E.value
2347
+ }, Ye({
2348
+ "mobile-sidebar-toggle": L(() => [
2349
+ g.hidden ? F("", !0) : (p(), Z(Ui, {
2350
+ key: 0,
2351
+ active: $.value,
2352
+ onToggle: A
2353
+ }, null, 8, ["active"]))
2354
+ ]),
2355
+ _: 2
2356
+ }, [
2357
+ c.navbarMobileLogo ? {
2358
+ name: "mobile-logo",
2359
+ fn: L(() => [
2360
+ I("div", qi, [
2361
+ O(x.$slots, "navbar-mobile-logo", {}, void 0, !0)
2362
+ ])
2363
+ ]),
2364
+ key: "0"
2365
+ } : void 0,
2366
+ c.navbarLogo ? {
2367
+ name: "logo",
2368
+ fn: L(() => [
2369
+ g.hidden ? (p(), T("div", Xi, [
2370
+ O(x.$slots, "navbar-logo", {}, void 0, !0)
2371
+ ])) : F("", !0)
2372
+ ]),
2373
+ key: "1"
2374
+ } : void 0,
2375
+ c.navbarLeft ? {
2376
+ name: "left",
2377
+ fn: L(() => [
2378
+ O(x.$slots, "navbar-left", {}, void 0, !0)
2379
+ ]),
2380
+ key: "2"
2381
+ } : void 0,
2382
+ c.navbarCenter ? {
2383
+ name: "center",
2384
+ fn: L(() => [
2385
+ O(x.$slots, "navbar-center", {}, void 0, !0)
2386
+ ]),
2387
+ key: "3"
2388
+ } : void 0,
2389
+ c.navbarRight ? {
2390
+ name: "right",
2391
+ fn: L(() => [
2392
+ O(x.$slots, "navbar-right", {}, void 0, !0)
2393
+ ]),
2394
+ key: "4"
2395
+ } : void 0
2396
+ ]), 1032, ["left-offset", "top-offset"])),
2397
+ g.hidden ? F("", !0) : (p(), Z(Wi, {
2398
+ key: 1,
2399
+ "bottom-items": g.bottomItems,
2400
+ "group-config": a.groupConfig,
2401
+ "header-height": B.value,
2402
+ "mobile-enabled": "",
2403
+ "mobile-header-visible": !1,
2404
+ "mobile-top-offset": H.value,
2405
+ open: $.value,
2406
+ "top-items": g.topItems,
2407
+ "top-offset": E.value,
2408
+ onClick: D,
2409
+ onToggle: A,
2410
+ onToggleCollapse: K[0] || (K[0] = (U, Y) => n("toggle-collapse", U, Y))
2411
+ }, Ye({ _: 2 }, [
2412
+ c.sidebarHeader ? {
2413
+ name: "header",
2414
+ fn: L(() => [
2415
+ O(x.$slots, "sidebar-header", {}, void 0, !0)
2416
+ ]),
2417
+ key: "0"
2418
+ } : void 0,
2419
+ c.sidebarTop ? {
2420
+ name: "top",
2421
+ fn: L(() => [
2422
+ O(x.$slots, "sidebar-top", {}, void 0, !0)
2423
+ ]),
2424
+ key: "1"
2425
+ } : void 0,
2426
+ c.sidebarFooter ? {
2427
+ name: "footer",
2428
+ fn: L(() => [
2429
+ O(x.$slots, "sidebar-footer", {}, void 0, !0)
2430
+ ]),
2431
+ key: "2"
2432
+ } : void 0,
2433
+ we([...g.topItems || [], ...g.bottomItems || []], (U) => ({
2434
+ name: `sidebar-icon-${U.key}`,
2435
+ fn: L(() => [
2436
+ O(x.$slots, `sidebar-icon-${U.key}`, {}, void 0, !0)
2437
+ ])
2438
+ })),
2439
+ we([...g.topItems || [], ...g.bottomItems || []], (U) => ({
2440
+ name: `sidebar-after-${U.key}`,
2441
+ fn: L(() => [
2442
+ O(x.$slots, `sidebar-after-${U.key}`, {}, void 0, !0)
2443
+ ])
2444
+ }))
2445
+ ]), 1032, ["bottom-items", "group-config", "header-height", "mobile-top-offset", "open", "top-items", "top-offset"])),
2446
+ I("main", Yi, [
2447
+ I("div", Qi, [
2448
+ I("div", {
2449
+ class: te(["kong-ui-app-layout-content-inner", { "remove-inner-padding": a.removeContentInnerPadding }])
2450
+ }, [
2451
+ K[1] || (K[1] = I("div", { id: "kong-ui-app-layout-teleport-default-slot" }, null, -1)),
2452
+ O(x.$slots, "app-error", {}, void 0, !0),
2453
+ i.value ? F("", !0) : O(x.$slots, "default", {}, void 0, !0, 0)
2454
+ ], 2)
2455
+ ])
2456
+ ])
2457
+ ], 2));
2458
+ }
2459
+ }), eo = /* @__PURE__ */ oe(Ji, [["__scopeId", "data-v-b9242b31"]]), to = { class: "kong-ui-app-page-header" }, ao = { class: "page-header-title-section" }, no = { class: "page-header-title-wrapper" }, ro = ["title"], io = {
2460
+ key: 0,
2461
+ class: "page-header-title-after",
2462
+ "data-testid": "page-header-title-after"
2463
+ }, oo = {
2464
+ key: 0,
2465
+ class: "page-header-actions",
2466
+ "data-testid": "page-header-actions"
2467
+ }, so = {
2468
+ key: 0,
2469
+ class: "page-header-section-below",
2470
+ "data-testid": "page-header-section-below"
2471
+ }, lo = /* @__PURE__ */ ae({
2472
+ __name: "AppPageHeader",
2473
+ props: {
2474
+ title: {
2475
+ type: String,
2476
+ default: ""
2477
+ // Provide a fallback string to prevent the component unmounting from throwing an error
2478
+ }
2479
+ },
2480
+ setup(a) {
2481
+ return (e, r) => (p(), T("div", to, [
2482
+ I("div", ao, [
2483
+ I("div", no, [
2484
+ I("h2", {
2485
+ class: "page-header-title",
2486
+ "data-testid": "page-header-title",
2487
+ title: a.title
2488
+ }, V(a.title), 9, ro),
2489
+ e.$slots["title-after"] ? (p(), T("div", io, [
2490
+ O(e.$slots, "title-after", {}, void 0, !0)
2491
+ ])) : F("", !0)
2492
+ ]),
2493
+ e.$slots.actions ? (p(), T("div", oo, [
2494
+ O(e.$slots, "actions", {}, void 0, !0)
2495
+ ])) : F("", !0)
2496
+ ]),
2497
+ e.$slots.below ? (p(), T("div", so, [
2498
+ O(e.$slots, "below", {}, void 0, !0)
2499
+ ])) : F("", !0)
2500
+ ]));
2501
+ }
2502
+ }), ko = /* @__PURE__ */ oe(lo, [["__scopeId", "data-v-ca888878"]]), co = { class: "app-page-info-section-default-header" }, uo = {
2503
+ key: 1,
2504
+ class: "app-page-info-section-description",
2505
+ "data-testid": "app-page-info-section-description"
2506
+ }, fo = {
2507
+ key: 0,
2508
+ class: "app-page-info-section-content",
2509
+ "data-testid": "app-page-info-section-content"
2510
+ }, vo = /* @__PURE__ */ ae({
2511
+ __name: "AppPageInfoSection",
2512
+ props: {
2513
+ collapsible: {
2514
+ type: Boolean,
2515
+ default: !0
2516
+ },
2517
+ title: {
2518
+ type: String,
2519
+ default: ""
2520
+ },
2521
+ description: {
2522
+ type: String,
2523
+ default: ""
2524
+ },
2525
+ titleTag: {
2526
+ type: String,
2527
+ default: "div",
2528
+ validator: (a) => Kn.includes(a)
2529
+ }
2530
+ },
2531
+ setup(a) {
2532
+ return (e, r) => (p(), Z(Ne(a.collapsible ? "details" : "div"), {
2533
+ class: "app-page-info-section",
2534
+ "data-testid": "app-page-info-section"
2535
+ }, {
2536
+ default: L(() => [
2537
+ (p(), Z(Ne(a.collapsible ? "summary" : "div"), {
2538
+ class: "app-page-info-section-header",
2539
+ "data-testid": "app-page-info-section-header"
2540
+ }, {
2541
+ default: L(() => [
2542
+ O(e.$slots, "header", {}, () => [
2543
+ I("div", co, [
2544
+ a.title ? (p(), Z(Ne(a.titleTag), {
2545
+ key: 0,
2546
+ class: "app-page-info-section-title",
2547
+ "data-testid": "app-page-info-section-title"
2548
+ }, {
2549
+ default: L(() => [
2550
+ Me(V(a.title), 1)
2551
+ ]),
2552
+ _: 1
2553
+ })) : F("", !0),
2554
+ a.description ? (p(), T("div", uo, V(a.description), 1)) : F("", !0)
2555
+ ])
2556
+ ], !0),
2557
+ a.collapsible ? (p(), Z(be(ia), {
2558
+ key: 0,
2559
+ class: "app-page-info-section-chevron-icon",
2560
+ decorative: ""
2561
+ })) : e.$slots.actions ? O(e.$slots, "actions", {}, void 0, !0, 1) : F("", !0)
2562
+ ]),
2563
+ _: 3
2564
+ })),
2565
+ e.$slots.default ? (p(), T("div", fo, [
2566
+ O(e.$slots, "default", {}, void 0, !0)
2567
+ ])) : F("", !0)
2568
+ ]),
2569
+ _: 3
2570
+ }));
2571
+ }
2572
+ }), So = /* @__PURE__ */ oe(vo, [["__scopeId", "data-v-4751cbb1"]]), bo = /* @__PURE__ */ ae({
2573
+ __name: "GradientBadge",
2574
+ props: {
2575
+ large: {
2576
+ type: Boolean,
2577
+ default: !1
2578
+ },
2579
+ inverse: {
2580
+ type: Boolean,
2581
+ default: !1
2582
+ }
2583
+ },
2584
+ setup(a) {
2585
+ return (e, r) => (p(), T("div", {
2586
+ class: te(["gradient-badge", { inverse: a.inverse }])
2587
+ }, [
2588
+ I("div", {
2589
+ class: te(["gradient-badge-content", { large: a.large }])
2590
+ }, [
2591
+ O(e.$slots, "default", {}, void 0, !0)
2592
+ ], 2)
2593
+ ], 2));
2594
+ }
2595
+ }), To = /* @__PURE__ */ oe(bo, [["__scopeId", "data-v-01ef058c"]]), Io = {
2596
+ // Customize Vue plugin options as desired
2597
+ // Providing a `name` property allows for customizing the registered name of your component (useful if exporting a single component).
2598
+ install: (a, e = {}) => {
2599
+ a.component(e.name || "AppLayout", eo);
2600
+ }
2601
+ };
2602
+ export {
2603
+ go as AccountDropdown,
2604
+ yo as AppAboutSection,
2605
+ wo as AppError,
2606
+ eo as AppLayout,
2607
+ $r as AppNavbar,
2608
+ ko as AppPageHeader,
2609
+ So as AppPageInfoSection,
2610
+ Wi as AppSidebar,
2611
+ To as GradientBadge,
2612
+ Ui as SidebarToggle,
2613
+ Io as default
2614
+ };