diff --git a/web/assets/BaseViewTemplate-BhQMaVFP.js b/web/assets/BaseViewTemplate-Cof5Ihf_.js similarity index 72% rename from web/assets/BaseViewTemplate-BhQMaVFP.js rename to web/assets/BaseViewTemplate-Cof5Ihf_.js index af2f3028..592bb112 100644 --- a/web/assets/BaseViewTemplate-BhQMaVFP.js +++ b/web/assets/BaseViewTemplate-Cof5Ihf_.js @@ -1,4 +1,4 @@ -import { d as defineComponent, ad as ref, t as onMounted, bT as isElectron, bV as electronAPI, af as nextTick, o as openBlock, f as createElementBlock, i as withDirectives, v as vShow, m as createBaseVNode, M as renderSlot, V as normalizeClass } from "./index-QvfM__ze.js"; +import { d as defineComponent, U as ref, p as onMounted, b4 as isElectron, W as nextTick, b5 as electronAPI, o as openBlock, f as createElementBlock, i as withDirectives, v as vShow, j as unref, b6 as isNativeWindow, m as createBaseVNode, A as renderSlot, ai as normalizeClass } from "./index-CmVtQCAR.js"; const _hoisted_1 = { class: "flex-grow w-full flex items-center justify-center overflow-auto" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "BaseViewTemplate", @@ -16,11 +16,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ symbolColor: "#171717" }; const topMenuRef = ref(null); - const isNativeWindow = ref(false); onMounted(async () => { if (isElectron()) { - const windowStyle = await electronAPI().Config.getWindowStyle(); - isNativeWindow.value = windowStyle === "custom"; await nextTick(); electronAPI().changeTheme({ ...props.dark ? darkTheme : lightTheme, @@ -39,7 +36,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ ref: topMenuRef, class: "app-drag w-full h-[var(--comfy-topbar-height)]" }, null, 512), [ - [vShow, isNativeWindow.value] + [vShow, unref(isNativeWindow)()] ]), createBaseVNode("div", _hoisted_1, [ renderSlot(_ctx.$slots, "default") @@ -51,4 +48,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as _ }; -//# sourceMappingURL=BaseViewTemplate-BhQMaVFP.js.map +//# sourceMappingURL=BaseViewTemplate-Cof5Ihf_.js.map diff --git a/web/assets/DesktopStartView-le6AjGZr.js b/web/assets/DesktopStartView-DTiwKLp6.js similarity index 63% rename from web/assets/DesktopStartView-le6AjGZr.js rename to web/assets/DesktopStartView-DTiwKLp6.js index 41a212f3..bff52ac0 100644 --- a/web/assets/DesktopStartView-le6AjGZr.js +++ b/web/assets/DesktopStartView-DTiwKLp6.js @@ -1,5 +1,5 @@ -import { d as defineComponent, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, k as createVNode, j as unref, ch as script } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; +import { d as defineComponent, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, k as createVNode, j as unref, bz as script } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _hoisted_1 = { class: "max-w-screen-sm w-screen p-8" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "DesktopStartView", @@ -19,4 +19,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=DesktopStartView-le6AjGZr.js.map +//# sourceMappingURL=DesktopStartView-DTiwKLp6.js.map diff --git a/web/assets/DownloadGitView-rPK_vYgU.js b/web/assets/DownloadGitView-At9xRwC5.js similarity index 87% rename from web/assets/DownloadGitView-rPK_vYgU.js rename to web/assets/DownloadGitView-At9xRwC5.js index c286da35..4a43918d 100644 --- a/web/assets/DownloadGitView-rPK_vYgU.js +++ b/web/assets/DownloadGitView-At9xRwC5.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, l as script, c2 as useRouter } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; +import { d as defineComponent, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, k as createVNode, j as unref, l as script, be as useRouter } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _hoisted_1 = { class: "max-w-screen-sm flex flex-col gap-8 p-8 bg-[url('/assets/images/Git-Logo-White.svg')] bg-no-repeat bg-right-top bg-origin-padding" }; const _hoisted_2 = { class: "mt-24 text-4xl font-bold text-red-500" }; const _hoisted_3 = { class: "space-y-4" }; @@ -55,4 +55,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=DownloadGitView-rPK_vYgU.js.map +//# sourceMappingURL=DownloadGitView-At9xRwC5.js.map diff --git a/web/assets/ExtensionPanel-3jWrm6Zi.js b/web/assets/ExtensionPanel-C_ZBlIyE.js similarity index 91% rename from web/assets/ExtensionPanel-3jWrm6Zi.js rename to web/assets/ExtensionPanel-C_ZBlIyE.js index 3c580dd1..6d3034e0 100644 --- a/web/assets/ExtensionPanel-3jWrm6Zi.js +++ b/web/assets/ExtensionPanel-C_ZBlIyE.js @@ -1,8 +1,8 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, ad as ref, cu as FilterMatchMode, cz as useExtensionStore, a as useSettingStore, t as onMounted, c as computed, o as openBlock, J as createBlock, P as withCtx, k as createVNode, cv as SearchBox, j as unref, c6 as script, m as createBaseVNode, f as createElementBlock, I as renderList, Z as toDisplayString, aG as createTextVNode, H as Fragment, l as script$1, L as createCommentVNode, aK as script$3, b8 as script$4, cc as script$5, cw as _sfc_main$1 } from "./index-QvfM__ze.js"; -import { s as script$2, a as script$6 } from "./index-DpF-ptbJ.js"; -import "./index-Q1cQr26V.js"; +import { d as defineComponent, U as ref, dl as FilterMatchMode, dr as useExtensionStore, a as useSettingStore, p as onMounted, c as computed, o as openBlock, y as createBlock, z as withCtx, k as createVNode, dm as SearchBox, j as unref, bj as script, m as createBaseVNode, f as createElementBlock, D as renderList, E as toDisplayString, a7 as createTextVNode, F as Fragment, l as script$1, B as createCommentVNode, a4 as script$3, ax as script$4, bn as script$5, dn as _sfc_main$1 } from "./index-CmVtQCAR.js"; +import { g as script$2, h as script$6 } from "./index-CdHVC5qq.js"; +import "./index-I0brO37W.js"; const _hoisted_1 = { class: "flex justify-end" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "ExtensionPanel", @@ -179,4 +179,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=ExtensionPanel-3jWrm6Zi.js.map +//# sourceMappingURL=ExtensionPanel-C_ZBlIyE.js.map diff --git a/web/assets/GraphView-CqZ3opAX.css b/web/assets/GraphView-CVCdiww1.css similarity index 96% rename from web/assets/GraphView-CqZ3opAX.css rename to web/assets/GraphView-CVCdiww1.css index f735c838..765b2a0e 100644 --- a/web/assets/GraphView-CqZ3opAX.css +++ b/web/assets/GraphView-CVCdiww1.css @@ -230,7 +230,7 @@ border-bottom-left-radius: 0; } -.comfyui-queue-button[data-v-e9044686] .p-splitbutton-dropdown { +.comfyui-queue-button[data-v-91a628af] .p-splitbutton-dropdown { border-top-right-radius: 0; border-bottom-right-radius: 0; } @@ -275,7 +275,7 @@ border-style: solid; } -.comfyui-menu[data-v-6e35440f] { +.comfyui-menu[data-v-929e7543] { width: 100vw; height: var(--comfy-topbar-height); background: var(--comfy-menu-bg); @@ -288,16 +288,16 @@ order: 0; grid-column: 1/-1; } -.comfyui-menu.dropzone[data-v-6e35440f] { +.comfyui-menu.dropzone[data-v-929e7543] { background: var(--p-highlight-background); } -.comfyui-menu.dropzone-active[data-v-6e35440f] { +.comfyui-menu.dropzone-active[data-v-929e7543] { background: var(--p-highlight-background-focus); } -[data-v-6e35440f] .p-menubar-item-label { +[data-v-929e7543] .p-menubar-item-label { line-height: revert; } -.comfyui-logo[data-v-6e35440f] { +.comfyui-logo[data-v-929e7543] { font-size: 1.2em; -webkit-user-select: none; -moz-user-select: none; diff --git a/web/assets/GraphView-DKrBTQLe.js b/web/assets/GraphView-DKrBTQLe.js new file mode 100644 index 00000000..495f54fe --- /dev/null +++ b/web/assets/GraphView-DKrBTQLe.js @@ -0,0 +1,4682 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { d as defineComponent, u as useExecutionStore, c as computed, a as useSettingStore, b as useWorkflowStore, e as useTitle, o as openBlock, f as createElementBlock, g as useWorkspaceStore, w as watchEffect, h as app, r as resolveDirective, i as withDirectives, v as vShow, j as unref, k as createVNode, s as showNativeMenu, l as script, m as createBaseVNode, n as normalizeStyle, _ as _export_sfc, p as onMounted, q as onBeforeUnmount, t as useSidebarTabStore, x as useBottomPanelStore, y as createBlock, z as withCtx, A as renderSlot, B as createCommentVNode, C as resolveDynamicComponent, F as Fragment, D as renderList, E as toDisplayString, G as script$5, H as markRaw, I as defineStore, J as shallowRef, K as useI18n, L as useCommandStore, M as LiteGraph, N as useColorPaletteStore, O as watch, P as useNodeDefStore, Q as BadgePosition, R as LGraphBadge, S as _, T as NodeBadgeMode, U as ref, V as useEventListener, W as nextTick, X as st, Y as normalizeI18nKey, Z as LGraphGroup, $ as LGraphNode, a0 as EditableText, a1 as useNodeFrequencyStore, a2 as useNodeBookmarkStore, a3 as highlightQuery, a4 as script$8, a5 as formatNumberWithSuffix, a6 as NodeSourceType, a7 as createTextVNode, a8 as script$9, a9 as NodePreview, aa as NodeSearchFilter, ab as script$a, ac as SearchFilterChip, ad as useLitegraphService, ae as storeToRefs, af as isRef, ag as toRaw, ah as LinkReleaseTriggerAction, ai as normalizeClass, aj as useUserStore, ak as useDialogStore, al as SettingDialogHeader, am as SettingDialogContent, an as useKeybindingStore, ao as Teleport, ap as usePragmaticDraggable, aq as usePragmaticDroppable, ar as withModifiers, as as mergeProps, at as useWorkflowService, au as useWorkflowBookmarkStore, av as script$c, aw as script$d, ax as script$e, ay as LinkMarkerShape, az as useModelToNodeStore, aA as ComfyNodeDefImpl, aB as ComfyModelDef, aC as LGraph, aD as LLink, aE as DragAndScale, aF as LGraphCanvas, aG as ContextMenu, aH as api, aI as getStorageValue, aJ as useModelStore, aK as setStorageValue, aL as CanvasPointer, aM as IS_CONTROL_WIDGET, aN as updateControlWidgetLabel, aO as useColorPaletteService, aP as ChangeTracker, aQ as i18n, aR as useToast, aS as useToastStore, aT as useQueueSettingsStore, aU as script$g, aV as useQueuePendingTaskCountStore, aW as useLocalStorage, aX as useDraggable, aY as watchDebounced, aZ as inject, a_ as useElementBounding, a$ as script$i, b0 as lodashExports, b1 as useEventBus, b2 as useMenuItemStore, b3 as provide, b4 as isElectron, b5 as electronAPI, b6 as isNativeWindow, b7 as useDialogService, b8 as LGraphEventMode, b9 as useQueueStore, ba as DEFAULT_DARK_COLOR_PALETTE, bb as DEFAULT_LIGHT_COLOR_PALETTE, bc as t, bd as useErrorHandling } from "./index-CmVtQCAR.js"; +import { s as script$1, a as script$2, b as script$3, c as script$4, d as script$6, e as script$7, f as script$b, g as script$f, h as script$h, i as script$j } from "./index-BWow9lpT.js"; +import { u as useKeybindingService } from "./keybindingService-CqSjCYw-.js"; +import { u as useServerConfigStore } from "./serverConfigStore-BUvaGcxp.js"; +import "./index-I0brO37W.js"; +const DEFAULT_TITLE = "ComfyUI"; +const TITLE_SUFFIX = " - ComfyUI"; +const _sfc_main$u = /* @__PURE__ */ defineComponent({ + __name: "BrowserTabTitle", + setup(__props) { + const executionStore = useExecutionStore(); + const executionText = computed( + () => executionStore.isIdle ? "" : `[${executionStore.executionProgress}%]` + ); + const settingStore = useSettingStore(); + const betaMenuEnabled = computed( + () => settingStore.get("Comfy.UseNewMenu") !== "Disabled" + ); + const workflowStore = useWorkflowStore(); + const isUnsavedText = computed( + () => workflowStore.activeWorkflow?.isModified || !workflowStore.activeWorkflow?.isPersisted ? " *" : "" + ); + const workflowNameText = computed(() => { + const workflowName = workflowStore.activeWorkflow?.filename; + return workflowName ? isUnsavedText.value + workflowName + TITLE_SUFFIX : DEFAULT_TITLE; + }); + const nodeExecutionTitle = computed( + () => executionStore.executingNode && executionStore.executingNodeProgress ? `${executionText.value}[${executionStore.executingNodeProgress}%] ${executionStore.executingNode.type}` : "" + ); + const workflowTitle = computed( + () => executionText.value + (betaMenuEnabled.value ? workflowNameText.value : DEFAULT_TITLE) + ); + const title = computed(() => nodeExecutionTitle.value || workflowTitle.value); + useTitle(title); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div"); + }; + } +}); +const _hoisted_1$j = { class: "window-actions-spacer" }; +const _sfc_main$t = /* @__PURE__ */ defineComponent({ + __name: "MenuHamburger", + setup(__props) { + const workspaceState = useWorkspaceStore(); + const settingStore = useSettingStore(); + const exitFocusMode = /* @__PURE__ */ __name(() => { + workspaceState.focusMode = false; + }, "exitFocusMode"); + watchEffect(() => { + if (settingStore.get("Comfy.UseNewMenu") !== "Disabled") { + return; + } + if (workspaceState.focusMode) { + app.ui.menuContainer.style.display = "none"; + } else { + app.ui.menuContainer.style.display = "block"; + } + }); + const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); + const positionCSS = computed( + () => ( + // 'Bottom' menuSetting shows the hamburger button in the bottom right corner + // 'Disabled', 'Top' menuSetting shows the hamburger button in the top right corner + menuSetting.value === "Bottom" ? { bottom: "0px", right: "0px" } : { top: "0px", right: "0px" } + ) + ); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return withDirectives((openBlock(), createElementBlock("div", { + class: "comfy-menu-hamburger no-drag", + style: normalizeStyle(positionCSS.value) + }, [ + withDirectives(createVNode(unref(script), { + icon: "pi pi-bars", + severity: "secondary", + text: "", + size: "large", + "aria-label": _ctx.$t("menu.showMenu"), + "aria-live": "assertive", + onClick: exitFocusMode, + onContextmenu: unref(showNativeMenu) + }, null, 8, ["aria-label", "onContextmenu"]), [ + [_directive_tooltip, { value: _ctx.$t("menu.showMenu"), showDelay: 300 }] + ]), + withDirectives(createBaseVNode("div", _hoisted_1$j, null, 512), [ + [vShow, menuSetting.value !== "Bottom"] + ]) + ], 4)), [ + [vShow, unref(workspaceState).focusMode] + ]); + }; + } +}); +const MenuHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-7ed57d1a"]]); +const _sfc_main$s = /* @__PURE__ */ defineComponent({ + __name: "UnloadWindowConfirmDialog", + setup(__props) { + const settingStore = useSettingStore(); + const workflowStore = useWorkflowStore(); + const handleBeforeUnload = /* @__PURE__ */ __name((event) => { + if (settingStore.get("Comfy.Window.UnloadConfirmation") && workflowStore.modifiedWorkflows.length > 0) { + event.preventDefault(); + return true; + } + return void 0; + }, "handleBeforeUnload"); + onMounted(() => { + window.addEventListener("beforeunload", handleBeforeUnload); + }); + onBeforeUnmount(() => { + window.removeEventListener("beforeunload", handleBeforeUnload); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div"); + }; + } +}); +const _sfc_main$r = /* @__PURE__ */ defineComponent({ + __name: "LiteGraphCanvasSplitterOverlay", + setup(__props) { + const settingStore = useSettingStore(); + const sidebarLocation = computed( + () => settingStore.get("Comfy.Sidebar.Location") + ); + const sidebarPanelVisible = computed( + () => useSidebarTabStore().activeSidebarTab !== null + ); + const bottomPanelVisible = computed( + () => useBottomPanelStore().bottomPanelVisible + ); + const activeSidebarTabId = computed( + () => useSidebarTabStore().activeSidebarTabId + ); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script$2), { + class: "splitter-overlay-root splitter-overlay", + "pt:gutter": sidebarPanelVisible.value ? "" : "hidden", + key: activeSidebarTabId.value, + stateKey: activeSidebarTabId.value, + stateStorage: "local" + }, { + default: withCtx(() => [ + sidebarLocation.value === "left" ? withDirectives((openBlock(), createBlock(unref(script$1), { + key: 0, + class: "side-bar-panel", + minSize: 10, + size: 20 + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "side-bar-panel", {}, void 0, true) + ]), + _: 3 + }, 512)), [ + [vShow, sidebarPanelVisible.value] + ]) : createCommentVNode("", true), + createVNode(unref(script$1), { size: 100 }, { + default: withCtx(() => [ + createVNode(unref(script$2), { + class: "splitter-overlay max-w-full", + layout: "vertical", + "pt:gutter": bottomPanelVisible.value ? "" : "hidden", + stateKey: "bottom-panel-splitter", + stateStorage: "local" + }, { + default: withCtx(() => [ + createVNode(unref(script$1), { class: "graph-canvas-panel relative" }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "graph-canvas-panel", {}, void 0, true) + ]), + _: 3 + }), + withDirectives(createVNode(unref(script$1), { class: "bottom-panel" }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "bottom-panel", {}, void 0, true) + ]), + _: 3 + }, 512), [ + [vShow, bottomPanelVisible.value] + ]) + ]), + _: 3 + }, 8, ["pt:gutter"]) + ]), + _: 3 + }), + sidebarLocation.value === "right" ? withDirectives((openBlock(), createBlock(unref(script$1), { + key: 1, + class: "side-bar-panel", + minSize: 10, + size: 20 + }, { + default: withCtx(() => [ + renderSlot(_ctx.$slots, "side-bar-panel", {}, void 0, true) + ]), + _: 3 + }, 512)), [ + [vShow, sidebarPanelVisible.value] + ]) : createCommentVNode("", true) + ]), + _: 3 + }, 8, ["pt:gutter", "stateKey"]); + }; + } +}); +const LiteGraphCanvasSplitterOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-e50caa15"]]); +const _sfc_main$q = /* @__PURE__ */ defineComponent({ + __name: "ExtensionSlot", + props: { + extension: {} + }, + setup(__props) { + const props = __props; + const mountCustomExtension = /* @__PURE__ */ __name((extension, el) => { + extension.render(el); + }, "mountCustomExtension"); + onBeforeUnmount(() => { + if (props.extension.type === "custom" && props.extension.destroy) { + props.extension.destroy(); + } + }); + return (_ctx, _cache) => { + return _ctx.extension.type === "vue" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.extension.component), { key: 0 })) : (openBlock(), createElementBlock("div", { + key: 1, + ref: /* @__PURE__ */ __name((el) => { + if (el) + mountCustomExtension( + props.extension, + el + ); + }, "ref") + }, null, 512)); + }; + } +}); +const _hoisted_1$i = { class: "flex flex-col h-full" }; +const _hoisted_2$6 = { class: "w-full flex justify-between" }; +const _hoisted_3$5 = { class: "tabs-container" }; +const _hoisted_4$1 = { class: "font-bold" }; +const _hoisted_5$1 = { class: "flex-grow h-0" }; +const _sfc_main$p = /* @__PURE__ */ defineComponent({ + __name: "BottomPanel", + setup(__props) { + const bottomPanelStore = useBottomPanelStore(); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$i, [ + createVNode(unref(script$5), { + value: unref(bottomPanelStore).activeBottomPanelTabId, + "onUpdate:value": _cache[1] || (_cache[1] = ($event) => unref(bottomPanelStore).activeBottomPanelTabId = $event) + }, { + default: withCtx(() => [ + createVNode(unref(script$3), { "pt:tabList": "border-none" }, { + default: withCtx(() => [ + createBaseVNode("div", _hoisted_2$6, [ + createBaseVNode("div", _hoisted_3$5, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(unref(bottomPanelStore).bottomPanelTabs, (tab) => { + return openBlock(), createBlock(unref(script$4), { + key: tab.id, + value: tab.id, + class: "p-3 border-none" + }, { + default: withCtx(() => [ + createBaseVNode("span", _hoisted_4$1, toDisplayString(tab.title.toUpperCase()), 1) + ]), + _: 2 + }, 1032, ["value"]); + }), 128)) + ]), + createVNode(unref(script), { + class: "justify-self-end", + icon: "pi pi-times", + severity: "secondary", + size: "small", + text: "", + onClick: _cache[0] || (_cache[0] = ($event) => unref(bottomPanelStore).bottomPanelVisible = false) + }) + ]) + ]), + _: 1 + }) + ]), + _: 1 + }, 8, ["value"]), + createBaseVNode("div", _hoisted_5$1, [ + unref(bottomPanelStore).bottomPanelVisible && unref(bottomPanelStore).activeBottomPanelTab ? (openBlock(), createBlock(_sfc_main$q, { + key: 0, + extension: unref(bottomPanelStore).activeBottomPanelTab + }, null, 8, ["extension"])) : createCommentVNode("", true) + ]) + ]); + }; + } +}); +const _hoisted_1$h = { + viewBox: "0 0 1024 1024", + width: "1.2em", + height: "1.2em" +}; +function render$7(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$h, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "currentColor", + d: "M921.088 103.232L584.832 889.024L465.52 544.512L121.328 440.48zM1004.46.769c-6.096 0-13.52 1.728-22.096 5.36L27.708 411.2c-34.383 14.592-36.56 42.704-4.847 62.464l395.296 123.584l129.36 403.264c9.28 15.184 20.496 22.72 31.263 22.72c11.936 0 23.296-9.152 31.04-27.248l408.272-953.728C1029.148 16.368 1022.86.769 1004.46.769" + }, null, -1) + ])); +} +__name(render$7, "render$7"); +const __unplugin_components_1$2 = markRaw({ name: "simple-line-icons-cursor", render: render$7 }); +const _hoisted_1$g = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render$6(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$g, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "currentColor", + d: "M10.05 23q-.75 0-1.4-.337T7.575 21.7L1.2 12.375l.6-.575q.475-.475 1.125-.55t1.175.3L7 13.575V4q0-.425.288-.712T8 3t.713.288T9 4v13.425l-3.7-2.6l3.925 5.725q.125.2.35.325t.475.125H17q.825 0 1.413-.587T19 19V5q0-.425.288-.712T20 4t.713.288T21 5v14q0 1.65-1.175 2.825T17 23zM11 12V2q0-.425.288-.712T12 1t.713.288T13 2v10zm4 0V3q0-.425.288-.712T16 2t.713.288T17 3v9zm-2.85 4.5" + }, null, -1) + ])); +} +__name(render$6, "render$6"); +const __unplugin_components_0$2 = markRaw({ name: "material-symbols-pan-tool-outline", render: render$6 }); +const useTitleEditorStore = defineStore("titleEditor", () => { + const titleEditorTarget = shallowRef(null); + return { + titleEditorTarget + }; +}); +const useCanvasStore = defineStore("canvas", () => { + const canvas = shallowRef(null); + return { + canvas + }; +}); +const _sfc_main$o = /* @__PURE__ */ defineComponent({ + __name: "GraphCanvasMenu", + setup(__props) { + const { t: t2 } = useI18n(); + const commandStore = useCommandStore(); + const canvasStore = useCanvasStore(); + const settingStore = useSettingStore(); + const linkHidden = computed( + () => settingStore.get("Comfy.LinkRenderMode") === LiteGraph.HIDDEN_LINK + ); + let interval = null; + const repeat = /* @__PURE__ */ __name((command) => { + if (interval) return; + const cmd = /* @__PURE__ */ __name(() => commandStore.execute(command), "cmd"); + cmd(); + interval = window.setInterval(cmd, 100); + }, "repeat"); + const stopRepeat = /* @__PURE__ */ __name(() => { + if (interval) { + clearInterval(interval); + interval = null; + } + }, "stopRepeat"); + return (_ctx, _cache) => { + const _component_i_material_symbols58pan_tool_outline = __unplugin_components_0$2; + const _component_i_simple_line_icons58cursor = __unplugin_components_1$2; + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createBlock(unref(script$6), { class: "p-buttongroup-vertical absolute bottom-[10px] right-[10px] z-[1000] pointer-events-auto" }, { + default: withCtx(() => [ + withDirectives(createVNode(unref(script), { + severity: "secondary", + icon: "pi pi-plus", + "aria-label": _ctx.$t("graphCanvasMenu.zoomIn"), + onMousedown: _cache[0] || (_cache[0] = ($event) => repeat("Comfy.Canvas.ZoomIn")), + onMouseup: stopRepeat + }, null, 8, ["aria-label"]), [ + [ + _directive_tooltip, + unref(t2)("graphCanvasMenu.zoomIn"), + void 0, + { left: true } + ] + ]), + withDirectives(createVNode(unref(script), { + severity: "secondary", + icon: "pi pi-minus", + "aria-label": _ctx.$t("graphCanvasMenu.zoomOut"), + onMousedown: _cache[1] || (_cache[1] = ($event) => repeat("Comfy.Canvas.ZoomOut")), + onMouseup: stopRepeat + }, null, 8, ["aria-label"]), [ + [ + _directive_tooltip, + unref(t2)("graphCanvasMenu.zoomOut"), + void 0, + { left: true } + ] + ]), + withDirectives(createVNode(unref(script), { + severity: "secondary", + icon: "pi pi-expand", + "aria-label": _ctx.$t("graphCanvasMenu.fitView"), + onClick: _cache[2] || (_cache[2] = () => unref(commandStore).execute("Comfy.Canvas.FitView")) + }, null, 8, ["aria-label"]), [ + [ + _directive_tooltip, + unref(t2)("graphCanvasMenu.fitView"), + void 0, + { left: true } + ] + ]), + withDirectives((openBlock(), createBlock(unref(script), { + severity: "secondary", + "aria-label": unref(t2)( + "graphCanvasMenu." + (unref(canvasStore).canvas?.read_only ? "panMode" : "selectMode") + ), + onClick: _cache[3] || (_cache[3] = () => unref(commandStore).execute("Comfy.Canvas.ToggleLock")) + }, { + icon: withCtx(() => [ + unref(canvasStore).canvas?.read_only ? (openBlock(), createBlock(_component_i_material_symbols58pan_tool_outline, { key: 0 })) : (openBlock(), createBlock(_component_i_simple_line_icons58cursor, { key: 1 })) + ]), + _: 1 + }, 8, ["aria-label"])), [ + [ + _directive_tooltip, + unref(t2)( + "graphCanvasMenu." + (unref(canvasStore).canvas?.read_only ? "panMode" : "selectMode") + ) + " (Space)", + void 0, + { left: true } + ] + ]), + withDirectives(createVNode(unref(script), { + severity: "secondary", + icon: linkHidden.value ? "pi pi-eye-slash" : "pi pi-eye", + "aria-label": _ctx.$t("graphCanvasMenu.toggleLinkVisibility"), + onClick: _cache[4] || (_cache[4] = () => unref(commandStore).execute("Comfy.Canvas.ToggleLinkVisibility")), + "data-testid": "toggle-link-visibility-button" + }, null, 8, ["icon", "aria-label"]), [ + [ + _directive_tooltip, + unref(t2)("graphCanvasMenu.toggleLinkVisibility"), + void 0, + { left: true } + ] + ]) + ]), + _: 1 + }); + }; + } +}); +const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-cb8f9a1a"]]); +const _sfc_main$n = /* @__PURE__ */ defineComponent({ + __name: "NodeBadge", + setup(__props) { + const settingStore = useSettingStore(); + const colorPaletteStore = useColorPaletteStore(); + const nodeSourceBadgeMode = computed( + () => settingStore.get("Comfy.NodeBadge.NodeSourceBadgeMode") + ); + const nodeIdBadgeMode = computed( + () => settingStore.get("Comfy.NodeBadge.NodeIdBadgeMode") + ); + const nodeLifeCycleBadgeMode = computed( + () => settingStore.get("Comfy.NodeBadge.NodeLifeCycleBadgeMode") + ); + watch([nodeSourceBadgeMode, nodeIdBadgeMode, nodeLifeCycleBadgeMode], () => { + app.graph?.setDirtyCanvas(true, true); + }); + const nodeDefStore = useNodeDefStore(); + function badgeTextVisible(nodeDef, badgeMode) { + return !(badgeMode === NodeBadgeMode.None || nodeDef?.isCoreNode && badgeMode === NodeBadgeMode.HideBuiltIn); + } + __name(badgeTextVisible, "badgeTextVisible"); + onMounted(() => { + app.registerExtension({ + name: "Comfy.NodeBadge", + nodeCreated(node) { + node.badgePosition = BadgePosition.TopRight; + const badge = computed(() => { + const nodeDef = nodeDefStore.fromLGraphNode(node); + return new LGraphBadge({ + text: _.truncate( + [ + badgeTextVisible(nodeDef, nodeIdBadgeMode.value) ? `#${node.id}` : "", + badgeTextVisible(nodeDef, nodeLifeCycleBadgeMode.value) ? nodeDef?.nodeLifeCycleBadgeText ?? "" : "", + badgeTextVisible(nodeDef, nodeSourceBadgeMode.value) ? nodeDef?.nodeSource?.badgeText ?? "" : "" + ].filter((s) => s.length > 0).join(" "), + { + length: 31 + } + ), + fgColor: colorPaletteStore.completedActivePalette.colors.litegraph_base.BADGE_FG_COLOR, + bgColor: colorPaletteStore.completedActivePalette.colors.litegraph_base.BADGE_BG_COLOR + }); + }); + node.badges.push(() => badge.value); + } + }); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div"); + }; + } +}); +const _sfc_main$m = /* @__PURE__ */ defineComponent({ + __name: "NodeTooltip", + setup(__props) { + let idleTimeout; + const nodeDefStore = useNodeDefStore(); + const tooltipRef = ref(); + const tooltipText = ref(""); + const left = ref(); + const top = ref(); + const hideTooltip = /* @__PURE__ */ __name(() => tooltipText.value = null, "hideTooltip"); + const showTooltip = /* @__PURE__ */ __name(async (tooltip) => { + if (!tooltip) return; + left.value = app.canvas.mouse[0] + "px"; + top.value = app.canvas.mouse[1] + "px"; + tooltipText.value = tooltip; + await nextTick(); + const rect = tooltipRef.value.getBoundingClientRect(); + if (rect.right > window.innerWidth) { + left.value = app.canvas.mouse[0] - rect.width + "px"; + } + if (rect.top < 0) { + top.value = app.canvas.mouse[1] + rect.height + "px"; + } + }, "showTooltip"); + const onIdle = /* @__PURE__ */ __name(() => { + const { canvas } = app; + const node = canvas.node_over; + if (!node) return; + const ctor = node.constructor; + const nodeDef = nodeDefStore.nodeDefsByName[node.type]; + if (ctor.title_mode !== LiteGraph.NO_TITLE && canvas.graph_mouse[1] < node.pos[1]) { + return showTooltip(nodeDef.description); + } + if (node.flags?.collapsed) return; + const inputSlot = canvas.isOverNodeInput( + node, + canvas.graph_mouse[0], + canvas.graph_mouse[1], + [0, 0] + ); + if (inputSlot !== -1) { + const inputName = node.inputs[inputSlot].name; + const translatedTooltip = st( + `nodeDefs.${normalizeI18nKey(node.type)}.inputs.${normalizeI18nKey(inputName)}.tooltip`, + nodeDef.inputs.getInput(inputName)?.tooltip + ); + return showTooltip(translatedTooltip); + } + const outputSlot = canvas.isOverNodeOutput( + node, + canvas.graph_mouse[0], + canvas.graph_mouse[1], + [0, 0] + ); + if (outputSlot !== -1) { + const translatedTooltip = st( + `nodeDefs.${normalizeI18nKey(node.type)}.outputs.${outputSlot}.tooltip`, + nodeDef.outputs.all?.[outputSlot]?.tooltip + ); + return showTooltip(translatedTooltip); + } + const widget = app.canvas.getWidgetAtCursor(); + if (widget && !widget.element) { + const translatedTooltip = st( + `nodeDefs.${normalizeI18nKey(node.type)}.inputs.${normalizeI18nKey(widget.name)}.tooltip`, + nodeDef.inputs.getInput(widget.name)?.tooltip + ); + return showTooltip(widget.tooltip ?? translatedTooltip); + } + }, "onIdle"); + const onMouseMove = /* @__PURE__ */ __name((e) => { + hideTooltip(); + clearTimeout(idleTimeout); + if (e.target.nodeName !== "CANVAS") return; + idleTimeout = window.setTimeout(onIdle, 500); + }, "onMouseMove"); + useEventListener(window, "mousemove", onMouseMove); + useEventListener(window, "click", hideTooltip); + return (_ctx, _cache) => { + return tooltipText.value ? (openBlock(), createElementBlock("div", { + key: 0, + ref_key: "tooltipRef", + ref: tooltipRef, + class: "node-tooltip", + style: normalizeStyle({ left: left.value, top: top.value }) + }, toDisplayString(tooltipText.value), 5)) : createCommentVNode("", true); + }; + } +}); +const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-46859edf"]]); +const _sfc_main$l = /* @__PURE__ */ defineComponent({ + __name: "TitleEditor", + setup(__props) { + const settingStore = useSettingStore(); + const showInput = ref(false); + const editedTitle = ref(""); + const inputStyle = ref({ + position: "fixed", + left: "0px", + top: "0px", + width: "200px", + height: "20px", + fontSize: "12px" + }); + const titleEditorStore = useTitleEditorStore(); + const canvasStore = useCanvasStore(); + const previousCanvasDraggable = ref(true); + const onEdit = /* @__PURE__ */ __name((newValue) => { + if (titleEditorStore.titleEditorTarget && newValue.trim() !== "") { + titleEditorStore.titleEditorTarget.title = newValue.trim(); + app.graph.setDirtyCanvas(true, true); + } + showInput.value = false; + titleEditorStore.titleEditorTarget = null; + canvasStore.canvas.allow_dragcanvas = previousCanvasDraggable.value; + }, "onEdit"); + watch( + () => titleEditorStore.titleEditorTarget, + (target) => { + if (target === null) { + return; + } + editedTitle.value = target.title; + showInput.value = true; + previousCanvasDraggable.value = canvasStore.canvas.allow_dragcanvas; + canvasStore.canvas.allow_dragcanvas = false; + if (target instanceof LGraphGroup) { + const group = target; + const [x, y] = group.pos; + const [w, h] = group.size; + const [left, top] = app.canvasPosToClientPos([x, y]); + inputStyle.value.left = `${left}px`; + inputStyle.value.top = `${top}px`; + const width = w * app.canvas.ds.scale; + const height = group.titleHeight * app.canvas.ds.scale; + inputStyle.value.width = `${width}px`; + inputStyle.value.height = `${height}px`; + const fontSize = group.font_size * app.canvas.ds.scale; + inputStyle.value.fontSize = `${fontSize}px`; + } else if (target instanceof LGraphNode) { + const node = target; + const [x, y] = node.getBounding(); + const canvasWidth = node.width; + const canvasHeight = LiteGraph.NODE_TITLE_HEIGHT; + const [left, top] = app.canvasPosToClientPos([x, y]); + inputStyle.value.left = `${left}px`; + inputStyle.value.top = `${top}px`; + const width = canvasWidth * app.canvas.ds.scale; + const height = canvasHeight * app.canvas.ds.scale; + inputStyle.value.width = `${width}px`; + inputStyle.value.height = `${height}px`; + const fontSize = 12 * app.canvas.ds.scale; + inputStyle.value.fontSize = `${fontSize}px`; + } + } + ); + const canvasEventHandler = /* @__PURE__ */ __name((event) => { + if (event.detail.subType === "group-double-click") { + if (!settingStore.get("Comfy.Group.DoubleClickTitleToEdit")) { + return; + } + const group = event.detail.group; + const [x, y] = group.pos; + const e = event.detail.originalEvent; + const relativeY = e.canvasY - y; + if (relativeY <= group.titleHeight) { + titleEditorStore.titleEditorTarget = group; + } + } else if (event.detail.subType === "node-double-click") { + if (!settingStore.get("Comfy.Node.DoubleClickTitleToEdit")) { + return; + } + const node = event.detail.node; + const [x, y] = node.pos; + const e = event.detail.originalEvent; + const relativeY = e.canvasY - y; + if (relativeY <= 0) { + titleEditorStore.titleEditorTarget = node; + } + } + }, "canvasEventHandler"); + useEventListener(document, "litegraph:canvas", canvasEventHandler); + return (_ctx, _cache) => { + return showInput.value ? (openBlock(), createElementBlock("div", { + key: 0, + class: "group-title-editor node-title-editor", + style: normalizeStyle(inputStyle.value) + }, [ + createVNode(EditableText, { + isEditing: showInput.value, + modelValue: editedTitle.value, + onEdit + }, null, 8, ["isEditing", "modelValue"]) + ], 4)) : createCommentVNode("", true); + }; + } +}); +const TitleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-12d3fd12"]]); +const useSearchBoxStore = defineStore("searchBox", () => { + const visible = ref(false); + function toggleVisible() { + visible.value = !visible.value; + } + __name(toggleVisible, "toggleVisible"); + return { + visible, + toggleVisible + }; +}); +class ConnectingLinkImpl { + static { + __name(this, "ConnectingLinkImpl"); + } + constructor(node, slot, input, output, pos, afterRerouteId) { + this.node = node; + this.slot = slot; + this.input = input; + this.output = output; + this.pos = pos; + this.afterRerouteId = afterRerouteId; + } + static createFromPlainObject(obj) { + return new ConnectingLinkImpl( + obj.node, + obj.slot, + obj.input, + obj.output, + obj.pos, + obj.afterRerouteId + ); + } + get type() { + const result = this.input ? this.input.type : this.output?.type ?? null; + return result === -1 ? null : result; + } + /** + * Which slot type is release and need to be reconnected. + * - 'output' means we need a new node's outputs slot to connect with this link + */ + get releaseSlotType() { + return this.output ? "input" : "output"; + } + connectTo(newNode) { + const newNodeSlots = this.releaseSlotType === "output" ? newNode.outputs : newNode.inputs; + if (!newNodeSlots) return; + const newNodeSlot = newNodeSlots.findIndex( + (slot) => LiteGraph.isValidConnection(slot.type, this.type) + ); + if (newNodeSlot === -1) { + console.warn( + `Could not find slot with type ${this.type} on node ${newNode.title}. This should never happen` + ); + return; + } + if (this.releaseSlotType === "input") { + this.node.connect(this.slot, newNode, newNodeSlot, this.afterRerouteId); + } else { + newNode.connect(newNodeSlot, this.node, this.slot, this.afterRerouteId); + } + } +} +const _sfc_main$k = { + name: "AutoCompletePlus", + extends: script$7, + emits: ["focused-option-changed"], + data() { + return { + // Flag to determine if IME is active + isComposing: false + }; + }, + mounted() { + if (typeof script$7.mounted === "function") { + script$7.mounted.call(this); + } + const inputEl = this.$el.querySelector("input"); + if (inputEl) { + inputEl.addEventListener("compositionstart", () => { + this.isComposing = true; + }); + inputEl.addEventListener("compositionend", () => { + this.isComposing = false; + }); + } + this.$watch( + () => this.focusedOptionIndex, + (newVal, oldVal) => { + this.$emit("focused-option-changed", newVal); + } + ); + }, + methods: { + // Override onKeyDown to block Enter when IME is active + onKeyDown(event) { + if (event.key === "Enter" && this.isComposing) { + event.preventDefault(); + event.stopPropagation(); + return; + } + script$7.methods.onKeyDown.call(this, event); + } + } +}; +const _hoisted_1$f = { class: "option-container flex justify-between items-center px-2 py-0 cursor-pointer overflow-hidden w-full" }; +const _hoisted_2$5 = { class: "option-display-name font-semibold flex flex-col" }; +const _hoisted_3$4 = { key: 0 }; +const _hoisted_4 = ["innerHTML"]; +const _hoisted_5 = ["innerHTML"]; +const _hoisted_6 = { + key: 0, + class: "option-category font-light text-sm text-muted overflow-hidden text-ellipsis whitespace-nowrap" +}; +const _hoisted_7 = { class: "option-badges" }; +const _sfc_main$j = /* @__PURE__ */ defineComponent({ + __name: "NodeSearchItem", + props: { + nodeDef: {}, + currentQuery: {} + }, + setup(__props) { + const settingStore = useSettingStore(); + const showCategory = computed( + () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowCategory") + ); + const showIdName = computed( + () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowIdName") + ); + const showNodeFrequency = computed( + () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowNodeFrequency") + ); + const nodeFrequencyStore = useNodeFrequencyStore(); + const nodeFrequency = computed( + () => nodeFrequencyStore.getNodeFrequency(props.nodeDef) + ); + const nodeBookmarkStore = useNodeBookmarkStore(); + const isBookmarked = computed( + () => nodeBookmarkStore.isBookmarked(props.nodeDef) + ); + const props = __props; + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$f, [ + createBaseVNode("div", _hoisted_2$5, [ + createBaseVNode("div", null, [ + isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$4, _cache[0] || (_cache[0] = [ + createBaseVNode("i", { class: "pi pi-bookmark-fill text-sm mr-1" }, null, -1) + ]))) : createCommentVNode("", true), + createBaseVNode("span", { + innerHTML: unref(highlightQuery)(_ctx.nodeDef.display_name, _ctx.currentQuery) + }, null, 8, _hoisted_4), + _cache[1] || (_cache[1] = createBaseVNode("span", null, " ", -1)), + showIdName.value ? (openBlock(), createBlock(unref(script$8), { + key: 1, + severity: "secondary" + }, { + default: withCtx(() => [ + createBaseVNode("span", { + innerHTML: unref(highlightQuery)(_ctx.nodeDef.name, _ctx.currentQuery) + }, null, 8, _hoisted_5) + ]), + _: 1 + })) : createCommentVNode("", true) + ]), + showCategory.value ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(_ctx.nodeDef.category.replaceAll("/", " > ")), 1)) : createCommentVNode("", true) + ]), + createBaseVNode("div", _hoisted_7, [ + _ctx.nodeDef.experimental ? (openBlock(), createBlock(unref(script$8), { + key: 0, + value: _ctx.$t("g.experimental"), + severity: "primary" + }, null, 8, ["value"])) : createCommentVNode("", true), + _ctx.nodeDef.deprecated ? (openBlock(), createBlock(unref(script$8), { + key: 1, + value: _ctx.$t("g.deprecated"), + severity: "danger" + }, null, 8, ["value"])) : createCommentVNode("", true), + showNodeFrequency.value && nodeFrequency.value > 0 ? (openBlock(), createBlock(unref(script$8), { + key: 2, + value: unref(formatNumberWithSuffix)(nodeFrequency.value, { roundToInt: true }), + severity: "secondary" + }, null, 8, ["value"])) : createCommentVNode("", true), + _ctx.nodeDef.nodeSource.type !== unref(NodeSourceType).Unknown ? (openBlock(), createBlock(unref(script$9), { + key: 3, + class: "text-sm font-light" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.nodeDef.nodeSource.displayText), 1) + ]), + _: 1 + })) : createCommentVNode("", true) + ]) + ]); + }; + } +}); +const NodeSearchItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-fd0a74bd"]]); +const _hoisted_1$e = { class: "comfy-vue-node-search-container flex justify-center items-center w-full min-w-96 pointer-events-auto" }; +const _hoisted_2$4 = { + key: 0, + class: "comfy-vue-node-preview-container absolute left-[-350px] top-[50px]" +}; +const _hoisted_3$3 = { class: "_dialog-body" }; +const _sfc_main$i = /* @__PURE__ */ defineComponent({ + __name: "NodeSearchBox", + props: { + filters: {}, + searchLimit: { default: 64 } + }, + emits: ["addFilter", "removeFilter", "addNode"], + setup(__props, { emit: __emit }) { + const settingStore = useSettingStore(); + const { t: t2 } = useI18n(); + const enableNodePreview = computed( + () => settingStore.get("Comfy.NodeSearchBoxImpl.NodePreview") + ); + const props = __props; + const nodeSearchFilterVisible = ref(false); + const inputId = `comfy-vue-node-search-box-input-${Math.random()}`; + const suggestions = ref([]); + const hoveredSuggestion = ref(null); + const currentQuery = ref(""); + const placeholder = computed(() => { + return props.filters.length === 0 ? t2("g.searchNodes") + "..." : ""; + }); + const nodeDefStore = useNodeDefStore(); + const nodeFrequencyStore = useNodeFrequencyStore(); + const search = /* @__PURE__ */ __name((query) => { + const queryIsEmpty = query === "" && props.filters.length === 0; + currentQuery.value = query; + suggestions.value = queryIsEmpty ? nodeFrequencyStore.topNodeDefs : [ + ...nodeDefStore.nodeSearchService.searchNode(query, props.filters, { + limit: props.searchLimit + }) + ]; + }, "search"); + const emit = __emit; + let inputElement = null; + const reFocusInput = /* @__PURE__ */ __name(() => { + inputElement ??= document.getElementById(inputId); + if (inputElement) { + inputElement.blur(); + nextTick(() => inputElement?.focus()); + } + }, "reFocusInput"); + onMounted(reFocusInput); + const onAddFilter = /* @__PURE__ */ __name((filterAndValue) => { + nodeSearchFilterVisible.value = false; + emit("addFilter", filterAndValue); + }, "onAddFilter"); + const onRemoveFilter = /* @__PURE__ */ __name((event, filterAndValue) => { + event.stopPropagation(); + event.preventDefault(); + emit("removeFilter", filterAndValue); + reFocusInput(); + }, "onRemoveFilter"); + const setHoverSuggestion = /* @__PURE__ */ __name((index) => { + if (index === -1) { + hoveredSuggestion.value = null; + return; + } + const value = suggestions.value[index]; + hoveredSuggestion.value = value; + }, "setHoverSuggestion"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$e, [ + enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$4, [ + hoveredSuggestion.value ? (openBlock(), createBlock(NodePreview, { + nodeDef: hoveredSuggestion.value, + key: hoveredSuggestion.value?.name || "" + }, null, 8, ["nodeDef"])) : createCommentVNode("", true) + ])) : createCommentVNode("", true), + createVNode(unref(script), { + icon: "pi pi-filter", + severity: "secondary", + class: "filter-button z-10", + onClick: _cache[0] || (_cache[0] = ($event) => nodeSearchFilterVisible.value = true) + }), + createVNode(unref(script$a), { + visible: nodeSearchFilterVisible.value, + "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => nodeSearchFilterVisible.value = $event), + class: "min-w-96", + "dismissable-mask": "", + modal: "", + onHide: reFocusInput + }, { + header: withCtx(() => _cache[5] || (_cache[5] = [ + createBaseVNode("h3", null, "Add node filter condition", -1) + ])), + default: withCtx(() => [ + createBaseVNode("div", _hoisted_3$3, [ + createVNode(NodeSearchFilter, { onAddFilter }) + ]) + ]), + _: 1 + }, 8, ["visible"]), + createVNode(_sfc_main$k, { + "model-value": props.filters, + class: "comfy-vue-node-search-box z-10 flex-grow", + scrollHeight: "40vh", + placeholder: placeholder.value, + "input-id": inputId, + "append-to": "self", + suggestions: suggestions.value, + "min-length": 0, + delay: 100, + loading: !unref(nodeFrequencyStore).isLoaded, + onComplete: _cache[2] || (_cache[2] = ($event) => search($event.query)), + onOptionSelect: _cache[3] || (_cache[3] = ($event) => emit("addNode", $event.value)), + onFocusedOptionChanged: _cache[4] || (_cache[4] = ($event) => setHoverSuggestion($event)), + "complete-on-focus": "", + "auto-option-focus": "", + "force-selection": "", + multiple: "", + optionLabel: "display_name" + }, { + option: withCtx(({ option }) => [ + createVNode(NodeSearchItem, { + nodeDef: option, + currentQuery: currentQuery.value + }, null, 8, ["nodeDef", "currentQuery"]) + ]), + chip: withCtx(({ value }) => [ + Array.isArray(value) && value.length === 2 ? (openBlock(), createBlock(SearchFilterChip, { + key: `${value[0].id}-${value[1]}`, + onRemove: /* @__PURE__ */ __name(($event) => onRemoveFilter($event, value), "onRemove"), + text: value[1], + badge: value[0].invokeSequence.toUpperCase(), + "badge-class": value[0].invokeSequence + "-badge" + }, null, 8, ["onRemove", "text", "badge", "badge-class"])) : createCommentVNode("", true) + ]), + _: 1 + }, 8, ["model-value", "placeholder", "suggestions", "loading"]) + ]); + }; + } +}); +const _sfc_main$h = /* @__PURE__ */ defineComponent({ + __name: "NodeSearchBoxPopover", + setup(__props) { + const settingStore = useSettingStore(); + const litegraphService = useLitegraphService(); + const { visible } = storeToRefs(useSearchBoxStore()); + const dismissable = ref(true); + const triggerEvent = ref(null); + const getNewNodeLocation = /* @__PURE__ */ __name(() => { + if (!triggerEvent.value) { + return litegraphService.getCanvasCenter(); + } + const originalEvent = triggerEvent.value.detail.originalEvent; + return [originalEvent.canvasX, originalEvent.canvasY]; + }, "getNewNodeLocation"); + const nodeFilters = ref([]); + const addFilter = /* @__PURE__ */ __name((filter) => { + nodeFilters.value.push(filter); + }, "addFilter"); + const removeFilter = /* @__PURE__ */ __name((filter) => { + nodeFilters.value = nodeFilters.value.filter( + (f) => toRaw(f) !== toRaw(filter) + ); + }, "removeFilter"); + const clearFilters = /* @__PURE__ */ __name(() => { + nodeFilters.value = []; + }, "clearFilters"); + const closeDialog = /* @__PURE__ */ __name(() => { + visible.value = false; + }, "closeDialog"); + const addNode = /* @__PURE__ */ __name((nodeDef) => { + const node = litegraphService.addNodeOnGraph(nodeDef, { + pos: getNewNodeLocation() + }); + const eventDetail = triggerEvent.value?.detail; + if (eventDetail && eventDetail.subType === "empty-release") { + eventDetail.linkReleaseContext.links.forEach((link) => { + ConnectingLinkImpl.createFromPlainObject(link).connectTo(node); + }); + } + window.setTimeout(() => { + closeDialog(); + }, 100); + }, "addNode"); + const newSearchBoxEnabled = computed( + () => settingStore.get("Comfy.NodeSearchBoxImpl") === "default" + ); + const showSearchBox = /* @__PURE__ */ __name((e) => { + const detail = e.detail; + if (newSearchBoxEnabled.value) { + if (detail.originalEvent?.pointerType === "touch") { + setTimeout(() => { + showNewSearchBox(e); + }, 128); + } else { + showNewSearchBox(e); + } + } else { + canvasStore.canvas.showSearchBox(detail.originalEvent); + } + }, "showSearchBox"); + const nodeDefStore = useNodeDefStore(); + const showNewSearchBox = /* @__PURE__ */ __name((e) => { + if (e.detail.subType === "empty-release") { + const links = e.detail.linkReleaseContext.links; + if (links.length === 0) { + console.warn("Empty release with no links! This should never happen"); + return; + } + const firstLink = ConnectingLinkImpl.createFromPlainObject(links[0]); + const filter = nodeDefStore.nodeSearchService.getFilterById( + firstLink.releaseSlotType + ); + const dataType = firstLink.type.toString(); + addFilter([filter, dataType]); + } + visible.value = true; + triggerEvent.value = e; + dismissable.value = false; + setTimeout(() => { + dismissable.value = true; + }, 300); + }, "showNewSearchBox"); + const showContextMenu = /* @__PURE__ */ __name((e) => { + if (e.detail.subType !== "empty-release") { + return; + } + const links = e.detail.linkReleaseContext.links; + if (links.length === 0) { + console.warn("Empty release with no links! This should never happen"); + return; + } + const firstLink = ConnectingLinkImpl.createFromPlainObject(links[0]); + const mouseEvent = e.detail.originalEvent; + const commonOptions = { + e: mouseEvent, + allow_searchbox: true, + showSearchBox: /* @__PURE__ */ __name(() => showSearchBox(e), "showSearchBox") + }; + const connectionOptions = firstLink.output ? { + nodeFrom: firstLink.node, + slotFrom: firstLink.output, + afterRerouteId: firstLink.afterRerouteId + } : { + nodeTo: firstLink.node, + slotTo: firstLink.input, + afterRerouteId: firstLink.afterRerouteId + }; + canvasStore.canvas.showConnectionMenu({ + ...connectionOptions, + ...commonOptions + }); + }, "showContextMenu"); + const canvasStore = useCanvasStore(); + watchEffect(() => { + if (canvasStore.canvas) { + LiteGraph.release_link_on_empty_shows_menu = false; + canvasStore.canvas.allow_searchbox = false; + } + }); + const canvasEventHandler = /* @__PURE__ */ __name((e) => { + if (e.detail.subType === "empty-double-click") { + showSearchBox(e); + } else if (e.detail.subType === "empty-release") { + handleCanvasEmptyRelease(e); + } else if (e.detail.subType === "group-double-click") { + const group = e.detail.group; + const [x, y] = group.pos; + const relativeY = e.detail.originalEvent.canvasY - y; + if (relativeY > group.titleHeight) { + showSearchBox(e); + } + } + }, "canvasEventHandler"); + const linkReleaseAction = computed(() => { + return settingStore.get("Comfy.LinkRelease.Action"); + }); + const linkReleaseActionShift = computed(() => { + return settingStore.get("Comfy.LinkRelease.ActionShift"); + }); + const handleCanvasEmptyRelease = /* @__PURE__ */ __name((e) => { + const detail = e.detail; + const shiftPressed = detail.originalEvent.shiftKey; + const action = shiftPressed ? linkReleaseActionShift.value : linkReleaseAction.value; + switch (action) { + case LinkReleaseTriggerAction.SEARCH_BOX: + showSearchBox(e); + break; + case LinkReleaseTriggerAction.CONTEXT_MENU: + showContextMenu(e); + break; + case LinkReleaseTriggerAction.NO_ACTION: + default: + break; + } + }, "handleCanvasEmptyRelease"); + useEventListener(document, "litegraph:canvas", canvasEventHandler); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", null, [ + createVNode(unref(script$a), { + visible: unref(visible), + "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null), + modal: "", + "dismissable-mask": dismissable.value, + onHide: clearFilters, + pt: { + root: { + class: "invisible-dialog-root", + role: "search" + }, + mask: { class: "node-search-box-dialog-mask" }, + transition: { + enterFromClass: "opacity-0 scale-75", + // 100ms is the duration of the transition in the dialog component + enterActiveClass: "transition-all duration-100 ease-out", + leaveActiveClass: "transition-all duration-100 ease-in", + leaveToClass: "opacity-0 scale-75" + } + } + }, { + container: withCtx(() => [ + createVNode(_sfc_main$i, { + filters: nodeFilters.value, + onAddFilter: addFilter, + onRemoveFilter: removeFilter, + onAddNode: addNode + }, null, 8, ["filters"]) + ]), + _: 1 + }, 8, ["visible", "dismissable-mask"]) + ]); + }; + } +}); +const _sfc_main$g = /* @__PURE__ */ defineComponent({ + __name: "SidebarIcon", + props: { + icon: String, + selected: Boolean, + tooltip: { + type: String, + default: "" + }, + class: { + type: String, + default: "" + }, + iconBadge: { + type: [String, Function], + default: "" + } + }, + emits: ["click"], + setup(__props, { emit: __emit }) { + const props = __props; + const emit = __emit; + const overlayValue = computed( + () => typeof props.iconBadge === "function" ? props.iconBadge() || "" : props.iconBadge + ); + const shouldShowBadge = computed(() => !!overlayValue.value); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return withDirectives((openBlock(), createBlock(unref(script), { + class: normalizeClass(props.class), + text: "", + pt: { + root: { + class: `side-bar-button ${props.selected ? "p-button-primary side-bar-button-selected" : "p-button-secondary"}`, + "aria-label": props.tooltip + } + }, + onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event)) + }, { + icon: withCtx(() => [ + shouldShowBadge.value ? (openBlock(), createBlock(unref(script$b), { + key: 0, + value: overlayValue.value + }, { + default: withCtx(() => [ + createBaseVNode("i", { + class: normalizeClass(props.icon + " side-bar-button-icon") + }, null, 2) + ]), + _: 1 + }, 8, ["value"])) : (openBlock(), createElementBlock("i", { + key: 1, + class: normalizeClass(props.icon + " side-bar-button-icon") + }, null, 2)) + ]), + _: 1 + }, 8, ["class", "pt"])), [ + [_directive_tooltip, { value: props.tooltip, showDelay: 300, hideDelay: 300 }] + ]); + }; + } +}); +const SidebarIcon = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-6ab4daa6"]]); +const _sfc_main$f = /* @__PURE__ */ defineComponent({ + __name: "SidebarLogoutIcon", + setup(__props) { + const { t: t2 } = useI18n(); + const userStore = useUserStore(); + const tooltip = computed( + () => `${t2("sideToolbar.logout")} (${userStore.currentUser?.username})` + ); + const logout = /* @__PURE__ */ __name(() => { + userStore.logout(); + window.location.reload(); + }, "logout"); + return (_ctx, _cache) => { + return openBlock(), createBlock(SidebarIcon, { + icon: "pi pi-sign-out", + tooltip: tooltip.value, + onClick: logout + }, null, 8, ["tooltip"]); + }; + } +}); +const _sfc_main$e = /* @__PURE__ */ defineComponent({ + __name: "SidebarSettingsToggleIcon", + setup(__props) { + const dialogStore = useDialogStore(); + const showSetting = /* @__PURE__ */ __name(() => { + dialogStore.showDialog({ + key: "global-settings", + headerComponent: SettingDialogHeader, + component: SettingDialogContent + }); + }, "showSetting"); + return (_ctx, _cache) => { + return openBlock(), createBlock(SidebarIcon, { + icon: "pi pi-cog", + class: "comfy-settings-btn", + onClick: showSetting, + tooltip: _ctx.$t("g.settings") + }, null, 8, ["tooltip"]); + }; + } +}); +const _sfc_main$d = /* @__PURE__ */ defineComponent({ + __name: "SidebarThemeToggleIcon", + setup(__props) { + const colorPaletteStore = useColorPaletteStore(); + const icon = computed( + () => colorPaletteStore.completedActivePalette.light_theme ? "pi pi-sun" : "pi pi-moon" + ); + const commandStore = useCommandStore(); + const toggleTheme = /* @__PURE__ */ __name(() => { + commandStore.execute("Comfy.ToggleTheme"); + }, "toggleTheme"); + return (_ctx, _cache) => { + return openBlock(), createBlock(SidebarIcon, { + icon: icon.value, + onClick: toggleTheme, + tooltip: _ctx.$t("sideToolbar.themeToggle"), + class: "comfy-vue-theme-toggle" + }, null, 8, ["icon", "tooltip"]); + }; + } +}); +const _hoisted_1$d = { class: "side-tool-bar-end" }; +const _hoisted_2$3 = { + key: 0, + class: "sidebar-content-container h-full overflow-y-auto overflow-x-hidden" +}; +const _sfc_main$c = /* @__PURE__ */ defineComponent({ + __name: "SideToolbar", + setup(__props) { + const workspaceStore = useWorkspaceStore(); + const settingStore = useSettingStore(); + const userStore = useUserStore(); + const teleportTarget = computed( + () => settingStore.get("Comfy.Sidebar.Location") === "left" ? ".comfyui-body-left" : ".comfyui-body-right" + ); + const isSmall = computed( + () => settingStore.get("Comfy.Sidebar.Size") === "small" + ); + const tabs = computed(() => workspaceStore.getSidebarTabs()); + const selectedTab = computed(() => workspaceStore.sidebarTab.activeSidebarTab); + const onTabClick = /* @__PURE__ */ __name((item) => { + workspaceStore.sidebarTab.toggleSidebarTab(item.id); + }, "onTabClick"); + const keybindingStore = useKeybindingStore(); + const getTabTooltipSuffix = /* @__PURE__ */ __name((tab) => { + const keybinding = keybindingStore.getKeybindingByCommandId( + `Workspace.ToggleSidebarTab.${tab.id}` + ); + return keybinding ? ` (${keybinding.combo.toString()})` : ""; + }, "getTabTooltipSuffix"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock(Fragment, null, [ + (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ + createBaseVNode("nav", { + class: normalizeClass(["side-tool-bar-container", { "small-sidebar": isSmall.value }]) + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => { + return openBlock(), createBlock(SidebarIcon, { + key: tab.id, + icon: tab.icon, + iconBadge: tab.iconBadge, + tooltip: tab.tooltip + getTabTooltipSuffix(tab), + selected: tab.id === selectedTab.value?.id, + class: normalizeClass(tab.id + "-tab-button"), + onClick: /* @__PURE__ */ __name(($event) => onTabClick(tab), "onClick") + }, null, 8, ["icon", "iconBadge", "tooltip", "selected", "class", "onClick"]); + }), 128)), + createBaseVNode("div", _hoisted_1$d, [ + unref(userStore).isMultiUserServer ? (openBlock(), createBlock(_sfc_main$f, { key: 0 })) : createCommentVNode("", true), + createVNode(_sfc_main$d), + createVNode(_sfc_main$e) + ]) + ], 2) + ], 8, ["to"])), + selectedTab.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [ + createVNode(_sfc_main$q, { extension: selectedTab.value }, null, 8, ["extension"]) + ])) : createCommentVNode("", true) + ], 64); + }; + } +}); +const SideToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-33cac83a"]]); +const _hoisted_1$c = { class: "workflow-label text-sm max-w-[150px] truncate inline-block" }; +const _hoisted_2$2 = { class: "relative" }; +const _hoisted_3$2 = { + key: 0, + class: "status-indicator" +}; +const _sfc_main$b = /* @__PURE__ */ defineComponent({ + __name: "WorkflowTab", + props: { + class: {}, + workflowOption: {} + }, + setup(__props) { + const props = __props; + const workspaceStore = useWorkspaceStore(); + const workflowStore = useWorkflowStore(); + const workflowTabRef = ref(null); + const closeWorkflows = /* @__PURE__ */ __name(async (options) => { + for (const opt of options) { + if (!await useWorkflowService().closeWorkflow(opt.workflow, { + warnIfUnsaved: !workspaceStore.shiftDown + })) { + break; + } + } + }, "closeWorkflows"); + const onCloseWorkflow = /* @__PURE__ */ __name((option) => { + closeWorkflows([option]); + }, "onCloseWorkflow"); + const tabGetter = /* @__PURE__ */ __name(() => workflowTabRef.value, "tabGetter"); + usePragmaticDraggable(tabGetter, { + getInitialData: /* @__PURE__ */ __name(() => { + return { + workflowKey: props.workflowOption.workflow.key + }; + }, "getInitialData") + }); + usePragmaticDroppable(tabGetter, { + getData: /* @__PURE__ */ __name(() => { + return { + workflowKey: props.workflowOption.workflow.key + }; + }, "getData"), + onDrop: /* @__PURE__ */ __name((e) => { + const fromIndex = workflowStore.openWorkflows.findIndex( + (wf) => wf.key === e.source.data.workflowKey + ); + const toIndex = workflowStore.openWorkflows.findIndex( + (wf) => wf.key === e.location.current.dropTargets[0]?.data.workflowKey + ); + if (fromIndex !== toIndex) { + workflowStore.reorderWorkflows(fromIndex, toIndex); + } + }, "onDrop") + }); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", mergeProps({ + class: "flex p-2 gap-2 workflow-tab", + ref_key: "workflowTabRef", + ref: workflowTabRef + }, _ctx.$attrs), [ + withDirectives((openBlock(), createElementBlock("span", _hoisted_1$c, [ + createTextVNode(toDisplayString(_ctx.workflowOption.workflow.filename), 1) + ])), [ + [ + _directive_tooltip, + _ctx.workflowOption.workflow.key, + void 0, + { bottom: true } + ] + ]), + createBaseVNode("div", _hoisted_2$2, [ + !unref(workspaceStore).shiftDown && (_ctx.workflowOption.workflow.isModified || !_ctx.workflowOption.workflow.isPersisted) ? (openBlock(), createElementBlock("span", _hoisted_3$2, "•")) : createCommentVNode("", true), + createVNode(unref(script), { + class: "close-button p-0 w-auto", + icon: "pi pi-times", + text: "", + severity: "secondary", + size: "small", + onClick: _cache[0] || (_cache[0] = withModifiers(($event) => onCloseWorkflow(_ctx.workflowOption), ["stop"])) + }) + ]) + ], 16); + }; + } +}); +const WorkflowTab = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8d011a31"]]); +const _hoisted_1$b = { class: "workflow-tabs-container flex flex-row max-w-full h-full" }; +const _sfc_main$a = /* @__PURE__ */ defineComponent({ + __name: "WorkflowTabs", + props: { + class: {} + }, + setup(__props) { + const props = __props; + const { t: t2 } = useI18n(); + const workspaceStore = useWorkspaceStore(); + const workflowStore = useWorkflowStore(); + const workflowService = useWorkflowService(); + const workflowBookmarkStore = useWorkflowBookmarkStore(); + const rightClickedTab = ref(null); + const menu = ref(); + const workflowToOption = /* @__PURE__ */ __name((workflow) => ({ + value: workflow.path, + workflow + }), "workflowToOption"); + const options = computed( + () => workflowStore.openWorkflows.map(workflowToOption) + ); + const selectedWorkflow = computed( + () => workflowStore.activeWorkflow ? workflowToOption(workflowStore.activeWorkflow) : null + ); + const onWorkflowChange = /* @__PURE__ */ __name((option) => { + if (!option) { + return; + } + if (selectedWorkflow.value?.value === option.value) { + return; + } + workflowService.openWorkflow(option.workflow); + }, "onWorkflowChange"); + const closeWorkflows = /* @__PURE__ */ __name(async (options2) => { + for (const opt of options2) { + if (!await workflowService.closeWorkflow(opt.workflow, { + warnIfUnsaved: !workspaceStore.shiftDown + })) { + break; + } + } + }, "closeWorkflows"); + const onCloseWorkflow = /* @__PURE__ */ __name((option) => { + closeWorkflows([option]); + }, "onCloseWorkflow"); + const showContextMenu = /* @__PURE__ */ __name((event, option) => { + rightClickedTab.value = option; + menu.value.show(event); + }, "showContextMenu"); + const contextMenuItems = computed(() => { + const tab = rightClickedTab.value; + if (!tab) return []; + const index = options.value.findIndex((v) => v.workflow === tab.workflow); + return [ + { + label: t2("tabMenu.duplicateTab"), + command: /* @__PURE__ */ __name(() => { + workflowService.duplicateWorkflow(tab.workflow); + }, "command") + }, + { + separator: true + }, + { + label: t2("tabMenu.closeTab"), + command: /* @__PURE__ */ __name(() => onCloseWorkflow(tab), "command") + }, + { + label: t2("tabMenu.closeTabsToLeft"), + command: /* @__PURE__ */ __name(() => closeWorkflows(options.value.slice(0, index)), "command"), + disabled: index <= 0 + }, + { + label: t2("tabMenu.closeTabsToRight"), + command: /* @__PURE__ */ __name(() => closeWorkflows(options.value.slice(index + 1)), "command"), + disabled: index === options.value.length - 1 + }, + { + label: t2("tabMenu.closeOtherTabs"), + command: /* @__PURE__ */ __name(() => closeWorkflows([ + ...options.value.slice(index + 1), + ...options.value.slice(0, index) + ]), "command"), + disabled: options.value.length <= 1 + }, + { + label: workflowBookmarkStore.isBookmarked(tab.workflow.path) ? t2("tabMenu.removeFromBookmarks") : t2("tabMenu.addToBookmarks"), + command: /* @__PURE__ */ __name(() => workflowBookmarkStore.toggleBookmarked(tab.workflow.path), "command"), + disabled: tab.workflow.isTemporary + } + ]; + }); + const commandStore = useCommandStore(); + const handleWheel = /* @__PURE__ */ __name((event) => { + const scrollElement = event.currentTarget; + const scrollAmount = event.deltaX || event.deltaY; + scrollElement.scroll({ + left: scrollElement.scrollLeft + scrollAmount + }); + }, "handleWheel"); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", _hoisted_1$b, [ + createVNode(unref(script$d), { + class: "overflow-hidden no-drag", + "pt:content": { + class: "p-0 w-full", + onwheel: handleWheel + }, + "pt:barX": "h-1" + }, { + default: withCtx(() => [ + createVNode(unref(script$c), { + class: normalizeClass(["workflow-tabs bg-transparent", props.class]), + modelValue: selectedWorkflow.value, + "onUpdate:modelValue": onWorkflowChange, + options: options.value, + optionLabel: "label", + dataKey: "value" + }, { + option: withCtx(({ option }) => [ + createVNode(WorkflowTab, { + onContextmenu: /* @__PURE__ */ __name(($event) => showContextMenu($event, option), "onContextmenu"), + onMouseup: withModifiers(($event) => onCloseWorkflow(option), ["middle"]), + "workflow-option": option + }, null, 8, ["onContextmenu", "onMouseup", "workflow-option"]) + ]), + _: 1 + }, 8, ["class", "modelValue", "options"]) + ]), + _: 1 + }, 8, ["pt:content"]), + withDirectives(createVNode(unref(script), { + class: "new-blank-workflow-button flex-shrink-0 no-drag", + icon: "pi pi-plus", + text: "", + severity: "secondary", + "aria-label": _ctx.$t("sideToolbar.newBlankWorkflow"), + onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.NewBlankWorkflow")) + }, null, 8, ["aria-label"]), [ + [_directive_tooltip, { value: _ctx.$t("sideToolbar.newBlankWorkflow"), showDelay: 300 }] + ]), + createVNode(unref(script$e), { + ref_key: "menu", + ref: menu, + model: contextMenuItems.value + }, null, 8, ["model"]) + ]); + }; + } +}); +const WorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-54fadc45"]]); +const _hoisted_1$a = { class: "absolute top-0 left-0 w-auto max-w-full pointer-events-auto" }; +const _sfc_main$9 = /* @__PURE__ */ defineComponent({ + __name: "SecondRowWorkflowTabs", + setup(__props) { + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$a, [ + createVNode(WorkflowTabs) + ]); + }; + } +}); +const SecondRowWorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-38831d8e"]]); +const CORE_SETTINGS = [ + { + id: "Comfy.Validation.Workflows", + name: "Validate workflows", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.NodeSearchBoxImpl", + category: ["Comfy", "Node Search Box", "Implementation"], + experimental: true, + name: "Node search box implementation", + type: "combo", + options: ["default", "litegraph (legacy)"], + defaultValue: "default" + }, + { + id: "Comfy.LinkRelease.Action", + category: ["LiteGraph", "LinkRelease", "Action"], + name: "Action on link release (No modifier)", + type: "combo", + options: Object.values(LinkReleaseTriggerAction), + defaultValue: LinkReleaseTriggerAction.CONTEXT_MENU + }, + { + id: "Comfy.LinkRelease.ActionShift", + category: ["LiteGraph", "LinkRelease", "ActionShift"], + name: "Action on link release (Shift)", + type: "combo", + options: Object.values(LinkReleaseTriggerAction), + defaultValue: LinkReleaseTriggerAction.SEARCH_BOX + }, + { + id: "Comfy.NodeSearchBoxImpl.NodePreview", + category: ["Comfy", "Node Search Box", "NodePreview"], + name: "Node preview", + tooltip: "Only applies to the default implementation", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.NodeSearchBoxImpl.ShowCategory", + category: ["Comfy", "Node Search Box", "ShowCategory"], + name: "Show node category in search results", + tooltip: "Only applies to the default implementation", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.NodeSearchBoxImpl.ShowIdName", + category: ["Comfy", "Node Search Box", "ShowIdName"], + name: "Show node id name in search results", + tooltip: "Only applies to the default implementation", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.NodeSearchBoxImpl.ShowNodeFrequency", + category: ["Comfy", "Node Search Box", "ShowNodeFrequency"], + name: "Show node frequency in search results", + tooltip: "Only applies to the default implementation", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.Sidebar.Location", + category: ["Appearance", "Sidebar", "Location"], + name: "Sidebar location", + type: "combo", + options: ["left", "right"], + defaultValue: "left" + }, + { + id: "Comfy.Sidebar.Size", + category: ["Appearance", "Sidebar", "Size"], + name: "Sidebar size", + type: "combo", + options: ["normal", "small"], + // Default to small if the window is less than 1536px(2xl) wide. + defaultValue: /* @__PURE__ */ __name(() => window.innerWidth < 1536 ? "small" : "normal", "defaultValue") + }, + { + id: "Comfy.TextareaWidget.FontSize", + category: ["Appearance", "Node Widget", "TextareaWidget", "FontSize"], + name: "Textarea widget font size", + type: "slider", + defaultValue: 10, + attrs: { + min: 8, + max: 24 + } + }, + { + id: "Comfy.TextareaWidget.Spellcheck", + category: ["Comfy", "Node Widget", "TextareaWidget", "Spellcheck"], + name: "Textarea widget spellcheck", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.Workflow.SortNodeIdOnSave", + name: "Sort node IDs when saving workflow", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.Graph.CanvasInfo", + category: ["LiteGraph", "Canvas", "CanvasInfo"], + name: "Show canvas info on bottom left corner (fps, etc.)", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.Node.ShowDeprecated", + name: "Show deprecated nodes in search", + tooltip: "Deprecated nodes are hidden by default in the UI, but remain functional in existing workflows that use them.", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.Node.ShowExperimental", + name: "Show experimental nodes in search", + tooltip: "Experimental nodes are marked as such in the UI and may be subject to significant changes or removal in future versions. Use with caution in production workflows", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.Node.Opacity", + category: ["Appearance", "Node", "Opacity"], + name: "Node opacity", + type: "slider", + defaultValue: 1, + attrs: { + min: 0.01, + max: 1, + step: 0.01 + } + }, + { + id: "Comfy.Workflow.ShowMissingNodesWarning", + name: "Show missing nodes warning", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.Workflow.ShowMissingModelsWarning", + name: "Show missing models warning", + type: "boolean", + defaultValue: true, + experimental: true + }, + { + id: "Comfy.Graph.ZoomSpeed", + category: ["LiteGraph", "Canvas", "ZoomSpeed"], + name: "Canvas zoom speed", + type: "slider", + defaultValue: 1.1, + attrs: { + min: 1.01, + max: 2.5, + step: 0.01 + } + }, + // Bookmarks are stored in the settings store. + // Bookmarks are in format of category/display_name. e.g. "conditioning/CLIPTextEncode" + { + id: "Comfy.NodeLibrary.Bookmarks", + name: "Node library bookmarks with display name (deprecated)", + type: "hidden", + defaultValue: [], + deprecated: true + }, + { + id: "Comfy.NodeLibrary.Bookmarks.V2", + name: "Node library bookmarks v2 with unique name", + type: "hidden", + defaultValue: [] + }, + // Stores mapping from bookmark folder name to its customization. + { + id: "Comfy.NodeLibrary.BookmarksCustomization", + name: "Node library bookmarks customization", + type: "hidden", + defaultValue: {} + }, + // Hidden setting used by the queue for how to fit images + { + id: "Comfy.Queue.ImageFit", + name: "Queue image fit", + type: "hidden", + defaultValue: "cover" + }, + { + id: "Comfy.GroupSelectedNodes.Padding", + category: ["LiteGraph", "Group", "Padding"], + name: "Group selected nodes padding", + type: "slider", + defaultValue: 10, + attrs: { + min: 0, + max: 100 + } + }, + { + id: "Comfy.Node.DoubleClickTitleToEdit", + category: ["LiteGraph", "Node", "DoubleClickTitleToEdit"], + name: "Double click node title to edit", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.Group.DoubleClickTitleToEdit", + category: ["LiteGraph", "Group", "DoubleClickTitleToEdit"], + name: "Double click group title to edit", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.Window.UnloadConfirmation", + name: "Show confirmation when closing window", + type: "boolean", + defaultValue: true, + versionModified: "1.7.12" + }, + { + id: "Comfy.TreeExplorer.ItemPadding", + category: ["Appearance", "Tree Explorer", "ItemPadding"], + name: "Tree explorer item padding", + type: "slider", + defaultValue: 2, + attrs: { + min: 0, + max: 8, + step: 1 + } + }, + { + id: "Comfy.ModelLibrary.AutoLoadAll", + name: "Automatically load all model folders", + tooltip: "If true, all folders will load as soon as you open the model library (this may cause delays while it loads). If false, root level model folders will only load once you click on them.", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.ModelLibrary.NameFormat", + name: "What name to display in the model library tree view", + tooltip: 'Select "filename" to render a simplified view of the raw filename (without directory or ".safetensors" extension) in the model list. Select "title" to display the configurable model metadata title.', + type: "combo", + options: ["filename", "title"], + defaultValue: "title" + }, + { + id: "Comfy.Locale", + name: "Language", + type: "combo", + options: [ + { value: "en", text: "English" }, + { value: "zh", text: "中文" }, + { value: "ru", text: "Русский" }, + { value: "ja", text: "日本語" }, + { value: "ko", text: "한국어" }, + { value: "fr", text: "Français" } + ], + defaultValue: /* @__PURE__ */ __name(() => navigator.language.split("-")[0] || "en", "defaultValue") + }, + { + id: "Comfy.NodeBadge.NodeSourceBadgeMode", + category: ["LiteGraph", "Node", "NodeSourceBadgeMode"], + name: "Node source badge mode", + type: "combo", + options: Object.values(NodeBadgeMode), + defaultValue: NodeBadgeMode.HideBuiltIn + }, + { + id: "Comfy.NodeBadge.NodeIdBadgeMode", + category: ["LiteGraph", "Node", "NodeIdBadgeMode"], + name: "Node ID badge mode", + type: "combo", + options: [NodeBadgeMode.None, NodeBadgeMode.ShowAll], + defaultValue: NodeBadgeMode.None + }, + { + id: "Comfy.NodeBadge.NodeLifeCycleBadgeMode", + category: ["LiteGraph", "Node", "NodeLifeCycleBadgeMode"], + name: "Node life cycle badge mode", + type: "combo", + options: [NodeBadgeMode.None, NodeBadgeMode.ShowAll], + defaultValue: NodeBadgeMode.ShowAll + }, + { + id: "Comfy.ConfirmClear", + category: ["Comfy", "Workflow", "ConfirmClear"], + name: "Require confirmation when clearing workflow", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.PromptFilename", + category: ["Comfy", "Workflow", "PromptFilename"], + name: "Prompt for filename when saving workflow", + type: "boolean", + defaultValue: true + }, + /** + * file format for preview + * + * format;quality + * + * ex) + * webp;50 -> webp, quality 50 + * jpeg;80 -> rgb, jpeg, quality 80 + * + * @type {string} + */ + { + id: "Comfy.PreviewFormat", + category: ["LiteGraph", "Node Widget", "PreviewFormat"], + name: "Preview image format", + tooltip: "When displaying a preview in the image widget, convert it to a lightweight image, e.g. webp, jpeg, webp;50, etc.", + type: "text", + defaultValue: "" + }, + { + id: "Comfy.DisableSliders", + category: ["LiteGraph", "Node Widget", "DisableSliders"], + name: "Disable node widget sliders", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.DisableFloatRounding", + category: ["LiteGraph", "Node Widget", "DisableFloatRounding"], + name: "Disable default float widget rounding.", + tooltip: "(requires page reload) Cannot disable round when round is set by the node in the backend.", + type: "boolean", + defaultValue: false + }, + { + id: "Comfy.FloatRoundingPrecision", + category: ["LiteGraph", "Node Widget", "FloatRoundingPrecision"], + name: "Float widget rounding decimal places [0 = auto].", + tooltip: "(requires page reload)", + type: "slider", + attrs: { + min: 0, + max: 6, + step: 1 + }, + defaultValue: 0 + }, + { + id: "Comfy.EnableTooltips", + category: ["LiteGraph", "Node", "EnableTooltips"], + name: "Enable Tooltips", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.DevMode", + name: "Enable dev mode options (API save, etc.)", + type: "boolean", + defaultValue: false, + onChange: /* @__PURE__ */ __name((value) => { + const element = document.getElementById("comfy-dev-save-api-button"); + if (element) { + element.style.display = value ? "flex" : "none"; + } + }, "onChange") + }, + { + id: "Comfy.UseNewMenu", + category: ["Comfy", "Menu", "UseNewMenu"], + defaultValue: "Top", + name: "Use new menu", + type: "combo", + options: ["Disabled", "Top", "Bottom"], + migrateDeprecatedValue: /* @__PURE__ */ __name((value) => { + if (value === "Floating") { + return "Top"; + } + return value; + }, "migrateDeprecatedValue") + }, + { + id: "Comfy.Workflow.WorkflowTabsPosition", + name: "Opened workflows position", + type: "combo", + options: ["Sidebar", "Topbar", "Topbar (2nd-row)"], + // Default to topbar (2nd-row) if the window is less than 1536px(2xl) wide. + defaultValue: /* @__PURE__ */ __name(() => window.innerWidth < 1536 ? "Topbar (2nd-row)" : "Topbar", "defaultValue") + }, + { + id: "Comfy.Graph.CanvasMenu", + category: ["LiteGraph", "Canvas", "CanvasMenu"], + name: "Show graph canvas menu", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.QueueButton.BatchCountLimit", + name: "Batch count limit", + tooltip: "The maximum number of tasks added to the queue at one button click", + type: "number", + defaultValue: 100, + versionAdded: "1.3.5" + }, + { + id: "Comfy.Keybinding.UnsetBindings", + name: "Keybindings unset by the user", + type: "hidden", + defaultValue: [], + versionAdded: "1.3.7", + versionModified: "1.7.3", + migrateDeprecatedValue: /* @__PURE__ */ __name((value) => { + return value.map((keybinding) => { + if (keybinding["targetSelector"] === "#graph-canvas") { + keybinding["targetElementId"] = "graph-canvas"; + } + return keybinding; + }); + }, "migrateDeprecatedValue") + }, + { + id: "Comfy.Keybinding.NewBindings", + name: "Keybindings set by the user", + type: "hidden", + defaultValue: [], + versionAdded: "1.3.7" + }, + { + id: "Comfy.Extension.Disabled", + name: "Disabled extension names", + type: "hidden", + defaultValue: [], + versionAdded: "1.3.11" + }, + { + id: "Comfy.Validation.NodeDefs", + name: "Validate node definitions (slow)", + type: "boolean", + tooltip: "Recommended for node developers. This will validate all node definitions on startup.", + defaultValue: false, + versionAdded: "1.3.14" + }, + { + id: "Comfy.LinkRenderMode", + category: ["LiteGraph", "Graph", "LinkRenderMode"], + name: "Link Render Mode", + defaultValue: 2, + type: "combo", + options: [ + { value: LiteGraph.STRAIGHT_LINK, text: "Straight" }, + { value: LiteGraph.LINEAR_LINK, text: "Linear" }, + { value: LiteGraph.SPLINE_LINK, text: "Spline" }, + { value: LiteGraph.HIDDEN_LINK, text: "Hidden" } + ] + }, + { + id: "Comfy.Node.AutoSnapLinkToSlot", + category: ["LiteGraph", "Node", "AutoSnapLinkToSlot"], + name: "Auto snap link to node slot", + tooltip: "When dragging a link over a node, the link automatically snap to a viable input slot on the node", + type: "boolean", + defaultValue: true, + versionAdded: "1.3.29" + }, + { + id: "Comfy.Node.SnapHighlightsNode", + category: ["LiteGraph", "Node", "SnapHighlightsNode"], + name: "Snap highlights node", + tooltip: "When dragging a link over a node with viable input slot, highlight the node", + type: "boolean", + defaultValue: true, + versionAdded: "1.3.29" + }, + { + id: "Comfy.Node.BypassAllLinksOnDelete", + category: ["LiteGraph", "Node", "BypassAllLinksOnDelete"], + name: "Keep all links when deleting nodes", + tooltip: "When deleting a node, attempt to reconnect all of its input and output links (bypassing the deleted node)", + type: "boolean", + defaultValue: true, + versionAdded: "1.3.40" + }, + { + id: "Comfy.Node.MiddleClickRerouteNode", + category: ["LiteGraph", "Node", "MiddleClickRerouteNode"], + name: "Middle-click creates a new Reroute node", + type: "boolean", + defaultValue: true, + versionAdded: "1.3.42" + }, + { + id: "Comfy.RerouteBeta", + category: ["LiteGraph", "RerouteBeta"], + name: "Opt-in to the reroute beta test", + tooltip: "Enables the new native reroutes.\n\nReroutes can be added by holding alt and dragging from a link line, or on the link menu.\n\nDisabling this option is non-destructive - reroutes are hidden.", + experimental: true, + type: "boolean", + defaultValue: false, + versionAdded: "1.3.42" + }, + { + id: "Comfy.Graph.LinkMarkers", + category: ["LiteGraph", "Link", "LinkMarkers"], + name: "Link midpoint markers", + defaultValue: LinkMarkerShape.Circle, + type: "combo", + options: [ + { value: LinkMarkerShape.None, text: "None" }, + { value: LinkMarkerShape.Circle, text: "Circle" }, + { value: LinkMarkerShape.Arrow, text: "Arrow" } + ], + versionAdded: "1.3.42" + }, + { + id: "Comfy.DOMClippingEnabled", + category: ["LiteGraph", "Node", "DOMClippingEnabled"], + name: "Enable DOM element clipping (enabling may reduce performance)", + type: "boolean", + defaultValue: true + }, + { + id: "Comfy.Graph.CtrlShiftZoom", + category: ["LiteGraph", "Canvas", "CtrlShiftZoom"], + name: "Enable fast-zoom shortcut (Ctrl + Shift + Drag)", + type: "boolean", + defaultValue: true, + versionAdded: "1.4.0" + }, + { + id: "Comfy.Pointer.ClickDrift", + category: ["LiteGraph", "Pointer", "ClickDrift"], + name: "Pointer click drift (maximum distance)", + tooltip: "If the pointer moves more than this distance while holding a button down, it is considered dragging (rather than clicking).\n\nHelps prevent objects from being unintentionally nudged if the pointer is moved whilst clicking.", + experimental: true, + type: "slider", + attrs: { + min: 0, + max: 20, + step: 1 + }, + defaultValue: 6, + versionAdded: "1.4.3" + }, + { + id: "Comfy.Pointer.ClickBufferTime", + category: ["LiteGraph", "Pointer", "ClickBufferTime"], + name: "Pointer click drift delay", + tooltip: "After pressing a pointer button down, this is the maximum time (in milliseconds) that pointer movement can be ignored for.\n\nHelps prevent objects from being unintentionally nudged if the pointer is moved whilst clicking.", + experimental: true, + type: "slider", + attrs: { + min: 0, + max: 1e3, + step: 25 + }, + defaultValue: 150, + versionAdded: "1.4.3" + }, + { + id: "Comfy.Pointer.DoubleClickTime", + category: ["LiteGraph", "Pointer", "DoubleClickTime"], + name: "Double click interval (maximum)", + tooltip: "The maximum time in milliseconds between the two clicks of a double-click. Increasing this value may assist if double-clicks are sometimes not registered.", + type: "slider", + attrs: { + min: 100, + max: 1e3, + step: 50 + }, + defaultValue: 300, + versionAdded: "1.4.3" + }, + { + id: "Comfy.SnapToGrid.GridSize", + category: ["LiteGraph", "Canvas", "GridSize"], + name: "Snap to grid size", + type: "slider", + attrs: { + min: 1, + max: 500 + }, + tooltip: "When dragging and resizing nodes while holding shift they will be aligned to the grid, this controls the size of that grid.", + defaultValue: LiteGraph.CANVAS_GRID_SIZE + }, + // Keep the 'pysssss.SnapToGrid' setting id so we don't need to migrate setting values. + // Using a new setting id can cause existing users to lose their existing settings. + { + id: "pysssss.SnapToGrid", + category: ["LiteGraph", "Canvas", "AlwaysSnapToGrid"], + name: "Always snap to grid", + type: "boolean", + defaultValue: false, + versionAdded: "1.3.13" + }, + { + id: "Comfy.Server.ServerConfigValues", + name: "Server config values for frontend display", + tooltip: "Server config values used for frontend display only", + type: "hidden", + // Mapping from server config id to value. + defaultValue: {}, + versionAdded: "1.4.8" + }, + { + id: "Comfy.Server.LaunchArgs", + name: "Server launch arguments", + tooltip: "These are the actual arguments that are passed to the server when it is launched.", + type: "hidden", + defaultValue: {}, + versionAdded: "1.4.8" + }, + { + id: "Comfy.Queue.MaxHistoryItems", + name: "Queue history size", + tooltip: "The maximum number of tasks that show in the queue history.", + type: "slider", + attrs: { + min: 16, + max: 256, + step: 16 + }, + defaultValue: 64, + versionAdded: "1.4.12" + }, + { + id: "LiteGraph.Canvas.MaximumFps", + name: "Maxium FPS", + tooltip: "The maximum frames per second that the canvas is allowed to render. Caps GPU usage at the cost of smoothness. If 0, the screen refresh rate is used. Default: 0", + type: "slider", + attrs: { + min: 0, + max: 120 + }, + defaultValue: 0, + versionAdded: "1.5.1" + }, + { + id: "Comfy.EnableWorkflowViewRestore", + category: ["Comfy", "Workflow", "EnableWorkflowViewRestore"], + name: "Save and restore canvas position and zoom level in workflows", + type: "boolean", + defaultValue: true, + versionModified: "1.5.4" + }, + { + id: "Comfy.Workflow.ConfirmDelete", + name: "Show confirmation when deleting workflows", + type: "boolean", + defaultValue: true, + versionAdded: "1.5.6" + }, + { + id: "Comfy.ColorPalette", + name: "The active color palette id", + type: "hidden", + defaultValue: "dark", + versionModified: "1.6.7", + migrateDeprecatedValue(value) { + return value.startsWith("custom_") ? value.replace("custom_", "") : value; + } + }, + { + id: "Comfy.CustomColorPalettes", + name: "Custom color palettes", + type: "hidden", + defaultValue: {}, + versionModified: "1.6.7" + }, + { + id: "Comfy.WidgetControlMode", + category: ["Comfy", "Node Widget", "WidgetControlMode"], + name: "Widget control mode", + tooltip: "Controls when widget values are updated (randomize/increment/decrement), either before the prompt is queued or after.", + type: "combo", + defaultValue: "after", + options: ["before", "after"], + versionModified: "1.6.10" + }, + { + id: "Comfy.TutorialCompleted", + name: "Tutorial completed", + type: "hidden", + defaultValue: false, + versionAdded: "1.8.7" + }, + { + id: "LiteGraph.ContextMenu.Scaling", + name: "Scale node combo widget menus (lists) when zoomed in", + defaultValue: false, + type: "boolean", + versionAdded: "1.8.8" + } +]; +const useCanvasDrop = /* @__PURE__ */ __name((canvasRef) => { + const modelToNodeStore = useModelToNodeStore(); + const litegraphService = useLitegraphService(); + usePragmaticDroppable(() => canvasRef.value, { + getDropEffect: /* @__PURE__ */ __name((args) => args.source.data.type === "tree-explorer-node" ? "copy" : "move", "getDropEffect"), + onDrop: /* @__PURE__ */ __name((event) => { + const loc = event.location.current.input; + const dndData = event.source.data; + if (dndData.type === "tree-explorer-node") { + const node = dndData.data; + if (node.data instanceof ComfyNodeDefImpl) { + const nodeDef = node.data; + const pos = app.clientPosToCanvasPos([ + loc.clientX, + loc.clientY + LiteGraph.NODE_TITLE_HEIGHT + ]); + litegraphService.addNodeOnGraph(nodeDef, { pos }); + } else if (node.data instanceof ComfyModelDef) { + const model = node.data; + const pos = app.clientPosToCanvasPos([loc.clientX, loc.clientY]); + const nodeAtPos = app.graph.getNodeOnPos(pos[0], pos[1]); + let targetProvider = null; + let targetGraphNode = null; + if (nodeAtPos) { + const providers = modelToNodeStore.getAllNodeProviders( + model.directory + ); + for (const provider of providers) { + if (provider.nodeDef.name === nodeAtPos.comfyClass) { + targetGraphNode = nodeAtPos; + targetProvider = provider; + } + } + } + if (!targetGraphNode) { + const provider = modelToNodeStore.getNodeProvider(model.directory); + if (provider) { + targetGraphNode = litegraphService.addNodeOnGraph( + provider.nodeDef, + { + pos + } + ); + targetProvider = provider; + } + } + if (targetGraphNode) { + const widget = targetGraphNode.widgets?.find( + (widget2) => widget2.name === targetProvider?.key + ); + if (widget) { + widget.value = model.file_name; + } + } + } + } + }, "onDrop") + }); +}, "useCanvasDrop"); +const useGlobalLitegraph = /* @__PURE__ */ __name(() => { + window["LiteGraph"] = LiteGraph; + window["LGraph"] = LGraph; + window["LLink"] = LLink; + window["LGraphNode"] = LGraphNode; + window["LGraphGroup"] = LGraphGroup; + window["DragAndScale"] = DragAndScale; + window["LGraphCanvas"] = LGraphCanvas; + window["ContextMenu"] = ContextMenu; + window["LGraphBadge"] = LGraphBadge; +}, "useGlobalLitegraph"); +function useWorkflowPersistence() { + const workflowStore = useWorkflowStore(); + const settingStore = useSettingStore(); + const persistCurrentWorkflow = /* @__PURE__ */ __name(() => { + const workflow = JSON.stringify(app.serializeGraph()); + localStorage.setItem("workflow", workflow); + if (api.clientId) { + sessionStorage.setItem(`workflow:${api.clientId}`, workflow); + } + }, "persistCurrentWorkflow"); + const loadWorkflowFromStorage = /* @__PURE__ */ __name(async (json, workflowName) => { + if (!json) return false; + const workflow = JSON.parse(json); + await app.loadGraphData(workflow, true, true, workflowName); + return true; + }, "loadWorkflowFromStorage"); + const loadPreviousWorkflowFromStorage = /* @__PURE__ */ __name(async () => { + const workflowName = getStorageValue("Comfy.PreviousWorkflow"); + const clientId = api.initialClientId ?? api.clientId; + if (clientId) { + const sessionWorkflow = sessionStorage.getItem(`workflow:${clientId}`); + if (await loadWorkflowFromStorage(sessionWorkflow, workflowName)) { + return true; + } + } + const localWorkflow = localStorage.getItem("workflow"); + return await loadWorkflowFromStorage(localWorkflow, workflowName); + }, "loadPreviousWorkflowFromStorage"); + const loadDefaultWorkflow = /* @__PURE__ */ __name(async () => { + if (!settingStore.get("Comfy.TutorialCompleted")) { + await settingStore.set("Comfy.TutorialCompleted", true); + await useModelStore().loadModelFolders(); + await useWorkflowService().loadTutorialWorkflow(); + } else { + await app.loadGraphData(); + } + }, "loadDefaultWorkflow"); + const restorePreviousWorkflow = /* @__PURE__ */ __name(async () => { + try { + const restored = await loadPreviousWorkflowFromStorage(); + if (!restored) { + await loadDefaultWorkflow(); + } + } catch (err) { + console.error("Error loading previous workflow", err); + await loadDefaultWorkflow(); + } + }, "restorePreviousWorkflow"); + watchEffect(() => { + if (workflowStore.activeWorkflow) { + const workflow = workflowStore.activeWorkflow; + setStorageValue("Comfy.PreviousWorkflow", workflow.key); + persistCurrentWorkflow(); + } + }); + api.addEventListener("graphChanged", persistCurrentWorkflow); + const openWorkflows = computed(() => workflowStore.openWorkflows); + const activeWorkflow = computed(() => workflowStore.activeWorkflow); + const restoreState = computed( + () => { + if (!openWorkflows.value || !activeWorkflow.value) { + return { paths: [], activeIndex: -1 }; + } + const paths = openWorkflows.value.filter((workflow) => workflow?.isPersisted && !workflow.isModified).map((workflow) => workflow.path); + const activeIndex = openWorkflows.value.findIndex( + (workflow) => workflow.path === activeWorkflow.value?.path + ); + return { paths, activeIndex }; + } + ); + const storedWorkflows = JSON.parse( + getStorageValue("Comfy.OpenWorkflowsPaths") || "[]" + ); + const storedActiveIndex = JSON.parse( + getStorageValue("Comfy.ActiveWorkflowIndex") || "-1" + ); + watch(restoreState, ({ paths, activeIndex }) => { + setStorageValue("Comfy.OpenWorkflowsPaths", JSON.stringify(paths)); + setStorageValue("Comfy.ActiveWorkflowIndex", JSON.stringify(activeIndex)); + }); + const restoreWorkflowTabsState = /* @__PURE__ */ __name(() => { + const isRestorable = storedWorkflows?.length > 0 && storedActiveIndex >= 0; + if (isRestorable) { + workflowStore.openWorkflowsInBackground({ + left: storedWorkflows.slice(0, storedActiveIndex), + right: storedWorkflows.slice(storedActiveIndex) + }); + } + }, "restoreWorkflowTabsState"); + return { + restorePreviousWorkflow, + restoreWorkflowTabsState + }; +} +__name(useWorkflowPersistence, "useWorkflowPersistence"); +const _sfc_main$8 = /* @__PURE__ */ defineComponent({ + __name: "GraphCanvas", + emits: ["ready"], + setup(__props, { emit: __emit }) { + const emit = __emit; + const canvasRef = ref(null); + const settingStore = useSettingStore(); + const nodeDefStore = useNodeDefStore(); + const workspaceStore = useWorkspaceStore(); + const canvasStore = useCanvasStore(); + const betaMenuEnabled = computed( + () => settingStore.get("Comfy.UseNewMenu") !== "Disabled" + ); + const workflowTabsPosition = computed( + () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") + ); + const canvasMenuEnabled = computed( + () => settingStore.get("Comfy.Graph.CanvasMenu") + ); + const tooltipEnabled = computed(() => settingStore.get("Comfy.EnableTooltips")); + watchEffect(() => { + const canvasInfoEnabled = settingStore.get("Comfy.Graph.CanvasInfo"); + if (canvasStore.canvas) { + canvasStore.canvas.show_info = canvasInfoEnabled; + } + }); + watchEffect(() => { + const zoomSpeed = settingStore.get("Comfy.Graph.ZoomSpeed"); + if (canvasStore.canvas) { + canvasStore.canvas.zoom_speed = zoomSpeed; + } + }); + watchEffect(() => { + LiteGraph.snaps_for_comfy = settingStore.get("Comfy.Node.AutoSnapLinkToSlot"); + }); + watchEffect(() => { + LiteGraph.snap_highlights_node = settingStore.get( + "Comfy.Node.SnapHighlightsNode" + ); + }); + watchEffect(() => { + LGraphNode.keepAllLinksOnBypass = settingStore.get( + "Comfy.Node.BypassAllLinksOnDelete" + ); + }); + watchEffect(() => { + LiteGraph.middle_click_slot_add_default_node = settingStore.get( + "Comfy.Node.MiddleClickRerouteNode" + ); + }); + watchEffect(() => { + nodeDefStore.showDeprecated = settingStore.get("Comfy.Node.ShowDeprecated"); + }); + watchEffect(() => { + nodeDefStore.showExperimental = settingStore.get( + "Comfy.Node.ShowExperimental" + ); + }); + watchEffect(() => { + const spellcheckEnabled = settingStore.get("Comfy.TextareaWidget.Spellcheck"); + const textareas = document.querySelectorAll("textarea.comfy-multiline-input"); + textareas.forEach((textarea) => { + textarea.spellcheck = spellcheckEnabled; + textarea.focus(); + textarea.blur(); + }); + }); + watchEffect(() => { + const linkRenderMode = settingStore.get("Comfy.LinkRenderMode"); + if (canvasStore.canvas) { + canvasStore.canvas.links_render_mode = linkRenderMode; + canvasStore.canvas.setDirty( + /* fg */ + false, + /* bg */ + true + ); + } + }); + watchEffect(() => { + const linkMarkerShape = settingStore.get("Comfy.Graph.LinkMarkers"); + const { canvas } = canvasStore; + if (canvas) { + canvas.linkMarkerShape = linkMarkerShape; + canvas.setDirty(false, true); + } + }); + watchEffect(() => { + const reroutesEnabled = settingStore.get("Comfy.RerouteBeta"); + const { canvas } = canvasStore; + if (canvas) { + canvas.reroutesEnabled = reroutesEnabled; + canvas.setDirty(false, true); + } + }); + watchEffect(() => { + const maximumFps = settingStore.get("LiteGraph.Canvas.MaximumFps"); + const { canvas } = canvasStore; + if (canvas) canvas.maximumFps = maximumFps; + }); + watchEffect(() => { + CanvasPointer.doubleClickTime = settingStore.get( + "Comfy.Pointer.DoubleClickTime" + ); + }); + watchEffect(() => { + CanvasPointer.bufferTime = settingStore.get("Comfy.Pointer.ClickBufferTime"); + }); + watchEffect(() => { + CanvasPointer.maxClickDrift = settingStore.get("Comfy.Pointer.ClickDrift"); + }); + watchEffect(() => { + LiteGraph.CANVAS_GRID_SIZE = settingStore.get("Comfy.SnapToGrid.GridSize"); + }); + watchEffect(() => { + LiteGraph.alwaysSnapToGrid = settingStore.get("pysssss.SnapToGrid"); + }); + watch( + () => settingStore.get("Comfy.WidgetControlMode"), + () => { + if (!canvasStore.canvas) return; + for (const n of app.graph.nodes) { + if (!n.widgets) continue; + for (const w of n.widgets) { + if (w[IS_CONTROL_WIDGET]) { + updateControlWidgetLabel(w); + if (w.linkedWidgets) { + for (const l of w.linkedWidgets) { + updateControlWidgetLabel(l); + } + } + } + } + } + app.graph.setDirtyCanvas(true); + } + ); + const colorPaletteService = useColorPaletteService(); + const colorPaletteStore = useColorPaletteStore(); + watch( + [() => canvasStore.canvas, () => settingStore.get("Comfy.ColorPalette")], + ([canvas, currentPaletteId]) => { + if (!canvas) return; + colorPaletteService.loadColorPalette(currentPaletteId); + } + ); + watch( + () => colorPaletteStore.activePaletteId, + (newValue) => { + settingStore.set("Comfy.ColorPalette", newValue); + } + ); + watchEffect(() => { + LiteGraph.context_menu_scaling = settingStore.get( + "LiteGraph.ContextMenu.Scaling" + ); + }); + const loadCustomNodesI18n = /* @__PURE__ */ __name(async () => { + try { + const i18nData = await api.getCustomNodesI18n(); + Object.entries(i18nData).forEach(([locale, message]) => { + i18n.global.mergeLocaleMessage(locale, message); + }); + } catch (error) { + console.error("Failed to load custom nodes i18n", error); + } + }, "loadCustomNodesI18n"); + const comfyAppReady = ref(false); + const workflowPersistence = useWorkflowPersistence(); + useCanvasDrop(canvasRef); + onMounted(async () => { + useGlobalLitegraph(); + app.vueAppReady = true; + workspaceStore.spinner = true; + ChangeTracker.init(app); + await loadCustomNodesI18n(); + await settingStore.loadSettingValues(); + CORE_SETTINGS.forEach((setting) => { + settingStore.addSetting(setting); + }); + await app.setup(canvasRef.value); + canvasStore.canvas = app.canvas; + canvasStore.canvas.render_canvas_border = false; + workspaceStore.spinner = false; + window["app"] = app; + window["graph"] = app.graph; + comfyAppReady.value = true; + colorPaletteStore.customPalettes = settingStore.get( + "Comfy.CustomColorPalettes" + ); + await workflowPersistence.restorePreviousWorkflow(); + workflowPersistence.restoreWorkflowTabsState(); + watch( + () => settingStore.get("Comfy.Locale"), + async () => { + await useCommandStore().execute("Comfy.RefreshNodeDefinitions"); + useWorkflowService().reloadCurrentWorkflow(); + } + ); + emit("ready"); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock(Fragment, null, [ + (openBlock(), createBlock(Teleport, { to: ".graph-canvas-container" }, [ + comfyAppReady.value && betaMenuEnabled.value && !unref(workspaceStore).focusMode ? (openBlock(), createBlock(LiteGraphCanvasSplitterOverlay, { key: 0 }, { + "side-bar-panel": withCtx(() => [ + createVNode(SideToolbar) + ]), + "bottom-panel": withCtx(() => [ + createVNode(_sfc_main$p) + ]), + "graph-canvas-panel": withCtx(() => [ + workflowTabsPosition.value === "Topbar (2nd-row)" ? (openBlock(), createBlock(SecondRowWorkflowTabs, { key: 0 })) : createCommentVNode("", true), + canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 1 })) : createCommentVNode("", true) + ]), + _: 1 + })) : createCommentVNode("", true), + createVNode(TitleEditor), + !betaMenuEnabled.value && canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 1 })) : createCommentVNode("", true), + createBaseVNode("canvas", { + ref_key: "canvasRef", + ref: canvasRef, + id: "graph-canvas", + tabindex: "1" + }, null, 512) + ])), + createVNode(_sfc_main$h), + tooltipEnabled.value ? (openBlock(), createBlock(NodeTooltip, { key: 0 })) : createCommentVNode("", true), + createVNode(_sfc_main$n) + ], 64); + }; + } +}); +const _sfc_main$7 = /* @__PURE__ */ defineComponent({ + __name: "GlobalToast", + setup(__props) { + const toast = useToast(); + const toastStore = useToastStore(); + const settingStore = useSettingStore(); + watch( + () => toastStore.messagesToAdd, + (newMessages) => { + if (newMessages.length === 0) { + return; + } + newMessages.forEach((message) => { + toast.add(message); + }); + toastStore.messagesToAdd = []; + }, + { deep: true } + ); + watch( + () => toastStore.messagesToRemove, + (messagesToRemove) => { + if (messagesToRemove.length === 0) { + return; + } + messagesToRemove.forEach((message) => { + toast.remove(message); + }); + toastStore.messagesToRemove = []; + }, + { deep: true } + ); + watch( + () => toastStore.removeAllRequested, + (requested) => { + if (requested) { + toast.removeAllGroups(); + toastStore.removeAllRequested = false; + } + } + ); + function updateToastPosition() { + const styleElement = document.getElementById("dynamic-toast-style") || createStyleElement(); + const rect = document.querySelector(".graph-canvas-container").getBoundingClientRect(); + styleElement.textContent = ` + .p-toast.p-component.p-toast-top-right { + top: ${rect.top + 20}px !important; + right: ${window.innerWidth - (rect.left + rect.width) + 20}px !important; + } + `; + } + __name(updateToastPosition, "updateToastPosition"); + function createStyleElement() { + const style = document.createElement("style"); + style.id = "dynamic-toast-style"; + document.head.appendChild(style); + return style; + } + __name(createStyleElement, "createStyleElement"); + watch( + () => settingStore.get("Comfy.UseNewMenu"), + () => nextTick(updateToastPosition), + { immediate: true } + ); + watch( + () => settingStore.get("Comfy.Sidebar.Location"), + () => nextTick(updateToastPosition), + { immediate: true } + ); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script$f)); + }; + } +}); +const _hoisted_1$9 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render$5(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$9, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "M6 4v16m4-16l10 8l-10 8z" + }, null, -1) + ])); +} +__name(render$5, "render$5"); +const __unplugin_components_3 = markRaw({ name: "lucide-step-forward", render: render$5 }); +const _hoisted_1$8 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render$4(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$8, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "m13 19l9-7l-9-7zM2 19l9-7l-9-7z" + }, null, -1) + ])); +} +__name(render$4, "render$4"); +const __unplugin_components_2 = markRaw({ name: "lucide-fast-forward", render: render$4 }); +const _hoisted_1$7 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render$3(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "m6 3l14 9l-14 9z" + }, null, -1) + ])); +} +__name(render$3, "render$3"); +const __unplugin_components_1$1 = markRaw({ name: "lucide-play", render: render$3 }); +const _hoisted_1$6 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render$2(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [ + createBaseVNode("g", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2" + }, [ + createBaseVNode("path", { d: "M16 12H3m13 6H3m7-12H3m18 12V8a2 2 0 0 0-2-2h-5" }), + createBaseVNode("path", { d: "m16 8l-2-2l2-2" }) + ], -1) + ])); +} +__name(render$2, "render$2"); +const __unplugin_components_0$1 = markRaw({ name: "lucide-list-start", render: render$2 }); +const _hoisted_1$5 = ["aria-label"]; +const minQueueCount = 1; +const _sfc_main$6 = /* @__PURE__ */ defineComponent({ + __name: "BatchCountEdit", + props: { + class: { default: "" } + }, + setup(__props) { + const props = __props; + const queueSettingsStore = useQueueSettingsStore(); + const { batchCount } = storeToRefs(queueSettingsStore); + const settingStore = useSettingStore(); + const maxQueueCount = computed( + () => settingStore.get("Comfy.QueueButton.BatchCountLimit") + ); + const handleClick = /* @__PURE__ */ __name((increment) => { + let newCount; + if (increment) { + const originalCount = batchCount.value - 1; + newCount = Math.min(originalCount * 2, maxQueueCount.value); + } else { + const originalCount = batchCount.value + 1; + newCount = Math.floor(originalCount / 2); + } + batchCount.value = newCount; + }, "handleClick"); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return withDirectives((openBlock(), createElementBlock("div", { + class: normalizeClass(["batch-count", props.class]), + "aria-label": _ctx.$t("menu.batchCount") + }, [ + createVNode(unref(script$g), { + class: "w-14", + modelValue: unref(batchCount), + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(batchCount) ? batchCount.value = $event : null), + min: minQueueCount, + max: maxQueueCount.value, + fluid: "", + showButtons: "", + pt: { + incrementButton: { + class: "w-6", + onmousedown: /* @__PURE__ */ __name(() => { + handleClick(true); + }, "onmousedown") + }, + decrementButton: { + class: "w-6", + onmousedown: /* @__PURE__ */ __name(() => { + handleClick(false); + }, "onmousedown") + } + } + }, null, 8, ["modelValue", "max", "pt"]) + ], 10, _hoisted_1$5)), [ + [ + _directive_tooltip, + _ctx.$t("menu.batchCount"), + void 0, + { bottom: true } + ] + ]); + }; + } +}); +const BatchCountEdit = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-26957f1f"]]); +const _hoisted_1$4 = { class: "queue-button-group flex" }; +const _sfc_main$5 = /* @__PURE__ */ defineComponent({ + __name: "ComfyQueueButton", + setup(__props) { + const workspaceStore = useWorkspaceStore(); + const queueCountStore = storeToRefs(useQueuePendingTaskCountStore()); + const { mode: queueMode } = storeToRefs(useQueueSettingsStore()); + const { t: t2 } = useI18n(); + const queueModeMenuItemLookup = computed(() => ({ + disabled: { + key: "disabled", + label: t2("menu.queue"), + tooltip: t2("menu.disabledTooltip"), + command: /* @__PURE__ */ __name(() => { + queueMode.value = "disabled"; + }, "command") + }, + instant: { + key: "instant", + label: `${t2("menu.queue")} (${t2("menu.instant")})`, + tooltip: t2("menu.instantTooltip"), + command: /* @__PURE__ */ __name(() => { + queueMode.value = "instant"; + }, "command") + }, + change: { + key: "change", + label: `${t2("menu.queue")} (${t2("menu.onChange")})`, + tooltip: t2("menu.onChangeTooltip"), + command: /* @__PURE__ */ __name(() => { + queueMode.value = "change"; + }, "command") + } + })); + const activeQueueModeMenuItem = computed( + () => queueModeMenuItemLookup.value[queueMode.value] + ); + const queueModeMenuItems = computed( + () => Object.values(queueModeMenuItemLookup.value) + ); + const executingPrompt = computed(() => !!queueCountStore.count.value); + const hasPendingTasks = computed(() => queueCountStore.count.value > 1); + const commandStore = useCommandStore(); + const queuePrompt = /* @__PURE__ */ __name((e) => { + const commandId = e.shiftKey ? "Comfy.QueuePromptFront" : "Comfy.QueuePrompt"; + commandStore.execute(commandId); + }, "queuePrompt"); + return (_ctx, _cache) => { + const _component_i_lucide58list_start = __unplugin_components_0$1; + const _component_i_lucide58play = __unplugin_components_1$1; + const _component_i_lucide58fast_forward = __unplugin_components_2; + const _component_i_lucide58step_forward = __unplugin_components_3; + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", _hoisted_1$4, [ + withDirectives((openBlock(), createBlock(unref(script$h), { + class: "comfyui-queue-button", + label: activeQueueModeMenuItem.value.label, + severity: "primary", + size: "small", + onClick: queuePrompt, + model: queueModeMenuItems.value, + "data-testid": "queue-button" + }, { + icon: withCtx(() => [ + unref(workspaceStore).shiftDown ? (openBlock(), createBlock(_component_i_lucide58list_start, { key: 0 })) : unref(queueMode) === "disabled" ? (openBlock(), createBlock(_component_i_lucide58play, { key: 1 })) : unref(queueMode) === "instant" ? (openBlock(), createBlock(_component_i_lucide58fast_forward, { key: 2 })) : unref(queueMode) === "change" ? (openBlock(), createBlock(_component_i_lucide58step_forward, { key: 3 })) : createCommentVNode("", true) + ]), + item: withCtx(({ item }) => [ + withDirectives(createVNode(unref(script), { + label: String(item.label), + icon: item.icon, + severity: item.key === unref(queueMode) ? "primary" : "secondary", + size: "small", + text: "" + }, null, 8, ["label", "icon", "severity"]), [ + [_directive_tooltip, item.tooltip] + ]) + ]), + _: 1 + }, 8, ["label", "model"])), [ + [ + _directive_tooltip, + unref(workspaceStore).shiftDown ? _ctx.$t("menu.queueWorkflowFront") : _ctx.$t("menu.queueWorkflow"), + void 0, + { bottom: true } + ] + ]), + createVNode(BatchCountEdit), + createVNode(unref(script$6), { class: "execution-actions flex flex-nowrap" }, { + default: withCtx(() => [ + withDirectives(createVNode(unref(script), { + icon: "pi pi-times", + severity: executingPrompt.value ? "danger" : "secondary", + disabled: !executingPrompt.value, + text: "", + "aria-label": _ctx.$t("menu.interrupt"), + onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.Interrupt")) + }, null, 8, ["severity", "disabled", "aria-label"]), [ + [ + _directive_tooltip, + _ctx.$t("menu.interrupt"), + void 0, + { bottom: true } + ] + ]), + withDirectives(createVNode(unref(script), { + icon: "pi pi-stop", + severity: hasPendingTasks.value ? "danger" : "secondary", + disabled: !hasPendingTasks.value, + text: "", + "aria-label": _ctx.$t("sideToolbar.queueTab.clearPendingTasks"), + onClick: _cache[1] || (_cache[1] = () => unref(commandStore).execute("Comfy.ClearPendingTasks")) + }, null, 8, ["severity", "disabled", "aria-label"]), [ + [ + _directive_tooltip, + _ctx.$t("sideToolbar.queueTab.clearPendingTasks"), + void 0, + { bottom: true } + ] + ]) + ]), + _: 1 + }) + ]); + }; + } +}); +const ComfyQueueButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-91a628af"]]); +const overlapThreshold = 20; +const _sfc_main$4 = /* @__PURE__ */ defineComponent({ + __name: "ComfyActionbar", + setup(__props) { + const settingsStore = useSettingStore(); + const visible = computed( + () => settingsStore.get("Comfy.UseNewMenu") !== "Disabled" + ); + const panelRef = ref(null); + const dragHandleRef = ref(null); + const isDocked = useLocalStorage("Comfy.MenuPosition.Docked", false); + const storedPosition = useLocalStorage("Comfy.MenuPosition.Floating", { + x: 0, + y: 0 + }); + const { + x, + y, + style, + isDragging + } = useDraggable(panelRef, { + initialValue: { x: 0, y: 0 }, + handle: dragHandleRef, + containerElement: document.body + }); + watchDebounced( + [x, y], + ([newX, newY]) => { + storedPosition.value = { x: newX, y: newY }; + }, + { debounce: 300 } + ); + const setInitialPosition = /* @__PURE__ */ __name(() => { + if (x.value !== 0 || y.value !== 0) { + return; + } + if (storedPosition.value.x !== 0 || storedPosition.value.y !== 0) { + x.value = storedPosition.value.x; + y.value = storedPosition.value.y; + captureLastDragState(); + return; + } + if (panelRef.value) { + const screenWidth = window.innerWidth; + const screenHeight = window.innerHeight; + const menuWidth = panelRef.value.offsetWidth; + const menuHeight = panelRef.value.offsetHeight; + if (menuWidth === 0 || menuHeight === 0) { + return; + } + x.value = (screenWidth - menuWidth) / 2; + y.value = screenHeight - menuHeight - 10; + captureLastDragState(); + } + }, "setInitialPosition"); + onMounted(setInitialPosition); + watch(visible, (newVisible) => { + if (newVisible) { + nextTick(setInitialPosition); + } + }); + const lastDragState = ref({ + x: x.value, + y: y.value, + windowWidth: window.innerWidth, + windowHeight: window.innerHeight + }); + const captureLastDragState = /* @__PURE__ */ __name(() => { + lastDragState.value = { + x: x.value, + y: y.value, + windowWidth: window.innerWidth, + windowHeight: window.innerHeight + }; + }, "captureLastDragState"); + watch( + isDragging, + (newIsDragging) => { + if (!newIsDragging) { + captureLastDragState(); + } + }, + { immediate: true } + ); + const adjustMenuPosition = /* @__PURE__ */ __name(() => { + if (panelRef.value) { + const screenWidth = window.innerWidth; + const screenHeight = window.innerHeight; + const menuWidth = panelRef.value.offsetWidth; + const menuHeight = panelRef.value.offsetHeight; + const distanceLeft = lastDragState.value.x; + const distanceRight = lastDragState.value.windowWidth - (lastDragState.value.x + menuWidth); + const distanceTop = lastDragState.value.y; + const distanceBottom = lastDragState.value.windowHeight - (lastDragState.value.y + menuHeight); + const distances = [ + { edge: "left", distance: distanceLeft }, + { edge: "right", distance: distanceRight }, + { edge: "top", distance: distanceTop }, + { edge: "bottom", distance: distanceBottom } + ]; + const closestEdge = distances.reduce( + (min, curr) => curr.distance < min.distance ? curr : min + ); + const verticalRatio = lastDragState.value.y / lastDragState.value.windowHeight; + const horizontalRatio = lastDragState.value.x / lastDragState.value.windowWidth; + if (closestEdge.edge === "left") { + x.value = closestEdge.distance; + y.value = verticalRatio * screenHeight; + } else if (closestEdge.edge === "right") { + x.value = screenWidth - menuWidth - closestEdge.distance; + y.value = verticalRatio * screenHeight; + } else if (closestEdge.edge === "top") { + x.value = horizontalRatio * screenWidth; + y.value = closestEdge.distance; + } else { + x.value = horizontalRatio * screenWidth; + y.value = screenHeight - menuHeight - closestEdge.distance; + } + x.value = lodashExports.clamp(x.value, 0, screenWidth - menuWidth); + y.value = lodashExports.clamp(y.value, 0, screenHeight - menuHeight); + } + }, "adjustMenuPosition"); + useEventListener(window, "resize", adjustMenuPosition); + const topMenuRef = inject("topMenuRef"); + const topMenuBounds = useElementBounding(topMenuRef); + const isOverlappingWithTopMenu = computed(() => { + if (!panelRef.value) { + return false; + } + const { height } = panelRef.value.getBoundingClientRect(); + const actionbarBottom = y.value + height; + const topMenuBottom = topMenuBounds.bottom.value; + const overlapPixels = Math.min(actionbarBottom, topMenuBottom) - Math.max(y.value, topMenuBounds.top.value); + return overlapPixels > overlapThreshold; + }); + watch(isDragging, (newIsDragging) => { + if (!newIsDragging) { + isDocked.value = isOverlappingWithTopMenu.value; + } else { + isDocked.value = false; + } + }); + const eventBus = useEventBus("topMenu"); + watch([isDragging, isOverlappingWithTopMenu], ([dragging, overlapping]) => { + eventBus.emit("updateHighlight", { + isDragging: dragging, + isOverlapping: overlapping + }); + }); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script$i), { + class: normalizeClass(["actionbar w-fit", { "is-dragging": unref(isDragging), "is-docked": unref(isDocked) }]), + style: normalizeStyle(unref(style)) + }, { + default: withCtx(() => [ + createBaseVNode("div", { + class: "actionbar-content flex items-center", + ref_key: "panelRef", + ref: panelRef + }, [ + createBaseVNode("span", { + class: "drag-handle cursor-move mr-2 p-0!", + ref_key: "dragHandleRef", + ref: dragHandleRef + }, null, 512), + createVNode(ComfyQueueButton) + ], 512) + ]), + _: 1 + }, 8, ["style", "class"]); + }; + } +}); +const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-915e5456"]]); +const _hoisted_1$3 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render$1(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$3, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "currentColor", + d: "M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-5v3h14v-3zm0-2h14V5H5zm0 2v3z" + }, null, -1) + ])); +} +__name(render$1, "render$1"); +const __unplugin_components_1 = markRaw({ name: "material-symbols-dock-to-bottom-outline", render: render$1 }); +const _hoisted_1$2 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +function render(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "currentColor", + d: "M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-7h14V5H5z" + }, null, -1) + ])); +} +__name(render, "render"); +const __unplugin_components_0 = markRaw({ name: "material-symbols-dock-to-bottom", render }); +const _sfc_main$3 = /* @__PURE__ */ defineComponent({ + __name: "BottomPanelToggleButton", + setup(__props) { + const bottomPanelStore = useBottomPanelStore(); + return (_ctx, _cache) => { + const _component_i_material_symbols58dock_to_bottom = __unplugin_components_0; + const _component_i_material_symbols58dock_to_bottom_outline = __unplugin_components_1; + const _directive_tooltip = resolveDirective("tooltip"); + return withDirectives((openBlock(), createBlock(unref(script), { + severity: "secondary", + text: "", + "aria-label": _ctx.$t("menu.toggleBottomPanel"), + onClick: unref(bottomPanelStore).toggleBottomPanel + }, { + icon: withCtx(() => [ + unref(bottomPanelStore).bottomPanelVisible ? (openBlock(), createBlock(_component_i_material_symbols58dock_to_bottom, { key: 0 })) : (openBlock(), createBlock(_component_i_material_symbols58dock_to_bottom_outline, { key: 1 })) + ]), + _: 1 + }, 8, ["aria-label", "onClick"])), [ + [vShow, unref(bottomPanelStore).bottomPanelTabs.length > 0], + [_directive_tooltip, { value: _ctx.$t("menu.toggleBottomPanel"), showDelay: 300 }] + ]); + }; + } +}); +const _hoisted_1$1 = ["href"]; +const _hoisted_2$1 = { class: "p-menubar-item-label" }; +const _hoisted_3$1 = { + key: 1, + class: "ml-auto border border-surface rounded text-muted text-xs text-nowrap p-1 keybinding-tag" +}; +const _sfc_main$2 = /* @__PURE__ */ defineComponent({ + __name: "CommandMenubar", + setup(__props) { + const settingStore = useSettingStore(); + const dropdownDirection = computed( + () => settingStore.get("Comfy.UseNewMenu") === "Top" ? "down" : "up" + ); + const menuItemsStore = useMenuItemStore(); + const { t: t2 } = useI18n(); + const translateMenuItem = /* @__PURE__ */ __name((item) => { + const label = typeof item.label === "function" ? item.label() : item.label; + const translatedLabel = label ? t2(`menuLabels.${normalizeI18nKey(label)}`, label) : void 0; + return { + ...item, + label: translatedLabel, + items: item.items?.map(translateMenuItem) + }; + }, "translateMenuItem"); + const translatedItems = computed( + () => menuItemsStore.menuItems.map(translateMenuItem) + ); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script$j), { + model: translatedItems.value, + class: "top-menubar border-none p-0 bg-transparent", + pt: { + rootList: "gap-0 flex-nowrap w-auto", + submenu: `dropdown-direction-${dropdownDirection.value}`, + item: "relative" + } + }, { + item: withCtx(({ item, props }) => [ + createBaseVNode("a", mergeProps({ class: "p-menubar-item-link" }, props.action, { + href: item.url, + target: "_blank" + }), [ + item.icon ? (openBlock(), createElementBlock("span", { + key: 0, + class: normalizeClass(["p-menubar-item-icon", item.icon]) + }, null, 2)) : createCommentVNode("", true), + createBaseVNode("span", _hoisted_2$1, toDisplayString(item.label), 1), + item?.comfyCommand?.keybinding ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(item.comfyCommand.keybinding.combo.toString()), 1)) : createCommentVNode("", true) + ], 16, _hoisted_1$1) + ]), + _: 1 + }, 8, ["model", "pt"]); + }; + } +}); +const CommandMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-56df69d2"]]); +const _hoisted_1 = { class: "flex-grow min-w-0 app-drag h-full" }; +const _hoisted_2 = { class: "window-actions-spacer flex-shrink-0" }; +const _hoisted_3 = { class: "fixed top-0 left-0 app-drag w-full h-[var(--comfy-topbar-height)]" }; +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "TopMenubar", + setup(__props) { + const workspaceState = useWorkspaceStore(); + const settingStore = useSettingStore(); + const workflowTabsPosition = computed( + () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") + ); + const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); + const betaMenuEnabled = computed(() => menuSetting.value !== "Disabled"); + const teleportTarget = computed( + () => settingStore.get("Comfy.UseNewMenu") === "Top" ? ".comfyui-body-top" : ".comfyui-body-bottom" + ); + const showTopMenu = computed( + () => betaMenuEnabled.value && !workspaceState.focusMode + ); + const menuRight = ref(null); + onMounted(() => { + if (menuRight.value) { + menuRight.value.appendChild(app.menu.element); + } + }); + const topMenuRef = ref(null); + provide("topMenuRef", topMenuRef); + const eventBus = useEventBus("topMenu"); + const isDropZone = ref(false); + const isDroppable = ref(false); + eventBus.on((event, payload) => { + if (event === "updateHighlight") { + isDropZone.value = payload.isDragging; + isDroppable.value = payload.isOverlapping && payload.isDragging; + } + }); + onMounted(() => { + if (isElectron()) { + electronAPI().changeTheme({ + height: topMenuRef.value.getBoundingClientRect().height + }); + } + }); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock(Fragment, null, [ + (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ + withDirectives(createBaseVNode("div", { + ref_key: "topMenuRef", + ref: topMenuRef, + class: normalizeClass(["comfyui-menu flex items-center", { dropzone: isDropZone.value, "dropzone-active": isDroppable.value }]) + }, [ + _cache[1] || (_cache[1] = createBaseVNode("h1", { class: "comfyui-logo mx-2 app-drag" }, "ComfyUI", -1)), + createVNode(CommandMenubar), + createBaseVNode("div", _hoisted_1, [ + workflowTabsPosition.value === "Topbar" ? (openBlock(), createBlock(WorkflowTabs, { key: 0 })) : createCommentVNode("", true) + ]), + createBaseVNode("div", { + class: "comfyui-menu-right", + ref_key: "menuRight", + ref: menuRight + }, null, 512), + createVNode(Actionbar), + createVNode(_sfc_main$3, { class: "flex-shrink-0" }), + withDirectives(createVNode(unref(script), { + class: "flex-shrink-0", + icon: "pi pi-bars", + severity: "secondary", + text: "", + "aria-label": _ctx.$t("menu.hideMenu"), + onClick: _cache[0] || (_cache[0] = ($event) => unref(workspaceState).focusMode = true), + onContextmenu: unref(showNativeMenu) + }, null, 8, ["aria-label", "onContextmenu"]), [ + [_directive_tooltip, { value: _ctx.$t("menu.hideMenu"), showDelay: 300 }] + ]), + withDirectives(createBaseVNode("div", _hoisted_2, null, 512), [ + [vShow, menuSetting.value !== "Bottom"] + ]) + ], 2), [ + [vShow, showTopMenu.value] + ]) + ], 8, ["to"])), + withDirectives(createBaseVNode("div", _hoisted_3, null, 512), [ + [vShow, unref(isNativeWindow)() && !showTopMenu.value] + ]) + ], 64); + }; + } +}); +const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-929e7543"]]); +var LatentPreviewMethod = /* @__PURE__ */ ((LatentPreviewMethod2) => { + LatentPreviewMethod2["NoPreviews"] = "none"; + LatentPreviewMethod2["Auto"] = "auto"; + LatentPreviewMethod2["Latent2RGB"] = "latent2rgb"; + LatentPreviewMethod2["TAESD"] = "taesd"; + return LatentPreviewMethod2; +})(LatentPreviewMethod || {}); +var LogLevel = /* @__PURE__ */ ((LogLevel2) => { + LogLevel2["DEBUG"] = "DEBUG"; + LogLevel2["INFO"] = "INFO"; + LogLevel2["WARNING"] = "WARNING"; + LogLevel2["ERROR"] = "ERROR"; + LogLevel2["CRITICAL"] = "CRITICAL"; + return LogLevel2; +})(LogLevel || {}); +var HashFunction = /* @__PURE__ */ ((HashFunction2) => { + HashFunction2["MD5"] = "md5"; + HashFunction2["SHA1"] = "sha1"; + HashFunction2["SHA256"] = "sha256"; + HashFunction2["SHA512"] = "sha512"; + return HashFunction2; +})(HashFunction || {}); +var AutoLaunch = /* @__PURE__ */ ((AutoLaunch2) => { + AutoLaunch2["Auto"] = "auto"; + AutoLaunch2["Disable"] = "disable"; + AutoLaunch2["Enable"] = "enable"; + return AutoLaunch2; +})(AutoLaunch || {}); +var CudaMalloc = /* @__PURE__ */ ((CudaMalloc2) => { + CudaMalloc2["Auto"] = "auto"; + CudaMalloc2["Disable"] = "disable"; + CudaMalloc2["Enable"] = "enable"; + return CudaMalloc2; +})(CudaMalloc || {}); +var FloatingPointPrecision = /* @__PURE__ */ ((FloatingPointPrecision2) => { + FloatingPointPrecision2["AUTO"] = "auto"; + FloatingPointPrecision2["FP64"] = "fp64"; + FloatingPointPrecision2["FP32"] = "fp32"; + FloatingPointPrecision2["FP16"] = "fp16"; + FloatingPointPrecision2["BF16"] = "bf16"; + FloatingPointPrecision2["FP8E4M3FN"] = "fp8_e4m3fn"; + FloatingPointPrecision2["FP8E5M2"] = "fp8_e5m2"; + return FloatingPointPrecision2; +})(FloatingPointPrecision || {}); +var CrossAttentionMethod = /* @__PURE__ */ ((CrossAttentionMethod2) => { + CrossAttentionMethod2["Auto"] = "auto"; + CrossAttentionMethod2["Split"] = "split"; + CrossAttentionMethod2["Quad"] = "quad"; + CrossAttentionMethod2["Pytorch"] = "pytorch"; + return CrossAttentionMethod2; +})(CrossAttentionMethod || {}); +var VramManagement = /* @__PURE__ */ ((VramManagement2) => { + VramManagement2["Auto"] = "auto"; + VramManagement2["GPUOnly"] = "gpu-only"; + VramManagement2["HighVram"] = "highvram"; + VramManagement2["NormalVram"] = "normalvram"; + VramManagement2["LowVram"] = "lowvram"; + VramManagement2["NoVram"] = "novram"; + VramManagement2["CPU"] = "cpu"; + return VramManagement2; +})(VramManagement || {}); +const WEB_ONLY_CONFIG_ITEMS = [ + // Launch behavior + { + id: "auto-launch", + name: "Automatically opens in the browser on startup", + category: ["Launch"], + type: "combo", + options: Object.values(AutoLaunch), + defaultValue: AutoLaunch.Auto, + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case AutoLaunch.Auto: + return {}; + case AutoLaunch.Enable: + return { + ["auto-launch"]: true + }; + case AutoLaunch.Disable: + return { + ["disable-auto-launch"]: true + }; + } + }, "getValue") + } +]; +const SERVER_CONFIG_ITEMS = [ + // Network settings + { + id: "listen", + name: "Host: The IP address to listen on", + category: ["Network"], + type: "text", + defaultValue: "127.0.0.1" + }, + { + id: "port", + name: "Port: The port to listen on", + category: ["Network"], + type: "number", + // The default launch port for desktop app is 8000 instead of 8188. + defaultValue: 8e3 + }, + { + id: "tls-keyfile", + name: "TLS Key File: Path to TLS key file for HTTPS", + category: ["Network"], + type: "text", + defaultValue: "" + }, + { + id: "tls-certfile", + name: "TLS Certificate File: Path to TLS certificate file for HTTPS", + category: ["Network"], + type: "text", + defaultValue: "" + }, + { + id: "enable-cors-header", + name: 'Enable CORS header: Use "*" for all origins or specify domain', + category: ["Network"], + type: "text", + defaultValue: "" + }, + { + id: "max-upload-size", + name: "Maximum upload size (MB)", + category: ["Network"], + type: "number", + defaultValue: 100 + }, + // CUDA settings + { + id: "cuda-device", + name: "CUDA device index to use", + category: ["CUDA"], + type: "number", + defaultValue: null + }, + { + id: "cuda-malloc", + name: "Use CUDA malloc for memory allocation", + category: ["CUDA"], + type: "combo", + options: Object.values(CudaMalloc), + defaultValue: CudaMalloc.Auto, + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case CudaMalloc.Auto: + return {}; + case CudaMalloc.Enable: + return { + ["cuda-malloc"]: true + }; + case CudaMalloc.Disable: + return { + ["disable-cuda-malloc"]: true + }; + } + }, "getValue") + }, + // Precision settings + { + id: "global-precision", + name: "Global floating point precision", + category: ["Inference"], + type: "combo", + options: [ + FloatingPointPrecision.AUTO, + FloatingPointPrecision.FP32, + FloatingPointPrecision.FP16 + ], + defaultValue: FloatingPointPrecision.AUTO, + tooltip: "Global floating point precision", + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case FloatingPointPrecision.AUTO: + return {}; + case FloatingPointPrecision.FP32: + return { + ["force-fp32"]: true + }; + case FloatingPointPrecision.FP16: + return { + ["force-fp16"]: true + }; + default: + return {}; + } + }, "getValue") + }, + // UNET precision + { + id: "unet-precision", + name: "UNET precision", + category: ["Inference"], + type: "combo", + options: [ + FloatingPointPrecision.AUTO, + FloatingPointPrecision.FP64, + FloatingPointPrecision.FP32, + FloatingPointPrecision.FP16, + FloatingPointPrecision.BF16, + FloatingPointPrecision.FP8E4M3FN, + FloatingPointPrecision.FP8E5M2 + ], + defaultValue: FloatingPointPrecision.AUTO, + tooltip: "UNET precision", + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case FloatingPointPrecision.AUTO: + return {}; + default: + return { + [`${value.toLowerCase()}-unet`]: true + }; + } + }, "getValue") + }, + // VAE settings + { + id: "vae-precision", + name: "VAE precision", + category: ["Inference"], + type: "combo", + options: [ + FloatingPointPrecision.AUTO, + FloatingPointPrecision.FP16, + FloatingPointPrecision.FP32, + FloatingPointPrecision.BF16 + ], + defaultValue: FloatingPointPrecision.AUTO, + tooltip: "VAE precision", + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case FloatingPointPrecision.AUTO: + return {}; + default: + return { + [`${value.toLowerCase()}-vae`]: true + }; + } + }, "getValue") + }, + { + id: "cpu-vae", + name: "Run VAE on CPU", + category: ["Inference"], + type: "boolean", + defaultValue: false + }, + // Text Encoder settings + { + id: "text-encoder-precision", + name: "Text Encoder precision", + category: ["Inference"], + type: "combo", + options: [ + FloatingPointPrecision.AUTO, + FloatingPointPrecision.FP8E4M3FN, + FloatingPointPrecision.FP8E5M2, + FloatingPointPrecision.FP16, + FloatingPointPrecision.FP32 + ], + defaultValue: FloatingPointPrecision.AUTO, + tooltip: "Text Encoder precision", + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case FloatingPointPrecision.AUTO: + return {}; + default: + return { + [`${value.toLowerCase()}-text-enc`]: true + }; + } + }, "getValue") + }, + // Memory and performance settings + { + id: "force-channels-last", + name: "Force channels-last memory format", + category: ["Memory"], + type: "boolean", + defaultValue: false + }, + { + id: "directml", + name: "DirectML device index", + category: ["Memory"], + type: "number", + defaultValue: null + }, + { + id: "disable-ipex-optimize", + name: "Disable IPEX optimization", + category: ["Memory"], + type: "boolean", + defaultValue: false + }, + // Preview settings + { + id: "preview-method", + name: "Method used for latent previews", + category: ["Preview"], + type: "combo", + options: Object.values(LatentPreviewMethod), + defaultValue: LatentPreviewMethod.NoPreviews + }, + { + id: "preview-size", + name: "Size of preview images", + category: ["Preview"], + type: "slider", + defaultValue: 512, + attrs: { + min: 128, + max: 2048, + step: 128 + } + }, + // Cache settings + { + id: "cache-classic", + name: "Use classic cache system", + category: ["Cache"], + type: "boolean", + defaultValue: false + }, + { + id: "cache-lru", + name: "Use LRU caching with a maximum of N node results cached.", + category: ["Cache"], + type: "number", + defaultValue: null, + tooltip: "May use more RAM/VRAM." + }, + // Attention settings + { + id: "cross-attention-method", + name: "Cross attention method", + category: ["Attention"], + type: "combo", + options: Object.values(CrossAttentionMethod), + defaultValue: CrossAttentionMethod.Auto, + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case CrossAttentionMethod.Auto: + return {}; + default: + return { + [`use-${value.toLowerCase()}-cross-attention`]: true + }; + } + }, "getValue") + }, + { + id: "disable-xformers", + name: "Disable xFormers optimization", + type: "boolean", + defaultValue: false + }, + { + id: "force-upcast-attention", + name: "Force attention upcast", + category: ["Attention"], + type: "boolean", + defaultValue: false + }, + { + id: "dont-upcast-attention", + name: "Prevent attention upcast", + category: ["Attention"], + type: "boolean", + defaultValue: false + }, + // VRAM management + { + id: "vram-management", + name: "VRAM management mode", + category: ["Memory"], + type: "combo", + options: Object.values(VramManagement), + defaultValue: VramManagement.Auto, + getValue: /* @__PURE__ */ __name((value) => { + switch (value) { + case VramManagement.Auto: + return {}; + default: + return { + [value]: true + }; + } + }, "getValue") + }, + { + id: "reserve-vram", + name: "Reserved VRAM (GB)", + category: ["Memory"], + type: "number", + defaultValue: null, + tooltip: "Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reverved depending on your OS." + }, + // Misc settings + { + id: "default-hashing-function", + name: "Default hashing function for model files", + type: "combo", + options: Object.values(HashFunction), + defaultValue: HashFunction.SHA256 + }, + { + id: "disable-smart-memory", + name: "Disable smart memory management", + tooltip: "Force ComfyUI to aggressively offload to regular ram instead of keeping models in vram when it can.", + category: ["Memory"], + type: "boolean", + defaultValue: false + }, + { + id: "deterministic", + name: "Make pytorch use slower deterministic algorithms when it can.", + type: "boolean", + defaultValue: false, + tooltip: "Note that this might not make images deterministic in all cases." + }, + { + id: "fast", + name: "Enable some untested and potentially quality deteriorating optimizations.", + type: "boolean", + defaultValue: false + }, + { + id: "dont-print-server", + name: "Don't print server output to console.", + type: "boolean", + defaultValue: false + }, + { + id: "disable-metadata", + name: "Disable saving prompt metadata in files.", + type: "boolean", + defaultValue: false + }, + { + id: "disable-all-custom-nodes", + name: "Disable loading all custom nodes.", + type: "boolean", + defaultValue: false + }, + { + id: "log-level", + name: "Logging verbosity level", + type: "combo", + options: Object.values(LogLevel), + defaultValue: LogLevel.INFO, + getValue: /* @__PURE__ */ __name((value) => { + return { + verbose: value + }; + }, "getValue") + }, + // Directories + { + id: "input-directory", + name: "Input directory", + category: ["Directories"], + type: "text", + defaultValue: "" + }, + { + id: "output-directory", + name: "Output directory", + category: ["Directories"], + type: "text", + defaultValue: "" + } +]; +function useCoreCommands() { + const workflowService = useWorkflowService(); + const workflowStore = useWorkflowStore(); + const dialogService = useDialogService(); + const colorPaletteStore = useColorPaletteStore(); + const getTracker = /* @__PURE__ */ __name(() => workflowStore.activeWorkflow?.changeTracker, "getTracker"); + const getSelectedNodes = /* @__PURE__ */ __name(() => { + const selectedNodes = app.canvas.selected_nodes; + const result = []; + if (selectedNodes) { + for (const i in selectedNodes) { + const node = selectedNodes[i]; + result.push(node); + } + } + return result; + }, "getSelectedNodes"); + const toggleSelectedNodesMode = /* @__PURE__ */ __name((mode) => { + getSelectedNodes().forEach((node) => { + if (node.mode === mode) { + node.mode = LGraphEventMode.ALWAYS; + } else { + node.mode = mode; + } + }); + }, "toggleSelectedNodesMode"); + return [ + { + id: "Comfy.NewBlankWorkflow", + icon: "pi pi-plus", + label: "New Blank Workflow", + menubarLabel: "New", + function: /* @__PURE__ */ __name(() => workflowService.loadBlankWorkflow(), "function") + }, + { + id: "Comfy.OpenWorkflow", + icon: "pi pi-folder-open", + label: "Open Workflow", + menubarLabel: "Open", + function: /* @__PURE__ */ __name(() => { + app.ui.loadFile(); + }, "function") + }, + { + id: "Comfy.LoadDefaultWorkflow", + icon: "pi pi-code", + label: "Load Default Workflow", + function: /* @__PURE__ */ __name(() => workflowService.loadDefaultWorkflow(), "function") + }, + { + id: "Comfy.SaveWorkflow", + icon: "pi pi-save", + label: "Save Workflow", + menubarLabel: "Save", + function: /* @__PURE__ */ __name(async () => { + const workflow = useWorkflowStore().activeWorkflow; + if (!workflow) return; + await workflowService.saveWorkflow(workflow); + }, "function") + }, + { + id: "Comfy.SaveWorkflowAs", + icon: "pi pi-save", + label: "Save Workflow As", + menubarLabel: "Save As", + function: /* @__PURE__ */ __name(async () => { + const workflow = useWorkflowStore().activeWorkflow; + if (!workflow) return; + await workflowService.saveWorkflowAs(workflow); + }, "function") + }, + { + id: "Comfy.ExportWorkflow", + icon: "pi pi-download", + label: "Export Workflow", + menubarLabel: "Export", + function: /* @__PURE__ */ __name(() => { + workflowService.exportWorkflow("workflow", "workflow"); + }, "function") + }, + { + id: "Comfy.ExportWorkflowAPI", + icon: "pi pi-download", + label: "Export Workflow (API Format)", + menubarLabel: "Export (API)", + function: /* @__PURE__ */ __name(() => { + workflowService.exportWorkflow("workflow_api", "output"); + }, "function") + }, + { + id: "Comfy.Undo", + icon: "pi pi-undo", + label: "Undo", + function: /* @__PURE__ */ __name(async () => { + await getTracker()?.undo?.(); + }, "function") + }, + { + id: "Comfy.Redo", + icon: "pi pi-refresh", + label: "Redo", + function: /* @__PURE__ */ __name(async () => { + await getTracker()?.redo?.(); + }, "function") + }, + { + id: "Comfy.ClearWorkflow", + icon: "pi pi-trash", + label: "Clear Workflow", + function: /* @__PURE__ */ __name(() => { + const settingStore = useSettingStore(); + if (!settingStore.get("Comfy.ComfirmClear") || confirm("Clear workflow?")) { + app.clean(); + app.graph.clear(); + api.dispatchCustomEvent("graphCleared"); + } + }, "function") + }, + { + id: "Comfy.Canvas.ResetView", + icon: "pi pi-expand", + label: "Reset View", + function: /* @__PURE__ */ __name(() => { + app.resetView(); + }, "function") + }, + { + id: "Comfy.OpenClipspace", + icon: "pi pi-clipboard", + label: "Clipspace", + function: /* @__PURE__ */ __name(() => { + app.openClipspace(); + }, "function") + }, + { + id: "Comfy.RefreshNodeDefinitions", + icon: "pi pi-refresh", + label: "Refresh Node Definitions", + function: /* @__PURE__ */ __name(async () => { + await app.refreshComboInNodes(); + }, "function") + }, + { + id: "Comfy.Interrupt", + icon: "pi pi-stop", + label: "Interrupt", + function: /* @__PURE__ */ __name(async () => { + await api.interrupt(); + useToastStore().add({ + severity: "info", + summary: "Interrupted", + detail: "Execution has been interrupted", + life: 1e3 + }); + }, "function") + }, + { + id: "Comfy.ClearPendingTasks", + icon: "pi pi-stop", + label: "Clear Pending Tasks", + function: /* @__PURE__ */ __name(async () => { + await useQueueStore().clear(["queue"]); + useToastStore().add({ + severity: "info", + summary: "Confirmed", + detail: "Pending tasks deleted", + life: 3e3 + }); + }, "function") + }, + { + id: "Comfy.BrowseTemplates", + icon: "pi pi-folder-open", + label: "Browse Templates", + function: /* @__PURE__ */ __name(() => { + dialogService.showTemplateWorkflowsDialog(); + }, "function") + }, + { + id: "Comfy.Canvas.ZoomIn", + icon: "pi pi-plus", + label: "Zoom In", + function: /* @__PURE__ */ __name(() => { + const ds = app.canvas.ds; + ds.changeScale( + ds.scale * 1.1, + ds.element ? [ds.element.width / 2, ds.element.height / 2] : void 0 + ); + app.canvas.setDirty(true, true); + }, "function") + }, + { + id: "Comfy.Canvas.ZoomOut", + icon: "pi pi-minus", + label: "Zoom Out", + function: /* @__PURE__ */ __name(() => { + const ds = app.canvas.ds; + ds.changeScale( + ds.scale / 1.1, + ds.element ? [ds.element.width / 2, ds.element.height / 2] : void 0 + ); + app.canvas.setDirty(true, true); + }, "function") + }, + { + id: "Comfy.Canvas.FitView", + icon: "pi pi-expand", + label: "Fit view to selected nodes", + function: /* @__PURE__ */ __name(() => { + if (app.canvas.empty) { + useToastStore().add({ + severity: "error", + summary: "Empty canvas", + life: 3e3 + }); + return; + } + app.canvas.fitViewToSelectionAnimated(); + }, "function") + }, + { + id: "Comfy.Canvas.ToggleLock", + icon: "pi pi-lock", + label: "Canvas Toggle Lock", + function: /* @__PURE__ */ __name(() => { + app.canvas["read_only"] = !app.canvas["read_only"]; + }, "function") + }, + { + id: "Comfy.Canvas.ToggleLinkVisibility", + icon: "pi pi-eye", + label: "Canvas Toggle Link Visibility", + versionAdded: "1.3.6", + function: (() => { + const settingStore = useSettingStore(); + let lastLinksRenderMode = LiteGraph.SPLINE_LINK; + return () => { + const currentMode = settingStore.get("Comfy.LinkRenderMode"); + if (currentMode === LiteGraph.HIDDEN_LINK) { + settingStore.set("Comfy.LinkRenderMode", lastLinksRenderMode); + } else { + lastLinksRenderMode = currentMode; + settingStore.set("Comfy.LinkRenderMode", LiteGraph.HIDDEN_LINK); + } + }; + })() + }, + { + id: "Comfy.QueuePrompt", + icon: "pi pi-play", + label: "Queue Prompt", + versionAdded: "1.3.7", + function: /* @__PURE__ */ __name(() => { + const batchCount = useQueueSettingsStore().batchCount; + app.queuePrompt(0, batchCount); + }, "function") + }, + { + id: "Comfy.QueuePromptFront", + icon: "pi pi-play", + label: "Queue Prompt (Front)", + versionAdded: "1.3.7", + function: /* @__PURE__ */ __name(() => { + const batchCount = useQueueSettingsStore().batchCount; + app.queuePrompt(-1, batchCount); + }, "function") + }, + { + id: "Comfy.ShowSettingsDialog", + icon: "pi pi-cog", + label: "Show Settings Dialog", + versionAdded: "1.3.7", + function: /* @__PURE__ */ __name(() => { + dialogService.showSettingsDialog(); + }, "function") + }, + { + id: "Comfy.Graph.GroupSelectedNodes", + icon: "pi pi-sitemap", + label: "Group Selected Nodes", + versionAdded: "1.3.7", + function: /* @__PURE__ */ __name(() => { + const { canvas } = app; + if (!canvas.selectedItems?.size) { + useToastStore().add({ + severity: "error", + summary: "Nothing to group", + detail: "Please select the nodes (or other groups) to create a group for", + life: 3e3 + }); + return; + } + const group = new LGraphGroup(); + const padding = useSettingStore().get( + "Comfy.GroupSelectedNodes.Padding" + ); + group.resizeTo(canvas.selectedItems, padding); + canvas.graph.add(group); + useTitleEditorStore().titleEditorTarget = group; + }, "function") + }, + { + id: "Workspace.NextOpenedWorkflow", + icon: "pi pi-step-forward", + label: "Next Opened Workflow", + versionAdded: "1.3.9", + function: /* @__PURE__ */ __name(() => { + workflowService.loadNextOpenedWorkflow(); + }, "function") + }, + { + id: "Workspace.PreviousOpenedWorkflow", + icon: "pi pi-step-backward", + label: "Previous Opened Workflow", + versionAdded: "1.3.9", + function: /* @__PURE__ */ __name(() => { + workflowService.loadPreviousOpenedWorkflow(); + }, "function") + }, + { + id: "Comfy.Canvas.ToggleSelectedNodes.Mute", + icon: "pi pi-volume-off", + label: "Mute/Unmute Selected Nodes", + versionAdded: "1.3.11", + function: /* @__PURE__ */ __name(() => { + toggleSelectedNodesMode(LGraphEventMode.NEVER); + }, "function") + }, + { + id: "Comfy.Canvas.ToggleSelectedNodes.Bypass", + icon: "pi pi-shield", + label: "Bypass/Unbypass Selected Nodes", + versionAdded: "1.3.11", + function: /* @__PURE__ */ __name(() => { + toggleSelectedNodesMode(LGraphEventMode.BYPASS); + }, "function") + }, + { + id: "Comfy.Canvas.ToggleSelectedNodes.Pin", + icon: "pi pi-pin", + label: "Pin/Unpin Selected Nodes", + versionAdded: "1.3.11", + function: /* @__PURE__ */ __name(() => { + getSelectedNodes().forEach((node) => { + node.pin(!node.pinned); + }); + }, "function") + }, + { + id: "Comfy.Canvas.ToggleSelected.Pin", + icon: "pi pi-pin", + label: "Pin/Unpin Selected Items", + versionAdded: "1.3.33", + function: /* @__PURE__ */ __name(() => { + for (const item of app.canvas.selectedItems) { + if (item instanceof LGraphNode || item instanceof LGraphGroup) { + item.pin(!item.pinned); + } + } + }, "function") + }, + { + id: "Comfy.Canvas.ToggleSelectedNodes.Collapse", + icon: "pi pi-minus", + label: "Collapse/Expand Selected Nodes", + versionAdded: "1.3.11", + function: /* @__PURE__ */ __name(() => { + getSelectedNodes().forEach((node) => { + node.collapse(); + }); + }, "function") + }, + { + id: "Comfy.ToggleTheme", + icon: "pi pi-moon", + label: "Toggle Theme (Dark/Light)", + versionAdded: "1.3.12", + function: (() => { + let previousDarkTheme = DEFAULT_DARK_COLOR_PALETTE.id; + let previousLightTheme = DEFAULT_LIGHT_COLOR_PALETTE.id; + return () => { + const settingStore = useSettingStore(); + const theme = colorPaletteStore.completedActivePalette; + if (theme.light_theme) { + previousLightTheme = theme.id; + settingStore.set("Comfy.ColorPalette", previousDarkTheme); + } else { + previousDarkTheme = theme.id; + settingStore.set("Comfy.ColorPalette", previousLightTheme); + } + }; + })() + }, + { + id: "Workspace.ToggleBottomPanel", + icon: "pi pi-list", + label: "Toggle Bottom Panel", + versionAdded: "1.3.22", + function: /* @__PURE__ */ __name(() => { + useBottomPanelStore().toggleBottomPanel(); + }, "function") + }, + { + id: "Workspace.ToggleFocusMode", + icon: "pi pi-eye", + label: "Toggle Focus Mode", + versionAdded: "1.3.27", + function: /* @__PURE__ */ __name(() => { + useWorkspaceStore().toggleFocusMode(); + }, "function") + }, + { + id: "Comfy.Graph.FitGroupToContents", + icon: "pi pi-expand", + label: "Fit Group To Contents", + versionAdded: "1.4.9", + function: /* @__PURE__ */ __name(() => { + for (const group of app.canvas.selectedItems) { + if (group instanceof LGraphGroup) { + group.recomputeInsideNodes(); + const padding = useSettingStore().get( + "Comfy.GroupSelectedNodes.Padding" + ); + group.resizeTo(group.children, padding); + app.graph.change(); + } + } + }, "function") + }, + { + id: "Comfy.Help.OpenComfyUIIssues", + icon: "pi pi-github", + label: "Open ComfyUI Issues", + menubarLabel: "ComfyUI Issues", + versionAdded: "1.5.5", + function: /* @__PURE__ */ __name(() => { + window.open( + "https://github.com/comfyanonymous/ComfyUI/issues", + "_blank" + ); + }, "function") + }, + { + id: "Comfy.Help.OpenComfyUIDocs", + icon: "pi pi-info-circle", + label: "Open ComfyUI Docs", + menubarLabel: "ComfyUI Docs", + versionAdded: "1.5.5", + function: /* @__PURE__ */ __name(() => { + window.open("https://docs.comfy.org/", "_blank"); + }, "function") + }, + { + id: "Comfy.Help.OpenComfyOrgDiscord", + icon: "pi pi-discord", + label: "Open Comfy-Org Discord", + menubarLabel: "Comfy-Org Discord", + versionAdded: "1.5.5", + function: /* @__PURE__ */ __name(() => { + window.open("https://www.comfy.org/discord", "_blank"); + }, "function") + }, + { + id: "Workspace.SearchBox.Toggle", + icon: "pi pi-search", + label: "Toggle Search Box", + versionAdded: "1.5.7", + function: /* @__PURE__ */ __name(() => { + useSearchBoxStore().toggleVisible(); + }, "function") + }, + { + id: "Comfy.Help.AboutComfyUI", + icon: "pi pi-info-circle", + label: "Open About ComfyUI", + menubarLabel: "About ComfyUI", + versionAdded: "1.6.4", + function: /* @__PURE__ */ __name(() => { + dialogService.showSettingsDialog("about"); + }, "function") + }, + { + id: "Comfy.DuplicateWorkflow", + icon: "pi pi-clone", + label: "Duplicate Current Workflow", + versionAdded: "1.6.15", + function: /* @__PURE__ */ __name(() => { + workflowService.duplicateWorkflow(workflowStore.activeWorkflow); + }, "function") + }, + { + id: "Workspace.CloseWorkflow", + icon: "pi pi-times", + label: "Close Current Workflow", + versionAdded: "1.7.3", + function: /* @__PURE__ */ __name(() => { + if (workflowStore.activeWorkflow) + workflowService.closeWorkflow(workflowStore.activeWorkflow); + }, "function") + }, + { + id: "Comfy.Feedback", + icon: "pi pi-megaphone", + label: "Give Feedback", + versionAdded: "1.8.2", + function: /* @__PURE__ */ __name(() => { + dialogService.showIssueReportDialog({ + title: t("g.feedback"), + subtitle: t("issueReport.feedbackTitle"), + panelProps: { + errorType: "Feedback", + defaultFields: ["SystemStats", "Settings"] + } + }); + }, "function") + }, + { + id: "Comfy.Help.OpenComfyUIForum", + icon: "pi pi-comments", + label: "Open ComfyUI Forum", + menubarLabel: "ComfyUI Forum", + versionAdded: "1.8.2", + function: /* @__PURE__ */ __name(() => { + window.open("https://forum.comfy.org/", "_blank"); + }, "function") + } + ]; +} +__name(useCoreCommands, "useCoreCommands"); +function setupAutoQueueHandler() { + const queueCountStore = useQueuePendingTaskCountStore(); + const queueSettingsStore = useQueueSettingsStore(); + let graphHasChanged = false; + let internalCount = 0; + api.addEventListener("graphChanged", () => { + if (queueSettingsStore.mode === "change") { + if (internalCount) { + graphHasChanged = true; + } else { + graphHasChanged = false; + app.queuePrompt(0, queueSettingsStore.batchCount); + internalCount++; + } + } + }); + queueCountStore.$subscribe( + () => { + internalCount = queueCountStore.count; + if (!internalCount && !app.lastExecutionError) { + if (queueSettingsStore.mode === "instant" || queueSettingsStore.mode === "change" && graphHasChanged) { + graphHasChanged = false; + app.queuePrompt(0, queueSettingsStore.batchCount); + } + } + }, + { detached: true } + ); +} +__name(setupAutoQueueHandler, "setupAutoQueueHandler"); +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "GraphView", + setup(__props) { + setupAutoQueueHandler(); + const { t: t2 } = useI18n(); + const toast = useToast(); + const settingStore = useSettingStore(); + const executionStore = useExecutionStore(); + const colorPaletteStore = useColorPaletteStore(); + const queueStore = useQueueStore(); + watch( + () => colorPaletteStore.completedActivePalette, + (newTheme) => { + const DARK_THEME_CLASS = "dark-theme"; + if (newTheme.light_theme) { + document.body.classList.remove(DARK_THEME_CLASS); + } else { + document.body.classList.add(DARK_THEME_CLASS); + } + if (isElectron()) { + electronAPI().changeTheme({ + color: "rgba(0, 0, 0, 0)", + symbolColor: newTheme.colors.comfy_base["input-text"] + }); + } + }, + { immediate: true } + ); + if (isElectron()) { + watch( + () => queueStore.tasks, + (newTasks, oldTasks) => { + const oldRunningTaskIds = new Set( + oldTasks.filter((task) => task.isRunning).map((task) => task.promptId) + ); + newTasks.filter( + (task) => oldRunningTaskIds.has(task.promptId) && task.isHistory + ).forEach((task) => { + electronAPI().Events.incrementUserProperty( + `execution:${task.displayStatus.toLowerCase()}`, + 1 + ); + electronAPI().Events.trackEvent("execution", { + status: task.displayStatus.toLowerCase() + }); + }); + }, + { deep: true } + ); + } + watchEffect(() => { + const fontSize = settingStore.get("Comfy.TextareaWidget.FontSize"); + document.documentElement.style.setProperty( + "--comfy-textarea-font-size", + `${fontSize}px` + ); + }); + watchEffect(() => { + const padding = settingStore.get("Comfy.TreeExplorer.ItemPadding"); + document.documentElement.style.setProperty( + "--comfy-tree-explorer-item-padding", + `${padding}px` + ); + }); + watchEffect(() => { + const locale = settingStore.get("Comfy.Locale"); + if (locale) { + i18n.global.locale.value = locale; + } + }); + watchEffect(() => { + const useNewMenu = settingStore.get("Comfy.UseNewMenu"); + if (useNewMenu === "Disabled") { + app.ui.menuContainer.style.setProperty("display", "block"); + app.ui.restoreMenuPosition(); + } else { + app.ui.menuContainer.style.setProperty("display", "none"); + } + }); + watchEffect(() => { + queueStore.maxHistoryItems = settingStore.get("Comfy.Queue.MaxHistoryItems"); + }); + const init = /* @__PURE__ */ __name(() => { + const coreCommands = useCoreCommands(); + useCommandStore().registerCommands(coreCommands); + useMenuItemStore().registerCoreMenuCommands(); + useKeybindingService().registerCoreKeybindings(); + useSidebarTabStore().registerCoreSidebarTabs(); + useBottomPanelStore().registerCoreBottomPanelTabs(); + app.extensionManager = useWorkspaceStore(); + }, "init"); + const queuePendingTaskCountStore = useQueuePendingTaskCountStore(); + const onStatus = /* @__PURE__ */ __name(async (e) => { + queuePendingTaskCountStore.update(e); + await queueStore.update(); + }, "onStatus"); + const reconnectingMessage = { + severity: "error", + summary: t2("g.reconnecting") + }; + const onReconnecting = /* @__PURE__ */ __name(() => { + toast.remove(reconnectingMessage); + toast.add(reconnectingMessage); + }, "onReconnecting"); + const onReconnected = /* @__PURE__ */ __name(() => { + toast.remove(reconnectingMessage); + toast.add({ + severity: "success", + summary: t2("g.reconnected"), + life: 2e3 + }); + }, "onReconnected"); + onMounted(() => { + api.addEventListener("status", onStatus); + api.addEventListener("reconnecting", onReconnecting); + api.addEventListener("reconnected", onReconnected); + executionStore.bindExecutionEvents(); + try { + init(); + } catch (e) { + console.error("Failed to init ComfyUI frontend", e); + } + }); + onBeforeUnmount(() => { + api.removeEventListener("status", onStatus); + api.removeEventListener("reconnecting", onReconnecting); + api.removeEventListener("reconnected", onReconnected); + executionStore.unbindExecutionEvents(); + }); + useEventListener(window, "keydown", useKeybindingService().keybindHandler); + const { wrapWithErrorHandling, wrapWithErrorHandlingAsync } = useErrorHandling(); + const onGraphReady = /* @__PURE__ */ __name(() => { + requestIdleCallback( + () => { + wrapWithErrorHandling(useKeybindingService().registerUserKeybindings)(); + wrapWithErrorHandling(useServerConfigStore().loadServerConfig)( + SERVER_CONFIG_ITEMS, + settingStore.get("Comfy.Server.ServerConfigValues") + ); + wrapWithErrorHandlingAsync(useModelStore().loadModelFolders)(); + wrapWithErrorHandlingAsync(useNodeFrequencyStore().loadNodeFrequencies)(); + useNodeDefStore().nodeSearchService.endsWithFilterStartSequence(""); + }, + { timeout: 1e3 } + ); + }, "onGraphReady"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock(Fragment, null, [ + createVNode(TopMenubar), + createVNode(_sfc_main$8, { onReady: onGraphReady }), + createVNode(_sfc_main$7), + !unref(isElectron)() ? (openBlock(), createBlock(_sfc_main$s, { key: 0 })) : createCommentVNode("", true), + createVNode(_sfc_main$u), + createVNode(MenuHamburger) + ], 64); + }; + } +}); +export { + _sfc_main as default +}; +//# sourceMappingURL=GraphView-DKrBTQLe.js.map diff --git a/web/assets/InstallView-By3hC1fC.js b/web/assets/InstallView-By3hC1fC.js deleted file mode 100644 index 4262b264..00000000 --- a/web/assets/InstallView-By3hC1fC.js +++ /dev/null @@ -1,1319 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true }); -import { B as BaseStyle, y as script$6, o as openBlock, f as createElementBlock, G as mergeProps, c9 as findIndexInList, ca as find, aD as resolveComponent, J as createBlock, K as resolveDynamicComponent, P as withCtx, m as createBaseVNode, Z as toDisplayString, M as renderSlot, L as createCommentVNode, V as normalizeClass, R as findSingle, H as Fragment, aE as Transition, i as withDirectives, v as vShow, am as UniqueComponentId, d as defineComponent, ad as ref, cb as useModel, k as createVNode, j as unref, cc as script$7, c4 as script$8, b3 as withModifiers, aP as script$9, a3 as useI18n, c as computed, aK as script$a, aG as createTextVNode, p as pushScopeId, q as popScopeId, bV as electronAPI, _ as _export_sfc, t as onMounted, r as resolveDirective, ax as script$b, cd as script$c, ce as script$d, l as script$e, c6 as script$f, cf as MigrationItems, w as watchEffect, I as renderList, cg as script$g, c2 as useRouter, aU as toRaw } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$5 } from "./BaseViewTemplate-BhQMaVFP.js"; -var classes$4 = { - root: /* @__PURE__ */ __name(function root(_ref) { - var instance = _ref.instance; - return ["p-step", { - "p-step-active": instance.active, - "p-disabled": instance.isStepDisabled - }]; - }, "root"), - header: "p-step-header", - number: "p-step-number", - title: "p-step-title" -}; -var StepStyle = BaseStyle.extend({ - name: "step", - classes: classes$4 -}); -var script$2$2 = { - name: "StepperSeparator", - hostName: "Stepper", - "extends": script$6 -}; -function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("separator") - }, _ctx.ptm("separator")), null, 16); -} -__name(render$1$2, "render$1$2"); -script$2$2.render = render$1$2; -var script$1$4 = { - name: "BaseStep", - "extends": script$6, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - disabled: { - type: Boolean, - "default": false - }, - asChild: { - type: Boolean, - "default": false - }, - as: { - type: [String, Object], - "default": "DIV" - } - }, - style: StepStyle, - provide: /* @__PURE__ */ __name(function provide() { - return { - $pcStep: this, - $parentInstance: this - }; - }, "provide") -}; -var script$5 = { - name: "Step", - "extends": script$1$4, - inheritAttrs: false, - inject: { - $pcStepper: { - "default": null - }, - $pcStepList: { - "default": null - }, - $pcStepItem: { - "default": null - } - }, - data: /* @__PURE__ */ __name(function data() { - return { - isSeparatorVisible: false - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted() { - if (this.$el && this.$pcStepList) { - var index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name="step"]')); - var stepLen = find(this.$pcStepper.$el, '[data-pc-name="step"]').length; - this.isSeparatorVisible = index !== stepLen - 1; - } - }, "mounted"), - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions(key) { - var _ptm = key === "root" ? this.ptmi : this.ptm; - return _ptm(key, { - context: { - active: this.active, - disabled: this.isStepDisabled - } - }); - }, "getPTOptions"), - onStepClick: /* @__PURE__ */ __name(function onStepClick() { - this.$pcStepper.updateValue(this.activeValue); - }, "onStepClick") - }, - computed: { - active: /* @__PURE__ */ __name(function active() { - return this.$pcStepper.isStepActive(this.activeValue); - }, "active"), - activeValue: /* @__PURE__ */ __name(function activeValue() { - var _this$$pcStepItem; - return !!this.$pcStepItem ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.value : this.value; - }, "activeValue"), - isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled() { - return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled); - }, "isStepDisabled"), - id: /* @__PURE__ */ __name(function id() { - var _this$$pcStepper; - return "".concat((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.id, "_step_").concat(this.activeValue); - }, "id"), - ariaControls: /* @__PURE__ */ __name(function ariaControls() { - var _this$$pcStepper2; - return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); - }, "ariaControls"), - a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs() { - return { - root: { - role: "presentation", - "aria-current": this.active ? "step" : void 0, - "data-pc-name": "step", - "data-pc-section": "root", - "data-p-disabled": this.disabled, - "data-p-active": this.active - }, - header: { - id: this.id, - role: "tab", - taindex: this.disabled ? -1 : void 0, - "aria-controls": this.ariaControls, - "data-pc-section": "header", - disabled: this.disabled, - onClick: this.onStepClick - } - }; - }, "a11yAttrs") - }, - components: { - StepperSeparator: script$2$2 - } -}; -var _hoisted_1$5 = ["id", "tabindex", "aria-controls", "disabled"]; -function render$4(_ctx, _cache, $props, $setup, $data, $options) { - var _component_StepperSeparator = resolveComponent("StepperSeparator"); - return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - key: 0, - "class": _ctx.cx("root"), - "aria-current": $options.active ? "step" : void 0, - role: "presentation", - "data-p-active": $options.active, - "data-p-disabled": $options.isStepDisabled - }, $options.getPTOptions("root")), { - "default": withCtx(function() { - return [createBaseVNode("button", mergeProps({ - id: $options.id, - "class": _ctx.cx("header"), - role: "tab", - type: "button", - tabindex: $options.isStepDisabled ? -1 : void 0, - "aria-controls": $options.ariaControls, - disabled: $options.isStepDisabled, - onClick: _cache[0] || (_cache[0] = function() { - return $options.onStepClick && $options.onStepClick.apply($options, arguments); - }) - }, $options.getPTOptions("header")), [createBaseVNode("span", mergeProps({ - "class": _ctx.cx("number") - }, $options.getPTOptions("number")), toDisplayString($options.activeValue), 17), createBaseVNode("span", mergeProps({ - "class": _ctx.cx("title") - }, $options.getPTOptions("title")), [renderSlot(_ctx.$slots, "default")], 16)], 16, _hoisted_1$5), $data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { - key: 0 - })) : createCommentVNode("", true)]; - }), - _: 3 - }, 16, ["class", "aria-current", "data-p-active", "data-p-disabled"])) : renderSlot(_ctx.$slots, "default", { - key: 1, - "class": normalizeClass(_ctx.cx("root")), - active: $options.active, - value: _ctx.value, - a11yAttrs: $options.a11yAttrs, - activateCallback: $options.onStepClick - }); -} -__name(render$4, "render$4"); -script$5.render = render$4; -var classes$3 = { - root: "p-steplist" -}; -var StepListStyle = BaseStyle.extend({ - name: "steplist", - classes: classes$3 -}); -var script$1$3 = { - name: "BaseStepList", - "extends": script$6, - style: StepListStyle, - provide: /* @__PURE__ */ __name(function provide2() { - return { - $pcStepList: this, - $parentInstance: this - }; - }, "provide") -}; -var script$4 = { - name: "StepList", - "extends": script$1$3, - inheritAttrs: false -}; -function render$3(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); -} -__name(render$3, "render$3"); -script$4.render = render$3; -var classes$2 = { - root: /* @__PURE__ */ __name(function root2(_ref) { - var instance = _ref.instance; - return ["p-steppanel", { - "p-steppanel-active": instance.isVertical && instance.active - }]; - }, "root"), - content: "p-steppanel-content" -}; -var StepPanelStyle = BaseStyle.extend({ - name: "steppanel", - classes: classes$2 -}); -var script$2$1 = { - name: "StepperSeparator", - hostName: "Stepper", - "extends": script$6 -}; -function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("separator") - }, _ctx.ptm("separator")), null, 16); -} -__name(render$1$1, "render$1$1"); -script$2$1.render = render$1$1; -var script$1$2 = { - name: "BaseStepPanel", - "extends": script$6, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - asChild: { - type: Boolean, - "default": false - }, - as: { - type: [String, Object], - "default": "DIV" - } - }, - style: StepPanelStyle, - provide: /* @__PURE__ */ __name(function provide3() { - return { - $pcStepPanel: this, - $parentInstance: this - }; - }, "provide") -}; -var script$3 = { - name: "StepPanel", - "extends": script$1$2, - inheritAttrs: false, - inject: { - $pcStepper: { - "default": null - }, - $pcStepItem: { - "default": null - }, - $pcStepList: { - "default": null - } - }, - data: /* @__PURE__ */ __name(function data2() { - return { - isSeparatorVisible: false - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted2() { - if (this.$el) { - var _this$$pcStepItem, _this$$pcStepList; - var stepElements = find(this.$pcStepper.$el, '[data-pc-name="step"]'); - var stepPanelEl = findSingle(this.isVertical ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.$el : (_this$$pcStepList = this.$pcStepList) === null || _this$$pcStepList === void 0 ? void 0 : _this$$pcStepList.$el, '[data-pc-name="step"]'); - var stepPanelIndex = findIndexInList(stepPanelEl, stepElements); - this.isSeparatorVisible = this.isVertical && stepPanelIndex !== stepElements.length - 1; - } - }, "mounted"), - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions2(key) { - var _ptm = key === "root" ? this.ptmi : this.ptm; - return _ptm(key, { - context: { - active: this.active - } - }); - }, "getPTOptions"), - updateValue: /* @__PURE__ */ __name(function updateValue(val) { - this.$pcStepper.updateValue(val); - }, "updateValue") - }, - computed: { - active: /* @__PURE__ */ __name(function active2() { - var _this$$pcStepItem2, _this$$pcStepper; - var activeValue3 = !!this.$pcStepItem ? (_this$$pcStepItem2 = this.$pcStepItem) === null || _this$$pcStepItem2 === void 0 ? void 0 : _this$$pcStepItem2.value : this.value; - return activeValue3 === ((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.d_value); - }, "active"), - isVertical: /* @__PURE__ */ __name(function isVertical() { - return !!this.$pcStepItem; - }, "isVertical"), - activeValue: /* @__PURE__ */ __name(function activeValue2() { - var _this$$pcStepItem3; - return this.isVertical ? (_this$$pcStepItem3 = this.$pcStepItem) === null || _this$$pcStepItem3 === void 0 ? void 0 : _this$$pcStepItem3.value : this.value; - }, "activeValue"), - id: /* @__PURE__ */ __name(function id2() { - var _this$$pcStepper2; - return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); - }, "id"), - ariaControls: /* @__PURE__ */ __name(function ariaControls2() { - var _this$$pcStepper3; - return "".concat((_this$$pcStepper3 = this.$pcStepper) === null || _this$$pcStepper3 === void 0 ? void 0 : _this$$pcStepper3.id, "_step_").concat(this.activeValue); - }, "ariaControls"), - a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs2() { - return { - id: this.id, - role: "tabpanel", - "aria-controls": this.ariaControls, - "data-pc-name": "steppanel", - "data-p-active": this.active - }; - }, "a11yAttrs") - }, - components: { - StepperSeparator: script$2$1 - } -}; -function render$2(_ctx, _cache, $props, $setup, $data, $options) { - var _component_StepperSeparator = resolveComponent("StepperSeparator"); - return $options.isVertical ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [!_ctx.asChild ? (openBlock(), createBlock(Transition, mergeProps({ - key: 0, - name: "p-toggleable-content" - }, _ctx.ptm("transition")), { - "default": withCtx(function() { - return [withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - id: $options.id, - "class": _ctx.cx("root"), - role: "tabpanel", - "aria-controls": $options.ariaControls - }, $options.getPTOptions("root")), { - "default": withCtx(function() { - return [$data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { - key: 0 - })) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("content") - }, $options.getPTOptions("content")), [renderSlot(_ctx.$slots, "default", { - active: $options.active, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - })], 16)]; - }), - _: 3 - }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]])]; - }), - _: 3 - }, 16)) : renderSlot(_ctx.$slots, "default", { - key: 1, - active: $options.active, - a11yAttrs: $options.a11yAttrs, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - })], 64)) : (openBlock(), createElementBlock(Fragment, { - key: 1 - }, [!_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - key: 0, - id: $options.id, - "class": _ctx.cx("root"), - role: "tabpanel", - "aria-controls": $options.ariaControls - }, $options.getPTOptions("root")), { - "default": withCtx(function() { - return [renderSlot(_ctx.$slots, "default", { - active: $options.active, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - })]; - }), - _: 3 - }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]]) : _ctx.asChild && $options.active ? renderSlot(_ctx.$slots, "default", { - key: 1, - active: $options.active, - a11yAttrs: $options.a11yAttrs, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - }) : createCommentVNode("", true)], 64)); -} -__name(render$2, "render$2"); -script$3.render = render$2; -var classes$1 = { - root: "p-steppanels" -}; -var StepPanelsStyle = BaseStyle.extend({ - name: "steppanels", - classes: classes$1 -}); -var script$1$1 = { - name: "BaseStepPanels", - "extends": script$6, - style: StepPanelsStyle, - provide: /* @__PURE__ */ __name(function provide4() { - return { - $pcStepPanels: this, - $parentInstance: this - }; - }, "provide") -}; -var script$2 = { - name: "StepPanels", - "extends": script$1$1, - inheritAttrs: false -}; -function render$1(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); -} -__name(render$1, "render$1"); -script$2.render = render$1; -var theme = /* @__PURE__ */ __name(function theme2(_ref) { - var dt = _ref.dt; - return "\n.p-steplist {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style-type: none;\n overflow-x: auto;\n}\n\n.p-step {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: ".concat(dt("stepper.step.gap"), ";\n padding: ").concat(dt("stepper.step.padding"), ";\n}\n\n.p-step:last-of-type {\n flex: initial;\n}\n\n.p-step-header {\n border: 0 none;\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ";\n border-radius: ").concat(dt("stepper.step.header.border.radius"), ";\n outline-color: transparent;\n background: transparent;\n padding: ").concat(dt("stepper.step.header.padding"), ";\n gap: ").concat(dt("stepper.step.header.gap"), ";\n}\n\n.p-step-header:focus-visible {\n box-shadow: ").concat(dt("stepper.step.header.focus.ring.shadow"), ";\n outline: ").concat(dt("stepper.step.header.focus.ring.width"), " ").concat(dt("stepper.step.header.focus.ring.style"), " ").concat(dt("stepper.step.header.focus.ring.color"), ";\n outline-offset: ").concat(dt("stepper.step.header.focus.ring.offset"), ";\n}\n\n.p-stepper.p-stepper-readonly .p-step {\n cursor: auto;\n}\n\n.p-step-title {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n color: ").concat(dt("stepper.step.title.color"), ";\n font-weight: ").concat(dt("stepper.step.title.font.weight"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-step-number {\n display: flex;\n align-items: center;\n justify-content: center;\n color: ").concat(dt("stepper.step.number.color"), ";\n border: 2px solid ").concat(dt("stepper.step.number.border.color"), ";\n background: ").concat(dt("stepper.step.number.background"), ";\n min-width: ").concat(dt("stepper.step.number.size"), ";\n height: ").concat(dt("stepper.step.number.size"), ";\n line-height: ").concat(dt("stepper.step.number.size"), ";\n font-size: ").concat(dt("stepper.step.number.font.size"), ";\n z-index: 1;\n border-radius: ").concat(dt("stepper.step.number.border.radius"), ";\n position: relative;\n font-weight: ").concat(dt("stepper.step.number.font.weight"), ';\n}\n\n.p-step-number::after {\n content: " ";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ').concat(dt("stepper.step.number.border.radius"), ";\n box-shadow: ").concat(dt("stepper.step.number.shadow"), ";\n}\n\n.p-step-active .p-step-header {\n cursor: default;\n}\n\n.p-step-active .p-step-number {\n background: ").concat(dt("stepper.step.number.active.background"), ";\n border-color: ").concat(dt("stepper.step.number.active.border.color"), ";\n color: ").concat(dt("stepper.step.number.active.color"), ";\n}\n\n.p-step-active .p-step-title {\n color: ").concat(dt("stepper.step.title.active.color"), ";\n}\n\n.p-step:not(.p-disabled):focus-visible {\n outline: ").concat(dt("focus.ring.width"), " ").concat(dt("focus.ring.style"), " ").concat(dt("focus.ring.color"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-step:has(~ .p-step-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepper-separator {\n flex: 1 1 0;\n background: ").concat(dt("stepper.separator.background"), ";\n width: 100%;\n height: ").concat(dt("stepper.separator.size"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-steppanels {\n padding: ").concat(dt("stepper.steppanels.padding"), ";\n}\n\n.p-steppanel {\n background: ").concat(dt("stepper.steppanel.background"), ";\n color: ").concat(dt("stepper.steppanel.color"), ";\n}\n\n.p-stepper:has(.p-stepitem) {\n display: flex;\n flex-direction: column;\n}\n\n.p-stepitem {\n display: flex;\n flex-direction: column;\n flex: initial;\n}\n\n.p-stepitem.p-stepitem-active {\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-step {\n flex: initial;\n}\n\n.p-stepitem .p-steppanel-content {\n width: 100%;\n padding: ").concat(dt("stepper.steppanel.padding"), ";\n}\n\n.p-stepitem .p-steppanel {\n display: flex;\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-stepper-separator {\n flex: 0 0 auto;\n width: ").concat(dt("stepper.separator.size"), ";\n height: auto;\n margin: ").concat(dt("stepper.separator.margin"), ";\n position: relative;\n left: calc(-1 * ").concat(dt("stepper.separator.size"), ");\n}\n\n.p-stepitem:has(~ .p-stepitem-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepitem:last-of-type .p-steppanel {\n padding-inline-start: ").concat(dt("stepper.step.number.size"), ";\n}\n"); -}, "theme"); -var classes = { - root: /* @__PURE__ */ __name(function root3(_ref2) { - var props = _ref2.props; - return ["p-stepper p-component", { - "p-readonly": props.linear - }]; - }, "root"), - separator: "p-stepper-separator" -}; -var StepperStyle = BaseStyle.extend({ - name: "stepper", - theme, - classes -}); -var script$1 = { - name: "BaseStepper", - "extends": script$6, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - linear: { - type: Boolean, - "default": false - } - }, - style: StepperStyle, - provide: /* @__PURE__ */ __name(function provide5() { - return { - $pcStepper: this, - $parentInstance: this - }; - }, "provide") -}; -var script = { - name: "Stepper", - "extends": script$1, - inheritAttrs: false, - emits: ["update:value"], - data: /* @__PURE__ */ __name(function data3() { - return { - id: this.$attrs.id, - d_value: this.value - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId"), - value: /* @__PURE__ */ __name(function value(newValue) { - this.d_value = newValue; - }, "value") - }, - mounted: /* @__PURE__ */ __name(function mounted3() { - this.id = this.id || UniqueComponentId(); - }, "mounted"), - methods: { - updateValue: /* @__PURE__ */ __name(function updateValue2(newValue) { - if (this.d_value !== newValue) { - this.d_value = newValue; - this.$emit("update:value", newValue); - } - }, "updateValue"), - isStepActive: /* @__PURE__ */ __name(function isStepActive(value2) { - return this.d_value === value2; - }, "isStepActive"), - isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled2() { - return this.linear; - }, "isStepDisabled") - } -}; -function render(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root"), - role: "tablist" - }, _ctx.ptmi("root")), [_ctx.$slots.start ? renderSlot(_ctx.$slots, "start", { - key: 0 - }) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.$slots.end ? renderSlot(_ctx.$slots, "end", { - key: 1 - }) : createCommentVNode("", true)], 16); -} -__name(render, "render"); -script.render = render; -const _hoisted_1$4 = { class: "flex flex-col gap-6 w-[600px]" }; -const _hoisted_2$4 = { class: "flex flex-col gap-4" }; -const _hoisted_3$4 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$4 = { class: "text-neutral-400 my-0" }; -const _hoisted_5$3 = { class: "flex flex-col bg-neutral-800 p-4 rounded-lg" }; -const _hoisted_6$3 = { class: "flex items-center gap-4" }; -const _hoisted_7$3 = { class: "flex-1" }; -const _hoisted_8$3 = { class: "text-lg font-medium text-neutral-100" }; -const _hoisted_9$3 = { class: "text-sm text-neutral-400 mt-1" }; -const _hoisted_10$3 = { class: "flex items-center gap-4" }; -const _hoisted_11$3 = { class: "flex-1" }; -const _hoisted_12$3 = { class: "text-lg font-medium text-neutral-100" }; -const _hoisted_13$2 = { class: "text-sm text-neutral-400 mt-1" }; -const _hoisted_14$2 = { class: "text-neutral-300" }; -const _hoisted_15$2 = { class: "font-medium mb-2" }; -const _hoisted_16$2 = { class: "list-disc pl-6 space-y-1" }; -const _hoisted_17$2 = { class: "font-medium mt-4 mb-2" }; -const _hoisted_18$2 = { class: "list-disc pl-6 space-y-1" }; -const _hoisted_19 = { class: "mt-4" }; -const _hoisted_20 = { - href: "https://comfy.org/privacy", - target: "_blank", - class: "text-blue-400 hover:text-blue-300 underline" -}; -const _sfc_main$4 = /* @__PURE__ */ defineComponent({ - __name: "DesktopSettingsConfiguration", - props: { - "autoUpdate": { required: true }, - "autoUpdateModifiers": {}, - "allowMetrics": { required: true }, - "allowMetricsModifiers": {} - }, - emits: ["update:autoUpdate", "update:allowMetrics"], - setup(__props) { - const showDialog = ref(false); - const autoUpdate = useModel(__props, "autoUpdate"); - const allowMetrics = useModel(__props, "allowMetrics"); - const showMetricsInfo = /* @__PURE__ */ __name(() => { - showDialog.value = true; - }, "showMetricsInfo"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$4, [ - createBaseVNode("div", _hoisted_2$4, [ - createBaseVNode("h2", _hoisted_3$4, toDisplayString(_ctx.$t("install.desktopAppSettings")), 1), - createBaseVNode("p", _hoisted_4$4, toDisplayString(_ctx.$t("install.desktopAppSettingsDescription")), 1) - ]), - createBaseVNode("div", _hoisted_5$3, [ - createBaseVNode("div", _hoisted_6$3, [ - createBaseVNode("div", _hoisted_7$3, [ - createBaseVNode("h3", _hoisted_8$3, toDisplayString(_ctx.$t("install.settings.autoUpdate")), 1), - createBaseVNode("p", _hoisted_9$3, toDisplayString(_ctx.$t("install.settings.autoUpdateDescription")), 1) - ]), - createVNode(unref(script$7), { - modelValue: autoUpdate.value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => autoUpdate.value = $event) - }, null, 8, ["modelValue"]) - ]), - createVNode(unref(script$8)), - createBaseVNode("div", _hoisted_10$3, [ - createBaseVNode("div", _hoisted_11$3, [ - createBaseVNode("h3", _hoisted_12$3, toDisplayString(_ctx.$t("install.settings.allowMetrics")), 1), - createBaseVNode("p", _hoisted_13$2, toDisplayString(_ctx.$t("install.settings.allowMetricsDescription")), 1), - createBaseVNode("a", { - href: "#", - class: "text-sm text-blue-400 hover:text-blue-300 mt-1 inline-block", - onClick: withModifiers(showMetricsInfo, ["prevent"]) - }, toDisplayString(_ctx.$t("install.settings.learnMoreAboutData")), 1) - ]), - createVNode(unref(script$7), { - modelValue: allowMetrics.value, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => allowMetrics.value = $event) - }, null, 8, ["modelValue"]) - ]) - ]), - createVNode(unref(script$9), { - visible: showDialog.value, - "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showDialog.value = $event), - modal: "", - header: _ctx.$t("install.settings.dataCollectionDialog.title") - }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_14$2, [ - createBaseVNode("h4", _hoisted_15$2, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeCollect")), 1), - createBaseVNode("ul", _hoisted_16$2, [ - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.collect.errorReports")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.collect.systemInfo")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.collect.userJourneyEvents" - )), 1) - ]), - createBaseVNode("h4", _hoisted_17$2, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeDoNotCollect")), 1), - createBaseVNode("ul", _hoisted_18$2, [ - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.personalInformation" - )), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.workflowContents" - )), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.fileSystemInformation" - )), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.customNodeConfigurations" - )), 1) - ]), - createBaseVNode("div", _hoisted_19, [ - createBaseVNode("a", _hoisted_20, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.viewFullPolicy")), 1) - ]) - ]) - ]), - _: 1 - }, 8, ["visible", "header"]) - ]); - }; - } -}); -const _imports_0 = "" + new URL("images/nvidia-logo.svg", import.meta.url).href; -const _imports_1 = "" + new URL("images/apple-mps-logo.png", import.meta.url).href; -const _imports_2 = "" + new URL("images/manual-configuration.svg", import.meta.url).href; -const _withScopeId$1 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-79125ff6"), n = n(), popScopeId(), n), "_withScopeId$1"); -const _hoisted_1$3 = { class: "flex flex-col gap-6 w-[600px] h-[30rem] select-none" }; -const _hoisted_2$3 = { class: "grow flex flex-col gap-4 text-neutral-300" }; -const _hoisted_3$3 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$3 = { class: "m-1 text-neutral-400" }; -const _hoisted_5$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createBaseVNode("img", { - class: "m-12", - alt: "NVIDIA logo", - width: "196", - height: "32", - src: _imports_0 -}, null, -1)); -const _hoisted_6$2 = [ - _hoisted_5$2 -]; -const _hoisted_7$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createBaseVNode("img", { - class: "rounded-lg hover-brighten", - alt: "Apple Metal Performance Shaders Logo", - width: "292", - ratio: "", - src: _imports_1 -}, null, -1)); -const _hoisted_8$2 = [ - _hoisted_7$2 -]; -const _hoisted_9$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createBaseVNode("img", { - class: "m-12", - alt: "Manual configuration", - width: "196", - src: _imports_2 -}, null, -1)); -const _hoisted_10$2 = [ - _hoisted_9$2 -]; -const _hoisted_11$2 = { - key: 0, - class: "m-1" -}; -const _hoisted_12$2 = { - key: 1, - class: "m-1" -}; -const _hoisted_13$1 = { - key: 2, - class: "text-neutral-300" -}; -const _hoisted_14$1 = { class: "m-1" }; -const _hoisted_15$1 = { key: 3 }; -const _hoisted_16$1 = { class: "m-1" }; -const _hoisted_17$1 = { class: "m-1" }; -const _hoisted_18$1 = { - for: "cpu-mode", - class: "select-none" -}; -const _sfc_main$3 = /* @__PURE__ */ defineComponent({ - __name: "GpuPicker", - props: { - "device": { - required: true - }, - "deviceModifiers": {} - }, - emits: ["update:device"], - setup(__props) { - const { t } = useI18n(); - const cpuMode = computed({ - get: /* @__PURE__ */ __name(() => selected.value === "cpu", "get"), - set: /* @__PURE__ */ __name((value2) => { - selected.value = value2 ? "cpu" : null; - }, "set") - }); - const selected = useModel(__props, "device"); - const electron = electronAPI(); - const platform = electron.getPlatform(); - const pickGpu = /* @__PURE__ */ __name((value2) => { - const newValue = selected.value === value2 ? null : value2; - selected.value = newValue; - }, "pickGpu"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$3, [ - createBaseVNode("div", _hoisted_2$3, [ - createBaseVNode("h2", _hoisted_3$3, toDisplayString(_ctx.$t("install.gpuSelection.selectGpu")), 1), - createBaseVNode("p", _hoisted_4$3, toDisplayString(_ctx.$t("install.gpuSelection.selectGpuDescription")) + ": ", 1), - createBaseVNode("div", { - class: normalizeClass(["flex gap-2 text-center transition-opacity", { selected: selected.value }]) - }, [ - unref(platform) !== "darwin" ? (openBlock(), createElementBlock("div", { - key: 0, - class: normalizeClass(["gpu-button", { selected: selected.value === "nvidia" }]), - role: "button", - onClick: _cache[0] || (_cache[0] = ($event) => pickGpu("nvidia")) - }, _hoisted_6$2, 2)) : createCommentVNode("", true), - unref(platform) === "darwin" ? (openBlock(), createElementBlock("div", { - key: 1, - class: normalizeClass(["gpu-button", { selected: selected.value === "mps" }]), - role: "button", - onClick: _cache[1] || (_cache[1] = ($event) => pickGpu("mps")) - }, _hoisted_8$2, 2)) : createCommentVNode("", true), - createBaseVNode("div", { - class: normalizeClass(["gpu-button", { selected: selected.value === "unsupported" }]), - role: "button", - onClick: _cache[2] || (_cache[2] = ($event) => pickGpu("unsupported")) - }, _hoisted_10$2, 2) - ], 2), - selected.value === "nvidia" ? (openBlock(), createElementBlock("p", _hoisted_11$2, [ - createVNode(unref(script$a), { - icon: "pi pi-check", - severity: "success", - value: "CUDA" - }), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.nvidiaDescription")), 1) - ])) : createCommentVNode("", true), - selected.value === "mps" ? (openBlock(), createElementBlock("p", _hoisted_12$2, [ - createVNode(unref(script$a), { - icon: "pi pi-check", - severity: "success", - value: "MPS" - }), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.mpsDescription")), 1) - ])) : createCommentVNode("", true), - selected.value === "unsupported" ? (openBlock(), createElementBlock("div", _hoisted_13$1, [ - createBaseVNode("p", _hoisted_14$1, [ - createVNode(unref(script$a), { - icon: "pi pi-exclamation-triangle", - severity: "warn", - value: unref(t)("icon.exclamation-triangle") - }, null, 8, ["value"]), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.customSkipsPython")), 1) - ]), - createBaseVNode("ul", null, [ - createBaseVNode("li", null, [ - createBaseVNode("strong", null, toDisplayString(_ctx.$t("install.gpuSelection.customComfyNeedsPython")), 1) - ]), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customManualVenv")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customInstallRequirements")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customMayNotWork")), 1) - ]) - ])) : createCommentVNode("", true), - selected.value === "cpu" ? (openBlock(), createElementBlock("div", _hoisted_15$1, [ - createBaseVNode("p", _hoisted_16$1, [ - createVNode(unref(script$a), { - icon: "pi pi-exclamation-triangle", - severity: "warn", - value: unref(t)("icon.exclamation-triangle") - }, null, 8, ["value"]), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.cpuModeDescription")), 1) - ]), - createBaseVNode("p", _hoisted_17$1, toDisplayString(_ctx.$t("install.gpuSelection.cpuModeDescription2")), 1) - ])) : createCommentVNode("", true) - ]), - createBaseVNode("div", { - class: normalizeClass(["transition-opacity flex gap-3 h-0", { - "opacity-40": selected.value && selected.value !== "cpu" - }]) - }, [ - createVNode(unref(script$7), { - modelValue: cpuMode.value, - "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => cpuMode.value = $event), - inputId: "cpu-mode", - class: "-translate-y-40" - }, null, 8, ["modelValue"]), - createBaseVNode("label", _hoisted_18$1, toDisplayString(_ctx.$t("install.gpuSelection.enableCpuMode")), 1) - ], 2) - ]); - }; - } -}); -const GpuPicker = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-79125ff6"]]); -const _hoisted_1$2 = { class: "flex flex-col gap-6 w-[600px]" }; -const _hoisted_2$2 = { class: "flex flex-col gap-4" }; -const _hoisted_3$2 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$2 = { class: "text-neutral-400 my-0" }; -const _hoisted_5$1 = { class: "flex gap-2" }; -const _hoisted_6$1 = { class: "bg-neutral-800 p-4 rounded-lg" }; -const _hoisted_7$1 = { class: "text-lg font-medium mt-0 mb-3 text-neutral-100" }; -const _hoisted_8$1 = { class: "flex flex-col gap-2" }; -const _hoisted_9$1 = { class: "flex items-center gap-2" }; -const _hoisted_10$1 = /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-folder text-neutral-400" }, null, -1); -const _hoisted_11$1 = /* @__PURE__ */ createBaseVNode("span", { class: "text-neutral-400" }, "App Data:", -1); -const _hoisted_12$1 = { class: "text-neutral-200" }; -const _hoisted_13 = { class: "pi pi-info-circle" }; -const _hoisted_14 = { class: "flex items-center gap-2" }; -const _hoisted_15 = /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-desktop text-neutral-400" }, null, -1); -const _hoisted_16 = /* @__PURE__ */ createBaseVNode("span", { class: "text-neutral-400" }, "App Path:", -1); -const _hoisted_17 = { class: "text-neutral-200" }; -const _hoisted_18 = { class: "pi pi-info-circle" }; -const _sfc_main$2 = /* @__PURE__ */ defineComponent({ - __name: "InstallLocationPicker", - props: { - "installPath": { required: true }, - "installPathModifiers": {}, - "pathError": { required: true }, - "pathErrorModifiers": {} - }, - emits: ["update:installPath", "update:pathError"], - setup(__props) { - const { t } = useI18n(); - const installPath = useModel(__props, "installPath"); - const pathError = useModel(__props, "pathError"); - const pathExists = ref(false); - const appData = ref(""); - const appPath = ref(""); - const electron = electronAPI(); - onMounted(async () => { - const paths = await electron.getSystemPaths(); - appData.value = paths.appData; - appPath.value = paths.appPath; - installPath.value = paths.defaultInstallPath; - await validatePath(paths.defaultInstallPath); - }); - const validatePath = /* @__PURE__ */ __name(async (path) => { - try { - pathError.value = ""; - pathExists.value = false; - const validation = await electron.validateInstallPath(path); - if (!validation.isValid) { - const errors = []; - if (validation.cannotWrite) errors.push(t("install.cannotWrite")); - if (validation.freeSpace < validation.requiredSpace) { - const requiredGB = validation.requiredSpace / 1024 / 1024 / 1024; - errors.push(`${t("install.insufficientFreeSpace")}: ${requiredGB} GB`); - } - if (validation.parentMissing) errors.push(t("install.parentMissing")); - if (validation.error) - errors.push(`${t("install.unhandledError")}: ${validation.error}`); - pathError.value = errors.join("\n"); - } - if (validation.exists) pathExists.value = true; - } catch (error) { - pathError.value = t("install.pathValidationFailed"); - } - }, "validatePath"); - const browsePath = /* @__PURE__ */ __name(async () => { - try { - const result = await electron.showDirectoryPicker(); - if (result) { - installPath.value = result; - await validatePath(result); - } - } catch (error) { - pathError.value = t("install.failedToSelectDirectory"); - } - }, "browsePath"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$2, [ - createBaseVNode("div", _hoisted_2$2, [ - createBaseVNode("h2", _hoisted_3$2, toDisplayString(_ctx.$t("install.chooseInstallationLocation")), 1), - createBaseVNode("p", _hoisted_4$2, toDisplayString(_ctx.$t("install.installLocationDescription")), 1), - createBaseVNode("div", _hoisted_5$1, [ - createVNode(unref(script$d), { class: "flex-1" }, { - default: withCtx(() => [ - createVNode(unref(script$b), { - modelValue: installPath.value, - "onUpdate:modelValue": [ - _cache[0] || (_cache[0] = ($event) => installPath.value = $event), - validatePath - ], - class: normalizeClass(["w-full", { "p-invalid": pathError.value }]) - }, null, 8, ["modelValue", "class"]), - withDirectives(createVNode(unref(script$c), { class: "pi pi-info-circle" }, null, 512), [ - [_directive_tooltip, _ctx.$t("install.installLocationTooltip")] - ]) - ]), - _: 1 - }), - createVNode(unref(script$e), { - icon: "pi pi-folder", - onClick: browsePath, - class: "w-12" - }) - ]), - pathError.value ? (openBlock(), createBlock(unref(script$f), { - key: 0, - severity: "error", - class: "whitespace-pre-line" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(pathError.value), 1) - ]), - _: 1 - })) : createCommentVNode("", true), - pathExists.value ? (openBlock(), createBlock(unref(script$f), { - key: 1, - severity: "warn" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.pathExists")), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - createBaseVNode("div", _hoisted_6$1, [ - createBaseVNode("h3", _hoisted_7$1, toDisplayString(_ctx.$t("install.systemLocations")), 1), - createBaseVNode("div", _hoisted_8$1, [ - createBaseVNode("div", _hoisted_9$1, [ - _hoisted_10$1, - _hoisted_11$1, - createBaseVNode("span", _hoisted_12$1, toDisplayString(appData.value), 1), - withDirectives(createBaseVNode("span", _hoisted_13, null, 512), [ - [_directive_tooltip, _ctx.$t("install.appDataLocationTooltip")] - ]) - ]), - createBaseVNode("div", _hoisted_14, [ - _hoisted_15, - _hoisted_16, - createBaseVNode("span", _hoisted_17, toDisplayString(appPath.value), 1), - withDirectives(createBaseVNode("span", _hoisted_18, null, 512), [ - [_directive_tooltip, _ctx.$t("install.appPathLocationTooltip")] - ]) - ]) - ]) - ]) - ]); - }; - } -}); -const _hoisted_1$1 = { class: "flex flex-col gap-6 w-[600px]" }; -const _hoisted_2$1 = { class: "flex flex-col gap-4" }; -const _hoisted_3$1 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$1 = { class: "text-neutral-400 my-0" }; -const _hoisted_5 = { class: "flex gap-2" }; -const _hoisted_6 = { - key: 0, - class: "flex flex-col gap-4 bg-neutral-800 p-4 rounded-lg" -}; -const _hoisted_7 = { class: "text-lg mt-0 font-medium text-neutral-100" }; -const _hoisted_8 = { class: "flex flex-col gap-3" }; -const _hoisted_9 = ["onClick"]; -const _hoisted_10 = ["for"]; -const _hoisted_11 = { class: "text-sm text-neutral-400 my-1" }; -const _hoisted_12 = { - key: 1, - class: "text-neutral-400 italic" -}; -const _sfc_main$1 = /* @__PURE__ */ defineComponent({ - __name: "MigrationPicker", - props: { - "sourcePath": { required: false }, - "sourcePathModifiers": {}, - "migrationItemIds": { - required: false - }, - "migrationItemIdsModifiers": {} - }, - emits: ["update:sourcePath", "update:migrationItemIds"], - setup(__props) { - const { t } = useI18n(); - const electron = electronAPI(); - const sourcePath = useModel(__props, "sourcePath"); - const migrationItemIds = useModel(__props, "migrationItemIds"); - const migrationItems = ref( - MigrationItems.map((item) => ({ - ...item, - selected: true - })) - ); - const pathError = ref(""); - const isValidSource = computed( - () => sourcePath.value !== "" && pathError.value === "" - ); - const validateSource = /* @__PURE__ */ __name(async (sourcePath2) => { - if (!sourcePath2) { - pathError.value = ""; - return; - } - try { - pathError.value = ""; - const validation = await electron.validateComfyUISource(sourcePath2); - if (!validation.isValid) pathError.value = validation.error; - } catch (error) { - console.error(error); - pathError.value = t("install.pathValidationFailed"); - } - }, "validateSource"); - const browsePath = /* @__PURE__ */ __name(async () => { - try { - const result = await electron.showDirectoryPicker(); - if (result) { - sourcePath.value = result; - await validateSource(result); - } - } catch (error) { - console.error(error); - pathError.value = t("install.failedToSelectDirectory"); - } - }, "browsePath"); - watchEffect(() => { - migrationItemIds.value = migrationItems.value.filter((item) => item.selected).map((item) => item.id); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$1, [ - createBaseVNode("div", _hoisted_2$1, [ - createBaseVNode("h2", _hoisted_3$1, toDisplayString(_ctx.$t("install.migrateFromExistingInstallation")), 1), - createBaseVNode("p", _hoisted_4$1, toDisplayString(_ctx.$t("install.migrationSourcePathDescription")), 1), - createBaseVNode("div", _hoisted_5, [ - createVNode(unref(script$b), { - modelValue: sourcePath.value, - "onUpdate:modelValue": [ - _cache[0] || (_cache[0] = ($event) => sourcePath.value = $event), - validateSource - ], - placeholder: "Select existing ComfyUI installation (optional)", - class: normalizeClass(["flex-1", { "p-invalid": pathError.value }]) - }, null, 8, ["modelValue", "class"]), - createVNode(unref(script$e), { - icon: "pi pi-folder", - onClick: browsePath, - class: "w-12" - }) - ]), - pathError.value ? (openBlock(), createBlock(unref(script$f), { - key: 0, - severity: "error" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(pathError.value), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - isValidSource.value ? (openBlock(), createElementBlock("div", _hoisted_6, [ - createBaseVNode("h3", _hoisted_7, toDisplayString(_ctx.$t("install.selectItemsToMigrate")), 1), - createBaseVNode("div", _hoisted_8, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(migrationItems.value, (item) => { - return openBlock(), createElementBlock("div", { - key: item.id, - class: "flex items-center gap-3 p-2 hover:bg-neutral-700 rounded", - onClick: /* @__PURE__ */ __name(($event) => item.selected = !item.selected, "onClick") - }, [ - createVNode(unref(script$g), { - modelValue: item.selected, - "onUpdate:modelValue": /* @__PURE__ */ __name(($event) => item.selected = $event, "onUpdate:modelValue"), - inputId: item.id, - binary: true, - onClick: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["stop"])) - }, null, 8, ["modelValue", "onUpdate:modelValue", "inputId"]), - createBaseVNode("div", null, [ - createBaseVNode("label", { - for: item.id, - class: "text-neutral-200 font-medium" - }, toDisplayString(item.label), 9, _hoisted_10), - createBaseVNode("p", _hoisted_11, toDisplayString(item.description), 1) - ]) - ], 8, _hoisted_9); - }), 128)) - ]) - ])) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(_ctx.$t("install.migrationOptional")), 1)) - ]); - }; - } -}); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-0a97b0ae"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "flex pt-6 justify-end" }; -const _hoisted_2 = { class: "flex pt-6 justify-between" }; -const _hoisted_3 = { class: "flex pt-6 justify-between" }; -const _hoisted_4 = { class: "flex pt-6 justify-between" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "InstallView", - setup(__props) { - const device = ref(null); - const installPath = ref(""); - const pathError = ref(""); - const migrationSourcePath = ref(""); - const migrationItemIds = ref([]); - const autoUpdate = ref(true); - const allowMetrics = ref(true); - const highestStep = ref(0); - const handleStepChange = /* @__PURE__ */ __name((value2) => { - setHighestStep(value2); - electronAPI().Events.trackEvent("install_stepper_change", { - step: value2 - }); - }, "handleStepChange"); - const setHighestStep = /* @__PURE__ */ __name((value2) => { - const int = typeof value2 === "number" ? value2 : parseInt(value2, 10); - if (!isNaN(int) && int > highestStep.value) highestStep.value = int; - }, "setHighestStep"); - const hasError = computed(() => pathError.value !== ""); - const noGpu = computed(() => typeof device.value !== "string"); - const electron = electronAPI(); - const router = useRouter(); - const install = /* @__PURE__ */ __name(() => { - const options = { - installPath: installPath.value, - autoUpdate: autoUpdate.value, - allowMetrics: allowMetrics.value, - migrationSourcePath: migrationSourcePath.value, - migrationItemIds: toRaw(migrationItemIds.value), - device: device.value - }; - electron.installComfyUI(options); - const nextPage = options.device === "unsupported" ? "/manual-configuration" : "/server-start"; - router.push(nextPage); - }, "install"); - onMounted(async () => { - if (!electron) return; - const detectedGpu = await electron.Config.getDetectedGpu(); - if (detectedGpu === "mps" || detectedGpu === "nvidia") { - device.value = detectedGpu; - } - electronAPI().Events.trackEvent("install_stepper_change", { - step: "0", - gpu: detectedGpu - }); - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$5, { dark: "" }, { - default: withCtx(() => [ - createVNode(unref(script), { - class: "h-full p-8 2xl:p-16", - value: "0", - "onUpdate:value": handleStepChange - }, { - default: withCtx(() => [ - createVNode(unref(script$4), { class: "select-none" }, { - default: withCtx(() => [ - createVNode(unref(script$5), { value: "0" }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.gpu")), 1) - ]), - _: 1 - }), - createVNode(unref(script$5), { - value: "1", - disabled: noGpu.value - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.installLocation")), 1) - ]), - _: 1 - }, 8, ["disabled"]), - createVNode(unref(script$5), { - value: "2", - disabled: noGpu.value || hasError.value || highestStep.value < 1 - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.migration")), 1) - ]), - _: 1 - }, 8, ["disabled"]), - createVNode(unref(script$5), { - value: "3", - disabled: noGpu.value || hasError.value || highestStep.value < 2 - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.desktopSettings")), 1) - ]), - _: 1 - }, 8, ["disabled"]) - ]), - _: 1 - }), - createVNode(unref(script$2), null, { - default: withCtx(() => [ - createVNode(unref(script$3), { value: "0" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(GpuPicker, { - device: device.value, - "onUpdate:device": _cache[0] || (_cache[0] = ($event) => device.value = $event) - }, null, 8, ["device"]), - createBaseVNode("div", _hoisted_1, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.next"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick"), - disabled: typeof device.value !== "string" - }, null, 8, ["label", "onClick", "disabled"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$3), { value: "1" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(_sfc_main$2, { - installPath: installPath.value, - "onUpdate:installPath": _cache[1] || (_cache[1] = ($event) => installPath.value = $event), - pathError: pathError.value, - "onUpdate:pathError": _cache[2] || (_cache[2] = ($event) => pathError.value = $event) - }, null, 8, ["installPath", "pathError"]), - createBaseVNode("div", _hoisted_2, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.back"), - severity: "secondary", - icon: "pi pi-arrow-left", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("0"), "onClick") - }, null, 8, ["label", "onClick"]), - createVNode(unref(script$e), { - label: _ctx.$t("g.next"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick"), - disabled: pathError.value !== "" - }, null, 8, ["label", "onClick", "disabled"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$3), { value: "2" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(_sfc_main$1, { - sourcePath: migrationSourcePath.value, - "onUpdate:sourcePath": _cache[3] || (_cache[3] = ($event) => migrationSourcePath.value = $event), - migrationItemIds: migrationItemIds.value, - "onUpdate:migrationItemIds": _cache[4] || (_cache[4] = ($event) => migrationItemIds.value = $event) - }, null, 8, ["sourcePath", "migrationItemIds"]), - createBaseVNode("div", _hoisted_3, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.back"), - severity: "secondary", - icon: "pi pi-arrow-left", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick") - }, null, 8, ["label", "onClick"]), - createVNode(unref(script$e), { - label: _ctx.$t("g.next"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("3"), "onClick") - }, null, 8, ["label", "onClick"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$3), { value: "3" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(_sfc_main$4, { - autoUpdate: autoUpdate.value, - "onUpdate:autoUpdate": _cache[5] || (_cache[5] = ($event) => autoUpdate.value = $event), - allowMetrics: allowMetrics.value, - "onUpdate:allowMetrics": _cache[6] || (_cache[6] = ($event) => allowMetrics.value = $event) - }, null, 8, ["autoUpdate", "allowMetrics"]), - createBaseVNode("div", _hoisted_4, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.back"), - severity: "secondary", - icon: "pi pi-arrow-left", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick") - }, null, 8, ["label", "onClick"]), - createVNode(unref(script$e), { - label: _ctx.$t("g.install"), - icon: "pi pi-check", - iconPos: "right", - disabled: hasError.value, - onClick: _cache[7] || (_cache[7] = ($event) => install()) - }, null, 8, ["label", "disabled"]) - ]) - ]), - _: 1 - }) - ]), - _: 1 - }) - ]), - _: 1 - }) - ]), - _: 1 - }); - }; - } -}); -const InstallView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0a97b0ae"]]); -export { - InstallView as default -}; -//# sourceMappingURL=InstallView-By3hC1fC.js.map diff --git a/web/assets/InstallView-C6tMsokB.js b/web/assets/InstallView-C6tMsokB.js new file mode 100644 index 00000000..46178185 --- /dev/null +++ b/web/assets/InstallView-C6tMsokB.js @@ -0,0 +1,945 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { d as defineComponent, U as ref, bm as useModel, o as openBlock, f as createElementBlock, m as createBaseVNode, E as toDisplayString, k as createVNode, j as unref, bn as script, bh as script$1, ar as withModifiers, z as withCtx, ab as script$2, K as useI18n, c as computed, ai as normalizeClass, B as createCommentVNode, a4 as script$3, a7 as createTextVNode, b5 as electronAPI, _ as _export_sfc, p as onMounted, r as resolveDirective, bg as script$4, i as withDirectives, bo as script$5, bp as script$6, l as script$7, y as createBlock, bj as script$8, bq as MigrationItems, w as watchEffect, F as Fragment, D as renderList, br as script$9, bs as mergeModels, bt as ValidationState, Y as normalizeI18nKey, O as watch, bu as checkMirrorReachable, bv as _sfc_main$7, bw as mergeValidationStates, bc as t, a$ as script$a, bx as CUDA_TORCH_URL, by as NIGHTLY_CPU_TORCH_URL, be as useRouter, ag as toRaw } from "./index-CmVtQCAR.js"; +import { s as script$b, a as script$c, b as script$d, c as script$e, d as script$f } from "./index-Bm1HvJhs.js"; +import { P as PYTHON_MIRROR, a as PYPI_MIRROR } from "./uvMirrors-B-HKMf6X.js"; +import { _ as _sfc_main$8 } from "./BaseViewTemplate-Cof5Ihf_.js"; +const _hoisted_1$5 = { class: "flex flex-col gap-6 w-[600px]" }; +const _hoisted_2$5 = { class: "flex flex-col gap-4" }; +const _hoisted_3$5 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$5 = { class: "text-neutral-400 my-0" }; +const _hoisted_5$3 = { class: "flex flex-col bg-neutral-800 p-4 rounded-lg" }; +const _hoisted_6$3 = { class: "flex items-center gap-4" }; +const _hoisted_7$3 = { class: "flex-1" }; +const _hoisted_8$3 = { class: "text-lg font-medium text-neutral-100" }; +const _hoisted_9$3 = { class: "text-sm text-neutral-400 mt-1" }; +const _hoisted_10$3 = { class: "flex items-center gap-4" }; +const _hoisted_11$3 = { class: "flex-1" }; +const _hoisted_12$3 = { class: "text-lg font-medium text-neutral-100" }; +const _hoisted_13$1 = { class: "text-sm text-neutral-400 mt-1" }; +const _hoisted_14$1 = { class: "text-neutral-300" }; +const _hoisted_15 = { class: "font-medium mb-2" }; +const _hoisted_16 = { class: "list-disc pl-6 space-y-1" }; +const _hoisted_17 = { class: "font-medium mt-4 mb-2" }; +const _hoisted_18 = { class: "list-disc pl-6 space-y-1" }; +const _hoisted_19 = { class: "mt-4" }; +const _hoisted_20 = { + href: "https://comfy.org/privacy", + target: "_blank", + class: "text-blue-400 hover:text-blue-300 underline" +}; +const _sfc_main$6 = /* @__PURE__ */ defineComponent({ + __name: "DesktopSettingsConfiguration", + props: { + "autoUpdate": { type: Boolean, ...{ required: true } }, + "autoUpdateModifiers": {}, + "allowMetrics": { type: Boolean, ...{ required: true } }, + "allowMetricsModifiers": {} + }, + emits: ["update:autoUpdate", "update:allowMetrics"], + setup(__props) { + const showDialog = ref(false); + const autoUpdate = useModel(__props, "autoUpdate"); + const allowMetrics = useModel(__props, "allowMetrics"); + const showMetricsInfo = /* @__PURE__ */ __name(() => { + showDialog.value = true; + }, "showMetricsInfo"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$5, [ + createBaseVNode("div", _hoisted_2$5, [ + createBaseVNode("h2", _hoisted_3$5, toDisplayString(_ctx.$t("install.desktopAppSettings")), 1), + createBaseVNode("p", _hoisted_4$5, toDisplayString(_ctx.$t("install.desktopAppSettingsDescription")), 1) + ]), + createBaseVNode("div", _hoisted_5$3, [ + createBaseVNode("div", _hoisted_6$3, [ + createBaseVNode("div", _hoisted_7$3, [ + createBaseVNode("h3", _hoisted_8$3, toDisplayString(_ctx.$t("install.settings.autoUpdate")), 1), + createBaseVNode("p", _hoisted_9$3, toDisplayString(_ctx.$t("install.settings.autoUpdateDescription")), 1) + ]), + createVNode(unref(script), { + modelValue: autoUpdate.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => autoUpdate.value = $event) + }, null, 8, ["modelValue"]) + ]), + createVNode(unref(script$1)), + createBaseVNode("div", _hoisted_10$3, [ + createBaseVNode("div", _hoisted_11$3, [ + createBaseVNode("h3", _hoisted_12$3, toDisplayString(_ctx.$t("install.settings.allowMetrics")), 1), + createBaseVNode("p", _hoisted_13$1, toDisplayString(_ctx.$t("install.settings.allowMetricsDescription")), 1), + createBaseVNode("a", { + href: "#", + class: "text-sm text-blue-400 hover:text-blue-300 mt-1 inline-block", + onClick: withModifiers(showMetricsInfo, ["prevent"]) + }, toDisplayString(_ctx.$t("install.settings.learnMoreAboutData")), 1) + ]), + createVNode(unref(script), { + modelValue: allowMetrics.value, + "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => allowMetrics.value = $event) + }, null, 8, ["modelValue"]) + ]) + ]), + createVNode(unref(script$2), { + visible: showDialog.value, + "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showDialog.value = $event), + modal: "", + header: _ctx.$t("install.settings.dataCollectionDialog.title") + }, { + default: withCtx(() => [ + createBaseVNode("div", _hoisted_14$1, [ + createBaseVNode("h4", _hoisted_15, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeCollect")), 1), + createBaseVNode("ul", _hoisted_16, [ + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.collect.errorReports")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.collect.systemInfo")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t( + "install.settings.dataCollectionDialog.collect.userJourneyEvents" + )), 1) + ]), + createBaseVNode("h4", _hoisted_17, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeDoNotCollect")), 1), + createBaseVNode("ul", _hoisted_18, [ + createBaseVNode("li", null, toDisplayString(_ctx.$t( + "install.settings.dataCollectionDialog.doNotCollect.personalInformation" + )), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t( + "install.settings.dataCollectionDialog.doNotCollect.workflowContents" + )), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t( + "install.settings.dataCollectionDialog.doNotCollect.fileSystemInformation" + )), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t( + "install.settings.dataCollectionDialog.doNotCollect.customNodeConfigurations" + )), 1) + ]), + createBaseVNode("div", _hoisted_19, [ + createBaseVNode("a", _hoisted_20, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.viewFullPolicy")), 1) + ]) + ]) + ]), + _: 1 + }, 8, ["visible", "header"]) + ]); + }; + } +}); +const _imports_0 = "" + new URL("images/nvidia-logo.svg", import.meta.url).href; +const _imports_1 = "" + new URL("images/apple-mps-logo.png", import.meta.url).href; +const _imports_2 = "" + new URL("images/manual-configuration.svg", import.meta.url).href; +const _hoisted_1$4 = { class: "flex flex-col gap-6 w-[600px] h-[30rem] select-none" }; +const _hoisted_2$4 = { class: "grow flex flex-col gap-4 text-neutral-300" }; +const _hoisted_3$4 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$4 = { class: "m-1 text-neutral-400" }; +const _hoisted_5$2 = { + key: 0, + class: "m-1" +}; +const _hoisted_6$2 = { + key: 1, + class: "m-1" +}; +const _hoisted_7$2 = { + key: 2, + class: "text-neutral-300" +}; +const _hoisted_8$2 = { class: "m-1" }; +const _hoisted_9$2 = { key: 3 }; +const _hoisted_10$2 = { class: "m-1" }; +const _hoisted_11$2 = { class: "m-1" }; +const _hoisted_12$2 = { + for: "cpu-mode", + class: "select-none" +}; +const _sfc_main$5 = /* @__PURE__ */ defineComponent({ + __name: "GpuPicker", + props: { + "device": { + required: true + }, + "deviceModifiers": {} + }, + emits: ["update:device"], + setup(__props) { + const { t: t2 } = useI18n(); + const cpuMode = computed({ + get: /* @__PURE__ */ __name(() => selected.value === "cpu", "get"), + set: /* @__PURE__ */ __name((value) => { + selected.value = value ? "cpu" : null; + }, "set") + }); + const selected = useModel(__props, "device"); + const electron = electronAPI(); + const platform = electron.getPlatform(); + const pickGpu = /* @__PURE__ */ __name((value) => { + const newValue = selected.value === value ? null : value; + selected.value = newValue; + }, "pickGpu"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$4, [ + createBaseVNode("div", _hoisted_2$4, [ + createBaseVNode("h2", _hoisted_3$4, toDisplayString(_ctx.$t("install.gpuSelection.selectGpu")), 1), + createBaseVNode("p", _hoisted_4$4, toDisplayString(_ctx.$t("install.gpuSelection.selectGpuDescription")) + ": ", 1), + createBaseVNode("div", { + class: normalizeClass(["flex gap-2 text-center transition-opacity", { selected: selected.value }]) + }, [ + unref(platform) !== "darwin" ? (openBlock(), createElementBlock("div", { + key: 0, + class: normalizeClass(["gpu-button", { selected: selected.value === "nvidia" }]), + role: "button", + onClick: _cache[0] || (_cache[0] = ($event) => pickGpu("nvidia")) + }, _cache[4] || (_cache[4] = [ + createBaseVNode("img", { + class: "m-12", + alt: "NVIDIA logo", + width: "196", + height: "32", + src: _imports_0 + }, null, -1) + ]), 2)) : createCommentVNode("", true), + unref(platform) === "darwin" ? (openBlock(), createElementBlock("div", { + key: 1, + class: normalizeClass(["gpu-button", { selected: selected.value === "mps" }]), + role: "button", + onClick: _cache[1] || (_cache[1] = ($event) => pickGpu("mps")) + }, _cache[5] || (_cache[5] = [ + createBaseVNode("img", { + class: "rounded-lg hover-brighten", + alt: "Apple Metal Performance Shaders Logo", + width: "292", + ratio: "", + src: _imports_1 + }, null, -1) + ]), 2)) : createCommentVNode("", true), + createBaseVNode("div", { + class: normalizeClass(["gpu-button", { selected: selected.value === "unsupported" }]), + role: "button", + onClick: _cache[2] || (_cache[2] = ($event) => pickGpu("unsupported")) + }, _cache[6] || (_cache[6] = [ + createBaseVNode("img", { + class: "m-12", + alt: "Manual configuration", + width: "196", + src: _imports_2 + }, null, -1) + ]), 2) + ], 2), + selected.value === "nvidia" ? (openBlock(), createElementBlock("p", _hoisted_5$2, [ + createVNode(unref(script$3), { + icon: "pi pi-check", + severity: "success", + value: "CUDA" + }), + createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.nvidiaDescription")), 1) + ])) : createCommentVNode("", true), + selected.value === "mps" ? (openBlock(), createElementBlock("p", _hoisted_6$2, [ + createVNode(unref(script$3), { + icon: "pi pi-check", + severity: "success", + value: "MPS" + }), + createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.mpsDescription")), 1) + ])) : createCommentVNode("", true), + selected.value === "unsupported" ? (openBlock(), createElementBlock("div", _hoisted_7$2, [ + createBaseVNode("p", _hoisted_8$2, [ + createVNode(unref(script$3), { + icon: "pi pi-exclamation-triangle", + severity: "warn", + value: unref(t2)("icon.exclamation-triangle") + }, null, 8, ["value"]), + createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.customSkipsPython")), 1) + ]), + createBaseVNode("ul", null, [ + createBaseVNode("li", null, [ + createBaseVNode("strong", null, toDisplayString(_ctx.$t("install.gpuSelection.customComfyNeedsPython")), 1) + ]), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customManualVenv")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customInstallRequirements")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customMayNotWork")), 1) + ]) + ])) : createCommentVNode("", true), + selected.value === "cpu" ? (openBlock(), createElementBlock("div", _hoisted_9$2, [ + createBaseVNode("p", _hoisted_10$2, [ + createVNode(unref(script$3), { + icon: "pi pi-exclamation-triangle", + severity: "warn", + value: unref(t2)("icon.exclamation-triangle") + }, null, 8, ["value"]), + createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.cpuModeDescription")), 1) + ]), + createBaseVNode("p", _hoisted_11$2, toDisplayString(_ctx.$t("install.gpuSelection.cpuModeDescription2")), 1) + ])) : createCommentVNode("", true) + ]), + createBaseVNode("div", { + class: normalizeClass(["transition-opacity flex gap-3 h-0", { + "opacity-40": selected.value && selected.value !== "cpu" + }]) + }, [ + createVNode(unref(script), { + modelValue: cpuMode.value, + "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => cpuMode.value = $event), + inputId: "cpu-mode", + class: "-translate-y-40" + }, null, 8, ["modelValue"]), + createBaseVNode("label", _hoisted_12$2, toDisplayString(_ctx.$t("install.gpuSelection.enableCpuMode")), 1) + ], 2) + ]); + }; + } +}); +const GpuPicker = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-79125ff6"]]); +const _hoisted_1$3 = { class: "flex flex-col gap-6 w-[600px]" }; +const _hoisted_2$3 = { class: "flex flex-col gap-4" }; +const _hoisted_3$3 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$3 = { class: "text-neutral-400 my-0" }; +const _hoisted_5$1 = { class: "flex gap-2" }; +const _hoisted_6$1 = { class: "bg-neutral-800 p-4 rounded-lg" }; +const _hoisted_7$1 = { class: "text-lg font-medium mt-0 mb-3 text-neutral-100" }; +const _hoisted_8$1 = { class: "flex flex-col gap-2" }; +const _hoisted_9$1 = { class: "flex items-center gap-2" }; +const _hoisted_10$1 = { class: "text-neutral-200" }; +const _hoisted_11$1 = { class: "pi pi-info-circle" }; +const _hoisted_12$1 = { class: "flex items-center gap-2" }; +const _hoisted_13 = { class: "text-neutral-200" }; +const _hoisted_14 = { class: "pi pi-info-circle" }; +const _sfc_main$4 = /* @__PURE__ */ defineComponent({ + __name: "InstallLocationPicker", + props: { + "installPath": { required: true }, + "installPathModifiers": {}, + "pathError": { required: true }, + "pathErrorModifiers": {} + }, + emits: ["update:installPath", "update:pathError"], + setup(__props) { + const { t: t2 } = useI18n(); + const installPath = useModel(__props, "installPath"); + const pathError = useModel(__props, "pathError"); + const pathExists = ref(false); + const appData = ref(""); + const appPath = ref(""); + const electron = electronAPI(); + onMounted(async () => { + const paths = await electron.getSystemPaths(); + appData.value = paths.appData; + appPath.value = paths.appPath; + installPath.value = paths.defaultInstallPath; + await validatePath(paths.defaultInstallPath); + }); + const validatePath = /* @__PURE__ */ __name(async (path) => { + try { + pathError.value = ""; + pathExists.value = false; + const validation = await electron.validateInstallPath(path); + if (!validation.isValid) { + const errors = []; + if (validation.cannotWrite) errors.push(t2("install.cannotWrite")); + if (validation.freeSpace < validation.requiredSpace) { + const requiredGB = validation.requiredSpace / 1024 / 1024 / 1024; + errors.push(`${t2("install.insufficientFreeSpace")}: ${requiredGB} GB`); + } + if (validation.parentMissing) errors.push(t2("install.parentMissing")); + if (validation.error) + errors.push(`${t2("install.unhandledError")}: ${validation.error}`); + pathError.value = errors.join("\n"); + } + if (validation.exists) pathExists.value = true; + } catch (error) { + pathError.value = t2("install.pathValidationFailed"); + } + }, "validatePath"); + const browsePath = /* @__PURE__ */ __name(async () => { + try { + const result = await electron.showDirectoryPicker(); + if (result) { + installPath.value = result; + await validatePath(result); + } + } catch (error) { + pathError.value = t2("install.failedToSelectDirectory"); + } + }, "browsePath"); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", _hoisted_1$3, [ + createBaseVNode("div", _hoisted_2$3, [ + createBaseVNode("h2", _hoisted_3$3, toDisplayString(_ctx.$t("install.chooseInstallationLocation")), 1), + createBaseVNode("p", _hoisted_4$3, toDisplayString(_ctx.$t("install.installLocationDescription")), 1), + createBaseVNode("div", _hoisted_5$1, [ + createVNode(unref(script$6), { class: "flex-1" }, { + default: withCtx(() => [ + createVNode(unref(script$4), { + modelValue: installPath.value, + "onUpdate:modelValue": [ + _cache[0] || (_cache[0] = ($event) => installPath.value = $event), + validatePath + ], + class: normalizeClass(["w-full", { "p-invalid": pathError.value }]) + }, null, 8, ["modelValue", "class"]), + withDirectives(createVNode(unref(script$5), { class: "pi pi-info-circle" }, null, 512), [ + [_directive_tooltip, _ctx.$t("install.installLocationTooltip")] + ]) + ]), + _: 1 + }), + createVNode(unref(script$7), { + icon: "pi pi-folder", + onClick: browsePath, + class: "w-12" + }) + ]), + pathError.value ? (openBlock(), createBlock(unref(script$8), { + key: 0, + severity: "error", + class: "whitespace-pre-line" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(pathError.value), 1) + ]), + _: 1 + })) : createCommentVNode("", true), + pathExists.value ? (openBlock(), createBlock(unref(script$8), { + key: 1, + severity: "warn" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.pathExists")), 1) + ]), + _: 1 + })) : createCommentVNode("", true) + ]), + createBaseVNode("div", _hoisted_6$1, [ + createBaseVNode("h3", _hoisted_7$1, toDisplayString(_ctx.$t("install.systemLocations")), 1), + createBaseVNode("div", _hoisted_8$1, [ + createBaseVNode("div", _hoisted_9$1, [ + _cache[1] || (_cache[1] = createBaseVNode("i", { class: "pi pi-folder text-neutral-400" }, null, -1)), + _cache[2] || (_cache[2] = createBaseVNode("span", { class: "text-neutral-400" }, "App Data:", -1)), + createBaseVNode("span", _hoisted_10$1, toDisplayString(appData.value), 1), + withDirectives(createBaseVNode("span", _hoisted_11$1, null, 512), [ + [_directive_tooltip, _ctx.$t("install.appDataLocationTooltip")] + ]) + ]), + createBaseVNode("div", _hoisted_12$1, [ + _cache[3] || (_cache[3] = createBaseVNode("i", { class: "pi pi-desktop text-neutral-400" }, null, -1)), + _cache[4] || (_cache[4] = createBaseVNode("span", { class: "text-neutral-400" }, "App Path:", -1)), + createBaseVNode("span", _hoisted_13, toDisplayString(appPath.value), 1), + withDirectives(createBaseVNode("span", _hoisted_14, null, 512), [ + [_directive_tooltip, _ctx.$t("install.appPathLocationTooltip")] + ]) + ]) + ]) + ]) + ]); + }; + } +}); +const _hoisted_1$2 = { class: "flex flex-col gap-6 w-[600px]" }; +const _hoisted_2$2 = { class: "flex flex-col gap-4" }; +const _hoisted_3$2 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$2 = { class: "text-neutral-400 my-0" }; +const _hoisted_5 = { class: "flex gap-2" }; +const _hoisted_6 = { + key: 0, + class: "flex flex-col gap-4 bg-neutral-800 p-4 rounded-lg" +}; +const _hoisted_7 = { class: "text-lg mt-0 font-medium text-neutral-100" }; +const _hoisted_8 = { class: "flex flex-col gap-3" }; +const _hoisted_9 = ["onClick"]; +const _hoisted_10 = ["for"]; +const _hoisted_11 = { class: "text-sm text-neutral-400 my-1" }; +const _hoisted_12 = { + key: 1, + class: "text-neutral-400 italic" +}; +const _sfc_main$3 = /* @__PURE__ */ defineComponent({ + __name: "MigrationPicker", + props: { + "sourcePath": { required: false }, + "sourcePathModifiers": {}, + "migrationItemIds": { + required: false + }, + "migrationItemIdsModifiers": {} + }, + emits: ["update:sourcePath", "update:migrationItemIds"], + setup(__props) { + const { t: t2 } = useI18n(); + const electron = electronAPI(); + const sourcePath = useModel(__props, "sourcePath"); + const migrationItemIds = useModel(__props, "migrationItemIds"); + const migrationItems = ref( + MigrationItems.map((item) => ({ + ...item, + selected: true + })) + ); + const pathError = ref(""); + const isValidSource = computed( + () => sourcePath.value !== "" && pathError.value === "" + ); + const validateSource = /* @__PURE__ */ __name(async (sourcePath2) => { + if (!sourcePath2) { + pathError.value = ""; + return; + } + try { + pathError.value = ""; + const validation = await electron.validateComfyUISource(sourcePath2); + if (!validation.isValid) pathError.value = validation.error; + } catch (error) { + console.error(error); + pathError.value = t2("install.pathValidationFailed"); + } + }, "validateSource"); + const browsePath = /* @__PURE__ */ __name(async () => { + try { + const result = await electron.showDirectoryPicker(); + if (result) { + sourcePath.value = result; + await validateSource(result); + } + } catch (error) { + console.error(error); + pathError.value = t2("install.failedToSelectDirectory"); + } + }, "browsePath"); + watchEffect(() => { + migrationItemIds.value = migrationItems.value.filter((item) => item.selected).map((item) => item.id); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$2, [ + createBaseVNode("div", _hoisted_2$2, [ + createBaseVNode("h2", _hoisted_3$2, toDisplayString(_ctx.$t("install.migrateFromExistingInstallation")), 1), + createBaseVNode("p", _hoisted_4$2, toDisplayString(_ctx.$t("install.migrationSourcePathDescription")), 1), + createBaseVNode("div", _hoisted_5, [ + createVNode(unref(script$4), { + modelValue: sourcePath.value, + "onUpdate:modelValue": [ + _cache[0] || (_cache[0] = ($event) => sourcePath.value = $event), + validateSource + ], + placeholder: "Select existing ComfyUI installation (optional)", + class: normalizeClass(["flex-1", { "p-invalid": pathError.value }]) + }, null, 8, ["modelValue", "class"]), + createVNode(unref(script$7), { + icon: "pi pi-folder", + onClick: browsePath, + class: "w-12" + }) + ]), + pathError.value ? (openBlock(), createBlock(unref(script$8), { + key: 0, + severity: "error" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(pathError.value), 1) + ]), + _: 1 + })) : createCommentVNode("", true) + ]), + isValidSource.value ? (openBlock(), createElementBlock("div", _hoisted_6, [ + createBaseVNode("h3", _hoisted_7, toDisplayString(_ctx.$t("install.selectItemsToMigrate")), 1), + createBaseVNode("div", _hoisted_8, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(migrationItems.value, (item) => { + return openBlock(), createElementBlock("div", { + key: item.id, + class: "flex items-center gap-3 p-2 hover:bg-neutral-700 rounded", + onClick: /* @__PURE__ */ __name(($event) => item.selected = !item.selected, "onClick") + }, [ + createVNode(unref(script$9), { + modelValue: item.selected, + "onUpdate:modelValue": /* @__PURE__ */ __name(($event) => item.selected = $event, "onUpdate:modelValue"), + inputId: item.id, + binary: true, + onClick: _cache[1] || (_cache[1] = withModifiers(() => { + }, ["stop"])) + }, null, 8, ["modelValue", "onUpdate:modelValue", "inputId"]), + createBaseVNode("div", null, [ + createBaseVNode("label", { + for: item.id, + class: "text-neutral-200 font-medium" + }, toDisplayString(item.label), 9, _hoisted_10), + createBaseVNode("p", _hoisted_11, toDisplayString(item.description), 1) + ]) + ], 8, _hoisted_9); + }), 128)) + ]) + ])) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(_ctx.$t("install.migrationOptional")), 1)) + ]); + }; + } +}); +const _hoisted_1$1 = { class: "flex flex-col items-center gap-4" }; +const _hoisted_2$1 = { class: "w-full" }; +const _hoisted_3$1 = { class: "text-lg font-medium text-neutral-100" }; +const _hoisted_4$1 = { class: "text-sm text-neutral-400 mt-1" }; +const _sfc_main$2 = /* @__PURE__ */ defineComponent({ + __name: "MirrorItem", + props: /* @__PURE__ */ mergeModels({ + item: {} + }, { + "modelValue": { required: true }, + "modelModifiers": {} + }), + emits: /* @__PURE__ */ mergeModels(["state-change"], ["update:modelValue"]), + setup(__props, { emit: __emit }) { + const emit = __emit; + const modelValue = useModel(__props, "modelValue"); + const validationState = ref(ValidationState.IDLE); + const normalizedSettingId = computed(() => { + return normalizeI18nKey(__props.item.settingId); + }); + onMounted(() => { + modelValue.value = __props.item.mirror; + }); + watch(validationState, (newState) => { + emit("state-change", newState); + if (newState === ValidationState.INVALID && modelValue.value === __props.item.mirror) { + modelValue.value = __props.item.fallbackMirror; + } + }); + return (_ctx, _cache) => { + const _component_UrlInput = _sfc_main$7; + return openBlock(), createElementBlock("div", _hoisted_1$1, [ + createBaseVNode("div", _hoisted_2$1, [ + createBaseVNode("h3", _hoisted_3$1, toDisplayString(_ctx.$t(`settings.${normalizedSettingId.value}.name`)), 1), + createBaseVNode("p", _hoisted_4$1, toDisplayString(_ctx.$t(`settings.${normalizedSettingId.value}.tooltip`)), 1) + ]), + createVNode(_component_UrlInput, { + modelValue: modelValue.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event), + "validate-url-fn": /* @__PURE__ */ __name((mirror) => unref(checkMirrorReachable)(mirror + (_ctx.item.validationPathSuffix ?? "")), "validate-url-fn"), + onStateChange: _cache[1] || (_cache[1] = ($event) => validationState.value = $event) + }, null, 8, ["modelValue", "validate-url-fn"]) + ]); + }; + } +}); +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "MirrorsConfiguration", + props: /* @__PURE__ */ mergeModels({ + device: {} + }, { + "pythonMirror": { required: true }, + "pythonMirrorModifiers": {}, + "pypiMirror": { required: true }, + "pypiMirrorModifiers": {}, + "torchMirror": { required: true }, + "torchMirrorModifiers": {} + }), + emits: ["update:pythonMirror", "update:pypiMirror", "update:torchMirror"], + setup(__props) { + const showMirrorInputs = ref(false); + const pythonMirror = useModel(__props, "pythonMirror"); + const pypiMirror = useModel(__props, "pypiMirror"); + const torchMirror = useModel(__props, "torchMirror"); + const getTorchMirrorItem = /* @__PURE__ */ __name((device) => { + const settingId = "Comfy-Desktop.UV.TorchInstallMirror"; + switch (device) { + case "mps": + return { + settingId, + mirror: NIGHTLY_CPU_TORCH_URL, + fallbackMirror: NIGHTLY_CPU_TORCH_URL + }; + case "nvidia": + return { + settingId, + mirror: CUDA_TORCH_URL, + fallbackMirror: CUDA_TORCH_URL + }; + case "cpu": + default: + return { + settingId, + mirror: PYPI_MIRROR.mirror, + fallbackMirror: PYPI_MIRROR.fallbackMirror + }; + } + }, "getTorchMirrorItem"); + const mirrors = computed(() => [ + [PYTHON_MIRROR, pythonMirror], + [PYPI_MIRROR, pypiMirror], + [getTorchMirrorItem(__props.device), torchMirror] + ]); + const validationStates = ref( + mirrors.value.map(() => ValidationState.IDLE) + ); + const validationState = computed(() => { + return mergeValidationStates(validationStates.value); + }); + const validationStateTooltip = computed(() => { + switch (validationState.value) { + case ValidationState.INVALID: + return t("install.settings.mirrorsUnreachable"); + case ValidationState.VALID: + return t("install.settings.mirrorsReachable"); + default: + return t("install.settings.checkingMirrors"); + } + }); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createBlock(unref(script$a), { + header: _ctx.$t("install.settings.mirrorSettings"), + toggleable: "", + collapsed: !showMirrorInputs.value, + "pt:root": "bg-neutral-800 border-none w-[600px]" + }, { + icons: withCtx(() => [ + withDirectives(createBaseVNode("i", { + class: normalizeClass({ + "pi pi-spin pi-spinner text-neutral-400": validationState.value === unref(ValidationState).LOADING, + "pi pi-check text-green-500": validationState.value === unref(ValidationState).VALID, + "pi pi-times text-red-500": validationState.value === unref(ValidationState).INVALID + }) + }, null, 2), [ + [_directive_tooltip, validationStateTooltip.value] + ]) + ]), + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList(mirrors.value, ([item, modelValue], index) => { + return openBlock(), createElementBlock(Fragment, { + key: item.settingId + item.mirror + }, [ + index > 0 ? (openBlock(), createBlock(unref(script$1), { key: 0 })) : createCommentVNode("", true), + createVNode(_sfc_main$2, { + item, + modelValue: modelValue.value, + "onUpdate:modelValue": /* @__PURE__ */ __name(($event) => modelValue.value = $event, "onUpdate:modelValue"), + onStateChange: /* @__PURE__ */ __name(($event) => validationStates.value[index] = $event, "onStateChange") + }, null, 8, ["item", "modelValue", "onUpdate:modelValue", "onStateChange"]) + ], 64); + }), 128)) + ]), + _: 1 + }, 8, ["header", "collapsed"]); + }; + } +}); +const _hoisted_1 = { class: "flex pt-6 justify-end" }; +const _hoisted_2 = { class: "flex pt-6 justify-between" }; +const _hoisted_3 = { class: "flex pt-6 justify-between" }; +const _hoisted_4 = { class: "flex mt-6 justify-between" }; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "InstallView", + setup(__props) { + const device = ref(null); + const installPath = ref(""); + const pathError = ref(""); + const migrationSourcePath = ref(""); + const migrationItemIds = ref([]); + const autoUpdate = ref(true); + const allowMetrics = ref(true); + const pythonMirror = ref(""); + const pypiMirror = ref(""); + const torchMirror = ref(""); + const highestStep = ref(0); + const handleStepChange = /* @__PURE__ */ __name((value) => { + setHighestStep(value); + electronAPI().Events.trackEvent("install_stepper_change", { + step: value + }); + }, "handleStepChange"); + const setHighestStep = /* @__PURE__ */ __name((value) => { + const int = typeof value === "number" ? value : parseInt(value, 10); + if (!isNaN(int) && int > highestStep.value) highestStep.value = int; + }, "setHighestStep"); + const hasError = computed(() => pathError.value !== ""); + const noGpu = computed(() => typeof device.value !== "string"); + const electron = electronAPI(); + const router = useRouter(); + const install = /* @__PURE__ */ __name(() => { + const options = { + installPath: installPath.value, + autoUpdate: autoUpdate.value, + allowMetrics: allowMetrics.value, + migrationSourcePath: migrationSourcePath.value, + migrationItemIds: toRaw(migrationItemIds.value), + pythonMirror: pythonMirror.value, + pypiMirror: pypiMirror.value, + torchMirror: torchMirror.value, + device: device.value + }; + electron.installComfyUI(options); + const nextPage = options.device === "unsupported" ? "/manual-configuration" : "/server-start"; + router.push(nextPage); + }, "install"); + onMounted(async () => { + if (!electron) return; + const detectedGpu = await electron.Config.getDetectedGpu(); + if (detectedGpu === "mps" || detectedGpu === "nvidia") { + device.value = detectedGpu; + } + electronAPI().Events.trackEvent("install_stepper_change", { + step: "0", + gpu: detectedGpu + }); + }); + return (_ctx, _cache) => { + return openBlock(), createBlock(_sfc_main$8, { dark: "" }, { + default: withCtx(() => [ + createVNode(unref(script$f), { + class: "h-full p-8 2xl:p-16", + value: "0", + "onUpdate:value": handleStepChange + }, { + default: withCtx(() => [ + createVNode(unref(script$b), { class: "select-none" }, { + default: withCtx(() => [ + createVNode(unref(script$c), { value: "0" }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.gpu")), 1) + ]), + _: 1 + }), + createVNode(unref(script$c), { + value: "1", + disabled: noGpu.value + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.installLocation")), 1) + ]), + _: 1 + }, 8, ["disabled"]), + createVNode(unref(script$c), { + value: "2", + disabled: noGpu.value || hasError.value || highestStep.value < 1 + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.migration")), 1) + ]), + _: 1 + }, 8, ["disabled"]), + createVNode(unref(script$c), { + value: "3", + disabled: noGpu.value || hasError.value || highestStep.value < 2 + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.desktopSettings")), 1) + ]), + _: 1 + }, 8, ["disabled"]) + ]), + _: 1 + }), + createVNode(unref(script$d), null, { + default: withCtx(() => [ + createVNode(unref(script$e), { value: "0" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(GpuPicker, { + device: device.value, + "onUpdate:device": _cache[0] || (_cache[0] = ($event) => device.value = $event) + }, null, 8, ["device"]), + createBaseVNode("div", _hoisted_1, [ + createVNode(unref(script$7), { + label: _ctx.$t("g.next"), + icon: "pi pi-arrow-right", + iconPos: "right", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick"), + disabled: typeof device.value !== "string" + }, null, 8, ["label", "onClick", "disabled"]) + ]) + ]), + _: 1 + }), + createVNode(unref(script$e), { value: "1" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(_sfc_main$4, { + installPath: installPath.value, + "onUpdate:installPath": _cache[1] || (_cache[1] = ($event) => installPath.value = $event), + pathError: pathError.value, + "onUpdate:pathError": _cache[2] || (_cache[2] = ($event) => pathError.value = $event) + }, null, 8, ["installPath", "pathError"]), + createBaseVNode("div", _hoisted_2, [ + createVNode(unref(script$7), { + label: _ctx.$t("g.back"), + severity: "secondary", + icon: "pi pi-arrow-left", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("0"), "onClick") + }, null, 8, ["label", "onClick"]), + createVNode(unref(script$7), { + label: _ctx.$t("g.next"), + icon: "pi pi-arrow-right", + iconPos: "right", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick"), + disabled: pathError.value !== "" + }, null, 8, ["label", "onClick", "disabled"]) + ]) + ]), + _: 1 + }), + createVNode(unref(script$e), { value: "2" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(_sfc_main$3, { + sourcePath: migrationSourcePath.value, + "onUpdate:sourcePath": _cache[3] || (_cache[3] = ($event) => migrationSourcePath.value = $event), + migrationItemIds: migrationItemIds.value, + "onUpdate:migrationItemIds": _cache[4] || (_cache[4] = ($event) => migrationItemIds.value = $event) + }, null, 8, ["sourcePath", "migrationItemIds"]), + createBaseVNode("div", _hoisted_3, [ + createVNode(unref(script$7), { + label: _ctx.$t("g.back"), + severity: "secondary", + icon: "pi pi-arrow-left", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick") + }, null, 8, ["label", "onClick"]), + createVNode(unref(script$7), { + label: _ctx.$t("g.next"), + icon: "pi pi-arrow-right", + iconPos: "right", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("3"), "onClick") + }, null, 8, ["label", "onClick"]) + ]) + ]), + _: 1 + }), + createVNode(unref(script$e), { value: "3" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(_sfc_main$6, { + autoUpdate: autoUpdate.value, + "onUpdate:autoUpdate": _cache[5] || (_cache[5] = ($event) => autoUpdate.value = $event), + allowMetrics: allowMetrics.value, + "onUpdate:allowMetrics": _cache[6] || (_cache[6] = ($event) => allowMetrics.value = $event) + }, null, 8, ["autoUpdate", "allowMetrics"]), + createVNode(_sfc_main$1, { + device: device.value, + pythonMirror: pythonMirror.value, + "onUpdate:pythonMirror": _cache[7] || (_cache[7] = ($event) => pythonMirror.value = $event), + pypiMirror: pypiMirror.value, + "onUpdate:pypiMirror": _cache[8] || (_cache[8] = ($event) => pypiMirror.value = $event), + torchMirror: torchMirror.value, + "onUpdate:torchMirror": _cache[9] || (_cache[9] = ($event) => torchMirror.value = $event), + class: "mt-6" + }, null, 8, ["device", "pythonMirror", "pypiMirror", "torchMirror"]), + createBaseVNode("div", _hoisted_4, [ + createVNode(unref(script$7), { + label: _ctx.$t("g.back"), + severity: "secondary", + icon: "pi pi-arrow-left", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick") + }, null, 8, ["label", "onClick"]), + createVNode(unref(script$7), { + label: _ctx.$t("g.install"), + icon: "pi pi-check", + iconPos: "right", + disabled: hasError.value, + onClick: _cache[10] || (_cache[10] = ($event) => install()) + }, null, 8, ["label", "disabled"]) + ]) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]), + _: 1 + }); + }; + } +}); +const InstallView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cd6731d2"]]); +export { + InstallView as default +}; +//# sourceMappingURL=InstallView-C6tMsokB.js.map diff --git a/web/assets/InstallView-CxhfFC8Y.css b/web/assets/InstallView-DbJ2cGfL.css similarity index 93% rename from web/assets/InstallView-CxhfFC8Y.css rename to web/assets/InstallView-DbJ2cGfL.css index a406c869..5bbebb80 100644 --- a/web/assets/InstallView-CxhfFC8Y.css +++ b/web/assets/InstallView-DbJ2cGfL.css @@ -2,11 +2,13 @@ .p-tag[data-v-79125ff6] { --p-tag-gap: 0.5rem; } -.hover-brighten[data-v-79125ff6] { +.hover-brighten { +&[data-v-79125ff6] { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; transition-property: filter, box-shadow; + } &[data-v-79125ff6]:hover { filter: brightness(107%) contrast(105%); box-shadow: 0 0 0.25rem #ffffff79; @@ -20,7 +22,7 @@ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } -div.selected[data-v-79125ff6] { +div.selected { .gpu-button[data-v-79125ff6]:not(.selected) { opacity: 0.5; } @@ -46,7 +48,7 @@ div.selected[data-v-79125ff6] { .gpu-button[data-v-79125ff6]:hover { --tw-bg-opacity: 0.75; } -.gpu-button[data-v-79125ff6] { +.gpu-button { &.selected[data-v-79125ff6] { --tw-bg-opacity: 1; background-color: rgb(64 64 64 / var(--tw-bg-opacity)); @@ -74,6 +76,6 @@ div.selected[data-v-79125ff6] { text-align: center; } -[data-v-0a97b0ae] .p-steppanel { +[data-v-cd6731d2] .p-steppanel { background-color: transparent } diff --git a/web/assets/KeybindingPanel-D6O16W_1.js b/web/assets/KeybindingPanel-BbfXtVg1.js similarity index 91% rename from web/assets/KeybindingPanel-D6O16W_1.js rename to web/assets/KeybindingPanel-BbfXtVg1.js index b0fbfd84..1cff9493 100644 --- a/web/assets/KeybindingPanel-D6O16W_1.js +++ b/web/assets/KeybindingPanel-BbfXtVg1.js @@ -1,9 +1,9 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, c as computed, o as openBlock, f as createElementBlock, H as Fragment, I as renderList, k as createVNode, P as withCtx, aG as createTextVNode, Z as toDisplayString, j as unref, aK as script, L as createCommentVNode, ad as ref, cu as FilterMatchMode, a$ as useKeybindingStore, a4 as useCommandStore, a3 as useI18n, ah as normalizeI18nKey, w as watchEffect, bz as useToast, r as resolveDirective, J as createBlock, cv as SearchBox, m as createBaseVNode, l as script$2, ax as script$4, b3 as withModifiers, c6 as script$5, aP as script$6, i as withDirectives, cw as _sfc_main$2, p as pushScopeId, q as popScopeId, cx as KeyComboImpl, cy as KeybindingImpl, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { s as script$1, a as script$3 } from "./index-DpF-ptbJ.js"; -import { u as useKeybindingService } from "./keybindingService-Cak1En5n.js"; -import "./index-Q1cQr26V.js"; +import { d as defineComponent, c as computed, o as openBlock, f as createElementBlock, F as Fragment, D as renderList, k as createVNode, z as withCtx, a7 as createTextVNode, E as toDisplayString, j as unref, a4 as script, B as createCommentVNode, U as ref, dl as FilterMatchMode, an as useKeybindingStore, L as useCommandStore, K as useI18n, Y as normalizeI18nKey, w as watchEffect, aR as useToast, r as resolveDirective, y as createBlock, dm as SearchBox, m as createBaseVNode, l as script$2, bg as script$4, ar as withModifiers, bj as script$5, ab as script$6, i as withDirectives, dn as _sfc_main$2, dp as KeyComboImpl, dq as KeybindingImpl, _ as _export_sfc } from "./index-CmVtQCAR.js"; +import { g as script$1, h as script$3 } from "./index-CdHVC5qq.js"; +import { u as useKeybindingService } from "./keybindingService-CqSjCYw-.js"; +import "./index-I0brO37W.js"; const _hoisted_1$1 = { key: 0, class: "px-2" @@ -36,7 +36,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ }; } }); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-2554ab36"), n = n(), popScopeId(), n), "_withScopeId"); const _hoisted_1 = { class: "actions invisible flex flex-row" }; const _hoisted_2 = ["title"]; const _hoisted_3 = { key: 1 }; @@ -247,7 +246,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ severity: "error" }, { default: withCtx(() => [ - createTextVNode(" Keybinding already exists on "), + _cache[3] || (_cache[3] = createTextVNode(" Keybinding already exists on ")), createVNode(unref(script), { severity: "secondary", value: existingKeybindingOnCombo.value.commandId @@ -280,4 +279,4 @@ const KeybindingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "d export { KeybindingPanel as default }; -//# sourceMappingURL=KeybindingPanel-D6O16W_1.js.map +//# sourceMappingURL=KeybindingPanel-BbfXtVg1.js.map diff --git a/web/assets/MaintenanceView-Bj5_Vr6o.css b/web/assets/MaintenanceView-Bj5_Vr6o.css new file mode 100644 index 00000000..22e37c41 --- /dev/null +++ b/web/assets/MaintenanceView-Bj5_Vr6o.css @@ -0,0 +1,87 @@ + +.task-card-ok[data-v-c3bd7658] { + + position: absolute; + + right: -1rem; + + bottom: -1rem; + + grid-column: 1 / -1; + + grid-row: 1 / -1; + + --tw-text-opacity: 1; + + color: rgb(150 206 76 / var(--tw-text-opacity)); + + opacity: 1; + + transition-property: opacity; + + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + + transition-duration: 150ms; + + font-size: 4rem; + text-shadow: 0.25rem 0 0.5rem black; + z-index: 10; +} +.p-card { +&[data-v-c3bd7658] { + + transition-property: opacity; + + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + + transition-duration: 150ms; + + --p-card-background: var(--p-button-secondary-background); + opacity: 0.9; + } +&.opacity-65[data-v-c3bd7658] { + opacity: 0.4; +} +&[data-v-c3bd7658]:hover { + opacity: 1; +} +} +[data-v-c3bd7658] .p-card-header { + z-index: 0; +} +[data-v-c3bd7658] .p-card-body { + z-index: 1; + flex-grow: 1; + justify-content: space-between; +} +.task-div { +> i[data-v-c3bd7658] { + pointer-events: none; +} +&:hover > i[data-v-c3bd7658] { + opacity: 0.2; +} +} + +[data-v-74b78f7d] .p-tag { + --p-tag-gap: 0.375rem; +} +.backspan[data-v-74b78f7d]::before { + position: absolute; + margin: 0px; + color: var(--p-text-muted-color); + font-family: 'primeicons'; + top: -2rem; + right: -2rem; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + display: inline-block; + -webkit-font-smoothing: antialiased; + opacity: 0.02; + font-size: min(14rem, 90vw); + z-index: 0; +} diff --git a/web/assets/MaintenanceView-D3drnrFc.js b/web/assets/MaintenanceView-D3drnrFc.js new file mode 100644 index 00000000..e54bc027 --- /dev/null +++ b/web/assets/MaintenanceView-D3drnrFc.js @@ -0,0 +1,26033 @@ +var __defProp = Object.defineProperty; +var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true }); +import { bA as BaseStyle, bB as script$1d, bC as ZIndex, bD as addClass, bE as focus, bF as blockBodyScroll, bG as unblockBodyScroll, bH as FocusTrap, l as script$1e, bI as script$1f, bJ as script$1g, bK as resolveComponent, r as resolveDirective, o as openBlock, y as createBlock, z as withCtx, f as createElementBlock, as as mergeProps, k as createVNode, bL as Transition, i as withDirectives, A as renderSlot, F as Fragment, m as createBaseVNode, ai as normalizeClass, E as toDisplayString, B as createCommentVNode, C as resolveDynamicComponent, d as defineComponent, bs as mergeModels, bm as useModel, v as vShow, j as unref, bM as script$1h, c as computed, bN as PrimeIcons, bc as t, a4 as script$1i, aZ as inject, bO as findSingle, bP as getAttribute, bQ as script$1j, bR as script$1k, bS as Ripple, bT as UniqueComponentId, bU as script$1l, D as renderList, bV as BaseDirective, bW as removeClass, bX as createElement, bY as hasClass, bZ as script$1m, b_ as script$1n, b$ as addStyle, c0 as ConnectedOverlayScrollHandler, c1 as isTouchDevice, c2 as relativePosition, c3 as getOuterWidth, c4 as absolutePosition, c5 as find, c6 as getIndex, c7 as getFocusableElements, c8 as OverlayEventBus, c9 as setAttribute, ca as localeComparator, bg as script$1o, cb as script$1p, n as normalizeStyle, a7 as createTextVNode, bf as withKeys, cc as resolveFieldData, cd as isNotEmpty, ce as equals, cf as script$1q, cg as isString, ch as isPrintableCharacter, ci as isEmpty, cj as findLastIndex, ck as script$1r, cl as script$1s, cm as uuid, a8 as script$1t, cn as sort, co as createSlots, cp as EventBus, H as markRaw, cq as resolve, cr as Tooltip, bi as script$1v, ab as script$1w, cs as script$1x, ct as script$1y, cu as script$1z, bz as script$1A, bj as script$1B, cv as normalizeProps, cw as isAttributeEquals, cx as guardReactiveProps, cy as setCSSProperty, cz as $dt, cA as script$1D, cB as script$1F, cC as getUserAgent, bn as script$1G, cD as script$1H, cE as getFirstFocusableElement, cF as getLastFocusableElement, cG as FilterService, br as script$1J, cH as script$1K, bp as script$1L, bo as script$1M, cI as script$1N, cJ as findIndexInList, cK as scrollInView, cL as script$1O, cM as script$1P, cN as script$1Q, cO as findLast, cP as getWindowScrollTop, cQ as getWidth, cR as getOffset, cS as vModelText, cT as script$1U, ar as withModifiers, cU as getVNodeProp, cV as getNextElementSibling, cW as getPreviousElementSibling, cX as isClickable, cY as _default, cZ as clearSelection, c_ as isRTL, b5 as electronAPI, I as defineStore, U as ref, c$ as useTimeout, O as watch, d0 as script$1Y, _ as _export_sfc, aR as useToast, d1 as useConfirm, bh as script$1Z, d2 as script$1_, p as onMounted, d3 as onUnmounted, av as script$1$, af as isRef, bl as BaseTerminal } from "./index-CmVtQCAR.js"; +import { j as script$1C, k as script$1E, g as script$20 } from "./index-BWow9lpT.js"; +import { s as script$1u, a as script$1R, b as script$1S, c as script$1T, d as script$1V, e as script$1W, f as script$1X } from "./index-CdHVC5qq.js"; +import { s as script$1I } from "./index-I0brO37W.js"; +import "./index-Bm1HvJhs.js"; +import { _ as _sfc_main$7 } from "./BaseViewTemplate-Cof5Ihf_.js"; +var theme$D = /* @__PURE__ */ __name(function theme(_ref) { + var dt = _ref.dt; + return "\n.p-drawer {\n display: flex;\n flex-direction: column;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n background: ".concat(dt("drawer.background"), ";\n color: ").concat(dt("drawer.color"), ";\n border: 1px solid ").concat(dt("drawer.border.color"), ";\n box-shadow: ").concat(dt("drawer.shadow"), ";\n}\n\n.p-drawer-content {\n overflow-y: auto;\n flex-grow: 1;\n padding: ").concat(dt("drawer.content.padding"), ";\n}\n\n.p-drawer-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n padding: ").concat(dt("drawer.header.padding"), ";\n}\n\n.p-drawer-footer {\n padding: ").concat(dt("drawer.footer.padding"), ";\n}\n\n.p-drawer-title {\n font-weight: ").concat(dt("drawer.title.font.weight"), ";\n font-size: ").concat(dt("drawer.title.font.size"), ";\n}\n\n.p-drawer-full .p-drawer {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n border-width: 1px;\n}\n\n.p-drawer-left .p-drawer-enter-from,\n.p-drawer-left .p-drawer-leave-to {\n transform: translateX(-100%);\n}\n\n.p-drawer-right .p-drawer-enter-from,\n.p-drawer-right .p-drawer-leave-to {\n transform: translateX(100%);\n}\n\n.p-drawer-top .p-drawer-enter-from,\n.p-drawer-top .p-drawer-leave-to {\n transform: translateY(-100%);\n}\n\n.p-drawer-bottom .p-drawer-enter-from,\n.p-drawer-bottom .p-drawer-leave-to {\n transform: translateY(100%);\n}\n\n.p-drawer-full .p-drawer-enter-from,\n.p-drawer-full .p-drawer-leave-to {\n opacity: 0;\n}\n\n.p-drawer-full .p-drawer-enter-active,\n.p-drawer-full .p-drawer-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.p-drawer-left .p-drawer {\n width: 20rem;\n height: 100%;\n border-inline-end-width: 1px;\n}\n\n.p-drawer-right .p-drawer {\n width: 20rem;\n height: 100%;\n border-inline-start-width: 1px;\n}\n\n.p-drawer-top .p-drawer {\n height: 10rem;\n width: 100%;\n border-block-end-width: 1px;\n}\n\n.p-drawer-bottom .p-drawer {\n height: 10rem;\n width: 100%;\n border-block-start-width: 1px;\n}\n\n.p-drawer-left .p-drawer-content,\n.p-drawer-right .p-drawer-content,\n.p-drawer-top .p-drawer-content,\n.p-drawer-bottom .p-drawer-content {\n width: 100%;\n height: 100%;\n}\n\n.p-drawer-open {\n display: flex;\n}\n\n.p-drawer-mask:dir(rtl) {\n flex-direction: row-reverse;\n}\n"); +}, "theme"); +var inlineStyles$9 = { + mask: /* @__PURE__ */ __name(function mask(_ref2) { + var position = _ref2.position, modal = _ref2.modal; + return { + position: "fixed", + height: "100%", + width: "100%", + left: 0, + top: 0, + display: "flex", + justifyContent: position === "left" ? "flex-start" : position === "right" ? "flex-end" : "center", + alignItems: position === "top" ? "flex-start" : position === "bottom" ? "flex-end" : "center", + pointerEvents: modal ? "auto" : "none" + }; + }, "mask"), + root: { + pointerEvents: "auto" + } +}; +var classes$M = { + mask: /* @__PURE__ */ __name(function mask2(_ref3) { + var instance = _ref3.instance, props = _ref3.props; + var positions = ["left", "right", "top", "bottom"]; + var pos = positions.find(function(item8) { + return item8 === props.position; + }); + return ["p-drawer-mask", { + "p-overlay-mask p-overlay-mask-enter": props.modal, + "p-drawer-open": instance.containerVisible, + "p-drawer-full": instance.fullScreen + }, pos ? "p-drawer-".concat(pos) : ""]; + }, "mask"), + root: /* @__PURE__ */ __name(function root(_ref4) { + var instance = _ref4.instance; + return ["p-drawer p-component", { + "p-drawer-full": instance.fullScreen + }]; + }, "root"), + header: "p-drawer-header", + title: "p-drawer-title", + pcCloseButton: "p-drawer-close-button", + content: "p-drawer-content", + footer: "p-drawer-footer" +}; +var DrawerStyle = BaseStyle.extend({ + name: "drawer", + theme: theme$D, + classes: classes$M, + inlineStyles: inlineStyles$9 +}); +var script$1$O = { + name: "BaseDrawer", + "extends": script$1d, + props: { + visible: { + type: Boolean, + "default": false + }, + position: { + type: String, + "default": "left" + }, + header: { + type: null, + "default": null + }, + baseZIndex: { + type: Number, + "default": 0 + }, + autoZIndex: { + type: Boolean, + "default": true + }, + dismissable: { + type: Boolean, + "default": true + }, + showCloseIcon: { + type: Boolean, + "default": true + }, + closeButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default2() { + return { + severity: "secondary", + text: true, + rounded: true + }; + }, "_default") + }, + closeIcon: { + type: String, + "default": void 0 + }, + modal: { + type: Boolean, + "default": true + }, + blockScroll: { + type: Boolean, + "default": false + } + }, + style: DrawerStyle, + provide: /* @__PURE__ */ __name(function provide() { + return { + $pcDrawer: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1c = { + name: "Drawer", + "extends": script$1$O, + inheritAttrs: false, + emits: ["update:visible", "show", "after-show", "hide", "after-hide"], + data: /* @__PURE__ */ __name(function data() { + return { + containerVisible: this.visible + }; + }, "data"), + container: null, + mask: null, + content: null, + headerContainer: null, + footerContainer: null, + closeButton: null, + outsideClickListener: null, + documentKeydownListener: null, + watch: { + dismissable: /* @__PURE__ */ __name(function dismissable(newValue) { + if (newValue) { + this.enableDocumentSettings(); + } else { + this.disableDocumentSettings(); + } + }, "dismissable") + }, + updated: /* @__PURE__ */ __name(function updated() { + if (this.visible) { + this.containerVisible = this.visible; + } + }, "updated"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount() { + this.disableDocumentSettings(); + if (this.mask && this.autoZIndex) { + ZIndex.clear(this.mask); + } + this.container = null; + this.mask = null; + }, "beforeUnmount"), + methods: { + hide: /* @__PURE__ */ __name(function hide() { + this.$emit("update:visible", false); + }, "hide"), + onEnter: /* @__PURE__ */ __name(function onEnter() { + this.$emit("show"); + this.focus(); + this.bindDocumentKeyDownListener(); + if (this.autoZIndex) { + ZIndex.set("modal", this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal); + } + }, "onEnter"), + onAfterEnter: /* @__PURE__ */ __name(function onAfterEnter() { + this.enableDocumentSettings(); + this.$emit("after-show"); + }, "onAfterEnter"), + onBeforeLeave: /* @__PURE__ */ __name(function onBeforeLeave() { + if (this.modal) { + !this.isUnstyled && addClass(this.mask, "p-overlay-mask-leave"); + } + }, "onBeforeLeave"), + onLeave: /* @__PURE__ */ __name(function onLeave() { + this.$emit("hide"); + }, "onLeave"), + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave() { + if (this.autoZIndex) { + ZIndex.clear(this.mask); + } + this.unbindDocumentKeyDownListener(); + this.containerVisible = false; + this.disableDocumentSettings(); + this.$emit("after-hide"); + }, "onAfterLeave"), + onMaskClick: /* @__PURE__ */ __name(function onMaskClick(event2) { + if (this.dismissable && this.modal && this.mask === event2.target) { + this.hide(); + } + }, "onMaskClick"), + focus: /* @__PURE__ */ __name(function focus$1() { + var findFocusableElement = /* @__PURE__ */ __name(function findFocusableElement2(container) { + return container && container.querySelector("[autofocus]"); + }, "findFocusableElement"); + var focusTarget = this.$slots.header && findFocusableElement(this.headerContainer); + if (!focusTarget) { + focusTarget = this.$slots["default"] && findFocusableElement(this.container); + if (!focusTarget) { + focusTarget = this.$slots.footer && findFocusableElement(this.footerContainer); + if (!focusTarget) { + focusTarget = this.closeButton; + } + } + } + focusTarget && focus(focusTarget); + }, "focus$1"), + enableDocumentSettings: /* @__PURE__ */ __name(function enableDocumentSettings() { + if (this.dismissable && !this.modal) { + this.bindOutsideClickListener(); + } + if (this.blockScroll) { + blockBodyScroll(); + } + }, "enableDocumentSettings"), + disableDocumentSettings: /* @__PURE__ */ __name(function disableDocumentSettings() { + this.unbindOutsideClickListener(); + if (this.blockScroll) { + unblockBodyScroll(); + } + }, "disableDocumentSettings"), + onKeydown: /* @__PURE__ */ __name(function onKeydown(event2) { + if (event2.code === "Escape") { + this.hide(); + } + }, "onKeydown"), + containerRef: /* @__PURE__ */ __name(function containerRef(el) { + this.container = el; + }, "containerRef"), + maskRef: /* @__PURE__ */ __name(function maskRef(el) { + this.mask = el; + }, "maskRef"), + contentRef: /* @__PURE__ */ __name(function contentRef(el) { + this.content = el; + }, "contentRef"), + headerContainerRef: /* @__PURE__ */ __name(function headerContainerRef(el) { + this.headerContainer = el; + }, "headerContainerRef"), + footerContainerRef: /* @__PURE__ */ __name(function footerContainerRef(el) { + this.footerContainer = el; + }, "footerContainerRef"), + closeButtonRef: /* @__PURE__ */ __name(function closeButtonRef(el) { + this.closeButton = el ? el.$el : void 0; + }, "closeButtonRef"), + bindDocumentKeyDownListener: /* @__PURE__ */ __name(function bindDocumentKeyDownListener() { + if (!this.documentKeydownListener) { + this.documentKeydownListener = this.onKeydown; + document.addEventListener("keydown", this.documentKeydownListener); + } + }, "bindDocumentKeyDownListener"), + unbindDocumentKeyDownListener: /* @__PURE__ */ __name(function unbindDocumentKeyDownListener() { + if (this.documentKeydownListener) { + document.removeEventListener("keydown", this.documentKeydownListener); + this.documentKeydownListener = null; + } + }, "unbindDocumentKeyDownListener"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener() { + var _this = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + if (_this.isOutsideClicked(event2)) { + _this.hide(); + } + }; + document.addEventListener("click", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener() { + if (this.outsideClickListener) { + document.removeEventListener("click", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked(event2) { + return this.container && !this.container.contains(event2.target); + }, "isOutsideClicked") + }, + computed: { + fullScreen: /* @__PURE__ */ __name(function fullScreen() { + return this.position === "full"; + }, "fullScreen"), + closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; + }, "closeAriaLabel") + }, + directives: { + focustrap: FocusTrap + }, + components: { + Button: script$1e, + Portal: script$1f, + TimesIcon: script$1g + } +}; +var _hoisted_1$v = ["aria-modal"]; +function render$13(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Button = resolveComponent("Button"); + var _component_Portal = resolveComponent("Portal"); + var _directive_focustrap = resolveDirective("focustrap"); + return openBlock(), createBlock(_component_Portal, null, { + "default": withCtx(function() { + return [$data.containerVisible ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.maskRef, + onMousedown: _cache[0] || (_cache[0] = function() { + return $options.onMaskClick && $options.onMaskClick.apply($options, arguments); + }), + "class": _ctx.cx("mask"), + style: _ctx.sx("mask", true, { + position: _ctx.position, + modal: _ctx.modal + }) + }, _ctx.ptm("mask")), [createVNode(Transition, mergeProps({ + name: "p-drawer", + onEnter: $options.onEnter, + onAfterEnter: $options.onAfterEnter, + onBeforeLeave: $options.onBeforeLeave, + onLeave: $options.onLeave, + onAfterLeave: $options.onAfterLeave, + appear: "" + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [_ctx.visible ? withDirectives((openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.containerRef, + "class": _ctx.cx("root"), + style: _ctx.sx("root"), + role: "complementary", + "aria-modal": _ctx.modal + }, _ctx.ptmi("root")), [_ctx.$slots.container ? renderSlot(_ctx.$slots, "container", { + key: 0, + closeCallback: $options.hide + }) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [createBaseVNode("div", mergeProps({ + ref: $options.headerContainerRef, + "class": _ctx.cx("header") + }, _ctx.ptm("header")), [renderSlot(_ctx.$slots, "header", { + "class": normalizeClass(_ctx.cx("title")) + }, function() { + return [_ctx.header ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("title") + }, _ctx.ptm("title")), toDisplayString(_ctx.header), 17)) : createCommentVNode("", true)]; + }), _ctx.showCloseIcon ? (openBlock(), createBlock(_component_Button, mergeProps({ + key: 0, + ref: $options.closeButtonRef, + type: "button", + "class": _ctx.cx("pcCloseButton"), + "aria-label": $options.closeAriaLabel, + unstyled: _ctx.unstyled, + onClick: $options.hide + }, _ctx.closeButtonProps, { + pt: _ctx.ptm("pcCloseButton"), + "data-pc-group-section": "iconcontainer" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "closeicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon ? "span" : "TimesIcon"), mergeProps({ + "class": [_ctx.closeIcon, slotProps["class"]] + }, _ctx.ptm("pcCloseButton")["icon"]), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "unstyled", "onClick", "pt"])) : createCommentVNode("", true)], 16), createBaseVNode("div", mergeProps({ + ref: $options.contentRef, + "class": _ctx.cx("content") + }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.footerContainerRef, + "class": _ctx.cx("footer") + }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 64))], 16, _hoisted_1$v)), [[_directive_focustrap]]) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])], 16)) : createCommentVNode("", true)]; + }), + _: 3 + }); +} +__name(render$13, "render$13"); +script$1c.render = render$13; +const _sfc_main$6 = /* @__PURE__ */ defineComponent({ + __name: "RefreshButton", + props: /* @__PURE__ */ mergeModels({ + outlined: { type: Boolean, default: true }, + disabled: { type: Boolean }, + severity: { default: "secondary" } + }, { + "modelValue": { type: Boolean, ...{ required: true } }, + "modelModifiers": {} + }), + emits: /* @__PURE__ */ mergeModels(["refresh"], ["update:modelValue"]), + setup(__props) { + const props = __props; + const active3 = useModel(__props, "modelValue"); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script$1e), { + class: "relative p-button-icon-only", + outlined: props.outlined, + severity: props.severity, + disabled: active3.value || props.disabled, + onClick: _cache[0] || (_cache[0] = (event2) => _ctx.$emit("refresh", event2)) + }, { + default: withCtx(() => [ + createBaseVNode("span", { + class: normalizeClass(["p-button-icon pi pi-refresh transition-all", { "opacity-0": active3.value }]), + "data-pc-section": "icon" + }, null, 2), + _cache[1] || (_cache[1] = createBaseVNode("span", { + class: "p-button-label", + "data-pc-section": "label" + }, " ", -1)), + withDirectives(createVNode(unref(script$1h), { class: "absolute w-1/2 h-1/2" }, null, 512), [ + [vShow, active3.value] + ]) + ]), + _: 1 + }, 8, ["outlined", "severity", "disabled"]); + }; + } +}); +const _sfc_main$5 = /* @__PURE__ */ defineComponent({ + __name: "StatusTag", + props: { + error: { type: Boolean }, + refreshing: { type: Boolean } + }, + setup(__props) { + const props = __props; + const icon2 = computed(() => { + if (props.refreshing) return PrimeIcons.QUESTION; + if (props.error) return PrimeIcons.TIMES; + return PrimeIcons.CHECK; + }); + const severity = computed(() => { + if (props.refreshing) return "info"; + if (props.error) return "danger"; + return "success"; + }); + const value2 = computed(() => { + if (props.refreshing) return t("maintenance.refreshing"); + if (props.error) return t("g.error"); + return t("maintenance.OK"); + }); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script$1i), { + icon: icon2.value, + severity: severity.value, + value: value2.value + }, null, 8, ["icon", "severity", "value"]); + }; + } +}); +var PrimeVueDialogSymbol = Symbol(); +function useDialog() { + var PrimeVueDialog = inject(PrimeVueDialogSymbol); + if (!PrimeVueDialog) { + throw new Error("No PrimeVue Dialog provided!"); + } + return PrimeVueDialog; +} +__name(useDialog, "useDialog"); +var classes$L = { + root: "p-accordioncontent", + content: "p-accordioncontent-content" +}; +var AccordionContentStyle = BaseStyle.extend({ + name: "accordioncontent", + classes: classes$L +}); +var script$1$N = { + name: "BaseAccordionContent", + "extends": script$1d, + props: { + as: { + type: [String, Object], + "default": "DIV" + }, + asChild: { + type: Boolean, + "default": false + } + }, + style: AccordionContentStyle, + provide: /* @__PURE__ */ __name(function provide2() { + return { + $pcAccordionContent: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1b = { + name: "AccordionContent", + "extends": script$1$N, + inheritAttrs: false, + inject: ["$pcAccordion", "$pcAccordionPanel"], + computed: { + id: /* @__PURE__ */ __name(function id() { + return "".concat(this.$pcAccordion.id, "_accordioncontent_").concat(this.$pcAccordionPanel.value); + }, "id"), + ariaLabelledby: /* @__PURE__ */ __name(function ariaLabelledby() { + return "".concat(this.$pcAccordion.id, "_accordionheader_").concat(this.$pcAccordionPanel.value); + }, "ariaLabelledby"), + attrs: /* @__PURE__ */ __name(function attrs() { + return mergeProps(this.a11yAttrs, this.ptmi("root", this.ptParams)); + }, "attrs"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs() { + return { + id: this.id, + role: "region", + "aria-labelledby": this.ariaLabelledby, + "data-pc-name": "accordioncontent", + "data-p-active": this.$pcAccordionPanel.active + }; + }, "a11yAttrs"), + ptParams: /* @__PURE__ */ __name(function ptParams() { + return { + context: { + active: this.$pcAccordionPanel.active + } + }; + }, "ptParams") + } +}; +function render$12(_ctx, _cache, $props, $setup, $data, $options) { + return !_ctx.asChild ? (openBlock(), createBlock(Transition, mergeProps({ + key: 0, + name: "p-toggleable-content" + }, _ctx.ptm("transition", $options.ptParams)), { + "default": withCtx(function() { + return [($options.$pcAccordion.lazy ? $options.$pcAccordionPanel.active : true) ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + "class": _ctx.cx("root") + }, $options.attrs), { + "default": withCtx(function() { + return [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("content") + }, _ctx.ptm("content", $options.ptParams)), [renderSlot(_ctx.$slots, "default")], 16)]; + }), + _: 3 + }, 16, ["class"])), [[vShow, $options.$pcAccordion.lazy ? true : $options.$pcAccordionPanel.active]]) : createCommentVNode("", true)]; + }), + _: 3 + }, 16)) : renderSlot(_ctx.$slots, "default", { + key: 1, + "class": normalizeClass(_ctx.cx("root")), + active: $options.$pcAccordionPanel.active, + a11yAttrs: $options.a11yAttrs + }); +} +__name(render$12, "render$12"); +script$1b.render = render$12; +var classes$K = { + root: "p-accordionheader", + toggleicon: "p-accordionheader-toggle-icon" +}; +var AccordionHeaderStyle = BaseStyle.extend({ + name: "accordionheader", + classes: classes$K +}); +var script$1$M = { + name: "BaseAccordionHeader", + "extends": script$1d, + props: { + as: { + type: [String, Object], + "default": "BUTTON" + }, + asChild: { + type: Boolean, + "default": false + } + }, + style: AccordionHeaderStyle, + provide: /* @__PURE__ */ __name(function provide3() { + return { + $pcAccordionHeader: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1a = { + name: "AccordionHeader", + "extends": script$1$M, + inheritAttrs: false, + inject: ["$pcAccordion", "$pcAccordionPanel"], + methods: { + onFocus: /* @__PURE__ */ __name(function onFocus() { + this.$pcAccordion.selectOnFocus && this.changeActiveValue(); + }, "onFocus"), + onClick: /* @__PURE__ */ __name(function onClick() { + this.changeActiveValue(); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown2(event2) { + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "Enter": + case "NumpadEnter": + case "Space": + this.onEnterKey(event2); + break; + } + }, "onKeydown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey(event2) { + var nextPanel = this.findNextPanel(this.findPanel(event2.currentTarget)); + nextPanel ? this.changeFocusedPanel(event2, nextPanel) : this.onHomeKey(event2); + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey(event2) { + var prevPanel = this.findPrevPanel(this.findPanel(event2.currentTarget)); + prevPanel ? this.changeFocusedPanel(event2, prevPanel) : this.onEndKey(event2); + event2.preventDefault(); + }, "onArrowUpKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey(event2) { + var firstPanel = this.findFirstPanel(); + this.changeFocusedPanel(event2, firstPanel); + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey(event2) { + var lastPanel = this.findLastPanel(); + this.changeFocusedPanel(event2, lastPanel); + event2.preventDefault(); + }, "onEndKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey(event2) { + this.changeActiveValue(); + event2.preventDefault(); + }, "onEnterKey"), + findPanel: /* @__PURE__ */ __name(function findPanel(headerElement) { + return headerElement === null || headerElement === void 0 ? void 0 : headerElement.closest('[data-pc-name="accordionpanel"]'); + }, "findPanel"), + findHeader: /* @__PURE__ */ __name(function findHeader(panelElement) { + return findSingle(panelElement, '[data-pc-name="accordionheader"]'); + }, "findHeader"), + findNextPanel: /* @__PURE__ */ __name(function findNextPanel(panelElement) { + var selfCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var element = selfCheck ? panelElement : panelElement.nextElementSibling; + return element ? getAttribute(element, "data-p-disabled") ? this.findNextPanel(element) : this.findHeader(element) : null; + }, "findNextPanel"), + findPrevPanel: /* @__PURE__ */ __name(function findPrevPanel(panelElement) { + var selfCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var element = selfCheck ? panelElement : panelElement.previousElementSibling; + return element ? getAttribute(element, "data-p-disabled") ? this.findPrevPanel(element) : this.findHeader(element) : null; + }, "findPrevPanel"), + findFirstPanel: /* @__PURE__ */ __name(function findFirstPanel() { + return this.findNextPanel(this.$pcAccordion.$el.firstElementChild, true); + }, "findFirstPanel"), + findLastPanel: /* @__PURE__ */ __name(function findLastPanel() { + return this.findPrevPanel(this.$pcAccordion.$el.lastElementChild, true); + }, "findLastPanel"), + changeActiveValue: /* @__PURE__ */ __name(function changeActiveValue() { + this.$pcAccordion.updateValue(this.$pcAccordionPanel.value); + }, "changeActiveValue"), + changeFocusedPanel: /* @__PURE__ */ __name(function changeFocusedPanel(event2, element) { + focus(this.findHeader(element)); + }, "changeFocusedPanel") + }, + computed: { + id: /* @__PURE__ */ __name(function id2() { + return "".concat(this.$pcAccordion.id, "_accordionheader_").concat(this.$pcAccordionPanel.value); + }, "id"), + ariaControls: /* @__PURE__ */ __name(function ariaControls() { + return "".concat(this.$pcAccordion.id, "_accordioncontent_").concat(this.$pcAccordionPanel.value); + }, "ariaControls"), + attrs: /* @__PURE__ */ __name(function attrs2() { + return mergeProps(this.asAttrs, this.a11yAttrs, this.ptmi("root", this.ptParams)); + }, "attrs"), + asAttrs: /* @__PURE__ */ __name(function asAttrs() { + return this.as === "BUTTON" ? { + type: "button", + disabled: this.$pcAccordionPanel.disabled + } : void 0; + }, "asAttrs"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs2() { + return { + id: this.id, + tabindex: this.$pcAccordion.tabindex, + "aria-expanded": this.$pcAccordionPanel.active, + "aria-controls": this.ariaControls, + "data-pc-name": "accordionheader", + "data-p-disabled": this.$pcAccordionPanel.disabled, + "data-p-active": this.$pcAccordionPanel.active, + onFocus: this.onFocus, + onKeydown: this.onKeydown + }; + }, "a11yAttrs"), + ptParams: /* @__PURE__ */ __name(function ptParams2() { + return { + context: { + active: this.$pcAccordionPanel.active + } + }; + }, "ptParams") + }, + components: { + ChevronUpIcon: script$1j, + ChevronDownIcon: script$1k + }, + directives: { + ripple: Ripple + } +}; +function render$11(_ctx, _cache, $props, $setup, $data, $options) { + var _directive_ripple = resolveDirective("ripple"); + return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + "class": _ctx.cx("root"), + onClick: $options.onClick + }, $options.attrs), { + "default": withCtx(function() { + return [renderSlot(_ctx.$slots, "default", { + active: $options.$pcAccordionPanel.active + }), renderSlot(_ctx.$slots, "toggleicon", { + active: $options.$pcAccordionPanel.active, + "class": normalizeClass(_ctx.cx("toggleicon")) + }, function() { + return [$options.$pcAccordionPanel.active ? (openBlock(), createBlock(resolveDynamicComponent($options.$pcAccordion.$slots.collapseicon ? $options.$pcAccordion.$slots.collapseicon : $options.$pcAccordion.collapseIcon ? "span" : "ChevronDownIcon"), mergeProps({ + key: 0, + "class": [$options.$pcAccordion.collapseIcon, _ctx.cx("toggleicon")], + "aria-hidden": "true" + }, _ctx.ptm("toggleicon", $options.ptParams)), null, 16, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent($options.$pcAccordion.$slots.expandicon ? $options.$pcAccordion.$slots.expandicon : $options.$pcAccordion.expandIcon ? "span" : "ChevronUpIcon"), mergeProps({ + key: 1, + "class": [$options.$pcAccordion.expandIcon, _ctx.cx("toggleicon")], + "aria-hidden": "true" + }, _ctx.ptm("toggleicon", $options.ptParams)), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "onClick"])), [[_directive_ripple]]) : renderSlot(_ctx.$slots, "default", { + key: 1, + "class": normalizeClass(_ctx.cx("root")), + active: $options.$pcAccordionPanel.active, + a11yAttrs: $options.a11yAttrs, + onClick: $options.onClick + }); +} +__name(render$11, "render$11"); +script$1a.render = render$11; +var classes$J = { + root: /* @__PURE__ */ __name(function root2(_ref) { + var instance = _ref.instance, props = _ref.props; + return ["p-accordionpanel", { + "p-accordionpanel-active": instance.active, + "p-disabled": props.disabled + }]; + }, "root") +}; +var AccordionPanelStyle = BaseStyle.extend({ + name: "accordionpanel", + classes: classes$J +}); +var script$1$L = { + name: "BaseAccordionPanel", + "extends": script$1d, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + disabled: { + type: Boolean, + "default": false + }, + as: { + type: [String, Object], + "default": "DIV" + }, + asChild: { + type: Boolean, + "default": false + } + }, + style: AccordionPanelStyle, + provide: /* @__PURE__ */ __name(function provide4() { + return { + $pcAccordionPanel: this, + $parentInstance: this + }; + }, "provide") +}; +var script$19 = { + name: "AccordionPanel", + "extends": script$1$L, + inheritAttrs: false, + inject: ["$pcAccordion"], + computed: { + active: /* @__PURE__ */ __name(function active() { + return this.$pcAccordion.isItemActive(this.value); + }, "active"), + attrs: /* @__PURE__ */ __name(function attrs3() { + return mergeProps(this.a11yAttrs, this.ptmi("root", this.ptParams)); + }, "attrs"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs3() { + return { + "data-pc-name": "accordionpanel", + "data-p-disabled": this.disabled, + "data-p-active": this.active + }; + }, "a11yAttrs"), + ptParams: /* @__PURE__ */ __name(function ptParams3() { + return { + context: { + active: this.active + } + }; + }, "ptParams") + } +}; +function render$10(_ctx, _cache, $props, $setup, $data, $options) { + return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + "class": _ctx.cx("root") + }, $options.attrs), { + "default": withCtx(function() { + return [renderSlot(_ctx.$slots, "default")]; + }), + _: 3 + }, 16, ["class"])) : renderSlot(_ctx.$slots, "default", { + key: 1, + "class": normalizeClass(_ctx.cx("root")), + active: $options.active, + a11yAttrs: $options.a11yAttrs + }); +} +__name(render$10, "render$10"); +script$19.render = render$10; +var theme$C = /* @__PURE__ */ __name(function theme2(_ref) { + var dt = _ref.dt; + return "\n.p-accordionpanel {\n display: flex;\n flex-direction: column;\n border-style: solid;\n border-width: ".concat(dt("accordion.panel.border.width"), ";\n border-color: ").concat(dt("accordion.panel.border.color"), ";\n}\n\n.p-accordionheader {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ").concat(dt("accordion.header.padding"), ";\n color: ").concat(dt("accordion.header.color"), ";\n background: ").concat(dt("accordion.header.background"), ";\n border-style: solid;\n border-width: ").concat(dt("accordion.header.border.width"), ";\n border-color: ").concat(dt("accordion.header.border.color"), ";\n font-weight: ").concat(dt("accordion.header.font.weight"), ";\n border-radius: ").concat(dt("accordion.header.border.radius"), ";\n transition: background ").concat(dt("accordion.transition.duration"), "; color ").concat(dt("accordion.transition.duration"), "color ").concat(dt("accordion.transition.duration"), ", outline-color ").concat(dt("accordion.transition.duration"), ", box-shadow ").concat(dt("accordion.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-accordionpanel:first-child > .p-accordionheader {\n border-width: ").concat(dt("accordion.header.first.border.width"), ";\n border-start-start-radius: ").concat(dt("accordion.header.first.top.border.radius"), ";\n border-start-end-radius: ").concat(dt("accordion.header.first.top.border.radius"), ";\n}\n\n.p-accordionpanel:last-child > .p-accordionheader {\n border-end-start-radius: ").concat(dt("accordion.header.last.bottom.border.radius"), ";\n border-end-end-radius: ").concat(dt("accordion.header.last.bottom.border.radius"), ";\n}\n\n.p-accordionpanel:last-child.p-accordionpanel-active > .p-accordionheader {\n border-end-start-radius: ").concat(dt("accordion.header.last.active.bottom.border.radius"), ";\n border-end-end-radius: ").concat(dt("accordion.header.last.active.bottom.border.radius"), ";\n}\n\n.p-accordionheader-toggle-icon {\n color: ").concat(dt("accordion.header.toggle.icon.color"), ";\n}\n\n.p-accordionpanel:not(.p-disabled) .p-accordionheader:focus-visible {\n box-shadow: ").concat(dt("accordion.header.focus.ring.shadow"), ";\n outline: ").concat(dt("accordion.header.focus.ring.width"), " ").concat(dt("accordion.header.focus.ring.style"), " ").concat(dt("accordion.header.focus.ring.color"), ";\n outline-offset: ").concat(dt("accordion.header.focus.ring.offset"), ";\n}\n\n.p-accordionpanel:not(.p-accordionpanel-active):not(.p-disabled) > .p-accordionheader:hover {\n background: ").concat(dt("accordion.header.hover.background"), ";\n color: ").concat(dt("accordion.header.hover.color"), ";\n}\n\n.p-accordionpanel:not(.p-accordionpanel-active):not(.p-disabled) .p-accordionheader:hover .p-accordionheader-toggle-icon {\n color: ").concat(dt("accordion.header.toggle.icon.hover.color"), ";\n}\n\n.p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader {\n background: ").concat(dt("accordion.header.active.background"), ";\n color: ").concat(dt("accordion.header.active.color"), ";\n}\n\n.p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader .p-accordionheader-toggle-icon {\n color: ").concat(dt("accordion.header.toggle.icon.active.color"), ";\n}\n\n.p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader:hover {\n background: ").concat(dt("accordion.header.active.hover.background"), ";\n color: ").concat(dt("accordion.header.active.hover.color"), ";\n}\n\n.p-accordionpanel:not(.p-disabled).p-accordionpanel-active > .p-accordionheader:hover .p-accordionheader-toggle-icon {\n color: ").concat(dt("accordion.header.toggle.icon.active.hover.color"), ";\n}\n\n.p-accordioncontent-content {\n border-style: solid;\n border-width: ").concat(dt("accordion.content.border.width"), ";\n border-color: ").concat(dt("accordion.content.border.color"), ";\n background-color: ").concat(dt("accordion.content.background"), ";\n color: ").concat(dt("accordion.content.color"), ";\n padding: ").concat(dt("accordion.content.padding"), ";\n}\n"); +}, "theme"); +var classes$I = { + root: "p-accordion p-component" +}; +var AccordionStyle = BaseStyle.extend({ + name: "accordion", + theme: theme$C, + classes: classes$I +}); +var script$1$K = { + name: "BaseAccordion", + "extends": script$1d, + props: { + value: { + type: [String, Number, Array], + "default": void 0 + }, + multiple: { + type: Boolean, + "default": false + }, + lazy: { + type: Boolean, + "default": false + }, + tabindex: { + type: Number, + "default": 0 + }, + selectOnFocus: { + type: Boolean, + "default": false + }, + expandIcon: { + type: String, + "default": void 0 + }, + collapseIcon: { + type: String, + "default": void 0 + }, + // @deprecated since v4. + activeIndex: { + type: [Number, Array], + "default": null + } + }, + style: AccordionStyle, + provide: /* @__PURE__ */ __name(function provide5() { + return { + $pcAccordion: this, + $parentInstance: this + }; + }, "provide") +}; +var script$18 = { + name: "Accordion", + "extends": script$1$K, + inheritAttrs: false, + emits: ["update:value", "update:activeIndex", "tab-open", "tab-close", "tab-click"], + data: /* @__PURE__ */ __name(function data2() { + return { + id: this.$attrs.id, + d_value: this.value + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + value: /* @__PURE__ */ __name(function value(newValue) { + this.d_value = newValue; + }, "value"), + activeIndex: { + immediate: true, + handler: /* @__PURE__ */ __name(function handler(newValue) { + if (this.hasAccordionTab) { + this.d_value = this.multiple ? newValue === null || newValue === void 0 ? void 0 : newValue.map(String) : newValue === null || newValue === void 0 ? void 0 : newValue.toString(); + } + }, "handler") + } + }, + mounted: /* @__PURE__ */ __name(function mounted() { + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + isItemActive: /* @__PURE__ */ __name(function isItemActive(value2) { + var _this$d_value; + return this.multiple ? (_this$d_value = this.d_value) === null || _this$d_value === void 0 ? void 0 : _this$d_value.includes(value2) : this.d_value === value2; + }, "isItemActive"), + updateValue: /* @__PURE__ */ __name(function updateValue(newValue) { + var _this$d_value2; + var active3 = this.isItemActive(newValue); + if (this.multiple) { + if (active3) { + this.d_value = this.d_value.filter(function(v) { + return v !== newValue; + }); + } else { + if (this.d_value) this.d_value.push(newValue); + else this.d_value = [newValue]; + } + } else { + this.d_value = active3 ? null : newValue; + } + this.$emit("update:value", this.d_value); + this.$emit("update:activeIndex", this.multiple ? (_this$d_value2 = this.d_value) === null || _this$d_value2 === void 0 ? void 0 : _this$d_value2.map(Number) : Number(this.d_value)); + this.$emit(active3 ? "tab-close" : "tab-open", { + originalEvent: void 0, + index: Number(newValue) + }); + }, "updateValue"), + // @deprecated since v4. Use new structure instead. + isAccordionTab: /* @__PURE__ */ __name(function isAccordionTab(child) { + return child.type.name === "AccordionTab"; + }, "isAccordionTab"), + getTabProp: /* @__PURE__ */ __name(function getTabProp(tab, name4) { + return tab.props ? tab.props[name4] : void 0; + }, "getTabProp"), + getKey: /* @__PURE__ */ __name(function getKey(tab, index) { + return this.getTabProp(tab, "header") || index; + }, "getKey"), + getHeaderPT: /* @__PURE__ */ __name(function getHeaderPT(tab, index) { + var _this = this; + return { + root: mergeProps({ + onClick: /* @__PURE__ */ __name(function onClick11(event2) { + return _this.onTabClick(event2, index); + }, "onClick") + }, this.getTabProp(tab, "headerProps"), this.getTabPT(tab, "header", index)), + toggleicon: mergeProps(this.getTabProp(tab, "headeractionprops"), this.getTabPT(tab, "headeraction", index)) + }; + }, "getHeaderPT"), + getContentPT: /* @__PURE__ */ __name(function getContentPT(tab, index) { + return { + root: mergeProps(this.getTabProp(tab, "contentProps"), this.getTabPT(tab, "toggleablecontent", index)), + transition: this.getTabPT(tab, "transition", index), + content: this.getTabPT(tab, "content", index) + }; + }, "getContentPT"), + getTabPT: /* @__PURE__ */ __name(function getTabPT(tab, key, index) { + var count = this.tabs.length; + var tabMetaData = { + props: tab.props || {}, + parent: { + instance: this, + props: this.$props, + state: this.$data + }, + context: { + index, + count, + first: index === 0, + last: index === count - 1, + active: this.isItemActive("".concat(index)) + } + }; + return mergeProps(this.ptm("accordiontab.".concat(key), tabMetaData), this.ptmo(this.getTabProp(tab, "pt"), key, tabMetaData)); + }, "getTabPT"), + onTabClick: /* @__PURE__ */ __name(function onTabClick(event2, index) { + this.$emit("tab-click", { + originalEvent: event2, + index + }); + }, "onTabClick") + }, + computed: { + // @deprecated since v4. + tabs: /* @__PURE__ */ __name(function tabs() { + var _this2 = this; + return this.$slots["default"]().reduce(function(tabs2, child) { + if (_this2.isAccordionTab(child)) { + tabs2.push(child); + } else if (child.children && child.children instanceof Array) { + child.children.forEach(function(nestedChild) { + if (_this2.isAccordionTab(nestedChild)) { + tabs2.push(nestedChild); + } + }); + } + return tabs2; + }, []); + }, "tabs"), + hasAccordionTab: /* @__PURE__ */ __name(function hasAccordionTab() { + return this.tabs.length; + }, "hasAccordionTab") + }, + components: { + AccordionPanel: script$19, + AccordionHeader: script$1a, + AccordionContent: script$1b, + ChevronUpIcon: script$1j, + ChevronRightIcon: script$1l + } +}; +function render$$(_ctx, _cache, $props, $setup, $data, $options) { + var _component_AccordionHeader = resolveComponent("AccordionHeader"); + var _component_AccordionContent = resolveComponent("AccordionContent"); + var _component_AccordionPanel = resolveComponent("AccordionPanel"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [$options.hasAccordionTab ? (openBlock(true), createElementBlock(Fragment, { + key: 0 + }, renderList($options.tabs, function(tab, i) { + return openBlock(), createBlock(_component_AccordionPanel, { + key: $options.getKey(tab, i), + value: "".concat(i), + pt: { + root: $options.getTabPT(tab, "root", i) + }, + disabled: $options.getTabProp(tab, "disabled") + }, { + "default": withCtx(function() { + return [createVNode(_component_AccordionHeader, { + "class": normalizeClass($options.getTabProp(tab, "headerClass")), + pt: $options.getHeaderPT(tab, i) + }, { + toggleicon: withCtx(function(slotProps) { + return [slotProps.active ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.collapseicon ? _ctx.$slots.collapseicon : _ctx.collapseIcon ? "span" : "ChevronDownIcon"), mergeProps({ + key: 0, + "class": [_ctx.collapseIcon, slotProps["class"]], + "aria-hidden": "true", + ref_for: true + }, $options.getTabPT(tab, "headericon", i)), null, 16, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.expandicon ? _ctx.$slots.expandicon : _ctx.expandIcon ? "span" : "ChevronUpIcon"), mergeProps({ + key: 1, + "class": [_ctx.expandIcon, slotProps["class"]], + "aria-hidden": "true", + ref_for: true + }, $options.getTabPT(tab, "headericon", i)), null, 16, ["class"]))]; + }), + "default": withCtx(function() { + return [tab.children && tab.children.headericon ? (openBlock(), createBlock(resolveDynamicComponent(tab.children.headericon), { + key: 0, + isTabActive: $options.isItemActive("".concat(i)), + active: $options.isItemActive("".concat(i)), + index: i + }, null, 8, ["isTabActive", "active", "index"])) : createCommentVNode("", true), tab.props && tab.props.header ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + ref_for: true + }, $options.getTabPT(tab, "headertitle", i)), toDisplayString(tab.props.header), 17)) : createCommentVNode("", true), tab.children && tab.children.header ? (openBlock(), createBlock(resolveDynamicComponent(tab.children.header), { + key: 2 + })) : createCommentVNode("", true)]; + }), + _: 2 + }, 1032, ["class", "pt"]), createVNode(_component_AccordionContent, { + pt: $options.getContentPT(tab, i) + }, { + "default": withCtx(function() { + return [(openBlock(), createBlock(resolveDynamicComponent(tab)))]; + }), + _: 2 + }, 1032, ["pt"])]; + }), + _: 2 + }, 1032, ["value", "pt", "disabled"]); + }), 128)) : renderSlot(_ctx.$slots, "default", { + key: 1 + })], 16); +} +__name(render$$, "render$$"); +script$18.render = render$$; +var AccordionTabStyle = BaseStyle.extend({ + name: "accordiontab" +}); +var script$1$J = { + name: "BaseAccordionTab", + "extends": script$1d, + props: { + header: null, + headerStyle: null, + headerClass: null, + headerProps: null, + headerActionProps: null, + contentStyle: null, + contentClass: null, + contentProps: null, + disabled: Boolean + }, + style: AccordionTabStyle, + provide: /* @__PURE__ */ __name(function provide6() { + return { + $pcAccordionTab: this, + $parentInstance: this + }; + }, "provide") +}; +var script$17 = { + name: "AccordionTab", + "extends": script$1$J, + inheritAttrs: false, + mounted: /* @__PURE__ */ __name(function mounted2() { + console.warn("Deprecated since v4. Use the new structure of Accordion instead."); + }, "mounted") +}; +function render$_(_ctx, _cache, $props, $setup, $data, $options) { + return renderSlot(_ctx.$slots, "default"); +} +__name(render$_, "render$_"); +script$17.render = render$_; +var AnimateOnScrollStyle = BaseStyle.extend({ + name: "animateonscroll-directive" +}); +var BaseAnimateOnScroll = BaseDirective.extend({ + style: AnimateOnScrollStyle +}); +function _typeof$n(o) { + "@babel/helpers - typeof"; + return _typeof$n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$n(o); +} +__name(_typeof$n, "_typeof$n"); +function ownKeys$k(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$k, "ownKeys$k"); +function _objectSpread$k(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$k(Object(t2), true).forEach(function(r2) { + _defineProperty$l(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$k(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$k, "_objectSpread$k"); +function _defineProperty$l(e, r, t2) { + return (r = _toPropertyKey$l(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$l, "_defineProperty$l"); +function _toPropertyKey$l(t2) { + var i = _toPrimitive$l(t2, "string"); + return "symbol" == _typeof$n(i) ? i : i + ""; +} +__name(_toPropertyKey$l, "_toPropertyKey$l"); +function _toPrimitive$l(t2, r) { + if ("object" != _typeof$n(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$n(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$l, "_toPrimitive$l"); +function _slicedToArray$1(r, e) { + return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$f(r, e) || _nonIterableRest$1(); +} +__name(_slicedToArray$1, "_slicedToArray$1"); +function _nonIterableRest$1() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableRest$1, "_nonIterableRest$1"); +function _unsupportedIterableToArray$f(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$f(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$f(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$f, "_unsupportedIterableToArray$f"); +function _arrayLikeToArray$f(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$f, "_arrayLikeToArray$f"); +function _iterableToArrayLimit$1(r, l) { + var t2 = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t2) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t2 = t2.call(r)).next, 0 === l) ; + else for (; !(f = (e = i.call(t2)).done) && (a.push(e.value), a.length !== l); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t2["return"] && (u = t2["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +__name(_iterableToArrayLimit$1, "_iterableToArrayLimit$1"); +function _arrayWithHoles$1(r) { + if (Array.isArray(r)) return r; +} +__name(_arrayWithHoles$1, "_arrayWithHoles$1"); +var AnimateOnScroll = BaseAnimateOnScroll.extend("animateonscroll", { + created: /* @__PURE__ */ __name(function created() { + this.$value = this.$value || {}; + this.$el.style.opacity = this.$value.enterClass ? "0" : ""; + }, "created"), + mounted: /* @__PURE__ */ __name(function mounted3() { + this.$el.setAttribute("data-pd-animateonscroll", true); + this.bindIntersectionObserver(); + }, "mounted"), + unmounted: /* @__PURE__ */ __name(function unmounted() { + this.unbindAnimationEvents(); + this.unbindIntersectionObserver(); + }, "unmounted"), + observer: void 0, + resetObserver: void 0, + isObserverActive: false, + animationState: void 0, + animationEndListener: void 0, + methods: { + bindAnimationEvents: /* @__PURE__ */ __name(function bindAnimationEvents() { + var _this = this; + if (!this.animationEndListener) { + this.animationEndListener = function() { + removeClass(_this.$el, [_this.$value.enterClass, _this.$value.leaveClass]); + !_this.$modifiers.once && _this.resetObserver.observe(_this.$el); + _this.unbindAnimationEvents(); + }; + this.$el.addEventListener("animationend", this.animationEndListener); + } + }, "bindAnimationEvents"), + bindIntersectionObserver: /* @__PURE__ */ __name(function bindIntersectionObserver() { + var _this2 = this; + var _this$$value = this.$value, root35 = _this$$value.root, rootMargin = _this$$value.rootMargin, _this$$value$threshol = _this$$value.threshold, threshold = _this$$value$threshol === void 0 ? 0.5 : _this$$value$threshol; + var options4 = { + root: root35, + rootMargin, + threshold + }; + this.observer = new IntersectionObserver(function(_ref) { + var _ref2 = _slicedToArray$1(_ref, 1), entry = _ref2[0]; + if (_this2.isObserverActive) { + if (entry.boundingClientRect.top > 0) { + entry.isIntersecting ? _this2.enter() : _this2.leave(); + } + } else if (entry.isIntersecting) { + _this2.enter(); + } + _this2.isObserverActive = true; + }, options4); + setTimeout(function() { + return _this2.observer.observe(_this2.$el); + }, 0); + this.resetObserver = new IntersectionObserver(function(_ref3) { + var _ref4 = _slicedToArray$1(_ref3, 1), entry = _ref4[0]; + if (entry.boundingClientRect.top > 0 && !entry.isIntersecting) { + _this2.$el.style.opacity = _this2.$value.enterClass ? "0" : ""; + removeClass(_this2.$el, [_this2.$value.enterClass, _this2.$value.leaveClass]); + _this2.resetObserver.unobserve(_this2.$el); + } + _this2.animationState = void 0; + }, _objectSpread$k(_objectSpread$k({}, options4), {}, { + threshold: 0 + })); + }, "bindIntersectionObserver"), + enter: /* @__PURE__ */ __name(function enter() { + if (this.animationState !== "enter" && this.$value.enterClass) { + this.$el.style.opacity = ""; + removeClass(this.$el, this.$value.leaveClass); + addClass(this.$el, this.$value.enterClass); + this.$modifiers.once && this.unbindIntersectionObserver(this.$el); + this.bindAnimationEvents(); + this.animationState = "enter"; + } + }, "enter"), + leave: /* @__PURE__ */ __name(function leave() { + if (this.animationState !== "leave" && this.$value.leaveClass) { + this.$el.style.opacity = this.$value.enterClass ? "0" : ""; + removeClass(this.$el, this.$value.enterClass); + addClass(this.$el, this.$value.leaveClass); + this.bindAnimationEvents(); + this.animationState = "leave"; + } + }, "leave"), + unbindAnimationEvents: /* @__PURE__ */ __name(function unbindAnimationEvents() { + if (this.animationEndListener) { + this.$el.removeEventListener("animationend", this.animationEndListener); + this.animationEndListener = void 0; + } + }, "unbindAnimationEvents"), + unbindIntersectionObserver: /* @__PURE__ */ __name(function unbindIntersectionObserver() { + var _this$observer, _this$resetObserver; + (_this$observer = this.observer) === null || _this$observer === void 0 || _this$observer.unobserve(this.$el); + (_this$resetObserver = this.resetObserver) === null || _this$resetObserver === void 0 || _this$resetObserver.unobserve(this.$el); + this.isObserverActive = false; + }, "unbindIntersectionObserver") + } +}); +var theme$B = /* @__PURE__ */ __name(function theme3(_ref) { + var dt = _ref.dt; + return "\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ".concat(dt("avatar.width"), ";\n height: ").concat(dt("avatar.height"), ";\n font-size: ").concat(dt("avatar.font.size"), ";\n background: ").concat(dt("avatar.background"), ";\n color: ").concat(dt("avatar.color"), ";\n border-radius: ").concat(dt("avatar.border.radius"), ";\n}\n\n.p-avatar-image {\n background: transparent;\n}\n\n.p-avatar-circle {\n border-radius: 50%;\n}\n\n.p-avatar-circle img {\n border-radius: 50%;\n}\n\n.p-avatar-icon {\n font-size: ").concat(dt("avatar.icon.size"), ";\n width: ").concat(dt("avatar.icon.size"), ";\n height: ").concat(dt("avatar.icon.size"), ";\n}\n\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n\n.p-avatar-lg {\n width: ").concat(dt("avatar.lg.width"), ";\n height: ").concat(dt("avatar.lg.width"), ";\n font-size: ").concat(dt("avatar.lg.font.size"), ";\n}\n\n.p-avatar-lg .p-avatar-icon {\n font-size: ").concat(dt("avatar.lg.icon.size"), ";\n width: ").concat(dt("avatar.lg.icon.size"), ";\n height: ").concat(dt("avatar.lg.icon.size"), ";\n}\n\n.p-avatar-xl {\n width: ").concat(dt("avatar.xl.width"), ";\n height: ").concat(dt("avatar.xl.width"), ";\n font-size: ").concat(dt("avatar.xl.font.size"), ";\n}\n\n.p-avatar-xl .p-avatar-icon {\n font-size: ").concat(dt("avatar.xl.icon.size"), ";\n width: ").concat(dt("avatar.xl.icon.size"), ";\n height: ").concat(dt("avatar.xl.icon.size"), ";\n}\n\n.p-avatar-group {\n display: flex;\n align-items: center;\n}\n\n.p-avatar-group .p-avatar + .p-avatar {\n margin-inline-start: ").concat(dt("avatar.group.offset"), ";\n}\n\n.p-avatar-group .p-avatar {\n border: 2px solid ").concat(dt("avatar.group.border.color"), ";\n}\n\n.p-avatar-group .p-avatar-lg + .p-avatar-lg {\n margin-inline-start: ").concat(dt("avatar.lg.group.offset"), ";\n}\n\n.p-avatar-group .p-avatar-xl + .p-avatar-xl {\n margin-inline-start: ").concat(dt("avatar.xl.group.offset"), ";\n}\n"); +}, "theme"); +var classes$H = { + root: /* @__PURE__ */ __name(function root3(_ref2) { + var props = _ref2.props; + return ["p-avatar p-component", { + "p-avatar-image": props.image != null, + "p-avatar-circle": props.shape === "circle", + "p-avatar-lg": props.size === "large", + "p-avatar-xl": props.size === "xlarge" + }]; + }, "root"), + label: "p-avatar-label", + icon: "p-avatar-icon" +}; +var AvatarStyle = BaseStyle.extend({ + name: "avatar", + theme: theme$B, + classes: classes$H +}); +var script$1$I = { + name: "BaseAvatar", + "extends": script$1d, + props: { + label: { + type: String, + "default": null + }, + icon: { + type: String, + "default": null + }, + image: { + type: String, + "default": null + }, + size: { + type: String, + "default": "normal" + }, + shape: { + type: String, + "default": "square" + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: AvatarStyle, + provide: /* @__PURE__ */ __name(function provide7() { + return { + $pcAvatar: this, + $parentInstance: this + }; + }, "provide") +}; +var script$16 = { + name: "Avatar", + "extends": script$1$I, + inheritAttrs: false, + emits: ["error"], + methods: { + onError: /* @__PURE__ */ __name(function onError(event2) { + this.$emit("error", event2); + }, "onError") + } +}; +var _hoisted_1$u = ["aria-labelledby", "aria-label"]; +var _hoisted_2$m = ["src", "alt"]; +function render$Z(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default", {}, function() { + return [_ctx.label ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.cx("label") + }, _ctx.ptm("label")), toDisplayString(_ctx.label), 17)) : _ctx.$slots.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.icon), { + key: 1, + "class": normalizeClass(_ctx.cx("icon")) + }, null, 8, ["class"])) : _ctx.icon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 2, + "class": [_ctx.cx("icon"), _ctx.icon] + }, _ctx.ptm("icon")), null, 16)) : _ctx.image ? (openBlock(), createElementBlock("img", mergeProps({ + key: 3, + src: _ctx.image, + alt: _ctx.ariaLabel, + onError: _cache[0] || (_cache[0] = function() { + return $options.onError && $options.onError.apply($options, arguments); + }) + }, _ctx.ptm("image")), null, 16, _hoisted_2$m)) : createCommentVNode("", true)]; + })], 16, _hoisted_1$u); +} +__name(render$Z, "render$Z"); +script$16.render = render$Z; +var classes$G = { + root: "p-avatar-group p-component" +}; +var AvatarGroupStyle = BaseStyle.extend({ + name: "avatargroup", + classes: classes$G +}); +var script$1$H = { + name: "BaseAvatarGroup", + "extends": script$1d, + style: AvatarGroupStyle, + provide: /* @__PURE__ */ __name(function provide8() { + return { + $pcAvatarGroup: this, + $parentInstance: this + }; + }, "provide") +}; +var script$15 = { + name: "AvatarGroup", + "extends": script$1$H, + inheritAttrs: false +}; +function render$Y(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$Y, "render$Y"); +script$15.render = render$Y; +var classes$F = { + root: "p-badge p-component" +}; +var BadgeDirectiveStyle = BaseStyle.extend({ + name: "badge-directive", + classes: classes$F +}); +var BaseBadgeDirective = BaseDirective.extend({ + style: BadgeDirectiveStyle +}); +function _typeof$m(o) { + "@babel/helpers - typeof"; + return _typeof$m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$m(o); +} +__name(_typeof$m, "_typeof$m"); +function ownKeys$j(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$j, "ownKeys$j"); +function _objectSpread$j(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$j(Object(t2), true).forEach(function(r2) { + _defineProperty$k(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$j(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$j, "_objectSpread$j"); +function _defineProperty$k(e, r, t2) { + return (r = _toPropertyKey$k(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$k, "_defineProperty$k"); +function _toPropertyKey$k(t2) { + var i = _toPrimitive$k(t2, "string"); + return "symbol" == _typeof$m(i) ? i : i + ""; +} +__name(_toPropertyKey$k, "_toPropertyKey$k"); +function _toPrimitive$k(t2, r) { + if ("object" != _typeof$m(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$m(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$k, "_toPrimitive$k"); +var BadgeDirective = BaseBadgeDirective.extend("badge", { + mounted: /* @__PURE__ */ __name(function mounted4(el, binding) { + console.warn("Deprecated since v4. Use OverlayBadge component instead."); + var id4 = UniqueComponentId() + "_badge"; + var badge = createElement("span", _defineProperty$k(_defineProperty$k({ + id: id4, + "class": !this.isUnstyled() && this.cx("root") + }, this.$attrSelector, ""), "p-bind", this.ptm("root", { + context: _objectSpread$j(_objectSpread$j({}, binding.modifiers), {}, { + nogutter: String(binding.value).length === 1, + dot: binding.value == null + }) + }))); + el.$_pbadgeId = badge.getAttribute("id"); + for (var modifier in binding.modifiers) { + !this.isUnstyled() && addClass(badge, "p-badge-" + modifier); + } + if (binding.value != null) { + if (_typeof$m(binding.value) === "object") el.$_badgeValue = binding.value.value; + else el.$_badgeValue = binding.value; + badge.appendChild(document.createTextNode(el.$_badgeValue)); + if (String(el.$_badgeValue).length === 1 && !this.isUnstyled()) { + !this.isUnstyled() && addClass(badge, "p-badge-circle"); + } + } else { + !this.isUnstyled() && addClass(badge, "p-badge-dot"); + } + el.setAttribute("data-pd-badge", true); + !this.isUnstyled() && addClass(el, "p-overlay-badge"); + el.setAttribute("data-p-overlay-badge", "true"); + el.appendChild(badge); + this.$el = badge; + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated2(el, binding) { + !this.isUnstyled() && addClass(el, "p-overlay-badge"); + el.setAttribute("data-p-overlay-badge", "true"); + if (binding.oldValue !== binding.value) { + var badge = document.getElementById(el.$_pbadgeId); + if (_typeof$m(binding.value) === "object") el.$_badgeValue = binding.value.value; + else el.$_badgeValue = binding.value; + if (!this.isUnstyled()) { + if (el.$_badgeValue) { + if (hasClass(badge, "p-badge-dot")) removeClass(badge, "p-badge-dot"); + if (el.$_badgeValue.length === 1) addClass(badge, "p-badge-circle"); + else removeClass(badge, "p-badge-circle"); + } else if (!el.$_badgeValue && !hasClass(badge, "p-badge-dot")) { + addClass(badge, "p-badge-dot"); + } + } + badge.innerHTML = ""; + badge.appendChild(document.createTextNode(el.$_badgeValue)); + } + }, "updated") +}); +var theme$A = /* @__PURE__ */ __name(function theme4(_ref) { + var dt = _ref.dt; + return "\n.p-breadcrumb {\n background: ".concat(dt("breadcrumb.background"), ";\n padding: ").concat(dt("breadcrumb.padding"), ";\n overflow-x: auto;\n}\n\n.p-breadcrumb-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n gap: ").concat(dt("breadcrumb.gap"), ";\n}\n\n.p-breadcrumb-separator {\n display: flex;\n align-items: center;\n color: ").concat(dt("breadcrumb.separator.color"), ";\n}\n\n.p-breadcrumb-separator-icon:dir(rtl) {\n transform: rotate(180deg);\n}\n\n.p-breadcrumb::-webkit-scrollbar {\n display: none;\n}\n\n.p-breadcrumb-item-link {\n text-decoration: none;\n display: flex;\n align-items: center;\n gap: ").concat(dt("breadcrumb.item.gap"), ";\n transition: background ").concat(dt("breadcrumb.transition.duration"), ", color ").concat(dt("breadcrumb.transition.duration"), ", outline-color ").concat(dt("breadcrumb.transition.duration"), ", box-shadow ").concat(dt("breadcrumb.transition.duration"), ";\n border-radius: ").concat(dt("breadcrumb.item.border.radius"), ";\n outline-color: transparent;\n color: ").concat(dt("breadcrumb.item.color"), ";\n}\n\n.p-breadcrumb-item-link:focus-visible {\n box-shadow: ").concat(dt("breadcrumb.item.focus.ring.shadow"), ";\n outline: ").concat(dt("breadcrumb.item.focus.ring.width"), " ").concat(dt("breadcrumb.item.focus.ring.style"), " ").concat(dt("breadcrumb.item.focus.ring.color"), ";\n outline-offset: ").concat(dt("breadcrumb.item.focus.ring.offset"), ";\n}\n\n.p-breadcrumb-item-link:hover .p-breadcrumb-item-label {\n color: ").concat(dt("breadcrumb.item.hover.color"), ";\n}\n\n.p-breadcrumb-item-label {\n transition: inherit;\n}\n\n.p-breadcrumb-item-icon {\n color: ").concat(dt("breadcrumb.item.icon.color"), ";\n transition: inherit;\n}\n\n.p-breadcrumb-item-link:hover .p-breadcrumb-item-icon {\n color: ").concat(dt("breadcrumb.item.icon.hover.color"), ";\n}\n"); +}, "theme"); +var classes$E = { + root: "p-breadcrumb p-component", + list: "p-breadcrumb-list", + homeItem: "p-breadcrumb-home-item", + separator: "p-breadcrumb-separator", + separatorIcon: "p-breadcrumb-separator-icon", + item: /* @__PURE__ */ __name(function item(_ref2) { + var instance = _ref2.instance; + return ["p-breadcrumb-item", { + "p-disabled": instance.disabled() + }]; + }, "item"), + itemLink: "p-breadcrumb-item-link", + itemIcon: "p-breadcrumb-item-icon", + itemLabel: "p-breadcrumb-item-label" +}; +var BreadcrumbStyle = BaseStyle.extend({ + name: "breadcrumb", + theme: theme$A, + classes: classes$E +}); +var script$2$9 = { + name: "BaseBreadcrumb", + "extends": script$1d, + props: { + model: { + type: Array, + "default": null + }, + home: { + type: null, + "default": null + } + }, + style: BreadcrumbStyle, + provide: /* @__PURE__ */ __name(function provide9() { + return { + $pcBreadcrumb: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$G = { + name: "BreadcrumbItem", + hostName: "Breadcrumb", + "extends": script$1d, + props: { + item: null, + templates: null, + index: null + }, + methods: { + onClick: /* @__PURE__ */ __name(function onClick2(event2) { + if (this.item.command) { + this.item.command({ + originalEvent: event2, + item: this.item + }); + } + }, "onClick"), + visible: /* @__PURE__ */ __name(function visible() { + return typeof this.item.visible === "function" ? this.item.visible() : this.item.visible !== false; + }, "visible"), + disabled: /* @__PURE__ */ __name(function disabled() { + return typeof this.item.disabled === "function" ? this.item.disabled() : this.item.disabled; + }, "disabled"), + label: /* @__PURE__ */ __name(function label() { + return typeof this.item.label === "function" ? this.item.label() : this.item.label; + }, "label"), + isCurrentUrl: /* @__PURE__ */ __name(function isCurrentUrl() { + var _this$item = this.item, to = _this$item.to, url = _this$item.url; + var lastPath = typeof window !== "undefined" ? window.location.pathname : ""; + return to === lastPath || url === lastPath ? "page" : void 0; + }, "isCurrentUrl") + }, + computed: { + ptmOptions: /* @__PURE__ */ __name(function ptmOptions() { + return { + context: { + item: this.item, + index: this.index + } + }; + }, "ptmOptions"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps() { + var _this = this; + return { + action: mergeProps({ + "class": this.cx("itemLink"), + "aria-current": this.isCurrentUrl(), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return _this.onClick($event); + }, "onClick") + }, this.ptm("itemLink", this.ptmOptions)), + icon: mergeProps({ + "class": [this.cx("icon"), this.item.icon] + }, this.ptm("icon", this.ptmOptions)), + label: mergeProps({ + "class": this.cx("label") + }, this.ptm("label", this.ptmOptions)) + }; + }, "getMenuItemProps") + } +}; +var _hoisted_1$t = ["href", "target", "aria-current"]; +function render$1$9(_ctx, _cache, $props, $setup, $data, $options) { + return $options.visible() ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + "class": [_ctx.cx("item"), $props.item["class"]] + }, _ctx.ptm("item", $options.ptmOptions)), [!$props.templates.item ? (openBlock(), createElementBlock("a", mergeProps({ + key: 0, + href: $props.item.url || "#", + "class": _ctx.cx("itemLink"), + target: $props.item.target, + "aria-current": $options.isCurrentUrl(), + onClick: _cache[0] || (_cache[0] = function() { + return $options.onClick && $options.onClick.apply($options, arguments); + }) + }, _ctx.ptm("itemLink", $options.ptmOptions)), [$props.templates && $props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), { + key: 0, + item: $props.item, + "class": normalizeClass(_ctx.cx("itemIcon", $options.ptmOptions)) + }, null, 8, ["item", "class"])) : $props.item.icon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": [_ctx.cx("itemIcon"), $props.item.icon] + }, _ctx.ptm("itemIcon", $options.ptmOptions)), null, 16)) : createCommentVNode("", true), $props.item.label ? (openBlock(), createElementBlock("span", mergeProps({ + key: 2, + "class": _ctx.cx("itemLabel") + }, _ctx.ptm("itemLabel", $options.ptmOptions)), toDisplayString($options.label()), 17)) : createCommentVNode("", true)], 16, _hoisted_1$t)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + key: 1, + item: $props.item, + label: $options.label(), + props: $options.getMenuItemProps + }, null, 8, ["item", "label", "props"]))], 16)) : createCommentVNode("", true); +} +__name(render$1$9, "render$1$9"); +script$1$G.render = render$1$9; +var script$14 = { + name: "Breadcrumb", + "extends": script$2$9, + inheritAttrs: false, + components: { + BreadcrumbItem: script$1$G, + ChevronRightIcon: script$1l + } +}; +function render$X(_ctx, _cache, $props, $setup, $data, $options) { + var _component_BreadcrumbItem = resolveComponent("BreadcrumbItem"); + var _component_ChevronRightIcon = resolveComponent("ChevronRightIcon"); + return openBlock(), createElementBlock("nav", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("ol", mergeProps({ + "class": _ctx.cx("list") + }, _ctx.ptm("list")), [_ctx.home ? (openBlock(), createBlock(_component_BreadcrumbItem, mergeProps({ + key: 0, + item: _ctx.home, + "class": _ctx.cx("homeItem"), + templates: _ctx.$slots, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, _ctx.ptm("homeItem")), null, 16, ["item", "class", "templates", "pt", "unstyled"])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function(item8, i) { + return openBlock(), createElementBlock(Fragment, { + key: item8.label + "_" + i + }, [_ctx.home || i !== 0 ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + "class": _ctx.cx("separator"), + ref_for: true + }, _ctx.ptm("separator")), [renderSlot(_ctx.$slots, "separator", {}, function() { + return [createVNode(_component_ChevronRightIcon, mergeProps({ + "aria-hidden": "true", + "class": _ctx.cx("separatorIcon"), + ref_for: true + }, _ctx.ptm("separatorIcon")), null, 16, ["class"])]; + })], 16)) : createCommentVNode("", true), createVNode(_component_BreadcrumbItem, { + item: item8, + index: i, + templates: _ctx.$slots, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["item", "index", "templates", "pt", "unstyled"])], 64); + }), 128))], 16)], 16); +} +__name(render$X, "render$X"); +script$14.render = render$X; +var script$13 = { + name: "CalendarIcon", + "extends": script$1m +}; +function render$W(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$W, "render$W"); +script$13.render = render$W; +var theme$z = /* @__PURE__ */ __name(function theme5(_ref) { + var dt = _ref.dt; + return "\n.p-datepicker {\n display: inline-flex;\n max-width: 100%;\n}\n\n.p-datepicker-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-input {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-datepicker-dropdown {\n cursor: pointer;\n display: inline-flex;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ".concat(dt("datepicker.dropdown.width"), ";\n border-start-end-radius: ").concat(dt("datepicker.dropdown.border.radius"), ";\n border-end-end-radius: ").concat(dt("datepicker.dropdown.border.radius"), ";\n background: ").concat(dt("datepicker.dropdown.background"), ";\n border: 1px solid ").concat(dt("datepicker.dropdown.border.color"), ";\n border-inline-start: 0 none;\n color: ").concat(dt("datepicker.dropdown.color"), ";\n transition: background ").concat(dt("datepicker.transition.duration"), ", color ").concat(dt("datepicker.transition.duration"), ", border-color ").concat(dt("datepicker.transition.duration"), ", outline-color ").concat(dt("datepicker.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-datepicker-dropdown:not(:disabled):hover {\n background: ").concat(dt("datepicker.dropdown.hover.background"), ";\n border-color: ").concat(dt("datepicker.dropdown.hover.border.color"), ";\n color: ").concat(dt("datepicker.dropdown.hover.color"), ";\n}\n\n.p-datepicker-dropdown:not(:disabled):active {\n background: ").concat(dt("datepicker.dropdown.active.background"), ";\n border-color: ").concat(dt("datepicker.dropdown.active.border.color"), ";\n color: ").concat(dt("datepicker.dropdown.active.color"), ";\n}\n\n.p-datepicker-dropdown:focus-visible {\n box-shadow: ").concat(dt("datepicker.dropdown.focus.ring.shadow"), ";\n outline: ").concat(dt("datepicker.dropdown.focus.ring.width"), " ").concat(dt("datepicker.dropdown.focus.ring.style"), " ").concat(dt("datepicker.dropdown.focus.ring.color"), ";\n outline-offset: ").concat(dt("datepicker.dropdown.focus.ring.offset"), ";\n}\n\n.p-datepicker:has(.p-datepicker-input-icon-container) {\n position: relative;\n}\n\n.p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-input {\n padding-inline-end: calc((").concat(dt("form.field.padding.x"), " * 2) + ").concat(dt("icon.size"), ");\n}\n\n.p-datepicker-input-icon-container {\n cursor: pointer;\n position: absolute;\n top: 50%;\n inset-inline-end: ").concat(dt("form.field.padding.x"), ";\n margin-block-start: calc(-1 * (").concat(dt("icon.size"), " / 2));\n color: ").concat(dt("datepicker.input.icon.color"), ";\n line-height: 1;\n}\n\n.p-datepicker-fluid {\n display: flex;\n}\n\n.p-datepicker-fluid .p-datepicker-input {\n width: 1%;\n}\n\n.p-datepicker .p-datepicker-panel {\n min-width: 100%;\n}\n\n.p-datepicker-panel {\n width: auto;\n padding: ").concat(dt("datepicker.panel.padding"), ";\n background: ").concat(dt("datepicker.panel.background"), ";\n color: ").concat(dt("datepicker.panel.color"), ";\n border: 1px solid ").concat(dt("datepicker.panel.border.color"), ";\n border-radius: ").concat(dt("datepicker.panel.border.radius"), ";\n box-shadow: ").concat(dt("datepicker.panel.shadow"), ";\n}\n\n.p-datepicker-panel-inline {\n display: inline-block;\n overflow-x: auto;\n box-shadow: none;\n}\n\n.p-datepicker-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ").concat(dt("datepicker.header.padding"), ";\n background: ").concat(dt("datepicker.header.background"), ";\n color: ").concat(dt("datepicker.header.color"), ";\n border-block-end: 1px solid ").concat(dt("datepicker.header.border.color"), ";\n}\n\n.p-datepicker-next-button:dir(rtl) {\n order: -1;\n}\n\n.p-datepicker-prev-button:dir(rtl) {\n order: 1;\n}\n\n.p-datepicker-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ").concat(dt("datepicker.title.gap"), ";\n font-weight: ").concat(dt("datepicker.title.font.weight"), ";\n}\n\n.p-datepicker-select-year,\n.p-datepicker-select-month {\n border: none;\n background: transparent;\n margin: 0;\n cursor: pointer;\n font-weight: inherit;\n transition: background ").concat(dt("datepicker.transition.duration"), ", color ").concat(dt("datepicker.transition.duration"), ", border-color ").concat(dt("datepicker.transition.duration"), ", outline-color ").concat(dt("datepicker.transition.duration"), ", box-shadow ").concat(dt("datepicker.transition.duration"), ";\n}\n\n.p-datepicker-select-month {\n padding: ").concat(dt("datepicker.select.month.padding"), ";\n color: ").concat(dt("datepicker.select.month.color"), ";\n border-radius: ").concat(dt("datepicker.select.month.border.radius"), ";\n}\n\n.p-datepicker-select-year {\n padding: ").concat(dt("datepicker.select.year.padding"), ";\n color: ").concat(dt("datepicker.select.year.color"), ";\n border-radius: ").concat(dt("datepicker.select.year.border.radius"), ";\n}\n\n.p-datepicker-select-month:enabled:hover {\n background: ").concat(dt("datepicker.select.month.hover.background"), ";\n color: ").concat(dt("datepicker.select.month.hover.color"), ";\n}\n\n.p-datepicker-select-year:enabled:hover {\n background: ").concat(dt("datepicker.select.year.hover.background"), ";\n color: ").concat(dt("datepicker.select.year.hover.color"), ";\n}\n\n.p-datepicker-select-month:focus-visible,\n.p-datepicker-select-year:focus-visible {\n box-shadow: ").concat(dt("datepicker.date.focus.ring.shadow"), ";\n outline: ").concat(dt("datepicker.date.focus.ring.width"), " ").concat(dt("datepicker.date.focus.ring.style"), " ").concat(dt("datepicker.date.focus.ring.color"), ";\n outline-offset: ").concat(dt("datepicker.date.focus.ring.offset"), ";\n}\n\n.p-datepicker-calendar-container {\n display: flex;\n}\n\n.p-datepicker-calendar-container .p-datepicker-calendar {\n flex: 1 1 auto;\n border-inline-start: 1px solid ").concat(dt("datepicker.group.border.color"), ";\n padding-inline-end: ").concat(dt("datepicker.group.gap"), ";\n padding-inline-start: ").concat(dt("datepicker.group.gap"), ";\n}\n\n.p-datepicker-calendar-container .p-datepicker-calendar:first-child {\n padding-inline-start: 0;\n border-inline-start: 0 none;\n}\n\n.p-datepicker-calendar-container .p-datepicker-calendar:last-child {\n padding-inline-end: 0;\n}\n\n.p-datepicker-day-view {\n width: 100%;\n border-collapse: collapse;\n font-size: 1rem;\n margin: ").concat(dt("datepicker.day.view.margin"), ";\n}\n\n.p-datepicker-weekday-cell {\n padding: ").concat(dt("datepicker.week.day.padding"), ";\n}\n\n.p-datepicker-weekday {\n font-weight: ").concat(dt("datepicker.week.day.font.weight"), ";\n color: ").concat(dt("datepicker.week.day.color"), ";\n}\n\n.p-datepicker-day-cell {\n padding: ").concat(dt("datepicker.date.padding"), ";\n}\n\n.p-datepicker-day {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n margin: 0 auto;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("datepicker.date.width"), ";\n height: ").concat(dt("datepicker.date.height"), ";\n border-radius: ").concat(dt("datepicker.date.border.radius"), ";\n transition: background ").concat(dt("datepicker.transition.duration"), ", color ").concat(dt("datepicker.transition.duration"), ", border-color ").concat(dt("datepicker.transition.duration"), ", box-shadow ").concat(dt("datepicker.transition.duration"), ", outline-color ").concat(dt("datepicker.transition.duration"), ";\n border: 1px solid transparent;\n outline-color: transparent;\n color: ").concat(dt("datepicker.date.color"), ";\n}\n\n.p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover {\n background: ").concat(dt("datepicker.date.hover.background"), ";\n color: ").concat(dt("datepicker.date.hover.color"), ";\n}\n\n.p-datepicker-day:focus-visible {\n box-shadow: ").concat(dt("datepicker.date.focus.ring.shadow"), ";\n outline: ").concat(dt("datepicker.date.focus.ring.width"), " ").concat(dt("datepicker.date.focus.ring.style"), " ").concat(dt("datepicker.date.focus.ring.color"), ";\n outline-offset: ").concat(dt("datepicker.date.focus.ring.offset"), ";\n}\n\n.p-datepicker-day-selected {\n background: ").concat(dt("datepicker.date.selected.background"), ";\n color: ").concat(dt("datepicker.date.selected.color"), ";\n}\n\n.p-datepicker-day-selected-range {\n background: ").concat(dt("datepicker.date.range.selected.background"), ";\n color: ").concat(dt("datepicker.date.range.selected.color"), ";\n}\n\n.p-datepicker-today > .p-datepicker-day {\n background: ").concat(dt("datepicker.today.background"), ";\n color: ").concat(dt("datepicker.today.color"), ";\n}\n\n.p-datepicker-today > .p-datepicker-day-selected {\n background: ").concat(dt("datepicker.date.selected.background"), ";\n color: ").concat(dt("datepicker.date.selected.color"), ";\n}\n\n.p-datepicker-today > .p-datepicker-day-selected-range {\n background: ").concat(dt("datepicker.date.range.selected.background"), ";\n color: ").concat(dt("datepicker.date.range.selected.color"), ";\n}\n\n.p-datepicker-weeknumber {\n text-align: center;\n}\n\n.p-datepicker-month-view {\n margin: ").concat(dt("datepicker.month.view.margin"), ";\n}\n\n.p-datepicker-month {\n width: 33.3%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n overflow: hidden;\n position: relative;\n padding: ").concat(dt("datepicker.month.padding"), ";\n transition: background ").concat(dt("datepicker.transition.duration"), ", color ").concat(dt("datepicker.transition.duration"), ", border-color ").concat(dt("datepicker.transition.duration"), ", box-shadow ").concat(dt("datepicker.transition.duration"), ", outline-color ").concat(dt("datepicker.transition.duration"), ";\n border-radius: ").concat(dt("datepicker.month.border.radius"), ";\n outline-color: transparent;\n color: ").concat(dt("datepicker.date.color"), ";\n}\n\n.p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover {\n color: ").concat(dt("datepicker.date.hover.color"), ";\n background: ").concat(dt("datepicker.date.hover.background"), ";\n}\n\n.p-datepicker-month-selected {\n color: ").concat(dt("datepicker.date.selected.color"), ";\n background: ").concat(dt("datepicker.date.selected.background"), ";\n}\n\n.p-datepicker-month:not(.p-disabled):focus-visible {\n box-shadow: ").concat(dt("datepicker.date.focus.ring.shadow"), ";\n outline: ").concat(dt("datepicker.date.focus.ring.width"), " ").concat(dt("datepicker.date.focus.ring.style"), " ").concat(dt("datepicker.date.focus.ring.color"), ";\n outline-offset: ").concat(dt("datepicker.date.focus.ring.offset"), ";\n}\n\n.p-datepicker-year-view {\n margin: ").concat(dt("datepicker.year.view.margin"), ";\n}\n\n.p-datepicker-year {\n width: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n overflow: hidden;\n position: relative;\n padding: ").concat(dt("datepicker.year.padding"), ";\n transition: background ").concat(dt("datepicker.transition.duration"), ", color ").concat(dt("datepicker.transition.duration"), ", border-color ").concat(dt("datepicker.transition.duration"), ", box-shadow ").concat(dt("datepicker.transition.duration"), ", outline-color ").concat(dt("datepicker.transition.duration"), ";\n border-radius: ").concat(dt("datepicker.year.border.radius"), ";\n outline-color: transparent;\n color: ").concat(dt("datepicker.date.color"), ";\n}\n\n.p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover {\n color: ").concat(dt("datepicker.date.hover.color"), ";\n background: ").concat(dt("datepicker.date.hover.background"), ";\n}\n\n.p-datepicker-year-selected {\n color: ").concat(dt("datepicker.date.selected.color"), ";\n background: ").concat(dt("datepicker.date.selected.background"), ";\n}\n\n.p-datepicker-year:not(.p-disabled):focus-visible {\n box-shadow: ").concat(dt("datepicker.date.focus.ring.shadow"), ";\n outline: ").concat(dt("datepicker.date.focus.ring.width"), " ").concat(dt("datepicker.date.focus.ring.style"), " ").concat(dt("datepicker.date.focus.ring.color"), ";\n outline-offset: ").concat(dt("datepicker.date.focus.ring.offset"), ";\n}\n\n.p-datepicker-buttonbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ").concat(dt("datepicker.buttonbar.padding"), ";\n border-block-start: 1px solid ").concat(dt("datepicker.buttonbar.border.color"), ";\n}\n\n.p-datepicker-buttonbar .p-button {\n width: auto;\n}\n\n.p-datepicker-time-picker {\n display: flex;\n justify-content: center;\n align-items: center;\n border-block-start: 1px solid ").concat(dt("datepicker.time.picker.border.color"), ";\n padding: 0;\n gap: ").concat(dt("datepicker.time.picker.gap"), ";\n}\n\n.p-datepicker-calendar-container + .p-datepicker-time-picker {\n padding: ").concat(dt("datepicker.time.picker.padding"), ";\n}\n\n.p-datepicker-time-picker > div {\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: ").concat(dt("datepicker.time.picker.button.gap"), ";\n}\n\n.p-datepicker-time-picker span {\n font-size: 1rem;\n}\n\n.p-datepicker-timeonly .p-datepicker-time-picker {\n border-block-start: 0 none;\n}\n\n.p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown {\n width: ").concat(dt("datepicker.dropdown.sm.width"), ";\n}\n\n.p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown .p-icon,\n.p-datepicker:has(.p-inputtext-sm) .p-datepicker-input-icon {\n font-size: ").concat(dt("form.field.sm.font.size"), ";\n width: ").concat(dt("form.field.sm.font.size"), ";\n height: ").concat(dt("form.field.sm.font.size"), ";\n}\n\n.p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown {\n width: ").concat(dt("datepicker.dropdown.lg.width"), ";\n}\n\n.p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon,\n.p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon {\n font-size: ").concat(dt("form.field.lg.font.size"), ";\n width: ").concat(dt("form.field.lg.font.size"), ";\n height: ").concat(dt("form.field.lg.font.size"), ";\n}\n"); +}, "theme"); +var inlineStyles$8 = { + root: /* @__PURE__ */ __name(function root4(_ref2) { + var props = _ref2.props; + return { + position: props.appendTo === "self" ? "relative" : void 0 + }; + }, "root") +}; +var classes$D = { + root: /* @__PURE__ */ __name(function root5(_ref3) { + var instance = _ref3.instance, state = _ref3.state; + return ["p-datepicker p-component p-inputwrapper", { + "p-invalid": instance.$invalid, + "p-inputwrapper-filled": instance.$filled, + "p-inputwrapper-focus": state.focused || state.overlayVisible, + "p-focus": state.focused || state.overlayVisible, + "p-datepicker-fluid": instance.$fluid + }]; + }, "root"), + pcInputText: "p-datepicker-input", + dropdown: "p-datepicker-dropdown", + inputIconContainer: "p-datepicker-input-icon-container", + inputIcon: "p-datepicker-input-icon", + panel: /* @__PURE__ */ __name(function panel(_ref4) { + var props = _ref4.props; + return ["p-datepicker-panel p-component", { + "p-datepicker-panel-inline": props.inline, + "p-disabled": props.disabled, + "p-datepicker-timeonly": props.timeOnly + }]; + }, "panel"), + calendarContainer: "p-datepicker-calendar-container", + calendar: "p-datepicker-calendar", + header: "p-datepicker-header", + pcPrevButton: "p-datepicker-prev-button", + title: "p-datepicker-title", + selectMonth: "p-datepicker-select-month", + selectYear: "p-datepicker-select-year", + decade: "p-datepicker-decade", + pcNextButton: "p-datepicker-next-button", + dayView: "p-datepicker-day-view", + weekHeader: "p-datepicker-weekheader p-disabled", + weekNumber: "p-datepicker-weeknumber", + weekLabelContainer: "p-datepicker-weeklabel-container p-disabled", + weekDayCell: "p-datepicker-weekday-cell", + weekDay: "p-datepicker-weekday", + dayCell: /* @__PURE__ */ __name(function dayCell(_ref5) { + var date = _ref5.date; + return ["p-datepicker-day-cell", { + "p-datepicker-other-month": date.otherMonth, + "p-datepicker-today": date.today + }]; + }, "dayCell"), + day: /* @__PURE__ */ __name(function day(_ref6) { + var instance = _ref6.instance, props = _ref6.props, date = _ref6.date; + var selectedDayClass = ""; + if (instance.isRangeSelection() && instance.isSelected(date) && date.selectable) { + selectedDayClass = instance.isDateEquals(props.modelValue[0], date) || instance.isDateEquals(props.modelValue[1], date) ? "p-datepicker-day-selected" : "p-datepicker-day-selected-range"; + } + return ["p-datepicker-day", { + "p-datepicker-day-selected": !instance.isRangeSelection() && instance.isSelected(date) && date.selectable, + "p-disabled": props.disabled || !date.selectable + }, selectedDayClass]; + }, "day"), + monthView: "p-datepicker-month-view", + month: /* @__PURE__ */ __name(function month(_ref7) { + var instance = _ref7.instance, props = _ref7.props, _month = _ref7.month, index = _ref7.index; + return ["p-datepicker-month", { + "p-datepicker-month-selected": instance.isMonthSelected(index), + "p-disabled": props.disabled || !_month.selectable + }]; + }, "month"), + yearView: "p-datepicker-year-view", + year: /* @__PURE__ */ __name(function year(_ref8) { + var instance = _ref8.instance, props = _ref8.props, _year = _ref8.year; + return ["p-datepicker-year", { + "p-datepicker-year-selected": instance.isYearSelected(_year.value), + "p-disabled": props.disabled || !_year.selectable + }]; + }, "year"), + timePicker: "p-datepicker-time-picker", + hourPicker: "p-datepicker-hour-picker", + pcIncrementButton: "p-datepicker-increment-button", + pcDecrementButton: "p-datepicker-decrement-button", + separator: "p-datepicker-separator", + minutePicker: "p-datepicker-minute-picker", + secondPicker: "p-datepicker-second-picker", + ampmPicker: "p-datepicker-ampm-picker", + buttonbar: "p-datepicker-buttonbar", + pcTodayButton: "p-datepicker-today-button", + pcClearButton: "p-datepicker-clear-button" +}; +var DatePickerStyle = BaseStyle.extend({ + name: "datepicker", + theme: theme$z, + classes: classes$D, + inlineStyles: inlineStyles$8 +}); +var script$1$F = { + name: "BaseDatePicker", + "extends": script$1n, + props: { + selectionMode: { + type: String, + "default": "single" + }, + dateFormat: { + type: String, + "default": null + }, + inline: { + type: Boolean, + "default": false + }, + showOtherMonths: { + type: Boolean, + "default": true + }, + selectOtherMonths: { + type: Boolean, + "default": false + }, + showIcon: { + type: Boolean, + "default": false + }, + iconDisplay: { + type: String, + "default": "button" + }, + icon: { + type: String, + "default": void 0 + }, + prevIcon: { + type: String, + "default": void 0 + }, + nextIcon: { + type: String, + "default": void 0 + }, + incrementIcon: { + type: String, + "default": void 0 + }, + decrementIcon: { + type: String, + "default": void 0 + }, + numberOfMonths: { + type: Number, + "default": 1 + }, + responsiveOptions: Array, + breakpoint: { + type: String, + "default": "769px" + }, + view: { + type: String, + "default": "date" + }, + minDate: { + type: Date, + value: null + }, + maxDate: { + type: Date, + value: null + }, + disabledDates: { + type: Array, + value: null + }, + disabledDays: { + type: Array, + value: null + }, + maxDateCount: { + type: Number, + value: null + }, + showOnFocus: { + type: Boolean, + "default": true + }, + autoZIndex: { + type: Boolean, + "default": true + }, + baseZIndex: { + type: Number, + "default": 0 + }, + showButtonBar: { + type: Boolean, + "default": false + }, + shortYearCutoff: { + type: String, + "default": "+10" + }, + showTime: { + type: Boolean, + "default": false + }, + timeOnly: { + type: Boolean, + "default": false + }, + hourFormat: { + type: String, + "default": "24" + }, + stepHour: { + type: Number, + "default": 1 + }, + stepMinute: { + type: Number, + "default": 1 + }, + stepSecond: { + type: Number, + "default": 1 + }, + showSeconds: { + type: Boolean, + "default": false + }, + hideOnDateTimeSelect: { + type: Boolean, + "default": false + }, + hideOnRangeSelection: { + type: Boolean, + "default": false + }, + timeSeparator: { + type: String, + "default": ":" + }, + showWeek: { + type: Boolean, + "default": false + }, + manualInput: { + type: Boolean, + "default": true + }, + appendTo: { + type: [String, Object], + "default": "body" + }, + readonly: { + type: Boolean, + "default": false + }, + placeholder: { + type: String, + "default": null + }, + id: { + type: String, + "default": null + }, + inputId: { + type: String, + "default": null + }, + inputClass: { + type: [String, Object], + "default": null + }, + inputStyle: { + type: Object, + "default": null + }, + panelClass: { + type: [String, Object], + "default": null + }, + panelStyle: { + type: Object, + "default": null + }, + todayButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default3() { + return { + severity: "secondary", + text: true, + size: "small" + }; + }, "_default") + }, + clearButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default4() { + return { + severity: "secondary", + text: true, + size: "small" + }; + }, "_default") + }, + navigatorButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default5() { + return { + severity: "secondary", + text: true, + rounded: true + }; + }, "_default") + }, + timepickerButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default6() { + return { + severity: "secondary", + text: true, + rounded: true + }; + }, "_default") + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: DatePickerStyle, + provide: /* @__PURE__ */ __name(function provide10() { + return { + $pcDatePicker: this, + $parentInstance: this + }; + }, "provide") +}; +function _typeof$l(o) { + "@babel/helpers - typeof"; + return _typeof$l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$l(o); +} +__name(_typeof$l, "_typeof$l"); +function _toConsumableArray$d(r) { + return _arrayWithoutHoles$d(r) || _iterableToArray$d(r) || _unsupportedIterableToArray$e(r) || _nonIterableSpread$d(); +} +__name(_toConsumableArray$d, "_toConsumableArray$d"); +function _nonIterableSpread$d() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$d, "_nonIterableSpread$d"); +function _iterableToArray$d(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$d, "_iterableToArray$d"); +function _arrayWithoutHoles$d(r) { + if (Array.isArray(r)) return _arrayLikeToArray$e(r); +} +__name(_arrayWithoutHoles$d, "_arrayWithoutHoles$d"); +function _createForOfIteratorHelper$4(r, e) { + var t2 = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t2) { + if (Array.isArray(r) || (t2 = _unsupportedIterableToArray$e(r)) || e) { + t2 && (r = t2); + var _n = 0, F = /* @__PURE__ */ __name(function F2() { + }, "F"); + return { s: F, n: /* @__PURE__ */ __name(function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + throw r2; + }, "e"), f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: /* @__PURE__ */ __name(function s() { + t2 = t2.call(r); + }, "s"), n: /* @__PURE__ */ __name(function n() { + var r2 = t2.next(); + return a = r2.done, r2; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + u = true, o = r2; + }, "e"), f: /* @__PURE__ */ __name(function f() { + try { + a || null == t2["return"] || t2["return"](); + } finally { + if (u) throw o; + } + }, "f") }; +} +__name(_createForOfIteratorHelper$4, "_createForOfIteratorHelper$4"); +function _unsupportedIterableToArray$e(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$e(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$e(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$e, "_unsupportedIterableToArray$e"); +function _arrayLikeToArray$e(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$e, "_arrayLikeToArray$e"); +var script$12 = { + name: "DatePicker", + "extends": script$1$F, + inheritAttrs: false, + emits: ["show", "hide", "input", "month-change", "year-change", "date-select", "today-click", "clear-click", "focus", "blur", "keydown"], + inject: { + $pcFluid: { + "default": null + } + }, + navigationState: null, + timePickerChange: false, + scrollHandler: null, + outsideClickListener: null, + resizeListener: null, + matchMediaListener: null, + overlay: null, + input: null, + previousButton: null, + nextButton: null, + timePickerTimer: null, + preventFocus: false, + typeUpdate: false, + data: /* @__PURE__ */ __name(function data3() { + return { + d_id: this.id, + currentMonth: null, + currentYear: null, + currentHour: null, + currentMinute: null, + currentSecond: null, + pm: null, + focused: false, + overlayVisible: false, + currentView: this.view, + query: null, + queryMatches: false + }; + }, "data"), + watch: { + id: /* @__PURE__ */ __name(function id3(newValue) { + this.d_id = newValue || UniqueComponentId(); + }, "id"), + modelValue: /* @__PURE__ */ __name(function modelValue(newValue) { + this.updateCurrentMetaData(); + if (!this.typeUpdate && !this.inline && this.input) { + this.input.value = this.inputFieldValue; + } + this.typeUpdate = false; + }, "modelValue"), + showTime: /* @__PURE__ */ __name(function showTime() { + this.updateCurrentMetaData(); + }, "showTime"), + minDate: /* @__PURE__ */ __name(function minDate() { + this.updateCurrentMetaData(); + }, "minDate"), + maxDate: /* @__PURE__ */ __name(function maxDate() { + this.updateCurrentMetaData(); + }, "maxDate"), + months: /* @__PURE__ */ __name(function months() { + if (this.overlay) { + if (!this.focused) { + if (this.inline) { + this.preventFocus = true; + } + setTimeout(this.updateFocus, 0); + } + } + }, "months"), + numberOfMonths: /* @__PURE__ */ __name(function numberOfMonths() { + this.destroyResponsiveStyleElement(); + this.createResponsiveStyle(); + }, "numberOfMonths"), + responsiveOptions: /* @__PURE__ */ __name(function responsiveOptions() { + this.destroyResponsiveStyleElement(); + this.createResponsiveStyle(); + }, "responsiveOptions"), + currentView: /* @__PURE__ */ __name(function currentView() { + var _this = this; + Promise.resolve(null).then(function() { + return _this.alignOverlay(); + }); + }, "currentView"), + view: /* @__PURE__ */ __name(function view(newValue) { + this.currentView = newValue; + }, "view") + }, + created: /* @__PURE__ */ __name(function created2() { + this.updateCurrentMetaData(); + }, "created"), + mounted: /* @__PURE__ */ __name(function mounted5() { + this.d_id = this.d_id || UniqueComponentId(); + this.createResponsiveStyle(); + this.bindMatchMediaListener(); + if (this.inline) { + if (!this.disabled) { + this.preventFocus = true; + this.initFocusableCell(); + } + } else { + this.input.value = this.inputFieldValue; + } + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated3() { + if (this.overlay) { + this.preventFocus = true; + setTimeout(this.updateFocus, 0); + } + if (this.input && this.selectionStart != null && this.selectionEnd != null) { + this.input.selectionStart = this.selectionStart; + this.input.selectionEnd = this.selectionEnd; + this.selectionStart = null; + this.selectionEnd = null; + } + }, "updated"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount2() { + if (this.timePickerTimer) { + clearTimeout(this.timePickerTimer); + } + this.destroyResponsiveStyleElement(); + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + this.unbindMatchMediaListener(); + if (this.scrollHandler) { + this.scrollHandler.destroy(); + this.scrollHandler = null; + } + if (this.overlay && this.autoZIndex) { + ZIndex.clear(this.overlay); + } + this.overlay = null; + }, "beforeUnmount"), + methods: { + isComparable: /* @__PURE__ */ __name(function isComparable() { + return this.d_value != null && typeof this.d_value !== "string"; + }, "isComparable"), + isSelected: /* @__PURE__ */ __name(function isSelected(dateMeta) { + if (!this.isComparable()) { + return false; + } + if (this.d_value) { + if (this.isSingleSelection()) { + return this.isDateEquals(this.d_value, dateMeta); + } else if (this.isMultipleSelection()) { + var selected3 = false; + var _iterator = _createForOfIteratorHelper$4(this.d_value), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var date = _step.value; + selected3 = this.isDateEquals(date, dateMeta); + if (selected3) { + break; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return selected3; + } else if (this.isRangeSelection()) { + if (this.d_value[1]) return this.isDateEquals(this.d_value[0], dateMeta) || this.isDateEquals(this.d_value[1], dateMeta) || this.isDateBetween(this.d_value[0], this.d_value[1], dateMeta); + else { + return this.isDateEquals(this.d_value[0], dateMeta); + } + } + } + return false; + }, "isSelected"), + isMonthSelected: /* @__PURE__ */ __name(function isMonthSelected(month2) { + var _this2 = this; + if (!this.isComparable()) return false; + if (this.isMultipleSelection()) { + return this.d_value.some(function(currentValue) { + return currentValue.getMonth() === month2 && currentValue.getFullYear() === _this2.currentYear; + }); + } else if (this.isRangeSelection()) { + if (!this.d_value[1]) { + var _this$d_value$, _this$d_value$2; + return ((_this$d_value$ = this.d_value[0]) === null || _this$d_value$ === void 0 ? void 0 : _this$d_value$.getFullYear()) === this.currentYear && ((_this$d_value$2 = this.d_value[0]) === null || _this$d_value$2 === void 0 ? void 0 : _this$d_value$2.getMonth()) === month2; + } else { + var currentDate = new Date(this.currentYear, month2, 1); + var startDate = new Date(this.d_value[0].getFullYear(), this.d_value[0].getMonth(), 1); + var endDate = new Date(this.d_value[1].getFullYear(), this.d_value[1].getMonth(), 1); + return currentDate >= startDate && currentDate <= endDate; + } + } else { + return this.d_value.getMonth() === month2 && this.d_value.getFullYear() === this.currentYear; + } + }, "isMonthSelected"), + isYearSelected: /* @__PURE__ */ __name(function isYearSelected(year2) { + if (!this.isComparable()) return false; + if (this.isMultipleSelection()) { + return this.d_value.some(function(currentValue) { + return currentValue.getFullYear() === year2; + }); + } else if (this.isRangeSelection()) { + var start = this.d_value[0] ? this.d_value[0].getFullYear() : null; + var end = this.d_value[1] ? this.d_value[1].getFullYear() : null; + return start === year2 || end === year2 || start < year2 && end > year2; + } else { + return this.d_value.getFullYear() === year2; + } + }, "isYearSelected"), + isDateEquals: /* @__PURE__ */ __name(function isDateEquals(value2, dateMeta) { + if (value2) return value2.getDate() === dateMeta.day && value2.getMonth() === dateMeta.month && value2.getFullYear() === dateMeta.year; + else return false; + }, "isDateEquals"), + isDateBetween: /* @__PURE__ */ __name(function isDateBetween(start, end, dateMeta) { + var between = false; + if (start && end) { + var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day); + return start.getTime() <= date.getTime() && end.getTime() >= date.getTime(); + } + return between; + }, "isDateBetween"), + getFirstDayOfMonthIndex: /* @__PURE__ */ __name(function getFirstDayOfMonthIndex(month2, year2) { + var day2 = /* @__PURE__ */ new Date(); + day2.setDate(1); + day2.setMonth(month2); + day2.setFullYear(year2); + var dayIndex = day2.getDay() + this.sundayIndex; + return dayIndex >= 7 ? dayIndex - 7 : dayIndex; + }, "getFirstDayOfMonthIndex"), + getDaysCountInMonth: /* @__PURE__ */ __name(function getDaysCountInMonth(month2, year2) { + return 32 - this.daylightSavingAdjust(new Date(year2, month2, 32)).getDate(); + }, "getDaysCountInMonth"), + getDaysCountInPrevMonth: /* @__PURE__ */ __name(function getDaysCountInPrevMonth(month2, year2) { + var prev = this.getPreviousMonthAndYear(month2, year2); + return this.getDaysCountInMonth(prev.month, prev.year); + }, "getDaysCountInPrevMonth"), + getPreviousMonthAndYear: /* @__PURE__ */ __name(function getPreviousMonthAndYear(month2, year2) { + var m, y; + if (month2 === 0) { + m = 11; + y = year2 - 1; + } else { + m = month2 - 1; + y = year2; + } + return { + month: m, + year: y + }; + }, "getPreviousMonthAndYear"), + getNextMonthAndYear: /* @__PURE__ */ __name(function getNextMonthAndYear(month2, year2) { + var m, y; + if (month2 === 11) { + m = 0; + y = year2 + 1; + } else { + m = month2 + 1; + y = year2; + } + return { + month: m, + year: y + }; + }, "getNextMonthAndYear"), + daylightSavingAdjust: /* @__PURE__ */ __name(function daylightSavingAdjust(date) { + if (!date) { + return null; + } + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, "daylightSavingAdjust"), + isToday: /* @__PURE__ */ __name(function isToday(today, day2, month2, year2) { + return today.getDate() === day2 && today.getMonth() === month2 && today.getFullYear() === year2; + }, "isToday"), + isSelectable: /* @__PURE__ */ __name(function isSelectable(day2, month2, year2, otherMonth) { + var validMin = true; + var validMax = true; + var validDate = true; + var validDay = true; + if (otherMonth && !this.selectOtherMonths) { + return false; + } + if (this.minDate) { + if (this.minDate.getFullYear() > year2) { + validMin = false; + } else if (this.minDate.getFullYear() === year2) { + if (this.minDate.getMonth() > month2) { + validMin = false; + } else if (this.minDate.getMonth() === month2) { + if (this.minDate.getDate() > day2) { + validMin = false; + } + } + } + } + if (this.maxDate) { + if (this.maxDate.getFullYear() < year2) { + validMax = false; + } else if (this.maxDate.getFullYear() === year2) { + if (this.maxDate.getMonth() < month2) { + validMax = false; + } else if (this.maxDate.getMonth() === month2) { + if (this.maxDate.getDate() < day2) { + validMax = false; + } + } + } + } + if (this.disabledDates) { + validDate = !this.isDateDisabled(day2, month2, year2); + } + if (this.disabledDays) { + validDay = !this.isDayDisabled(day2, month2, year2); + } + return validMin && validMax && validDate && validDay; + }, "isSelectable"), + onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter(el) { + var styles = !this.inline ? { + position: "absolute", + top: "0", + left: "0" + } : void 0; + addStyle(el, styles); + if (this.autoZIndex) { + ZIndex.set("overlay", el, this.baseZIndex || this.$primevue.config.zIndex.overlay); + } + this.alignOverlay(); + this.$emit("show"); + }, "onOverlayEnter"), + onOverlayEnterComplete: /* @__PURE__ */ __name(function onOverlayEnterComplete() { + this.bindOutsideClickListener(); + this.bindScrollListener(); + this.bindResizeListener(); + }, "onOverlayEnterComplete"), + onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave(el) { + if (this.autoZIndex) { + ZIndex.clear(el); + } + }, "onOverlayAfterLeave"), + onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave() { + this.currentView = this.view; + this.unbindOutsideClickListener(); + this.unbindScrollListener(); + this.unbindResizeListener(); + this.$emit("hide"); + this.overlay = null; + }, "onOverlayLeave"), + onPrevButtonClick: /* @__PURE__ */ __name(function onPrevButtonClick(event2) { + this.navigationState = { + backward: true, + button: true + }; + this.navBackward(event2); + }, "onPrevButtonClick"), + onNextButtonClick: /* @__PURE__ */ __name(function onNextButtonClick(event2) { + this.navigationState = { + backward: false, + button: true + }; + this.navForward(event2); + }, "onNextButtonClick"), + navBackward: /* @__PURE__ */ __name(function navBackward(event2) { + event2.preventDefault(); + if (!this.isEnabled()) { + return; + } + if (this.currentView === "month") { + this.decrementYear(); + this.$emit("year-change", { + month: this.currentMonth, + year: this.currentYear + }); + } else if (this.currentView === "year") { + this.decrementDecade(); + } else { + if (event2.shiftKey) { + this.decrementYear(); + } else { + if (this.currentMonth === 0) { + this.currentMonth = 11; + this.decrementYear(); + } else { + this.currentMonth--; + } + this.$emit("month-change", { + month: this.currentMonth + 1, + year: this.currentYear + }); + } + } + }, "navBackward"), + navForward: /* @__PURE__ */ __name(function navForward(event2) { + event2.preventDefault(); + if (!this.isEnabled()) { + return; + } + if (this.currentView === "month") { + this.incrementYear(); + this.$emit("year-change", { + month: this.currentMonth, + year: this.currentYear + }); + } else if (this.currentView === "year") { + this.incrementDecade(); + } else { + if (event2.shiftKey) { + this.incrementYear(); + } else { + if (this.currentMonth === 11) { + this.currentMonth = 0; + this.incrementYear(); + } else { + this.currentMonth++; + } + this.$emit("month-change", { + month: this.currentMonth + 1, + year: this.currentYear + }); + } + } + }, "navForward"), + decrementYear: /* @__PURE__ */ __name(function decrementYear() { + this.currentYear--; + }, "decrementYear"), + decrementDecade: /* @__PURE__ */ __name(function decrementDecade() { + this.currentYear = this.currentYear - 10; + }, "decrementDecade"), + incrementYear: /* @__PURE__ */ __name(function incrementYear() { + this.currentYear++; + }, "incrementYear"), + incrementDecade: /* @__PURE__ */ __name(function incrementDecade() { + this.currentYear = this.currentYear + 10; + }, "incrementDecade"), + switchToMonthView: /* @__PURE__ */ __name(function switchToMonthView(event2) { + this.currentView = "month"; + setTimeout(this.updateFocus, 0); + event2.preventDefault(); + }, "switchToMonthView"), + switchToYearView: /* @__PURE__ */ __name(function switchToYearView(event2) { + this.currentView = "year"; + setTimeout(this.updateFocus, 0); + event2.preventDefault(); + }, "switchToYearView"), + isEnabled: /* @__PURE__ */ __name(function isEnabled() { + return !this.disabled && !this.readonly; + }, "isEnabled"), + updateCurrentTimeMeta: /* @__PURE__ */ __name(function updateCurrentTimeMeta(date) { + var currentHour = date.getHours(); + if (this.hourFormat === "12") { + this.pm = currentHour > 11; + if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12; + } + this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour; + this.currentMinute = Math.floor(date.getMinutes() / this.stepMinute) * this.stepMinute; + this.currentSecond = Math.floor(date.getSeconds() / this.stepSecond) * this.stepSecond; + }, "updateCurrentTimeMeta"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener2() { + var _this3 = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + if (_this3.overlayVisible && _this3.isOutsideClicked(event2)) { + _this3.overlayVisible = false; + } + }; + document.addEventListener("mousedown", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener2() { + if (this.outsideClickListener) { + document.removeEventListener("mousedown", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener() { + var _this4 = this; + if (!this.scrollHandler) { + this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function() { + if (_this4.overlayVisible) { + _this4.overlayVisible = false; + } + }); + } + this.scrollHandler.bindScrollListener(); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener() { + if (this.scrollHandler) { + this.scrollHandler.unbindScrollListener(); + } + }, "unbindScrollListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener() { + var _this5 = this; + if (!this.resizeListener) { + this.resizeListener = function() { + if (_this5.overlayVisible && !isTouchDevice()) { + _this5.overlayVisible = false; + } + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener() { + var _this6 = this; + if (!this.matchMediaListener) { + var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); + this.query = query; + this.queryMatches = query.matches; + this.matchMediaListener = function() { + _this6.queryMatches = query.matches; + _this6.mobileActive = false; + }; + this.query.addEventListener("change", this.matchMediaListener); + } + }, "bindMatchMediaListener"), + unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener() { + if (this.matchMediaListener) { + this.query.removeEventListener("change", this.matchMediaListener); + this.matchMediaListener = null; + } + }, "unbindMatchMediaListener"), + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked2(event2) { + return !(this.$el.isSameNode(event2.target) || this.isNavIconClicked(event2) || this.$el.contains(event2.target) || this.overlay && this.overlay.contains(event2.target)); + }, "isOutsideClicked"), + isNavIconClicked: /* @__PURE__ */ __name(function isNavIconClicked(event2) { + return this.previousButton && (this.previousButton.isSameNode(event2.target) || this.previousButton.contains(event2.target)) || this.nextButton && (this.nextButton.isSameNode(event2.target) || this.nextButton.contains(event2.target)); + }, "isNavIconClicked"), + alignOverlay: /* @__PURE__ */ __name(function alignOverlay() { + if (this.overlay) { + if (this.appendTo === "self" || this.inline) { + relativePosition(this.overlay, this.$el); + } else { + if (this.view === "date") { + this.overlay.style.width = getOuterWidth(this.overlay) + "px"; + this.overlay.style.minWidth = getOuterWidth(this.$el) + "px"; + } else { + this.overlay.style.width = getOuterWidth(this.$el) + "px"; + } + absolutePosition(this.overlay, this.$el); + } + } + }, "alignOverlay"), + onButtonClick: /* @__PURE__ */ __name(function onButtonClick() { + if (this.isEnabled()) { + if (!this.overlayVisible) { + this.input.focus(); + this.overlayVisible = true; + } else { + this.overlayVisible = false; + } + } + }, "onButtonClick"), + isDateDisabled: /* @__PURE__ */ __name(function isDateDisabled(day2, month2, year2) { + if (this.disabledDates) { + var _iterator2 = _createForOfIteratorHelper$4(this.disabledDates), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + var disabledDate = _step2.value; + if (disabledDate.getFullYear() === year2 && disabledDate.getMonth() === month2 && disabledDate.getDate() === day2) { + return true; + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + return false; + }, "isDateDisabled"), + isDayDisabled: /* @__PURE__ */ __name(function isDayDisabled(day2, month2, year2) { + if (this.disabledDays) { + var weekday = new Date(year2, month2, day2); + var weekdayNumber = weekday.getDay(); + return this.disabledDays.indexOf(weekdayNumber) !== -1; + } + return false; + }, "isDayDisabled"), + onMonthDropdownChange: /* @__PURE__ */ __name(function onMonthDropdownChange(value2) { + this.currentMonth = parseInt(value2); + this.$emit("month-change", { + month: this.currentMonth + 1, + year: this.currentYear + }); + }, "onMonthDropdownChange"), + onYearDropdownChange: /* @__PURE__ */ __name(function onYearDropdownChange(value2) { + this.currentYear = parseInt(value2); + this.$emit("year-change", { + month: this.currentMonth + 1, + year: this.currentYear + }); + }, "onYearDropdownChange"), + onDateSelect: /* @__PURE__ */ __name(function onDateSelect(event2, dateMeta) { + var _this7 = this; + if (this.disabled || !dateMeta.selectable) { + return; + } + find(this.overlay, 'table td span:not([data-p-disabled="true"])').forEach(function(cell) { + return cell.tabIndex = -1; + }); + if (event2) { + event2.currentTarget.focus(); + } + if (this.isMultipleSelection() && this.isSelected(dateMeta)) { + var newValue = this.d_value.filter(function(date) { + return !_this7.isDateEquals(date, dateMeta); + }); + this.updateModel(newValue); + } else { + if (this.shouldSelectDate(dateMeta)) { + if (dateMeta.otherMonth) { + this.currentMonth = dateMeta.month; + this.currentYear = dateMeta.year; + this.selectDate(dateMeta); + } else { + this.selectDate(dateMeta); + } + } + } + if (this.isSingleSelection() && (!this.showTime || this.hideOnDateTimeSelect)) { + if (this.input) { + this.input.focus(); + } + setTimeout(function() { + _this7.overlayVisible = false; + }, 150); + } + }, "onDateSelect"), + selectDate: /* @__PURE__ */ __name(function selectDate(dateMeta) { + var _this8 = this; + var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day); + if (this.showTime) { + this.hourFormat === "12" && this.currentHour !== 12 && this.pm ? date.setHours(this.currentHour + 12) : date.setHours(this.currentHour); + date.setMinutes(this.currentMinute); + date.setSeconds(this.currentSecond); + } + if (this.minDate && this.minDate > date) { + date = this.minDate; + this.currentHour = date.getHours(); + this.currentMinute = date.getMinutes(); + this.currentSecond = date.getSeconds(); + } + if (this.maxDate && this.maxDate < date) { + date = this.maxDate; + this.currentHour = date.getHours(); + this.currentMinute = date.getMinutes(); + this.currentSecond = date.getSeconds(); + } + var modelVal = null; + if (this.isSingleSelection()) { + modelVal = date; + } else if (this.isMultipleSelection()) { + modelVal = this.d_value ? [].concat(_toConsumableArray$d(this.d_value), [date]) : [date]; + } else if (this.isRangeSelection()) { + if (this.d_value && this.d_value.length) { + var startDate = this.d_value[0]; + var endDate = this.d_value[1]; + if (!endDate && date.getTime() >= startDate.getTime()) { + endDate = date; + } else { + startDate = date; + endDate = null; + } + modelVal = [startDate, endDate]; + } else { + modelVal = [date, null]; + } + } + if (modelVal !== null) { + this.updateModel(modelVal); + } + if (this.isRangeSelection() && this.hideOnRangeSelection && modelVal[1] !== null) { + setTimeout(function() { + _this8.overlayVisible = false; + }, 150); + } + this.$emit("date-select", date); + }, "selectDate"), + updateModel: /* @__PURE__ */ __name(function updateModel(value2) { + this.writeValue(value2); + }, "updateModel"), + shouldSelectDate: /* @__PURE__ */ __name(function shouldSelectDate() { + if (this.isMultipleSelection()) return this.maxDateCount != null ? this.maxDateCount > (this.d_value ? this.d_value.length : 0) : true; + else return true; + }, "shouldSelectDate"), + isSingleSelection: /* @__PURE__ */ __name(function isSingleSelection() { + return this.selectionMode === "single"; + }, "isSingleSelection"), + isRangeSelection: /* @__PURE__ */ __name(function isRangeSelection() { + return this.selectionMode === "range"; + }, "isRangeSelection"), + isMultipleSelection: /* @__PURE__ */ __name(function isMultipleSelection() { + return this.selectionMode === "multiple"; + }, "isMultipleSelection"), + formatValue: /* @__PURE__ */ __name(function formatValue(value2) { + if (typeof value2 === "string") { + return this.dateFormat ? this.formatDate(new Date(value2), this.dateFormat) : value2; + } + var formattedValue = ""; + if (value2) { + try { + if (this.isSingleSelection()) { + formattedValue = this.formatDateTime(value2); + } else if (this.isMultipleSelection()) { + for (var i = 0; i < value2.length; i++) { + var dateAsString = this.formatDateTime(value2[i]); + formattedValue += dateAsString; + if (i !== value2.length - 1) { + formattedValue += ", "; + } + } + } else if (this.isRangeSelection()) { + if (value2 && value2.length) { + var startDate = value2[0]; + var endDate = value2[1]; + formattedValue = this.formatDateTime(startDate); + if (endDate) { + formattedValue += " - " + this.formatDateTime(endDate); + } + } + } + } catch (err) { + formattedValue = value2; + } + } + return formattedValue; + }, "formatValue"), + formatDateTime: /* @__PURE__ */ __name(function formatDateTime(date) { + var formattedValue = null; + if (date) { + if (this.timeOnly) { + formattedValue = this.formatTime(date); + } else { + formattedValue = this.formatDate(date, this.datePattern); + if (this.showTime) { + formattedValue += " " + this.formatTime(date); + } + } + } + return formattedValue; + }, "formatDateTime"), + formatDate: /* @__PURE__ */ __name(function formatDate(date, format) { + if (!date) { + return ""; + } + var iFormat; + var lookAhead = /* @__PURE__ */ __name(function lookAhead2(match) { + var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match; + if (matches) { + iFormat++; + } + return matches; + }, "lookAhead"), formatNumber = /* @__PURE__ */ __name(function formatNumber2(match, value2, len) { + var num = "" + value2; + if (lookAhead(match)) { + while (num.length < len) { + num = "0" + num; + } + } + return num; + }, "formatNumber"), formatName = /* @__PURE__ */ __name(function formatName2(match, value2, shortNames, longNames) { + return lookAhead(match) ? longNames[value2] : shortNames[value2]; + }, "formatName"); + var output = ""; + var literal = false; + if (date) { + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + output += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + output += formatNumber("d", date.getDate(), 2); + break; + case "D": + output += formatName("D", date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames); + break; + case "o": + output += formatNumber("o", Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 864e5), 3); + break; + case "m": + output += formatNumber("m", date.getMonth() + 1, 2); + break; + case "M": + output += formatName("M", date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames); + break; + case "y": + output += lookAhead("y") ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? "0" : "") + date.getFullYear() % 100; + break; + case "@": + output += date.getTime(); + break; + case "!": + output += date.getTime() * 1e4 + this.ticksTo1970; + break; + case "'": + if (lookAhead("'")) { + output += "'"; + } else { + literal = true; + } + break; + default: + output += format.charAt(iFormat); + } + } + } + } + return output; + }, "formatDate"), + formatTime: /* @__PURE__ */ __name(function formatTime(date) { + if (!date) { + return ""; + } + var output = ""; + var hours = date.getHours(); + var minutes = date.getMinutes(); + var seconds = date.getSeconds(); + if (this.hourFormat === "12" && hours > 11 && hours !== 12) { + hours -= 12; + } + if (this.hourFormat === "12") { + output += hours === 0 ? 12 : hours < 10 ? "0" + hours : hours; + } else { + output += hours < 10 ? "0" + hours : hours; + } + output += ":"; + output += minutes < 10 ? "0" + minutes : minutes; + if (this.showSeconds) { + output += ":"; + output += seconds < 10 ? "0" + seconds : seconds; + } + if (this.hourFormat === "12") { + output += date.getHours() > 11 ? " ".concat(this.$primevue.config.locale.pm) : " ".concat(this.$primevue.config.locale.am); + } + return output; + }, "formatTime"), + onTodayButtonClick: /* @__PURE__ */ __name(function onTodayButtonClick(event2) { + var date = /* @__PURE__ */ new Date(); + var dateMeta = { + day: date.getDate(), + month: date.getMonth(), + year: date.getFullYear(), + otherMonth: date.getMonth() !== this.currentMonth || date.getFullYear() !== this.currentYear, + today: true, + selectable: true + }; + this.onDateSelect(null, dateMeta); + this.$emit("today-click", date); + event2.preventDefault(); + }, "onTodayButtonClick"), + onClearButtonClick: /* @__PURE__ */ __name(function onClearButtonClick(event2) { + this.updateModel(null); + this.overlayVisible = false; + this.$emit("clear-click", event2); + event2.preventDefault(); + }, "onClearButtonClick"), + onTimePickerElementMouseDown: /* @__PURE__ */ __name(function onTimePickerElementMouseDown(event2, type, direction) { + if (this.isEnabled()) { + this.repeat(event2, null, type, direction); + event2.preventDefault(); + } + }, "onTimePickerElementMouseDown"), + onTimePickerElementMouseUp: /* @__PURE__ */ __name(function onTimePickerElementMouseUp(event2) { + if (this.isEnabled()) { + this.clearTimePickerTimer(); + this.updateModelTime(); + event2.preventDefault(); + } + }, "onTimePickerElementMouseUp"), + onTimePickerElementMouseLeave: /* @__PURE__ */ __name(function onTimePickerElementMouseLeave() { + this.clearTimePickerTimer(); + }, "onTimePickerElementMouseLeave"), + repeat: /* @__PURE__ */ __name(function repeat(event2, interval, type, direction) { + var _this9 = this; + var i = interval || 500; + this.clearTimePickerTimer(); + this.timePickerTimer = setTimeout(function() { + _this9.repeat(event2, 100, type, direction); + }, i); + switch (type) { + case 0: + if (direction === 1) this.incrementHour(event2); + else this.decrementHour(event2); + break; + case 1: + if (direction === 1) this.incrementMinute(event2); + else this.decrementMinute(event2); + break; + case 2: + if (direction === 1) this.incrementSecond(event2); + else this.decrementSecond(event2); + break; + } + }, "repeat"), + convertTo24Hour: /* @__PURE__ */ __name(function convertTo24Hour(hours, pm) { + if (this.hourFormat == "12") { + if (hours === 12) { + return pm ? 12 : 0; + } else { + return pm ? hours + 12 : hours; + } + } + return hours; + }, "convertTo24Hour"), + validateTime: /* @__PURE__ */ __name(function validateTime(hour, minute, second, pm) { + var value2 = this.isComparable() ? this.d_value : this.viewDate; + var convertedHour = this.convertTo24Hour(hour, pm); + if (this.isRangeSelection()) { + value2 = this.d_value[1] || this.d_value[0]; + } + if (this.isMultipleSelection()) { + value2 = this.d_value[this.d_value.length - 1]; + } + var valueDateString = value2 ? value2.toDateString() : null; + if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) { + if (this.minDate.getHours() > convertedHour) { + return false; + } + if (this.minDate.getHours() === convertedHour) { + if (this.minDate.getMinutes() > minute) { + return false; + } + if (this.minDate.getMinutes() === minute) { + if (this.minDate.getSeconds() > second) { + return false; + } + } + } + } + if (this.maxDate && valueDateString && this.maxDate.toDateString() === valueDateString) { + if (this.maxDate.getHours() < convertedHour) { + return false; + } + if (this.maxDate.getHours() === convertedHour) { + if (this.maxDate.getMinutes() < minute) { + return false; + } + if (this.maxDate.getMinutes() === minute) { + if (this.maxDate.getSeconds() < second) { + return false; + } + } + } + } + return true; + }, "validateTime"), + incrementHour: /* @__PURE__ */ __name(function incrementHour(event2) { + var prevHour = this.currentHour; + var newHour = this.currentHour + Number(this.stepHour); + var newPM = this.pm; + if (this.hourFormat == "24") newHour = newHour >= 24 ? newHour - 24 : newHour; + else if (this.hourFormat == "12") { + if (prevHour < 12 && newHour > 11) { + newPM = !this.pm; + } + newHour = newHour >= 13 ? newHour - 12 : newHour; + } + if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) { + this.currentHour = newHour; + this.pm = newPM; + } + event2.preventDefault(); + }, "incrementHour"), + decrementHour: /* @__PURE__ */ __name(function decrementHour(event2) { + var newHour = this.currentHour - this.stepHour; + var newPM = this.pm; + if (this.hourFormat == "24") newHour = newHour < 0 ? 24 + newHour : newHour; + else if (this.hourFormat == "12") { + if (this.currentHour === 12) { + newPM = !this.pm; + } + newHour = newHour <= 0 ? 12 + newHour : newHour; + } + if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) { + this.currentHour = newHour; + this.pm = newPM; + } + event2.preventDefault(); + }, "decrementHour"), + incrementMinute: /* @__PURE__ */ __name(function incrementMinute(event2) { + var newMinute = this.currentMinute + Number(this.stepMinute); + if (this.validateTime(this.currentHour, newMinute, this.currentSecond, this.pm)) { + this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute; + } + event2.preventDefault(); + }, "incrementMinute"), + decrementMinute: /* @__PURE__ */ __name(function decrementMinute(event2) { + var newMinute = this.currentMinute - this.stepMinute; + newMinute = newMinute < 0 ? 60 + newMinute : newMinute; + if (this.validateTime(this.currentHour, newMinute, this.currentSecond, this.pm)) { + this.currentMinute = newMinute; + } + event2.preventDefault(); + }, "decrementMinute"), + incrementSecond: /* @__PURE__ */ __name(function incrementSecond(event2) { + var newSecond = this.currentSecond + Number(this.stepSecond); + if (this.validateTime(this.currentHour, this.currentMinute, newSecond, this.pm)) { + this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond; + } + event2.preventDefault(); + }, "incrementSecond"), + decrementSecond: /* @__PURE__ */ __name(function decrementSecond(event2) { + var newSecond = this.currentSecond - this.stepSecond; + newSecond = newSecond < 0 ? 60 + newSecond : newSecond; + if (this.validateTime(this.currentHour, this.currentMinute, newSecond, this.pm)) { + this.currentSecond = newSecond; + } + event2.preventDefault(); + }, "decrementSecond"), + updateModelTime: /* @__PURE__ */ __name(function updateModelTime() { + var _this10 = this; + this.timePickerChange = true; + var value2 = this.isComparable() ? this.d_value : this.viewDate; + if (this.isRangeSelection()) { + value2 = this.d_value[1] || this.d_value[0]; + } + if (this.isMultipleSelection()) { + value2 = this.d_value[this.d_value.length - 1]; + } + value2 = value2 ? new Date(value2.getTime()) : /* @__PURE__ */ new Date(); + if (this.hourFormat == "12") { + if (this.currentHour === 12) value2.setHours(this.pm ? 12 : 0); + else value2.setHours(this.pm ? this.currentHour + 12 : this.currentHour); + } else { + value2.setHours(this.currentHour); + } + value2.setMinutes(this.currentMinute); + value2.setSeconds(this.currentSecond); + if (this.isRangeSelection()) { + if (this.d_value[1]) value2 = [this.d_value[0], value2]; + else value2 = [value2, null]; + } + if (this.isMultipleSelection()) { + value2 = [].concat(_toConsumableArray$d(this.d_value.slice(0, -1)), [value2]); + } + this.updateModel(value2); + this.$emit("date-select", value2); + setTimeout(function() { + return _this10.timePickerChange = false; + }, 0); + }, "updateModelTime"), + toggleAMPM: /* @__PURE__ */ __name(function toggleAMPM(event2) { + var validHour = this.validateTime(this.currentHour, this.currentMinute, this.currentSecond, !this.pm); + if (!validHour && (this.maxDate || this.minDate)) return; + this.pm = !this.pm; + this.updateModelTime(); + event2.preventDefault(); + }, "toggleAMPM"), + clearTimePickerTimer: /* @__PURE__ */ __name(function clearTimePickerTimer() { + if (this.timePickerTimer) { + clearInterval(this.timePickerTimer); + } + }, "clearTimePickerTimer"), + onMonthSelect: /* @__PURE__ */ __name(function onMonthSelect(event2, _ref) { + _ref.month; + var index = _ref.index; + if (this.view === "month") { + this.onDateSelect(event2, { + year: this.currentYear, + month: index, + day: 1, + selectable: true + }); + } else { + this.currentMonth = index; + this.currentView = "date"; + this.$emit("month-change", { + month: this.currentMonth + 1, + year: this.currentYear + }); + } + setTimeout(this.updateFocus, 0); + }, "onMonthSelect"), + onYearSelect: /* @__PURE__ */ __name(function onYearSelect(event2, year2) { + if (this.view === "year") { + this.onDateSelect(event2, { + year: year2.value, + month: 0, + day: 1, + selectable: true + }); + } else { + this.currentYear = year2.value; + this.currentView = "month"; + this.$emit("year-change", { + month: this.currentMonth + 1, + year: this.currentYear + }); + } + setTimeout(this.updateFocus, 0); + }, "onYearSelect"), + updateCurrentMetaData: /* @__PURE__ */ __name(function updateCurrentMetaData() { + var viewDate2 = this.viewDate; + this.currentMonth = viewDate2.getMonth(); + this.currentYear = viewDate2.getFullYear(); + if (this.showTime || this.timeOnly) { + this.updateCurrentTimeMeta(viewDate2); + } + }, "updateCurrentMetaData"), + isValidSelection: /* @__PURE__ */ __name(function isValidSelection(value2) { + var _this11 = this; + if (value2 == null) { + return true; + } + var isValid = true; + if (this.isSingleSelection()) { + if (!this.isSelectable(value2.getDate(), value2.getMonth(), value2.getFullYear(), false)) { + isValid = false; + } + } else if (value2.every(function(v) { + return _this11.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false); + })) { + if (this.isRangeSelection()) { + isValid = value2.length > 1 && value2[1] >= value2[0]; + } + } + return isValid; + }, "isValidSelection"), + parseValue: /* @__PURE__ */ __name(function parseValue(text) { + if (!text || text.trim().length === 0) { + return null; + } + var value2; + if (this.isSingleSelection()) { + value2 = this.parseDateTime(text); + } else if (this.isMultipleSelection()) { + var tokens = text.split(","); + value2 = []; + var _iterator3 = _createForOfIteratorHelper$4(tokens), _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { + var token = _step3.value; + value2.push(this.parseDateTime(token.trim())); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } else if (this.isRangeSelection()) { + var _tokens = text.split(" - "); + value2 = []; + for (var i = 0; i < _tokens.length; i++) { + value2[i] = this.parseDateTime(_tokens[i].trim()); + } + } + return value2; + }, "parseValue"), + parseDateTime: /* @__PURE__ */ __name(function parseDateTime(text) { + var date; + var parts = text.split(" "); + if (this.timeOnly) { + date = /* @__PURE__ */ new Date(); + this.populateTime(date, parts[0], parts[1]); + } else { + var dateFormat = this.datePattern; + if (this.showTime) { + date = this.parseDate(parts[0], dateFormat); + this.populateTime(date, parts[1], parts[2]); + } else { + date = this.parseDate(text, dateFormat); + } + } + return date; + }, "parseDateTime"), + populateTime: /* @__PURE__ */ __name(function populateTime(value2, timeString, ampm) { + if (this.hourFormat == "12" && !ampm) { + throw "Invalid Time"; + } + this.pm = ampm === this.$primevue.config.locale.pm || ampm === this.$primevue.config.locale.pm.toLowerCase(); + var time = this.parseTime(timeString); + value2.setHours(time.hour); + value2.setMinutes(time.minute); + value2.setSeconds(time.second); + }, "populateTime"), + parseTime: /* @__PURE__ */ __name(function parseTime(value2) { + var tokens = value2.split(":"); + var validTokenLength = this.showSeconds ? 3 : 2; + var regex = /^[0-9][0-9]$/; + if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || this.showSeconds && !tokens[2].match(regex)) { + throw "Invalid time"; + } + var h = parseInt(tokens[0]); + var m = parseInt(tokens[1]); + var s = this.showSeconds ? parseInt(tokens[2]) : null; + if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || this.hourFormat == "12" && h > 12 || this.showSeconds && (isNaN(s) || s > 59)) { + throw "Invalid time"; + } else { + if (this.hourFormat == "12" && h !== 12 && this.pm) { + h += 12; + } else if (this.hourFormat == "12" && h == 12 && !this.pm) { + h = 0; + } + return { + hour: h, + minute: m, + second: s + }; + } + }, "parseTime"), + parseDate: /* @__PURE__ */ __name(function parseDate(value2, format) { + if (format == null || value2 == null) { + throw "Invalid arguments"; + } + value2 = _typeof$l(value2) === "object" ? value2.toString() : value2 + ""; + if (value2 === "") { + return null; + } + var iFormat, dim, extra, iValue = 0, shortYearCutoff = typeof this.shortYearCutoff !== "string" ? this.shortYearCutoff : (/* @__PURE__ */ new Date()).getFullYear() % 100 + parseInt(this.shortYearCutoff, 10), year2 = -1, month2 = -1, day2 = -1, doy = -1, literal = false, date, lookAhead = /* @__PURE__ */ __name(function lookAhead2(match) { + var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match; + if (matches) { + iFormat++; + } + return matches; + }, "lookAhead"), getNumber = /* @__PURE__ */ __name(function getNumber2(match) { + var isDoubled = lookAhead(match), size = match === "@" ? 14 : match === "!" ? 20 : match === "y" && isDoubled ? 4 : match === "o" ? 3 : 2, minSize = match === "y" ? size : 1, digits = new RegExp("^\\d{" + minSize + "," + size + "}"), num = value2.substring(iValue).match(digits); + if (!num) { + throw "Missing number at position " + iValue; + } + iValue += num[0].length; + return parseInt(num[0], 10); + }, "getNumber"), getName = /* @__PURE__ */ __name(function getName2(match, shortNames, longNames) { + var index = -1; + var arr = lookAhead(match) ? longNames : shortNames; + var names = []; + for (var i = 0; i < arr.length; i++) { + names.push([i, arr[i]]); + } + names.sort(function(a, b) { + return -(a[1].length - b[1].length); + }); + for (var _i = 0; _i < names.length; _i++) { + var name4 = names[_i][1]; + if (value2.substr(iValue, name4.length).toLowerCase() === name4.toLowerCase()) { + index = names[_i][0]; + iValue += name4.length; + break; + } + } + if (index !== -1) { + return index + 1; + } else { + throw "Unknown name at position " + iValue; + } + }, "getName"), checkLiteral = /* @__PURE__ */ __name(function checkLiteral2() { + if (value2.charAt(iValue) !== format.charAt(iFormat)) { + throw "Unexpected literal at position " + iValue; + } + iValue++; + }, "checkLiteral"); + if (this.currentView === "month") { + day2 = 1; + } + if (this.currentView === "year") { + day2 = 1; + month2 = 1; + } + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + checkLiteral(); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + day2 = getNumber("d"); + break; + case "D": + getName("D", this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames); + break; + case "o": + doy = getNumber("o"); + break; + case "m": + month2 = getNumber("m"); + break; + case "M": + month2 = getName("M", this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames); + break; + case "y": + year2 = getNumber("y"); + break; + case "@": + date = new Date(getNumber("@")); + year2 = date.getFullYear(); + month2 = date.getMonth() + 1; + day2 = date.getDate(); + break; + case "!": + date = new Date((getNumber("!") - this.ticksTo1970) / 1e4); + year2 = date.getFullYear(); + month2 = date.getMonth() + 1; + day2 = date.getDate(); + break; + case "'": + if (lookAhead("'")) { + checkLiteral(); + } else { + literal = true; + } + break; + default: + checkLiteral(); + } + } + } + if (iValue < value2.length) { + extra = value2.substr(iValue); + if (!/^\s+/.test(extra)) { + throw "Extra/unparsed characters found in date: " + extra; + } + } + if (year2 === -1) { + year2 = (/* @__PURE__ */ new Date()).getFullYear(); + } else if (year2 < 100) { + year2 += (/* @__PURE__ */ new Date()).getFullYear() - (/* @__PURE__ */ new Date()).getFullYear() % 100 + (year2 <= shortYearCutoff ? 0 : -100); + } + if (doy > -1) { + month2 = 1; + day2 = doy; + do { + dim = this.getDaysCountInMonth(year2, month2 - 1); + if (day2 <= dim) { + break; + } + month2++; + day2 -= dim; + } while (true); + } + date = this.daylightSavingAdjust(new Date(year2, month2 - 1, day2)); + if (date.getFullYear() !== year2 || date.getMonth() + 1 !== month2 || date.getDate() !== day2) { + throw "Invalid date"; + } + return date; + }, "parseDate"), + getWeekNumber: /* @__PURE__ */ __name(function getWeekNumber(date) { + var checkDate = new Date(date.getTime()); + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); + var time = checkDate.getTime(); + checkDate.setMonth(0); + checkDate.setDate(1); + return Math.floor(Math.round((time - checkDate.getTime()) / 864e5) / 7) + 1; + }, "getWeekNumber"), + onDateCellKeydown: /* @__PURE__ */ __name(function onDateCellKeydown(event2, date, groupIndex) { + var cellContent = event2.currentTarget; + var cell = cellContent.parentElement; + var cellIndex = getIndex(cell); + switch (event2.code) { + case "ArrowDown": { + cellContent.tabIndex = "-1"; + var nextRow = cell.parentElement.nextElementSibling; + if (nextRow) { + var tableRowIndex = getIndex(cell.parentElement); + var tableRows = Array.from(cell.parentElement.parentElement.children); + var nextTableRows = tableRows.slice(tableRowIndex + 1); + var hasNextFocusableDate = nextTableRows.find(function(el) { + var focusCell2 = el.children[cellIndex].children[0]; + return !getAttribute(focusCell2, "data-p-disabled"); + }); + if (hasNextFocusableDate) { + var focusCell = hasNextFocusableDate.children[cellIndex].children[0]; + focusCell.tabIndex = "0"; + focusCell.focus(); + } else { + this.navigationState = { + backward: false + }; + this.navForward(event2); + } + } else { + this.navigationState = { + backward: false + }; + this.navForward(event2); + } + event2.preventDefault(); + break; + } + case "ArrowUp": { + cellContent.tabIndex = "-1"; + if (event2.altKey) { + this.overlayVisible = false; + this.focused = true; + } else { + var prevRow = cell.parentElement.previousElementSibling; + if (prevRow) { + var _tableRowIndex = getIndex(cell.parentElement); + var _tableRows = Array.from(cell.parentElement.parentElement.children); + var prevTableRows = _tableRows.slice(0, _tableRowIndex).reverse(); + var _hasNextFocusableDate = prevTableRows.find(function(el) { + var focusCell2 = el.children[cellIndex].children[0]; + return !getAttribute(focusCell2, "data-p-disabled"); + }); + if (_hasNextFocusableDate) { + var _focusCell = _hasNextFocusableDate.children[cellIndex].children[0]; + _focusCell.tabIndex = "0"; + _focusCell.focus(); + } else { + this.navigationState = { + backward: true + }; + this.navBackward(event2); + } + } else { + this.navigationState = { + backward: true + }; + this.navBackward(event2); + } + } + event2.preventDefault(); + break; + } + case "ArrowLeft": { + cellContent.tabIndex = "-1"; + var prevCell = cell.previousElementSibling; + if (prevCell) { + var cells = Array.from(cell.parentElement.children); + var prevCells = cells.slice(0, cellIndex).reverse(); + var _hasNextFocusableDate2 = prevCells.find(function(el) { + var focusCell2 = el.children[0]; + return !getAttribute(focusCell2, "data-p-disabled"); + }); + if (_hasNextFocusableDate2) { + var _focusCell2 = _hasNextFocusableDate2.children[0]; + _focusCell2.tabIndex = "0"; + _focusCell2.focus(); + } else { + this.navigateToMonth(event2, true, groupIndex); + } + } else { + this.navigateToMonth(event2, true, groupIndex); + } + event2.preventDefault(); + break; + } + case "ArrowRight": { + cellContent.tabIndex = "-1"; + var nextCell = cell.nextElementSibling; + if (nextCell) { + var _cells = Array.from(cell.parentElement.children); + var nextCells = _cells.slice(cellIndex + 1); + var _hasNextFocusableDate3 = nextCells.find(function(el) { + var focusCell2 = el.children[0]; + return !getAttribute(focusCell2, "data-p-disabled"); + }); + if (_hasNextFocusableDate3) { + var _focusCell3 = _hasNextFocusableDate3.children[0]; + _focusCell3.tabIndex = "0"; + _focusCell3.focus(); + } else { + this.navigateToMonth(event2, false, groupIndex); + } + } else { + this.navigateToMonth(event2, false, groupIndex); + } + event2.preventDefault(); + break; + } + case "Enter": + case "NumpadEnter": + case "Space": { + this.onDateSelect(event2, date); + event2.preventDefault(); + break; + } + case "Escape": { + this.overlayVisible = false; + event2.preventDefault(); + break; + } + case "Tab": { + if (!this.inline) { + this.trapFocus(event2); + } + break; + } + case "Home": { + cellContent.tabIndex = "-1"; + var currentRow = cell.parentElement; + var _focusCell4 = currentRow.children[0].children[0]; + if (getAttribute(_focusCell4, "data-p-disabled")) { + this.navigateToMonth(event2, true, groupIndex); + } else { + _focusCell4.tabIndex = "0"; + _focusCell4.focus(); + } + event2.preventDefault(); + break; + } + case "End": { + cellContent.tabIndex = "-1"; + var _currentRow = cell.parentElement; + var _focusCell5 = _currentRow.children[_currentRow.children.length - 1].children[0]; + if (getAttribute(_focusCell5, "data-p-disabled")) { + this.navigateToMonth(event2, false, groupIndex); + } else { + _focusCell5.tabIndex = "0"; + _focusCell5.focus(); + } + event2.preventDefault(); + break; + } + case "PageUp": { + cellContent.tabIndex = "-1"; + if (event2.shiftKey) { + this.navigationState = { + backward: true + }; + this.navBackward(event2); + } else this.navigateToMonth(event2, true, groupIndex); + event2.preventDefault(); + break; + } + case "PageDown": { + cellContent.tabIndex = "-1"; + if (event2.shiftKey) { + this.navigationState = { + backward: false + }; + this.navForward(event2); + } else this.navigateToMonth(event2, false, groupIndex); + event2.preventDefault(); + break; + } + } + }, "onDateCellKeydown"), + navigateToMonth: /* @__PURE__ */ __name(function navigateToMonth(event2, prev, groupIndex) { + if (prev) { + if (this.numberOfMonths === 1 || groupIndex === 0) { + this.navigationState = { + backward: true + }; + this.navBackward(event2); + } else { + var prevMonthContainer = this.overlay.children[groupIndex - 1]; + var cells = find(prevMonthContainer, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])'); + var focusCell = cells[cells.length - 1]; + focusCell.tabIndex = "0"; + focusCell.focus(); + } + } else { + if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) { + this.navigationState = { + backward: false + }; + this.navForward(event2); + } else { + var nextMonthContainer = this.overlay.children[groupIndex + 1]; + var _focusCell6 = findSingle(nextMonthContainer, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])'); + _focusCell6.tabIndex = "0"; + _focusCell6.focus(); + } + } + }, "navigateToMonth"), + onMonthCellKeydown: /* @__PURE__ */ __name(function onMonthCellKeydown(event2, index) { + var cell = event2.currentTarget; + switch (event2.code) { + case "ArrowUp": + case "ArrowDown": { + cell.tabIndex = "-1"; + var cells = cell.parentElement.children; + var cellIndex = getIndex(cell); + var nextCell = cells[event2.code === "ArrowDown" ? cellIndex + 3 : cellIndex - 3]; + if (nextCell) { + nextCell.tabIndex = "0"; + nextCell.focus(); + } + event2.preventDefault(); + break; + } + case "ArrowLeft": { + cell.tabIndex = "-1"; + var prevCell = cell.previousElementSibling; + if (prevCell) { + prevCell.tabIndex = "0"; + prevCell.focus(); + } else { + this.navigationState = { + backward: true + }; + this.navBackward(event2); + } + event2.preventDefault(); + break; + } + case "ArrowRight": { + cell.tabIndex = "-1"; + var _nextCell = cell.nextElementSibling; + if (_nextCell) { + _nextCell.tabIndex = "0"; + _nextCell.focus(); + } else { + this.navigationState = { + backward: false + }; + this.navForward(event2); + } + event2.preventDefault(); + break; + } + case "PageUp": { + if (event2.shiftKey) return; + this.navigationState = { + backward: true + }; + this.navBackward(event2); + break; + } + case "PageDown": { + if (event2.shiftKey) return; + this.navigationState = { + backward: false + }; + this.navForward(event2); + break; + } + case "Enter": + case "NumpadEnter": + case "Space": { + this.onMonthSelect(event2, index); + event2.preventDefault(); + break; + } + case "Escape": { + this.overlayVisible = false; + event2.preventDefault(); + break; + } + case "Tab": { + this.trapFocus(event2); + break; + } + } + }, "onMonthCellKeydown"), + onYearCellKeydown: /* @__PURE__ */ __name(function onYearCellKeydown(event2, index) { + var cell = event2.currentTarget; + switch (event2.code) { + case "ArrowUp": + case "ArrowDown": { + cell.tabIndex = "-1"; + var cells = cell.parentElement.children; + var cellIndex = getIndex(cell); + var nextCell = cells[event2.code === "ArrowDown" ? cellIndex + 2 : cellIndex - 2]; + if (nextCell) { + nextCell.tabIndex = "0"; + nextCell.focus(); + } + event2.preventDefault(); + break; + } + case "ArrowLeft": { + cell.tabIndex = "-1"; + var prevCell = cell.previousElementSibling; + if (prevCell) { + prevCell.tabIndex = "0"; + prevCell.focus(); + } else { + this.navigationState = { + backward: true + }; + this.navBackward(event2); + } + event2.preventDefault(); + break; + } + case "ArrowRight": { + cell.tabIndex = "-1"; + var _nextCell2 = cell.nextElementSibling; + if (_nextCell2) { + _nextCell2.tabIndex = "0"; + _nextCell2.focus(); + } else { + this.navigationState = { + backward: false + }; + this.navForward(event2); + } + event2.preventDefault(); + break; + } + case "PageUp": { + if (event2.shiftKey) return; + this.navigationState = { + backward: true + }; + this.navBackward(event2); + break; + } + case "PageDown": { + if (event2.shiftKey) return; + this.navigationState = { + backward: false + }; + this.navForward(event2); + break; + } + case "Enter": + case "NumpadEnter": + case "Space": { + this.onYearSelect(event2, index); + event2.preventDefault(); + break; + } + case "Escape": { + this.overlayVisible = false; + event2.preventDefault(); + break; + } + case "Tab": { + this.trapFocus(event2); + break; + } + } + }, "onYearCellKeydown"), + updateFocus: /* @__PURE__ */ __name(function updateFocus() { + var cell; + if (this.navigationState) { + if (this.navigationState.button) { + this.initFocusableCell(); + if (this.navigationState.backward) this.previousButton.focus(); + else this.nextButton.focus(); + } else { + if (this.navigationState.backward) { + var cells; + if (this.currentView === "month") { + cells = find(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])'); + } else if (this.currentView === "year") { + cells = find(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])'); + } else { + cells = find(this.overlay, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])'); + } + if (cells && cells.length > 0) { + cell = cells[cells.length - 1]; + } + } else { + if (this.currentView === "month") { + cell = findSingle(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])'); + } else if (this.currentView === "year") { + cell = findSingle(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])'); + } else { + cell = findSingle(this.overlay, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])'); + } + } + if (cell) { + cell.tabIndex = "0"; + cell.focus(); + } + } + this.navigationState = null; + } else { + this.initFocusableCell(); + } + }, "updateFocus"), + initFocusableCell: /* @__PURE__ */ __name(function initFocusableCell() { + var cell; + if (this.currentView === "month") { + var cells = find(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"]'); + var selectedCell = findSingle(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"][data-p-selected="true"]'); + cells.forEach(function(cell2) { + return cell2.tabIndex = -1; + }); + cell = selectedCell || cells[0]; + } else if (this.currentView === "year") { + var _cells2 = find(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"]'); + var _selectedCell = findSingle(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"][data-p-selected="true"]'); + _cells2.forEach(function(cell2) { + return cell2.tabIndex = -1; + }); + cell = _selectedCell || _cells2[0]; + } else { + cell = findSingle(this.overlay, 'span[data-p-selected="true"]'); + if (!cell) { + var todayCell = findSingle(this.overlay, 'td[data-p-today="true"] span:not([data-p-disabled="true"]):not([data-p-ink="true"])'); + if (todayCell) cell = todayCell; + else cell = findSingle(this.overlay, '.p-datepicker-calendar td span:not([data-p-disabled="true"]):not([data-p-ink="true"])'); + } + } + if (cell) { + cell.tabIndex = "0"; + this.preventFocus = false; + } + }, "initFocusableCell"), + trapFocus: /* @__PURE__ */ __name(function trapFocus(event2) { + event2.preventDefault(); + var focusableElements = getFocusableElements(this.overlay); + if (focusableElements && focusableElements.length > 0) { + if (!document.activeElement) { + focusableElements[0].focus(); + } else { + var focusedIndex = focusableElements.indexOf(document.activeElement); + if (event2.shiftKey) { + if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus(); + else focusableElements[focusedIndex - 1].focus(); + } else { + if (focusedIndex === -1) { + if (this.timeOnly) { + focusableElements[0].focus(); + } else { + var spanIndex = null; + for (var i = 0; i < focusableElements.length; i++) { + if (focusableElements[i].tagName === "SPAN") { + spanIndex = i; + break; + } + } + focusableElements[spanIndex].focus(); + } + } else if (focusedIndex === focusableElements.length - 1) focusableElements[0].focus(); + else focusableElements[focusedIndex + 1].focus(); + } + } + } + }, "trapFocus"), + onContainerButtonKeydown: /* @__PURE__ */ __name(function onContainerButtonKeydown(event2) { + switch (event2.code) { + case "Tab": + this.trapFocus(event2); + break; + case "Escape": + this.overlayVisible = false; + event2.preventDefault(); + break; + } + this.$emit("keydown", event2); + }, "onContainerButtonKeydown"), + onInput: /* @__PURE__ */ __name(function onInput(event2) { + try { + this.selectionStart = this.input.selectionStart; + this.selectionEnd = this.input.selectionEnd; + var value2 = this.parseValue(event2.target.value); + if (this.isValidSelection(value2)) { + this.typeUpdate = true; + this.updateModel(value2); + this.updateCurrentMetaData(); + } + } catch (err) { + } + this.$emit("input", event2); + }, "onInput"), + onInputClick: /* @__PURE__ */ __name(function onInputClick() { + if (this.showOnFocus && this.isEnabled() && !this.overlayVisible) { + this.overlayVisible = true; + } + }, "onInputClick"), + onFocus: /* @__PURE__ */ __name(function onFocus2(event2) { + if (this.showOnFocus && this.isEnabled()) { + this.overlayVisible = true; + } + this.focused = true; + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur(event2) { + var _this$formField$onBlu, _this$formField; + this.$emit("blur", { + originalEvent: event2, + value: event2.target.value + }); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField); + this.focused = false; + event2.target.value = this.formatValue(this.d_value); + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown(event2) { + if (event2.code === "ArrowDown" && this.overlay) { + this.trapFocus(event2); + } else if (event2.code === "ArrowDown" && !this.overlay) { + this.overlayVisible = true; + } else if (event2.code === "Escape") { + if (this.overlayVisible) { + this.overlayVisible = false; + event2.preventDefault(); + } + } else if (event2.code === "Tab") { + if (this.overlay) { + getFocusableElements(this.overlay).forEach(function(el) { + return el.tabIndex = "-1"; + }); + } + if (this.overlayVisible) { + this.overlayVisible = false; + } + } else if (event2.code === "Enter") { + var _event$target$value; + if (this.manualInput && event2.target.value !== null && ((_event$target$value = event2.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.trim()) !== "") { + try { + var value2 = this.parseValue(event2.target.value); + if (this.isValidSelection(value2)) { + this.overlayVisible = false; + } + } catch (err) { + } + } + this.$emit("keydown", event2); + } + }, "onKeyDown"), + overlayRef: /* @__PURE__ */ __name(function overlayRef(el) { + this.overlay = el; + }, "overlayRef"), + inputRef: /* @__PURE__ */ __name(function inputRef(el) { + this.input = el ? el.$el : void 0; + }, "inputRef"), + previousButtonRef: /* @__PURE__ */ __name(function previousButtonRef(el) { + this.previousButton = el ? el.$el : void 0; + }, "previousButtonRef"), + nextButtonRef: /* @__PURE__ */ __name(function nextButtonRef(el) { + this.nextButton = el ? el.$el : void 0; + }, "nextButtonRef"), + getMonthName: /* @__PURE__ */ __name(function getMonthName(index) { + return this.$primevue.config.locale.monthNames[index]; + }, "getMonthName"), + getYear: /* @__PURE__ */ __name(function getYear(month2) { + return this.currentView === "month" ? this.currentYear : month2.year; + }, "getYear"), + onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick(event2) { + event2.stopPropagation(); + if (!this.inline) { + OverlayEventBus.emit("overlay-click", { + originalEvent: event2, + target: this.$el + }); + } + }, "onOverlayClick"), + onOverlayKeyDown: /* @__PURE__ */ __name(function onOverlayKeyDown(event2) { + switch (event2.code) { + case "Escape": + if (!this.inline) { + this.input.focus(); + this.overlayVisible = false; + } + break; + } + }, "onOverlayKeyDown"), + onOverlayMouseUp: /* @__PURE__ */ __name(function onOverlayMouseUp(event2) { + this.onOverlayClick(event2); + }, "onOverlayMouseUp"), + createResponsiveStyle: /* @__PURE__ */ __name(function createResponsiveStyle() { + if (this.numberOfMonths > 1 && this.responsiveOptions && !this.isUnstyled) { + if (!this.responsiveStyleElement) { + var _this$$primevue; + this.responsiveStyleElement = document.createElement("style"); + this.responsiveStyleElement.type = "text/css"; + setAttribute(this.responsiveStyleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); + document.body.appendChild(this.responsiveStyleElement); + } + var innerHTML = ""; + if (this.responsiveOptions) { + var comparer = localeComparator(); + var responsiveOptions2 = _toConsumableArray$d(this.responsiveOptions).filter(function(o) { + return !!(o.breakpoint && o.numMonths); + }).sort(function(o1, o2) { + return -1 * comparer(o1.breakpoint, o2.breakpoint); + }); + for (var i = 0; i < responsiveOptions2.length; i++) { + var _responsiveOptions$i = responsiveOptions2[i], breakpoint2 = _responsiveOptions$i.breakpoint, numMonths = _responsiveOptions$i.numMonths; + var styles = "\n .p-datepicker-panel[".concat(this.$attrSelector, "] .p-datepicker-calendar:nth-child(").concat(numMonths, ") .p-datepicker-next-button {\n display: inline-flex;\n }\n "); + for (var j = numMonths; j < this.numberOfMonths; j++) { + styles += "\n .p-datepicker-panel[".concat(this.$attrSelector, "] .p-datepicker-calendar:nth-child(").concat(j + 1, ") {\n display: none;\n }\n "); + } + innerHTML += "\n @media screen and (max-width: ".concat(breakpoint2, ") {\n ").concat(styles, "\n }\n "); + } + } + this.responsiveStyleElement.innerHTML = innerHTML; + } + }, "createResponsiveStyle"), + destroyResponsiveStyleElement: /* @__PURE__ */ __name(function destroyResponsiveStyleElement() { + if (this.responsiveStyleElement) { + this.responsiveStyleElement.remove(); + this.responsiveStyleElement = null; + } + }, "destroyResponsiveStyleElement") + }, + computed: { + viewDate: /* @__PURE__ */ __name(function viewDate() { + var propValue = this.d_value; + if (propValue && Array.isArray(propValue)) { + if (this.isRangeSelection()) { + propValue = this.inline ? propValue[0] : propValue[1] || propValue[0]; + } else if (this.isMultipleSelection()) { + propValue = propValue[propValue.length - 1]; + } + } + if (propValue && typeof propValue !== "string") { + return propValue; + } else { + var today = /* @__PURE__ */ new Date(); + if (this.maxDate && this.maxDate < today) { + return this.maxDate; + } + if (this.minDate && this.minDate > today) { + return this.minDate; + } + return today; + } + }, "viewDate"), + inputFieldValue: /* @__PURE__ */ __name(function inputFieldValue() { + return this.formatValue(this.d_value); + }, "inputFieldValue"), + months: /* @__PURE__ */ __name(function months2() { + var months3 = []; + for (var i = 0; i < this.numberOfMonths; i++) { + var month2 = this.currentMonth + i; + var year2 = this.currentYear; + if (month2 > 11) { + month2 = month2 % 11 - 1; + year2 = year2 + 1; + } + var dates = []; + var firstDay = this.getFirstDayOfMonthIndex(month2, year2); + var daysLength = this.getDaysCountInMonth(month2, year2); + var prevMonthDaysLength = this.getDaysCountInPrevMonth(month2, year2); + var dayNo = 1; + var today = /* @__PURE__ */ new Date(); + var weekNumbers = []; + var monthRows = Math.ceil((daysLength + firstDay) / 7); + for (var _i2 = 0; _i2 < monthRows; _i2++) { + var week = []; + if (_i2 == 0) { + for (var j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) { + var prev = this.getPreviousMonthAndYear(month2, year2); + week.push({ + day: j, + month: prev.month, + year: prev.year, + otherMonth: true, + today: this.isToday(today, j, prev.month, prev.year), + selectable: this.isSelectable(j, prev.month, prev.year, true) + }); + } + var remainingDaysLength = 7 - week.length; + for (var _j = 0; _j < remainingDaysLength; _j++) { + week.push({ + day: dayNo, + month: month2, + year: year2, + today: this.isToday(today, dayNo, month2, year2), + selectable: this.isSelectable(dayNo, month2, year2, false) + }); + dayNo++; + } + } else { + for (var _j2 = 0; _j2 < 7; _j2++) { + if (dayNo > daysLength) { + var next = this.getNextMonthAndYear(month2, year2); + week.push({ + day: dayNo - daysLength, + month: next.month, + year: next.year, + otherMonth: true, + today: this.isToday(today, dayNo - daysLength, next.month, next.year), + selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true) + }); + } else { + week.push({ + day: dayNo, + month: month2, + year: year2, + today: this.isToday(today, dayNo, month2, year2), + selectable: this.isSelectable(dayNo, month2, year2, false) + }); + } + dayNo++; + } + } + if (this.showWeek) { + weekNumbers.push(this.getWeekNumber(new Date(week[0].year, week[0].month, week[0].day))); + } + dates.push(week); + } + months3.push({ + month: month2, + year: year2, + dates, + weekNumbers + }); + } + return months3; + }, "months"), + weekDays: /* @__PURE__ */ __name(function weekDays() { + var weekDays2 = []; + var dayIndex = this.$primevue.config.locale.firstDayOfWeek; + for (var i = 0; i < 7; i++) { + weekDays2.push(this.$primevue.config.locale.dayNamesMin[dayIndex]); + dayIndex = dayIndex == 6 ? 0 : ++dayIndex; + } + return weekDays2; + }, "weekDays"), + ticksTo1970: /* @__PURE__ */ __name(function ticksTo1970() { + return ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7; + }, "ticksTo1970"), + sundayIndex: /* @__PURE__ */ __name(function sundayIndex() { + return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0; + }, "sundayIndex"), + datePattern: /* @__PURE__ */ __name(function datePattern() { + return this.dateFormat || this.$primevue.config.locale.dateFormat; + }, "datePattern"), + monthPickerValues: /* @__PURE__ */ __name(function monthPickerValues() { + var _this12 = this; + var monthPickerValues2 = []; + var isSelectableMonth = /* @__PURE__ */ __name(function isSelectableMonth2(baseMonth) { + if (_this12.minDate) { + var minMonth = _this12.minDate.getMonth(); + var minYear = _this12.minDate.getFullYear(); + if (_this12.currentYear < minYear || _this12.currentYear === minYear && baseMonth < minMonth) { + return false; + } + } + if (_this12.maxDate) { + var maxMonth = _this12.maxDate.getMonth(); + var maxYear = _this12.maxDate.getFullYear(); + if (_this12.currentYear > maxYear || _this12.currentYear === maxYear && baseMonth > maxMonth) { + return false; + } + } + return true; + }, "isSelectableMonth"); + for (var i = 0; i <= 11; i++) { + monthPickerValues2.push({ + value: this.$primevue.config.locale.monthNamesShort[i], + selectable: isSelectableMonth(i) + }); + } + return monthPickerValues2; + }, "monthPickerValues"), + yearPickerValues: /* @__PURE__ */ __name(function yearPickerValues() { + var _this13 = this; + var yearPickerValues2 = []; + var base = this.currentYear - this.currentYear % 10; + var isSelectableYear = /* @__PURE__ */ __name(function isSelectableYear2(baseYear) { + if (_this13.minDate) { + if (_this13.minDate.getFullYear() > baseYear) return false; + } + if (_this13.maxDate) { + if (_this13.maxDate.getFullYear() < baseYear) return false; + } + return true; + }, "isSelectableYear"); + for (var i = 0; i < 10; i++) { + yearPickerValues2.push({ + value: base + i, + selectable: isSelectableYear(base + i) + }); + } + return yearPickerValues2; + }, "yearPickerValues"), + formattedCurrentHour: /* @__PURE__ */ __name(function formattedCurrentHour() { + if (this.currentHour == 0 && this.hourFormat == "12") { + return this.currentHour + 12; + } + return this.currentHour < 10 ? "0" + this.currentHour : this.currentHour; + }, "formattedCurrentHour"), + formattedCurrentMinute: /* @__PURE__ */ __name(function formattedCurrentMinute() { + return this.currentMinute < 10 ? "0" + this.currentMinute : this.currentMinute; + }, "formattedCurrentMinute"), + formattedCurrentSecond: /* @__PURE__ */ __name(function formattedCurrentSecond() { + return this.currentSecond < 10 ? "0" + this.currentSecond : this.currentSecond; + }, "formattedCurrentSecond"), + todayLabel: /* @__PURE__ */ __name(function todayLabel() { + return this.$primevue.config.locale.today; + }, "todayLabel"), + clearLabel: /* @__PURE__ */ __name(function clearLabel() { + return this.$primevue.config.locale.clear; + }, "clearLabel"), + weekHeaderLabel: /* @__PURE__ */ __name(function weekHeaderLabel() { + return this.$primevue.config.locale.weekHeader; + }, "weekHeaderLabel"), + monthNames: /* @__PURE__ */ __name(function monthNames() { + return this.$primevue.config.locale.monthNames; + }, "monthNames"), + switchViewButtonDisabled: /* @__PURE__ */ __name(function switchViewButtonDisabled() { + return this.numberOfMonths > 1 || this.disabled; + }, "switchViewButtonDisabled"), + panelId: /* @__PURE__ */ __name(function panelId() { + return this.d_id + "_panel"; + }, "panelId") + }, + components: { + InputText: script$1o, + Button: script$1e, + Portal: script$1f, + CalendarIcon: script$13, + ChevronLeftIcon: script$1p, + ChevronRightIcon: script$1l, + ChevronUpIcon: script$1j, + ChevronDownIcon: script$1k + }, + directives: { + ripple: Ripple + } +}; +var _hoisted_1$s = ["id"]; +var _hoisted_2$l = ["disabled", "aria-label", "aria-expanded", "aria-controls"]; +var _hoisted_3$h = ["id", "role", "aria-modal", "aria-label"]; +var _hoisted_4$9 = ["disabled", "aria-label"]; +var _hoisted_5$4 = ["disabled", "aria-label"]; +var _hoisted_6$2 = ["disabled", "aria-label"]; +var _hoisted_7$2 = ["disabled", "aria-label"]; +var _hoisted_8$1 = ["data-p-disabled"]; +var _hoisted_9 = ["abbr"]; +var _hoisted_10 = ["data-p-disabled"]; +var _hoisted_11 = ["aria-label", "data-p-today", "data-p-other-month"]; +var _hoisted_12 = ["onClick", "onKeydown", "aria-selected", "aria-disabled", "data-p-disabled", "data-p-selected"]; +var _hoisted_13 = ["onClick", "onKeydown", "data-p-disabled", "data-p-selected"]; +var _hoisted_14 = ["onClick", "onKeydown", "data-p-disabled", "data-p-selected"]; +function render$V(_ctx, _cache, $props, $setup, $data, $options) { + var _component_InputText = resolveComponent("InputText"); + var _component_Button = resolveComponent("Button"); + var _component_Portal = resolveComponent("Portal"); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("span", mergeProps({ + ref: "container", + id: $data.d_id, + "class": _ctx.cx("root"), + style: _ctx.sx("root") + }, _ctx.ptmi("root")), [!_ctx.inline ? (openBlock(), createBlock(_component_InputText, { + key: 0, + ref: $options.inputRef, + id: _ctx.inputId, + role: "combobox", + "class": normalizeClass([_ctx.inputClass, _ctx.cx("pcInputText")]), + style: normalizeStyle(_ctx.inputStyle), + defaultValue: $options.inputFieldValue, + placeholder: _ctx.placeholder, + name: _ctx.name, + size: _ctx.size, + invalid: _ctx.invalid, + variant: _ctx.variant, + fluid: _ctx.fluid, + unstyled: _ctx.unstyled, + autocomplete: "off", + "aria-autocomplete": "none", + "aria-haspopup": "dialog", + "aria-expanded": $data.overlayVisible, + "aria-controls": $options.panelId, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel, + inputmode: "none", + disabled: _ctx.disabled, + readonly: !_ctx.manualInput || _ctx.readonly, + tabindex: 0, + onInput: $options.onInput, + onClick: $options.onInputClick, + onFocus: $options.onFocus, + onBlur: $options.onBlur, + onKeydown: $options.onKeyDown, + pt: _ctx.ptm("pcInputText") + }, null, 8, ["id", "class", "style", "defaultValue", "placeholder", "name", "size", "invalid", "variant", "fluid", "unstyled", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly", "onInput", "onClick", "onFocus", "onBlur", "onKeydown", "pt"])) : createCommentVNode("", true), _ctx.showIcon && _ctx.iconDisplay === "button" && !_ctx.inline ? renderSlot(_ctx.$slots, "dropdownbutton", { + key: 1, + toggleCallback: $options.onButtonClick + }, function() { + return [createBaseVNode("button", mergeProps({ + "class": _ctx.cx("dropdown"), + disabled: _ctx.disabled, + onClick: _cache[0] || (_cache[0] = function() { + return $options.onButtonClick && $options.onButtonClick.apply($options, arguments); + }), + type: "button", + "aria-label": _ctx.$primevue.config.locale.chooseDate, + "aria-haspopup": "dialog", + "aria-expanded": $data.overlayVisible, + "aria-controls": $options.panelId + }, _ctx.ptm("dropdown")), [renderSlot(_ctx.$slots, "dropdownicon", { + "class": normalizeClass(_ctx.icon) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? "span" : "CalendarIcon"), mergeProps({ + "class": _ctx.icon + }, _ctx.ptm("dropdownIcon")), null, 16, ["class"]))]; + })], 16, _hoisted_2$l)]; + }) : _ctx.showIcon && _ctx.iconDisplay === "input" && !_ctx.inline ? (openBlock(), createElementBlock(Fragment, { + key: 2 + }, [_ctx.$slots.inputicon || _ctx.showIcon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.cx("inputIconContainer") + }, _ctx.ptm("inputIconContainer")), [renderSlot(_ctx.$slots, "inputicon", { + "class": normalizeClass(_ctx.cx("inputIcon")), + clickCallback: $options.onButtonClick + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? "i" : "CalendarIcon"), mergeProps({ + "class": [_ctx.icon, _ctx.cx("inputIcon")], + onClick: $options.onButtonClick + }, _ctx.ptm("inputicon")), null, 16, ["class", "onClick"]))]; + })], 16)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_component_Portal, { + appendTo: _ctx.appendTo, + disabled: _ctx.inline + }, { + "default": withCtx(function() { + return [createVNode(Transition, mergeProps({ + name: "p-connected-overlay", + onEnter: _cache[58] || (_cache[58] = function($event) { + return $options.onOverlayEnter($event); + }), + onAfterEnter: $options.onOverlayEnterComplete, + onAfterLeave: $options.onOverlayAfterLeave, + onLeave: $options.onOverlayLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [_ctx.inline || $data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.overlayRef, + id: $options.panelId, + "class": [_ctx.cx("panel"), _ctx.panelClass], + style: _ctx.panelStyle, + role: _ctx.inline ? null : "dialog", + "aria-modal": _ctx.inline ? null : "true", + "aria-label": _ctx.$primevue.config.locale.chooseDate, + onClick: _cache[55] || (_cache[55] = function() { + return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); + }), + onKeydown: _cache[56] || (_cache[56] = function() { + return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments); + }), + onMouseup: _cache[57] || (_cache[57] = function() { + return $options.onOverlayMouseUp && $options.onOverlayMouseUp.apply($options, arguments); + }) + }, _ctx.ptm("panel")), [!_ctx.timeOnly ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("calendarContainer") + }, _ctx.ptm("calendarContainer")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.months, function(month2, groupIndex) { + return openBlock(), createElementBlock("div", mergeProps({ + key: month2.month + month2.year, + "class": _ctx.cx("calendar"), + ref_for: true + }, _ctx.ptm("calendar")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("header"), + ref_for: true + }, _ctx.ptm("header")), [renderSlot(_ctx.$slots, "header"), withDirectives(createVNode(_component_Button, mergeProps({ + ref_for: true, + ref: $options.previousButtonRef, + "class": _ctx.cx("pcPrevButton"), + disabled: _ctx.disabled, + "aria-label": $data.currentView === "year" ? _ctx.$primevue.config.locale.prevDecade : $data.currentView === "month" ? _ctx.$primevue.config.locale.prevYear : _ctx.$primevue.config.locale.prevMonth, + unstyled: _ctx.unstyled, + onClick: $options.onPrevButtonClick, + onKeydown: $options.onContainerButtonKeydown + }, _ctx.navigatorButtonProps, { + pt: _ctx.ptm("pcPrevButton"), + "data-pc-group-section": "navigator" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "previcon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon ? "span" : "ChevronLeftIcon"), mergeProps({ + "class": [_ctx.prevIcon, slotProps["class"]], + ref_for: true + }, _ctx.ptm("pcPrevButton")["icon"]), null, 16, ["class"]))]; + })]; + }), + _: 2 + }, 1040, ["class", "disabled", "aria-label", "unstyled", "onClick", "onKeydown", "pt"]), [[vShow, groupIndex === 0]]), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("title"), + ref_for: true + }, _ctx.ptm("title")), [_ctx.$primevue.config.locale.showMonthAfterYear ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [$data.currentView !== "year" ? (openBlock(), createElementBlock("button", mergeProps({ + key: 0, + type: "button", + onClick: _cache[1] || (_cache[1] = function() { + return $options.switchToYearView && $options.switchToYearView.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments); + }), + "class": _ctx.cx("selectYear"), + disabled: $options.switchViewButtonDisabled, + "aria-label": _ctx.$primevue.config.locale.chooseYear, + ref_for: true + }, _ctx.ptm("selectYear"), { + "data-pc-group-section": "view" + }), toDisplayString($options.getYear(month2)), 17, _hoisted_4$9)) : createCommentVNode("", true), $data.currentView === "date" ? (openBlock(), createElementBlock("button", mergeProps({ + key: 1, + type: "button", + onClick: _cache[3] || (_cache[3] = function() { + return $options.switchToMonthView && $options.switchToMonthView.apply($options, arguments); + }), + onKeydown: _cache[4] || (_cache[4] = function() { + return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments); + }), + "class": _ctx.cx("selectMonth"), + disabled: $options.switchViewButtonDisabled, + "aria-label": _ctx.$primevue.config.locale.chooseMonth, + ref_for: true + }, _ctx.ptm("selectMonth"), { + "data-pc-group-section": "view" + }), toDisplayString($options.getMonthName(month2.month)), 17, _hoisted_5$4)) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [$data.currentView === "date" ? (openBlock(), createElementBlock("button", mergeProps({ + key: 0, + type: "button", + onClick: _cache[5] || (_cache[5] = function() { + return $options.switchToMonthView && $options.switchToMonthView.apply($options, arguments); + }), + onKeydown: _cache[6] || (_cache[6] = function() { + return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments); + }), + "class": _ctx.cx("selectMonth"), + disabled: $options.switchViewButtonDisabled, + "aria-label": _ctx.$primevue.config.locale.chooseMonth, + ref_for: true + }, _ctx.ptm("selectMonth"), { + "data-pc-group-section": "view" + }), toDisplayString($options.getMonthName(month2.month)), 17, _hoisted_6$2)) : createCommentVNode("", true), $data.currentView !== "year" ? (openBlock(), createElementBlock("button", mergeProps({ + key: 1, + type: "button", + onClick: _cache[7] || (_cache[7] = function() { + return $options.switchToYearView && $options.switchToYearView.apply($options, arguments); + }), + onKeydown: _cache[8] || (_cache[8] = function() { + return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments); + }), + "class": _ctx.cx("selectYear"), + disabled: $options.switchViewButtonDisabled, + "aria-label": _ctx.$primevue.config.locale.chooseYear, + ref_for: true + }, _ctx.ptm("selectYear"), { + "data-pc-group-section": "view" + }), toDisplayString($options.getYear(month2)), 17, _hoisted_7$2)) : createCommentVNode("", true)], 64)), $data.currentView === "year" ? (openBlock(), createElementBlock("span", mergeProps({ + key: 2, + "class": _ctx.cx("decade"), + ref_for: true + }, _ctx.ptm("decade")), [renderSlot(_ctx.$slots, "decade", { + years: $options.yearPickerValues + }, function() { + return [createTextVNode(toDisplayString($options.yearPickerValues[0].value) + " - " + toDisplayString($options.yearPickerValues[$options.yearPickerValues.length - 1].value), 1)]; + })], 16)) : createCommentVNode("", true)], 16), withDirectives(createVNode(_component_Button, mergeProps({ + ref_for: true, + ref: $options.nextButtonRef, + "class": _ctx.cx("pcNextButton"), + disabled: _ctx.disabled, + "aria-label": $data.currentView === "year" ? _ctx.$primevue.config.locale.nextDecade : $data.currentView === "month" ? _ctx.$primevue.config.locale.nextYear : _ctx.$primevue.config.locale.nextMonth, + unstyled: _ctx.unstyled, + onClick: $options.onNextButtonClick, + onKeydown: $options.onContainerButtonKeydown + }, _ctx.navigatorButtonProps, { + pt: _ctx.ptm("pcNextButton"), + "data-pc-group-section": "navigator" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "nexticon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon ? "span" : "ChevronRightIcon"), mergeProps({ + "class": [_ctx.nextIcon, slotProps["class"]], + ref_for: true + }, _ctx.ptm("pcNextButton")["icon"]), null, 16, ["class"]))]; + })]; + }), + _: 2 + }, 1040, ["class", "disabled", "aria-label", "unstyled", "onClick", "onKeydown", "pt"]), [[vShow, _ctx.numberOfMonths === 1 ? true : groupIndex === _ctx.numberOfMonths - 1]])], 16), $data.currentView === "date" ? (openBlock(), createElementBlock("table", mergeProps({ + key: 0, + "class": _ctx.cx("dayView"), + role: "grid", + ref_for: true + }, _ctx.ptm("dayView")), [createBaseVNode("thead", mergeProps({ + ref_for: true + }, _ctx.ptm("tableHeader")), [createBaseVNode("tr", mergeProps({ + ref_for: true + }, _ctx.ptm("tableHeaderRow")), [_ctx.showWeek ? (openBlock(), createElementBlock("th", mergeProps({ + key: 0, + scope: "col", + "class": _ctx.cx("weekHeader"), + ref_for: true + }, _ctx.ptm("weekHeader", { + context: { + disabled: _ctx.showWeek + } + }), { + "data-p-disabled": _ctx.showWeek, + "data-pc-group-section": "tableheadercell" + }), [renderSlot(_ctx.$slots, "weekheaderlabel", {}, function() { + return [createBaseVNode("span", mergeProps({ + ref_for: true + }, _ctx.ptm("weekHeaderLabel", { + context: { + disabled: _ctx.showWeek + } + }), { + "data-pc-group-section": "tableheadercelllabel" + }), toDisplayString($options.weekHeaderLabel), 17)]; + })], 16, _hoisted_8$1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList($options.weekDays, function(weekDay) { + return openBlock(), createElementBlock("th", mergeProps({ + key: weekDay, + scope: "col", + abbr: weekDay, + ref_for: true + }, _ctx.ptm("tableHeaderCell"), { + "data-pc-group-section": "tableheadercell", + "class": _ctx.cx("weekDayCell") + }), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("weekDay"), + ref_for: true + }, _ctx.ptm("weekDay"), { + "data-pc-group-section": "tableheadercelllabel" + }), toDisplayString(weekDay), 17)], 16, _hoisted_9); + }), 128))], 16)], 16), createBaseVNode("tbody", mergeProps({ + ref_for: true + }, _ctx.ptm("tableBody")), [(openBlock(true), createElementBlock(Fragment, null, renderList(month2.dates, function(week, i) { + return openBlock(), createElementBlock("tr", mergeProps({ + key: week[0].day + "" + week[0].month, + ref_for: true + }, _ctx.ptm("tableBodyRow")), [_ctx.showWeek ? (openBlock(), createElementBlock("td", mergeProps({ + key: 0, + "class": _ctx.cx("weekNumber"), + ref_for: true + }, _ctx.ptm("weekNumber"), { + "data-pc-group-section": "tablebodycell" + }), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("weekLabelContainer"), + ref_for: true + }, _ctx.ptm("weekLabelContainer", { + context: { + disabled: _ctx.showWeek + } + }), { + "data-p-disabled": _ctx.showWeek, + "data-pc-group-section": "tablebodycelllabel" + }), [renderSlot(_ctx.$slots, "weeklabel", { + weekNumber: month2.weekNumbers[i] + }, function() { + return [month2.weekNumbers[i] < 10 ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + style: { + "visibility": "hidden" + }, + ref_for: true + }, _ctx.ptm("weekLabel")), "0", 16)) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(month2.weekNumbers[i]), 1)]; + })], 16, _hoisted_10)], 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(week, function(date) { + return openBlock(), createElementBlock("td", mergeProps({ + key: date.day + "" + date.month, + "aria-label": date.day, + "class": _ctx.cx("dayCell", { + date + }), + ref_for: true + }, _ctx.ptm("dayCell", { + context: { + date, + today: date.today, + otherMonth: date.otherMonth, + selected: $options.isSelected(date), + disabled: !date.selectable + } + }), { + "data-p-today": date.today, + "data-p-other-month": date.otherMonth, + "data-pc-group-section": "tablebodycell" + }), [_ctx.showOtherMonths || !date.otherMonth ? withDirectives((openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.cx("day", { + date + }), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onDateSelect($event, date); + }, "onClick"), + draggable: "false", + onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + return $options.onDateCellKeydown($event, date, groupIndex); + }, "onKeydown"), + "aria-selected": $options.isSelected(date), + "aria-disabled": !date.selectable, + ref_for: true + }, _ctx.ptm("day", { + context: { + date, + today: date.today, + otherMonth: date.otherMonth, + selected: $options.isSelected(date), + disabled: !date.selectable + } + }), { + "data-p-disabled": !date.selectable, + "data-p-selected": $options.isSelected(date), + "data-pc-group-section": "tablebodycelllabel" + }), [renderSlot(_ctx.$slots, "date", { + date + }, function() { + return [createTextVNode(toDisplayString(date.day), 1)]; + })], 16, _hoisted_12)), [[_directive_ripple]]) : createCommentVNode("", true), $options.isSelected(date) ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": "p-hidden-accessible", + "aria-live": "polite", + ref_for: true + }, _ctx.ptm("hiddenSelectedDay"), { + "data-p-hidden-accessible": true + }), toDisplayString(date.day), 17)) : createCommentVNode("", true)], 16, _hoisted_11); + }), 128))], 16); + }), 128))], 16)], 16)) : createCommentVNode("", true)], 16); + }), 128))], 16), $data.currentView === "month" ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("monthView") + }, _ctx.ptm("monthView")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.monthPickerValues, function(m, i) { + return withDirectives((openBlock(), createElementBlock("span", mergeProps({ + key: m, + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onMonthSelect($event, { + month: m, + index: i + }); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + return $options.onMonthCellKeydown($event, { + month: m, + index: i + }); + }, "onKeydown"), + "class": _ctx.cx("month", { + month: m, + index: i + }), + ref_for: true + }, _ctx.ptm("month", { + context: { + month: m, + monthIndex: i, + selected: $options.isMonthSelected(i), + disabled: !m.selectable + } + }), { + "data-p-disabled": !m.selectable, + "data-p-selected": $options.isMonthSelected(i) + }), [createTextVNode(toDisplayString(m.value) + " ", 1), $options.isMonthSelected(i) ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": "p-hidden-accessible", + "aria-live": "polite", + ref_for: true + }, _ctx.ptm("hiddenMonth"), { + "data-p-hidden-accessible": true + }), toDisplayString(m.value), 17)) : createCommentVNode("", true)], 16, _hoisted_13)), [[_directive_ripple]]); + }), 128))], 16)) : createCommentVNode("", true), $data.currentView === "year" ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("yearView") + }, _ctx.ptm("yearView")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.yearPickerValues, function(y) { + return withDirectives((openBlock(), createElementBlock("span", mergeProps({ + key: y.value, + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onYearSelect($event, y); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + return $options.onYearCellKeydown($event, y); + }, "onKeydown"), + "class": _ctx.cx("year", { + year: y + }), + ref_for: true + }, _ctx.ptm("year", { + context: { + year: y, + selected: $options.isYearSelected(y.value), + disabled: !y.selectable + } + }), { + "data-p-disabled": !y.selectable, + "data-p-selected": $options.isYearSelected(y.value) + }), [createTextVNode(toDisplayString(y.value) + " ", 1), $options.isYearSelected(y.value) ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": "p-hidden-accessible", + "aria-live": "polite", + ref_for: true + }, _ctx.ptm("hiddenYear"), { + "data-p-hidden-accessible": true + }), toDisplayString(y.value), 17)) : createCommentVNode("", true)], 16, _hoisted_14)), [[_directive_ripple]]); + }), 128))], 16)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), (_ctx.showTime || _ctx.timeOnly) && $data.currentView === "date" ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("timePicker") + }, _ctx.ptm("timePicker")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("hourPicker") + }, _ctx.ptm("hourPicker"), { + "data-pc-group-section": "timepickerContainer" + }), [createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcIncrementButton"), + "aria-label": _ctx.$primevue.config.locale.nextHour, + unstyled: _ctx.unstyled, + onMousedown: _cache[9] || (_cache[9] = function($event) { + return $options.onTimePickerElementMouseDown($event, 0, 1); + }), + onMouseup: _cache[10] || (_cache[10] = function($event) { + return $options.onTimePickerElementMouseUp($event); + }), + onKeydown: [$options.onContainerButtonKeydown, _cache[12] || (_cache[12] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 0, 1); + }, ["enter"])), _cache[13] || (_cache[13] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 0, 1); + }, ["space"]))], + onMouseleave: _cache[11] || (_cache[11] = function($event) { + return $options.onTimePickerElementMouseLeave(); + }), + onKeyup: [_cache[14] || (_cache[14] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["enter"])), _cache[15] || (_cache[15] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["space"]))] + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcIncrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "incrementicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? "span" : "ChevronUpIcon"), mergeProps({ + "class": [_ctx.incrementIcon, slotProps["class"]] + }, _ctx.ptm("pcIncrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "unstyled", "onKeydown", "pt"]), createBaseVNode("span", mergeProps(_ctx.ptm("hour"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString($options.formattedCurrentHour), 17), createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcDecrementButton"), + "aria-label": _ctx.$primevue.config.locale.prevHour, + unstyled: _ctx.unstyled, + onMousedown: _cache[16] || (_cache[16] = function($event) { + return $options.onTimePickerElementMouseDown($event, 0, -1); + }), + onMouseup: _cache[17] || (_cache[17] = function($event) { + return $options.onTimePickerElementMouseUp($event); + }), + onKeydown: [$options.onContainerButtonKeydown, _cache[19] || (_cache[19] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 0, -1); + }, ["enter"])), _cache[20] || (_cache[20] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 0, -1); + }, ["space"]))], + onMouseleave: _cache[18] || (_cache[18] = function($event) { + return $options.onTimePickerElementMouseLeave(); + }), + onKeyup: [_cache[21] || (_cache[21] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["enter"])), _cache[22] || (_cache[22] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["space"]))] + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcDecrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "decrementicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? "span" : "ChevronDownIcon"), mergeProps({ + "class": [_ctx.decrementIcon, slotProps["class"]] + }, _ctx.ptm("pcDecrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "unstyled", "onKeydown", "pt"])], 16), createBaseVNode("div", mergeProps(_ctx.ptm("separatorContainer"), { + "data-pc-group-section": "timepickerContainer" + }), [createBaseVNode("span", mergeProps(_ctx.ptm("separator"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString(_ctx.timeSeparator), 17)], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("minutePicker") + }, _ctx.ptm("minutePicker"), { + "data-pc-group-section": "timepickerContainer" + }), [createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcIncrementButton"), + "aria-label": _ctx.$primevue.config.locale.nextMinute, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onMousedown: _cache[23] || (_cache[23] = function($event) { + return $options.onTimePickerElementMouseDown($event, 1, 1); + }), + onMouseup: _cache[24] || (_cache[24] = function($event) { + return $options.onTimePickerElementMouseUp($event); + }), + onKeydown: [$options.onContainerButtonKeydown, _cache[26] || (_cache[26] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 1, 1); + }, ["enter"])), _cache[27] || (_cache[27] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 1, 1); + }, ["space"]))], + onMouseleave: _cache[25] || (_cache[25] = function($event) { + return $options.onTimePickerElementMouseLeave(); + }), + onKeyup: [_cache[28] || (_cache[28] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["enter"])), _cache[29] || (_cache[29] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["space"]))] + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcIncrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "incrementicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? "span" : "ChevronUpIcon"), mergeProps({ + "class": [_ctx.incrementIcon, slotProps["class"]] + }, _ctx.ptm("pcIncrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"]), createBaseVNode("span", mergeProps(_ctx.ptm("minute"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString($options.formattedCurrentMinute), 17), createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcDecrementButton"), + "aria-label": _ctx.$primevue.config.locale.prevMinute, + disabled: _ctx.disabled, + onMousedown: _cache[30] || (_cache[30] = function($event) { + return $options.onTimePickerElementMouseDown($event, 1, -1); + }), + onMouseup: _cache[31] || (_cache[31] = function($event) { + return $options.onTimePickerElementMouseUp($event); + }), + onKeydown: [$options.onContainerButtonKeydown, _cache[33] || (_cache[33] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 1, -1); + }, ["enter"])), _cache[34] || (_cache[34] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 1, -1); + }, ["space"]))], + onMouseleave: _cache[32] || (_cache[32] = function($event) { + return $options.onTimePickerElementMouseLeave(); + }), + onKeyup: [_cache[35] || (_cache[35] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["enter"])), _cache[36] || (_cache[36] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["space"]))] + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcDecrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "decrementicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? "span" : "ChevronDownIcon"), mergeProps({ + "class": [_ctx.decrementIcon, slotProps["class"]] + }, _ctx.ptm("pcDecrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "disabled", "onKeydown", "pt"])], 16), _ctx.showSeconds ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("separatorContainer") + }, _ctx.ptm("separatorContainer"), { + "data-pc-group-section": "timepickerContainer" + }), [createBaseVNode("span", mergeProps(_ctx.ptm("separator"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString(_ctx.timeSeparator), 17)], 16)) : createCommentVNode("", true), _ctx.showSeconds ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("secondPicker") + }, _ctx.ptm("secondPicker"), { + "data-pc-group-section": "timepickerContainer" + }), [createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcIncrementButton"), + "aria-label": _ctx.$primevue.config.locale.nextSecond, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onMousedown: _cache[37] || (_cache[37] = function($event) { + return $options.onTimePickerElementMouseDown($event, 2, 1); + }), + onMouseup: _cache[38] || (_cache[38] = function($event) { + return $options.onTimePickerElementMouseUp($event); + }), + onKeydown: [$options.onContainerButtonKeydown, _cache[40] || (_cache[40] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 2, 1); + }, ["enter"])), _cache[41] || (_cache[41] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 2, 1); + }, ["space"]))], + onMouseleave: _cache[39] || (_cache[39] = function($event) { + return $options.onTimePickerElementMouseLeave(); + }), + onKeyup: [_cache[42] || (_cache[42] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["enter"])), _cache[43] || (_cache[43] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["space"]))] + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcIncrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "incrementicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? "span" : "ChevronUpIcon"), mergeProps({ + "class": [_ctx.incrementIcon, slotProps["class"]] + }, _ctx.ptm("pcIncrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"]), createBaseVNode("span", mergeProps(_ctx.ptm("second"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString($options.formattedCurrentSecond), 17), createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcDecrementButton"), + "aria-label": _ctx.$primevue.config.locale.prevSecond, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onMousedown: _cache[44] || (_cache[44] = function($event) { + return $options.onTimePickerElementMouseDown($event, 2, -1); + }), + onMouseup: _cache[45] || (_cache[45] = function($event) { + return $options.onTimePickerElementMouseUp($event); + }), + onKeydown: [$options.onContainerButtonKeydown, _cache[47] || (_cache[47] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 2, -1); + }, ["enter"])), _cache[48] || (_cache[48] = withKeys(function($event) { + return $options.onTimePickerElementMouseDown($event, 2, -1); + }, ["space"]))], + onMouseleave: _cache[46] || (_cache[46] = function($event) { + return $options.onTimePickerElementMouseLeave(); + }), + onKeyup: [_cache[49] || (_cache[49] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["enter"])), _cache[50] || (_cache[50] = withKeys(function($event) { + return $options.onTimePickerElementMouseUp($event); + }, ["space"]))] + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcDecrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "decrementicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? "span" : "ChevronDownIcon"), mergeProps({ + "class": [_ctx.decrementIcon, slotProps["class"]] + }, _ctx.ptm("pcDecrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"])], 16)) : createCommentVNode("", true), _ctx.hourFormat == "12" ? (openBlock(), createElementBlock("div", mergeProps({ + key: 2, + "class": _ctx.cx("separatorContainer") + }, _ctx.ptm("separatorContainer"), { + "data-pc-group-section": "timepickerContainer" + }), [createBaseVNode("span", mergeProps(_ctx.ptm("separator"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString(_ctx.timeSeparator), 17)], 16)) : createCommentVNode("", true), _ctx.hourFormat == "12" ? (openBlock(), createElementBlock("div", mergeProps({ + key: 3, + "class": _ctx.cx("ampmPicker") + }, _ctx.ptm("ampmPicker")), [createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcIncrementButton"), + "aria-label": _ctx.$primevue.config.locale.am, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onClick: _cache[51] || (_cache[51] = function($event) { + return $options.toggleAMPM($event); + }), + onKeydown: $options.onContainerButtonKeydown + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcIncrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "incrementicon", { + "class": normalizeClass(_ctx.cx("incrementIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? "span" : "ChevronUpIcon"), mergeProps({ + "class": [_ctx.cx("incrementIcon"), slotProps["class"]] + }, _ctx.ptm("pcIncrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"]), createBaseVNode("span", mergeProps(_ctx.ptm("ampm"), { + "data-pc-group-section": "timepickerlabel" + }), toDisplayString($data.pm ? _ctx.$primevue.config.locale.pm : _ctx.$primevue.config.locale.am), 17), createVNode(_component_Button, mergeProps({ + "class": _ctx.cx("pcDecrementButton"), + "aria-label": _ctx.$primevue.config.locale.pm, + disabled: _ctx.disabled, + onClick: _cache[52] || (_cache[52] = function($event) { + return $options.toggleAMPM($event); + }), + onKeydown: $options.onContainerButtonKeydown + }, _ctx.timepickerButtonProps, { + pt: _ctx.ptm("pcDecrementButton"), + "data-pc-group-section": "timepickerbutton" + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "decrementicon", { + "class": normalizeClass(_ctx.cx("decrementIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? "span" : "ChevronDownIcon"), mergeProps({ + "class": [_ctx.cx("decrementIcon"), slotProps["class"]] + }, _ctx.ptm("pcDecrementButton")["icon"], { + "data-pc-group-section": "timepickerlabel" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "aria-label", "disabled", "onKeydown", "pt"])], 16)) : createCommentVNode("", true)], 16)) : createCommentVNode("", true), _ctx.showButtonBar ? (openBlock(), createElementBlock("div", mergeProps({ + key: 2, + "class": _ctx.cx("buttonbar") + }, _ctx.ptm("buttonbar")), [createVNode(_component_Button, mergeProps({ + label: $options.todayLabel, + onClick: _cache[53] || (_cache[53] = function($event) { + return $options.onTodayButtonClick($event); + }), + "class": _ctx.cx("pcTodayButton"), + unstyled: _ctx.unstyled, + onKeydown: $options.onContainerButtonKeydown + }, _ctx.todayButtonProps, { + pt: _ctx.ptm("pcTodayButton"), + "data-pc-group-section": "button" + }), null, 16, ["label", "class", "unstyled", "onKeydown", "pt"]), createVNode(_component_Button, mergeProps({ + label: $options.clearLabel, + onClick: _cache[54] || (_cache[54] = function($event) { + return $options.onClearButtonClick($event); + }), + "class": _ctx.cx("pcClearButton"), + unstyled: _ctx.unstyled, + onKeydown: $options.onContainerButtonKeydown + }, _ctx.clearButtonProps, { + pt: _ctx.ptm("pcClearButton"), + "data-pc-group-section": "button" + }), null, 16, ["label", "class", "unstyled", "onKeydown", "pt"])], 16)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "footer")], 16, _hoisted_3$h)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onAfterEnter", "onAfterLeave", "onLeave"])]; + }), + _: 3 + }, 8, ["appendTo", "disabled"])], 16, _hoisted_1$s); +} +__name(render$V, "render$V"); +script$12.render = render$V; +var script$11 = { + name: "Calendar", + "extends": script$12, + mounted: /* @__PURE__ */ __name(function mounted6() { + console.warn("Deprecated since v4. Use DatePicker component instead."); + }, "mounted") +}; +var CalendarStyle = BaseStyle.extend({ + name: "calendar" +}); +var theme$y = /* @__PURE__ */ __name(function theme6(_ref) { + var dt = _ref.dt; + return "\n.p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n background: ".concat(dt("cascadeselect.background"), ";\n border: 1px solid ").concat(dt("cascadeselect.border.color"), ";\n transition: background ").concat(dt("cascadeselect.transition.duration"), ", color ").concat(dt("cascadeselect.transition.duration"), ", border-color ").concat(dt("cascadeselect.transition.duration"), ", outline-color ").concat(dt("cascadeselect.transition.duration"), ", box-shadow ").concat(dt("cascadeselect.transition.duration"), ";\n border-radius: ").concat(dt("cascadeselect.border.radius"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("cascadeselect.shadow"), ";\n}\n\n.p-cascadeselect:not(.p-disabled):hover {\n border-color: ").concat(dt("cascadeselect.hover.border.color"), ";\n}\n\n.p-cascadeselect:not(.p-disabled).p-focus {\n border-color: ").concat(dt("cascadeselect.focus.border.color"), ";\n box-shadow: ").concat(dt("cascadeselect.focus.ring.shadow"), ";\n outline: ").concat(dt("cascadeselect.focus.ring.width"), " ").concat(dt("cascadeselect.focus.ring.style"), " ").concat(dt("cascadeselect.focus.ring.color"), ";\n outline-offset: ").concat(dt("cascadeselect.focus.ring.offset"), ";\n}\n\n.p-cascadeselect.p-variant-filled {\n background: ").concat(dt("cascadeselect.filled.background"), ";\n}\n\n.p-cascadeselect.p-variant-filled:not(.p-disabled):hover {\n background: ").concat(dt("cascadeselect.filled.hover.background"), ";\n}\n\n.p-cascadeselect.p-variant-filled.p-focus {\n background: ").concat(dt("cascadeselect.filled.focus.background"), ";\n}\n\n.p-cascadeselect.p-invalid {\n border-color: ").concat(dt("cascadeselect.invalid.border.color"), ";\n}\n\n.p-cascadeselect.p-disabled {\n opacity: 1;\n background: ").concat(dt("cascadeselect.disabled.background"), ";\n}\n\n.p-cascadeselect-dropdown {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n color: ").concat(dt("cascadeselect.dropdown.color"), ";\n width: ").concat(dt("cascadeselect.dropdown.width"), ";\n border-start-end-radius: ").concat(dt("border.radius.md"), ";\n border-end-end-radius: ").concat(dt("border.radius.md"), ";\n}\n\n.p-cascadeselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n color: ").concat(dt("cascadeselect.clear.icon.color"), ";\n inset-inline-end: ").concat(dt("cascadeselect.dropdown.width"), ";\n}\n\n.p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: ").concat(dt("cascadeselect.padding.y"), " ").concat(dt("cascadeselect.padding.x"), ";\n background: transparent;\n border: 0 none;\n outline: 0 none;\n}\n\n.p-cascadeselect-label.p-placeholder {\n color: ").concat(dt("cascadeselect.placeholder.color"), ";\n}\n\n.p-cascadeselect.p-invalid .p-cascadeselect-label.p-placeholder {\n color: ").concat(dt("cascadeselect.invalid.placeholder.color"), ";\n}\n\n.p-cascadeselect.p-disabled .p-cascadeselect-label {\n color: ").concat(dt("cascadeselect.disabled.color"), ";\n}\n\n.p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n\n.p-cascadeselect-fluid {\n display: flex;\n}\n\n.p-cascadeselect-fluid .p-cascadeselect-label {\n width: 1%;\n}\n\n.p-cascadeselect-overlay {\n background: ").concat(dt("cascadeselect.overlay.background"), ";\n color: ").concat(dt("cascadeselect.overlay.color"), ";\n border: 1px solid ").concat(dt("cascadeselect.overlay.border.color"), ";\n border-radius: ").concat(dt("cascadeselect.overlay.border.radius"), ";\n box-shadow: ").concat(dt("cascadeselect.overlay.shadow"), ";\n}\n\n.p-cascadeselect .p-cascadeselect-overlay {\n min-width: 100%;\n}\n\n.p-cascadeselect-option-list {\n display: none;\n min-width: 100%;\n position: absolute;\n z-index: 1;\n}\n\n.p-cascadeselect-list {\n min-width: 100%;\n margin: 0;\n padding: 0;\n list-style-type: none;\n padding: ").concat(dt("cascadeselect.list.padding"), ";\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("cascadeselect.list.gap"), ";\n}\n\n.p-cascadeselect-option {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n border: 0 none;\n color: ").concat(dt("cascadeselect.option.color"), ";\n background: transparent;\n border-radius: ").concat(dt("cascadeselect.option.border.radius"), ";\n}\n\n.p-cascadeselect-option-active {\n overflow: visible;\n}\n\n.p-cascadeselect-option-active > .p-cascadeselect-option-content {\n background: ").concat(dt("cascadeselect.option.focus.background"), ";\n color: ").concat(dt("cascadeselect.option.focus.color"), ";\n}\n\n.p-cascadeselect-option:not(.p-cascadeselect-option-selected):not(.p-disabled).p-focus > .p-cascadeselect-option-content {\n background: ").concat(dt("cascadeselect.option.focus.background"), ";\n color: ").concat(dt("cascadeselect.option.focus.color"), ";\n}\n\n.p-cascadeselect-option:not(.p-cascadeselect-option-selected):not(.p-disabled).p-focus > .p-cascadeselect-option-content > .p-cascadeselect-group-icon-container > .p-cascadeselect-group-icon {\n color: ").concat(dt("cascadeselect.option.icon.focus.color"), ";\n}\n\n.p-cascadeselect-option-selected > .p-cascadeselect-option-content {\n background: ").concat(dt("cascadeselect.option.selected.background"), ";\n color: ").concat(dt("cascadeselect.option.selected.color"), ";\n}\n\n.p-cascadeselect-option-selected.p-focus > .p-cascadeselect-option-content {\n background: ").concat(dt("cascadeselect.option.selected.focus.background"), ";\n color: ").concat(dt("cascadeselect.option.selected.focus.color"), ";\n}\n\n.p-cascadeselect-option-active > .p-cascadeselect-option-list {\n inset-inline-start: 100%;\n inset-block-start: 0;\n}\n\n.p-cascadeselect-option-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n overflow: hidden;\n position: relative;\n padding: ").concat(dt("cascadeselect.option.padding"), ";\n border-radius: ").concat(dt("cascadeselect.option.border.radius"), ";\n transition: background ").concat(dt("cascadeselect.transition.duration"), ", color ").concat(dt("cascadeselect.transition.duration"), ", border-color ").concat(dt("cascadeselect.transition.duration"), ", box-shadow ").concat(dt("cascadeselect.transition.duration"), ", outline-color ").concat(dt("cascadeselect.transition.duration"), ";\n}\n\n.p-cascadeselect-group-icon {\n font-size: ").concat(dt("cascadeselect.option.icon.size"), ";\n width: ").concat(dt("cascadeselect.option.icon.size"), ";\n height: ").concat(dt("cascadeselect.option.icon.size"), ";\n color: ").concat(dt("cascadeselect.option.icon.color"), ";\n}\n\n.p-cascadeselect-group-icon:dir(rtl) {\n transform: rotate(180deg);\n}\n\n.p-cascadeselect-mobile-active .p-cascadeselect-option-list {\n position: static;\n box-shadow: none;\n border: 0 none;\n padding-inline-start: ").concat(dt("tieredmenu.submenu.mobile.indent"), ";\n padding-inline-end: 0;\n}\n\n.p-cascadeselect-mobile-active .p-cascadeselect-group-icon {\n transition: transform 0.2s;\n transform: rotate(90deg);\n}\n\n.p-cascadeselect-mobile-active .p-cascadeselect-option-active > .p-cascadeselect-option-content .p-cascadeselect-group-icon {\n transform: rotate(-90deg);\n}\n\n.p-cascadeselect-sm .p-cascadeselect-label {\n font-size: ").concat(dt("cascadeselect.sm.font.size"), ";\n padding-block: ").concat(dt("cascadeselect.sm.padding.y"), ";\n padding-inline: ").concat(dt("cascadeselect.sm.padding.x"), ";\n}\n\n.p-cascadeselect-sm .p-cascadeselect-dropdown .p-icon {\n font-size: ").concat(dt("cascadeselect.sm.font.size"), ";\n width: ").concat(dt("cascadeselect.sm.font.size"), ";\n height: ").concat(dt("cascadeselect.sm.font.size"), ";\n}\n\n.p-cascadeselect-lg .p-cascadeselect-label {\n font-size: ").concat(dt("cascadeselect.lg.font.size"), ";\n padding-block: ").concat(dt("cascadeselect.lg.padding.y"), ";\n padding-inline: ").concat(dt("cascadeselect.lg.padding.x"), ";\n}\n\n.p-cascadeselect-lg .p-cascadeselect-dropdown .p-icon {\n font-size: ").concat(dt("cascadeselect.lg.font.size"), ";\n width: ").concat(dt("cascadeselect.lg.font.size"), ";\n height: ").concat(dt("cascadeselect.lg.font.size"), ";\n}\n"); +}, "theme"); +var inlineStyles$7 = { + root: /* @__PURE__ */ __name(function root6(_ref2) { + var props = _ref2.props; + return { + position: props.appendTo === "self" ? "relative" : void 0 + }; + }, "root") +}; +var classes$C = { + root: /* @__PURE__ */ __name(function root7(_ref3) { + var instance = _ref3.instance, props = _ref3.props; + return ["p-cascadeselect p-component p-inputwrapper", { + "p-cascadeselect-mobile": instance.queryMatches, + "p-disabled": props.disabled, + "p-invalid": instance.$invalid, + "p-variant-filled": instance.$variant === "filled", + "p-focus": instance.focused, + "p-inputwrapper-filled": instance.$filled, + "p-inputwrapper-focus": instance.focused || instance.overlayVisible, + "p-cascadeselect-open": instance.overlayVisible, + "p-cascadeselect-fluid": instance.$fluid, + "p-cascadeselect-sm p-inputfield-sm": props.size === "small", + "p-cascadeselect-lg p-inputfield-lg": props.size === "large" + }]; + }, "root"), + label: /* @__PURE__ */ __name(function label2(_ref4) { + var instance = _ref4.instance, props = _ref4.props; + return ["p-cascadeselect-label", { + "p-placeholder": instance.label === props.placeholder, + "p-cascadeselect-label-empty": !instance.$slots["value"] && (instance.label === "p-emptylabel" || instance.label.length === 0) + }]; + }, "label"), + clearIcon: "p-cascadeselect-clear-icon", + dropdown: "p-cascadeselect-dropdown", + loadingIcon: "p-cascadeselect-loading-icon", + dropdownIcon: "p-cascadeselect-dropdown-icon", + overlay: /* @__PURE__ */ __name(function overlay(_ref5) { + var instance = _ref5.instance; + return ["p-cascadeselect-overlay p-component", { + "p-cascadeselect-mobile-active": instance.queryMatches + }]; + }, "overlay"), + listContainer: "p-cascadeselect-list-container", + list: "p-cascadeselect-list", + option: /* @__PURE__ */ __name(function option(_ref6) { + var instance = _ref6.instance, processedOption = _ref6.processedOption; + return ["p-cascadeselect-option", { + "p-cascadeselect-option-active": instance.isOptionActive(processedOption), + "p-cascadeselect-option-selected": instance.isOptionSelected(processedOption), + "p-focus": instance.isOptionFocused(processedOption), + "p-disabled": instance.isOptionDisabled(processedOption) + }]; + }, "option"), + optionContent: "p-cascadeselect-option-content", + optionText: "p-cascadeselect-option-text", + groupIconContainer: "p-cascadeselect-group-icon-container", + groupIcon: "p-cascadeselect-group-icon", + optionList: "p-cascadeselect-overlay p-cascadeselect-option-list" +}; +var CascadeSelectStyle = BaseStyle.extend({ + name: "cascadeselect", + theme: theme$y, + classes: classes$C, + inlineStyles: inlineStyles$7 +}); +var script$2$8 = { + name: "BaseCascadeSelect", + "extends": script$1n, + props: { + options: Array, + optionLabel: null, + optionValue: null, + optionDisabled: null, + optionGroupLabel: null, + optionGroupChildren: null, + placeholder: String, + breakpoint: { + type: String, + "default": "960px" + }, + dataKey: null, + showClear: { + type: Boolean, + "default": false + }, + clearIcon: { + type: String, + "default": void 0 + }, + inputId: { + type: String, + "default": null + }, + inputClass: { + type: [String, Object], + "default": null + }, + inputStyle: { + type: Object, + "default": null + }, + inputProps: { + type: null, + "default": null + }, + panelClass: { + type: [String, Object], + "default": null + }, + panelStyle: { + type: Object, + "default": null + }, + panelProps: { + type: null, + "default": null + }, + overlayClass: { + type: [String, Object], + "default": null + }, + overlayStyle: { + type: Object, + "default": null + }, + overlayProps: { + type: null, + "default": null + }, + appendTo: { + type: [String, Object], + "default": "body" + }, + loading: { + type: Boolean, + "default": false + }, + dropdownIcon: { + type: String, + "default": void 0 + }, + loadingIcon: { + type: String, + "default": void 0 + }, + optionGroupIcon: { + type: String, + "default": void 0 + }, + autoOptionFocus: { + type: Boolean, + "default": false + }, + selectOnFocus: { + type: Boolean, + "default": false + }, + focusOnHover: { + type: Boolean, + "default": true + }, + searchLocale: { + type: String, + "default": void 0 + }, + searchMessage: { + type: String, + "default": null + }, + selectionMessage: { + type: String, + "default": null + }, + emptySelectionMessage: { + type: String, + "default": null + }, + emptySearchMessage: { + type: String, + "default": null + }, + emptyMessage: { + type: String, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: CascadeSelectStyle, + provide: /* @__PURE__ */ __name(function provide11() { + return { + $pcCascadeSelect: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$E = { + name: "CascadeSelectSub", + hostName: "CascadeSelect", + "extends": script$1d, + emits: ["option-change", "option-focus-change", "option-focus-enter-change"], + container: null, + props: { + selectId: String, + focusedOptionId: String, + options: Array, + optionLabel: String, + optionValue: String, + optionDisabled: null, + optionGroupIcon: String, + optionGroupLabel: String, + optionGroupChildren: { + type: [String, Array], + "default": null + }, + activeOptionPath: Array, + level: Number, + templates: null, + value: null + }, + methods: { + getOptionId: /* @__PURE__ */ __name(function getOptionId(processedOption) { + return "".concat(this.selectId, "_").concat(processedOption.key); + }, "getOptionId"), + getOptionLabel: /* @__PURE__ */ __name(function getOptionLabel(processedOption) { + return this.optionLabel ? resolveFieldData(processedOption.option, this.optionLabel) : processedOption.option; + }, "getOptionLabel"), + getOptionValue: /* @__PURE__ */ __name(function getOptionValue(processedOption) { + return this.optionValue ? resolveFieldData(processedOption.option, this.optionValue) : processedOption.option; + }, "getOptionValue"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions(processedOption, index, key) { + return this.ptm(key, { + context: { + option: processedOption, + index, + level: this.level, + optionGroup: this.isOptionGroup(processedOption), + active: this.isOptionActive(processedOption), + focused: this.isOptionFocused(processedOption), + disabled: this.isOptionDisabled(processedOption) + } + }); + }, "getPTOptions"), + isOptionDisabled: /* @__PURE__ */ __name(function isOptionDisabled(processedOption) { + return this.optionDisabled ? resolveFieldData(processedOption.option, this.optionDisabled) : false; + }, "isOptionDisabled"), + getOptionGroupLabel: /* @__PURE__ */ __name(function getOptionGroupLabel(processedOption) { + return this.optionGroupLabel ? resolveFieldData(processedOption.option, this.optionGroupLabel) : null; + }, "getOptionGroupLabel"), + getOptionGroupChildren: /* @__PURE__ */ __name(function getOptionGroupChildren(processedOption) { + return processedOption.children; + }, "getOptionGroupChildren"), + isOptionGroup: /* @__PURE__ */ __name(function isOptionGroup(processedOption) { + return isNotEmpty(processedOption.children); + }, "isOptionGroup"), + isOptionSelected: /* @__PURE__ */ __name(function isOptionSelected(processedOption) { + return equals(this.value, processedOption === null || processedOption === void 0 ? void 0 : processedOption.option); + }, "isOptionSelected"), + isOptionActive: /* @__PURE__ */ __name(function isOptionActive(processedOption) { + return this.activeOptionPath.some(function(path) { + return path.key === processedOption.key; + }); + }, "isOptionActive"), + isOptionFocused: /* @__PURE__ */ __name(function isOptionFocused(processedOption) { + return this.focusedOptionId === this.getOptionId(processedOption); + }, "isOptionFocused"), + getOptionLabelToRender: /* @__PURE__ */ __name(function getOptionLabelToRender(processedOption) { + return this.isOptionGroup(processedOption) ? this.getOptionGroupLabel(processedOption) : this.getOptionLabel(processedOption); + }, "getOptionLabelToRender"), + onOptionClick: /* @__PURE__ */ __name(function onOptionClick(event2, processedOption) { + this.$emit("option-change", { + originalEvent: event2, + processedOption, + isFocus: true + }); + }, "onOptionClick"), + onOptionMouseEnter: /* @__PURE__ */ __name(function onOptionMouseEnter(event2, processedOption) { + this.$emit("option-focus-enter-change", { + originalEvent: event2, + processedOption + }); + }, "onOptionMouseEnter"), + onOptionMouseMove: /* @__PURE__ */ __name(function onOptionMouseMove(event2, processedOption) { + this.$emit("option-focus-change", { + originalEvent: event2, + processedOption + }); + }, "onOptionMouseMove"), + containerRef: /* @__PURE__ */ __name(function containerRef2(el) { + this.container = el; + }, "containerRef"), + listAriaLabel: /* @__PURE__ */ __name(function listAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : void 0; + }, "listAriaLabel") + }, + directives: { + ripple: Ripple + }, + components: { + AngleRightIcon: script$1q + } +}; +var _hoisted_1$1$6 = ["id", "aria-label", "aria-selected", "aria-expanded", "aria-level", "aria-setsize", "aria-posinset", "data-p-option-group", "data-p-active", "data-p-focus", "data-p-disabled"]; +var _hoisted_2$k = ["onClick", "onMouseenter", "onMousemove"]; +function render$1$8(_ctx, _cache, $props, $setup, $data, $options) { + var _component_AngleRightIcon = resolveComponent("AngleRightIcon"); + var _component_CascadeSelectSub = resolveComponent("CascadeSelectSub", true); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("ul", mergeProps({ + ref: $options.containerRef, + "class": _ctx.cx("list") + }, $props.level === 0 ? _ctx.ptm("list") : _ctx.ptm("optionList")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.options, function(processedOption, index) { + return openBlock(), createElementBlock("li", mergeProps({ + key: $options.getOptionLabelToRender(processedOption), + id: $options.getOptionId(processedOption), + "class": _ctx.cx("option", { + processedOption + }), + role: "treeitem", + "aria-label": $options.getOptionLabelToRender(processedOption), + "aria-selected": $options.isOptionGroup(processedOption) ? void 0 : $options.isOptionSelected(processedOption), + "aria-expanded": $options.isOptionGroup(processedOption) ? $options.isOptionActive(processedOption) : void 0, + "aria-level": $props.level + 1, + "aria-setsize": $props.options.length, + "aria-posinset": index + 1, + ref_for: true + }, $options.getPTOptions(processedOption, index, "option"), { + "data-p-option-group": $options.isOptionGroup(processedOption), + "data-p-active": $options.isOptionActive(processedOption), + "data-p-focus": $options.isOptionFocused(processedOption), + "data-p-disabled": $options.isOptionDisabled(processedOption) + }), [withDirectives((openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("optionContent"), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onOptionClick($event, processedOption); + }, "onClick"), + onMouseenter: /* @__PURE__ */ __name(function onMouseenter($event) { + return $options.onOptionMouseEnter($event, processedOption); + }, "onMouseenter"), + onMousemove: /* @__PURE__ */ __name(function onMousemove($event) { + return $options.onOptionMouseMove($event, processedOption); + }, "onMousemove"), + ref_for: true + }, $options.getPTOptions(processedOption, index, "optionContent")), [$props.templates["option"] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates["option"]), { + key: 0, + option: processedOption.option, + selected: $options.isOptionGroup(processedOption) ? false : $options.isOptionSelected(processedOption) + }, null, 8, ["option", "selected"])) : (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": _ctx.cx("optionText"), + ref_for: true + }, $options.getPTOptions(processedOption, index, "optionText")), toDisplayString($options.getOptionLabelToRender(processedOption)), 17)), $options.isOptionGroup(processedOption) ? (openBlock(), createElementBlock("span", { + key: 2, + "class": normalizeClass(_ctx.cx("groupIconContainer")) + }, [$props.templates["optiongroupicon"] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates["optiongroupicon"]), { + key: 0, + "class": normalizeClass(_ctx.cx("groupIcon")) + }, null, 8, ["class"])) : $props.optionGroupIcon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": [_ctx.cx("groupIcon"), $props.optionGroupIcon], + "aria-hidden": "true", + ref_for: true + }, $options.getPTOptions(processedOption, index, "groupIcon")), null, 16)) : (openBlock(), createBlock(_component_AngleRightIcon, mergeProps({ + key: 2, + "class": _ctx.cx("groupIcon"), + "aria-hidden": "true", + ref_for: true + }, $options.getPTOptions(processedOption, index, "groupIcon")), null, 16, ["class"]))], 2)) : createCommentVNode("", true)], 16, _hoisted_2$k)), [[_directive_ripple]]), $options.isOptionGroup(processedOption) && $options.isOptionActive(processedOption) ? (openBlock(), createBlock(_component_CascadeSelectSub, { + key: 0, + role: "group", + "class": normalizeClass(_ctx.cx("optionList")), + selectId: $props.selectId, + focusedOptionId: $props.focusedOptionId, + options: $options.getOptionGroupChildren(processedOption), + activeOptionPath: $props.activeOptionPath, + level: $props.level + 1, + templates: $props.templates, + optionLabel: $props.optionLabel, + optionValue: $props.optionValue, + optionDisabled: $props.optionDisabled, + optionGroupIcon: $props.optionGroupIcon, + optionGroupLabel: $props.optionGroupLabel, + optionGroupChildren: $props.optionGroupChildren, + value: $props.value, + onOptionChange: _cache[0] || (_cache[0] = function($event) { + return _ctx.$emit("option-change", $event); + }), + onOptionFocusChange: _cache[1] || (_cache[1] = function($event) { + return _ctx.$emit("option-focus-change", $event); + }), + onOptionFocusEnterChange: _cache[2] || (_cache[2] = function($event) { + return _ctx.$emit("option-focus-enter-change", $event); + }), + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["class", "selectId", "focusedOptionId", "options", "activeOptionPath", "level", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "value", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_1$1$6); + }), 128))], 16); +} +__name(render$1$8, "render$1$8"); +script$1$E.render = render$1$8; +function _typeof$1$3(o) { + "@babel/helpers - typeof"; + return _typeof$1$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$1$3(o); +} +__name(_typeof$1$3, "_typeof$1$3"); +function ownKeys$1$2(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$1$2, "ownKeys$1$2"); +function _objectSpread$1$2(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$1$2(Object(t2), true).forEach(function(r2) { + _defineProperty$1$3(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$1$2(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$1$2, "_objectSpread$1$2"); +function _defineProperty$1$3(e, r, t2) { + return (r = _toPropertyKey$1$3(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$1$3, "_defineProperty$1$3"); +function _toPropertyKey$1$3(t2) { + var i = _toPrimitive$1$3(t2, "string"); + return "symbol" == _typeof$1$3(i) ? i : i + ""; +} +__name(_toPropertyKey$1$3, "_toPropertyKey$1$3"); +function _toPrimitive$1$3(t2, r) { + if ("object" != _typeof$1$3(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$1$3(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$1$3, "_toPrimitive$1$3"); +var script$10 = { + name: "CascadeSelect", + "extends": script$2$8, + inheritAttrs: false, + emits: ["change", "focus", "blur", "click", "group-change", "before-show", "before-hide", "hide", "show"], + outsideClickListener: null, + matchMediaListener: null, + scrollHandler: null, + resizeListener: null, + overlay: null, + searchTimeout: null, + searchValue: null, + data: /* @__PURE__ */ __name(function data4() { + return { + id: this.$attrs.id, + clicked: false, + focused: false, + focusedOptionInfo: { + index: -1, + level: 0, + parentKey: "" + }, + activeOptionPath: [], + overlayVisible: false, + dirty: false, + mobileActive: false, + query: null, + queryMatches: false + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId2(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + options: /* @__PURE__ */ __name(function options() { + this.autoUpdateModel(); + }, "options") + }, + mounted: /* @__PURE__ */ __name(function mounted7() { + this.id = this.id || UniqueComponentId(); + this.autoUpdateModel(); + this.bindMatchMediaListener(); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount3() { + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + this.unbindMatchMediaListener(); + if (this.scrollHandler) { + this.scrollHandler.destroy(); + this.scrollHandler = null; + } + if (this.overlay) { + ZIndex.clear(this.overlay); + this.overlay = null; + } + if (this.mobileActive) { + this.mobileActive = false; + } + }, "beforeUnmount"), + methods: { + getOptionLabel: /* @__PURE__ */ __name(function getOptionLabel2(option4) { + return this.optionLabel ? resolveFieldData(option4, this.optionLabel) : option4; + }, "getOptionLabel"), + getOptionValue: /* @__PURE__ */ __name(function getOptionValue2(option4) { + return this.optionValue ? resolveFieldData(option4, this.optionValue) : option4; + }, "getOptionValue"), + isOptionDisabled: /* @__PURE__ */ __name(function isOptionDisabled2(option4) { + return this.optionDisabled ? resolveFieldData(option4, this.optionDisabled) : false; + }, "isOptionDisabled"), + getOptionGroupLabel: /* @__PURE__ */ __name(function getOptionGroupLabel2(optionGroup) { + return this.optionGroupLabel ? resolveFieldData(optionGroup, this.optionGroupLabel) : null; + }, "getOptionGroupLabel"), + getOptionGroupChildren: /* @__PURE__ */ __name(function getOptionGroupChildren2(optionGroup, level) { + return isString(this.optionGroupChildren) ? resolveFieldData(optionGroup, this.optionGroupChildren) : resolveFieldData(optionGroup, this.optionGroupChildren[level]); + }, "getOptionGroupChildren"), + isOptionGroup: /* @__PURE__ */ __name(function isOptionGroup2(option4, level) { + return Object.prototype.hasOwnProperty.call(option4, this.optionGroupChildren[level]); + }, "isOptionGroup"), + getProccessedOptionLabel: /* @__PURE__ */ __name(function getProccessedOptionLabel() { + var processedOption = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var grouped = this.isProccessedOptionGroup(processedOption); + return grouped ? this.getOptionGroupLabel(processedOption.option, processedOption.level) : this.getOptionLabel(processedOption.option); + }, "getProccessedOptionLabel"), + isProccessedOptionGroup: /* @__PURE__ */ __name(function isProccessedOptionGroup(processedOption) { + return isNotEmpty(processedOption === null || processedOption === void 0 ? void 0 : processedOption.children); + }, "isProccessedOptionGroup"), + show: /* @__PURE__ */ __name(function show(isFocus) { + this.$emit("before-show"); + this.overlayVisible = true; + this.activeOptionPath = this.$filled ? this.findOptionPathByValue(this.d_value) : this.activeOptionPath; + if (this.$filled && isNotEmpty(this.activeOptionPath)) { + var processedOption = this.activeOptionPath[this.activeOptionPath.length - 1]; + this.focusedOptionInfo = { + index: processedOption.index, + level: processedOption.level, + parentKey: processedOption.parentKey + }; + } else { + this.focusedOptionInfo = { + index: this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex(), + level: 0, + parentKey: "" + }; + } + isFocus && focus(this.$refs.focusInput); + }, "show"), + hide: /* @__PURE__ */ __name(function hide2(isFocus) { + var _this = this; + var _hide = /* @__PURE__ */ __name(function _hide2() { + _this.$emit("before-hide"); + _this.overlayVisible = false; + _this.clicked = false; + _this.activeOptionPath = []; + _this.focusedOptionInfo = { + index: -1, + level: 0, + parentKey: "" + }; + isFocus && focus(_this.$refs.focusInput); + }, "_hide"); + setTimeout(function() { + _hide(); + }, 0); + }, "hide"), + onFocus: /* @__PURE__ */ __name(function onFocus3(event2) { + if (this.disabled) { + return; + } + this.focused = true; + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur2(event2) { + var _this$formField$onBlu, _this$formField; + this.focused = false; + this.focusedOptionInfo = { + index: -1, + level: 0, + parentKey: "" + }; + this.searchValue = ""; + this.$emit("blur", event2); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField); + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown2(event2) { + if (this.disabled || this.loading) { + event2.preventDefault(); + return; + } + var metaKey = event2.metaKey || event2.ctrlKey; + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "ArrowLeft": + this.onArrowLeftKey(event2); + break; + case "ArrowRight": + this.onArrowRightKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "Space": + this.onSpaceKey(event2); + break; + case "Enter": + case "NumpadEnter": + this.onEnterKey(event2); + break; + case "Escape": + this.onEscapeKey(event2); + break; + case "Tab": + this.onTabKey(event2); + break; + case "PageDown": + case "PageUp": + case "Backspace": + case "ShiftLeft": + case "ShiftRight": + break; + default: + if (!metaKey && isPrintableCharacter(event2.key)) { + !this.overlayVisible && this.show(); + this.searchOptions(event2, event2.key); + } + break; + } + this.clicked = false; + }, "onKeyDown"), + onOptionChange: /* @__PURE__ */ __name(function onOptionChange(event2) { + var processedOption = event2.processedOption, type = event2.type; + if (isEmpty(processedOption)) return; + var index = processedOption.index, key = processedOption.key, level = processedOption.level, parentKey = processedOption.parentKey, children = processedOption.children; + var grouped = isNotEmpty(children); + var activeOptionPath = this.activeOptionPath.filter(function(p) { + return p.parentKey !== parentKey && p.parentKey !== key; + }); + this.focusedOptionInfo = { + index, + level, + parentKey + }; + if (type == "hover" && this.queryMatches) { + return; + } + if (grouped) { + activeOptionPath.push(processedOption); + } + this.activeOptionPath = activeOptionPath; + }, "onOptionChange"), + onOptionClick: /* @__PURE__ */ __name(function onOptionClick2(event2) { + var originalEvent = event2.originalEvent, processedOption = event2.processedOption, isFocus = event2.isFocus, isHide = event2.isHide, preventSelection = event2.preventSelection; + var index = processedOption.index, key = processedOption.key, level = processedOption.level, parentKey = processedOption.parentKey; + var grouped = this.isProccessedOptionGroup(processedOption); + var selected3 = this.isSelected(processedOption); + if (selected3) { + this.activeOptionPath = this.activeOptionPath.filter(function(p) { + return key !== p.key && key.startsWith(p.key); + }); + this.focusedOptionInfo = { + index, + level, + parentKey + }; + } else { + if (grouped) { + this.onOptionChange(event2); + this.onOptionGroupSelect(originalEvent, processedOption); + } else { + var activeOptionPath = this.activeOptionPath.filter(function(p) { + return p.parentKey !== parentKey; + }); + activeOptionPath.push(processedOption); + this.focusedOptionInfo = { + index, + level, + parentKey + }; + if (!preventSelection || (processedOption === null || processedOption === void 0 ? void 0 : processedOption.children.length) !== 0) { + this.activeOptionPath = activeOptionPath; + this.onOptionSelect(originalEvent, processedOption, isHide); + } + } + } + isFocus && focus(this.$refs.focusInput); + }, "onOptionClick"), + onOptionMouseEnter: /* @__PURE__ */ __name(function onOptionMouseEnter2(event2) { + if (this.focusOnHover) { + if (this.dirty || !this.dirty && isNotEmpty(this.d_value)) { + this.onOptionChange(_objectSpread$1$2(_objectSpread$1$2({}, event2), {}, { + type: "hover" + })); + } else if (!this.dirty && event2.processedOption.level === 0) { + this.onOptionClick(_objectSpread$1$2(_objectSpread$1$2({}, event2), {}, { + type: "hover" + })); + } + } + }, "onOptionMouseEnter"), + onOptionMouseMove: /* @__PURE__ */ __name(function onOptionMouseMove2(event2) { + if (this.focused && this.focusOnHover) { + this.changeFocusedOptionIndex(event2, event2.processedOption.index); + } + }, "onOptionMouseMove"), + onOptionSelect: /* @__PURE__ */ __name(function onOptionSelect(event2, processedOption) { + var isHide = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + var value2 = this.getOptionValue(processedOption === null || processedOption === void 0 ? void 0 : processedOption.option); + this.activeOptionPath.forEach(function(p) { + return p.selected = true; + }); + this.updateModel(event2, value2); + isHide && this.hide(true); + }, "onOptionSelect"), + onOptionGroupSelect: /* @__PURE__ */ __name(function onOptionGroupSelect(event2, processedOption) { + this.dirty = true; + this.$emit("group-change", { + originalEvent: event2, + value: processedOption.option + }); + }, "onOptionGroupSelect"), + onContainerClick: /* @__PURE__ */ __name(function onContainerClick(event2) { + if (this.disabled || this.loading) { + return; + } + if (event2.target.getAttribute("data-pc-section") === "clearicon" || event2.target.closest('[data-pc-section="clearicon"]')) { + return; + } else if (!this.overlay || !this.overlay.contains(event2.target)) { + this.overlayVisible ? this.hide() : this.show(); + focus(this.$refs.focusInput); + } + this.clicked = true; + this.$emit("click", event2); + }, "onContainerClick"), + onClearClick: /* @__PURE__ */ __name(function onClearClick(event2) { + this.updateModel(event2, null); + }, "onClearClick"), + onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick2(event2) { + OverlayEventBus.emit("overlay-click", { + originalEvent: event2, + target: this.$el + }); + }, "onOverlayClick"), + onOverlayKeyDown: /* @__PURE__ */ __name(function onOverlayKeyDown2(event2) { + switch (event2.code) { + case "Escape": + this.onEscapeKey(event2); + break; + } + }, "onOverlayKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey2(event2) { + if (!this.overlayVisible) { + this.show(); + } else { + var optionIndex = this.focusedOptionInfo.index !== -1 ? this.findNextOptionIndex(this.focusedOptionInfo.index) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex(); + this.changeFocusedOptionIndex(event2, optionIndex, true); + } + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey2(event2) { + if (event2.altKey) { + if (this.focusedOptionInfo.index !== -1) { + var processedOption = this.visibleOptions[this.focusedOptionInfo.index]; + var grouped = this.isProccessedOptionGroup(processedOption); + !grouped && this.onOptionChange({ + originalEvent: event2, + processedOption + }); + } + this.overlayVisible && this.hide(); + event2.preventDefault(); + } else { + var optionIndex = this.focusedOptionInfo.index !== -1 ? this.findPrevOptionIndex(this.focusedOptionInfo.index) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex(); + this.changeFocusedOptionIndex(event2, optionIndex, true); + !this.overlayVisible && this.show(); + event2.preventDefault(); + } + }, "onArrowUpKey"), + onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey(event2) { + var _this2 = this; + if (this.overlayVisible) { + var processedOption = this.visibleOptions[this.focusedOptionInfo.index]; + var parentOption = this.activeOptionPath.find(function(p) { + return p.key === (processedOption === null || processedOption === void 0 ? void 0 : processedOption.parentKey); + }); + var matched = this.focusedOptionInfo.parentKey === "" || parentOption && parentOption.key === this.focusedOptionInfo.parentKey; + var root35 = isEmpty(processedOption === null || processedOption === void 0 ? void 0 : processedOption.parent); + if (matched) { + this.activeOptionPath = this.activeOptionPath.filter(function(p) { + return p.parentKey !== _this2.focusedOptionInfo.parentKey; + }); + } + if (!root35) { + this.focusedOptionInfo = { + index: -1, + parentKey: parentOption ? parentOption.parentKey : "" + }; + this.searchValue = ""; + this.onArrowDownKey(event2); + } + event2.preventDefault(); + } + }, "onArrowLeftKey"), + onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey(event2) { + if (this.overlayVisible) { + var processedOption = this.visibleOptions[this.focusedOptionInfo.index]; + var grouped = this.isProccessedOptionGroup(processedOption); + if (grouped) { + var matched = this.activeOptionPath.some(function(p) { + return (processedOption === null || processedOption === void 0 ? void 0 : processedOption.key) === p.key; + }); + if (matched) { + this.focusedOptionInfo = { + index: -1, + parentKey: processedOption === null || processedOption === void 0 ? void 0 : processedOption.key + }; + this.searchValue = ""; + this.onArrowDownKey(event2); + } else { + this.onOptionChange({ + originalEvent: event2, + processedOption + }); + } + } + event2.preventDefault(); + } + }, "onArrowRightKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey2(event2) { + this.changeFocusedOptionIndex(event2, this.findFirstOptionIndex()); + !this.overlayVisible && this.show(); + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey2(event2) { + this.changeFocusedOptionIndex(event2, this.findLastOptionIndex()); + !this.overlayVisible && this.show(); + event2.preventDefault(); + }, "onEndKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey2(event2) { + if (!this.overlayVisible) { + this.focusedOptionInfo.index !== -1; + this.onArrowDownKey(event2); + } else { + if (this.focusedOptionInfo.index !== -1) { + var processedOption = this.visibleOptions[this.focusedOptionInfo.index]; + var grouped = this.isProccessedOptionGroup(processedOption); + this.onOptionClick({ + originalEvent: event2, + processedOption, + preventSelection: false + }); + !grouped && this.hide(); + } + } + event2.preventDefault(); + }, "onEnterKey"), + onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey(event2) { + this.onEnterKey(event2); + }, "onSpaceKey"), + onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey(event2) { + this.overlayVisible && this.hide(true); + event2.preventDefault(); + }, "onEscapeKey"), + onTabKey: /* @__PURE__ */ __name(function onTabKey(event2) { + if (this.focusedOptionInfo.index !== -1) { + var processedOption = this.visibleOptions[this.focusedOptionInfo.index]; + var grouped = this.isProccessedOptionGroup(processedOption); + !grouped && this.onOptionChange({ + originalEvent: event2, + processedOption + }); + } + this.overlayVisible && this.hide(); + }, "onTabKey"), + onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter2(el) { + ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); + addStyle(el, { + position: "absolute", + top: "0", + left: "0" + }); + this.alignOverlay(); + this.scrollInView(); + }, "onOverlayEnter"), + onOverlayAfterEnter: /* @__PURE__ */ __name(function onOverlayAfterEnter() { + this.bindOutsideClickListener(); + this.bindScrollListener(); + this.bindResizeListener(); + this.$emit("show"); + }, "onOverlayAfterEnter"), + onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave2() { + this.unbindOutsideClickListener(); + this.unbindScrollListener(); + this.unbindResizeListener(); + this.$emit("hide"); + this.overlay = null; + this.dirty = false; + }, "onOverlayLeave"), + onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave2(el) { + ZIndex.clear(el); + }, "onOverlayAfterLeave"), + alignOverlay: /* @__PURE__ */ __name(function alignOverlay2() { + if (this.appendTo === "self") { + relativePosition(this.overlay, this.$el); + } else { + this.overlay.style.minWidth = getOuterWidth(this.$el) + "px"; + absolutePosition(this.overlay, this.$el); + } + }, "alignOverlay"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener3() { + var _this3 = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + if (_this3.overlayVisible && _this3.overlay && !_this3.$el.contains(event2.target) && !_this3.overlay.contains(event2.target)) { + _this3.hide(); + } + }; + document.addEventListener("click", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener3() { + if (this.outsideClickListener) { + document.removeEventListener("click", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener2() { + var _this4 = this; + if (!this.scrollHandler) { + this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function() { + if (_this4.overlayVisible) { + _this4.hide(); + } + }); + } + this.scrollHandler.bindScrollListener(); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener2() { + if (this.scrollHandler) { + this.scrollHandler.unbindScrollListener(); + } + }, "unbindScrollListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener2() { + var _this5 = this; + if (!this.resizeListener) { + this.resizeListener = function() { + if (_this5.overlayVisible && !isTouchDevice()) { + _this5.hide(); + } + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener2() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener2() { + var _this6 = this; + if (!this.matchMediaListener) { + var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); + this.query = query; + this.queryMatches = query.matches; + this.matchMediaListener = function() { + _this6.queryMatches = query.matches; + _this6.mobileActive = false; + }; + this.query.addEventListener("change", this.matchMediaListener); + } + }, "bindMatchMediaListener"), + unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener2() { + if (this.matchMediaListener) { + this.query.removeEventListener("change", this.matchMediaListener); + this.matchMediaListener = null; + } + }, "unbindMatchMediaListener"), + isOptionMatched: /* @__PURE__ */ __name(function isOptionMatched(processedOption) { + var _this$getProccessedOp; + return this.isValidOption(processedOption) && ((_this$getProccessedOp = this.getProccessedOptionLabel(processedOption)) === null || _this$getProccessedOp === void 0 ? void 0 : _this$getProccessedOp.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))); + }, "isOptionMatched"), + isValidOption: /* @__PURE__ */ __name(function isValidOption(processedOption) { + return isNotEmpty(processedOption) && !this.isOptionDisabled(processedOption.option); + }, "isValidOption"), + isValidSelectedOption: /* @__PURE__ */ __name(function isValidSelectedOption(processedOption) { + return this.isValidOption(processedOption) && this.isSelected(processedOption); + }, "isValidSelectedOption"), + isSelected: /* @__PURE__ */ __name(function isSelected2(processedOption) { + return this.activeOptionPath.some(function(p) { + return p.key === processedOption.key; + }); + }, "isSelected"), + findFirstOptionIndex: /* @__PURE__ */ __name(function findFirstOptionIndex() { + var _this7 = this; + return this.visibleOptions.findIndex(function(processedOption) { + return _this7.isValidOption(processedOption); + }); + }, "findFirstOptionIndex"), + findLastOptionIndex: /* @__PURE__ */ __name(function findLastOptionIndex() { + var _this8 = this; + return findLastIndex(this.visibleOptions, function(processedOption) { + return _this8.isValidOption(processedOption); + }); + }, "findLastOptionIndex"), + findNextOptionIndex: /* @__PURE__ */ __name(function findNextOptionIndex(index) { + var _this9 = this; + var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function(processedOption) { + return _this9.isValidOption(processedOption); + }) : -1; + return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index; + }, "findNextOptionIndex"), + findPrevOptionIndex: /* @__PURE__ */ __name(function findPrevOptionIndex(index) { + var _this10 = this; + var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function(processedOption) { + return _this10.isValidOption(processedOption); + }) : -1; + return matchedOptionIndex > -1 ? matchedOptionIndex : index; + }, "findPrevOptionIndex"), + findSelectedOptionIndex: /* @__PURE__ */ __name(function findSelectedOptionIndex() { + var _this11 = this; + return this.visibleOptions.findIndex(function(processedOption) { + return _this11.isValidSelectedOption(processedOption); + }); + }, "findSelectedOptionIndex"), + findFirstFocusedOptionIndex: /* @__PURE__ */ __name(function findFirstFocusedOptionIndex() { + var selectedIndex = this.findSelectedOptionIndex(); + return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex; + }, "findFirstFocusedOptionIndex"), + findLastFocusedOptionIndex: /* @__PURE__ */ __name(function findLastFocusedOptionIndex() { + var selectedIndex = this.findSelectedOptionIndex(); + return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex; + }, "findLastFocusedOptionIndex"), + findOptionPathByValue: /* @__PURE__ */ __name(function findOptionPathByValue(value2, processedOptions2) { + var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + processedOptions2 = processedOptions2 || level === 0 && this.processedOptions; + if (!processedOptions2) return null; + if (isEmpty(value2)) return []; + for (var i = 0; i < processedOptions2.length; i++) { + var processedOption = processedOptions2[i]; + if (equals(value2, this.getOptionValue(processedOption.option), this.equalityKey)) { + return [processedOption]; + } + var matchedOptions = this.findOptionPathByValue(value2, processedOption.children, level + 1); + if (matchedOptions) { + matchedOptions.unshift(processedOption); + return matchedOptions; + } + } + }, "findOptionPathByValue"), + searchOptions: /* @__PURE__ */ __name(function searchOptions(event2, _char) { + var _this12 = this; + this.searchValue = (this.searchValue || "") + _char; + var optionIndex = -1; + var matched = false; + if (isNotEmpty(this.searchValue)) { + if (this.focusedOptionInfo.index !== -1) { + optionIndex = this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex(function(processedOption) { + return _this12.isOptionMatched(processedOption); + }); + optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionInfo.index).findIndex(function(processedOption) { + return _this12.isOptionMatched(processedOption); + }) : optionIndex + this.focusedOptionInfo.index; + } else { + optionIndex = this.visibleOptions.findIndex(function(processedOption) { + return _this12.isOptionMatched(processedOption); + }); + } + if (optionIndex !== -1) { + matched = true; + } + if (optionIndex === -1 && this.focusedOptionInfo.index === -1) { + optionIndex = this.findFirstFocusedOptionIndex(); + } + if (optionIndex !== -1) { + this.changeFocusedOptionIndex(event2, optionIndex); + } + } + if (this.searchTimeout) { + clearTimeout(this.searchTimeout); + } + this.searchTimeout = setTimeout(function() { + _this12.searchValue = ""; + _this12.searchTimeout = null; + }, 500); + return matched; + }, "searchOptions"), + changeFocusedOptionIndex: /* @__PURE__ */ __name(function changeFocusedOptionIndex(event2, index, preventSelection) { + if (this.focusedOptionInfo.index !== index) { + this.focusedOptionInfo.index = index; + this.scrollInView(); + if (this.focusOnHover) { + this.onOptionClick({ + originalEvent: event2, + processedOption: this.visibleOptions[index], + isHide: false, + preventSelection + }); + } + if (this.selectOnFocus) { + this.onOptionChange({ + originalEvent: event2, + processedOption: this.visibleOptions[index], + isHide: false + }); + } + } + }, "changeFocusedOptionIndex"), + scrollInView: /* @__PURE__ */ __name(function scrollInView2() { + var _this13 = this; + var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1; + this.$nextTick(function() { + var id4 = index !== -1 ? "".concat(_this13.id, "_").concat(index) : _this13.focusedOptionId; + var element = findSingle(_this13.list, 'li[id="'.concat(id4, '"]')); + if (element) { + element.scrollIntoView && element.scrollIntoView({ + block: "nearest", + inline: "start" + }); + } + }); + }, "scrollInView"), + autoUpdateModel: /* @__PURE__ */ __name(function autoUpdateModel() { + if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) { + this.focusedOptionInfo.index = this.findFirstFocusedOptionIndex(); + this.onOptionChange({ + processedOption: this.visibleOptions[this.focusedOptionInfo.index], + isHide: false + }); + !this.overlayVisible && (this.focusedOptionInfo = { + index: -1, + level: 0, + parentKey: "" + }); + } + }, "autoUpdateModel"), + updateModel: /* @__PURE__ */ __name(function updateModel2(event2, value2) { + this.writeValue(value2, event2); + this.$emit("change", { + originalEvent: event2, + value: value2 + }); + }, "updateModel"), + createProcessedOptions: /* @__PURE__ */ __name(function createProcessedOptions(options4) { + var _this14 = this; + var level = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var parentKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ""; + var processedOptions2 = []; + options4 && options4.forEach(function(option4, index) { + var key = (parentKey !== "" ? parentKey + "_" : "") + index; + var newOption = { + option: option4, + index, + level, + key, + parent, + parentKey + }; + newOption["children"] = _this14.createProcessedOptions(_this14.getOptionGroupChildren(option4, level), level + 1, newOption, key); + processedOptions2.push(newOption); + }); + return processedOptions2; + }, "createProcessedOptions"), + overlayRef: /* @__PURE__ */ __name(function overlayRef2(el) { + this.overlay = el; + }, "overlayRef") + }, + computed: { + // @deprecated use $filled instead. + hasSelectedOption: /* @__PURE__ */ __name(function hasSelectedOption() { + return this.$filled; + }, "hasSelectedOption"), + label: /* @__PURE__ */ __name(function label3() { + var label12 = this.placeholder || "p-emptylabel"; + if (this.$filled) { + var activeOptionPath = this.findOptionPathByValue(this.d_value); + var processedOption = isNotEmpty(activeOptionPath) ? activeOptionPath[activeOptionPath.length - 1] : null; + return processedOption ? this.getOptionLabel(processedOption.option) : label12; + } + return label12; + }, "label"), + processedOptions: /* @__PURE__ */ __name(function processedOptions() { + return this.createProcessedOptions(this.options || []); + }, "processedOptions"), + visibleOptions: /* @__PURE__ */ __name(function visibleOptions() { + var _this15 = this; + var processedOption = this.activeOptionPath.find(function(p) { + return p.key === _this15.focusedOptionInfo.parentKey; + }); + return processedOption ? processedOption.children : this.processedOptions; + }, "visibleOptions"), + equalityKey: /* @__PURE__ */ __name(function equalityKey() { + return this.optionValue ? null : this.dataKey; + }, "equalityKey"), + searchResultMessageText: /* @__PURE__ */ __name(function searchResultMessageText() { + return isNotEmpty(this.visibleOptions) ? this.searchMessageText.replaceAll("{0}", this.visibleOptions.length) : this.emptySearchMessageText; + }, "searchResultMessageText"), + searchMessageText: /* @__PURE__ */ __name(function searchMessageText() { + return this.searchMessage || this.$primevue.config.locale.searchMessage || ""; + }, "searchMessageText"), + emptySearchMessageText: /* @__PURE__ */ __name(function emptySearchMessageText() { + return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage || ""; + }, "emptySearchMessageText"), + emptyMessageText: /* @__PURE__ */ __name(function emptyMessageText() { + return this.emptyMessage || this.$primevue.config.locale.emptyMessage || ""; + }, "emptyMessageText"), + selectionMessageText: /* @__PURE__ */ __name(function selectionMessageText() { + return this.selectionMessage || this.$primevue.config.locale.selectionMessage || ""; + }, "selectionMessageText"), + emptySelectionMessageText: /* @__PURE__ */ __name(function emptySelectionMessageText() { + return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || ""; + }, "emptySelectionMessageText"), + selectedMessageText: /* @__PURE__ */ __name(function selectedMessageText() { + return this.$filled ? this.selectionMessageText.replaceAll("{0}", "1") : this.emptySelectionMessageText; + }, "selectedMessageText"), + focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId() { + return this.focusedOptionInfo.index !== -1 ? "".concat(this.id).concat(isNotEmpty(this.focusedOptionInfo.parentKey) ? "_" + this.focusedOptionInfo.parentKey : "", "_").concat(this.focusedOptionInfo.index) : null; + }, "focusedOptionId"), + isClearIconVisible: /* @__PURE__ */ __name(function isClearIconVisible() { + return this.showClear && this.d_value != null && isNotEmpty(this.options); + }, "isClearIconVisible") + }, + components: { + CascadeSelectSub: script$1$E, + Portal: script$1f, + ChevronDownIcon: script$1k, + SpinnerIcon: script$1r, + AngleRightIcon: script$1q, + TimesIcon: script$1g + } +}; +function _typeof$k(o) { + "@babel/helpers - typeof"; + return _typeof$k = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$k(o); +} +__name(_typeof$k, "_typeof$k"); +function ownKeys$i(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$i, "ownKeys$i"); +function _objectSpread$i(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$i(Object(t2), true).forEach(function(r2) { + _defineProperty$j(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$i(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$i, "_objectSpread$i"); +function _defineProperty$j(e, r, t2) { + return (r = _toPropertyKey$j(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$j, "_defineProperty$j"); +function _toPropertyKey$j(t2) { + var i = _toPrimitive$j(t2, "string"); + return "symbol" == _typeof$k(i) ? i : i + ""; +} +__name(_toPropertyKey$j, "_toPropertyKey$j"); +function _toPrimitive$j(t2, r) { + if ("object" != _typeof$k(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$k(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$j, "_toPrimitive$j"); +var _hoisted_1$r = ["id", "disabled", "placeholder", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; +function render$U(_ctx, _cache, $props, $setup, $data, $options) { + var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); + var _component_CascadeSelectSub = resolveComponent("CascadeSelectSub"); + var _component_Portal = resolveComponent("Portal"); + return openBlock(), createElementBlock("div", mergeProps({ + ref: "container", + "class": _ctx.cx("root"), + style: _ctx.sx("root"), + onClick: _cache[5] || (_cache[5] = function($event) { + return $options.onContainerClick($event); + }) + }, _ctx.ptmi("root")), [createBaseVNode("div", mergeProps({ + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenInputContainer"), { + "data-p-hidden-accessible": true + }), [createBaseVNode("input", mergeProps({ + ref: "focusInput", + id: _ctx.inputId, + type: "text", + "class": _ctx.inputClass, + style: _ctx.inputStyle, + readonly: "", + disabled: _ctx.disabled, + placeholder: _ctx.placeholder, + tabindex: !_ctx.disabled ? _ctx.tabindex : -1, + role: "combobox", + "aria-label": _ctx.ariaLabel, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-haspopup": "tree", + "aria-expanded": $data.overlayVisible, + "aria-controls": $data.id + "_tree", + "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, + "aria-invalid": _ctx.invalid || void 0, + onFocus: _cache[0] || (_cache[0] = function() { + return $options.onFocus && $options.onFocus.apply($options, arguments); + }), + onBlur: _cache[1] || (_cache[1] = function() { + return $options.onBlur && $options.onBlur.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }) + }, _objectSpread$i(_objectSpread$i({}, _ctx.inputProps), _ctx.ptm("hiddenInput"))), null, 16, _hoisted_1$r)], 16), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("label") + }, _ctx.ptm("label")), [renderSlot(_ctx.$slots, "value", { + value: _ctx.d_value, + placeholder: _ctx.placeholder + }, function() { + return [createTextVNode(toDisplayString($options.label), 1)]; + })], 16), $options.isClearIconVisible ? renderSlot(_ctx.$slots, "clearicon", { + key: 0, + "class": normalizeClass(_ctx.cx("clearIcon")), + clearCallback: $options.onClearClick + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon ? "i" : "TimesIcon"), mergeProps({ + ref: "clearIcon", + "class": [_ctx.cx("clearIcon"), _ctx.clearIcon], + onClick: $options.onClearClick + }, _ctx.ptm("clearIcon"), { + "data-pc-section": "clearicon" + }), null, 16, ["class", "onClick"]))]; + }) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("dropdown"), + role: "button", + tabindex: "-1" + }, _ctx.ptm("dropdown")), [_ctx.loading ? renderSlot(_ctx.$slots, "loadingicon", { + key: 0, + "class": normalizeClass(_ctx.cx("loadingIcon")) + }, function() { + return [_ctx.loadingIcon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": [_ctx.cx("loadingIcon"), "pi-spin", _ctx.loadingIcon], + "aria-hidden": "true" + }, _ctx.ptm("loadingIcon")), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({ + key: 1, + "class": _ctx.cx("loadingIcon"), + spin: "", + "aria-hidden": "true" + }, _ctx.ptm("loadingIcon")), null, 16, ["class"]))]; + }) : renderSlot(_ctx.$slots, "dropdownicon", { + key: 1, + "class": normalizeClass(_ctx.cx("dropdownIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? "span" : "ChevronDownIcon"), mergeProps({ + "class": [_ctx.cx("dropdownIcon"), _ctx.dropdownIcon], + "aria-hidden": "true" + }, _ctx.ptm("dropdownIcon")), null, 16, ["class"]))]; + })], 16), createBaseVNode("span", mergeProps({ + role: "status", + "aria-live": "polite", + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenSearchResult"), { + "data-p-hidden-accessible": true + }), toDisplayString($options.searchResultMessageText), 17), createVNode(_component_Portal, { + appendTo: _ctx.appendTo + }, { + "default": withCtx(function() { + return [createVNode(Transition, mergeProps({ + name: "p-connected-overlay", + onEnter: $options.onOverlayEnter, + onAfterEnter: $options.onOverlayAfterEnter, + onLeave: $options.onOverlayLeave, + onAfterLeave: $options.onOverlayAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [$data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.overlayRef, + "class": [_ctx.cx("overlay"), _ctx.panelClass, _ctx.overlayClass], + style: [_ctx.panelStyle, _ctx.overlayStyle], + onClick: _cache[3] || (_cache[3] = function() { + return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); + }), + onKeydown: _cache[4] || (_cache[4] = function() { + return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments); + }) + }, _objectSpread$i(_objectSpread$i(_objectSpread$i({}, _ctx.panelProps), _ctx.overlayProps), _ctx.ptm("overlay"))), [renderSlot(_ctx.$slots, "header", { + value: _ctx.d_value, + options: _ctx.options + }), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("listContainer") + }, _ctx.ptm("listContainer")), [createVNode(_component_CascadeSelectSub, { + id: $data.id + "_tree", + role: "tree", + "aria-orientation": "horizontal", + selectId: $data.id, + focusedOptionId: $data.focused ? $options.focusedOptionId : void 0, + options: $options.processedOptions, + activeOptionPath: $data.activeOptionPath, + level: 0, + templates: _ctx.$slots, + optionLabel: _ctx.optionLabel, + optionValue: _ctx.optionValue, + optionDisabled: _ctx.optionDisabled, + optionGroupIcon: _ctx.optionGroupIcon, + optionGroupLabel: _ctx.optionGroupLabel, + optionGroupChildren: _ctx.optionGroupChildren, + value: _ctx.d_value, + onOptionChange: $options.onOptionClick, + onOptionFocusChange: $options.onOptionMouseMove, + onOptionFocusEnterChange: $options.onOptionMouseEnter, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["id", "selectId", "focusedOptionId", "options", "activeOptionPath", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "value", "onOptionChange", "onOptionFocusChange", "onOptionFocusEnterChange", "pt", "unstyled"])], 16), createBaseVNode("span", mergeProps({ + role: "status", + "aria-live": "polite", + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenSelectedMessage"), { + "data-p-hidden-accessible": true + }), toDisplayString($options.selectedMessageText), 17), renderSlot(_ctx.$slots, "footer", { + value: _ctx.d_value, + options: _ctx.options + })], 16)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; + }), + _: 3 + }, 8, ["appendTo"])], 16); +} +__name(render$U, "render$U"); +script$10.render = render$U; +var theme$x = /* @__PURE__ */ __name(function theme7(_ref) { + _ref.dt; + return "\n.p-checkbox-group {\n display: inline-flex;\n}\n"; +}, "theme"); +var classes$B = { + root: "p-checkbox-group p-component" +}; +var CheckboxGroupStyle = BaseStyle.extend({ + name: "checkboxgroup", + theme: theme$x, + classes: classes$B +}); +var script$1$D = { + name: "BaseCheckboxGroup", + "extends": script$1s, + style: CheckboxGroupStyle, + provide: /* @__PURE__ */ __name(function provide12() { + return { + $pcCheckboxGroup: this, + $parentInstance: this + }; + }, "provide") +}; +var script$$ = { + name: "CheckboxGroup", + "extends": script$1$D, + inheritAttrs: false, + data: /* @__PURE__ */ __name(function data5() { + return { + groupName: this.name + }; + }, "data"), + watch: { + name: /* @__PURE__ */ __name(function name(newValue) { + this.groupName = newValue || uuid("checkbox-group-"); + }, "name") + }, + mounted: /* @__PURE__ */ __name(function mounted8() { + this.groupName = this.groupName || uuid("checkbox-group-"); + }, "mounted") +}; +function render$T(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$T, "render$T"); +script$$.render = render$T; +var theme$w = /* @__PURE__ */ __name(function theme8(_ref) { + var dt = _ref.dt; + return "\n.p-inputchips {\n display: inline-flex;\n}\n\n.p-inputchips-input {\n margin: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: calc(".concat(dt("inputchips.padding.y"), " / 2) ").concat(dt("inputchips.padding.x"), ";\n gap: calc(").concat(dt("inputchips.padding.y"), " / 2);\n color: ").concat(dt("inputchips.color"), ";\n background: ").concat(dt("inputchips.background"), ";\n border: 1px solid ").concat(dt("inputchips.border.color"), ";\n border-radius: ").concat(dt("inputchips.border.radius"), ";\n width: 100%;\n transition: background ").concat(dt("inputchips.transition.duration"), ", color ").concat(dt("inputchips.transition.duration"), ", border-color ").concat(dt("inputchips.transition.duration"), ", outline-color ").concat(dt("inputchips.transition.duration"), ", box-shadow ").concat(dt("inputchips.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("inputchips.shadow"), ";\n}\n\n.p-inputchips:not(.p-disabled):hover .p-inputchips-input {\n border-color: ").concat(dt("inputchips.hover.border.color"), ";\n}\n\n.p-inputchips:not(.p-disabled).p-focus .p-inputchips-input {\n border-color: ").concat(dt("inputchips.focus.border.color"), ";\n box-shadow: ").concat(dt("inputchips.focus.ring.shadow"), ";\n outline: ").concat(dt("inputchips.focus.ring.width"), " ").concat(dt("inputchips.focus.ring.style"), " ").concat(dt("inputchips.focus.ring.color"), ";\n outline-offset: ").concat(dt("inputchips.focus.ring.offset"), ";\n}\n\n.p-inputchips.p-invalid .p-inputchips-input {\n border-color: ").concat(dt("inputchips.invalid.border.color"), ";\n}\n\n.p-variant-filled.p-inputchips-input {\n background: ").concat(dt("inputchips.filled.background"), ";\n}\n\n.p-inputchips:not(.p-disabled).p-focus .p-variant-filled.p-inputchips-input {\n background: ").concat(dt("inputchips.filled.focus.background"), ";\n}\n\n.p-inputchips.p-disabled .p-inputchips-input {\n opacity: 1;\n background: ").concat(dt("inputchips.disabled.background"), ";\n color: ").concat(dt("inputchips.disabled.color"), ";\n}\n\n.p-inputchips-chip.p-chip {\n padding-top: calc(").concat(dt("inputchips.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("inputchips.padding.y"), " / 2);\n border-radius: ").concat(dt("inputchips.chip.border.radius"), ";\n transition: background ").concat(dt("inputchips.transition.duration"), ", color ").concat(dt("inputchips.transition.duration"), ";\n}\n\n.p-inputchips-chip-item.p-focus .p-inputchips-chip {\n background: ").concat(dt("inputchips.chip.focus.background"), ";\n color: ").concat(dt("inputchips.chip.focus.color"), ";\n}\n\n.p-inputchips-input:has(.p-inputchips-chip) {\n padding-left: calc(").concat(dt("inputchips.padding.y"), " / 2);\n padding-right: calc(").concat(dt("inputchips.padding.y"), " / 2);\n}\n\n.p-inputchips-input-item {\n flex: 1 1 auto;\n display: inline-flex;\n padding-top: calc(").concat(dt("inputchips.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("inputchips.padding.y"), " / 2);\n}\n\n.p-inputchips-input-item input {\n border: 0 none;\n outline: 0 none;\n background: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: inherit;\n}\n\n.p-inputchips-input-item input::placeholder {\n color: ").concat(dt("inputchips.placeholder.color"), ";\n}\n"); +}, "theme"); +var classes$A = { + root: /* @__PURE__ */ __name(function root8(_ref2) { + var instance = _ref2.instance, props = _ref2.props; + return ["p-inputchips p-component p-inputwrapper", { + "p-disabled": props.disabled, + "p-invalid": props.invalid, + "p-focus": instance.focused, + "p-inputwrapper-filled": props.modelValue && props.modelValue.length || instance.inputValue && instance.inputValue.length, + "p-inputwrapper-focus": instance.focused + }]; + }, "root"), + input: /* @__PURE__ */ __name(function input(_ref3) { + var props = _ref3.props, instance = _ref3.instance; + return ["p-inputchips-input", { + "p-variant-filled": props.variant ? props.variant === "filled" : instance.$primevue.config.inputStyle === "filled" || instance.$primevue.config.inputVariant === "filled" + }]; + }, "input"), + chipItem: /* @__PURE__ */ __name(function chipItem(_ref4) { + var state = _ref4.state, index = _ref4.index; + return ["p-inputchips-chip-item", { + "p-focus": state.focusedIndex === index + }]; + }, "chipItem"), + pcChip: "p-inputchips-chip", + chipIcon: "p-inputchips-chip-icon", + inputItem: "p-inputchips-input-item" +}; +var InputChipsStyle = BaseStyle.extend({ + name: "inputchips", + theme: theme$w, + classes: classes$A +}); +var script$1$C = { + name: "BaseInputChips", + "extends": script$1d, + props: { + modelValue: { + type: Array, + "default": null + }, + max: { + type: Number, + "default": null + }, + separator: { + type: [String, Object], + "default": null + }, + addOnBlur: { + type: Boolean, + "default": null + }, + allowDuplicate: { + type: Boolean, + "default": true + }, + placeholder: { + type: String, + "default": null + }, + variant: { + type: String, + "default": null + }, + invalid: { + type: Boolean, + "default": false + }, + disabled: { + type: Boolean, + "default": false + }, + inputId: { + type: String, + "default": null + }, + inputClass: { + type: [String, Object], + "default": null + }, + inputStyle: { + type: Object, + "default": null + }, + inputProps: { + type: null, + "default": null + }, + removeTokenIcon: { + type: String, + "default": void 0 + }, + chipIcon: { + type: String, + "default": void 0 + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: InputChipsStyle, + provide: /* @__PURE__ */ __name(function provide13() { + return { + $pcInputChips: this, + $parentInstance: this + }; + }, "provide") +}; +function _toConsumableArray$c(r) { + return _arrayWithoutHoles$c(r) || _iterableToArray$c(r) || _unsupportedIterableToArray$d(r) || _nonIterableSpread$c(); +} +__name(_toConsumableArray$c, "_toConsumableArray$c"); +function _nonIterableSpread$c() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$c, "_nonIterableSpread$c"); +function _unsupportedIterableToArray$d(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$d(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$d(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$d, "_unsupportedIterableToArray$d"); +function _iterableToArray$c(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$c, "_iterableToArray$c"); +function _arrayWithoutHoles$c(r) { + if (Array.isArray(r)) return _arrayLikeToArray$d(r); +} +__name(_arrayWithoutHoles$c, "_arrayWithoutHoles$c"); +function _arrayLikeToArray$d(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$d, "_arrayLikeToArray$d"); +var script$_ = { + name: "InputChips", + "extends": script$1$C, + inheritAttrs: false, + emits: ["update:modelValue", "add", "remove", "focus", "blur"], + data: /* @__PURE__ */ __name(function data6() { + return { + id: this.$attrs.id, + inputValue: null, + focused: false, + focusedIndex: null + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId3(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId") + }, + mounted: /* @__PURE__ */ __name(function mounted9() { + console.warn("Deprecated since v4. Use AutoComplete component instead with its typeahead property."); + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + onWrapperClick: /* @__PURE__ */ __name(function onWrapperClick() { + this.$refs.input.focus(); + }, "onWrapperClick"), + onInput: /* @__PURE__ */ __name(function onInput2(event2) { + this.inputValue = event2.target.value; + this.focusedIndex = null; + }, "onInput"), + onFocus: /* @__PURE__ */ __name(function onFocus4(event2) { + this.focused = true; + this.focusedIndex = null; + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur3(event2) { + this.focused = false; + this.focusedIndex = null; + if (this.addOnBlur) { + this.addItem(event2, event2.target.value, false); + } + this.$emit("blur", event2); + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown3(event2) { + var inputValue = event2.target.value; + switch (event2.code) { + case "Backspace": + if (inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) { + if (this.focusedIndex !== null) { + this.removeItem(event2, this.focusedIndex); + } else this.removeItem(event2, this.modelValue.length - 1); + } + break; + case "Enter": + case "NumpadEnter": + if (inputValue && inputValue.trim().length && !this.maxedOut) { + this.addItem(event2, inputValue, true); + } + break; + case "ArrowLeft": + if (inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) { + this.$refs.container.focus(); + } + break; + case "ArrowRight": + event2.stopPropagation(); + break; + default: + if (this.separator) { + if (this.separator === event2.key || event2.key.match(this.separator)) { + this.addItem(event2, inputValue, true); + } + } + break; + } + }, "onKeyDown"), + onPaste: /* @__PURE__ */ __name(function onPaste(event2) { + var _this = this; + if (this.separator) { + var separator = this.separator.replace("\\n", "\n").replace("\\r", "\r").replace("\\t", " "); + var pastedData = (event2.clipboardData || window["clipboardData"]).getData("Text"); + if (pastedData) { + var value2 = this.modelValue || []; + var pastedValues = pastedData.split(separator); + pastedValues = pastedValues.filter(function(val) { + return _this.allowDuplicate || value2.indexOf(val) === -1; + }); + value2 = [].concat(_toConsumableArray$c(value2), _toConsumableArray$c(pastedValues)); + this.updateModel(event2, value2, true); + } + } + }, "onPaste"), + onContainerFocus: /* @__PURE__ */ __name(function onContainerFocus() { + this.focused = true; + }, "onContainerFocus"), + onContainerBlur: /* @__PURE__ */ __name(function onContainerBlur() { + this.focusedIndex = -1; + this.focused = false; + }, "onContainerBlur"), + onContainerKeyDown: /* @__PURE__ */ __name(function onContainerKeyDown(event2) { + switch (event2.code) { + case "ArrowLeft": + this.onArrowLeftKeyOn(event2); + break; + case "ArrowRight": + this.onArrowRightKeyOn(event2); + break; + case "Backspace": + this.onBackspaceKeyOn(event2); + break; + } + }, "onContainerKeyDown"), + onArrowLeftKeyOn: /* @__PURE__ */ __name(function onArrowLeftKeyOn() { + if (this.inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) { + this.focusedIndex = this.focusedIndex === null ? this.modelValue.length - 1 : this.focusedIndex - 1; + if (this.focusedIndex < 0) this.focusedIndex = 0; + } + }, "onArrowLeftKeyOn"), + onArrowRightKeyOn: /* @__PURE__ */ __name(function onArrowRightKeyOn() { + if (this.inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) { + if (this.focusedIndex === this.modelValue.length - 1) { + this.focusedIndex = null; + this.$refs.input.focus(); + } else { + this.focusedIndex++; + } + } + }, "onArrowRightKeyOn"), + onBackspaceKeyOn: /* @__PURE__ */ __name(function onBackspaceKeyOn(event2) { + if (this.focusedIndex !== null) { + this.removeItem(event2, this.focusedIndex); + } + }, "onBackspaceKeyOn"), + updateModel: /* @__PURE__ */ __name(function updateModel3(event2, value2, preventDefault) { + var _this2 = this; + this.$emit("update:modelValue", value2); + this.$emit("add", { + originalEvent: event2, + value: value2 + }); + this.$refs.input.value = ""; + this.inputValue = ""; + setTimeout(function() { + _this2.maxedOut && (_this2.focused = false); + }, 0); + if (preventDefault) { + event2.preventDefault(); + } + }, "updateModel"), + addItem: /* @__PURE__ */ __name(function addItem(event2, item8, preventDefault) { + if (item8 && item8.trim().length) { + var value2 = this.modelValue ? _toConsumableArray$c(this.modelValue) : []; + if (this.allowDuplicate || value2.indexOf(item8) === -1) { + value2.push(item8); + this.updateModel(event2, value2, preventDefault); + } + } + }, "addItem"), + removeItem: /* @__PURE__ */ __name(function removeItem(event2, index) { + if (this.disabled) { + return; + } + var values = _toConsumableArray$c(this.modelValue); + var removedItem = values.splice(index, 1); + this.focusedIndex = null; + this.$refs.input.focus(); + this.$emit("update:modelValue", values); + this.$emit("remove", { + originalEvent: event2, + value: removedItem + }); + }, "removeItem") + }, + computed: { + maxedOut: /* @__PURE__ */ __name(function maxedOut() { + return this.max && this.modelValue && this.max === this.modelValue.length; + }, "maxedOut"), + focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId2() { + return this.focusedIndex !== null ? "".concat(this.id, "_inputchips_item_").concat(this.focusedIndex) : null; + }, "focusedOptionId") + }, + components: { + Chip: script$1t + } +}; +function _typeof$j(o) { + "@babel/helpers - typeof"; + return _typeof$j = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$j(o); +} +__name(_typeof$j, "_typeof$j"); +function ownKeys$h(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$h, "ownKeys$h"); +function _objectSpread$h(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$h(Object(t2), true).forEach(function(r2) { + _defineProperty$i(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$h(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$h, "_objectSpread$h"); +function _defineProperty$i(e, r, t2) { + return (r = _toPropertyKey$i(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$i, "_defineProperty$i"); +function _toPropertyKey$i(t2) { + var i = _toPrimitive$i(t2, "string"); + return "symbol" == _typeof$j(i) ? i : i + ""; +} +__name(_toPropertyKey$i, "_toPropertyKey$i"); +function _toPrimitive$i(t2, r) { + if ("object" != _typeof$j(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$j(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$i, "_toPrimitive$i"); +var _hoisted_1$q = ["aria-labelledby", "aria-label", "aria-activedescendant"]; +var _hoisted_2$j = ["id", "aria-label", "aria-setsize", "aria-posinset", "data-p-focused"]; +var _hoisted_3$g = ["id", "disabled", "placeholder", "aria-invalid"]; +function render$S(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Chip = resolveComponent("Chip"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("ul", mergeProps({ + ref: "container", + "class": _ctx.cx("input"), + tabindex: "-1", + role: "listbox", + "aria-orientation": "horizontal", + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel, + "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, + onClick: _cache[5] || (_cache[5] = function($event) { + return $options.onWrapperClick(); + }), + onFocus: _cache[6] || (_cache[6] = function() { + return $options.onContainerFocus && $options.onContainerFocus.apply($options, arguments); + }), + onBlur: _cache[7] || (_cache[7] = function() { + return $options.onContainerBlur && $options.onContainerBlur.apply($options, arguments); + }), + onKeydown: _cache[8] || (_cache[8] = function() { + return $options.onContainerKeyDown && $options.onContainerKeyDown.apply($options, arguments); + }) + }, _ctx.ptm("input")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, function(val, i) { + return openBlock(), createElementBlock("li", mergeProps({ + key: "".concat(i, "_").concat(val), + id: $data.id + "_inputchips_item_" + i, + role: "option", + "class": _ctx.cx("chipItem", { + index: i + }), + "aria-label": val, + "aria-selected": true, + "aria-setsize": _ctx.modelValue.length, + "aria-posinset": i + 1, + ref_for: true + }, _ctx.ptm("chipItem"), { + "data-p-focused": $data.focusedIndex === i + }), [renderSlot(_ctx.$slots, "chip", { + "class": normalizeClass(_ctx.cx("pcChip")), + index: i, + value: val, + removeCallback: /* @__PURE__ */ __name(function removeCallback(event2) { + return _ctx.removeOption(event2, i); + }, "removeCallback") + }, function() { + return [createVNode(_component_Chip, { + "class": normalizeClass(_ctx.cx("pcChip")), + label: val, + removeIcon: _ctx.chipIcon || _ctx.removeTokenIcon, + removable: "", + unstyled: _ctx.unstyled, + onRemove: /* @__PURE__ */ __name(function onRemove($event) { + return $options.removeItem($event, i); + }, "onRemove"), + pt: _ctx.ptm("pcChip") + }, { + removeicon: withCtx(function() { + return [renderSlot(_ctx.$slots, _ctx.$slots.chipicon ? "chipicon" : "removetokenicon", { + "class": normalizeClass(_ctx.cx("chipIcon")), + index: i, + removeCallback: /* @__PURE__ */ __name(function removeCallback(event2) { + return $options.removeItem(event2, i); + }, "removeCallback") + })]; + }), + _: 2 + }, 1032, ["class", "label", "removeIcon", "unstyled", "onRemove", "pt"])]; + })], 16, _hoisted_2$j); + }), 128)), createBaseVNode("li", mergeProps({ + "class": _ctx.cx("inputItem"), + role: "option" + }, _ctx.ptm("inputItem")), [createBaseVNode("input", mergeProps({ + ref: "input", + id: _ctx.inputId, + type: "text", + "class": _ctx.inputClass, + style: _ctx.inputStyle, + disabled: _ctx.disabled || $options.maxedOut, + placeholder: _ctx.placeholder, + "aria-invalid": _ctx.invalid || void 0, + onFocus: _cache[0] || (_cache[0] = function($event) { + return $options.onFocus($event); + }), + onBlur: _cache[1] || (_cache[1] = function($event) { + return $options.onBlur($event); + }), + onInput: _cache[2] || (_cache[2] = function() { + return $options.onInput && $options.onInput.apply($options, arguments); + }), + onKeydown: _cache[3] || (_cache[3] = function($event) { + return $options.onKeyDown($event); + }), + onPaste: _cache[4] || (_cache[4] = function($event) { + return $options.onPaste($event); + }) + }, _objectSpread$h(_objectSpread$h({}, _ctx.inputProps), _ctx.ptm("inputItemField"))), null, 16, _hoisted_3$g)], 16)], 16, _hoisted_1$q)], 16); +} +__name(render$S, "render$S"); +script$_.render = render$S; +var script$Z = { + name: "Chips", + "extends": script$_, + mounted: /* @__PURE__ */ __name(function mounted10() { + console.warn("Deprecated since v4. Use InputChips component instead."); + }, "mounted") +}; +var ChipsStyle = BaseStyle.extend({ + name: "chips" +}); +var ColumnGroupStyle = BaseStyle.extend({ + name: "columngroup" +}); +var script$1$B = { + name: "BaseColumnGroup", + "extends": script$1d, + props: { + type: { + type: String, + "default": null + } + }, + style: ColumnGroupStyle, + provide: /* @__PURE__ */ __name(function provide14() { + return { + $pcColumnGroup: this, + $parentInstance: this + }; + }, "provide") +}; +var script$Y = { + name: "ColumnGroup", + "extends": script$1$B, + inheritAttrs: false, + inject: ["$columnGroups"], + mounted: /* @__PURE__ */ __name(function mounted11() { + var _this$$columnGroups; + (_this$$columnGroups = this.$columnGroups) === null || _this$$columnGroups === void 0 || _this$$columnGroups.add(this.$); + }, "mounted"), + unmounted: /* @__PURE__ */ __name(function unmounted2() { + var _this$$columnGroups2; + (_this$$columnGroups2 = this.$columnGroups) === null || _this$$columnGroups2 === void 0 || _this$$columnGroups2["delete"](this.$); + }, "unmounted"), + render: /* @__PURE__ */ __name(function render() { + return null; + }, "render") +}; +var theme$v = /* @__PURE__ */ __name(function theme9(_ref) { + var dt = _ref.dt; + return "\n.p-dataview {\n border-color: ".concat(dt("dataview.border.color"), ";\n border-width: ").concat(dt("dataview.border.width"), ";\n border-style: solid;\n border-radius: ").concat(dt("dataview.border.radius"), ";\n padding: ").concat(dt("dataview.padding"), ";\n}\n\n.p-dataview-header {\n background: ").concat(dt("dataview.header.background"), ";\n color: ").concat(dt("dataview.header.color"), ";\n border-color: ").concat(dt("dataview.header.border.color"), ";\n border-width: ").concat(dt("dataview.header.border.width"), ";\n border-style: solid;\n padding: ").concat(dt("dataview.header.padding"), ";\n border-radius: ").concat(dt("dataview.header.border.radius"), ";\n}\n\n.p-dataview-content {\n background: ").concat(dt("dataview.content.background"), ";\n border-color: ").concat(dt("dataview.content.border.color"), ";\n border-width: ").concat(dt("dataview.content.border.width"), ";\n border-style: solid;\n color: ").concat(dt("dataview.content.color"), ";\n padding: ").concat(dt("dataview.content.padding"), ";\n border-radius: ").concat(dt("dataview.content.border.radius"), ";\n}\n\n.p-dataview-footer {\n background: ").concat(dt("dataview.footer.background"), ";\n color: ").concat(dt("dataview.footer.color"), ";\n border-color: ").concat(dt("dataview.footer.border.color"), ";\n border-width: ").concat(dt("dataview.footer.border.width"), ";\n border-style: solid;\n padding: ").concat(dt("dataview.footer.padding"), ";\n border-radius: ").concat(dt("dataview.footer.border.radius"), ";\n}\n\n.p-dataview-paginator-top {\n border-width: ").concat(dt("dataview.paginator.top.border.width"), ";\n border-color: ").concat(dt("dataview.paginator.top.border.color"), ";\n border-style: solid;\n}\n\n.p-dataview-paginator-bottom {\n border-width: ").concat(dt("dataview.paginator.bottom.border.width"), ";\n border-color: ").concat(dt("dataview.paginator.bottom.border.color"), ";\n border-style: solid;\n}\n"); +}, "theme"); +var classes$z = { + root: /* @__PURE__ */ __name(function root9(_ref2) { + var props = _ref2.props; + return ["p-dataview p-component", { + "p-dataview-list": props.layout === "list", + "p-dataview-grid": props.layout === "grid" + }]; + }, "root"), + header: "p-dataview-header", + pcPaginator: /* @__PURE__ */ __name(function pcPaginator(_ref3) { + var position = _ref3.position; + return "p-dataview-paginator-" + position; + }, "pcPaginator"), + content: "p-dataview-content", + emptyMessage: "p-dataview-empty-message", + // TODO: remove? + footer: "p-dataview-footer" +}; +var DataViewStyle = BaseStyle.extend({ + name: "dataview", + theme: theme$v, + classes: classes$z +}); +var script$1$A = { + name: "BaseDataView", + "extends": script$1d, + props: { + value: { + type: Array, + "default": null + }, + layout: { + type: String, + "default": "list" + }, + rows: { + type: Number, + "default": 0 + }, + first: { + type: Number, + "default": 0 + }, + totalRecords: { + type: Number, + "default": 0 + }, + paginator: { + type: Boolean, + "default": false + }, + paginatorPosition: { + type: String, + "default": "bottom" + }, + alwaysShowPaginator: { + type: Boolean, + "default": true + }, + paginatorTemplate: { + type: String, + "default": "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown" + }, + pageLinkSize: { + type: Number, + "default": 5 + }, + rowsPerPageOptions: { + type: Array, + "default": null + }, + currentPageReportTemplate: { + type: String, + "default": "({currentPage} of {totalPages})" + }, + sortField: { + type: [String, Function], + "default": null + }, + sortOrder: { + type: Number, + "default": null + }, + lazy: { + type: Boolean, + "default": false + }, + dataKey: { + type: String, + "default": null + } + }, + style: DataViewStyle, + provide: /* @__PURE__ */ __name(function provide15() { + return { + $pcDataView: this, + $parentInstance: this + }; + }, "provide") +}; +function _toConsumableArray$b(r) { + return _arrayWithoutHoles$b(r) || _iterableToArray$b(r) || _unsupportedIterableToArray$c(r) || _nonIterableSpread$b(); +} +__name(_toConsumableArray$b, "_toConsumableArray$b"); +function _nonIterableSpread$b() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$b, "_nonIterableSpread$b"); +function _unsupportedIterableToArray$c(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$c(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$c(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$c, "_unsupportedIterableToArray$c"); +function _iterableToArray$b(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$b, "_iterableToArray$b"); +function _arrayWithoutHoles$b(r) { + if (Array.isArray(r)) return _arrayLikeToArray$c(r); +} +__name(_arrayWithoutHoles$b, "_arrayWithoutHoles$b"); +function _arrayLikeToArray$c(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$c, "_arrayLikeToArray$c"); +var script$X = { + name: "DataView", + "extends": script$1$A, + inheritAttrs: false, + emits: ["update:first", "update:rows", "page"], + data: /* @__PURE__ */ __name(function data7() { + return { + d_first: this.first, + d_rows: this.rows + }; + }, "data"), + watch: { + first: /* @__PURE__ */ __name(function first(newValue) { + this.d_first = newValue; + }, "first"), + rows: /* @__PURE__ */ __name(function rows(newValue) { + this.d_rows = newValue; + }, "rows"), + sortField: /* @__PURE__ */ __name(function sortField() { + this.resetPage(); + }, "sortField"), + sortOrder: /* @__PURE__ */ __name(function sortOrder() { + this.resetPage(); + }, "sortOrder") + }, + methods: { + getKey: /* @__PURE__ */ __name(function getKey2(item8, index) { + return this.dataKey ? resolveFieldData(item8, this.dataKey) : index; + }, "getKey"), + onPage: /* @__PURE__ */ __name(function onPage(event2) { + this.d_first = event2.first; + this.d_rows = event2.rows; + this.$emit("update:first", this.d_first); + this.$emit("update:rows", this.d_rows); + this.$emit("page", event2); + }, "onPage"), + sort: /* @__PURE__ */ __name(function sort$1() { + var _this = this; + if (this.value) { + var value2 = _toConsumableArray$b(this.value); + var comparer = localeComparator(); + value2.sort(function(data1, data210) { + var value1 = resolveFieldData(data1, _this.sortField); + var value22 = resolveFieldData(data210, _this.sortField); + return sort(value1, value22, _this.sortOrder, comparer); + }); + return value2; + } else { + return null; + } + }, "sort$1"), + resetPage: /* @__PURE__ */ __name(function resetPage() { + this.d_first = 0; + this.$emit("update:first", this.d_first); + }, "resetPage") + }, + computed: { + getTotalRecords: /* @__PURE__ */ __name(function getTotalRecords() { + if (this.totalRecords) return this.totalRecords; + else return this.value ? this.value.length : 0; + }, "getTotalRecords"), + empty: /* @__PURE__ */ __name(function empty() { + return !this.value || this.value.length === 0; + }, "empty"), + emptyMessageText: /* @__PURE__ */ __name(function emptyMessageText2() { + var _this$$primevue$confi; + return ((_this$$primevue$confi = this.$primevue.config) === null || _this$$primevue$confi === void 0 || (_this$$primevue$confi = _this$$primevue$confi.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.emptyMessage) || ""; + }, "emptyMessageText"), + paginatorTop: /* @__PURE__ */ __name(function paginatorTop() { + return this.paginator && (this.paginatorPosition !== "bottom" || this.paginatorPosition === "both"); + }, "paginatorTop"), + paginatorBottom: /* @__PURE__ */ __name(function paginatorBottom() { + return this.paginator && (this.paginatorPosition !== "top" || this.paginatorPosition === "both"); + }, "paginatorBottom"), + items: /* @__PURE__ */ __name(function items() { + if (this.value && this.value.length) { + var data41 = this.value; + if (data41 && data41.length && this.sortField) { + data41 = this.sort(); + } + if (this.paginator) { + var first3 = this.lazy ? 0 : this.d_first; + return data41.slice(first3, first3 + this.d_rows); + } else { + return data41; + } + } else { + return null; + } + }, "items") + }, + components: { + DVPaginator: script$1u + } +}; +function render$R(_ctx, _cache, $props, $setup, $data, $options) { + var _component_DVPaginator = resolveComponent("DVPaginator"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [_ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("header") + }, _ctx.ptm("header")), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), $options.paginatorTop ? (openBlock(), createBlock(_component_DVPaginator, { + key: 1, + rows: $data.d_rows, + first: $data.d_first, + totalRecords: $options.getTotalRecords, + pageLinkSize: _ctx.pageLinkSize, + template: _ctx.paginatorTemplate, + rowsPerPageOptions: _ctx.rowsPerPageOptions, + currentPageReportTemplate: _ctx.currentPageReportTemplate, + "class": normalizeClass(_ctx.cx("pcPaginator", { + position: "top" + })), + alwaysShow: _ctx.alwaysShowPaginator, + onPage: _cache[0] || (_cache[0] = function($event) { + return $options.onPage($event); + }), + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcPaginator") + }, createSlots({ + _: 2 + }, [_ctx.$slots.paginatorcontainer ? { + name: "container", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorcontainer", { + first: slotProps.first, + last: slotProps.last, + rows: slotProps.rows, + page: slotProps.page, + pageCount: slotProps.pageCount, + totalRecords: slotProps.totalRecords, + firstPageCallback: slotProps.firstPageCallback, + lastPageCallback: slotProps.lastPageCallback, + prevPageCallback: slotProps.prevPageCallback, + nextPageCallback: slotProps.nextPageCallback, + rowChangeCallback: slotProps.rowChangeCallback + })]; + }), + key: "0" + } : void 0, _ctx.$slots.paginatorstart ? { + name: "start", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorstart")]; + }), + key: "1" + } : void 0, _ctx.$slots.paginatorend ? { + name: "end", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorend")]; + }), + key: "2" + } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("content") + }, _ctx.ptm("content")), [!$options.empty ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [_ctx.$slots.list && _ctx.layout === "list" ? renderSlot(_ctx.$slots, "list", { + key: 0, + items: $options.items + }) : createCommentVNode("", true), _ctx.$slots.grid && _ctx.layout === "grid" ? renderSlot(_ctx.$slots, "grid", { + key: 1, + items: $options.items + }) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("emptyMessage") + }, _ctx.ptm("emptyMessage")), [renderSlot(_ctx.$slots, "empty", { + layout: _ctx.layout + }, function() { + return [createTextVNode(toDisplayString($options.emptyMessageText), 1)]; + })], 16))], 16), $options.paginatorBottom ? (openBlock(), createBlock(_component_DVPaginator, { + key: 2, + rows: $data.d_rows, + first: $data.d_first, + totalRecords: $options.getTotalRecords, + pageLinkSize: _ctx.pageLinkSize, + template: _ctx.paginatorTemplate, + rowsPerPageOptions: _ctx.rowsPerPageOptions, + currentPageReportTemplate: _ctx.currentPageReportTemplate, + "class": normalizeClass(_ctx.cx("pcPaginator", { + position: "bottom" + })), + alwaysShow: _ctx.alwaysShowPaginator, + onPage: _cache[1] || (_cache[1] = function($event) { + return $options.onPage($event); + }), + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcPaginator") + }, createSlots({ + _: 2 + }, [_ctx.$slots.paginatorcontainer ? { + name: "container", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorcontainer", { + first: slotProps.first, + last: slotProps.last, + rows: slotProps.rows, + page: slotProps.page, + pageCount: slotProps.pageCount, + totalRecords: slotProps.totalRecords, + firstPageCallback: slotProps.firstPageCallback, + lastPageCallback: slotProps.lastPageCallback, + prevPageCallback: slotProps.prevPageCallback, + nextPageCallback: slotProps.nextPageCallback, + rowChangeCallback: slotProps.rowChangeCallback + })]; + }), + key: "0" + } : void 0, _ctx.$slots.paginatorstart ? { + name: "start", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorstart")]; + }), + key: "1" + } : void 0, _ctx.$slots.paginatorend ? { + name: "end", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorend")]; + }), + key: "2" + } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({ + key: 3, + "class": _ctx.cx("footer") + }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 16); +} +__name(render$R, "render$R"); +script$X.render = render$R; +var DeferredContentStyle = BaseStyle.extend({ + name: "deferredcontent" +}); +var script$W = { + name: "DeferredContent", + "extends": script$1d, + inheritAttrs: false, + emits: ["load"], + style: DeferredContentStyle, + data: /* @__PURE__ */ __name(function data8() { + return { + loaded: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted12() { + if (!this.loaded) { + if (this.shouldLoad()) this.load(); + else this.bindScrollListener(); + } + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { + this.unbindScrollListener(); + }, "beforeUnmount"), + methods: { + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener3() { + var _this = this; + this.documentScrollListener = function() { + if (_this.shouldLoad()) { + _this.load(); + _this.unbindScrollListener(); + } + }; + window.addEventListener("scroll", this.documentScrollListener); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener3() { + if (this.documentScrollListener) { + window.removeEventListener("scroll", this.documentScrollListener); + this.documentScrollListener = null; + } + }, "unbindScrollListener"), + shouldLoad: /* @__PURE__ */ __name(function shouldLoad() { + if (this.loaded) { + return false; + } else { + var rect = this.$refs.container.getBoundingClientRect(); + var docElement = document.documentElement; + var winHeight = docElement.clientHeight; + return winHeight >= rect.top; + } + }, "shouldLoad"), + load: /* @__PURE__ */ __name(function load(event2) { + this.loaded = true; + this.$emit("load", event2); + }, "load") + } +}; +function render$Q(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + ref: "container" + }, _ctx.ptmi("root")), [$data.loaded ? renderSlot(_ctx.$slots, "default", { + key: 0 + }) : createCommentVNode("", true)], 16); +} +__name(render$Q, "render$Q"); +script$W.render = render$Q; +var DynamicDialogEventBus = EventBus(); +var DialogService = { + install: /* @__PURE__ */ __name(function install(app) { + var DialogService2 = { + open: /* @__PURE__ */ __name(function open2(content, options4) { + var instance = { + content: content && markRaw(content), + options: options4 || {}, + data: options4 && options4.data, + close: /* @__PURE__ */ __name(function close2(params) { + DynamicDialogEventBus.emit("close", { + instance, + params + }); + }, "close") + }; + DynamicDialogEventBus.emit("open", { + instance + }); + return instance; + }, "open") + }; + app.config.globalProperties.$dialog = DialogService2; + app.provide(PrimeVueDialogSymbol, DialogService2); + }, "install") +}; +var theme$u = /* @__PURE__ */ __name(function theme10(_ref) { + var dt = _ref.dt; + return "\n.p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n\n.p-dock-list-container {\n display: flex;\n pointer-events: auto;\n background: ".concat(dt("dock.background"), ";\n border: 1px solid ").concat(dt("dock.border.color"), ";\n padding: ").concat(dt("dock.padding"), ";\n border-radius: ").concat(dt("dock.border.radius"), ";\n}\n\n.p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n outline: 0 none;\n}\n\n.p-dock-item {\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n padding: ").concat(dt("dock.item.padding"), ";\n border-radius: ").concat(dt("dock.item.border.radius"), ";\n}\n\n.p-dock-item.p-focus {\n box-shadow: ").concat(dt("dock.item.focus.ring.shadow"), ";\n outline: ").concat(dt("dock.item.focus.ring.width"), " ").concat(dt("dock.item.focus.ring.style"), " ").concat(dt("dock.item.focus.ring.color"), ";\n outline-offset: ").concat(dt("dock.item.focus.ring.offset"), ";\n}\n\n.p-dock-item-link {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n width: ").concat(dt("dock.item.size"), ";\n height: ").concat(dt("dock.item.size"), ";\n}\n\n.p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n}\n\n.p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n}\n\n.p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-right .p-dock-list {\n flex-direction: column;\n}\n\n.p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n}\n\n.p-dock-left .p-dock-list {\n flex-direction: column;\n}\n\n.p-dock-mobile.p-dock-top .p-dock-list-container,\n.p-dock-mobile.p-dock-bottom .p-dock-list-container {\n overflow-x: auto;\n width: 100%;\n}\n\n.p-dock-mobile.p-dock-top .p-dock-list-container .p-dock-list,\n.p-dock-mobile.p-dock-bottom .p-dock-list-container .p-dock-list {\n margin: 0 auto;\n}\n\n.p-dock-mobile.p-dock-left .p-dock-list-container,\n.p-dock-mobile.p-dock-right .p-dock-list-container {\n overflow-y: auto;\n height: 100%;\n}\n\n.p-dock-mobile.p-dock-left .p-dock-list-container .p-dock-list,\n.p-dock-mobile.p-dock-right .p-dock-list-container .p-dock-list {\n margin: auto 0;\n}\n\n.p-dock-mobile .p-dock-list .p-dock-item {\n transform: none;\n margin: 0;\n}\n"); +}, "theme"); +var classes$y = { + root: /* @__PURE__ */ __name(function root10(_ref2) { + var instance = _ref2.instance, props = _ref2.props; + return ["p-dock p-component", "p-dock-".concat(props.position), { + "p-dock-mobile": instance.queryMatches + }]; + }, "root"), + listContainer: "p-dock-list-container", + list: "p-dock-list", + item: /* @__PURE__ */ __name(function item2(_ref3) { + var instance = _ref3.instance, processedItem = _ref3.processedItem, id4 = _ref3.id; + return ["p-dock-item", { + "p-focus": instance.isItemActive(id4), + "p-disabled": instance.disabled(processedItem) + }]; + }, "item"), + itemContent: "p-dock-item-content", + itemLink: "p-dock-item-link", + itemIcon: "p-dock-item-icon" +}; +var DockStyle = BaseStyle.extend({ + name: "dock", + theme: theme$u, + classes: classes$y +}); +var script$2$7 = { + name: "BaseDock", + "extends": script$1d, + props: { + position: { + type: String, + "default": "bottom" + }, + model: null, + "class": null, + style: null, + tooltipOptions: null, + menuId: { + type: String, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + }, + breakpoint: { + type: String, + "default": "960px" + }, + ariaLabel: { + type: String, + "default": null + }, + ariaLabelledby: { + type: String, + "default": null + } + }, + style: DockStyle, + provide: /* @__PURE__ */ __name(function provide16() { + return { + $pcDock: this, + $parentInstance: this + }; + }, "provide") +}; +function _toConsumableArray$a(r) { + return _arrayWithoutHoles$a(r) || _iterableToArray$a(r) || _unsupportedIterableToArray$b(r) || _nonIterableSpread$a(); +} +__name(_toConsumableArray$a, "_toConsumableArray$a"); +function _nonIterableSpread$a() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$a, "_nonIterableSpread$a"); +function _unsupportedIterableToArray$b(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$b(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$b(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$b, "_unsupportedIterableToArray$b"); +function _iterableToArray$a(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$a, "_iterableToArray$a"); +function _arrayWithoutHoles$a(r) { + if (Array.isArray(r)) return _arrayLikeToArray$b(r); +} +__name(_arrayWithoutHoles$a, "_arrayWithoutHoles$a"); +function _arrayLikeToArray$b(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$b, "_arrayLikeToArray$b"); +var script$1$z = { + name: "DockSub", + hostName: "Dock", + "extends": script$1d, + emits: ["focus", "blur"], + props: { + position: { + type: String, + "default": "bottom" + }, + model: { + type: Array, + "default": null + }, + templates: { + type: null, + "default": null + }, + tooltipOptions: null, + menuId: { + type: String, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + }, + ariaLabel: { + type: String, + "default": null + }, + ariaLabelledby: { + type: String, + "default": null + } + }, + data: /* @__PURE__ */ __name(function data9() { + return { + id: this.menuId, + currentIndex: -3, + focused: false, + focusedOptionIndex: -1 + }; + }, "data"), + watch: { + menuId: /* @__PURE__ */ __name(function menuId(newValue) { + this.id = newValue || UniqueComponentId(); + }, "menuId") + }, + mounted: /* @__PURE__ */ __name(function mounted13() { + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + getItemId: /* @__PURE__ */ __name(function getItemId(index) { + return "".concat(this.id, "_").concat(index); + }, "getItemId"), + getItemProp: /* @__PURE__ */ __name(function getItemProp(processedItem, name4) { + return processedItem && processedItem.item ? resolve(processedItem.item[name4]) : void 0; + }, "getItemProp"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions2(key, item8, index) { + return this.ptm(key, { + context: { + index, + item: item8, + active: this.isItemActive(this.getItemId(index)) + } + }); + }, "getPTOptions"), + isSameMenuItem: /* @__PURE__ */ __name(function isSameMenuItem(event2) { + return event2.currentTarget && (event2.currentTarget.isSameNode(event2.target) || event2.currentTarget.isSameNode(event2.target.closest('[data-pc-section="item"]'))); + }, "isSameMenuItem"), + isItemActive: /* @__PURE__ */ __name(function isItemActive2(id4) { + return id4 === this.focusedOptionIndex; + }, "isItemActive"), + onListMouseLeave: /* @__PURE__ */ __name(function onListMouseLeave() { + this.currentIndex = -3; + }, "onListMouseLeave"), + onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter(index) { + this.currentIndex = index; + }, "onItemMouseEnter"), + onItemClick: /* @__PURE__ */ __name(function onItemClick(event2, processedItem) { + if (this.isSameMenuItem(event2)) { + var command = this.getItemProp(processedItem, "command"); + command && command({ + originalEvent: event2, + item: processedItem.item + }); + } + }, "onItemClick"), + onListFocus: /* @__PURE__ */ __name(function onListFocus(event2) { + this.focused = true; + this.changeFocusedOptionIndex(0); + this.$emit("focus", event2); + }, "onListFocus"), + onListBlur: /* @__PURE__ */ __name(function onListBlur(event2) { + this.focused = false; + this.focusedOptionIndex = -1; + this.$emit("blur", event2); + }, "onListBlur"), + onListKeyDown: /* @__PURE__ */ __name(function onListKeyDown(event2) { + switch (event2.code) { + case "ArrowDown": { + if (this.position === "left" || this.position === "right") this.onArrowDownKey(); + event2.preventDefault(); + break; + } + case "ArrowUp": { + if (this.position === "left" || this.position === "right") this.onArrowUpKey(); + event2.preventDefault(); + break; + } + case "ArrowRight": { + if (this.position === "top" || this.position === "bottom") this.onArrowDownKey(); + event2.preventDefault(); + break; + } + case "ArrowLeft": { + if (this.position === "top" || this.position === "bottom") this.onArrowUpKey(); + event2.preventDefault(); + break; + } + case "Home": { + this.onHomeKey(); + event2.preventDefault(); + break; + } + case "End": { + this.onEndKey(); + event2.preventDefault(); + break; + } + case "Enter": + case "NumpadEnter": + case "Space": { + this.onSpaceKey(event2); + event2.preventDefault(); + break; + } + } + }, "onListKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey3() { + var optionIndex = this.findNextOptionIndex(this.focusedOptionIndex); + this.changeFocusedOptionIndex(optionIndex); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey3() { + var optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex); + this.changeFocusedOptionIndex(optionIndex); + }, "onArrowUpKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey3() { + this.changeFocusedOptionIndex(0); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey3() { + this.changeFocusedOptionIndex(find(this.$refs.list, 'li[data-pc-section="item"][data-p-disabled="false"]').length - 1); + }, "onEndKey"), + onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey2() { + var element = findSingle(this.$refs.list, 'li[id="'.concat("".concat(this.focusedOptionIndex), '"]')); + var anchorElement = element && findSingle(element, '[data-pc-section="itemlink"]'); + anchorElement ? anchorElement.click() : element && element.click(); + }, "onSpaceKey"), + findNextOptionIndex: /* @__PURE__ */ __name(function findNextOptionIndex2(index) { + var menuitems = find(this.$refs.list, 'li[data-pc-section="item"][data-p-disabled="false"]'); + var matchedOptionIndex = _toConsumableArray$a(menuitems).findIndex(function(link) { + return link.id === index; + }); + return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0; + }, "findNextOptionIndex"), + findPrevOptionIndex: /* @__PURE__ */ __name(function findPrevOptionIndex2(index) { + var menuitems = find(this.$refs.list, 'li[data-pc-section="item"][data-p-disabled="false"]'); + var matchedOptionIndex = _toConsumableArray$a(menuitems).findIndex(function(link) { + return link.id === index; + }); + return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0; + }, "findPrevOptionIndex"), + changeFocusedOptionIndex: /* @__PURE__ */ __name(function changeFocusedOptionIndex2(index) { + var menuitems = find(this.$refs.list, 'li[data-pc-section="item"][data-p-disabled="false"]'); + var order = index >= menuitems.length ? menuitems.length - 1 : index < 0 ? 0 : index; + this.focusedOptionIndex = menuitems[order].getAttribute("id"); + }, "changeFocusedOptionIndex"), + disabled: /* @__PURE__ */ __name(function disabled2(item8) { + return typeof item8.disabled === "function" ? item8.disabled() : item8.disabled; + }, "disabled"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps2(item8, index) { + return { + action: mergeProps({ + tabindex: -1, + "class": this.cx("itemLink") + }, this.getPTOptions("itemLink", item8, index)), + icon: mergeProps({ + "class": [this.cx("itemIcon"), item8.icon] + }, this.getPTOptions("itemIcon", item8, index)) + }; + }, "getMenuItemProps") + }, + computed: { + focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId3() { + return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null; + }, "focusedOptionId") + }, + directives: { + ripple: Ripple, + tooltip: Tooltip + } +}; +var _hoisted_1$p = ["id", "aria-orientation", "aria-activedescendant", "tabindex", "aria-label", "aria-labelledby"]; +var _hoisted_2$i = ["id", "aria-label", "aria-disabled", "onClick", "onMouseenter", "data-p-focused", "data-p-disabled"]; +var _hoisted_3$f = ["href", "target"]; +function render$1$7(_ctx, _cache, $props, $setup, $data, $options) { + var _directive_ripple = resolveDirective("ripple"); + var _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("listContainer") + }, _ctx.ptm("listContainer")), [createBaseVNode("ul", mergeProps({ + ref: "list", + id: $data.id, + "class": _ctx.cx("list"), + role: "menu", + "aria-orientation": $props.position === "bottom" || $props.position === "top" ? "horizontal" : "vertical", + "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, + tabindex: $props.tabindex, + "aria-label": $props.ariaLabel, + "aria-labelledby": $props.ariaLabelledby, + onFocus: _cache[0] || (_cache[0] = function() { + return $options.onListFocus && $options.onListFocus.apply($options, arguments); + }), + onBlur: _cache[1] || (_cache[1] = function() { + return $options.onListBlur && $options.onListBlur.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onListKeyDown && $options.onListKeyDown.apply($options, arguments); + }), + onMouseleave: _cache[3] || (_cache[3] = function() { + return $options.onListMouseLeave && $options.onListMouseLeave.apply($options, arguments); + }) + }, _ctx.ptm("list")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.model, function(processedItem, index) { + return openBlock(), createElementBlock("li", mergeProps({ + key: index, + id: $options.getItemId(index), + "class": _ctx.cx("item", { + processedItem, + id: $options.getItemId(index) + }), + role: "menuitem", + "aria-label": processedItem.label, + "aria-disabled": $options.disabled(processedItem), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onItemClick($event, processedItem); + }, "onClick"), + onMouseenter: /* @__PURE__ */ __name(function onMouseenter($event) { + return $options.onItemMouseEnter(index); + }, "onMouseenter"), + ref_for: true + }, $options.getPTOptions("item", processedItem, index), { + "data-p-focused": $options.isItemActive($options.getItemId(index)), + "data-p-disabled": $options.disabled(processedItem) || false + }), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("itemContent"), + ref_for: true + }, $options.getPTOptions("itemContent", processedItem, index)), [!$props.templates["item"] ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ + key: 0, + href: processedItem.url, + "class": _ctx.cx("itemLink"), + target: processedItem.target, + tabindex: "-1", + "aria-hidden": "true", + ref_for: true + }, $options.getPTOptions("itemLink", processedItem, index)), [!$props.templates["icon"] && !$props.templates["itemicon"] ? withDirectives((openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": [_ctx.cx("itemIcon"), processedItem.icon], + ref_for: true + }, $options.getPTOptions("itemIcon", processedItem, index)), null, 16)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates["icon"] || $props.templates["itemicon"]), { + key: 1, + item: processedItem, + "class": normalizeClass(_ctx.cx("itemIcon")) + }, null, 8, ["item", "class"]))], 16, _hoisted_3$f)), [[_directive_tooltip, { + value: processedItem.label, + disabled: !$props.tooltipOptions + }, $props.tooltipOptions]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates["item"]), { + key: 1, + item: processedItem, + index, + label: processedItem.label, + props: $options.getMenuItemProps(processedItem, index) + }, null, 8, ["item", "index", "label", "props"]))], 16)], 16, _hoisted_2$i); + }), 128))], 16, _hoisted_1$p)], 16); +} +__name(render$1$7, "render$1$7"); +script$1$z.render = render$1$7; +var script$V = { + name: "Dock", + "extends": script$2$7, + inheritAttrs: false, + matchMediaListener: null, + data: /* @__PURE__ */ __name(function data10() { + return { + query: null, + queryMatches: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted14() { + this.bindMatchMediaListener(); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { + this.unbindMatchMediaListener(); + }, "beforeUnmount"), + methods: { + bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener3() { + var _this = this; + if (!this.matchMediaListener) { + var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); + this.query = query; + this.queryMatches = query.matches; + this.matchMediaListener = function() { + _this.queryMatches = query.matches; + _this.mobileActive = false; + }; + this.query.addEventListener("change", this.matchMediaListener); + } + }, "bindMatchMediaListener"), + unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener3() { + if (this.matchMediaListener) { + this.query.removeEventListener("change", this.matchMediaListener); + this.matchMediaListener = null; + } + }, "unbindMatchMediaListener") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass() { + return [this["class"], this.cx("root")]; + }, "containerClass") + }, + components: { + DockSub: script$1$z + } +}; +function render$P(_ctx, _cache, $props, $setup, $data, $options) { + var _component_DockSub = resolveComponent("DockSub"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": $options.containerClass, + style: _ctx.style + }, _ctx.ptmi("root")), [createVNode(_component_DockSub, { + model: _ctx.model, + templates: _ctx.$slots, + tooltipOptions: _ctx.tooltipOptions, + position: _ctx.position, + menuId: _ctx.menuId, + "aria-label": _ctx.ariaLabel, + "aria-labelledby": _ctx.ariaLabelledby, + tabindex: _ctx.tabindex, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["model", "templates", "tooltipOptions", "position", "menuId", "aria-label", "aria-labelledby", "tabindex", "pt", "unstyled"])], 16); +} +__name(render$P, "render$P"); +script$V.render = render$P; +var script$U = { + name: "Dropdown", + "extends": script$1v, + mounted: /* @__PURE__ */ __name(function mounted15() { + console.warn("Deprecated since v4. Use Select component instead."); + }, "mounted") +}; +var DropdownStyle = BaseStyle.extend({ + name: "dropdown" +}); +var DynamicDialogStyle = BaseStyle.extend({ + name: "dynamicdialog" +}); +var script$1$y = { + name: "BaseDynamicDialog", + "extends": script$1d, + props: {}, + style: DynamicDialogStyle, + provide: /* @__PURE__ */ __name(function provide17() { + return { + $pcDynamicDialog: this, + $parentInstance: this + }; + }, "provide") +}; +var script$T = { + name: "DynamicDialog", + "extends": script$1$y, + inheritAttrs: false, + data: /* @__PURE__ */ __name(function data11() { + return { + instanceMap: {} + }; + }, "data"), + openListener: null, + closeListener: null, + currentInstance: null, + mounted: /* @__PURE__ */ __name(function mounted16() { + var _this = this; + this.openListener = function(_ref) { + var instance = _ref.instance; + var key = UniqueComponentId() + "_dynamic_dialog"; + instance.visible = true; + instance.key = key; + _this.instanceMap[key] = instance; + }; + this.closeListener = function(_ref2) { + var instance = _ref2.instance, params = _ref2.params; + var key = instance.key; + var currentInstance = _this.instanceMap[key]; + if (currentInstance) { + currentInstance.visible = false; + currentInstance.options.onClose && currentInstance.options.onClose({ + data: params, + type: "config-close" + }); + _this.currentInstance = currentInstance; + } + }; + DynamicDialogEventBus.on("open", this.openListener); + DynamicDialogEventBus.on("close", this.closeListener); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount6() { + DynamicDialogEventBus.off("open", this.openListener); + DynamicDialogEventBus.off("close", this.closeListener); + }, "beforeUnmount"), + methods: { + onDialogHide: /* @__PURE__ */ __name(function onDialogHide(instance) { + !this.currentInstance && instance.options.onClose && instance.options.onClose({ + type: "dialog-close" + }); + delete this.instanceMap[instance.key]; + }, "onDialogHide"), + onDialogAfterHide: /* @__PURE__ */ __name(function onDialogAfterHide() { + this.currentInstance && delete this.currentInstance; + this.currentInstance = null; + }, "onDialogAfterHide"), + getTemplateItems: /* @__PURE__ */ __name(function getTemplateItems(template) { + return Array.isArray(template) ? template : [template]; + }, "getTemplateItems") + }, + components: { + DDialog: script$1w + } +}; +function render$O(_ctx, _cache, $props, $setup, $data, $options) { + var _component_DDialog = resolveComponent("DDialog"); + return openBlock(true), createElementBlock(Fragment, null, renderList($data.instanceMap, function(instance, key) { + return openBlock(), createBlock(_component_DDialog, mergeProps({ + key, + visible: instance.visible, + "onUpdate:visible": /* @__PURE__ */ __name(function onUpdateVisible($event) { + return instance.visible = $event; + }, "onUpdateVisible"), + _instance: instance, + ref_for: true + }, instance.options.props, { + onHide: /* @__PURE__ */ __name(function onHide($event) { + return $options.onDialogHide(instance); + }, "onHide"), + onAfterHide: $options.onDialogAfterHide + }), createSlots({ + "default": withCtx(function() { + return [(openBlock(), createBlock(resolveDynamicComponent(instance.content), mergeProps({ + ref_for: true + }, instance.options.emits), null, 16))]; + }), + _: 2 + }, [instance.options.templates && instance.options.templates.header ? { + name: "header", + fn: withCtx(function() { + return [(openBlock(true), createElementBlock(Fragment, null, renderList($options.getTemplateItems(instance.options.templates.header), function(header2, index) { + return openBlock(), createBlock(resolveDynamicComponent(header2), mergeProps({ + key: index + "_header", + ref_for: true + }, instance.options.emits), null, 16); + }), 128))]; + }), + key: "0" + } : void 0, instance.options.templates && instance.options.templates.footer ? { + name: "footer", + fn: withCtx(function() { + return [(openBlock(true), createElementBlock(Fragment, null, renderList($options.getTemplateItems(instance.options.templates.footer), function(footer, index) { + return openBlock(), createBlock(resolveDynamicComponent(footer), mergeProps({ + key: index + "_footer", + ref_for: true + }, instance.options.emits), null, 16); + }), 128))]; + }), + key: "1" + } : void 0]), 1040, ["visible", "onUpdate:visible", "_instance", "onHide", "onAfterHide"]); + }), 128); +} +__name(render$O, "render$O"); +script$T.render = render$O; +var theme$t = /* @__PURE__ */ __name(function theme11(_ref) { + var dt = _ref.dt; + return "\n.p-fieldset {\n background: ".concat(dt("fieldset.background"), ";\n border: 1px solid ").concat(dt("fieldset.border.color"), ";\n border-radius: ").concat(dt("fieldset.border.radius"), ";\n color: ").concat(dt("fieldset.color"), ";\n padding: ").concat(dt("fieldset.padding"), ";\n margin: 0;\n}\n\n.p-fieldset-legend {\n background: ").concat(dt("fieldset.legend.background"), ";\n border-radius: ").concat(dt("fieldset.legend.border.radius"), ";\n border-width: ").concat(dt("fieldset.legend.border.width"), ";\n border-style: solid;\n border-color: ").concat(dt("fieldset.legend.border.color"), ";\n padding: ").concat(dt("fieldset.legend.padding"), ";\n transition: background ").concat(dt("fieldset.transition.duration"), ", color ").concat(dt("fieldset.transition.duration"), ", outline-color ").concat(dt("fieldset.transition.duration"), ", box-shadow ").concat(dt("fieldset.transition.duration"), ";\n}\n\n.p-fieldset-toggleable > .p-fieldset-legend {\n padding: 0;\n}\n\n.p-fieldset-toggle-button {\n cursor: pointer;\n user-select: none;\n overflow: hidden;\n position: relative;\n text-decoration: none;\n display: flex;\n gap: ").concat(dt("fieldset.legend.gap"), ";\n align-items: center;\n justify-content: center;\n padding: ").concat(dt("fieldset.legend.padding"), ";\n background: transparent;\n border: 0 none;\n border-radius: ").concat(dt("fieldset.legend.border.radius"), ";\n transition: background ").concat(dt("fieldset.transition.duration"), ", color ").concat(dt("fieldset.transition.duration"), ", outline-color ").concat(dt("fieldset.transition.duration"), ", box-shadow ").concat(dt("fieldset.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-fieldset-legend-label {\n font-weight: ").concat(dt("fieldset.legend.font.weight"), ";\n}\n\n.p-fieldset-toggle-button:focus-visible {\n box-shadow: ").concat(dt("fieldset.legend.focus.ring.shadow"), ";\n outline: ").concat(dt("fieldset.legend.focus.ring.width"), " ").concat(dt("fieldset.legend.focus.ring.style"), " ").concat(dt("fieldset.legend.focus.ring.color"), ";\n outline-offset: ").concat(dt("fieldset.legend.focus.ring.offset"), ";\n}\n\n.p-fieldset-toggleable > .p-fieldset-legend:hover {\n color: ").concat(dt("fieldset.legend.hover.color"), ";\n background: ").concat(dt("fieldset.legend.hover.background"), ";\n}\n\n.p-fieldset-toggle-icon {\n color: ").concat(dt("fieldset.toggle.icon.color"), ";\n transition: color ").concat(dt("fieldset.transition.duration"), ";\n}\n\n.p-fieldset-toggleable > .p-fieldset-legend:hover .p-fieldset-toggle-icon {\n color: ").concat(dt("fieldset.toggle.icon.hover.color"), ";\n}\n\n.p-fieldset .p-fieldset-content {\n padding: ").concat(dt("fieldset.content.padding"), ";\n}\n"); +}, "theme"); +var classes$x = { + root: /* @__PURE__ */ __name(function root11(_ref2) { + var props = _ref2.props; + return ["p-fieldset p-component", { + "p-fieldset-toggleable": props.toggleable + }]; + }, "root"), + legend: "p-fieldset-legend", + legendLabel: "p-fieldset-legend-label", + toggleButton: "p-fieldset-toggle-button", + toggleIcon: "p-fieldset-toggle-icon", + contentContainer: "p-fieldset-content-container", + content: "p-fieldset-content" +}; +var FieldsetStyle = BaseStyle.extend({ + name: "fieldset", + theme: theme$t, + classes: classes$x +}); +var script$1$x = { + name: "BaseFieldset", + "extends": script$1d, + props: { + legend: String, + toggleable: Boolean, + collapsed: Boolean, + toggleButtonProps: { + type: null, + "default": null + } + }, + style: FieldsetStyle, + provide: /* @__PURE__ */ __name(function provide18() { + return { + $pcFieldset: this, + $parentInstance: this + }; + }, "provide") +}; +var script$S = { + name: "Fieldset", + "extends": script$1$x, + inheritAttrs: false, + emits: ["update:collapsed", "toggle"], + data: /* @__PURE__ */ __name(function data12() { + return { + id: this.$attrs.id, + d_collapsed: this.collapsed + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId4(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + collapsed: /* @__PURE__ */ __name(function collapsed(newValue) { + this.d_collapsed = newValue; + }, "collapsed") + }, + mounted: /* @__PURE__ */ __name(function mounted17() { + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + toggle: /* @__PURE__ */ __name(function toggle(event2) { + this.d_collapsed = !this.d_collapsed; + this.$emit("update:collapsed", this.d_collapsed); + this.$emit("toggle", { + originalEvent: event2, + value: this.d_collapsed + }); + }, "toggle"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown4(event2) { + if (event2.code === "Enter" || event2.code === "NumpadEnter" || event2.code === "Space") { + this.toggle(event2); + event2.preventDefault(); + } + }, "onKeyDown") + }, + computed: { + buttonAriaLabel: /* @__PURE__ */ __name(function buttonAriaLabel() { + return this.toggleButtonProps && this.toggleButtonProps.ariaLabel ? this.toggleButtonProps.ariaLabel : this.legend; + }, "buttonAriaLabel") + }, + directives: { + ripple: Ripple + }, + components: { + PlusIcon: script$1x, + MinusIcon: script$1y + } +}; +function _typeof$i(o) { + "@babel/helpers - typeof"; + return _typeof$i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$i(o); +} +__name(_typeof$i, "_typeof$i"); +function ownKeys$g(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$g, "ownKeys$g"); +function _objectSpread$g(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$g(Object(t2), true).forEach(function(r2) { + _defineProperty$h(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$g(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$g, "_objectSpread$g"); +function _defineProperty$h(e, r, t2) { + return (r = _toPropertyKey$h(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$h, "_defineProperty$h"); +function _toPropertyKey$h(t2) { + var i = _toPrimitive$h(t2, "string"); + return "symbol" == _typeof$i(i) ? i : i + ""; +} +__name(_toPropertyKey$h, "_toPropertyKey$h"); +function _toPrimitive$h(t2, r) { + if ("object" != _typeof$i(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$i(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$h, "_toPrimitive$h"); +var _hoisted_1$o = ["id"]; +var _hoisted_2$h = ["id", "aria-controls", "aria-expanded", "aria-label"]; +var _hoisted_3$e = ["id", "aria-labelledby"]; +function render$N(_ctx, _cache, $props, $setup, $data, $options) { + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("fieldset", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("legend", mergeProps({ + "class": _ctx.cx("legend") + }, _ctx.ptm("legend")), [renderSlot(_ctx.$slots, "legend", { + toggleCallback: $options.toggle + }, function() { + return [!_ctx.toggleable ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + id: $data.id + "_header", + "class": _ctx.cx("legendLabel") + }, _ctx.ptm("legendLabel")), toDisplayString(_ctx.legend), 17, _hoisted_1$o)) : createCommentVNode("", true), _ctx.toggleable ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ + key: 1, + id: $data.id + "_header", + type: "button", + "aria-controls": $data.id + "_content", + "aria-expanded": !$data.d_collapsed, + "aria-label": $options.buttonAriaLabel, + "class": _ctx.cx("toggleButton"), + onClick: _cache[0] || (_cache[0] = function() { + return $options.toggle && $options.toggle.apply($options, arguments); + }), + onKeydown: _cache[1] || (_cache[1] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }) + }, _objectSpread$g(_objectSpread$g({}, _ctx.toggleButtonProps), _ctx.ptm("toggleButton"))), [renderSlot(_ctx.$slots, _ctx.$slots.toggleicon ? "toggleicon" : "togglericon", { + collapsed: $data.d_collapsed, + "class": normalizeClass(_ctx.cx("toggleIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent($data.d_collapsed ? "PlusIcon" : "MinusIcon"), mergeProps({ + "class": _ctx.cx("toggleIcon") + }, _ctx.ptm("toggleIcon")), null, 16, ["class"]))]; + }), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("legendLabel") + }, _ctx.ptm("legendLabel")), toDisplayString(_ctx.legend), 17)], 16, _hoisted_2$h)), [[_directive_ripple]]) : createCommentVNode("", true)]; + })], 16), createVNode(Transition, mergeProps({ + name: "p-toggleable-content" + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [withDirectives(createBaseVNode("div", mergeProps({ + id: $data.id + "_content", + "class": _ctx.cx("contentContainer"), + role: "region", + "aria-labelledby": $data.id + "_header" + }, _ctx.ptm("contentContainer")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("content") + }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16)], 16, _hoisted_3$e), [[vShow, !$data.d_collapsed]])]; + }), + _: 3 + }, 16)], 16); +} +__name(render$N, "render$N"); +script$S.render = render$N; +var script$R = { + name: "UploadIcon", + "extends": script$1m +}; +function render$M(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$M, "render$M"); +script$R.render = render$M; +var theme$s = /* @__PURE__ */ __name(function theme12(_ref) { + var dt = _ref.dt; + return '\n.p-fileupload input[type="file"] {\n display: none;\n}\n\n.p-fileupload-advanced {\n border: 1px solid '.concat(dt("fileupload.border.color"), ";\n border-radius: ").concat(dt("fileupload.border.radius"), ";\n background: ").concat(dt("fileupload.background"), ";\n color: ").concat(dt("fileupload.color"), ";\n}\n\n.p-fileupload-header {\n display: flex;\n align-items: center;\n padding: ").concat(dt("fileupload.header.padding"), ";\n background: ").concat(dt("fileupload.header.background"), ";\n color: ").concat(dt("fileupload.header.color"), ";\n border-style: solid;\n border-width: ").concat(dt("fileupload.header.border.width"), ";\n border-color: ").concat(dt("fileupload.header.border.color"), ";\n border-radius: ").concat(dt("fileupload.header.border.radius"), ";\n gap: ").concat(dt("fileupload.header.gap"), ";\n}\n\n.p-fileupload-content {\n border: 1px solid transparent;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("fileupload.content.gap"), ";\n transition: border-color ").concat(dt("fileupload.transition.duration"), ";\n padding: ").concat(dt("fileupload.content.padding"), ";\n}\n\n.p-fileupload-content .p-progressbar {\n width: 100%;\n height: ").concat(dt("fileupload.progressbar.height"), ";\n}\n\n.p-fileupload-file-list {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("fileupload.filelist.gap"), ";\n}\n\n.p-fileupload-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n padding: ").concat(dt("fileupload.file.padding"), ";\n border-block-end: 1px solid ").concat(dt("fileupload.file.border.color"), ";\n gap: ").concat(dt("fileupload.file.gap"), ";\n}\n\n.p-fileupload-file:last-child {\n border-block-end: 0;\n}\n\n.p-fileupload-file-info {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("fileupload.file.info.gap"), ";\n}\n\n.p-fileupload-file-thumbnail {\n flex-shrink: 0;\n}\n\n.p-fileupload-file-actions {\n margin-inline-start: auto;\n}\n\n.p-fileupload-highlight {\n border: 1px dashed ").concat(dt("fileupload.content.highlight.border.color"), ";\n}\n\n.p-fileupload-basic {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: ").concat(dt("fileupload.basic.gap"), ";\n}\n"); +}, "theme"); +var classes$w = { + root: /* @__PURE__ */ __name(function root12(_ref2) { + var props = _ref2.props; + return ["p-fileupload p-fileupload-".concat(props.mode, " p-component")]; + }, "root"), + header: "p-fileupload-header", + pcChooseButton: "p-fileupload-choose-button", + pcUploadButton: "p-fileupload-upload-button", + pcCancelButton: "p-fileupload-cancel-button", + content: "p-fileupload-content", + fileList: "p-fileupload-file-list", + file: "p-fileupload-file", + fileThumbnail: "p-fileupload-file-thumbnail", + fileInfo: "p-fileupload-file-info", + fileName: "p-fileupload-file-name", + fileSize: "p-fileupload-file-size", + pcFileBadge: "p-fileupload-file-badge", + fileActions: "p-fileupload-file-actions", + pcFileRemoveButton: "p-fileupload-file-remove-button" +}; +var FileUploadStyle = BaseStyle.extend({ + name: "fileupload", + theme: theme$s, + classes: classes$w +}); +var script$2$6 = { + name: "BaseFileUpload", + "extends": script$1d, + props: { + name: { + type: String, + "default": null + }, + url: { + type: String, + "default": null + }, + mode: { + type: String, + "default": "advanced" + }, + multiple: { + type: Boolean, + "default": false + }, + accept: { + type: String, + "default": null + }, + disabled: { + type: Boolean, + "default": false + }, + auto: { + type: Boolean, + "default": false + }, + maxFileSize: { + type: Number, + "default": null + }, + invalidFileSizeMessage: { + type: String, + "default": "{0}: Invalid file size, file size should be smaller than {1}." + }, + invalidFileTypeMessage: { + type: String, + "default": "{0}: Invalid file type, allowed file types: {1}." + }, + fileLimit: { + type: Number, + "default": null + }, + invalidFileLimitMessage: { + type: String, + "default": "Maximum number of files exceeded, limit is {0} at most." + }, + withCredentials: { + type: Boolean, + "default": false + }, + previewWidth: { + type: Number, + "default": 50 + }, + chooseLabel: { + type: String, + "default": null + }, + uploadLabel: { + type: String, + "default": null + }, + cancelLabel: { + type: String, + "default": null + }, + customUpload: { + type: Boolean, + "default": false + }, + showUploadButton: { + type: Boolean, + "default": true + }, + showCancelButton: { + type: Boolean, + "default": true + }, + chooseIcon: { + type: String, + "default": void 0 + }, + uploadIcon: { + type: String, + "default": void 0 + }, + cancelIcon: { + type: String, + "default": void 0 + }, + style: null, + "class": null, + chooseButtonProps: { + type: null, + "default": null + }, + uploadButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default7() { + return { + severity: "secondary" + }; + }, "_default") + }, + cancelButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default8() { + return { + severity: "secondary" + }; + }, "_default") + } + }, + style: FileUploadStyle, + provide: /* @__PURE__ */ __name(function provide19() { + return { + $pcFileUpload: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$w = { + name: "FileContent", + hostName: "FileUpload", + "extends": script$1d, + emits: ["remove"], + props: { + files: { + type: Array, + "default": /* @__PURE__ */ __name(function _default9() { + return []; + }, "_default") + }, + badgeSeverity: { + type: String, + "default": "warn" + }, + badgeValue: { + type: String, + "default": null + }, + previewWidth: { + type: Number, + "default": 50 + }, + templates: { + type: null, + "default": null + } + }, + methods: { + formatSize: /* @__PURE__ */ __name(function formatSize(bytes) { + var _this$$primevue$confi; + var k = 1024; + var dm = 3; + var sizes = ((_this$$primevue$confi = this.$primevue.config.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.fileSizeTypes) || ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; + if (bytes === 0) { + return "0 ".concat(sizes[0]); + } + var i = Math.floor(Math.log(bytes) / Math.log(k)); + var formattedSize = parseFloat((bytes / Math.pow(k, i)).toFixed(dm)); + return "".concat(formattedSize, " ").concat(sizes[i]); + }, "formatSize") + }, + components: { + Button: script$1e, + Badge: script$1z, + TimesIcon: script$1g + } +}; +var _hoisted_1$1$5 = ["alt", "src", "width"]; +function render$1$6(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Badge = resolveComponent("Badge"); + var _component_TimesIcon = resolveComponent("TimesIcon"); + var _component_Button = resolveComponent("Button"); + return openBlock(true), createElementBlock(Fragment, null, renderList($props.files, function(file, index) { + return openBlock(), createElementBlock("div", mergeProps({ + key: file.name + file.type + file.size, + "class": _ctx.cx("file"), + ref_for: true + }, _ctx.ptm("file")), [createBaseVNode("img", mergeProps({ + role: "presentation", + "class": _ctx.cx("fileThumbnail"), + alt: file.name, + src: file.objectURL, + width: $props.previewWidth, + ref_for: true + }, _ctx.ptm("fileThumbnail")), null, 16, _hoisted_1$1$5), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("fileInfo"), + ref_for: true + }, _ctx.ptm("fileInfo")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("fileName"), + ref_for: true + }, _ctx.ptm("fileName")), toDisplayString(file.name), 17), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("fileSize"), + ref_for: true + }, _ctx.ptm("fileSize")), toDisplayString($options.formatSize(file.size)), 17)], 16), createVNode(_component_Badge, { + value: $props.badgeValue, + "class": normalizeClass(_ctx.cx("pcFileBadge")), + severity: $props.badgeSeverity, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcFileBadge") + }, null, 8, ["value", "class", "severity", "unstyled", "pt"]), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("fileActions"), + ref_for: true + }, _ctx.ptm("fileActions")), [createVNode(_component_Button, { + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return _ctx.$emit("remove", index); + }, "onClick"), + text: "", + rounded: "", + severity: "danger", + "class": normalizeClass(_ctx.cx("pcFileRemoveButton")), + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcFileRemoveButton") + }, { + icon: withCtx(function(iconProps) { + return [$props.templates.fileremoveicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.fileremoveicon), { + key: 0, + "class": normalizeClass(iconProps["class"]), + file, + index + }, null, 8, ["class", "file", "index"])) : (openBlock(), createBlock(_component_TimesIcon, mergeProps({ + key: 1, + "class": iconProps["class"], + "aria-hidden": "true", + ref_for: true + }, _ctx.ptm("pcFileRemoveButton")["icon"]), null, 16, ["class"]))]; + }), + _: 2 + }, 1032, ["onClick", "class", "unstyled", "pt"])], 16)], 16); + }), 128); +} +__name(render$1$6, "render$1$6"); +script$1$w.render = render$1$6; +function _toConsumableArray$9(r) { + return _arrayWithoutHoles$9(r) || _iterableToArray$9(r) || _unsupportedIterableToArray$a(r) || _nonIterableSpread$9(); +} +__name(_toConsumableArray$9, "_toConsumableArray$9"); +function _nonIterableSpread$9() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$9, "_nonIterableSpread$9"); +function _iterableToArray$9(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$9, "_iterableToArray$9"); +function _arrayWithoutHoles$9(r) { + if (Array.isArray(r)) return _arrayLikeToArray$a(r); +} +__name(_arrayWithoutHoles$9, "_arrayWithoutHoles$9"); +function _createForOfIteratorHelper$3(r, e) { + var t2 = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t2) { + if (Array.isArray(r) || (t2 = _unsupportedIterableToArray$a(r)) || e) { + t2 && (r = t2); + var _n = 0, F = /* @__PURE__ */ __name(function F2() { + }, "F"); + return { s: F, n: /* @__PURE__ */ __name(function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + throw r2; + }, "e"), f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: /* @__PURE__ */ __name(function s() { + t2 = t2.call(r); + }, "s"), n: /* @__PURE__ */ __name(function n() { + var r2 = t2.next(); + return a = r2.done, r2; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + u = true, o = r2; + }, "e"), f: /* @__PURE__ */ __name(function f() { + try { + a || null == t2["return"] || t2["return"](); + } finally { + if (u) throw o; + } + }, "f") }; +} +__name(_createForOfIteratorHelper$3, "_createForOfIteratorHelper$3"); +function _unsupportedIterableToArray$a(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$a(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$a(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$a, "_unsupportedIterableToArray$a"); +function _arrayLikeToArray$a(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$a, "_arrayLikeToArray$a"); +var script$Q = { + name: "FileUpload", + "extends": script$2$6, + inheritAttrs: false, + emits: ["select", "uploader", "before-upload", "progress", "upload", "error", "before-send", "clear", "remove", "remove-uploaded-file"], + duplicateIEEvent: false, + data: /* @__PURE__ */ __name(function data13() { + return { + uploadedFileCount: 0, + files: [], + messages: [], + focused: false, + progress: null, + uploadedFiles: [] + }; + }, "data"), + methods: { + upload: /* @__PURE__ */ __name(function upload() { + if (this.hasFiles) this.uploader(); + }, "upload"), + onBasicUploaderClick: /* @__PURE__ */ __name(function onBasicUploaderClick(event2) { + if (event2.button === 0) this.$refs.fileInput.click(); + }, "onBasicUploaderClick"), + onFileSelect: /* @__PURE__ */ __name(function onFileSelect(event2) { + if (event2.type !== "drop" && this.isIE11() && this.duplicateIEEvent) { + this.duplicateIEEvent = false; + return; + } + if (this.isBasic && this.hasFiles) { + this.files = []; + } + this.messages = []; + this.files = this.files || []; + var files = event2.dataTransfer ? event2.dataTransfer.files : event2.target.files; + var _iterator = _createForOfIteratorHelper$3(files), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var file = _step.value; + if (!this.isFileSelected(file) && !this.isFileLimitExceeded()) { + if (this.validate(file)) { + if (this.isImage(file)) { + file.objectURL = window.URL.createObjectURL(file); + } + this.files.push(file); + } + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + this.$emit("select", { + originalEvent: event2, + files: this.files + }); + if (this.fileLimit) { + this.checkFileLimit(); + } + if (this.auto && this.hasFiles && !this.isFileLimitExceeded()) { + this.uploader(); + } + if (event2.type !== "drop" && this.isIE11()) { + this.clearIEInput(); + } else { + this.clearInputElement(); + } + }, "onFileSelect"), + choose: /* @__PURE__ */ __name(function choose() { + this.$refs.fileInput.click(); + }, "choose"), + uploader: /* @__PURE__ */ __name(function uploader() { + var _this = this; + if (this.customUpload) { + if (this.fileLimit) { + this.uploadedFileCount += this.files.length; + } + this.$emit("uploader", { + files: this.files + }); + this.clear(); + } else { + var xhr = new XMLHttpRequest(); + var formData = new FormData(); + this.$emit("before-upload", { + xhr, + formData + }); + var _iterator2 = _createForOfIteratorHelper$3(this.files), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + var file = _step2.value; + formData.append(this.name, file, file.name); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + xhr.upload.addEventListener("progress", function(event2) { + if (event2.lengthComputable) { + _this.progress = Math.round(event2.loaded * 100 / event2.total); + } + _this.$emit("progress", { + originalEvent: event2, + progress: _this.progress + }); + }); + xhr.onreadystatechange = function() { + if (xhr.readyState === 4) { + var _this$uploadedFiles; + _this.progress = 0; + if (xhr.status >= 200 && xhr.status < 300) { + if (_this.fileLimit) { + _this.uploadedFileCount += _this.files.length; + } + _this.$emit("upload", { + xhr, + files: _this.files + }); + } else { + _this.$emit("error", { + xhr, + files: _this.files + }); + } + (_this$uploadedFiles = _this.uploadedFiles).push.apply(_this$uploadedFiles, _toConsumableArray$9(_this.files)); + _this.clear(); + } + }; + xhr.open("POST", this.url, true); + this.$emit("before-send", { + xhr, + formData + }); + xhr.withCredentials = this.withCredentials; + xhr.send(formData); + } + }, "uploader"), + clear: /* @__PURE__ */ __name(function clear() { + this.files = []; + this.messages = null; + this.$emit("clear"); + if (this.isAdvanced) { + this.clearInputElement(); + } + }, "clear"), + onFocus: /* @__PURE__ */ __name(function onFocus5() { + this.focused = true; + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur4() { + this.focused = false; + }, "onBlur"), + isFileSelected: /* @__PURE__ */ __name(function isFileSelected(file) { + if (this.files && this.files.length) { + var _iterator3 = _createForOfIteratorHelper$3(this.files), _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { + var sFile = _step3.value; + if (sFile.name + sFile.type + sFile.size === file.name + file.type + file.size) return true; + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + return false; + }, "isFileSelected"), + isIE11: /* @__PURE__ */ __name(function isIE11() { + return !!window["MSInputMethodContext"] && !!document["documentMode"]; + }, "isIE11"), + validate: /* @__PURE__ */ __name(function validate(file) { + if (this.accept && !this.isFileTypeValid(file)) { + this.messages.push(this.invalidFileTypeMessage.replace("{0}", file.name).replace("{1}", this.accept)); + return false; + } + if (this.maxFileSize && file.size > this.maxFileSize) { + this.messages.push(this.invalidFileSizeMessage.replace("{0}", file.name).replace("{1}", this.formatSize(this.maxFileSize))); + return false; + } + return true; + }, "validate"), + isFileTypeValid: /* @__PURE__ */ __name(function isFileTypeValid(file) { + var acceptableTypes = this.accept.split(",").map(function(type2) { + return type2.trim(); + }); + var _iterator4 = _createForOfIteratorHelper$3(acceptableTypes), _step4; + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) { + var type = _step4.value; + var acceptable = this.isWildcard(type) ? this.getTypeClass(file.type) === this.getTypeClass(type) : file.type == type || this.getFileExtension(file).toLowerCase() === type.toLowerCase(); + if (acceptable) { + return true; + } + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + return false; + }, "isFileTypeValid"), + getTypeClass: /* @__PURE__ */ __name(function getTypeClass(fileType) { + return fileType.substring(0, fileType.indexOf("/")); + }, "getTypeClass"), + isWildcard: /* @__PURE__ */ __name(function isWildcard(fileType) { + return fileType.indexOf("*") !== -1; + }, "isWildcard"), + getFileExtension: /* @__PURE__ */ __name(function getFileExtension(file) { + return "." + file.name.split(".").pop(); + }, "getFileExtension"), + isImage: /* @__PURE__ */ __name(function isImage(file) { + return /^image\//.test(file.type); + }, "isImage"), + onDragEnter: /* @__PURE__ */ __name(function onDragEnter(event2) { + if (!this.disabled) { + event2.stopPropagation(); + event2.preventDefault(); + } + }, "onDragEnter"), + onDragOver: /* @__PURE__ */ __name(function onDragOver(event2) { + if (!this.disabled) { + !this.isUnstyled && addClass(this.$refs.content, "p-fileupload-highlight"); + this.$refs.content.setAttribute("data-p-highlight", true); + event2.stopPropagation(); + event2.preventDefault(); + } + }, "onDragOver"), + onDragLeave: /* @__PURE__ */ __name(function onDragLeave() { + if (!this.disabled) { + !this.isUnstyled && removeClass(this.$refs.content, "p-fileupload-highlight"); + this.$refs.content.setAttribute("data-p-highlight", false); + } + }, "onDragLeave"), + onDrop: /* @__PURE__ */ __name(function onDrop(event2) { + if (!this.disabled) { + !this.isUnstyled && removeClass(this.$refs.content, "p-fileupload-highlight"); + this.$refs.content.setAttribute("data-p-highlight", false); + event2.stopPropagation(); + event2.preventDefault(); + var files = event2.dataTransfer ? event2.dataTransfer.files : event2.target.files; + var allowDrop = this.multiple || files && files.length === 1; + if (allowDrop) { + this.onFileSelect(event2); + } + } + }, "onDrop"), + remove: /* @__PURE__ */ __name(function remove(index) { + this.clearInputElement(); + var removedFile = this.files.splice(index, 1)[0]; + this.files = _toConsumableArray$9(this.files); + this.$emit("remove", { + file: removedFile, + files: this.files + }); + }, "remove"), + removeUploadedFile: /* @__PURE__ */ __name(function removeUploadedFile(index) { + var removedFile = this.uploadedFiles.splice(index, 1)[0]; + this.uploadedFiles = _toConsumableArray$9(this.uploadedFiles); + this.$emit("remove-uploaded-file", { + file: removedFile, + files: this.uploadedFiles + }); + }, "removeUploadedFile"), + clearInputElement: /* @__PURE__ */ __name(function clearInputElement() { + this.$refs.fileInput.value = ""; + }, "clearInputElement"), + clearIEInput: /* @__PURE__ */ __name(function clearIEInput() { + if (this.$refs.fileInput) { + this.duplicateIEEvent = true; + this.$refs.fileInput.value = ""; + } + }, "clearIEInput"), + formatSize: /* @__PURE__ */ __name(function formatSize2(bytes) { + var _this$$primevue$confi; + var k = 1024; + var dm = 3; + var sizes = ((_this$$primevue$confi = this.$primevue.config.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.fileSizeTypes) || ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; + if (bytes === 0) { + return "0 ".concat(sizes[0]); + } + var i = Math.floor(Math.log(bytes) / Math.log(k)); + var formattedSize = parseFloat((bytes / Math.pow(k, i)).toFixed(dm)); + return "".concat(formattedSize, " ").concat(sizes[i]); + }, "formatSize"), + isFileLimitExceeded: /* @__PURE__ */ __name(function isFileLimitExceeded() { + if (this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount && this.focused) { + this.focused = false; + } + return this.fileLimit && this.fileLimit < this.files.length + this.uploadedFileCount; + }, "isFileLimitExceeded"), + checkFileLimit: /* @__PURE__ */ __name(function checkFileLimit() { + if (this.isFileLimitExceeded()) { + this.messages.push(this.invalidFileLimitMessage.replace("{0}", this.fileLimit.toString())); + } + }, "checkFileLimit"), + onMessageClose: /* @__PURE__ */ __name(function onMessageClose() { + this.messages = null; + }, "onMessageClose") + }, + computed: { + isAdvanced: /* @__PURE__ */ __name(function isAdvanced() { + return this.mode === "advanced"; + }, "isAdvanced"), + isBasic: /* @__PURE__ */ __name(function isBasic() { + return this.mode === "basic"; + }, "isBasic"), + chooseButtonClass: /* @__PURE__ */ __name(function chooseButtonClass() { + return [this.cx("pcChooseButton"), this["class"]]; + }, "chooseButtonClass"), + basicFileChosenLabel: /* @__PURE__ */ __name(function basicFileChosenLabel() { + var _this$$primevue$confi3; + if (this.auto) return this.chooseButtonLabel; + else if (this.hasFiles) { + var _this$$primevue$confi2; + if (this.files && this.files.length === 1) return this.files[0].name; + return (_this$$primevue$confi2 = this.$primevue.config.locale) === null || _this$$primevue$confi2 === void 0 || (_this$$primevue$confi2 = _this$$primevue$confi2.fileChosenMessage) === null || _this$$primevue$confi2 === void 0 ? void 0 : _this$$primevue$confi2.replace("{0}", this.files.length); + } + return ((_this$$primevue$confi3 = this.$primevue.config.locale) === null || _this$$primevue$confi3 === void 0 ? void 0 : _this$$primevue$confi3.noFileChosenMessage) || ""; + }, "basicFileChosenLabel"), + hasFiles: /* @__PURE__ */ __name(function hasFiles() { + return this.files && this.files.length > 0; + }, "hasFiles"), + hasUploadedFiles: /* @__PURE__ */ __name(function hasUploadedFiles() { + return this.uploadedFiles && this.uploadedFiles.length > 0; + }, "hasUploadedFiles"), + chooseDisabled: /* @__PURE__ */ __name(function chooseDisabled() { + return this.disabled || this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount; + }, "chooseDisabled"), + uploadDisabled: /* @__PURE__ */ __name(function uploadDisabled() { + return this.disabled || !this.hasFiles || this.fileLimit && this.fileLimit < this.files.length; + }, "uploadDisabled"), + cancelDisabled: /* @__PURE__ */ __name(function cancelDisabled() { + return this.disabled || !this.hasFiles; + }, "cancelDisabled"), + chooseButtonLabel: /* @__PURE__ */ __name(function chooseButtonLabel() { + return this.chooseLabel || this.$primevue.config.locale.choose; + }, "chooseButtonLabel"), + uploadButtonLabel: /* @__PURE__ */ __name(function uploadButtonLabel() { + return this.uploadLabel || this.$primevue.config.locale.upload; + }, "uploadButtonLabel"), + cancelButtonLabel: /* @__PURE__ */ __name(function cancelButtonLabel() { + return this.cancelLabel || this.$primevue.config.locale.cancel; + }, "cancelButtonLabel"), + completedLabel: /* @__PURE__ */ __name(function completedLabel() { + return this.$primevue.config.locale.completed; + }, "completedLabel"), + pendingLabel: /* @__PURE__ */ __name(function pendingLabel() { + return this.$primevue.config.locale.pending; + }, "pendingLabel") + }, + components: { + Button: script$1e, + ProgressBar: script$1A, + Message: script$1B, + FileContent: script$1$w, + PlusIcon: script$1x, + UploadIcon: script$R, + TimesIcon: script$1g + }, + directives: { + ripple: Ripple + } +}; +var _hoisted_1$n = ["multiple", "accept", "disabled"]; +var _hoisted_2$g = ["files"]; +var _hoisted_3$d = ["accept", "disabled", "multiple"]; +function render$L(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Button = resolveComponent("Button"); + var _component_ProgressBar = resolveComponent("ProgressBar"); + var _component_Message = resolveComponent("Message"); + var _component_FileContent = resolveComponent("FileContent"); + return $options.isAdvanced ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("input", mergeProps({ + ref: "fileInput", + type: "file", + onChange: _cache[0] || (_cache[0] = function() { + return $options.onFileSelect && $options.onFileSelect.apply($options, arguments); + }), + multiple: _ctx.multiple, + accept: _ctx.accept, + disabled: $options.chooseDisabled + }, _ctx.ptm("input")), null, 16, _hoisted_1$n), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("header") + }, _ctx.ptm("header")), [renderSlot(_ctx.$slots, "header", { + files: $data.files, + uploadedFiles: $data.uploadedFiles, + chooseCallback: $options.choose, + uploadCallback: $options.uploader, + clearCallback: $options.clear + }, function() { + return [createVNode(_component_Button, mergeProps({ + label: $options.chooseButtonLabel, + "class": $options.chooseButtonClass, + style: _ctx.style, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onClick: $options.choose, + onKeydown: withKeys($options.choose, ["enter"]), + onFocus: $options.onFocus, + onBlur: $options.onBlur + }, _ctx.chooseButtonProps, { + pt: _ctx.ptm("pcChooseButton") + }), { + icon: withCtx(function(iconProps) { + return [renderSlot(_ctx.$slots, "chooseicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.chooseIcon ? "span" : "PlusIcon"), mergeProps({ + "class": [iconProps["class"], _ctx.chooseIcon], + "aria-hidden": "true" + }, _ctx.ptm("pcChooseButton")["icon"]), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["label", "class", "style", "disabled", "unstyled", "onClick", "onKeydown", "onFocus", "onBlur", "pt"]), _ctx.showUploadButton ? (openBlock(), createBlock(_component_Button, mergeProps({ + key: 0, + "class": _ctx.cx("pcUploadButton"), + label: $options.uploadButtonLabel, + onClick: $options.uploader, + disabled: $options.uploadDisabled, + unstyled: _ctx.unstyled + }, _ctx.uploadButtonProps, { + pt: _ctx.ptm("pcUploadButton") + }), { + icon: withCtx(function(iconProps) { + return [renderSlot(_ctx.$slots, "uploadicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.uploadIcon ? "span" : "UploadIcon"), mergeProps({ + "class": [iconProps["class"], _ctx.uploadIcon], + "aria-hidden": "true" + }, _ctx.ptm("pcUploadButton")["icon"], { + "data-pc-section": "uploadbuttonicon" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "label", "onClick", "disabled", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.showCancelButton ? (openBlock(), createBlock(_component_Button, mergeProps({ + key: 1, + "class": _ctx.cx("pcCancelButton"), + label: $options.cancelButtonLabel, + onClick: $options.clear, + disabled: $options.cancelDisabled, + unstyled: _ctx.unstyled + }, _ctx.cancelButtonProps, { + pt: _ctx.ptm("pcCancelButton") + }), { + icon: withCtx(function(iconProps) { + return [renderSlot(_ctx.$slots, "cancelicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.cancelIcon ? "span" : "TimesIcon"), mergeProps({ + "class": [iconProps["class"], _ctx.cancelIcon], + "aria-hidden": "true" + }, _ctx.ptm("pcCancelButton")["icon"], { + "data-pc-section": "cancelbuttonicon" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "label", "onClick", "disabled", "unstyled", "pt"])) : createCommentVNode("", true)]; + })], 16), createBaseVNode("div", mergeProps({ + ref: "content", + "class": _ctx.cx("content"), + onDragenter: _cache[1] || (_cache[1] = function() { + return $options.onDragEnter && $options.onDragEnter.apply($options, arguments); + }), + onDragover: _cache[2] || (_cache[2] = function() { + return $options.onDragOver && $options.onDragOver.apply($options, arguments); + }), + onDragleave: _cache[3] || (_cache[3] = function() { + return $options.onDragLeave && $options.onDragLeave.apply($options, arguments); + }), + onDrop: _cache[4] || (_cache[4] = function() { + return $options.onDrop && $options.onDrop.apply($options, arguments); + }) + }, _ctx.ptm("content"), { + "data-p-highlight": false + }), [renderSlot(_ctx.$slots, "content", { + files: $data.files, + uploadedFiles: $data.uploadedFiles, + removeUploadedFileCallback: $options.removeUploadedFile, + removeFileCallback: $options.remove, + progress: $data.progress, + messages: $data.messages + }, function() { + return [$options.hasFiles ? (openBlock(), createBlock(_component_ProgressBar, { + key: 0, + value: $data.progress, + showValue: false, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcProgressbar") + }, null, 8, ["value", "unstyled", "pt"])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function(msg) { + return openBlock(), createBlock(_component_Message, { + key: msg, + severity: "error", + onClose: $options.onMessageClose, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcMessage") + }, { + "default": withCtx(function() { + return [createTextVNode(toDisplayString(msg), 1)]; + }), + _: 2 + }, 1032, ["onClose", "unstyled", "pt"]); + }), 128)), $options.hasFiles ? (openBlock(), createElementBlock("div", { + key: 1, + "class": normalizeClass(_ctx.cx("fileList")) + }, [createVNode(_component_FileContent, { + files: $data.files, + onRemove: $options.remove, + badgeValue: $options.pendingLabel, + previewWidth: _ctx.previewWidth, + templates: _ctx.$slots, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["files", "onRemove", "badgeValue", "previewWidth", "templates", "unstyled", "pt"])], 2)) : createCommentVNode("", true), $options.hasUploadedFiles ? (openBlock(), createElementBlock("div", { + key: 2, + "class": normalizeClass(_ctx.cx("fileList")) + }, [createVNode(_component_FileContent, { + files: $data.uploadedFiles, + onRemove: $options.removeUploadedFile, + badgeValue: $options.completedLabel, + badgeSeverity: "success", + previewWidth: _ctx.previewWidth, + templates: _ctx.$slots, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["files", "onRemove", "badgeValue", "previewWidth", "templates", "unstyled", "pt"])], 2)) : createCommentVNode("", true)]; + }), _ctx.$slots.empty && !$options.hasFiles && !$options.hasUploadedFiles ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ + key: 0 + }, _ctx.ptm("empty"))), [renderSlot(_ctx.$slots, "empty")], 16)) : createCommentVNode("", true)], 16)], 16)) : $options.isBasic ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function(msg) { + return openBlock(), createBlock(_component_Message, { + key: msg, + severity: "error", + onClose: $options.onMessageClose, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcMessage") + }, { + "default": withCtx(function() { + return [createTextVNode(toDisplayString(msg), 1)]; + }), + _: 2 + }, 1032, ["onClose", "unstyled", "pt"]); + }), 128)), createVNode(_component_Button, mergeProps({ + label: $options.chooseButtonLabel, + "class": $options.chooseButtonClass, + style: _ctx.style, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onMouseup: $options.onBasicUploaderClick, + onKeydown: withKeys($options.choose, ["enter"]), + onFocus: $options.onFocus, + onBlur: $options.onBlur + }, _ctx.chooseButtonProps, { + pt: _ctx.ptm("pcChooseButton") + }), { + icon: withCtx(function(iconProps) { + return [renderSlot(_ctx.$slots, "chooseicon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.chooseIcon ? "span" : "PlusIcon"), mergeProps({ + "class": [iconProps["class"], _ctx.chooseIcon], + "aria-hidden": "true" + }, _ctx.ptm("pcChooseButton")["icon"]), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["label", "class", "style", "disabled", "unstyled", "onMouseup", "onKeydown", "onFocus", "onBlur", "pt"]), !_ctx.auto ? renderSlot(_ctx.$slots, "filelabel", { + key: 0, + "class": normalizeClass(_ctx.cx("filelabel")) + }, function() { + return [createBaseVNode("span", { + "class": normalizeClass(_ctx.cx("filelabel")), + files: $data.files + }, toDisplayString($options.basicFileChosenLabel), 11, _hoisted_2$g)]; + }) : createCommentVNode("", true), createBaseVNode("input", mergeProps({ + ref: "fileInput", + type: "file", + accept: _ctx.accept, + disabled: _ctx.disabled, + multiple: _ctx.multiple, + onChange: _cache[5] || (_cache[5] = function() { + return $options.onFileSelect && $options.onFileSelect.apply($options, arguments); + }), + onFocus: _cache[6] || (_cache[6] = function() { + return $options.onFocus && $options.onFocus.apply($options, arguments); + }), + onBlur: _cache[7] || (_cache[7] = function() { + return $options.onBlur && $options.onBlur.apply($options, arguments); + }) + }, _ctx.ptm("input")), null, 16, _hoisted_3$d)], 16)) : createCommentVNode("", true); +} +__name(render$L, "render$L"); +script$Q.render = render$L; +var classes$v = { + root: "p-fluid" +}; +var FluidStyle = BaseStyle.extend({ + name: "fluid", + classes: classes$v +}); +var script$1$v = { + name: "BaseFluid", + "extends": script$1d, + style: FluidStyle, + provide: /* @__PURE__ */ __name(function provide20() { + return { + $pcFluid: this, + $parentInstance: this + }; + }, "provide") +}; +var script$P = { + name: "Fluid", + "extends": script$1$v, + inheritAttrs: false +}; +function render$K(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$K, "render$K"); +script$P.render = render$K; +var theme$r = /* @__PURE__ */ __name(function theme13(_ref) { + var dt = _ref.dt; + return "\n.p-iftalabel {\n display: block;\n position: relative;\n}\n\n.p-iftalabel label {\n position: absolute;\n pointer-events: none;\n top: ".concat(dt("iftalabel.top"), ";\n transition-property: all;\n transition-timing-function: ease;\n line-height: 1;\n font-size: ").concat(dt("iftalabel.font.size"), ";\n font-weight: ").concat(dt("iftalabel.font.weight"), ";\n inset-inline-start: ").concat(dt("iftalabel.position.x"), ";\n color: ").concat(dt("iftalabel.color"), ";\n transition-duration: ").concat(dt("iftalabel.transition.duration"), ";\n}\n\n.p-iftalabel .p-inputtext,\n.p-iftalabel .p-textarea,\n.p-iftalabel .p-select-label,\n.p-iftalabel .p-multiselect-label,\n.p-iftalabel .p-autocomplete-input-multiple,\n.p-iftalabel .p-cascadeselect-label,\n.p-iftalabel .p-treeselect-label {\n padding-block-start: ").concat(dt("iftalabel.input.padding.top"), ";\n padding-block-end: ").concat(dt("iftalabel.input.padding.bottom"), ";\n}\n\n.p-iftalabel:has(.p-invalid) label {\n color: ").concat(dt("iftalabel.invalid.color"), ";\n}\n\n.p-iftalabel:has(input:focus) label,\n.p-iftalabel:has(input:-webkit-autofill) label,\n.p-iftalabel:has(textarea:focus) label,\n.p-iftalabel:has(.p-inputwrapper-focus) label {\n color: ").concat(dt("iftalabel.focus.color"), ";\n}\n\n.p-iftalabel .p-inputicon {\n top: ").concat(dt("iftalabel.input.padding.top"), ";\n transform: translateY(25%);\n margin-top: 0;\n}\n"); +}, "theme"); +var classes$u = { + root: "p-iftalabel" +}; +var IftaLabelStyle = BaseStyle.extend({ + name: "iftalabel", + theme: theme$r, + classes: classes$u +}); +var script$1$u = { + name: "BaseIftaLabel", + "extends": script$1d, + style: IftaLabelStyle, + provide: /* @__PURE__ */ __name(function provide21() { + return { + $pcIftaLabel: this, + $parentInstance: this + }; + }, "provide") +}; +var script$O = { + name: "IftaLabel", + "extends": script$1$u, + inheritAttrs: false +}; +function render$J(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("span", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$J, "render$J"); +script$O.render = render$J; +var script$N = { + name: "EyeIcon", + "extends": script$1m +}; +function render$I(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$I, "render$I"); +script$N.render = render$I; +var script$M = { + name: "RefreshIcon", + "extends": script$1m +}; +function render$H(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.77051 5.96336C6.84324 5.99355 6.92127 6.00891 7.00002 6.00854C7.07877 6.00891 7.1568 5.99355 7.22953 5.96336C7.30226 5.93317 7.36823 5.88876 7.42357 5.83273L9.82101 3.43529C9.93325 3.32291 9.99629 3.17058 9.99629 3.01175C9.99629 2.85292 9.93325 2.70058 9.82101 2.5882L7.42357 0.190763C7.3687 0.131876 7.30253 0.0846451 7.22901 0.0518865C7.15549 0.019128 7.07612 0.00151319 6.99564 9.32772e-05C6.91517 -0.00132663 6.83523 0.0134773 6.7606 0.0436218C6.68597 0.0737664 6.61817 0.118634 6.56126 0.175548C6.50435 0.232462 6.45948 0.300257 6.42933 0.374888C6.39919 0.449519 6.38439 0.529456 6.38581 0.609933C6.38722 0.690409 6.40484 0.769775 6.4376 0.843296C6.47036 0.916817 6.51759 0.982986 6.57647 1.03786L7.95103 2.41241H6.99998C5.46337 2.41241 3.98969 3.02283 2.90314 4.10938C1.81659 5.19593 1.20618 6.66961 1.20618 8.20622C1.20618 9.74283 1.81659 11.2165 2.90314 12.3031C3.98969 13.3896 5.46337 14 6.99998 14C8.53595 13.9979 10.0084 13.3868 11.0945 12.3007C12.1806 11.2146 12.7917 9.74218 12.7938 8.20622C12.7938 8.04726 12.7306 7.89481 12.6182 7.78241C12.5058 7.67001 12.3534 7.60686 12.1944 7.60686C12.0355 7.60686 11.883 7.67001 11.7706 7.78241C11.6582 7.89481 11.5951 8.04726 11.5951 8.20622C11.5951 9.11504 11.3256 10.0035 10.8207 10.7591C10.3157 11.5148 9.59809 12.1037 8.75845 12.4515C7.9188 12.7993 6.99489 12.8903 6.10353 12.713C5.21217 12.5357 4.3934 12.0981 3.75077 11.4554C3.10813 10.8128 2.67049 9.99404 2.49319 9.10268C2.31589 8.21132 2.40688 7.2874 2.75468 6.44776C3.10247 5.60811 3.69143 4.89046 4.44709 4.38554C5.20275 3.88063 6.09116 3.61113 6.99998 3.61113H7.95098L6.57647 4.98564C6.46423 5.09802 6.40119 5.25035 6.40119 5.40918C6.40119 5.56801 6.46423 5.72035 6.57647 5.83273C6.63181 5.88876 6.69778 5.93317 6.77051 5.96336Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$H, "render$H"); +script$M.render = render$H; +var script$L = { + name: "SearchMinusIcon", + "extends": script$1m +}; +function render$G(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.0208 12.0411C4.83005 12.0411 3.66604 11.688 2.67596 11.0265C1.68589 10.3649 0.914216 9.42464 0.458534 8.32452C0.00285271 7.22441 -0.116374 6.01388 0.11593 4.84601C0.348235 3.67813 0.921637 2.60537 1.76363 1.76338C2.60562 0.921393 3.67838 0.34799 4.84625 0.115686C6.01412 -0.116618 7.22466 0.00260857 8.32477 0.45829C9.42488 0.913972 10.3652 1.68564 11.0267 2.67572C11.6883 3.66579 12.0414 4.8298 12.0414 6.02056C12.0395 7.41563 11.5542 8.76029 10.6783 9.8305L13.8244 12.9765C13.9367 13.089 13.9997 13.2414 13.9997 13.4003C13.9997 13.5592 13.9367 13.7116 13.8244 13.8241C13.769 13.8801 13.703 13.9245 13.6302 13.9548C13.5575 13.985 13.4794 14.0003 13.4006 14C13.3218 14.0003 13.2437 13.985 13.171 13.9548C13.0982 13.9245 13.0322 13.8801 12.9768 13.8241L9.83082 10.678C8.76059 11.5539 7.4159 12.0393 6.0208 12.0411ZM6.0208 1.20731C5.07199 1.20731 4.14449 1.48867 3.35559 2.0158C2.56669 2.54292 1.95181 3.29215 1.58872 4.16874C1.22562 5.04532 1.13062 6.00989 1.31572 6.94046C1.50083 7.87104 1.95772 8.72583 2.62863 9.39674C3.29954 10.0676 4.15433 10.5245 5.0849 10.7096C6.01548 10.8947 6.98005 10.7997 7.85663 10.4367C8.73322 10.0736 9.48244 9.45868 10.0096 8.66978C10.5367 7.88088 10.8181 6.95337 10.8181 6.00457C10.8181 4.73226 10.3126 3.51206 9.41297 2.6124C8.51331 1.71274 7.29311 1.20731 6.0208 1.20731ZM4.00591 6.60422H8.00362C8.16266 6.60422 8.31518 6.54104 8.42764 6.42859C8.5401 6.31613 8.60328 6.1636 8.60328 6.00456C8.60328 5.84553 8.5401 5.693 8.42764 5.58054C8.31518 5.46809 8.16266 5.40491 8.00362 5.40491H4.00591C3.84687 5.40491 3.69434 5.46809 3.58189 5.58054C3.46943 5.693 3.40625 5.84553 3.40625 6.00456C3.40625 6.1636 3.46943 6.31613 3.58189 6.42859C3.69434 6.54104 3.84687 6.60422 4.00591 6.60422Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$G, "render$G"); +script$L.render = render$G; +var script$K = { + name: "SearchPlusIcon", + "extends": script$1m +}; +function render$F(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M2.67596 11.0265C3.66604 11.688 4.83005 12.0411 6.0208 12.0411C6.81143 12.0411 7.59432 11.8854 8.32477 11.5828C8.86999 11.357 9.37802 11.0526 9.83311 10.6803L12.9768 13.8241C13.0322 13.8801 13.0982 13.9245 13.171 13.9548C13.2437 13.985 13.3218 14.0003 13.4006 14C13.4794 14.0003 13.5575 13.985 13.6302 13.9548C13.703 13.9245 13.769 13.8801 13.8244 13.8241C13.9367 13.7116 13.9997 13.5592 13.9997 13.4003C13.9997 13.2414 13.9367 13.089 13.8244 12.9765L10.6806 9.8328C11.0529 9.37773 11.3572 8.86972 11.5831 8.32452C11.8856 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0267 2.67572C10.3652 1.68564 9.42488 0.913972 8.32477 0.45829C7.22466 0.00260857 6.01412 -0.116618 4.84625 0.115686C3.67838 0.34799 2.60562 0.921393 1.76363 1.76338C0.921637 2.60537 0.348235 3.67813 0.11593 4.84601C-0.116374 6.01388 0.00285271 7.22441 0.458534 8.32452C0.914216 9.42464 1.68589 10.3649 2.67596 11.0265ZM3.35559 2.0158C4.14449 1.48867 5.07199 1.20731 6.0208 1.20731C7.29311 1.20731 8.51331 1.71274 9.41297 2.6124C10.3126 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5367 7.88088 10.0096 8.66978C9.48244 9.45868 8.73322 10.0736 7.85663 10.4367C6.98005 10.7997 6.01548 10.8947 5.0849 10.7096C4.15433 10.5245 3.29954 10.0676 2.62863 9.39674C1.95772 8.72583 1.50083 7.87104 1.31572 6.94046C1.13062 6.00989 1.22562 5.04532 1.58872 4.16874C1.95181 3.29215 2.56669 2.54292 3.35559 2.0158ZM6.00481 8.60309C5.84641 8.60102 5.69509 8.53718 5.58308 8.42517C5.47107 8.31316 5.40722 8.16183 5.40515 8.00344V6.60422H4.00591C3.84687 6.60422 3.69434 6.54104 3.58189 6.42859C3.46943 6.31613 3.40625 6.1636 3.40625 6.00456C3.40625 5.84553 3.46943 5.693 3.58189 5.58054C3.69434 5.46809 3.84687 5.40491 4.00591 5.40491H5.40515V4.00572C5.40515 3.84668 5.46833 3.69416 5.58079 3.5817C5.69324 3.46924 5.84577 3.40607 6.00481 3.40607C6.16385 3.40607 6.31637 3.46924 6.42883 3.5817C6.54129 3.69416 6.60447 3.84668 6.60447 4.00572V5.40491H8.00362C8.16266 5.40491 8.31518 5.46809 8.42764 5.58054C8.5401 5.693 8.60328 5.84553 8.60328 6.00456C8.60328 6.1636 8.5401 6.31613 8.42764 6.42859C8.31518 6.54104 8.16266 6.60422 8.00362 6.60422H6.60447V8.00344C6.60239 8.16183 6.53855 8.31316 6.42654 8.42517C6.31453 8.53718 6.1632 8.60102 6.00481 8.60309Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$F, "render$F"); +script$K.render = render$F; +var script$J = { + name: "UndoIcon", + "extends": script$1m +}; +function render$E(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.77042 5.96336C6.84315 5.99355 6.92118 6.00891 6.99993 6.00854C7.07868 6.00891 7.15671 5.99355 7.22944 5.96336C7.30217 5.93317 7.36814 5.88876 7.42348 5.83273C7.53572 5.72035 7.59876 5.56801 7.59876 5.40918C7.59876 5.25035 7.53572 5.09802 7.42348 4.98564L6.04897 3.61113H6.99998C7.9088 3.61113 8.79722 3.88063 9.55288 4.38554C10.3085 4.89046 10.8975 5.60811 11.2453 6.44776C11.5931 7.2874 11.6841 8.21132 11.5068 9.10268C11.3295 9.99404 10.8918 10.8128 10.2492 11.4554C9.60657 12.0981 8.7878 12.5357 7.89644 12.713C7.00508 12.8903 6.08116 12.7993 5.24152 12.4515C4.40188 12.1037 3.68422 11.5148 3.17931 10.7591C2.67439 10.0035 2.4049 9.11504 2.4049 8.20622C2.4049 8.04726 2.34175 7.89481 2.22935 7.78241C2.11695 7.67001 1.9645 7.60686 1.80554 7.60686C1.64658 7.60686 1.49413 7.67001 1.38172 7.78241C1.26932 7.89481 1.20618 8.04726 1.20618 8.20622C1.20829 9.74218 1.81939 11.2146 2.90548 12.3007C3.99157 13.3868 5.46402 13.9979 6.99998 14C8.5366 14 10.0103 13.3896 11.0968 12.3031C12.1834 11.2165 12.7938 9.74283 12.7938 8.20622C12.7938 6.66961 12.1834 5.19593 11.0968 4.10938C10.0103 3.02283 8.5366 2.41241 6.99998 2.41241H6.04892L7.42348 1.03786C7.48236 0.982986 7.5296 0.916817 7.56235 0.843296C7.59511 0.769775 7.61273 0.690409 7.61415 0.609933C7.61557 0.529456 7.60076 0.449519 7.57062 0.374888C7.54047 0.300257 7.49561 0.232462 7.43869 0.175548C7.38178 0.118634 7.31398 0.0737664 7.23935 0.0436218C7.16472 0.0134773 7.08478 -0.00132663 7.00431 9.32772e-05C6.92383 0.00151319 6.84447 0.019128 6.77095 0.0518865C6.69742 0.0846451 6.63126 0.131876 6.57638 0.190763L4.17895 2.5882C4.06671 2.70058 4.00366 2.85292 4.00366 3.01175C4.00366 3.17058 4.06671 3.32291 4.17895 3.43529L6.57638 5.83273C6.63172 5.88876 6.69769 5.93317 6.77042 5.96336Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$E, "render$E"); +script$J.render = render$E; +var theme$q = /* @__PURE__ */ __name(function theme14(_ref) { + var dt = _ref.dt; + return "\n.p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-image-preview {\n position: relative;\n display: inline-flex;\n line-height: 0;\n}\n\n.p-image-preview-mask {\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s;\n border: 0 none;\n padding: 0;\n cursor: pointer;\n background: transparent;\n color: ".concat(dt("image.preview.mask.color"), ";\n transition: background ").concat(dt("image.transition.duration"), ";\n}\n\n.p-image-preview:hover > .p-image-preview-mask {\n opacity: 1;\n cursor: pointer;\n background: ").concat(dt("image.preview.mask.background"), ";\n}\n\n.p-image-preview-icon {\n font-size: ").concat(dt("image.preview.icon.size"), ";\n width: ").concat(dt("image.preview.icon.size"), ";\n height: ").concat(dt("image.preview.icon.size"), ";\n}\n\n.p-image-toolbar {\n position: absolute;\n inset-block-start: ").concat(dt("image.toolbar.position.top"), ";\n inset-inline-end: ").concat(dt("image.toolbar.position.right"), ";\n inset-inline-start: ").concat(dt("image.toolbar.position.left"), ";\n inset-block-end: ").concat(dt("image.toolbar.position.bottom"), ";\n display: flex;\n z-index: 1;\n padding: ").concat(dt("image.toolbar.padding"), ";\n background: ").concat(dt("image.toolbar.background"), ";\n backdrop-filter: blur(").concat(dt("image.toolbar.blur"), ");\n border-color: ").concat(dt("image.toolbar.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("image.toolbar.border.width"), ";\n border-radius: ").concat(dt("image.toolbar.border.radius"), ";\n gap: ").concat(dt("image.toolbar.gap"), ";\n}\n\n.p-image-action {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n color: ").concat(dt("image.action.color"), ";\n background: transparent;\n width: ").concat(dt("image.action.size"), ";\n height: ").concat(dt("image.action.size"), ";\n margin: 0;\n padding: 0;\n border: 0 none;\n cursor: pointer;\n user-select: none;\n border-radius: ").concat(dt("image.action.border.radius"), ";\n outline-color: transparent;\n transition: background ").concat(dt("image.transition.duration"), ", color ").concat(dt("image.transition.duration"), ", outline-color ").concat(dt("image.transition.duration"), ", box-shadow ").concat(dt("image.transition.duration"), ";\n}\n\n.p-image-action:hover {\n color: ").concat(dt("image.action.hover.color"), ";\n background: ").concat(dt("image.action.hover.background"), ";\n}\n\n.p-image-action:focus-visible {\n box-shadow: ").concat(dt("image.action.focus.ring.shadow"), ";\n outline: ").concat(dt("image.action.focus.ring.width"), " ").concat(dt("image.action.focus.ring.style"), " ").concat(dt("image.action.focus.ring.color"), ";\n outline-offset: ").concat(dt("image.action.focus.ring.offset"), ";\n}\n\n.p-image-action .p-icon {\n font-size: ").concat(dt("image.action.icon.size"), ";\n width: ").concat(dt("image.action.icon.size"), ";\n height: ").concat(dt("image.action.icon.size"), ";\n}\n\n.p-image-action.p-disabled {\n pointer-events: auto;\n}\n\n.p-image-original {\n transition: transform 0.15s;\n max-width: 100vw;\n max-height: 100vh;\n}\n\n.p-image-original-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-image-original-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.p-image-original-enter-from,\n.p-image-original-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n"); +}, "theme"); +var classes$t = { + root: /* @__PURE__ */ __name(function root13(_ref2) { + var props = _ref2.props; + return ["p-image p-component", { + "p-image-preview": props.preview + }]; + }, "root"), + previewMask: "p-image-preview-mask", + previewIcon: "p-image-preview-icon", + mask: "p-image-mask p-overlay-mask p-overlay-mask-enter", + toolbar: "p-image-toolbar", + rotateRightButton: "p-image-action p-image-rotate-right-button", + rotateLeftButton: "p-image-action p-image-rotate-left-button", + zoomOutButton: /* @__PURE__ */ __name(function zoomOutButton(_ref3) { + var instance = _ref3.instance; + return ["p-image-action p-image-zoom-out-button", { + "p-disabled": instance.isZoomOutDisabled + }]; + }, "zoomOutButton"), + zoomInButton: /* @__PURE__ */ __name(function zoomInButton(_ref4) { + var instance = _ref4.instance; + return ["p-image-action p-image-zoom-in-button", { + "p-disabled": instance.isZoomInDisabled + }]; + }, "zoomInButton"), + closeButton: "p-image-action p-image-close-button", + original: "p-image-original" +}; +var ImageStyle = BaseStyle.extend({ + name: "image", + theme: theme$q, + classes: classes$t +}); +var script$1$t = { + name: "BaseImage", + "extends": script$1d, + props: { + preview: { + type: Boolean, + "default": false + }, + "class": { + type: null, + "default": null + }, + style: { + type: null, + "default": null + }, + imageStyle: { + type: null, + "default": null + }, + imageClass: { + type: null, + "default": null + }, + previewButtonProps: { + type: null, + "default": null + }, + indicatorIcon: { + type: String, + "default": void 0 + }, + previewIcon: { + type: String, + "default": void 0 + }, + zoomInDisabled: { + type: Boolean, + "default": false + }, + zoomOutDisabled: { + type: Boolean, + "default": false + } + }, + style: ImageStyle, + provide: /* @__PURE__ */ __name(function provide22() { + return { + $pcImage: this, + $parentInstance: this + }; + }, "provide") +}; +var script$I = { + name: "Image", + "extends": script$1$t, + inheritAttrs: false, + emits: ["show", "hide", "error"], + mask: null, + data: /* @__PURE__ */ __name(function data14() { + return { + maskVisible: false, + previewVisible: false, + rotate: 0, + scale: 1 + }; + }, "data"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount7() { + if (this.mask) { + ZIndex.clear(this.container); + } + }, "beforeUnmount"), + methods: { + maskRef: /* @__PURE__ */ __name(function maskRef2(el) { + this.mask = el; + }, "maskRef"), + toolbarRef: /* @__PURE__ */ __name(function toolbarRef(el) { + this.toolbarRef = el; + }, "toolbarRef"), + onImageClick: /* @__PURE__ */ __name(function onImageClick() { + var _this = this; + if (this.preview) { + blockBodyScroll(); + this.maskVisible = true; + setTimeout(function() { + _this.previewVisible = true; + }, 25); + } + }, "onImageClick"), + onPreviewImageClick: /* @__PURE__ */ __name(function onPreviewImageClick() { + this.previewClick = true; + }, "onPreviewImageClick"), + onMaskClick: /* @__PURE__ */ __name(function onMaskClick2(event2) { + var isBarActionsClicked = isAttributeEquals(event2.target, "data-pc-section-group", "action") || event2.target.closest('[data-pc-section-group="action"]'); + if (!this.previewClick && !isBarActionsClicked) { + this.previewVisible = false; + this.rotate = 0; + this.scale = 1; + } + this.previewClick = false; + }, "onMaskClick"), + onMaskKeydown: /* @__PURE__ */ __name(function onMaskKeydown(event2) { + var _this2 = this; + switch (event2.code) { + case "Escape": + this.hidePreview(); + setTimeout(function() { + focus(_this2.$refs.previewButton); + }, 200); + event2.preventDefault(); + break; + } + }, "onMaskKeydown"), + onError: /* @__PURE__ */ __name(function onError2() { + this.$emit("error"); + }, "onError"), + rotateRight: /* @__PURE__ */ __name(function rotateRight() { + this.rotate += 90; + this.previewClick = true; + }, "rotateRight"), + rotateLeft: /* @__PURE__ */ __name(function rotateLeft() { + this.rotate -= 90; + this.previewClick = true; + }, "rotateLeft"), + zoomIn: /* @__PURE__ */ __name(function zoomIn() { + this.scale = this.scale + 0.1; + this.previewClick = true; + }, "zoomIn"), + zoomOut: /* @__PURE__ */ __name(function zoomOut() { + this.scale = this.scale - 0.1; + this.previewClick = true; + }, "zoomOut"), + onBeforeEnter: /* @__PURE__ */ __name(function onBeforeEnter() { + ZIndex.set("modal", this.mask, this.$primevue.config.zIndex.modal); + }, "onBeforeEnter"), + onEnter: /* @__PURE__ */ __name(function onEnter2() { + this.focus(); + this.$emit("show"); + }, "onEnter"), + onBeforeLeave: /* @__PURE__ */ __name(function onBeforeLeave2() { + !this.isUnstyled && addClass(this.mask, "p-overlay-mask-leave"); + }, "onBeforeLeave"), + onLeave: /* @__PURE__ */ __name(function onLeave2() { + unblockBodyScroll(); + this.$emit("hide"); + }, "onLeave"), + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave2(el) { + ZIndex.clear(el); + this.maskVisible = false; + }, "onAfterLeave"), + focus: /* @__PURE__ */ __name(function focus2() { + var focusTarget = this.mask.querySelector("[autofocus]"); + if (focusTarget) { + focusTarget.focus(); + } + }, "focus"), + hidePreview: /* @__PURE__ */ __name(function hidePreview() { + this.previewVisible = false; + this.rotate = 0; + this.scale = 1; + unblockBodyScroll(); + }, "hidePreview") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass2() { + return [this.cx("root"), this["class"]]; + }, "containerClass"), + rotateClass: /* @__PURE__ */ __name(function rotateClass() { + return "p-image-preview-rotate-" + this.rotate; + }, "rotateClass"), + imagePreviewStyle: /* @__PURE__ */ __name(function imagePreviewStyle() { + return { + transform: "rotate(" + this.rotate + "deg) scale(" + this.scale + ")" + }; + }, "imagePreviewStyle"), + isZoomInDisabled: /* @__PURE__ */ __name(function isZoomInDisabled() { + return this.zoomInDisabled || this.scale >= 1.5; + }, "isZoomInDisabled"), + isZoomOutDisabled: /* @__PURE__ */ __name(function isZoomOutDisabled() { + return this.zoomOutDisabled || this.scale <= 0.5; + }, "isZoomOutDisabled"), + rightAriaLabel: /* @__PURE__ */ __name(function rightAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.rotateRight : void 0; + }, "rightAriaLabel"), + leftAriaLabel: /* @__PURE__ */ __name(function leftAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.rotateLeft : void 0; + }, "leftAriaLabel"), + zoomInAriaLabel: /* @__PURE__ */ __name(function zoomInAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.zoomIn : void 0; + }, "zoomInAriaLabel"), + zoomOutAriaLabel: /* @__PURE__ */ __name(function zoomOutAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.zoomOut : void 0; + }, "zoomOutAriaLabel"), + zoomImageAriaLabel: /* @__PURE__ */ __name(function zoomImageAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.zoomImage : void 0; + }, "zoomImageAriaLabel"), + closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; + }, "closeAriaLabel") + }, + components: { + Portal: script$1f, + EyeIcon: script$N, + RefreshIcon: script$M, + UndoIcon: script$J, + SearchMinusIcon: script$L, + SearchPlusIcon: script$K, + TimesIcon: script$1g + }, + directives: { + focustrap: FocusTrap + } +}; +function _typeof$h(o) { + "@babel/helpers - typeof"; + return _typeof$h = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$h(o); +} +__name(_typeof$h, "_typeof$h"); +function ownKeys$f(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$f, "ownKeys$f"); +function _objectSpread$f(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$f(Object(t2), true).forEach(function(r2) { + _defineProperty$g(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$f(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$f, "_objectSpread$f"); +function _defineProperty$g(e, r, t2) { + return (r = _toPropertyKey$g(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$g, "_defineProperty$g"); +function _toPropertyKey$g(t2) { + var i = _toPrimitive$g(t2, "string"); + return "symbol" == _typeof$h(i) ? i : i + ""; +} +__name(_toPropertyKey$g, "_toPropertyKey$g"); +function _toPrimitive$g(t2, r) { + if ("object" != _typeof$h(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$h(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$g, "_toPrimitive$g"); +var _hoisted_1$m = ["aria-label"]; +var _hoisted_2$f = ["aria-modal"]; +var _hoisted_3$c = ["aria-label"]; +var _hoisted_4$8 = ["aria-label"]; +var _hoisted_5$3 = ["disabled", "aria-label"]; +var _hoisted_6$1 = ["disabled", "aria-label"]; +var _hoisted_7$1 = ["aria-label"]; +var _hoisted_8 = ["src"]; +function render$D(_ctx, _cache, $props, $setup, $data, $options) { + var _component_RefreshIcon = resolveComponent("RefreshIcon"); + var _component_UndoIcon = resolveComponent("UndoIcon"); + var _component_SearchMinusIcon = resolveComponent("SearchMinusIcon"); + var _component_SearchPlusIcon = resolveComponent("SearchPlusIcon"); + var _component_TimesIcon = resolveComponent("TimesIcon"); + var _component_Portal = resolveComponent("Portal"); + var _directive_focustrap = resolveDirective("focustrap"); + return openBlock(), createElementBlock("span", mergeProps({ + "class": $options.containerClass, + style: _ctx.style + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "image", { + errorCallback: $options.onError + }, function() { + return [createBaseVNode("img", mergeProps({ + style: _ctx.imageStyle, + "class": _ctx.imageClass, + onError: _cache[0] || (_cache[0] = function() { + return $options.onError && $options.onError.apply($options, arguments); + }) + }, _objectSpread$f(_objectSpread$f({}, _ctx.$attrs), _ctx.ptm("image"))), null, 16)]; + }), _ctx.preview ? (openBlock(), createElementBlock("button", mergeProps({ + key: 0, + ref: "previewButton", + "aria-label": $options.zoomImageAriaLabel, + type: "button", + "class": _ctx.cx("previewMask"), + onClick: _cache[1] || (_cache[1] = function() { + return $options.onImageClick && $options.onImageClick.apply($options, arguments); + }) + }, _objectSpread$f(_objectSpread$f({}, _ctx.previewButtonProps), _ctx.ptm("previewMask"))), [renderSlot(_ctx.$slots, _ctx.$slots.previewicon ? "previewicon" : "indicatoricon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.previewIcon || _ctx.indicatorIcon ? "i" : "EyeIcon"), mergeProps({ + "class": _ctx.cx("previewIcon") + }, _ctx.ptm("previewIcon")), null, 16, ["class"]))]; + })], 16, _hoisted_1$m)) : createCommentVNode("", true), createVNode(_component_Portal, null, { + "default": withCtx(function() { + return [$data.maskVisible ? withDirectives((openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.maskRef, + role: "dialog", + "class": _ctx.cx("mask"), + "aria-modal": $data.maskVisible, + onClick: _cache[8] || (_cache[8] = function() { + return $options.onMaskClick && $options.onMaskClick.apply($options, arguments); + }), + onKeydown: _cache[9] || (_cache[9] = function() { + return $options.onMaskKeydown && $options.onMaskKeydown.apply($options, arguments); + }) + }, _ctx.ptm("mask")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("toolbar") + }, _ctx.ptm("toolbar")), [createBaseVNode("button", mergeProps({ + "class": _ctx.cx("rotateRightButton"), + onClick: _cache[2] || (_cache[2] = function() { + return $options.rotateRight && $options.rotateRight.apply($options, arguments); + }), + type: "button", + "aria-label": $options.rightAriaLabel + }, _ctx.ptm("rotateRightButton"), { + "data-pc-group-section": "action" + }), [renderSlot(_ctx.$slots, "refresh", {}, function() { + return [createVNode(_component_RefreshIcon, normalizeProps(guardReactiveProps(_ctx.ptm("rotateRightIcon"))), null, 16)]; + })], 16, _hoisted_3$c), createBaseVNode("button", mergeProps({ + "class": _ctx.cx("rotateLeftButton"), + onClick: _cache[3] || (_cache[3] = function() { + return $options.rotateLeft && $options.rotateLeft.apply($options, arguments); + }), + type: "button", + "aria-label": $options.leftAriaLabel + }, _ctx.ptm("rotateLeftButton"), { + "data-pc-group-section": "action" + }), [renderSlot(_ctx.$slots, "undo", {}, function() { + return [createVNode(_component_UndoIcon, normalizeProps(guardReactiveProps(_ctx.ptm("rotateLeftIcon"))), null, 16)]; + })], 16, _hoisted_4$8), createBaseVNode("button", mergeProps({ + "class": _ctx.cx("zoomOutButton"), + onClick: _cache[4] || (_cache[4] = function() { + return $options.zoomOut && $options.zoomOut.apply($options, arguments); + }), + type: "button", + disabled: $options.isZoomOutDisabled, + "aria-label": $options.zoomOutAriaLabel + }, _ctx.ptm("zoomOutButton"), { + "data-pc-group-section": "action" + }), [renderSlot(_ctx.$slots, "zoomout", {}, function() { + return [createVNode(_component_SearchMinusIcon, normalizeProps(guardReactiveProps(_ctx.ptm("zoomOutIcon"))), null, 16)]; + })], 16, _hoisted_5$3), createBaseVNode("button", mergeProps({ + "class": _ctx.cx("zoomInButton"), + onClick: _cache[5] || (_cache[5] = function() { + return $options.zoomIn && $options.zoomIn.apply($options, arguments); + }), + type: "button", + disabled: $options.isZoomInDisabled, + "aria-label": $options.zoomInAriaLabel + }, _ctx.ptm("zoomInButton"), { + "data-pc-group-section": "action" + }), [renderSlot(_ctx.$slots, "zoomin", {}, function() { + return [createVNode(_component_SearchPlusIcon, normalizeProps(guardReactiveProps(_ctx.ptm("zoomInIcon"))), null, 16)]; + })], 16, _hoisted_6$1), createBaseVNode("button", mergeProps({ + "class": _ctx.cx("closeButton"), + type: "button", + onClick: _cache[6] || (_cache[6] = function() { + return $options.hidePreview && $options.hidePreview.apply($options, arguments); + }), + "aria-label": $options.closeAriaLabel, + autofocus: "" + }, _ctx.ptm("closeButton"), { + "data-pc-group-section": "action" + }), [renderSlot(_ctx.$slots, "close", {}, function() { + return [createVNode(_component_TimesIcon, normalizeProps(guardReactiveProps(_ctx.ptm("closeIcon"))), null, 16)]; + })], 16, _hoisted_7$1)], 16), createVNode(Transition, mergeProps({ + name: "p-image-original", + onBeforeEnter: $options.onBeforeEnter, + onEnter: $options.onEnter, + onLeave: $options.onLeave, + onBeforeLeave: $options.onBeforeLeave, + onAfterLeave: $options.onAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [$data.previewVisible ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ + key: 0 + }, _ctx.ptm("originalContainer"))), [renderSlot(_ctx.$slots, _ctx.$slots.original ? "original" : "preview", { + "class": normalizeClass(_ctx.cx("original")), + style: normalizeStyle($options.imagePreviewStyle), + previewCallback: $options.onPreviewImageClick + }, function() { + return [createBaseVNode("img", mergeProps({ + src: _ctx.$attrs.src, + "class": _ctx.cx("original"), + style: $options.imagePreviewStyle, + onClick: _cache[7] || (_cache[7] = function() { + return $options.onPreviewImageClick && $options.onPreviewImageClick.apply($options, arguments); + }) + }, _ctx.ptm("original")), null, 16, _hoisted_8)]; + })], 16)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onBeforeEnter", "onEnter", "onLeave", "onBeforeLeave", "onAfterLeave"])], 16, _hoisted_2$f)), [[_directive_focustrap]]) : createCommentVNode("", true)]; + }), + _: 3 + })], 16); +} +__name(render$D, "render$D"); +script$I.render = render$D; +var theme$p = /* @__PURE__ */ __name(function theme15(_ref) { + var dt = _ref.dt; + return "\n.p-imagecompare {\n position: relative;\n overflow: hidden;\n width: 100%;\n aspect-ratio: 16 / 9;\n}\n\n.p-imagecompare img {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.p-imagecompare img + img {\n clip-path: polygon(0 0, ".concat(dt("imagecompare.scope.x", "50%"), " 0, ").concat(dt("imagecompare.scope.x", "50%"), " 100%, 0 100%);\n}\n\n.p-imagecompare:dir(rtl) img + img {\n clip-path: polygon(calc(100% - ").concat(dt("imagecompare.scope.x", "50%"), ") 0, 100% 0, 100% 100%, calc(100% - ").concat(dt("imagecompare.scope.x", "50%"), ") 100%);\n}\n\n.p-imagecompare-slider {\n position: relative;\n -webkit-appearance: none;\n width: calc(100% + ").concat(dt("imagecompare.handle.size"), ");\n height: 100%;\n margin-inline-start: calc(-1 * calc(").concat(dt("imagecompare.handle.size"), " / 2));\n background-color: transparent;\n outline: none;\n transition: all ").concat(dt("imagecompare.handle.transition.duration"), ";\n}\n\n.p-imagecompare-slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: ").concat(dt("imagecompare.handle.size"), ";\n width: ").concat(dt("imagecompare.handle.size"), ";\n background: ").concat(dt("imagecompare.handle.background"), ";\n border: ").concat(dt("imagecompare.handle.border.width"), " solid ").concat(dt("imagecompare.handle.border.color"), ";\n border-radius: ").concat(dt("imagecompare.handle.border.radius"), ";\n background-size: contain;\n cursor: ew-resize;\n transition: all ").concat(dt("imagecompare.handle.transition.duration"), ";\n}\n\n.p-imagecompare-slider::-moz-range-thumb {\n height: ").concat(dt("imagecompare.handle.size"), ";\n width: ").concat(dt("imagecompare.handle.size"), ";\n background: ").concat(dt("imagecompare.handle.background"), ";\n border: ").concat(dt("imagecompare.handle.border.width"), " ").concat(dt("imagecompare.handle.border.style"), " ").concat(dt("imagecompare.handle.border.color"), ";\n border-radius: ").concat(dt("imagecompare.handle.border.radius"), ";\n background-size: contain;\n cursor: ew-resize;\n}\n\n.p-imagecompare-slider:focus-visible::-webkit-slider-thumb {\n box-shadow: ").concat(dt("imagecompare.handle.focus.ring.shadow"), ";\n outline: ").concat(dt("imagecompare.handle.focus.ring.width"), " ").concat(dt("imagecompare.handle.focus.ring.style"), " ").concat(dt("imagecompare.handle.focus.ring.color"), ";\n outline-offset: ").concat(dt("imagecompare.handle.focus.ring.offset"), ";\n}\n\n.p-imagecompare-slider:focus-visible::-moz-range-thumb {\n box-shadow: ").concat(dt("imagecompare.handle.focus.ring.shadow"), ";\n outline: ").concat(dt("imagecompare.handle.focus.ring.width"), " ").concat(dt("imagecompare.handle.focus.ring.style"), " ").concat(dt("imagecompare.handle.focus.ring.color"), ";\n outline-offset: ").concat(dt("imagecompare.handle.focus.ring.offset"), ";\n}\n\n.p-imagecompare-slider:hover {\n width: calc(100% + ").concat(dt("imagecompare.handle.hover.size"), ");\n margin-inline-start: calc(-1 * calc(").concat(dt("imagecompare.handle.hover.size"), " / 2));\n}\n\n.p-imagecompare-slider:hover::-webkit-slider-thumb {\n background: ").concat(dt("imagecompare.handle.hover.background"), ";\n border-color: ").concat(dt("imagecompare.handle.hover.border.color"), ";\n height: ").concat(dt("imagecompare.handle.hover.size"), ";\n width: ").concat(dt("imagecompare.handle.hover.size"), ";\n}\n\n.p-imagecompare-slider:hover::-moz-range-thumb {\n background: ").concat(dt("imagecompare.handle.hover.background"), ";\n border-color: ").concat(dt("imagecompare.handle.hover.border.color"), ";\n height: ").concat(dt("imagecompare.handle.hover.size"), ";\n width: ").concat(dt("imagecompare.handle.hover.size"), ";\n}\n"); +}, "theme"); +var classes$s = { + root: "p-imagecompare", + slider: "p-imagecompare-slider" +}; +var ImageCompareStyle = BaseStyle.extend({ + name: "imagecompare", + theme: theme$p, + classes: classes$s +}); +var script$1$s = { + name: "BaseImageCompare", + "extends": script$1d, + props: { + tabindex: { + type: Number, + "default": 0 + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: ImageCompareStyle, + provide: /* @__PURE__ */ __name(function provide23() { + return { + $pcImageCompare: this, + $parentInstance: this + }; + }, "provide") +}; +var script$H = { + name: "ImageCompare", + "extends": script$1$s, + methods: { + onSlide: /* @__PURE__ */ __name(function onSlide(event2) { + var value2 = event2.target.value; + var image = event2.target.previousElementSibling; + setCSSProperty(image, $dt("imagecompare.scope.x").name, "".concat(value2, "%")); + }, "onSlide") + } +}; +var _hoisted_1$l = ["aria-labelledby", "aria-label"]; +function render$C(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "left"), renderSlot(_ctx.$slots, "right"), createBaseVNode("input", mergeProps({ + type: "range", + min: "0", + max: "100", + value: "50", + onInput: _cache[0] || (_cache[0] = function() { + return $options.onSlide && $options.onSlide.apply($options, arguments); + }), + "class": _ctx.cx("slider") + }, _ctx.ptm("slider")), null, 16)], 16, _hoisted_1$l); +} +__name(render$C, "render$C"); +script$H.render = render$C; +var theme$o = /* @__PURE__ */ __name(function theme16(_ref) { + var dt = _ref.dt; + return "\n.p-inlinemessage {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: ".concat(dt("inlinemessage.padding"), ";\n border-radius: ").concat(dt("inlinemessage.border.radius"), ";\n gap: ").concat(dt("inlinemessage.gap"), ";\n}\n\n.p-inlinemessage-text {\n font-weight: ").concat(dt("inlinemessage.text.font.weight"), ";\n}\n\n.p-inlinemessage-icon {\n flex-shrink: 0;\n font-size: ").concat(dt("inlinemessage.icon.size"), ";\n width: ").concat(dt("inlinemessage.icon.size"), ";\n height: ").concat(dt("inlinemessage.icon.size"), ";\n}\n\n.p-inlinemessage-icon-only .p-inlinemessage-text {\n visibility: hidden;\n width: 0;\n}\n\n.p-inlinemessage-info {\n background: ").concat(dt("inlinemessage.info.background"), ";\n border: 1px solid ").concat(dt("inlinemessage.info.border.color"), ";\n color: ").concat(dt("inlinemessage.info.color"), ";\n box-shadow: ").concat(dt("inlinemessage.info.shadow"), ";\n}\n\n.p-inlinemessage-info .p-inlinemessage-icon {\n color: ").concat(dt("inlinemessage.info.color"), ";\n}\n\n.p-inlinemessage-success {\n background: ").concat(dt("inlinemessage.success.background"), ";\n border: 1px solid ").concat(dt("inlinemessage.success.border.color"), ";\n color: ").concat(dt("inlinemessage.success.color"), ";\n box-shadow: ").concat(dt("inlinemessage.success.shadow"), ";\n}\n\n.p-inlinemessage-success .p-inlinemessage-icon {\n color: ").concat(dt("inlinemessage.success.color"), ";\n}\n\n.p-inlinemessage-warn {\n background: ").concat(dt("inlinemessage.warn.background"), ";\n border: 1px solid ").concat(dt("inlinemessage.warn.border.color"), ";\n color: ").concat(dt("inlinemessage.warn.color"), ";\n box-shadow: ").concat(dt("inlinemessage.warn.shadow"), ";\n}\n\n.p-inlinemessage-warn .p-inlinemessage-icon {\n color: ").concat(dt("inlinemessage.warn.color"), ";\n}\n\n.p-inlinemessage-error {\n background: ").concat(dt("inlinemessage.error.background"), ";\n border: 1px solid ").concat(dt("inlinemessage.error.border.color"), ";\n color: ").concat(dt("inlinemessage.error.color"), ";\n box-shadow: ").concat(dt("inlinemessage.error.shadow"), ";\n}\n\n.p-inlinemessage-error .p-inlinemessage-icon {\n color: ").concat(dt("inlinemessage.error.color"), ";\n}\n\n.p-inlinemessage-secondary {\n background: ").concat(dt("inlinemessage.secondary.background"), ";\n border: 1px solid ").concat(dt("inlinemessage.secondary.border.color"), ";\n color: ").concat(dt("inlinemessage.secondary.color"), ";\n box-shadow: ").concat(dt("inlinemessage.secondary.shadow"), ";\n}\n\n.p-inlinemessage-secondary .p-inlinemessage-icon {\n color: ").concat(dt("inlinemessage.secondary.color"), ";\n}\n\n.p-inlinemessage-contrast {\n background: ").concat(dt("inlinemessage.contrast.background"), ";\n border: 1px solid ").concat(dt("inlinemessage.contrast.border.color"), ";\n color: ").concat(dt("inlinemessage.contrast.color"), ";\n box-shadow: ").concat(dt("inlinemessage.contrast.shadow"), ";\n}\n\n.p-inlinemessage-contrast .p-inlinemessage-icon {\n color: ").concat(dt("inlinemessage.contrast.color"), ";\n}\n"); +}, "theme"); +var classes$r = { + root: /* @__PURE__ */ __name(function root14(_ref2) { + var props = _ref2.props, instance = _ref2.instance; + return ["p-inlinemessage p-component p-inlinemessage-" + props.severity, { + "p-inlinemessage-icon-only": !instance.$slots["default"] + }]; + }, "root"), + icon: /* @__PURE__ */ __name(function icon(_ref3) { + var props = _ref3.props; + return ["p-inlinemessage-icon", props.icon]; + }, "icon"), + text: "p-inlinemessage-text" +}; +var InlineMessageStyle = BaseStyle.extend({ + name: "inlinemessage", + theme: theme$o, + classes: classes$r +}); +var script$1$r = { + name: "BaseInlineMessage", + "extends": script$1d, + props: { + severity: { + type: String, + "default": "error" + }, + icon: { + type: String, + "default": void 0 + } + }, + style: InlineMessageStyle, + provide: /* @__PURE__ */ __name(function provide24() { + return { + $pcInlineMessage: this, + $parentInstance: this + }; + }, "provide") +}; +var script$G = { + name: "InlineMessage", + "extends": script$1$r, + inheritAttrs: false, + timeout: null, + data: /* @__PURE__ */ __name(function data15() { + return { + visible: true + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted18() { + var _this = this; + if (!this.sticky) { + setTimeout(function() { + _this.visible = false; + }, this.life); + } + }, "mounted"), + computed: { + iconComponent: /* @__PURE__ */ __name(function iconComponent() { + return { + info: script$1C, + success: script$1D, + warn: script$1E, + error: script$1F + }[this.severity]; + }, "iconComponent") + } +}; +function render$B(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + role: "alert", + "aria-live": "assertive", + "aria-atomic": "true", + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "icon", {}, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? "span" : $options.iconComponent), mergeProps({ + "class": _ctx.cx("icon") + }, _ctx.ptm("icon")), null, 16, ["class"]))]; + }), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("text") + }, _ctx.ptm("text")), [renderSlot(_ctx.$slots, "default")], 16)) : createCommentVNode("", true)], 16); +} +__name(render$B, "render$B"); +script$G.render = render$B; +var theme$n = /* @__PURE__ */ __name(function theme17(_ref) { + var dt = _ref.dt; + return "\n.p-inplace-display {\n display: inline-block;\n cursor: pointer;\n border: 1px solid transparent;\n padding: ".concat(dt("inplace.padding"), ";\n border-radius: ").concat(dt("inplace.border.radius"), ";\n transition: background ").concat(dt("inplace.transition.duration"), ", color ").concat(dt("inplace.transition.duration"), ", outline-color ").concat(dt("inplace.transition.duration"), ", box-shadow ").concat(dt("inplace.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-inplace-display:not(.p-disabled):hover {\n background: ").concat(dt("inplace.display.hover.background"), ";\n color: ").concat(dt("inplace.display.hover.color"), ";\n}\n\n.p-inplace-display:focus-visible {\n box-shadow: ").concat(dt("inplace.focus.ring.shadow"), ";\n outline: ").concat(dt("inplace.focus.ring.width"), " ").concat(dt("inplace.focus.ring.style"), " ").concat(dt("inplace.focus.ring.color"), ";\n outline-offset: ").concat(dt("inplace.focus.ring.offset"), ";\n}\n\n.p-inplace-content {\n display: block;\n}\n"); +}, "theme"); +var classes$q = { + root: "p-inplace p-component", + display: /* @__PURE__ */ __name(function display(_ref2) { + var props = _ref2.props; + return ["p-inplace-display", { + "p-disabled": props.disabled + }]; + }, "display"), + content: "p-inplace-content" +}; +var InplaceStyle = BaseStyle.extend({ + name: "inplace", + theme: theme$n, + classes: classes$q +}); +var script$1$q = { + name: "BaseInplace", + "extends": script$1d, + props: { + active: { + type: Boolean, + "default": false + }, + disabled: { + type: Boolean, + "default": false + }, + displayProps: { + type: null, + "default": null + } + }, + style: InplaceStyle, + provide: /* @__PURE__ */ __name(function provide25() { + return { + $pcInplace: this, + $parentInstance: this + }; + }, "provide") +}; +var script$F = { + name: "Inplace", + "extends": script$1$q, + inheritAttrs: false, + emits: ["open", "close", "update:active"], + data: /* @__PURE__ */ __name(function data16() { + return { + d_active: this.active + }; + }, "data"), + watch: { + active: /* @__PURE__ */ __name(function active2(newValue) { + this.d_active = newValue; + }, "active") + }, + methods: { + open: /* @__PURE__ */ __name(function open(event2) { + if (this.disabled) { + return; + } + this.d_active = true; + this.$emit("open", event2); + this.$emit("update:active", true); + }, "open"), + close: /* @__PURE__ */ __name(function close(event2) { + var _this = this; + this.d_active = false; + this.$emit("close", event2); + this.$emit("update:active", false); + setTimeout(function() { + _this.$refs.display.focus(); + }, 0); + }, "close") + } +}; +function _typeof$g(o) { + "@babel/helpers - typeof"; + return _typeof$g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$g(o); +} +__name(_typeof$g, "_typeof$g"); +function ownKeys$e(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$e, "ownKeys$e"); +function _objectSpread$e(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$e(Object(t2), true).forEach(function(r2) { + _defineProperty$f(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$e(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$e, "_objectSpread$e"); +function _defineProperty$f(e, r, t2) { + return (r = _toPropertyKey$f(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$f, "_defineProperty$f"); +function _toPropertyKey$f(t2) { + var i = _toPrimitive$f(t2, "string"); + return "symbol" == _typeof$g(i) ? i : i + ""; +} +__name(_toPropertyKey$f, "_toPropertyKey$f"); +function _toPrimitive$f(t2, r) { + if ("object" != _typeof$g(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$g(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$f, "_toPrimitive$f"); +var _hoisted_1$k = ["tabindex"]; +function render$A(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + "aria-live": "polite" + }, _ctx.ptmi("root")), [!$data.d_active ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: "display", + "class": _ctx.cx("display"), + tabindex: _ctx.$attrs.tabindex || "0", + role: "button", + onClick: _cache[0] || (_cache[0] = function() { + return $options.open && $options.open.apply($options, arguments); + }), + onKeydown: _cache[1] || (_cache[1] = withKeys(function() { + return $options.open && $options.open.apply($options, arguments); + }, ["enter"])) + }, _objectSpread$e(_objectSpread$e({}, _ctx.displayProps), _ctx.ptm("display"))), [renderSlot(_ctx.$slots, "display")], 16, _hoisted_1$k)) : (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("content") + }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "content", { + closeCallback: $options.close + })], 16))], 16); +} +__name(render$A, "render$A"); +script$F.render = render$A; +var theme$m = /* @__PURE__ */ __name(function theme18(_ref) { + var dt = _ref.dt; + return "\n.p-inputgroup,\n.p-inputgroup .p-iconfield,\n.p-inputgroup .p-floatlabel,\n.p-inputgroup .p-iftalabel {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup .p-inputtext,\n.p-inputgroup .p-inputwrapper {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-inputgroupaddon {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ".concat(dt("inputgroup.addon.padding"), ";\n background: ").concat(dt("inputgroup.addon.background"), ";\n color: ").concat(dt("inputgroup.addon.color"), ";\n border-block-start: 1px solid ").concat(dt("inputgroup.addon.border.color"), ";\n border-block-end: 1px solid ").concat(dt("inputgroup.addon.border.color"), ";\n min-width: ").concat(dt("inputgroup.addon.min.width"), ";\n}\n\n.p-inputgroupaddon:first-child,\n.p-inputgroupaddon + .p-inputgroupaddon {\n border-inline-start: 1px solid ").concat(dt("inputgroup.addon.border.color"), ";\n}\n\n.p-inputgroupaddon:last-child {\n border-inline-end: 1px solid ").concat(dt("inputgroup.addon.border.color"), ";\n}\n\n.p-inputgroupaddon:has(.p-button) {\n padding: 0;\n overflow: hidden;\n}\n\n.p-inputgroupaddon .p-button {\n border-radius: 0;\n}\n\n.p-inputgroup > .p-component,\n.p-inputgroup > .p-inputwrapper > .p-component,\n.p-inputgroup > .p-iconfield > .p-component,\n.p-inputgroup > .p-floatlabel > .p-component,\n.p-inputgroup > .p-floatlabel > .p-inputwrapper > .p-component,\n.p-inputgroup > .p-iftalabel > .p-component,\n.p-inputgroup > .p-iftalabel > .p-inputwrapper > .p-component {\n border-radius: 0;\n margin: 0;\n}\n\n.p-inputgroupaddon:first-child,\n.p-inputgroup > .p-component:first-child,\n.p-inputgroup > .p-inputwrapper:first-child > .p-component,\n.p-inputgroup > .p-iconfield:first-child > .p-component,\n.p-inputgroup > .p-floatlabel:first-child > .p-component,\n.p-inputgroup > .p-floatlabel:first-child > .p-inputwrapper > .p-component,\n.p-inputgroup > .p-iftalabel:first-child > .p-component,\n.p-inputgroup > .p-iftalabel:first-child > .p-inputwrapper > .p-component {\n border-start-start-radius: ").concat(dt("inputgroup.addon.border.radius"), ";\n border-end-start-radius: ").concat(dt("inputgroup.addon.border.radius"), ";\n}\n\n.p-inputgroupaddon:last-child,\n.p-inputgroup > .p-component:last-child,\n.p-inputgroup > .p-inputwrapper:last-child > .p-component,\n.p-inputgroup > .p-iconfield:last-child > .p-component,\n.p-inputgroup > .p-floatlabel:last-child > .p-component,\n.p-inputgroup > .p-floatlabel:last-child > .p-inputwrapper > .p-component,\n.p-inputgroup > .p-iftalabel:last-child > .p-component,\n.p-inputgroup > .p-iftalabel:last-child > .p-inputwrapper > .p-component {\n border-start-end-radius: ").concat(dt("inputgroup.addon.border.radius"), ";\n border-end-end-radius: ").concat(dt("inputgroup.addon.border.radius"), ";\n}\n\n.p-inputgroup .p-component:focus,\n.p-inputgroup .p-component.p-focus,\n.p-inputgroup .p-inputwrapper-focus,\n.p-inputgroup .p-component:focus ~ label,\n.p-inputgroup .p-component.p-focus ~ label,\n.p-inputgroup .p-inputwrapper-focus ~ label {\n z-index: 1;\n}\n\n.p-inputgroup > .p-button:not(.p-button-icon-only) {\n width: auto;\n}\n\n.p-inputgroup .p-iconfield + .p-iconfield .p-inputtext {\n border-inline-start: 0;\n}\n"); +}, "theme"); +var classes$p = { + root: "p-inputgroup" +}; +var InputGroupStyle = BaseStyle.extend({ + name: "inputgroup", + theme: theme$m, + classes: classes$p +}); +var script$1$p = { + name: "BaseInputGroup", + "extends": script$1d, + style: InputGroupStyle, + provide: /* @__PURE__ */ __name(function provide26() { + return { + $pcInputGroup: this, + $parentInstance: this + }; + }, "provide") +}; +var script$E = { + name: "InputGroup", + "extends": script$1$p, + inheritAttrs: false +}; +function render$z(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$z, "render$z"); +script$E.render = render$z; +var classes$o = { + root: "p-inputgroupaddon" +}; +var InputGroupAddonStyle = BaseStyle.extend({ + name: "inputgroupaddon", + classes: classes$o +}); +var script$1$o = { + name: "BaseInputGroupAddon", + "extends": script$1d, + style: InputGroupAddonStyle, + provide: /* @__PURE__ */ __name(function provide27() { + return { + $pcInputGroupAddon: this, + $parentInstance: this + }; + }, "provide") +}; +var script$D = { + name: "InputGroupAddon", + "extends": script$1$o, + inheritAttrs: false +}; +function render$y(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$y, "render$y"); +script$D.render = render$y; +var classes$n = { + root: /* @__PURE__ */ __name(function root15(_ref) { + var instance = _ref.instance; + return ["p-inputmask", { + "p-filled": instance.$filled + }]; + }, "root") +}; +var InputMaskStyle = BaseStyle.extend({ + name: "inputmask", + classes: classes$n +}); +var script$1$n = { + name: "BaseInputMask", + "extends": script$1n, + props: { + slotChar: { + type: String, + "default": "_" + }, + id: { + type: String, + "default": null + }, + "class": { + type: [String, Object], + "default": null + }, + mask: { + type: String, + "default": null + }, + placeholder: { + type: String, + "default": null + }, + autoClear: { + type: Boolean, + "default": true + }, + unmask: { + type: Boolean, + "default": false + }, + readonly: { + type: Boolean, + "default": false + } + }, + style: InputMaskStyle, + provide: /* @__PURE__ */ __name(function provide28() { + return { + $pcInputMask: this, + $parentInstance: this + }; + }, "provide") +}; +var script$C = { + name: "InputMask", + "extends": script$1$n, + inheritAttrs: false, + emits: ["focus", "blur", "keydown", "complete", "keypress", "paste"], + inject: { + $pcFluid: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data17() { + return { + currentVal: "" + }; + }, "data"), + watch: { + mask: /* @__PURE__ */ __name(function mask3(newMask, oldMask) { + if (oldMask !== newMask) { + this.initMask(); + } + }, "mask") + }, + mounted: /* @__PURE__ */ __name(function mounted19() { + this.initMask(); + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated4() { + if (this.isValueUpdated()) { + this.updateValue(); + } + }, "updated"), + methods: { + onInput: /* @__PURE__ */ __name(function onInput3(event2) { + if (!event2.isComposing) { + if (this.androidChrome) this.handleAndroidInput(event2); + else this.handleInputChange(event2); + this.updateModelValue(event2.target.value); + } + }, "onInput"), + onFocus: /* @__PURE__ */ __name(function onFocus6(event2) { + var _this = this; + if (this.readonly) { + return; + } + this.focus = true; + clearTimeout(this.caretTimeoutId); + var pos; + this.focusText = this.$el.value; + pos = this.checkVal(); + this.caretTimeoutId = setTimeout(function() { + if (_this.$el !== document.activeElement) { + return; + } + _this.writeBuffer(); + if (pos === _this.mask.replace("?", "").length) { + _this.caret(0, pos); + } else { + _this.caret(pos); + } + }, 10); + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur5(event2) { + var _this$formField$onBlu, _this$formField; + this.focus = false; + this.checkVal(); + this.updateModelValue(event2.target.value); + if (this.$el.value !== this.focusText) { + var e = document.createEvent("HTMLEvents"); + e.initEvent("change", true, false); + this.$el.dispatchEvent(e); + } + this.$emit("blur", event2); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField, event2); + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown5(event2) { + if (this.readonly) { + return; + } + var k = event2.code, pos, begin, end; + var iPhone = /iphone/i.test(getUserAgent()); + this.oldVal = this.$el.value; + if (k === "Backspace" || k === "Delete" || iPhone && k === "Escape") { + pos = this.caret(); + begin = pos.begin; + end = pos.end; + if (end - begin === 0) { + begin = k !== "Delete" ? this.seekPrev(begin) : end = this.seekNext(begin - 1); + end = k === "Delete" ? this.seekNext(end) : end; + } + this.clearBuffer(begin, end); + this.shiftL(begin, end - 1); + this.updateModelValue(event2.target.value); + event2.preventDefault(); + } else if (k === "Enter") { + this.$el.blur(); + this.updateModelValue(event2.target.value); + } else if (k === "Escape") { + this.$el.value = this.focusText; + this.caret(0, this.checkVal()); + this.updateModelValue(event2.target.value); + event2.preventDefault(); + } + this.$emit("keydown", event2); + }, "onKeyDown"), + onKeyPress: /* @__PURE__ */ __name(function onKeyPress(event2) { + var _this2 = this; + if (this.readonly) { + return; + } + var k = event2.code, pos = this.caret(), p, c, next, completed; + if (event2.ctrlKey || event2.altKey || event2.metaKey || event2.shiftKey || event2.key === "CapsLock" || event2.key === "Escape" || event2.key === "Tab") { + return; + } else if (k && k !== "Enter") { + if (pos.end - pos.begin !== 0) { + this.clearBuffer(pos.begin, pos.end); + this.shiftL(pos.begin, pos.end - 1); + } + p = this.seekNext(pos.begin - 1); + if (p < this.len) { + c = event2.key; + if (this.tests[p].test(c)) { + this.shiftR(p); + this.buffer[p] = c; + this.writeBuffer(); + next = this.seekNext(p); + if (/android/i.test(getUserAgent())) { + var proxy = /* @__PURE__ */ __name(function proxy2() { + _this2.caret(next); + }, "proxy"); + setTimeout(proxy, 0); + } else { + this.caret(next); + } + if (pos.begin <= this.lastRequiredNonMaskPos) { + completed = this.isCompleted(); + } + } + } + event2.preventDefault(); + } + this.updateModelValue(event2.target.value); + if (completed) { + this.$emit("complete", event2); + } + this.$emit("keypress", event2); + }, "onKeyPress"), + onPaste: /* @__PURE__ */ __name(function onPaste2(event2) { + this.handleInputChange(event2); + this.$emit("paste", event2); + }, "onPaste"), + caret: /* @__PURE__ */ __name(function caret(first3, last) { + var range, begin, end; + if (!this.$el.offsetParent || this.$el !== document.activeElement) { + return; + } + if (typeof first3 === "number") { + begin = first3; + end = typeof last === "number" ? last : begin; + if (this.$el.setSelectionRange) { + this.$el.setSelectionRange(begin, end); + } else if (this.$el["createTextRange"]) { + range = this.$el["createTextRange"](); + range.collapse(true); + range.moveEnd("character", end); + range.moveStart("character", begin); + range.select(); + } + } else { + if (this.$el.setSelectionRange) { + begin = this.$el.selectionStart; + end = this.$el.selectionEnd; + } else if (document["selection"] && document["selection"].createRange) { + range = document["selection"].createRange(); + begin = 0 - range.duplicate().moveStart("character", -1e5); + end = begin + range.text.length; + } + return { + begin, + end + }; + } + }, "caret"), + isCompleted: /* @__PURE__ */ __name(function isCompleted() { + for (var i = this.firstNonMaskPos; i <= this.lastRequiredNonMaskPos; i++) { + if (this.tests[i] && this.buffer[i] === this.getPlaceholder(i)) { + return false; + } + } + return true; + }, "isCompleted"), + getPlaceholder: /* @__PURE__ */ __name(function getPlaceholder(i) { + if (i < this.slotChar.length) { + return this.slotChar.charAt(i); + } + return this.slotChar.charAt(0); + }, "getPlaceholder"), + seekNext: /* @__PURE__ */ __name(function seekNext(pos) { + while (++pos < this.len && !this.tests[pos]) ; + return pos; + }, "seekNext"), + seekPrev: /* @__PURE__ */ __name(function seekPrev(pos) { + while (--pos >= 0 && !this.tests[pos]) ; + return pos; + }, "seekPrev"), + shiftL: /* @__PURE__ */ __name(function shiftL(begin, end) { + var i, j; + if (begin < 0) { + return; + } + for (i = begin, j = this.seekNext(end); i < this.len; i++) { + if (this.tests[i]) { + if (j < this.len && this.tests[i].test(this.buffer[j])) { + this.buffer[i] = this.buffer[j]; + this.buffer[j] = this.getPlaceholder(j); + } else { + break; + } + j = this.seekNext(j); + } + } + this.writeBuffer(); + this.caret(Math.max(this.firstNonMaskPos, begin)); + }, "shiftL"), + shiftR: /* @__PURE__ */ __name(function shiftR(pos) { + var i, c, j, t2; + for (i = pos, c = this.getPlaceholder(pos); i < this.len; i++) { + if (this.tests[i]) { + j = this.seekNext(i); + t2 = this.buffer[i]; + this.buffer[i] = c; + if (j < this.len && this.tests[j].test(t2)) { + c = t2; + } else { + break; + } + } + } + }, "shiftR"), + handleAndroidInput: /* @__PURE__ */ __name(function handleAndroidInput(event2) { + var curVal = this.$el.value; + var pos = this.caret(); + if (this.oldVal && this.oldVal.length && this.oldVal.length > curVal.length) { + this.checkVal(true); + while (pos.begin > 0 && !this.tests[pos.begin - 1]) pos.begin--; + if (pos.begin === 0) { + while (pos.begin < this.firstNonMaskPos && !this.tests[pos.begin]) pos.begin++; + } + this.caret(pos.begin, pos.begin); + } else { + this.checkVal(true); + while (pos.begin < this.len && !this.tests[pos.begin]) pos.begin++; + this.caret(pos.begin, pos.begin); + } + if (this.isCompleted()) { + this.$emit("complete", event2); + } + }, "handleAndroidInput"), + clearBuffer: /* @__PURE__ */ __name(function clearBuffer(start, end) { + var i; + for (i = start; i < end && i < this.len; i++) { + if (this.tests[i]) { + this.buffer[i] = this.getPlaceholder(i); + } + } + }, "clearBuffer"), + writeBuffer: /* @__PURE__ */ __name(function writeBuffer() { + this.$el.value = this.buffer.join(""); + }, "writeBuffer"), + checkVal: /* @__PURE__ */ __name(function checkVal(allow) { + this.isValueChecked = true; + var test = this.$el.value, lastMatch = -1, i, c, pos; + for (i = 0, pos = 0; i < this.len; i++) { + if (this.tests[i]) { + this.buffer[i] = this.getPlaceholder(i); + while (pos++ < test.length) { + c = test.charAt(pos - 1); + if (this.tests[i].test(c)) { + this.buffer[i] = c; + lastMatch = i; + break; + } + } + if (pos > test.length) { + this.clearBuffer(i + 1, this.len); + break; + } + } else { + if (this.buffer[i] === test.charAt(pos)) { + pos++; + } + if (i < this.partialPosition) { + lastMatch = i; + } + } + } + if (allow) { + this.writeBuffer(); + } else if (lastMatch + 1 < this.partialPosition) { + if (this.autoClear || this.buffer.join("") === this.defaultBuffer) { + if (this.$el.value) this.$el.value = ""; + this.clearBuffer(0, this.len); + } else { + this.writeBuffer(); + } + } else { + this.writeBuffer(); + this.$el.value = this.$el.value.substring(0, lastMatch + 1); + } + return this.partialPosition ? i : this.firstNonMaskPos; + }, "checkVal"), + handleInputChange: /* @__PURE__ */ __name(function handleInputChange(event2) { + var isPasteEvent = event2.type === "paste"; + if (this.readonly || isPasteEvent) { + return; + } + var pos = this.checkVal(true); + this.caret(pos); + this.updateModelValue(event2.target.value); + if (this.isCompleted()) { + this.$emit("complete", event2); + } + }, "handleInputChange"), + getUnmaskedValue: /* @__PURE__ */ __name(function getUnmaskedValue() { + var unmaskedBuffer = []; + for (var i = 0; i < this.buffer.length; i++) { + var c = this.buffer[i]; + if (this.tests[i] && c !== this.getPlaceholder(i)) { + unmaskedBuffer.push(c); + } + } + return unmaskedBuffer.join(""); + }, "getUnmaskedValue"), + updateModelValue: /* @__PURE__ */ __name(function updateModelValue(value2) { + if (this.currentVal === value2) return; + var val = this.unmask ? this.getUnmaskedValue() : value2; + this.currentVal = value2; + this.writeValue(this.defaultBuffer !== val ? val : ""); + }, "updateModelValue"), + updateValue: /* @__PURE__ */ __name(function updateValue2() { + var _this3 = this; + var updateModel8 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + if (this.$el) { + if (this.d_value == null) { + this.$el.value = ""; + updateModel8 && this.updateModelValue(""); + } else { + this.$el.value = this.d_value; + this.checkVal(); + setTimeout(function() { + if (_this3.$el) { + _this3.writeBuffer(); + _this3.checkVal(); + if (updateModel8) _this3.updateModelValue(_this3.$el.value); + } + }, 10); + } + this.focusText = this.$el.value; + } + }, "updateValue"), + initMask: /* @__PURE__ */ __name(function initMask() { + this.tests = []; + this.partialPosition = this.mask.length; + this.len = this.mask.length; + this.firstNonMaskPos = null; + this.defs = { + 9: "[0-9]", + a: "[A-Za-z]", + "*": "[A-Za-z0-9]" + }; + var ua = getUserAgent(); + this.androidChrome = /chrome/i.test(ua) && /android/i.test(ua); + var maskTokens = this.mask.split(""); + for (var i = 0; i < maskTokens.length; i++) { + var c = maskTokens[i]; + if (c === "?") { + this.len--; + this.partialPosition = i; + } else if (this.defs[c]) { + this.tests.push(new RegExp(this.defs[c])); + if (this.firstNonMaskPos === null) { + this.firstNonMaskPos = this.tests.length - 1; + } + if (i < this.partialPosition) { + this.lastRequiredNonMaskPos = this.tests.length - 1; + } + } else { + this.tests.push(null); + } + } + this.buffer = []; + for (var _i = 0; _i < maskTokens.length; _i++) { + var _c = maskTokens[_i]; + if (_c !== "?") { + if (this.defs[_c]) this.buffer.push(this.getPlaceholder(_i)); + else this.buffer.push(_c); + } + } + this.defaultBuffer = this.buffer.join(""); + this.updateValue(false); + }, "initMask"), + isValueUpdated: /* @__PURE__ */ __name(function isValueUpdated() { + return this.unmask ? this.d_value != this.getUnmaskedValue() : this.defaultBuffer !== this.$el.value && this.$el.value !== this.d_value; + }, "isValueUpdated") + }, + computed: { + inputClass: /* @__PURE__ */ __name(function inputClass() { + return [this.cx("root"), this["class"]]; + }, "inputClass"), + rootPTOptions: /* @__PURE__ */ __name(function rootPTOptions() { + return { + root: mergeProps(this.ptm("pcInputText", this.ptmParams), this.ptmi("root", this.ptmParams)) + }; + }, "rootPTOptions"), + ptmParams: /* @__PURE__ */ __name(function ptmParams() { + return { + context: { + filled: this.$filled + } + }; + }, "ptmParams") + }, + components: { + InputText: script$1o + } +}; +function render$x(_ctx, _cache, $props, $setup, $data, $options) { + var _component_InputText = resolveComponent("InputText"); + return openBlock(), createBlock(_component_InputText, { + id: _ctx.id, + value: $data.currentVal, + "class": normalizeClass($options.inputClass), + readonly: _ctx.readonly, + disabled: _ctx.disabled, + invalid: _ctx.invalid, + size: _ctx.size, + name: _ctx.name, + variant: _ctx.variant, + placeholder: _ctx.placeholder, + fluid: _ctx.$fluid, + unstyled: _ctx.unstyled, + onInput: $options.onInput, + onCompositionend: $options.onInput, + onFocus: $options.onFocus, + onBlur: $options.onBlur, + onKeydown: $options.onKeyDown, + onKeypress: $options.onKeyPress, + onPaste: $options.onPaste, + pt: $options.rootPTOptions + }, null, 8, ["id", "value", "class", "readonly", "disabled", "invalid", "size", "name", "variant", "placeholder", "fluid", "unstyled", "onInput", "onCompositionend", "onFocus", "onBlur", "onKeydown", "onKeypress", "onPaste", "pt"]); +} +__name(render$x, "render$x"); +script$C.render = render$x; +var theme$l = /* @__PURE__ */ __name(function theme19(_ref) { + var dt = _ref.dt; + return "\n.p-inputotp {\n display: flex;\n align-items: center;\n gap: ".concat(dt("inputotp.gap"), ";\n}\n\n.p-inputotp-input {\n text-align: center;\n width: ").concat(dt("inputotp.input.width"), ";\n}\n\n.p-inputotp-input.p-inputtext-sm {\n text-align: center;\n width: ").concat(dt("inputotp.input.sm.width"), ";\n}\n\n.p-inputotp-input.p-inputtext-lg {\n text-align: center;\n width: ").concat(dt("inputotp.input.lg.width"), ";\n}\n"); +}, "theme"); +var classes$m = { + root: "p-inputotp p-component", + pcInputText: "p-inputotp-input" +}; +var InputOtpStyle = BaseStyle.extend({ + name: "inputotp", + theme: theme$l, + classes: classes$m +}); +var script$1$m = { + name: "BaseInputOtp", + "extends": script$1n, + props: { + readonly: { + type: Boolean, + "default": false + }, + tabindex: { + type: Number, + "default": null + }, + length: { + type: Number, + "default": 4 + }, + mask: { + type: Boolean, + "default": false + }, + integerOnly: { + type: Boolean, + "default": false + } + }, + style: InputOtpStyle, + provide: /* @__PURE__ */ __name(function provide29() { + return { + $pcInputOtp: this, + $parentInstance: this + }; + }, "provide") +}; +var script$B = { + name: "InputOtp", + "extends": script$1$m, + inheritAttrs: false, + emits: ["change", "focus", "blur"], + data: /* @__PURE__ */ __name(function data18() { + return { + tokens: [] + }; + }, "data"), + watch: { + modelValue: { + immediate: true, + handler: /* @__PURE__ */ __name(function handler2(newValue) { + this.tokens = newValue ? newValue.split("") : new Array(this.length); + }, "handler") + } + }, + methods: { + getTemplateAttrs: /* @__PURE__ */ __name(function getTemplateAttrs(index) { + return { + value: this.tokens[index] + }; + }, "getTemplateAttrs"), + getTemplateEvents: /* @__PURE__ */ __name(function getTemplateEvents(index) { + var _this = this; + return { + input: /* @__PURE__ */ __name(function input2(event2) { + return _this.onInput(event2, index); + }, "input"), + keydown: /* @__PURE__ */ __name(function keydown(event2) { + return _this.onKeyDown(event2); + }, "keydown"), + focus: /* @__PURE__ */ __name(function focus4(event2) { + return _this.onFocus(event2); + }, "focus"), + blur: /* @__PURE__ */ __name(function blur(event2) { + return _this.onBlur(event2); + }, "blur"), + paste: /* @__PURE__ */ __name(function paste(event2) { + return _this.onPaste(event2); + }, "paste") + }; + }, "getTemplateEvents"), + onInput: /* @__PURE__ */ __name(function onInput4(event2, index) { + this.tokens[index] = event2.target.value; + this.updateModel(event2); + if (event2.inputType === "deleteContentBackward") { + this.moveToPrev(event2); + } else if (event2.inputType === "insertText" || event2.inputType === "deleteContentForward" || isTouchDevice() && event2 instanceof CustomEvent) { + this.moveToNext(event2); + } + }, "onInput"), + updateModel: /* @__PURE__ */ __name(function updateModel4(event2) { + var newValue = this.tokens.join(""); + this.writeValue(newValue, event2); + this.$emit("change", { + originalEvent: event2, + value: newValue + }); + }, "updateModel"), + moveToPrev: /* @__PURE__ */ __name(function moveToPrev(event2) { + var prevInput = this.findPrevInput(event2.target); + if (prevInput) { + prevInput.focus(); + prevInput.select(); + } + }, "moveToPrev"), + moveToNext: /* @__PURE__ */ __name(function moveToNext(event2) { + var nextInput = this.findNextInput(event2.target); + if (nextInput) { + nextInput.focus(); + nextInput.select(); + } + }, "moveToNext"), + findNextInput: /* @__PURE__ */ __name(function findNextInput(element) { + var nextElement = element.nextElementSibling; + if (!nextElement) return; + return nextElement.nodeName === "INPUT" ? nextElement : this.findNextInput(nextElement); + }, "findNextInput"), + findPrevInput: /* @__PURE__ */ __name(function findPrevInput(element) { + var prevElement = element.previousElementSibling; + if (!prevElement) return; + return prevElement.nodeName === "INPUT" ? prevElement : this.findPrevInput(prevElement); + }, "findPrevInput"), + onFocus: /* @__PURE__ */ __name(function onFocus7(event2) { + event2.target.select(); + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur6(event2) { + this.$emit("blur", event2); + }, "onBlur"), + onClick: /* @__PURE__ */ __name(function onClick3(event2) { + setTimeout(function() { + return event2.target.select(); + }, 1); + }, "onClick"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown6(event2) { + if (event2.ctrlKey || event2.metaKey) { + return; + } + switch (event2.code) { + case "ArrowLeft": + this.moveToPrev(event2); + event2.preventDefault(); + break; + case "ArrowUp": + case "ArrowDown": + event2.preventDefault(); + break; + case "Backspace": + if (event2.target.value.length === 0) { + this.moveToPrev(event2); + event2.preventDefault(); + } + break; + case "ArrowRight": + this.moveToNext(event2); + event2.preventDefault(); + break; + case "Enter": + case "NumpadEnter": + case "Tab": + break; + default: + if (this.integerOnly && !(event2.code !== "Space" && Number(event2.key) >= 0 && Number(event2.key) <= 9) || this.tokens.join("").length >= this.length && event2.code !== "Delete") { + event2.preventDefault(); + } + break; + } + }, "onKeyDown"), + onPaste: /* @__PURE__ */ __name(function onPaste3(event2) { + var paste = event2.clipboardData.getData("text"); + if (paste.length) { + var pastedCode = paste.substring(0, this.length); + if (!this.integerOnly || !isNaN(pastedCode)) { + this.tokens = pastedCode.split(""); + this.updateModel(event2); + } + } + event2.preventDefault(); + }, "onPaste") + }, + computed: { + inputMode: /* @__PURE__ */ __name(function inputMode() { + return this.integerOnly ? "numeric" : "text"; + }, "inputMode"), + inputType: /* @__PURE__ */ __name(function inputType() { + return this.mask ? "password" : "text"; + }, "inputType") + }, + components: { + OtpInputText: script$1o + } +}; +function render$w(_ctx, _cache, $props, $setup, $data, $options) { + var _component_OtpInputText = resolveComponent("OtpInputText"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.length, function(i) { + return renderSlot(_ctx.$slots, "default", { + key: i, + events: $options.getTemplateEvents(i - 1), + attrs: $options.getTemplateAttrs(i - 1), + index: i + }, function() { + return [createVNode(_component_OtpInputText, { + value: $data.tokens[i - 1], + type: $options.inputType, + "class": normalizeClass(_ctx.cx("pcInputText")), + name: _ctx.$formName, + inputmode: $options.inputMode, + variant: _ctx.variant, + readonly: _ctx.readonly, + disabled: _ctx.disabled, + size: _ctx.size, + invalid: _ctx.invalid, + tabindex: _ctx.tabindex, + unstyled: _ctx.unstyled, + onInput: /* @__PURE__ */ __name(function onInput6($event) { + return $options.onInput($event, i - 1); + }, "onInput"), + onFocus: _cache[0] || (_cache[0] = function($event) { + return $options.onFocus($event); + }), + onBlur: _cache[1] || (_cache[1] = function($event) { + return $options.onBlur($event); + }), + onPaste: _cache[2] || (_cache[2] = function($event) { + return $options.onPaste($event); + }), + onKeydown: _cache[3] || (_cache[3] = function($event) { + return $options.onKeyDown($event); + }), + onClick: _cache[4] || (_cache[4] = function($event) { + return $options.onClick($event); + }), + pt: _ctx.ptm("pcInputText") + }, null, 8, ["value", "type", "class", "name", "inputmode", "variant", "readonly", "disabled", "size", "invalid", "tabindex", "unstyled", "onInput", "pt"])]; + }); + }), 128))], 16); +} +__name(render$w, "render$w"); +script$B.render = render$w; +var script$A = { + name: "InputSwitch", + "extends": script$1G, + mounted: /* @__PURE__ */ __name(function mounted20() { + console.warn("Deprecated since v4. Use ToggleSwitch component instead."); + }, "mounted") +}; +var InputSwitchStyle = BaseStyle.extend({ + name: "inputswitch" +}); +var KeyFilterStyle = BaseStyle.extend({ + name: "keyfilter-directive" +}); +var BaseKeyFilter = BaseDirective.extend({ + style: KeyFilterStyle +}); +function _toConsumableArray$8(r) { + return _arrayWithoutHoles$8(r) || _iterableToArray$8(r) || _unsupportedIterableToArray$9(r) || _nonIterableSpread$8(); +} +__name(_toConsumableArray$8, "_toConsumableArray$8"); +function _nonIterableSpread$8() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$8, "_nonIterableSpread$8"); +function _unsupportedIterableToArray$9(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$9(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$9(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$9, "_unsupportedIterableToArray$9"); +function _iterableToArray$8(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$8, "_iterableToArray$8"); +function _arrayWithoutHoles$8(r) { + if (Array.isArray(r)) return _arrayLikeToArray$9(r); +} +__name(_arrayWithoutHoles$8, "_arrayWithoutHoles$8"); +function _arrayLikeToArray$9(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$9, "_arrayLikeToArray$9"); +function _typeof$f(o) { + "@babel/helpers - typeof"; + return _typeof$f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$f(o); +} +__name(_typeof$f, "_typeof$f"); +var KeyFilter = BaseKeyFilter.extend("keyfilter", { + beforeMount: /* @__PURE__ */ __name(function beforeMount(el, options4) { + var target = this.getTarget(el); + if (!target) return; + target.$_pkeyfilterModifier = this.getModifiers(options4); + if (_typeof$f(options4.value)) { + var _options$value, _options$value2; + target.$_pkeyfilterPattern = ((_options$value = options4.value) === null || _options$value === void 0 ? void 0 : _options$value.pattern) || options4.value; + target.$_pkeyfilterValidateOnly = ((_options$value2 = options4.value) === null || _options$value2 === void 0 ? void 0 : _options$value2.validateOnly) || false; + } + this.bindEvents(target); + target.setAttribute("data-pd-keyfilter", true); + }, "beforeMount"), + updated: /* @__PURE__ */ __name(function updated5(el, options4) { + var target = this.getTarget(el); + if (!target) return; + target.$_pkeyfilterModifier = this.getModifiers(options4); + this.unbindEvents(el, options4); + if (_typeof$f(options4.value)) { + var _options$value3, _options$value4; + target.$_pkeyfilterPattern = ((_options$value3 = options4.value) === null || _options$value3 === void 0 ? void 0 : _options$value3.pattern) || options4.value; + target.$_pkeyfilterValidateOnly = ((_options$value4 = options4.value) === null || _options$value4 === void 0 ? void 0 : _options$value4.validateOnly) || false; + } + this.bindEvents(target); + }, "updated"), + unmounted: /* @__PURE__ */ __name(function unmounted3(el, options4) { + this.unbindEvents(el, options4); + }, "unmounted"), + DEFAULT_PATTERNS: { + pint: /[\d]/, + "int": /[\d\-]/, + pnum: /[\d\.]/, + money: /[\d\.\s,]/, + num: /[\d\-\.]/, + hex: /[0-9a-f]/i, + email: /[a-z0-9_\.\-@]/i, + alpha: /[a-z_]/i, + alphanum: /[a-z0-9_]/i + }, + methods: { + getTarget: /* @__PURE__ */ __name(function getTarget(el) { + return isAttributeEquals(el, "data-pc-name", "inputtext") || isAttributeEquals(el, "data-pc-name", "textarea") ? el : null; + }, "getTarget"), + getModifiers: /* @__PURE__ */ __name(function getModifiers(options4) { + if (options4.modifiers && Object.keys(options4.modifiers).length) { + return Object.keys(options4.modifiers)[Object.keys.length - 1]; + } + return ""; + }, "getModifiers"), + getRegex: /* @__PURE__ */ __name(function getRegex(target) { + return target.$_pkeyfilterPattern ? target.$_pkeyfilterPattern : target.$_pkeyfilterModifier ? this.DEFAULT_PATTERNS[target.$_pkeyfilterModifier] : /./; + }, "getRegex"), + bindEvents: /* @__PURE__ */ __name(function bindEvents(el) { + var _this = this; + el.$_keyfilterKeydownEvent = function(event2) { + return _this.onKeydown(event2, el); + }; + el.$_keyfilterPasteEvent = function(event2) { + return _this.onPaste(event2, el); + }; + el.addEventListener("keypress", el.$_keyfilterKeydownEvent); + el.addEventListener("paste", el.$_keyfilterPasteEvent); + }, "bindEvents"), + unbindEvents: /* @__PURE__ */ __name(function unbindEvents(el) { + el.removeEventListener("keypress", el.$_keyfilterKeydownEvent); + el.removeEventListener("paste", el.$_keyfilterPasteEvent); + el.$_keyfilterKeydownEvent = null; + el.$_keyfilterPasteEvent = null; + }, "unbindEvents"), + onKeydown: /* @__PURE__ */ __name(function onKeydown3(event2, target) { + if (event2.ctrlKey || event2.altKey || event2.metaKey || event2.key === "Tab") { + return; + } + var regex = this.getRegex(target); + if (regex === "") { + return; + } + var testKey = "".concat(event2.key); + if (target.$_pkeyfilterValidateOnly) { + testKey = "".concat(event2.target.value).concat(event2.key); + } + if (!regex.test(testKey)) { + event2.preventDefault(); + } + }, "onKeydown"), + onPaste: /* @__PURE__ */ __name(function onPaste4(event2, target) { + var regex = this.getRegex(target); + if (regex === "") { + return; + } + var clipboard = event2.clipboardData.getData("text"); + var testKey = ""; + _toConsumableArray$8(clipboard).forEach(function(c) { + if (target.$_pkeyfilterValidateOnly) { + testKey += c; + } else { + testKey = c; + } + if (!regex.test(testKey)) { + event2.preventDefault(); + return false; + } + }); + }, "onPaste") + } +}); +var theme$k = /* @__PURE__ */ __name(function theme20(_ref) { + var dt = _ref.dt; + return "\n.p-knob-range {\n fill: none;\n transition: stroke 0.1s ease-in;\n}\n\n.p-knob-value {\n animation-name: p-knob-dash-frame;\n animation-fill-mode: forwards;\n fill: none;\n}\n\n.p-knob-text {\n font-size: 1.3rem;\n text-align: center;\n}\n\n.p-knob svg {\n border-radius: 50%;\n outline-color: transparent;\n transition: background ".concat(dt("knob.transition.duration"), ", color ").concat(dt("knob.transition.duration"), ", outline-color ").concat(dt("knob.transition.duration"), ", box-shadow ").concat(dt("knob.transition.duration"), ";\n}\n\n.p-knob svg:focus-visible {\n box-shadow: ").concat(dt("knob.focus.ring.shadow"), ";\n outline: ").concat(dt("knob.focus.ring.width"), " ").concat(dt("knob.focus.ring.style"), " ").concat(dt("knob.focus.ring.color"), ";\n outline-offset: ").concat(dt("knob.focus.ring.offset"), ";\n}\n\n@keyframes p-knob-dash-frame {\n 100% {\n stroke-dashoffset: 0;\n }\n}\n"); +}, "theme"); +var classes$l = { + root: /* @__PURE__ */ __name(function root16(_ref2) { + var instance = _ref2.instance, props = _ref2.props; + return ["p-knob p-component", { + "p-disabled": props.disabled, + "p-invalid": instance.$invalid + }]; + }, "root"), + range: "p-knob-range", + value: "p-knob-value", + text: "p-knob-text" +}; +var KnobStyle = BaseStyle.extend({ + name: "knob", + theme: theme$k, + classes: classes$l +}); +var script$1$l = { + name: "BaseKnob", + "extends": script$1s, + props: { + size: { + type: Number, + "default": 100 + }, + readonly: { + type: Boolean, + "default": false + }, + step: { + type: Number, + "default": 1 + }, + min: { + type: Number, + "default": 0 + }, + max: { + type: Number, + "default": 100 + }, + valueColor: { + type: String, + "default": /* @__PURE__ */ __name(function _default10() { + return $dt("knob.value.background").variable; + }, "_default") + }, + rangeColor: { + type: String, + "default": /* @__PURE__ */ __name(function _default11() { + return $dt("knob.range.background").variable; + }, "_default") + }, + textColor: { + type: String, + "default": /* @__PURE__ */ __name(function _default12() { + return $dt("knob.text.color").variable; + }, "_default") + }, + strokeWidth: { + type: Number, + "default": 14 + }, + showValue: { + type: Boolean, + "default": true + }, + valueTemplate: { + type: [String, Function], + "default": "{value}" + }, + tabindex: { + type: Number, + "default": 0 + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: KnobStyle, + provide: /* @__PURE__ */ __name(function provide30() { + return { + $pcKnob: this, + $parentInstance: this + }; + }, "provide") +}; +var Math_PI$1 = 3.14159265358979; +var script$z = { + name: "Knob", + "extends": script$1$l, + inheritAttrs: false, + emits: ["change"], + data: /* @__PURE__ */ __name(function data19() { + return { + radius: 40, + midX: 50, + midY: 50, + minRadians: 4 * Math_PI$1 / 3, + maxRadians: -Math_PI$1 / 3 + }; + }, "data"), + methods: { + updateValueByOffset: /* @__PURE__ */ __name(function updateValueByOffset(offsetX, offsetY) { + var dx = offsetX - this.size / 2; + var dy = this.size / 2 - offsetY; + var angle = Math.atan2(dy, dx); + var start = -Math_PI$1 / 2 - Math_PI$1 / 6; + this.updateModel(angle, start); + }, "updateValueByOffset"), + updateModel: /* @__PURE__ */ __name(function updateModel5(angle, start) { + var mappedValue; + if (angle > this.maxRadians) mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.min, this.max); + else if (angle < start) mappedValue = this.mapRange(angle + 2 * Math_PI$1, this.minRadians, this.maxRadians, this.min, this.max); + else return; + var newValue = Math.round((mappedValue - this.min) / this.step) * this.step + this.min; + this.writeValue(newValue); + this.$emit("change", newValue); + }, "updateModel"), + updateModelValue: /* @__PURE__ */ __name(function updateModelValue2(newValue) { + if (newValue > this.max) this.writeValue(this.max); + else if (newValue < this.min) this.writeValue(this.min); + else this.writeValue(newValue); + }, "updateModelValue"), + mapRange: /* @__PURE__ */ __name(function mapRange(x, inMin, inMax, outMin, outMax) { + return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin; + }, "mapRange"), + onClick: /* @__PURE__ */ __name(function onClick4(event2) { + if (!this.disabled && !this.readonly) { + this.updateValueByOffset(event2.offsetX, event2.offsetY); + } + }, "onClick"), + onBlur: /* @__PURE__ */ __name(function onBlur7(event2) { + var _this$formField$onBlu, _this$formField; + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField, event2); + }, "onBlur"), + onMouseDown: /* @__PURE__ */ __name(function onMouseDown(event2) { + if (!this.disabled && !this.readonly) { + window.addEventListener("mousemove", this.onMouseMove); + window.addEventListener("mouseup", this.onMouseUp); + event2.preventDefault(); + } + }, "onMouseDown"), + onMouseUp: /* @__PURE__ */ __name(function onMouseUp(event2) { + if (!this.disabled && !this.readonly) { + window.removeEventListener("mousemove", this.onMouseMove); + window.removeEventListener("mouseup", this.onMouseUp); + event2.preventDefault(); + } + }, "onMouseUp"), + onTouchStart: /* @__PURE__ */ __name(function onTouchStart(event2) { + if (!this.disabled && !this.readonly) { + window.addEventListener("touchmove", this.onTouchMove); + window.addEventListener("touchend", this.onTouchEnd); + event2.preventDefault(); + } + }, "onTouchStart"), + onTouchEnd: /* @__PURE__ */ __name(function onTouchEnd(event2) { + if (!this.disabled && !this.readonly) { + window.removeEventListener("touchmove", this.onTouchMove); + window.removeEventListener("touchend", this.onTouchEnd); + event2.preventDefault(); + } + }, "onTouchEnd"), + onMouseMove: /* @__PURE__ */ __name(function onMouseMove(event2) { + if (!this.disabled && !this.readonly) { + this.updateValueByOffset(event2.offsetX, event2.offsetY); + event2.preventDefault(); + } + }, "onMouseMove"), + onTouchMove: /* @__PURE__ */ __name(function onTouchMove(event2) { + if (!this.disabled && !this.readonly && event2.touches.length == 1) { + var rect = this.$el.getBoundingClientRect(); + var touch = event2.targetTouches.item(0); + var offsetX = touch.clientX - rect.left; + var offsetY = touch.clientY - rect.top; + this.updateValueByOffset(offsetX, offsetY); + } + }, "onTouchMove"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown7(event2) { + if (!this.disabled && !this.readonly) { + switch (event2.code) { + case "ArrowRight": + case "ArrowUp": { + event2.preventDefault(); + this.updateModelValue(this.d_value + this.step); + break; + } + case "ArrowLeft": + case "ArrowDown": { + event2.preventDefault(); + this.updateModelValue(this.d_value - this.step); + break; + } + case "Home": { + event2.preventDefault(); + this.writeValue(this.min); + break; + } + case "End": { + event2.preventDefault(); + this.writeValue(this.max); + break; + } + case "PageUp": { + event2.preventDefault(); + this.updateModelValue(this.d_value + 10); + break; + } + case "PageDown": { + event2.preventDefault(); + this.updateModelValue(this.d_value - 10); + break; + } + } + } + }, "onKeyDown") + }, + computed: { + rangePath: /* @__PURE__ */ __name(function rangePath() { + return "M ".concat(this.minX, " ").concat(this.minY, " A ").concat(this.radius, " ").concat(this.radius, " 0 1 1 ").concat(this.maxX, " ").concat(this.maxY); + }, "rangePath"), + valuePath: /* @__PURE__ */ __name(function valuePath() { + return "M ".concat(this.zeroX, " ").concat(this.zeroY, " A ").concat(this.radius, " ").concat(this.radius, " 0 ").concat(this.largeArc, " ").concat(this.sweep, " ").concat(this.valueX, " ").concat(this.valueY); + }, "valuePath"), + zeroRadians: /* @__PURE__ */ __name(function zeroRadians() { + if (this.min > 0 && this.max > 0) return this.mapRange(this.min, this.min, this.max, this.minRadians, this.maxRadians); + else return this.mapRange(0, this.min, this.max, this.minRadians, this.maxRadians); + }, "zeroRadians"), + valueRadians: /* @__PURE__ */ __name(function valueRadians() { + return this.mapRange(this.d_value, this.min, this.max, this.minRadians, this.maxRadians); + }, "valueRadians"), + minX: /* @__PURE__ */ __name(function minX() { + return this.midX + Math.cos(this.minRadians) * this.radius; + }, "minX"), + minY: /* @__PURE__ */ __name(function minY() { + return this.midY - Math.sin(this.minRadians) * this.radius; + }, "minY"), + maxX: /* @__PURE__ */ __name(function maxX() { + return this.midX + Math.cos(this.maxRadians) * this.radius; + }, "maxX"), + maxY: /* @__PURE__ */ __name(function maxY() { + return this.midY - Math.sin(this.maxRadians) * this.radius; + }, "maxY"), + zeroX: /* @__PURE__ */ __name(function zeroX() { + return this.midX + Math.cos(this.zeroRadians) * this.radius; + }, "zeroX"), + zeroY: /* @__PURE__ */ __name(function zeroY() { + return this.midY - Math.sin(this.zeroRadians) * this.radius; + }, "zeroY"), + valueX: /* @__PURE__ */ __name(function valueX() { + return this.midX + Math.cos(this.valueRadians) * this.radius; + }, "valueX"), + valueY: /* @__PURE__ */ __name(function valueY() { + return this.midY - Math.sin(this.valueRadians) * this.radius; + }, "valueY"), + largeArc: /* @__PURE__ */ __name(function largeArc() { + return Math.abs(this.zeroRadians - this.valueRadians) < Math_PI$1 ? 0 : 1; + }, "largeArc"), + sweep: /* @__PURE__ */ __name(function sweep() { + return this.valueRadians > this.zeroRadians ? 0 : 1; + }, "sweep"), + valueToDisplay: /* @__PURE__ */ __name(function valueToDisplay() { + if (typeof this.valueTemplate === "string") { + return this.valueTemplate.replace(/{value}/g, this.d_value); + } else { + return this.valueTemplate(this.d_value); + } + }, "valueToDisplay") + } +}; +var _hoisted_1$j = ["width", "height", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-labelledby", "aria-label"]; +var _hoisted_2$e = ["d", "stroke-width", "stroke"]; +var _hoisted_3$b = ["d", "stroke-width", "stroke"]; +var _hoisted_4$7 = ["fill"]; +function render$v(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [(openBlock(), createElementBlock("svg", mergeProps({ + viewBox: "0 0 100 100", + role: "slider", + width: _ctx.size, + height: _ctx.size, + tabindex: _ctx.readonly || _ctx.disabled ? -1 : _ctx.tabindex, + "aria-valuemin": _ctx.min, + "aria-valuemax": _ctx.max, + "aria-valuenow": _ctx.d_value, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel, + onClick: _cache[0] || (_cache[0] = function() { + return $options.onClick && $options.onClick.apply($options, arguments); + }), + onBlur: _cache[1] || (_cache[1] = function() { + return $options.onBlur && $options.onBlur.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }), + onMousedown: _cache[3] || (_cache[3] = function() { + return $options.onMouseDown && $options.onMouseDown.apply($options, arguments); + }), + onMouseup: _cache[4] || (_cache[4] = function() { + return $options.onMouseUp && $options.onMouseUp.apply($options, arguments); + }), + onTouchstartPassive: _cache[5] || (_cache[5] = function() { + return $options.onTouchStart && $options.onTouchStart.apply($options, arguments); + }), + onTouchend: _cache[6] || (_cache[6] = function() { + return $options.onTouchEnd && $options.onTouchEnd.apply($options, arguments); + }) + }, _ctx.ptm("svg")), [createBaseVNode("path", mergeProps({ + d: $options.rangePath, + "stroke-width": _ctx.strokeWidth, + stroke: _ctx.rangeColor, + "class": _ctx.cx("range") + }, _ctx.ptm("range")), null, 16, _hoisted_2$e), createBaseVNode("path", mergeProps({ + d: $options.valuePath, + "stroke-width": _ctx.strokeWidth, + stroke: _ctx.valueColor, + "class": _ctx.cx("value") + }, _ctx.ptm("value")), null, 16, _hoisted_3$b), _ctx.showValue ? (openBlock(), createElementBlock("text", mergeProps({ + key: 0, + x: 50, + y: 57, + "text-anchor": "middle", + fill: _ctx.textColor, + "class": _ctx.cx("text") + }, _ctx.ptm("text")), toDisplayString($options.valueToDisplay), 17, _hoisted_4$7)) : createCommentVNode("", true)], 16, _hoisted_1$j))], 16); +} +__name(render$v, "render$v"); +script$z.render = render$v; +var theme$j = /* @__PURE__ */ __name(function theme21(_ref) { + var dt = _ref.dt; + return "\n.p-megamenu {\n position: relative;\n display: flex;\n align-items: center;\n background: ".concat(dt("megamenu.background"), ";\n border: 1px solid ").concat(dt("megamenu.border.color"), ";\n border-radius: ").concat(dt("megamenu.border.radius"), ";\n color: ").concat(dt("megamenu.color"), ";\n gap: ").concat(dt("megamenu.gap"), ";\n}\n\n.p-megamenu-start,\n.p-megamenu-end {\n display: flex;\n align-items: center;\n}\n\n.p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n outline: 0 none;\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: ").concat(dt("megamenu.gap"), ";\n}\n\n.p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content {\n border-radius: ").concat(dt("megamenu.base.item.border.radius"), ";\n}\n\n.p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content > .p-megamenu-item-link {\n padding: ").concat(dt("megamenu.base.item.padding"), ";\n}\n\n.p-megamenu-item-content {\n transition: background ").concat(dt("megamenu.transition.duration"), ", color ").concat(dt("megamenu.transition.duration"), ";\n border-radius: ").concat(dt("megamenu.item.border.radius"), ";\n color: ").concat(dt("megamenu.item.color"), ";\n}\n\n.p-megamenu-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("megamenu.item.padding"), ";\n gap: ").concat(dt("megamenu.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-megamenu-item-label {\n line-height: 1;\n}\n\n.p-megamenu-item-icon {\n color: ").concat(dt("megamenu.item.icon.color"), ";\n}\n\n.p-megamenu-submenu-icon {\n color: ").concat(dt("megamenu.submenu.icon.color"), ";\n font-size: ").concat(dt("megamenu.submenu.icon.size"), ";\n width: ").concat(dt("megamenu.submenu.icon.size"), ";\n height: ").concat(dt("megamenu.submenu.icon.size"), ";\n}\n\n.p-megamenu-item.p-focus > .p-megamenu-item-content {\n color: ").concat(dt("megamenu.item.focus.color"), ";\n background: ").concat(dt("megamenu.item.focus.background"), ";\n}\n\n.p-megamenu-item.p-focus > .p-megamenu-item-content .p-megamenu-item-icon {\n color: ").concat(dt("megamenu.item.icon.focus.color"), ";\n}\n\n.p-megamenu-item.p-focus > .p-megamenu-item-content .p-megamenu-submenu-icon {\n color: ").concat(dt("megamenu.submenu.icon.focus.color"), ";\n}\n\n.p-megamenu-item:not(.p-disabled) > .p-megamenu-item-content:hover {\n color: ").concat(dt("megamenu.item.focus.color"), ";\n background: ").concat(dt("megamenu.item.focus.background"), ";\n}\n\n.p-megamenu-item:not(.p-disabled) > .p-megamenu-item-content:hover .p-megamenu-item-icon {\n color: ").concat(dt("megamenu.item.icon.focus.color"), ";\n}\n\n.p-megamenu-item:not(.p-disabled) > .p-megamenu-item-content:hover .p-megamenu-submenu-icon {\n color: ").concat(dt("megamenu.submenu.icon.focus.color"), ";\n}\n\n.p-megamenu-item-active > .p-megamenu-item-content {\n color: ").concat(dt("megamenu.item.active.color"), ";\n background: ").concat(dt("megamenu.item.active.background"), ";\n}\n\n.p-megamenu-item-active > .p-megamenu-item-content .p-megamenu-item-icon {\n color: ").concat(dt("megamenu.item.icon.active.color"), ";\n}\n\n.p-megamenu-item-active > .p-megamenu-item-content .p-megamenu-submenu-icon {\n color: ").concat(dt("megamenu.submenu.icon.active.color"), ";\n}\n\n.p-megamenu-overlay {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n left: 0;\n min-width: 100%;\n padding: ").concat(dt("megamenu.overlay.padding"), ";\n background: ").concat(dt("megamenu.overlay.background"), ";\n color: ").concat(dt("megamenu.overlay.color"), ";\n border: 1px solid ").concat(dt("megamenu.overlay.border.color"), ";\n border-radius: ").concat(dt("megamenu.overlay.border.radius"), ";\n box-shadow: ").concat(dt("megamenu.overlay.shadow"), ";\n}\n\n.p-megamenu-overlay:dir(rtl) {\n left: auto;\n right: 0;\n}\n\n.p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-overlay {\n display: block;\n}\n\n.p-megamenu-submenu {\n margin: 0;\n list-style: none;\n padding: ").concat(dt("megamenu.submenu.padding"), ";\n min-width: 12.5rem;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("megamenu.submenu.gap"), "\n}\n\n.p-megamenu-submenu-label {\n padding: ").concat(dt("megamenu.submenu.label.padding"), ";\n color: ").concat(dt("megamenu.submenu.label.color"), ";\n font-weight: ").concat(dt("megamenu.submenu.label.font.weight"), ";\n background: ").concat(dt("megamenu.submenu.label.background"), ";\n}\n\n.p-megamenu-separator {\n border-block-start: 1px solid ").concat(dt("megamenu.separator.border.color"), ";\n}\n\n.p-megamenu-horizontal {\n align-items: center;\n padding: ").concat(dt("megamenu.horizontal.orientation.padding"), ";\n}\n\n.p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: ").concat(dt("megamenu.horizontal.orientation.gap"), ";\n}\n\n.p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n}\n\n.p-megamenu-horizontal .p-megamenu-end:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-megamenu-vertical {\n display: inline-flex;\n min-width: 12.5rem;\n flex-direction: column;\n align-items: stretch;\n padding: ").concat(dt("megamenu.vertical.orientation.padding"), ";\n}\n\n.p-megamenu-vertical .p-megamenu-root-list {\n align-items: stretch;\n flex-direction: column;\n gap: ").concat(dt("megamenu.vertical.orientation.gap"), ";\n}\n\n.p-megamenu-vertical .p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-overlay {\n left: 100%;\n top: 0;\n}\n\n.p-megamenu-vertical .p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-overlay:dir(rtl) {\n left: auto;\n right: 100%;\n}\n\n.p-megamenu-vertical .p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content .p-megamenu-submenu-icon {\n margin-left: auto;\n}\n\n.p-megamenu-vertical .p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content .p-megamenu-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n transform: rotate(180deg);\n}\n\n.p-megamenu-grid {\n display: flex;\n}\n\n.p-megamenu-col-2,\n.p-megamenu-col-3,\n.p-megamenu-col-4,\n.p-megamenu-col-6,\n.p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: ").concat(dt("megamenu.overlay.gap"), ";\n}\n\n.p-megamenu-col-2 {\n width: 16.6667%;\n}\n\n.p-megamenu-col-3 {\n width: 25%;\n}\n\n.p-megamenu-col-4 {\n width: 33.3333%;\n}\n\n.p-megamenu-col-6 {\n width: 50%;\n}\n\n.p-megamenu-col-12 {\n width: 100%;\n}\n\n.p-megamenu-button {\n display: none;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: ").concat(dt("megamenu.mobile.button.size"), ";\n height: ").concat(dt("megamenu.mobile.button.size"), ";\n position: relative;\n color: ").concat(dt("megamenu.mobile.button.color"), ";\n border: 0 none;\n background: transparent;\n border-radius: ").concat(dt("megamenu.mobile.button.border.radius"), ";\n transition: background ").concat(dt("megamenu.transition.duration"), ", color ").concat(dt("megamenu.transition.duration"), ", outline-color ").concat(dt("megamenu.transition.duration"), ", box-shadow ").concat(dt("megamenu.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-megamenu-button:hover {\n color: ").concat(dt("megamenu.mobile.button.hover.color"), ";\n background: ").concat(dt("megamenu.mobile.button.hover.background"), ";\n}\n\n.p-megamenu-button:focus-visible {\n box-shadow: ").concat(dt("megamenu.mobile.button.focus.ring.shadow"), ";\n outline: ").concat(dt("megamenu.mobile.button.focus.ring.width"), " ").concat(dt("megamenu.mobile.button.focus.ring.style"), " ").concat(dt("megamenu.mobile.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("megamenu.mobile.button.focus.ring.offset"), ";\n}\n\n.p-megamenu-mobile {\n display: flex;\n}\n\n.p-megamenu-mobile .p-megamenu-button {\n display: flex;\n}\n\n.p-megamenu-mobile .p-megamenu-root-list {\n position: absolute;\n display: none;\n flex-direction: column;\n top: 100%;\n left: 0;\n z-index: 1;\n width: 100%;\n padding: ").concat(dt("megamenu.submenu.padding"), ";\n gap: ").concat(dt("megamenu.submenu.gap"), ";\n background: ").concat(dt("megamenu.overlay.background"), ";\n border: 1px solid ").concat(dt("megamenu.overlay.border.color"), ";\n box-shadow: ").concat(dt("megamenu.overlay.shadow"), ";\n}\n\n.p-megamenu-mobile .p-megamenu-root-list:dir(rtl) {\n left: auto;\n right: 0;\n}\n\n.p-megamenu-mobile-active .p-megamenu-root-list {\n display: block;\n}\n\n.p-megamenu-mobile .p-megamenu-root-list .p-megamenu-item {\n width: 100%;\n position: static;\n}\n\n.p-megamenu-mobile .p-megamenu-overlay {\n position: static;\n border: 0 none;\n border-radius: 0;\n box-shadow: none;\n}\n\n.p-megamenu-mobile .p-megamenu-grid {\n flex-wrap: wrap;\n overflow: auto;\n max-height: 90%;\n}\n\n.p-megamenu-mobile .p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content .p-megamenu-submenu-icon {\n margin-left: auto;\n transition: transform 0.2s;\n}\n\n.p-megamenu-mobile .p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content .p-megamenu-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-megamenu-mobile .p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-item-content .p-megamenu-submenu-icon {\n transform: rotate(-180deg);\n}\n"); +}, "theme"); +var inlineStyles$6 = { + rootList: /* @__PURE__ */ __name(function rootList(_ref2) { + var props = _ref2.props; + return { + "max-height": props.scrollHeight, + overflow: "auto" + }; + }, "rootList") +}; +var classes$k = { + root: /* @__PURE__ */ __name(function root17(_ref3) { + var instance = _ref3.instance; + return ["p-megamenu p-component", { + "p-megamenu-mobile": instance.queryMatches, + "p-megamenu-mobile-active": instance.mobileActive, + "p-megamenu-horizontal": instance.horizontal, + "p-megamenu-vertical": instance.vertical + }]; + }, "root"), + start: "p-megamenu-start", + button: "p-megamenu-button", + rootList: "p-megamenu-root-list", + submenuLabel: /* @__PURE__ */ __name(function submenuLabel(_ref4) { + var instance = _ref4.instance, processedItem = _ref4.processedItem; + return ["p-megamenu-submenu-label", { + "p-disabled": instance.isItemDisabled(processedItem) + }]; + }, "submenuLabel"), + item: /* @__PURE__ */ __name(function item3(_ref5) { + var instance = _ref5.instance, processedItem = _ref5.processedItem; + return ["p-megamenu-item", { + "p-megamenu-item-active": instance.isItemActive(processedItem), + "p-focus": instance.isItemFocused(processedItem), + "p-disabled": instance.isItemDisabled(processedItem) + }]; + }, "item"), + itemContent: "p-megamenu-item-content", + itemLink: "p-megamenu-item-link", + itemIcon: "p-megamenu-item-icon", + itemLabel: "p-megamenu-item-label", + submenuIcon: "p-megamenu-submenu-icon", + overlay: "p-megamenu-overlay", + grid: "p-megamenu-grid", + column: /* @__PURE__ */ __name(function column(_ref6) { + var instance = _ref6.instance, processedItem = _ref6.processedItem; + var length = instance.isItemGroup(processedItem) ? processedItem.items.length : 0; + var columnClass; + if (instance.$parentInstance.queryMatches) columnClass = "p-megamenu-col-12"; + else { + switch (length) { + case 2: + columnClass = "p-megamenu-col-6"; + break; + case 3: + columnClass = "p-megamenu-col-4"; + break; + case 4: + columnClass = "p-megamenu-col-3"; + break; + case 6: + columnClass = "p-megamenu-col-2"; + break; + default: + columnClass = "p-megamenu-col-12"; + break; + } + } + return columnClass; + }, "column"), + submenu: "p-megamenu-submenu", + separator: "p-megamenu-separator", + end: "p-megamenu-end" +}; +var MegaMenuStyle = BaseStyle.extend({ + name: "megamenu", + theme: theme$j, + classes: classes$k, + inlineStyles: inlineStyles$6 +}); +var script$2$5 = { + name: "BaseMegaMenu", + "extends": script$1d, + props: { + model: { + type: Array, + "default": null + }, + orientation: { + type: String, + "default": "horizontal" + }, + breakpoint: { + type: String, + "default": "960px" + }, + disabled: { + type: Boolean, + "default": false + }, + tabindex: { + type: Number, + "default": 0 + }, + scrollHeight: { + type: String, + "default": "20rem" + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: MegaMenuStyle, + provide: /* @__PURE__ */ __name(function provide31() { + return { + $pcMegaMenu: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$k = { + name: "MegaMenuSub", + hostName: "MegaMenu", + "extends": script$1d, + emits: ["item-click", "item-mouseenter"], + props: { + menuId: { + type: String, + "default": null + }, + focusedItemId: { + type: String, + "default": null + }, + horizontal: { + type: Boolean, + "default": false + }, + submenu: { + type: Object, + "default": null + }, + mobileActive: { + type: Boolean, + "default": false + }, + items: { + type: Array, + "default": null + }, + level: { + type: Number, + "default": 0 + }, + templates: { + type: Object, + "default": null + }, + activeItem: { + type: Object, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + } + }, + methods: { + getSubListId: /* @__PURE__ */ __name(function getSubListId(processedItem) { + return "".concat(this.getItemId(processedItem), "_list"); + }, "getSubListId"), + getSubListKey: /* @__PURE__ */ __name(function getSubListKey(processedItem) { + return this.getSubListId(processedItem); + }, "getSubListKey"), + getItemId: /* @__PURE__ */ __name(function getItemId2(processedItem) { + return "".concat(this.menuId, "_").concat(processedItem.key); + }, "getItemId"), + getItemKey: /* @__PURE__ */ __name(function getItemKey(processedItem) { + return this.getItemId(processedItem); + }, "getItemKey"), + getItemProp: /* @__PURE__ */ __name(function getItemProp2(processedItem, name4, params) { + return processedItem && processedItem.item ? resolve(processedItem.item[name4], params) : void 0; + }, "getItemProp"), + getItemLabel: /* @__PURE__ */ __name(function getItemLabel(processedItem) { + return this.getItemProp(processedItem, "label"); + }, "getItemLabel"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions3(processedItem, index, key) { + return this.ptm(key, { + context: { + item: processedItem.item, + index, + active: this.isItemActive(processedItem), + focused: this.isItemFocused(processedItem), + disabled: this.isItemDisabled(processedItem) + } + }); + }, "getPTOptions"), + isItemActive: /* @__PURE__ */ __name(function isItemActive3(processedItem) { + return isNotEmpty(this.activeItem) ? this.activeItem.key === processedItem.key : false; + }, "isItemActive"), + isItemVisible: /* @__PURE__ */ __name(function isItemVisible(processedItem) { + return this.getItemProp(processedItem, "visible") !== false; + }, "isItemVisible"), + isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled(processedItem) { + return this.getItemProp(processedItem, "disabled"); + }, "isItemDisabled"), + isItemFocused: /* @__PURE__ */ __name(function isItemFocused(processedItem) { + return this.focusedItemId === this.getItemId(processedItem); + }, "isItemFocused"), + isItemGroup: /* @__PURE__ */ __name(function isItemGroup(processedItem) { + return isNotEmpty(processedItem.items); + }, "isItemGroup"), + onItemClick: /* @__PURE__ */ __name(function onItemClick2(event2, processedItem) { + this.getItemProp(processedItem, "command", { + originalEvent: event2, + item: processedItem.item + }); + this.$emit("item-click", { + originalEvent: event2, + processedItem, + isFocus: true + }); + }, "onItemClick"), + onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter2(event2, processedItem) { + this.$emit("item-mouseenter", { + originalEvent: event2, + processedItem + }); + }, "onItemMouseEnter"), + getAriaSetSize: /* @__PURE__ */ __name(function getAriaSetSize() { + var _this = this; + return this.items.filter(function(processedItem) { + return _this.isItemVisible(processedItem) && !_this.getItemProp(processedItem, "separator"); + }).length; + }, "getAriaSetSize"), + getAriaPosInset: /* @__PURE__ */ __name(function getAriaPosInset(index) { + var _this2 = this; + return index - this.items.slice(0, index).filter(function(processedItem) { + return _this2.isItemVisible(processedItem) && _this2.getItemProp(processedItem, "separator"); + }).length + 1; + }, "getAriaPosInset"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps3(processedItem, index) { + return { + action: mergeProps({ + "class": this.cx("itemLink"), + tabindex: -1 + }, this.getPTOptions(processedItem, index, "itemLink")), + icon: mergeProps({ + "class": [this.cx("itemIcon"), this.getItemProp(processedItem, "icon")] + }, this.getPTOptions(processedItem, index, "itemIcon")), + label: mergeProps({ + "class": this.cx("label") + }, this.getPTOptions(processedItem, index, "label")), + submenuicon: mergeProps({ + "class": this.cx("submenuIcon") + }, this.getPTOptions(processedItem, index, "submenuIcon")) + }; + }, "getMenuItemProps") + }, + components: { + AngleRightIcon: script$1q, + AngleDownIcon: script$1H + }, + directives: { + ripple: Ripple + } +}; +var _hoisted_1$1$4 = ["tabindex"]; +var _hoisted_2$1$3 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; +var _hoisted_3$a = ["onClick", "onMouseenter"]; +var _hoisted_4$6 = ["href", "target"]; +var _hoisted_5$2 = ["id"]; +function render$1$5(_ctx, _cache, $props, $setup, $data, $options) { + var _component_MegaMenuSub = resolveComponent("MegaMenuSub", true); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("ul", mergeProps({ + "class": $props.level === 0 ? _ctx.cx("rootList") : _ctx.cx("submenu"), + tabindex: $props.tabindex + }, $props.level === 0 ? _ctx.ptm("rootList") : _ctx.ptm("submenu")), [$props.submenu ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + "class": [_ctx.cx("submenuLabel", { + submenu: $props.submenu + }), $options.getItemProp($props.submenu, "class")], + style: $options.getItemProp($props.submenu, "style"), + role: "presentation" + }, _ctx.ptm("submenuLabel")), toDisplayString($options.getItemLabel($props.submenu)), 17)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function(processedItem, index) { + return openBlock(), createElementBlock(Fragment, { + key: $options.getItemKey(processedItem) + }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + id: $options.getItemId(processedItem), + style: $options.getItemProp(processedItem, "style"), + "class": [_ctx.cx("item", { + processedItem + }), $options.getItemProp(processedItem, "class")], + role: "menuitem", + "aria-label": $options.getItemLabel(processedItem), + "aria-disabled": $options.isItemDisabled(processedItem) || void 0, + "aria-expanded": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : void 0, + "aria-haspopup": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, "to") ? "menu" : void 0, + "aria-level": $props.level + 1, + "aria-setsize": $options.getAriaSetSize(), + "aria-posinset": $options.getAriaPosInset(index), + ref_for: true + }, $options.getPTOptions(processedItem, index, "item"), { + "data-p-active": $options.isItemActive(processedItem), + "data-p-focused": $options.isItemFocused(processedItem), + "data-p-disabled": $options.isItemDisabled(processedItem) + }), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("itemContent"), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onItemClick($event, processedItem); + }, "onClick"), + onMouseenter: /* @__PURE__ */ __name(function onMouseenter($event) { + return $options.onItemMouseEnter($event, processedItem); + }, "onMouseenter"), + ref_for: true + }, $options.getPTOptions(processedItem, index, "itemContent")), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ + key: 0, + href: $options.getItemProp(processedItem, "url"), + "class": _ctx.cx("itemLink"), + target: $options.getItemProp(processedItem, "target"), + tabindex: "-1", + ref_for: true + }, $options.getPTOptions(processedItem, index, "itemLink")), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), { + key: 0, + item: processedItem.item, + "class": normalizeClass(_ctx.cx("itemIcon")) + }, null, 8, ["item", "class"])) : $options.getItemProp(processedItem, "icon") ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": [_ctx.cx("itemIcon"), $options.getItemProp(processedItem, "icon")], + ref_for: true + }, $options.getPTOptions(processedItem, index, "itemIcon")), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("itemLabel"), + ref_for: true + }, $options.getPTOptions(processedItem, index, "itemLabel")), toDisplayString($options.getItemLabel(processedItem)), 17), $options.isItemGroup(processedItem) ? (openBlock(), createElementBlock(Fragment, { + key: 2 + }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), mergeProps({ + key: 0, + active: $options.isItemActive(processedItem), + "class": _ctx.cx("submenuIcon"), + ref_for: true + }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["active", "class"])) : (openBlock(), createBlock(resolveDynamicComponent($props.horizontal || $props.mobileActive ? "AngleDownIcon" : "AngleRightIcon"), mergeProps({ + key: 1, + "class": _ctx.cx("submenuIcon"), + ref_for: true + }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_4$6)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + key: 1, + item: processedItem.item, + hasSubmenu: $options.isItemGroup(processedItem), + label: $options.getItemLabel(processedItem), + props: $options.getMenuItemProps(processedItem, index) + }, null, 8, ["item", "hasSubmenu", "label", "props"]))], 16, _hoisted_3$a), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("overlay"), + ref_for: true + }, _ctx.ptm("overlay")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("grid"), + ref_for: true + }, _ctx.ptm("grid")), [(openBlock(true), createElementBlock(Fragment, null, renderList(processedItem.items, function(col) { + return openBlock(), createElementBlock("div", mergeProps({ + key: $options.getItemKey(col), + "class": _ctx.cx("column", { + processedItem + }), + ref_for: true + }, _ctx.ptm("column")), [(openBlock(true), createElementBlock(Fragment, null, renderList(col, function(submenu) { + return openBlock(), createBlock(_component_MegaMenuSub, { + key: $options.getSubListKey(submenu), + id: $options.getSubListId(submenu), + style: normalizeStyle(_ctx.sx("submenu", true, { + processedItem + })), + role: "menu", + menuId: $props.menuId, + focusedItemId: $props.focusedItemId, + submenu, + items: submenu.items, + templates: $props.templates, + level: $props.level + 1, + mobileActive: $props.mobileActive, + pt: _ctx.pt, + unstyled: _ctx.unstyled, + onItemClick: _cache[0] || (_cache[0] = function($event) { + return _ctx.$emit("item-click", $event); + }), + onItemMouseenter: _cache[1] || (_cache[1] = function($event) { + return _ctx.$emit("item-mouseenter", $event); + }) + }, null, 8, ["id", "style", "menuId", "focusedItemId", "submenu", "items", "templates", "level", "mobileActive", "pt", "unstyled"]); + }), 128))], 16); + }), 128))], 16)], 16)) : createCommentVNode("", true)], 16, _hoisted_2$1$3)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ + key: 1, + id: $options.getItemId(processedItem), + "class": [_ctx.cx("separator"), $options.getItemProp(processedItem, "class")], + style: $options.getItemProp(processedItem, "style"), + role: "separator", + ref_for: true + }, _ctx.ptm("separator")), null, 16, _hoisted_5$2)) : createCommentVNode("", true)], 64); + }), 128))], 16, _hoisted_1$1$4); +} +__name(render$1$5, "render$1$5"); +script$1$k.render = render$1$5; +var script$y = { + name: "MegaMenu", + "extends": script$2$5, + inheritAttrs: false, + emits: ["focus", "blur"], + outsideClickListener: null, + resizeListener: null, + matchMediaListener: null, + container: null, + menubar: null, + searchTimeout: null, + searchValue: null, + data: /* @__PURE__ */ __name(function data20() { + return { + id: this.$attrs.id, + mobileActive: false, + focused: false, + focusedItemInfo: { + index: -1, + key: "", + parentKey: "" + }, + activeItem: null, + dirty: false, + query: null, + queryMatches: false + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId5(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + activeItem: /* @__PURE__ */ __name(function activeItem(newItem) { + if (isNotEmpty(newItem)) { + this.bindOutsideClickListener(); + this.bindResizeListener(); + } else { + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + } + }, "activeItem") + }, + mounted: /* @__PURE__ */ __name(function mounted21() { + this.id = this.id || UniqueComponentId(); + this.bindMatchMediaListener(); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount8() { + this.mobileActive = false; + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + this.unbindMatchMediaListener(); + }, "beforeUnmount"), + methods: { + getItemProp: /* @__PURE__ */ __name(function getItemProp3(item8, name4) { + return item8 ? resolve(item8[name4]) : void 0; + }, "getItemProp"), + getItemLabel: /* @__PURE__ */ __name(function getItemLabel2(item8) { + return this.getItemProp(item8, "label"); + }, "getItemLabel"), + isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled2(item8) { + return this.getItemProp(item8, "disabled"); + }, "isItemDisabled"), + isItemVisible: /* @__PURE__ */ __name(function isItemVisible2(item8) { + return this.getItemProp(item8, "visible") !== false; + }, "isItemVisible"), + isItemGroup: /* @__PURE__ */ __name(function isItemGroup2(item8) { + return isNotEmpty(this.getItemProp(item8, "items")); + }, "isItemGroup"), + isItemSeparator: /* @__PURE__ */ __name(function isItemSeparator(item8) { + return this.getItemProp(item8, "separator"); + }, "isItemSeparator"), + getProccessedItemLabel: /* @__PURE__ */ __name(function getProccessedItemLabel(processedItem) { + return processedItem ? this.getItemLabel(processedItem.item) : void 0; + }, "getProccessedItemLabel"), + isProccessedItemGroup: /* @__PURE__ */ __name(function isProccessedItemGroup(processedItem) { + return processedItem && isNotEmpty(processedItem.items); + }, "isProccessedItemGroup"), + toggle: /* @__PURE__ */ __name(function toggle2(event2) { + var _this = this; + if (this.mobileActive) { + this.mobileActive = false; + ZIndex.clear(this.menubar); + this.hide(); + } else { + this.mobileActive = true; + ZIndex.set("menu", this.menubar, this.$primevue.config.zIndex.menu); + setTimeout(function() { + _this.show(); + }, 1); + } + this.bindOutsideClickListener(); + event2.preventDefault(); + }, "toggle"), + show: /* @__PURE__ */ __name(function show2() { + this.focusedItemInfo = { + index: this.findFirstFocusedItemIndex(), + level: 0, + parentKey: "" + }; + focus(this.menubar); + }, "show"), + hide: /* @__PURE__ */ __name(function hide3(event2, isFocus) { + var _this2 = this; + if (this.mobileActive) { + this.mobileActive = false; + setTimeout(function() { + focus(_this2.$refs.menubutton, { + preventScroll: true + }); + }, 1); + } + this.activeItem = null; + this.focusedItemInfo = { + index: -1, + key: "", + parentKey: "" + }; + isFocus && focus(this.menubar); + this.dirty = false; + }, "hide"), + onFocus: /* @__PURE__ */ __name(function onFocus8(event2) { + this.focused = true; + if (this.focusedItemInfo.index === -1) { + var index = this.findFirstFocusedItemIndex(); + var processedItem = this.findVisibleItem(index); + this.focusedItemInfo = { + index, + key: processedItem.key, + parentKey: processedItem.parentKey + }; + } + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur8(event2) { + this.focused = false; + this.focusedItemInfo = { + index: -1, + key: "", + parentKey: "" + }; + this.searchValue = ""; + this.dirty = false; + this.$emit("blur", event2); + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown8(event2) { + if (this.disabled) { + event2.preventDefault(); + return; + } + var metaKey = event2.metaKey || event2.ctrlKey; + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "ArrowLeft": + this.onArrowLeftKey(event2); + break; + case "ArrowRight": + this.onArrowRightKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "Space": + this.onSpaceKey(event2); + break; + case "Enter": + case "NumpadEnter": + this.onEnterKey(event2); + break; + case "Escape": + this.onEscapeKey(event2); + break; + case "Tab": + this.onTabKey(event2); + break; + case "PageDown": + case "PageUp": + case "Backspace": + case "ShiftLeft": + case "ShiftRight": + break; + default: + if (!metaKey && isPrintableCharacter(event2.key)) { + this.searchItems(event2, event2.key); + } + break; + } + }, "onKeyDown"), + onItemChange: /* @__PURE__ */ __name(function onItemChange(event2) { + var processedItem = event2.processedItem, isFocus = event2.isFocus; + if (isEmpty(processedItem)) return; + var index = processedItem.index, key = processedItem.key, parentKey = processedItem.parentKey, items2 = processedItem.items; + var grouped = isNotEmpty(items2); + grouped && (this.activeItem = processedItem); + this.focusedItemInfo = { + index, + key, + parentKey + }; + grouped && (this.dirty = true); + isFocus && focus(this.menubar); + }, "onItemChange"), + onItemClick: /* @__PURE__ */ __name(function onItemClick3(event2) { + var originalEvent = event2.originalEvent, processedItem = event2.processedItem; + var grouped = this.isProccessedItemGroup(processedItem); + var root35 = isEmpty(processedItem.parent); + var selected3 = this.isSelected(processedItem); + if (selected3) { + var index = processedItem.index, key = processedItem.key, parentKey = processedItem.parentKey; + this.activeItem = null; + this.focusedItemInfo = { + index, + key, + parentKey + }; + this.dirty = !root35; + if (!this.mobileActive) { + focus(this.menubar, { + preventScroll: true + }); + } + } else { + if (grouped) { + this.onItemChange(event2); + } else { + this.hide(originalEvent); + } + } + }, "onItemClick"), + onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter3(event2) { + if (!this.mobileActive && this.dirty) { + this.onItemChange(event2); + } + }, "onItemMouseEnter"), + menuButtonClick: /* @__PURE__ */ __name(function menuButtonClick(event2) { + this.toggle(event2); + }, "menuButtonClick"), + menuButtonKeydown: /* @__PURE__ */ __name(function menuButtonKeydown(event2) { + (event2.code === "Enter" || event2.code === "NumpadEnter" || event2.code === "Space") && this.menuButtonClick(event2); + }, "menuButtonKeydown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey4(event2) { + if (this.horizontal) { + if (isNotEmpty(this.activeItem) && this.activeItem.key === this.focusedItemInfo.key) { + this.focusedItemInfo = { + index: -1, + key: "", + parentKey: this.activeItem.key + }; + } else { + var processedItem = this.findVisibleItem(this.focusedItemInfo.index); + var grouped = this.isProccessedItemGroup(processedItem); + if (grouped) { + this.onItemChange({ + originalEvent: event2, + processedItem + }); + this.focusedItemInfo = { + index: -1, + key: processedItem.key, + parentKey: processedItem.parentKey + }; + this.searchValue = ""; + } + } + } + var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex(); + this.changeFocusedItemInfo(event2, itemIndex); + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey4(event2) { + if (event2.altKey && this.horizontal) { + if (this.focusedItemInfo.index !== -1) { + var processedItem = this.findVisibleItem(this.focusedItemInfo.index); + var grouped = this.isProccessedItemGroup(processedItem); + if (!grouped && isNotEmpty(this.activeItem)) { + if (this.focusedItemInfo.index === 0) { + this.focusedItemInfo = { + index: this.activeItem.index, + key: this.activeItem.key, + parentKey: this.activeItem.parentKey + }; + this.activeItem = null; + } else { + this.changeFocusedItemInfo(event2, this.findFirstItemIndex()); + } + } + } + event2.preventDefault(); + } else { + var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex(); + this.changeFocusedItemInfo(event2, itemIndex); + event2.preventDefault(); + } + }, "onArrowUpKey"), + onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey2(event2) { + var processedItem = this.findVisibleItem(this.focusedItemInfo.index); + var grouped = this.isProccessedItemGroup(processedItem); + if (grouped) { + if (this.horizontal) { + var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex(); + this.changeFocusedItemInfo(event2, itemIndex); + } + } else { + if (this.vertical && isNotEmpty(this.activeItem)) { + if (processedItem.columnIndex === 0) { + this.focusedItemInfo = { + index: this.activeItem.index, + key: this.activeItem.key, + parentKey: this.activeItem.parentKey + }; + this.activeItem = null; + } + } + var columnIndex = processedItem.columnIndex - 1; + var _itemIndex = this.visibleItems.findIndex(function(item8) { + return item8.columnIndex === columnIndex; + }); + _itemIndex !== -1 && this.changeFocusedItemInfo(event2, _itemIndex); + } + event2.preventDefault(); + }, "onArrowLeftKey"), + onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey2(event2) { + var processedItem = this.findVisibleItem(this.focusedItemInfo.index); + var grouped = this.isProccessedItemGroup(processedItem); + if (grouped) { + if (this.vertical) { + if (isNotEmpty(this.activeItem) && this.activeItem.key === processedItem.key) { + this.focusedItemInfo = { + index: -1, + key: "", + parentKey: this.activeItem.key + }; + } else { + var _processedItem = this.findVisibleItem(this.focusedItemInfo.index); + var _grouped = this.isProccessedItemGroup(_processedItem); + if (_grouped) { + this.onItemChange({ + originalEvent: event2, + processedItem: _processedItem + }); + this.focusedItemInfo = { + index: -1, + key: _processedItem.key, + parentKey: _processedItem.parentKey + }; + this.searchValue = ""; + } + } + } + var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex(); + this.changeFocusedItemInfo(event2, itemIndex); + } else { + var columnIndex = processedItem.columnIndex + 1; + var _itemIndex2 = this.visibleItems.findIndex(function(item8) { + return item8.columnIndex === columnIndex; + }); + _itemIndex2 !== -1 && this.changeFocusedItemInfo(event2, _itemIndex2); + } + event2.preventDefault(); + }, "onArrowRightKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey4(event2) { + this.changeFocusedItemInfo(event2, this.findFirstItemIndex()); + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey4(event2) { + this.changeFocusedItemInfo(event2, this.findLastItemIndex()); + event2.preventDefault(); + }, "onEndKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey3(event2) { + if (this.focusedItemInfo.index !== -1) { + var element = findSingle(this.menubar, 'li[id="'.concat("".concat(this.focusedItemId), '"]')); + var anchorElement = element && findSingle(element, 'a[data-pc-section="itemlink"]'); + anchorElement ? anchorElement.click() : element && element.click(); + var processedItem = this.visibleItems[this.focusedItemInfo.index]; + var grouped = this.isProccessedItemGroup(processedItem); + !grouped && this.changeFocusedItemInfo(event2, this.findFirstFocusedItemIndex()); + } + event2.preventDefault(); + }, "onEnterKey"), + onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey3(event2) { + this.onEnterKey(event2); + }, "onSpaceKey"), + onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey2(event2) { + if (isNotEmpty(this.activeItem)) { + this.focusedItemInfo = { + index: this.activeItem.index, + key: this.activeItem.key + }; + this.activeItem = null; + } + event2.preventDefault(); + }, "onEscapeKey"), + onTabKey: /* @__PURE__ */ __name(function onTabKey2(event2) { + if (this.focusedItemInfo.index !== -1) { + var processedItem = this.findVisibleItem(this.focusedItemInfo.index); + var grouped = this.isProccessedItemGroup(processedItem); + !grouped && this.onItemChange({ + originalEvent: event2, + processedItem + }); + } + this.hide(); + }, "onTabKey"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener4() { + var _this3 = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + var isOutsideContainer = _this3.container && !_this3.container.contains(event2.target); + var isOutsideTarget = !(_this3.target && (_this3.target === event2.target || _this3.target.contains(event2.target))); + if (isOutsideContainer && isOutsideTarget) { + _this3.hide(); + } + }; + document.addEventListener("click", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener4() { + if (this.outsideClickListener) { + document.removeEventListener("click", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener3() { + var _this4 = this; + if (!this.resizeListener) { + this.resizeListener = function(event2) { + if (!isTouchDevice()) { + _this4.hide(event2, true); + } + _this4.mobileActive = false; + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener3() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener4() { + var _this5 = this; + if (!this.matchMediaListener) { + var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); + this.query = query; + this.queryMatches = query.matches; + this.matchMediaListener = function() { + _this5.queryMatches = query.matches; + _this5.mobileActive = false; + }; + this.query.addEventListener("change", this.matchMediaListener); + } + }, "bindMatchMediaListener"), + unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener4() { + if (this.matchMediaListener) { + this.query.removeEventListener("change", this.matchMediaListener); + this.matchMediaListener = null; + } + }, "unbindMatchMediaListener"), + isItemMatched: /* @__PURE__ */ __name(function isItemMatched(processedItem) { + var _this$getProccessedIt; + return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())); + }, "isItemMatched"), + isValidItem: /* @__PURE__ */ __name(function isValidItem(processedItem) { + return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item); + }, "isValidItem"), + isValidSelectedItem: /* @__PURE__ */ __name(function isValidSelectedItem(processedItem) { + return this.isValidItem(processedItem) && this.isSelected(processedItem); + }, "isValidSelectedItem"), + isSelected: /* @__PURE__ */ __name(function isSelected3(processedItem) { + return isNotEmpty(this.activeItem) ? this.activeItem.key === processedItem.key : false; + }, "isSelected"), + findFirstItemIndex: /* @__PURE__ */ __name(function findFirstItemIndex() { + var _this6 = this; + return this.visibleItems.findIndex(function(processedItem) { + return _this6.isValidItem(processedItem); + }); + }, "findFirstItemIndex"), + findLastItemIndex: /* @__PURE__ */ __name(function findLastItemIndex() { + var _this7 = this; + return findLastIndex(this.visibleItems, function(processedItem) { + return _this7.isValidItem(processedItem); + }); + }, "findLastItemIndex"), + findNextItemIndex: /* @__PURE__ */ __name(function findNextItemIndex(index) { + var _this8 = this; + var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function(processedItem) { + return _this8.isValidItem(processedItem); + }) : -1; + return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index; + }, "findNextItemIndex"), + findPrevItemIndex: /* @__PURE__ */ __name(function findPrevItemIndex(index) { + var _this9 = this; + var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function(processedItem) { + return _this9.isValidItem(processedItem); + }) : -1; + return matchedItemIndex > -1 ? matchedItemIndex : index; + }, "findPrevItemIndex"), + findSelectedItemIndex: /* @__PURE__ */ __name(function findSelectedItemIndex() { + var _this10 = this; + return this.visibleItems.findIndex(function(processedItem) { + return _this10.isValidSelectedItem(processedItem); + }); + }, "findSelectedItemIndex"), + findFirstFocusedItemIndex: /* @__PURE__ */ __name(function findFirstFocusedItemIndex() { + var selectedIndex = this.findSelectedItemIndex(); + return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex; + }, "findFirstFocusedItemIndex"), + findLastFocusedItemIndex: /* @__PURE__ */ __name(function findLastFocusedItemIndex() { + var selectedIndex = this.findSelectedItemIndex(); + return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex; + }, "findLastFocusedItemIndex"), + findVisibleItem: /* @__PURE__ */ __name(function findVisibleItem(index) { + return isNotEmpty(this.visibleItems) ? this.visibleItems[index] : null; + }, "findVisibleItem"), + searchItems: /* @__PURE__ */ __name(function searchItems(event2, _char) { + var _this11 = this; + this.searchValue = (this.searchValue || "") + _char; + var itemIndex = -1; + var matched = false; + if (this.focusedItemInfo.index !== -1) { + itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(processedItem) { + return _this11.isItemMatched(processedItem); + }); + itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function(processedItem) { + return _this11.isItemMatched(processedItem); + }) : itemIndex + this.focusedItemInfo.index; + } else { + itemIndex = this.visibleItems.findIndex(function(processedItem) { + return _this11.isItemMatched(processedItem); + }); + } + if (itemIndex !== -1) { + matched = true; + } + if (itemIndex === -1 && this.focusedItemInfo.index === -1) { + itemIndex = this.findFirstFocusedItemIndex(); + } + if (itemIndex !== -1) { + this.changeFocusedItemInfo(event2, itemIndex); + } + if (this.searchTimeout) { + clearTimeout(this.searchTimeout); + } + this.searchTimeout = setTimeout(function() { + _this11.searchValue = ""; + _this11.searchTimeout = null; + }, 500); + return matched; + }, "searchItems"), + changeFocusedItemInfo: /* @__PURE__ */ __name(function changeFocusedItemInfo(event2, index) { + var processedItem = this.findVisibleItem(index); + this.focusedItemInfo.index = index; + this.focusedItemInfo.key = isNotEmpty(processedItem) ? processedItem.key : ""; + this.scrollInView(); + }, "changeFocusedItemInfo"), + scrollInView: /* @__PURE__ */ __name(function scrollInView3() { + var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1; + var id4 = index !== -1 ? "".concat(this.id, "_").concat(index) : this.focusedItemId; + var element; + if (id4 === null && this.queryMatches) { + element = this.$refs.menubutton; + } else { + element = findSingle(this.menubar, 'li[id="'.concat(id4, '"]')); + } + if (element) { + element.scrollIntoView && element.scrollIntoView({ + block: "nearest", + inline: "nearest", + behavior: "smooth" + }); + } + }, "scrollInView"), + createProcessedItems: /* @__PURE__ */ __name(function createProcessedItems(items2) { + var _this12 = this; + var level = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var parentKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ""; + var columnIndex = arguments.length > 4 ? arguments[4] : void 0; + var processedItems3 = []; + items2 && items2.forEach(function(item8, index) { + var key = (parentKey !== "" ? parentKey + "_" : "") + (columnIndex !== void 0 ? columnIndex + "_" : "") + index; + var newItem = { + item: item8, + index, + level, + key, + parent, + parentKey, + columnIndex: columnIndex !== void 0 ? columnIndex : parent.columnIndex !== void 0 ? parent.columnIndex : index + }; + newItem["items"] = level === 0 && item8.items && item8.items.length > 0 ? item8.items.map(function(_items, _index) { + return _this12.createProcessedItems(_items, level + 1, newItem, key, _index); + }) : _this12.createProcessedItems(item8.items, level + 1, newItem, key); + processedItems3.push(newItem); + }); + return processedItems3; + }, "createProcessedItems"), + containerRef: /* @__PURE__ */ __name(function containerRef3(el) { + this.container = el; + }, "containerRef"), + menubarRef: /* @__PURE__ */ __name(function menubarRef(el) { + this.menubar = el ? el.$el : void 0; + }, "menubarRef") + }, + computed: { + processedItems: /* @__PURE__ */ __name(function processedItems() { + return this.createProcessedItems(this.model || []); + }, "processedItems"), + visibleItems: /* @__PURE__ */ __name(function visibleItems() { + var processedItem = isNotEmpty(this.activeItem) ? this.activeItem : null; + return processedItem && processedItem.key === this.focusedItemInfo.parentKey ? processedItem.items.reduce(function(items2, col) { + col.forEach(function(submenu) { + submenu.items.forEach(function(a) { + items2.push(a); + }); + }); + return items2; + }, []) : this.processedItems; + }, "visibleItems"), + horizontal: /* @__PURE__ */ __name(function horizontal() { + return this.orientation === "horizontal"; + }, "horizontal"), + vertical: /* @__PURE__ */ __name(function vertical() { + return this.orientation === "vertical"; + }, "vertical"), + focusedItemId: /* @__PURE__ */ __name(function focusedItemId() { + return isNotEmpty(this.focusedItemInfo.key) ? "".concat(this.id, "_").concat(this.focusedItemInfo.key) : null; + }, "focusedItemId") + }, + components: { + MegaMenuSub: script$1$k, + BarsIcon: script$1I + } +}; +var _hoisted_1$i = ["id"]; +var _hoisted_2$d = ["aria-haspopup", "aria-expanded", "aria-controls", "aria-label"]; +function render$u(_ctx, _cache, $props, $setup, $data, $options) { + var _component_BarsIcon = resolveComponent("BarsIcon"); + var _component_MegaMenuSub = resolveComponent("MegaMenuSub"); + return openBlock(), createElementBlock("div", mergeProps({ + ref: $options.containerRef, + id: $data.id, + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("start") + }, _ctx.ptm("start")), [renderSlot(_ctx.$slots, "start")], 16)) : createCommentVNode("", true), renderSlot(_ctx.$slots, _ctx.$slots.button ? "button" : "menubutton", { + id: $data.id, + "class": normalizeClass(_ctx.cx("button")), + toggleCallback: /* @__PURE__ */ __name(function toggleCallback(event2) { + return $options.menuButtonClick(event2); + }, "toggleCallback") + }, function() { + var _ctx$$primevue$config; + return [_ctx.model && _ctx.model.length > 0 ? (openBlock(), createElementBlock("a", mergeProps({ + key: 0, + ref: "menubutton", + role: "button", + tabindex: "0", + "class": _ctx.cx("button"), + "aria-haspopup": _ctx.model.length && _ctx.model.length > 0 ? true : false, + "aria-expanded": $data.mobileActive, + "aria-controls": $data.id, + "aria-label": (_ctx$$primevue$config = _ctx.$primevue.config.locale.aria) === null || _ctx$$primevue$config === void 0 ? void 0 : _ctx$$primevue$config.navigation, + onClick: _cache[0] || (_cache[0] = function($event) { + return $options.menuButtonClick($event); + }), + onKeydown: _cache[1] || (_cache[1] = function($event) { + return $options.menuButtonKeydown($event); + }) + }, _ctx.ptm("button")), [renderSlot(_ctx.$slots, _ctx.$slots.buttonicon ? "buttonicon" : "menubuttonicon", {}, function() { + return [createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm("buttonIcon"))), null, 16)]; + })], 16, _hoisted_2$d)) : createCommentVNode("", true)]; + }), createVNode(_component_MegaMenuSub, { + ref: $options.menubarRef, + id: $data.id + "_list", + tabindex: !_ctx.disabled ? _ctx.tabindex : -1, + role: "menubar", + "aria-label": _ctx.ariaLabel, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-disabled": _ctx.disabled || void 0, + "aria-orientation": _ctx.orientation, + "aria-activedescendant": $data.focused ? $options.focusedItemId : void 0, + menuId: $data.id, + focusedItemId: $data.focused ? $options.focusedItemId : void 0, + items: $options.processedItems, + horizontal: $options.horizontal, + templates: _ctx.$slots, + activeItem: $data.activeItem, + mobileActive: $data.mobileActive, + level: 0, + style: normalizeStyle(_ctx.sx("rootList")), + pt: _ctx.pt, + unstyled: _ctx.unstyled, + onFocus: $options.onFocus, + onBlur: $options.onBlur, + onKeydown: $options.onKeyDown, + onItemClick: $options.onItemClick, + onItemMouseenter: $options.onItemMouseEnter + }, null, 8, ["id", "tabindex", "aria-label", "aria-labelledby", "aria-disabled", "aria-orientation", "aria-activedescendant", "menuId", "focusedItemId", "items", "horizontal", "templates", "activeItem", "mobileActive", "style", "pt", "unstyled", "onFocus", "onBlur", "onKeydown", "onItemClick", "onItemMouseenter"]), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("end") + }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$i); +} +__name(render$u, "render$u"); +script$y.render = render$u; +var theme$i = /* @__PURE__ */ __name(function theme22(_ref) { + var dt = _ref.dt; + return "\n.p-menu {\n background: ".concat(dt("menu.background"), ";\n color: ").concat(dt("menu.color"), ";\n border: 1px solid ").concat(dt("menu.border.color"), ";\n border-radius: ").concat(dt("menu.border.radius"), ";\n min-width: 12.5rem;\n}\n\n.p-menu-list {\n margin: 0;\n padding: ").concat(dt("menu.list.padding"), ";\n outline: 0 none;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("menu.list.gap"), ";\n}\n\n.p-menu-item-content {\n transition: background ").concat(dt("menu.transition.duration"), ", color ").concat(dt("menu.transition.duration"), ";\n border-radius: ").concat(dt("menu.item.border.radius"), ";\n color: ").concat(dt("menu.item.color"), ";\n}\n\n.p-menu-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("menu.item.padding"), ";\n gap: ").concat(dt("menu.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-menu-item-label {\n line-height: 1;\n}\n\n.p-menu-item-icon {\n color: ").concat(dt("menu.item.icon.color"), ";\n}\n\n.p-menu-item.p-focus .p-menu-item-content {\n color: ").concat(dt("menu.item.focus.color"), ";\n background: ").concat(dt("menu.item.focus.background"), ";\n}\n\n.p-menu-item.p-focus .p-menu-item-icon {\n color: ").concat(dt("menu.item.icon.focus.color"), ";\n}\n\n.p-menu-item:not(.p-disabled) .p-menu-item-content:hover {\n color: ").concat(dt("menu.item.focus.color"), ";\n background: ").concat(dt("menu.item.focus.background"), ";\n}\n\n.p-menu-item:not(.p-disabled) .p-menu-item-content:hover .p-menu-item-icon {\n color: ").concat(dt("menu.item.icon.focus.color"), ";\n}\n\n.p-menu-overlay {\n box-shadow: ").concat(dt("menu.shadow"), ";\n}\n\n.p-menu-submenu-label {\n background: ").concat(dt("menu.submenu.label.background"), ";\n padding: ").concat(dt("menu.submenu.label.padding"), ";\n color: ").concat(dt("menu.submenu.label.color"), ";\n font-weight: ").concat(dt("menu.submenu.label.font.weight"), ";\n}\n\n.p-menu-separator {\n border-block-start: 1px solid ").concat(dt("menu.separator.border.color"), ";\n}\n"); +}, "theme"); +var classes$j = { + root: /* @__PURE__ */ __name(function root18(_ref2) { + var props = _ref2.props; + return ["p-menu p-component", { + "p-menu-overlay": props.popup + }]; + }, "root"), + start: "p-menu-start", + list: "p-menu-list", + submenuLabel: "p-menu-submenu-label", + separator: "p-menu-separator", + end: "p-menu-end", + item: /* @__PURE__ */ __name(function item4(_ref3) { + var instance = _ref3.instance; + return ["p-menu-item", { + "p-focus": instance.id === instance.focusedOptionId, + "p-disabled": instance.disabled() + }]; + }, "item"), + itemContent: "p-menu-item-content", + itemLink: "p-menu-item-link", + itemIcon: "p-menu-item-icon", + itemLabel: "p-menu-item-label" +}; +var MenuStyle = BaseStyle.extend({ + name: "menu", + theme: theme$i, + classes: classes$j +}); +var script$2$4 = { + name: "BaseMenu", + "extends": script$1d, + props: { + popup: { + type: Boolean, + "default": false + }, + model: { + type: Array, + "default": null + }, + appendTo: { + type: [String, Object], + "default": "body" + }, + autoZIndex: { + type: Boolean, + "default": true + }, + baseZIndex: { + type: Number, + "default": 0 + }, + tabindex: { + type: Number, + "default": 0 + }, + ariaLabel: { + type: String, + "default": null + }, + ariaLabelledby: { + type: String, + "default": null + } + }, + style: MenuStyle, + provide: /* @__PURE__ */ __name(function provide32() { + return { + $pcMenu: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$j = { + name: "Menuitem", + hostName: "Menu", + "extends": script$1d, + inheritAttrs: false, + emits: ["item-click", "item-mousemove"], + props: { + item: null, + templates: null, + id: null, + focusedOptionId: null, + index: null + }, + methods: { + getItemProp: /* @__PURE__ */ __name(function getItemProp4(processedItem, name4) { + return processedItem && processedItem.item ? resolve(processedItem.item[name4]) : void 0; + }, "getItemProp"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions4(key) { + return this.ptm(key, { + context: { + item: this.item, + index: this.index, + focused: this.isItemFocused(), + disabled: this.disabled() + } + }); + }, "getPTOptions"), + isItemFocused: /* @__PURE__ */ __name(function isItemFocused2() { + return this.focusedOptionId === this.id; + }, "isItemFocused"), + onItemClick: /* @__PURE__ */ __name(function onItemClick4(event2) { + var command = this.getItemProp(this.item, "command"); + command && command({ + originalEvent: event2, + item: this.item.item + }); + this.$emit("item-click", { + originalEvent: event2, + item: this.item, + id: this.id + }); + }, "onItemClick"), + onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove(event2) { + this.$emit("item-mousemove", { + originalEvent: event2, + item: this.item, + id: this.id + }); + }, "onItemMouseMove"), + visible: /* @__PURE__ */ __name(function visible2() { + return typeof this.item.visible === "function" ? this.item.visible() : this.item.visible !== false; + }, "visible"), + disabled: /* @__PURE__ */ __name(function disabled3() { + return typeof this.item.disabled === "function" ? this.item.disabled() : this.item.disabled; + }, "disabled"), + label: /* @__PURE__ */ __name(function label4() { + return typeof this.item.label === "function" ? this.item.label() : this.item.label; + }, "label"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps4(item8) { + return { + action: mergeProps({ + "class": this.cx("itemLink"), + tabindex: "-1" + }, this.getPTOptions("itemLink")), + icon: mergeProps({ + "class": [this.cx("itemIcon"), item8.icon] + }, this.getPTOptions("itemIcon")), + label: mergeProps({ + "class": this.cx("itemLabel") + }, this.getPTOptions("itemLabel")) + }; + }, "getMenuItemProps") + }, + directives: { + ripple: Ripple + } +}; +var _hoisted_1$1$3 = ["id", "aria-label", "aria-disabled", "data-p-focused", "data-p-disabled"]; +var _hoisted_2$1$2 = ["href", "target"]; +function render$1$4(_ctx, _cache, $props, $setup, $data, $options) { + var _directive_ripple = resolveDirective("ripple"); + return $options.visible() ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + id: $props.id, + "class": [_ctx.cx("item"), $props.item["class"]], + role: "menuitem", + style: $props.item.style, + "aria-label": $options.label(), + "aria-disabled": $options.disabled() + }, $options.getPTOptions("item"), { + "data-p-focused": $options.isItemFocused(), + "data-p-disabled": $options.disabled() || false + }), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("itemContent"), + onClick: _cache[0] || (_cache[0] = function($event) { + return $options.onItemClick($event); + }), + onMousemove: _cache[1] || (_cache[1] = function($event) { + return $options.onItemMouseMove($event); + }) + }, $options.getPTOptions("itemContent")), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ + key: 0, + href: $props.item.url, + "class": _ctx.cx("itemLink"), + target: $props.item.target, + tabindex: "-1" + }, $options.getPTOptions("itemLink")), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), { + key: 0, + item: $props.item, + "class": normalizeClass(_ctx.cx("itemIcon")) + }, null, 8, ["item", "class"])) : $props.item.icon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": [_ctx.cx("itemIcon"), $props.item.icon] + }, $options.getPTOptions("itemIcon")), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("itemLabel") + }, $options.getPTOptions("itemLabel")), toDisplayString($options.label()), 17)], 16, _hoisted_2$1$2)), [[_directive_ripple]]) : $props.templates.item ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + key: 1, + item: $props.item, + label: $options.label(), + props: $options.getMenuItemProps($props.item) + }, null, 8, ["item", "label", "props"])) : createCommentVNode("", true)], 16)], 16, _hoisted_1$1$3)) : createCommentVNode("", true); +} +__name(render$1$4, "render$1$4"); +script$1$j.render = render$1$4; +function _toConsumableArray$7(r) { + return _arrayWithoutHoles$7(r) || _iterableToArray$7(r) || _unsupportedIterableToArray$8(r) || _nonIterableSpread$7(); +} +__name(_toConsumableArray$7, "_toConsumableArray$7"); +function _nonIterableSpread$7() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$7, "_nonIterableSpread$7"); +function _unsupportedIterableToArray$8(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$8(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$8(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$8, "_unsupportedIterableToArray$8"); +function _iterableToArray$7(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$7, "_iterableToArray$7"); +function _arrayWithoutHoles$7(r) { + if (Array.isArray(r)) return _arrayLikeToArray$8(r); +} +__name(_arrayWithoutHoles$7, "_arrayWithoutHoles$7"); +function _arrayLikeToArray$8(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$8, "_arrayLikeToArray$8"); +var script$x = { + name: "Menu", + "extends": script$2$4, + inheritAttrs: false, + emits: ["show", "hide", "focus", "blur"], + data: /* @__PURE__ */ __name(function data21() { + return { + id: this.$attrs.id, + overlayVisible: false, + focused: false, + focusedOptionIndex: -1, + selectedOptionIndex: -1 + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId6(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId") + }, + target: null, + outsideClickListener: null, + scrollHandler: null, + resizeListener: null, + container: null, + list: null, + mounted: /* @__PURE__ */ __name(function mounted22() { + this.id = this.id || UniqueComponentId(); + if (!this.popup) { + this.bindResizeListener(); + this.bindOutsideClickListener(); + } + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount9() { + this.unbindResizeListener(); + this.unbindOutsideClickListener(); + if (this.scrollHandler) { + this.scrollHandler.destroy(); + this.scrollHandler = null; + } + this.target = null; + if (this.container && this.autoZIndex) { + ZIndex.clear(this.container); + } + this.container = null; + }, "beforeUnmount"), + methods: { + itemClick: /* @__PURE__ */ __name(function itemClick(event2) { + var item8 = event2.item; + if (this.disabled(item8)) { + return; + } + if (item8.command) { + item8.command(event2); + } + if (this.overlayVisible) this.hide(); + if (!this.popup && this.focusedOptionIndex !== event2.id) { + this.focusedOptionIndex = event2.id; + } + }, "itemClick"), + itemMouseMove: /* @__PURE__ */ __name(function itemMouseMove(event2) { + if (this.focused) { + this.focusedOptionIndex = event2.id; + } + }, "itemMouseMove"), + onListFocus: /* @__PURE__ */ __name(function onListFocus2(event2) { + this.focused = true; + !this.popup && this.changeFocusedOptionIndex(0); + this.$emit("focus", event2); + }, "onListFocus"), + onListBlur: /* @__PURE__ */ __name(function onListBlur2(event2) { + this.focused = false; + this.focusedOptionIndex = -1; + this.$emit("blur", event2); + }, "onListBlur"), + onListKeyDown: /* @__PURE__ */ __name(function onListKeyDown2(event2) { + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "Enter": + case "NumpadEnter": + this.onEnterKey(event2); + break; + case "Space": + this.onSpaceKey(event2); + break; + case "Escape": + if (this.popup) { + focus(this.target); + this.hide(); + } + case "Tab": + this.overlayVisible && this.hide(); + break; + } + }, "onListKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey5(event2) { + var optionIndex = this.findNextOptionIndex(this.focusedOptionIndex); + this.changeFocusedOptionIndex(optionIndex); + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey5(event2) { + if (event2.altKey && this.popup) { + focus(this.target); + this.hide(); + event2.preventDefault(); + } else { + var optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex); + this.changeFocusedOptionIndex(optionIndex); + event2.preventDefault(); + } + }, "onArrowUpKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey5(event2) { + this.changeFocusedOptionIndex(0); + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey5(event2) { + this.changeFocusedOptionIndex(find(this.container, 'li[data-pc-section="item"][data-p-disabled="false"]').length - 1); + event2.preventDefault(); + }, "onEndKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey4(event2) { + var element = findSingle(this.list, 'li[id="'.concat("".concat(this.focusedOptionIndex), '"]')); + var anchorElement = element && findSingle(element, 'a[data-pc-section="itemlink"]'); + this.popup && focus(this.target); + anchorElement ? anchorElement.click() : element && element.click(); + event2.preventDefault(); + }, "onEnterKey"), + onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey4(event2) { + this.onEnterKey(event2); + }, "onSpaceKey"), + findNextOptionIndex: /* @__PURE__ */ __name(function findNextOptionIndex3(index) { + var links = find(this.container, 'li[data-pc-section="item"][data-p-disabled="false"]'); + var matchedOptionIndex = _toConsumableArray$7(links).findIndex(function(link) { + return link.id === index; + }); + return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0; + }, "findNextOptionIndex"), + findPrevOptionIndex: /* @__PURE__ */ __name(function findPrevOptionIndex3(index) { + var links = find(this.container, 'li[data-pc-section="item"][data-p-disabled="false"]'); + var matchedOptionIndex = _toConsumableArray$7(links).findIndex(function(link) { + return link.id === index; + }); + return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0; + }, "findPrevOptionIndex"), + changeFocusedOptionIndex: /* @__PURE__ */ __name(function changeFocusedOptionIndex3(index) { + var links = find(this.container, 'li[data-pc-section="item"][data-p-disabled="false"]'); + var order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index; + order > -1 && (this.focusedOptionIndex = links[order].getAttribute("id")); + }, "changeFocusedOptionIndex"), + toggle: /* @__PURE__ */ __name(function toggle3(event2) { + if (this.overlayVisible) this.hide(); + else this.show(event2); + }, "toggle"), + show: /* @__PURE__ */ __name(function show3(event2) { + this.overlayVisible = true; + this.target = event2.currentTarget; + }, "show"), + hide: /* @__PURE__ */ __name(function hide4() { + this.overlayVisible = false; + this.target = null; + }, "hide"), + onEnter: /* @__PURE__ */ __name(function onEnter3(el) { + addStyle(el, { + position: "absolute", + top: "0", + left: "0" + }); + this.alignOverlay(); + this.bindOutsideClickListener(); + this.bindResizeListener(); + this.bindScrollListener(); + if (this.autoZIndex) { + ZIndex.set("menu", el, this.baseZIndex + this.$primevue.config.zIndex.menu); + } + if (this.popup) { + focus(this.list); + } + this.$emit("show"); + }, "onEnter"), + onLeave: /* @__PURE__ */ __name(function onLeave3() { + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + this.unbindScrollListener(); + this.$emit("hide"); + }, "onLeave"), + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave3(el) { + if (this.autoZIndex) { + ZIndex.clear(el); + } + }, "onAfterLeave"), + alignOverlay: /* @__PURE__ */ __name(function alignOverlay3() { + absolutePosition(this.container, this.target); + var targetWidth = getOuterWidth(this.target); + if (targetWidth > getOuterWidth(this.container)) { + this.container.style.minWidth = getOuterWidth(this.target) + "px"; + } + }, "alignOverlay"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener5() { + var _this = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + var isOutsideContainer = _this.container && !_this.container.contains(event2.target); + var isOutsideTarget = !(_this.target && (_this.target === event2.target || _this.target.contains(event2.target))); + if (_this.overlayVisible && isOutsideContainer && isOutsideTarget) { + _this.hide(); + } else if (!_this.popup && isOutsideContainer && isOutsideTarget) { + _this.focusedOptionIndex = -1; + } + }; + document.addEventListener("click", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener5() { + if (this.outsideClickListener) { + document.removeEventListener("click", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener4() { + var _this2 = this; + if (!this.scrollHandler) { + this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function() { + if (_this2.overlayVisible) { + _this2.hide(); + } + }); + } + this.scrollHandler.bindScrollListener(); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener4() { + if (this.scrollHandler) { + this.scrollHandler.unbindScrollListener(); + } + }, "unbindScrollListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener4() { + var _this3 = this; + if (!this.resizeListener) { + this.resizeListener = function() { + if (_this3.overlayVisible && !isTouchDevice()) { + _this3.hide(); + } + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener4() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + visible: /* @__PURE__ */ __name(function visible3(item8) { + return typeof item8.visible === "function" ? item8.visible() : item8.visible !== false; + }, "visible"), + disabled: /* @__PURE__ */ __name(function disabled4(item8) { + return typeof item8.disabled === "function" ? item8.disabled() : item8.disabled; + }, "disabled"), + label: /* @__PURE__ */ __name(function label5(item8) { + return typeof item8.label === "function" ? item8.label() : item8.label; + }, "label"), + onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick3(event2) { + OverlayEventBus.emit("overlay-click", { + originalEvent: event2, + target: this.target + }); + }, "onOverlayClick"), + containerRef: /* @__PURE__ */ __name(function containerRef4(el) { + this.container = el; + }, "containerRef"), + listRef: /* @__PURE__ */ __name(function listRef(el) { + this.list = el; + }, "listRef") + }, + computed: { + focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId4() { + return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null; + }, "focusedOptionId") + }, + components: { + PVMenuitem: script$1$j, + Portal: script$1f + } +}; +var _hoisted_1$h = ["id"]; +var _hoisted_2$c = ["id", "tabindex", "aria-activedescendant", "aria-label", "aria-labelledby"]; +var _hoisted_3$9 = ["id"]; +function render$t(_ctx, _cache, $props, $setup, $data, $options) { + var _component_PVMenuitem = resolveComponent("PVMenuitem"); + var _component_Portal = resolveComponent("Portal"); + return openBlock(), createBlock(_component_Portal, { + appendTo: _ctx.appendTo, + disabled: !_ctx.popup + }, { + "default": withCtx(function() { + return [createVNode(Transition, mergeProps({ + name: "p-connected-overlay", + onEnter: $options.onEnter, + onLeave: $options.onLeave, + onAfterLeave: $options.onAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [(_ctx.popup ? $data.overlayVisible : true) ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.containerRef, + id: $data.id, + "class": _ctx.cx("root"), + onClick: _cache[3] || (_cache[3] = function() { + return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); + }) + }, _ctx.ptmi("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("start") + }, _ctx.ptm("start")), [renderSlot(_ctx.$slots, "start")], 16)) : createCommentVNode("", true), createBaseVNode("ul", mergeProps({ + ref: $options.listRef, + id: $data.id + "_list", + "class": _ctx.cx("list"), + role: "menu", + tabindex: _ctx.tabindex, + "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, + "aria-label": _ctx.ariaLabel, + "aria-labelledby": _ctx.ariaLabelledby, + onFocus: _cache[0] || (_cache[0] = function() { + return $options.onListFocus && $options.onListFocus.apply($options, arguments); + }), + onBlur: _cache[1] || (_cache[1] = function() { + return $options.onListBlur && $options.onListBlur.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onListKeyDown && $options.onListKeyDown.apply($options, arguments); + }) + }, _ctx.ptm("list")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function(item8, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.label(item8) + i.toString() + }, [item8.items && $options.visible(item8) && !item8.separator ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [item8.items ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + id: $data.id + "_" + i, + "class": [_ctx.cx("submenuLabel"), item8["class"]], + role: "none", + ref_for: true + }, _ctx.ptm("submenuLabel")), [renderSlot(_ctx.$slots, _ctx.$slots.submenulabel ? "submenulabel" : "submenuheader", { + item: item8 + }, function() { + return [createTextVNode(toDisplayString($options.label(item8)), 1)]; + })], 16, _hoisted_3$9)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(item8.items, function(child, j) { + return openBlock(), createElementBlock(Fragment, { + key: child.label + i + "_" + j + }, [$options.visible(child) && !child.separator ? (openBlock(), createBlock(_component_PVMenuitem, { + key: 0, + id: $data.id + "_" + i + "_" + j, + item: child, + templates: _ctx.$slots, + focusedOptionId: $options.focusedOptionId, + unstyled: _ctx.unstyled, + onItemClick: $options.itemClick, + onItemMousemove: $options.itemMouseMove, + pt: _ctx.pt + }, null, 8, ["id", "item", "templates", "focusedOptionId", "unstyled", "onItemClick", "onItemMousemove", "pt"])) : $options.visible(child) && child.separator ? (openBlock(), createElementBlock("li", mergeProps({ + key: "separator" + i + j, + "class": [_ctx.cx("separator"), item8["class"]], + style: child.style, + role: "separator", + ref_for: true + }, _ctx.ptm("separator")), null, 16)) : createCommentVNode("", true)], 64); + }), 128))], 64)) : $options.visible(item8) && item8.separator ? (openBlock(), createElementBlock("li", mergeProps({ + key: "separator" + i.toString(), + "class": [_ctx.cx("separator"), item8["class"]], + style: item8.style, + role: "separator", + ref_for: true + }, _ctx.ptm("separator")), null, 16)) : (openBlock(), createBlock(_component_PVMenuitem, { + key: $options.label(item8) + i.toString(), + id: $data.id + "_" + i, + item: item8, + index: i, + templates: _ctx.$slots, + focusedOptionId: $options.focusedOptionId, + unstyled: _ctx.unstyled, + onItemClick: $options.itemClick, + onItemMousemove: $options.itemMouseMove, + pt: _ctx.pt + }, null, 8, ["id", "item", "index", "templates", "focusedOptionId", "unstyled", "onItemClick", "onItemMousemove", "pt"]))], 64); + }), 128))], 16, _hoisted_2$c), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("end") + }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$h)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onLeave", "onAfterLeave"])]; + }), + _: 3 + }, 8, ["appendTo", "disabled"]); +} +__name(render$t, "render$t"); +script$x.render = render$t; +var theme$h = /* @__PURE__ */ __name(function theme23(_ref) { + var dt = _ref.dt; + return "\n.p-metergroup {\n display: flex;\n gap: ".concat(dt("metergroup.gap"), ";\n}\n\n.p-metergroup-meters {\n display: flex;\n background: ").concat(dt("metergroup.meters.background"), ";\n border-radius: ").concat(dt("metergroup.border.radius"), ";\n}\n\n.p-metergroup-label-list {\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.p-metergroup-label {\n display: inline-flex;\n align-items: center;\n gap: ").concat(dt("metergroup.label.gap"), ";\n}\n\n.p-metergroup-label-marker {\n display: inline-flex;\n width: ").concat(dt("metergroup.label.marker.size"), ";\n height: ").concat(dt("metergroup.label.marker.size"), ";\n border-radius: 100%;\n}\n\n.p-metergroup-label-icon {\n font-size: ").concat(dt("metergroup.label.icon.size"), ";\n width: ").concat(dt("metergroup.label.icon.size"), ";\n height: ").concat(dt("metergroup.label.icon.size"), ";\n}\n\n.p-metergroup-horizontal {\n flex-direction: column;\n}\n\n.p-metergroup-label-list-horizontal {\n gap: ").concat(dt("metergroup.label.list.horizontal.gap"), ";\n}\n\n.p-metergroup-horizontal .p-metergroup-meters {\n height: ").concat(dt("metergroup.meters.size"), ";\n}\n\n.p-metergroup-horizontal .p-metergroup-meter:first-of-type {\n border-start-start-radius: ").concat(dt("metergroup.border.radius"), ";\n border-end-start-radius: ").concat(dt("metergroup.border.radius"), ";\n}\n\n.p-metergroup-horizontal .p-metergroup-meter:last-of-type {\n border-start-end-radius: ").concat(dt("metergroup.border.radius"), ";\n border-end-end-radius: ").concat(dt("metergroup.border.radius"), ";\n}\n\n.p-metergroup-vertical {\n flex-direction: row;\n}\n\n.p-metergroup-label-list-vertical {\n flex-direction: column;\n gap: ").concat(dt("metergroup.label.list.vertical.gap"), ";\n}\n\n.p-metergroup-vertical .p-metergroup-meters {\n flex-direction: column;\n width: ").concat(dt("metergroup.meters.size"), ";\n height: 100%;\n}\n\n.p-metergroup-vertical .p-metergroup-label-list {\n align-items: flex-start;\n}\n\n.p-metergroup-vertical .p-metergroup-meter:first-of-type {\n border-start-start-radius: ").concat(dt("metergroup.border.radius"), ";\n border-start-end-radius: ").concat(dt("metergroup.border.radius"), ";\n}\n\n.p-metergroup-vertical .p-metergroup-meter:last-of-type {\n border-end-start-radius: ").concat(dt("metergroup.border.radius"), ";\n border-end-end-radius: ").concat(dt("metergroup.border.radius"), ";\n}\n"); +}, "theme"); +var classes$i = { + root: /* @__PURE__ */ __name(function root19(_ref2) { + var props = _ref2.props; + return ["p-metergroup p-component", { + "p-metergroup-horizontal": props.orientation === "horizontal", + "p-metergroup-vertical": props.orientation === "vertical" + }]; + }, "root"), + meters: "p-metergroup-meters", + meter: "p-metergroup-meter", + labelList: /* @__PURE__ */ __name(function labelList(_ref3) { + var props = _ref3.props; + return ["p-metergroup-label-list", { + "p-metergroup-label-list-vertical": props.labelOrientation === "vertical", + "p-metergroup-label-list-horizontal": props.labelOrientation === "horizontal" + }]; + }, "labelList"), + label: "p-metergroup-label", + labelIcon: "p-metergroup-label-icon", + labelMarker: "p-metergroup-label-marker", + labelText: "p-metergroup-label-text" +}; +var MeterGroupStyle = BaseStyle.extend({ + name: "metergroup", + theme: theme$h, + classes: classes$i +}); +var script$2$3 = { + name: "MeterGroup", + "extends": script$1d, + props: { + value: { + type: Array, + "default": null + }, + min: { + type: Number, + "default": 0 + }, + max: { + type: Number, + "default": 100 + }, + orientation: { + type: String, + "default": "horizontal" + }, + labelPosition: { + type: String, + "default": "end" + }, + labelOrientation: { + type: String, + "default": "horizontal" + } + }, + style: MeterGroupStyle, + provide: /* @__PURE__ */ __name(function provide33() { + return { + $pcMeterGroup: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$i = { + name: "MeterGroupLabel", + hostName: "MeterGroup", + "extends": script$1d, + inheritAttrs: false, + props: { + value: { + type: Array, + "default": null + }, + labelPosition: { + type: String, + "default": "end" + }, + labelOrientation: { + type: String, + "default": "horizontal" + } + } +}; +function render$1$3(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("ol", mergeProps({ + "class": _ctx.cx("labelList") + }, _ctx.ptm("labelList")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.value, function(val, index) { + return openBlock(), createElementBlock("li", mergeProps({ + key: index + "_label", + "class": _ctx.cx("label"), + ref_for: true + }, _ctx.ptm("label")), [renderSlot(_ctx.$slots, "icon", { + value: val, + "class": normalizeClass(_ctx.cx("labelIcon")) + }, function() { + return [val.icon ? (openBlock(), createElementBlock("i", mergeProps({ + key: 0, + "class": [val.icon, _ctx.cx("labelIcon")], + style: { + color: val.color + }, + ref_for: true + }, _ctx.ptm("labelIcon")), null, 16)) : (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": _ctx.cx("labelMarker"), + style: { + backgroundColor: val.color + }, + ref_for: true + }, _ctx.ptm("labelMarker")), null, 16))]; + }), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("labelText"), + ref_for: true + }, _ctx.ptm("labelText")), toDisplayString(val.label) + " (" + toDisplayString(_ctx.$parentInstance.percentValue(val.value)) + ")", 17)], 16); + }), 128))], 16); +} +__name(render$1$3, "render$1$3"); +script$1$i.render = render$1$3; +var script$w = { + name: "MeterGroup", + "extends": script$2$3, + inheritAttrs: false, + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions5(key, value2, index) { + return this.ptm(key, { + context: { + value: value2, + index + } + }); + }, "getPTOptions"), + percent: /* @__PURE__ */ __name(function percent() { + var meter = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + var percentOfItem = (meter - this.min) / (this.max - this.min) * 100; + return Math.round(Math.max(0, Math.min(100, percentOfItem))); + }, "percent"), + percentValue: /* @__PURE__ */ __name(function percentValue(meter) { + return this.percent(meter) + "%"; + }, "percentValue"), + meterCalculatedStyles: /* @__PURE__ */ __name(function meterCalculatedStyles(val) { + return { + backgroundColor: val.color, + width: this.orientation === "horizontal" && this.percentValue(val.value), + height: this.orientation === "vertical" && this.percentValue(val.value) + }; + }, "meterCalculatedStyles") + }, + computed: { + totalPercent: /* @__PURE__ */ __name(function totalPercent() { + return this.percent(this.value.reduce(function(total, val) { + return total + val.value; + }, 0)); + }, "totalPercent"), + percentages: /* @__PURE__ */ __name(function percentages() { + var sum = 0; + var sumsArray = []; + this.value.forEach(function(item8) { + sum += item8.value; + sumsArray.push(sum); + }); + return sumsArray; + }, "percentages") + }, + components: { + MeterGroupLabel: script$1$i + } +}; +var _hoisted_1$g = ["aria-valuemin", "aria-valuemax", "aria-valuenow"]; +function render$s(_ctx, _cache, $props, $setup, $data, $options) { + var _component_MeterGroupLabel = resolveComponent("MeterGroupLabel"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + role: "meter", + "aria-valuemin": _ctx.min, + "aria-valuemax": _ctx.max, + "aria-valuenow": $options.totalPercent + }, _ctx.ptmi("root")), [_ctx.labelPosition === "start" ? renderSlot(_ctx.$slots, "label", { + key: 0, + value: _ctx.value, + totalPercent: $options.totalPercent, + percentages: $options.percentages + }, function() { + return [createVNode(_component_MeterGroupLabel, { + value: _ctx.value, + labelPosition: _ctx.labelPosition, + labelOrientation: _ctx.labelOrientation, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["value", "labelPosition", "labelOrientation", "unstyled", "pt"])]; + }) : createCommentVNode("", true), renderSlot(_ctx.$slots, "start", { + value: _ctx.value, + totalPercent: $options.totalPercent, + percentages: $options.percentages + }), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("meters") + }, _ctx.ptm("meters")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.value, function(val, index) { + return renderSlot(_ctx.$slots, "meter", { + key: index, + value: val, + index, + "class": normalizeClass(_ctx.cx("meter")), + orientation: _ctx.orientation, + size: $options.percentValue(val.value), + totalPercent: $options.totalPercent + }, function() { + return [$options.percent(val.value) ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.cx("meter"), + style: $options.meterCalculatedStyles(val), + ref_for: true + }, $options.getPTOptions("meter", val, index)), null, 16)) : createCommentVNode("", true)]; + }); + }), 128))], 16), renderSlot(_ctx.$slots, "end", { + value: _ctx.value, + totalPercent: $options.totalPercent, + percentages: $options.percentages + }), _ctx.labelPosition === "end" ? renderSlot(_ctx.$slots, "label", { + key: 1, + value: _ctx.value, + totalPercent: $options.totalPercent, + percentages: $options.percentages + }, function() { + return [createVNode(_component_MeterGroupLabel, { + value: _ctx.value, + labelPosition: _ctx.labelPosition, + labelOrientation: _ctx.labelOrientation, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["value", "labelPosition", "labelOrientation", "unstyled", "pt"])]; + }) : createCommentVNode("", true)], 16, _hoisted_1$g); +} +__name(render$s, "render$s"); +script$w.render = render$s; +var theme$g = /* @__PURE__ */ __name(function theme24(_ref) { + var dt = _ref.dt; + return "\n.p-multiselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n background: ".concat(dt("multiselect.background"), ";\n border: 1px solid ").concat(dt("multiselect.border.color"), ";\n transition: background ").concat(dt("multiselect.transition.duration"), ", color ").concat(dt("multiselect.transition.duration"), ", border-color ").concat(dt("multiselect.transition.duration"), ", outline-color ").concat(dt("multiselect.transition.duration"), ", box-shadow ").concat(dt("multiselect.transition.duration"), ";\n border-radius: ").concat(dt("multiselect.border.radius"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("multiselect.shadow"), ";\n}\n\n.p-multiselect:not(.p-disabled):hover {\n border-color: ").concat(dt("multiselect.hover.border.color"), ";\n}\n\n.p-multiselect:not(.p-disabled).p-focus {\n border-color: ").concat(dt("multiselect.focus.border.color"), ";\n box-shadow: ").concat(dt("multiselect.focus.ring.shadow"), ";\n outline: ").concat(dt("multiselect.focus.ring.width"), " ").concat(dt("multiselect.focus.ring.style"), " ").concat(dt("multiselect.focus.ring.color"), ";\n outline-offset: ").concat(dt("multiselect.focus.ring.offset"), ";\n}\n\n.p-multiselect.p-variant-filled {\n background: ").concat(dt("multiselect.filled.background"), ";\n}\n\n.p-multiselect.p-variant-filled:not(.p-disabled):hover {\n background: ").concat(dt("multiselect.filled.hover.background"), ";\n}\n\n.p-multiselect.p-variant-filled.p-focus {\n background: ").concat(dt("multiselect.filled.focus.background"), ";\n}\n\n.p-multiselect.p-invalid {\n border-color: ").concat(dt("multiselect.invalid.border.color"), ";\n}\n\n.p-multiselect.p-disabled {\n opacity: 1;\n background: ").concat(dt("multiselect.disabled.background"), ";\n}\n\n.p-multiselect-dropdown {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n color: ").concat(dt("multiselect.dropdown.color"), ";\n width: ").concat(dt("multiselect.dropdown.width"), ";\n border-start-end-radius: ").concat(dt("multiselect.border.radius"), ";\n border-end-end-radius: ").concat(dt("multiselect.border.radius"), ";\n}\n\n.p-multiselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n color: ").concat(dt("multiselect.clear.icon.color"), ";\n inset-inline-end: ").concat(dt("multiselect.dropdown.width"), ";\n}\n\n.p-multiselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n}\n\n.p-multiselect-label {\n display: flex;\n align-items: center;\n gap: calc(").concat(dt("multiselect.padding.y"), " / 2);\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: ").concat(dt("multiselect.padding.y"), " ").concat(dt("multiselect.padding.x"), ";\n color: ").concat(dt("multiselect.color"), ";\n}\n\n.p-multiselect-label.p-placeholder {\n color: ").concat(dt("multiselect.placeholder.color"), ";\n}\n\n.p-multiselect.p-invalid .p-multiselect-label.p-placeholder {\n color: ").concat(dt("multiselect.invalid.placeholder.color"), ";\n}\n\n.p-multiselect.p-disabled .p-multiselect-label {\n color: ").concat(dt("multiselect.disabled.color"), ";\n}\n\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n\n.p-multiselect .p-multiselect-overlay {\n min-width: 100%;\n}\n\n.p-multiselect-overlay {\n position: absolute;\n top: 0;\n left: 0;\n background: ").concat(dt("multiselect.overlay.background"), ";\n color: ").concat(dt("multiselect.overlay.color"), ";\n border: 1px solid ").concat(dt("multiselect.overlay.border.color"), ";\n border-radius: ").concat(dt("multiselect.overlay.border.radius"), ";\n box-shadow: ").concat(dt("multiselect.overlay.shadow"), ";\n}\n\n.p-multiselect-header {\n display: flex;\n align-items: center;\n padding: ").concat(dt("multiselect.list.header.padding"), ";\n}\n\n.p-multiselect-header .p-checkbox {\n margin-inline-end: ").concat(dt("multiselect.option.gap"), ";\n}\n\n.p-multiselect-filter-container {\n flex: 1 1 auto;\n}\n\n.p-multiselect-filter {\n width: 100%;\n}\n\n.p-multiselect-list-container {\n overflow: auto;\n}\n\n.p-multiselect-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n padding: ").concat(dt("multiselect.list.padding"), ";\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("multiselect.list.gap"), ";\n}\n\n.p-multiselect-option {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n gap: ").concat(dt("multiselect.option.gap"), ";\n padding: ").concat(dt("multiselect.option.padding"), ";\n border: 0 none;\n color: ").concat(dt("multiselect.option.color"), ";\n background: transparent;\n transition: background ").concat(dt("multiselect.transition.duration"), ", color ").concat(dt("multiselect.transition.duration"), ", border-color ").concat(dt("multiselect.transition.duration"), ", box-shadow ").concat(dt("multiselect.transition.duration"), ", outline-color ").concat(dt("multiselect.transition.duration"), ";\n border-radius: ").concat(dt("multiselect.option.border.radius"), ";\n}\n\n.p-multiselect-option:not(.p-multiselect-option-selected):not(.p-disabled).p-focus {\n background: ").concat(dt("multiselect.option.focus.background"), ";\n color: ").concat(dt("multiselect.option.focus.color"), ";\n}\n\n.p-multiselect-option.p-multiselect-option-selected {\n background: ").concat(dt("multiselect.option.selected.background"), ";\n color: ").concat(dt("multiselect.option.selected.color"), ";\n}\n\n.p-multiselect-option.p-multiselect-option-selected.p-focus {\n background: ").concat(dt("multiselect.option.selected.focus.background"), ";\n color: ").concat(dt("multiselect.option.selected.focus.color"), ";\n}\n\n.p-multiselect-option-group {\n cursor: auto;\n margin: 0;\n padding: ").concat(dt("multiselect.option.group.padding"), ";\n background: ").concat(dt("multiselect.option.group.background"), ";\n color: ").concat(dt("multiselect.option.group.color"), ";\n font-weight: ").concat(dt("multiselect.option.group.font.weight"), ";\n}\n\n.p-multiselect-empty-message {\n padding: ").concat(dt("multiselect.empty.message.padding"), ";\n}\n\n.p-multiselect-label .p-chip {\n padding-block-start: calc(").concat(dt("multiselect.padding.y"), " / 2);\n padding-block-end: calc(").concat(dt("multiselect.padding.y"), " / 2);\n border-radius: ").concat(dt("multiselect.chip.border.radius"), ";\n}\n\n.p-multiselect-label:has(.p-chip) {\n padding: calc(").concat(dt("multiselect.padding.y"), " / 2) calc(").concat(dt("multiselect.padding.x"), " / 2);\n}\n\n.p-multiselect-fluid {\n display: flex;\n width: 100%;\n}\n\n.p-multiselect-sm .p-multiselect-label {\n font-size: ").concat(dt("multiselect.sm.font.size"), ";\n padding-block: ").concat(dt("multiselect.sm.padding.y"), ";\n padding-inline: ").concat(dt("multiselect.sm.padding.x"), ";\n}\n\n.p-multiselect-sm .p-multiselect-dropdown .p-icon {\n font-size: ").concat(dt("multiselect.sm.font.size"), ";\n width: ").concat(dt("multiselect.sm.font.size"), ";\n height: ").concat(dt("multiselect.sm.font.size"), ";\n}\n\n.p-multiselect-lg .p-multiselect-label {\n font-size: ").concat(dt("multiselect.lg.font.size"), ";\n padding-block: ").concat(dt("multiselect.lg.padding.y"), ";\n padding-inline: ").concat(dt("multiselect.lg.padding.x"), ";\n}\n\n.p-multiselect-lg .p-multiselect-dropdown .p-icon {\n font-size: ").concat(dt("multiselect.lg.font.size"), ";\n width: ").concat(dt("multiselect.lg.font.size"), ";\n height: ").concat(dt("multiselect.lg.font.size"), ";\n}\n"); +}, "theme"); +var inlineStyles$5 = { + root: /* @__PURE__ */ __name(function root20(_ref2) { + var props = _ref2.props; + return { + position: props.appendTo === "self" ? "relative" : void 0 + }; + }, "root") +}; +var classes$h = { + root: /* @__PURE__ */ __name(function root21(_ref3) { + var instance = _ref3.instance, props = _ref3.props; + return ["p-multiselect p-component p-inputwrapper", { + "p-multiselect-display-chip": props.display === "chip", + "p-disabled": props.disabled, + "p-invalid": instance.$invalid, + "p-variant-filled": instance.$variant === "filled", + "p-focus": instance.focused, + "p-inputwrapper-filled": instance.$filled, + "p-inputwrapper-focus": instance.focused || instance.overlayVisible, + "p-multiselect-open": instance.overlayVisible, + "p-multiselect-fluid": instance.$fluid, + "p-multiselect-sm p-inputfield-sm": props.size === "small", + "p-multiselect-lg p-inputfield-lg": props.size === "large" + }]; + }, "root"), + labelContainer: "p-multiselect-label-container", + label: /* @__PURE__ */ __name(function label6(_ref4) { + var instance = _ref4.instance, props = _ref4.props; + return ["p-multiselect-label", { + "p-placeholder": instance.label === props.placeholder, + "p-multiselect-label-empty": !props.placeholder && (!props.modelValue || props.modelValue.length === 0) + }]; + }, "label"), + clearIcon: "p-multiselect-clear-icon", + chipItem: "p-multiselect-chip-item", + pcChip: "p-multiselect-chip", + chipIcon: "p-multiselect-chip-icon", + dropdown: "p-multiselect-dropdown", + loadingIcon: "p-multiselect-loading-icon", + dropdownIcon: "p-multiselect-dropdown-icon", + overlay: "p-multiselect-overlay p-component", + header: "p-multiselect-header", + pcFilterContainer: "p-multiselect-filter-container", + pcFilter: "p-multiselect-filter", + listContainer: "p-multiselect-list-container", + list: "p-multiselect-list", + optionGroup: "p-multiselect-option-group", + option: /* @__PURE__ */ __name(function option2(_ref5) { + var instance = _ref5.instance, _option = _ref5.option, index = _ref5.index, getItemOptions = _ref5.getItemOptions, props = _ref5.props; + return ["p-multiselect-option", { + "p-multiselect-option-selected": instance.isSelected(_option) && props.highlightOnSelect, + "p-focus": instance.focusedOptionIndex === instance.getOptionIndex(index, getItemOptions), + "p-disabled": instance.isOptionDisabled(_option) + }]; + }, "option"), + emptyMessage: "p-multiselect-empty-message" +}; +var MultiSelectStyle = BaseStyle.extend({ + name: "multiselect", + theme: theme$g, + classes: classes$h, + inlineStyles: inlineStyles$5 +}); +var script$1$h = { + name: "BaseMultiSelect", + "extends": script$1n, + props: { + options: Array, + optionLabel: null, + optionValue: null, + optionDisabled: null, + optionGroupLabel: null, + optionGroupChildren: null, + scrollHeight: { + type: String, + "default": "14rem" + }, + placeholder: String, + inputId: { + type: String, + "default": null + }, + panelClass: { + type: String, + "default": null + }, + panelStyle: { + type: null, + "default": null + }, + overlayClass: { + type: String, + "default": null + }, + overlayStyle: { + type: null, + "default": null + }, + dataKey: null, + showClear: { + type: Boolean, + "default": false + }, + clearIcon: { + type: String, + "default": void 0 + }, + resetFilterOnClear: { + type: Boolean, + "default": false + }, + filter: Boolean, + filterPlaceholder: String, + filterLocale: String, + filterMatchMode: { + type: String, + "default": "contains" + }, + filterFields: { + type: Array, + "default": null + }, + appendTo: { + type: [String, Object], + "default": "body" + }, + display: { + type: String, + "default": "comma" + }, + selectedItemsLabel: { + type: String, + "default": null + }, + maxSelectedLabels: { + type: Number, + "default": null + }, + selectionLimit: { + type: Number, + "default": null + }, + showToggleAll: { + type: Boolean, + "default": true + }, + loading: { + type: Boolean, + "default": false + }, + checkboxIcon: { + type: String, + "default": void 0 + }, + dropdownIcon: { + type: String, + "default": void 0 + }, + filterIcon: { + type: String, + "default": void 0 + }, + loadingIcon: { + type: String, + "default": void 0 + }, + removeTokenIcon: { + type: String, + "default": void 0 + }, + chipIcon: { + type: String, + "default": void 0 + }, + selectAll: { + type: Boolean, + "default": null + }, + resetFilterOnHide: { + type: Boolean, + "default": false + }, + virtualScrollerOptions: { + type: Object, + "default": null + }, + autoOptionFocus: { + type: Boolean, + "default": false + }, + autoFilterFocus: { + type: Boolean, + "default": false + }, + focusOnHover: { + type: Boolean, + "default": true + }, + highlightOnSelect: { + type: Boolean, + "default": false + }, + filterMessage: { + type: String, + "default": null + }, + selectionMessage: { + type: String, + "default": null + }, + emptySelectionMessage: { + type: String, + "default": null + }, + emptyFilterMessage: { + type: String, + "default": null + }, + emptyMessage: { + type: String, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + }, + ariaLabel: { + type: String, + "default": null + }, + ariaLabelledby: { + type: String, + "default": null + } + }, + style: MultiSelectStyle, + provide: /* @__PURE__ */ __name(function provide34() { + return { + $pcMultiSelect: this, + $parentInstance: this + }; + }, "provide") +}; +function _typeof$1$2(o) { + "@babel/helpers - typeof"; + return _typeof$1$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$1$2(o); +} +__name(_typeof$1$2, "_typeof$1$2"); +function ownKeys$d(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$d, "ownKeys$d"); +function _objectSpread$d(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$d(Object(t2), true).forEach(function(r2) { + _defineProperty$1$2(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$d(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$d, "_objectSpread$d"); +function _defineProperty$1$2(e, r, t2) { + return (r = _toPropertyKey$1$2(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$1$2, "_defineProperty$1$2"); +function _toPropertyKey$1$2(t2) { + var i = _toPrimitive$1$2(t2, "string"); + return "symbol" == _typeof$1$2(i) ? i : i + ""; +} +__name(_toPropertyKey$1$2, "_toPropertyKey$1$2"); +function _toPrimitive$1$2(t2, r) { + if ("object" != _typeof$1$2(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$1$2(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$1$2, "_toPrimitive$1$2"); +function _toConsumableArray$6(r) { + return _arrayWithoutHoles$6(r) || _iterableToArray$6(r) || _unsupportedIterableToArray$7(r) || _nonIterableSpread$6(); +} +__name(_toConsumableArray$6, "_toConsumableArray$6"); +function _nonIterableSpread$6() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$6, "_nonIterableSpread$6"); +function _unsupportedIterableToArray$7(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$7(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$7(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$7, "_unsupportedIterableToArray$7"); +function _iterableToArray$6(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$6, "_iterableToArray$6"); +function _arrayWithoutHoles$6(r) { + if (Array.isArray(r)) return _arrayLikeToArray$7(r); +} +__name(_arrayWithoutHoles$6, "_arrayWithoutHoles$6"); +function _arrayLikeToArray$7(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$7, "_arrayLikeToArray$7"); +var script$v = { + name: "MultiSelect", + "extends": script$1$h, + inheritAttrs: false, + emits: ["change", "focus", "blur", "before-show", "before-hide", "show", "hide", "filter", "selectall-change"], + inject: { + $pcFluid: { + "default": null + } + }, + outsideClickListener: null, + scrollHandler: null, + resizeListener: null, + overlay: null, + list: null, + virtualScroller: null, + startRangeIndex: -1, + searchTimeout: null, + searchValue: "", + selectOnFocus: false, + data: /* @__PURE__ */ __name(function data22() { + return { + id: this.$attrs.id, + clicked: false, + focused: false, + focusedOptionIndex: -1, + filterValue: null, + overlayVisible: false + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId7(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + options: /* @__PURE__ */ __name(function options2() { + this.autoUpdateModel(); + }, "options") + }, + mounted: /* @__PURE__ */ __name(function mounted23() { + this.id = this.id || UniqueComponentId(); + this.autoUpdateModel(); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount10() { + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + if (this.scrollHandler) { + this.scrollHandler.destroy(); + this.scrollHandler = null; + } + if (this.overlay) { + ZIndex.clear(this.overlay); + this.overlay = null; + } + }, "beforeUnmount"), + methods: { + getOptionIndex: /* @__PURE__ */ __name(function getOptionIndex(index, fn) { + return this.virtualScrollerDisabled ? index : fn && fn(index)["index"]; + }, "getOptionIndex"), + getOptionLabel: /* @__PURE__ */ __name(function getOptionLabel3(option4) { + return this.optionLabel ? resolveFieldData(option4, this.optionLabel) : option4; + }, "getOptionLabel"), + getOptionValue: /* @__PURE__ */ __name(function getOptionValue3(option4) { + return this.optionValue ? resolveFieldData(option4, this.optionValue) : option4; + }, "getOptionValue"), + getOptionRenderKey: /* @__PURE__ */ __name(function getOptionRenderKey(option4, index) { + return this.dataKey ? resolveFieldData(option4, this.dataKey) : this.getOptionLabel(option4) + "_".concat(index); + }, "getOptionRenderKey"), + getHeaderCheckboxPTOptions: /* @__PURE__ */ __name(function getHeaderCheckboxPTOptions(key) { + return this.ptm(key, { + context: { + selected: this.allSelected + } + }); + }, "getHeaderCheckboxPTOptions"), + getCheckboxPTOptions: /* @__PURE__ */ __name(function getCheckboxPTOptions(option4, itemOptions, index, key) { + return this.ptm(key, { + context: { + selected: this.isSelected(option4), + focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions), + disabled: this.isOptionDisabled(option4) + } + }); + }, "getCheckboxPTOptions"), + isOptionDisabled: /* @__PURE__ */ __name(function isOptionDisabled3(option4) { + if (this.maxSelectionLimitReached && !this.isSelected(option4)) { + return true; + } + return this.optionDisabled ? resolveFieldData(option4, this.optionDisabled) : false; + }, "isOptionDisabled"), + isOptionGroup: /* @__PURE__ */ __name(function isOptionGroup3(option4) { + return this.optionGroupLabel && option4.optionGroup && option4.group; + }, "isOptionGroup"), + getOptionGroupLabel: /* @__PURE__ */ __name(function getOptionGroupLabel3(optionGroup) { + return resolveFieldData(optionGroup, this.optionGroupLabel); + }, "getOptionGroupLabel"), + getOptionGroupChildren: /* @__PURE__ */ __name(function getOptionGroupChildren3(optionGroup) { + return resolveFieldData(optionGroup, this.optionGroupChildren); + }, "getOptionGroupChildren"), + getAriaPosInset: /* @__PURE__ */ __name(function getAriaPosInset2(index) { + var _this = this; + return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(function(option4) { + return _this.isOptionGroup(option4); + }).length : index) + 1; + }, "getAriaPosInset"), + show: /* @__PURE__ */ __name(function show4(isFocus) { + this.$emit("before-show"); + this.overlayVisible = true; + this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex(); + isFocus && focus(this.$refs.focusInput); + }, "show"), + hide: /* @__PURE__ */ __name(function hide5(isFocus) { + var _this2 = this; + var _hide = /* @__PURE__ */ __name(function _hide2() { + _this2.$emit("before-hide"); + _this2.overlayVisible = false; + _this2.clicked = false; + _this2.focusedOptionIndex = -1; + _this2.searchValue = ""; + _this2.resetFilterOnHide && (_this2.filterValue = null); + isFocus && focus(_this2.$refs.focusInput); + }, "_hide"); + setTimeout(function() { + _hide(); + }, 0); + }, "hide"), + onFocus: /* @__PURE__ */ __name(function onFocus9(event2) { + if (this.disabled) { + return; + } + this.focused = true; + if (this.overlayVisible) { + this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex(); + this.scrollInView(this.focusedOptionIndex); + } + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur9(event2) { + var _this$formField$onBlu, _this$formField; + this.clicked = false; + this.focused = false; + this.focusedOptionIndex = -1; + this.searchValue = ""; + this.$emit("blur", event2); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField); + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown9(event2) { + var _this3 = this; + if (this.disabled) { + event2.preventDefault(); + return; + } + var metaKey = event2.metaKey || event2.ctrlKey; + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "PageDown": + this.onPageDownKey(event2); + break; + case "PageUp": + this.onPageUpKey(event2); + break; + case "Enter": + case "NumpadEnter": + case "Space": + this.onEnterKey(event2); + break; + case "Escape": + this.onEscapeKey(event2); + break; + case "Tab": + this.onTabKey(event2); + break; + case "ShiftLeft": + case "ShiftRight": + this.onShiftKey(event2); + break; + default: + if (event2.code === "KeyA" && metaKey) { + var value2 = this.visibleOptions.filter(function(option4) { + return _this3.isValidOption(option4); + }).map(function(option4) { + return _this3.getOptionValue(option4); + }); + this.updateModel(event2, value2); + event2.preventDefault(); + break; + } + if (!metaKey && isPrintableCharacter(event2.key)) { + !this.overlayVisible && this.show(); + this.searchOptions(event2); + event2.preventDefault(); + } + break; + } + this.clicked = false; + }, "onKeyDown"), + onContainerClick: /* @__PURE__ */ __name(function onContainerClick2(event2) { + if (this.disabled || this.loading) { + return; + } + if (event2.target.tagName === "INPUT" || event2.target.getAttribute("data-pc-section") === "clearicon" || event2.target.closest('[data-pc-section="clearicon"]')) { + return; + } else if (!this.overlay || !this.overlay.contains(event2.target)) { + this.overlayVisible ? this.hide(true) : this.show(true); + } + this.clicked = true; + }, "onContainerClick"), + onClearClick: /* @__PURE__ */ __name(function onClearClick2(event2) { + this.updateModel(event2, null); + this.resetFilterOnClear && (this.filterValue = null); + }, "onClearClick"), + onFirstHiddenFocus: /* @__PURE__ */ __name(function onFirstHiddenFocus(event2) { + var focusableEl = event2.relatedTarget === this.$refs.focusInput ? getFirstFocusableElement(this.overlay, ':not([data-p-hidden-focusable="true"])') : this.$refs.focusInput; + focus(focusableEl); + }, "onFirstHiddenFocus"), + onLastHiddenFocus: /* @__PURE__ */ __name(function onLastHiddenFocus(event2) { + var focusableEl = event2.relatedTarget === this.$refs.focusInput ? getLastFocusableElement(this.overlay, ':not([data-p-hidden-focusable="true"])') : this.$refs.focusInput; + focus(focusableEl); + }, "onLastHiddenFocus"), + onOptionSelect: /* @__PURE__ */ __name(function onOptionSelect2(event2, option4) { + var _this4 = this; + var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; + var isFocus = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false; + if (this.disabled || this.isOptionDisabled(option4)) { + return; + } + var selected3 = this.isSelected(option4); + var value2 = null; + if (selected3) value2 = this.d_value.filter(function(val) { + return !equals(val, _this4.getOptionValue(option4), _this4.equalityKey); + }); + else value2 = [].concat(_toConsumableArray$6(this.d_value || []), [this.getOptionValue(option4)]); + this.updateModel(event2, value2); + index !== -1 && (this.focusedOptionIndex = index); + isFocus && focus(this.$refs.focusInput); + }, "onOptionSelect"), + onOptionMouseMove: /* @__PURE__ */ __name(function onOptionMouseMove3(event2, index) { + if (this.focusOnHover) { + this.changeFocusedOptionIndex(event2, index); + } + }, "onOptionMouseMove"), + onOptionSelectRange: /* @__PURE__ */ __name(function onOptionSelectRange(event2) { + var _this5 = this; + var start = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1; + var end = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; + start === -1 && (start = this.findNearestSelectedOptionIndex(end, true)); + end === -1 && (end = this.findNearestSelectedOptionIndex(start)); + if (start !== -1 && end !== -1) { + var rangeStart = Math.min(start, end); + var rangeEnd = Math.max(start, end); + var value2 = this.visibleOptions.slice(rangeStart, rangeEnd + 1).filter(function(option4) { + return _this5.isValidOption(option4); + }).map(function(option4) { + return _this5.getOptionValue(option4); + }); + this.updateModel(event2, value2); + } + }, "onOptionSelectRange"), + onFilterChange: /* @__PURE__ */ __name(function onFilterChange(event2) { + var value2 = event2.target.value; + this.filterValue = value2; + this.focusedOptionIndex = -1; + this.$emit("filter", { + originalEvent: event2, + value: value2 + }); + !this.virtualScrollerDisabled && this.virtualScroller.scrollToIndex(0); + }, "onFilterChange"), + onFilterKeyDown: /* @__PURE__ */ __name(function onFilterKeyDown(event2) { + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2, true); + break; + case "ArrowLeft": + case "ArrowRight": + this.onArrowLeftKey(event2, true); + break; + case "Home": + this.onHomeKey(event2, true); + break; + case "End": + this.onEndKey(event2, true); + break; + case "Enter": + case "NumpadEnter": + this.onEnterKey(event2); + break; + case "Escape": + this.onEscapeKey(event2); + break; + case "Tab": + this.onTabKey(event2, true); + break; + } + }, "onFilterKeyDown"), + onFilterBlur: /* @__PURE__ */ __name(function onFilterBlur() { + this.focusedOptionIndex = -1; + }, "onFilterBlur"), + onFilterUpdated: /* @__PURE__ */ __name(function onFilterUpdated() { + if (this.overlayVisible) { + this.alignOverlay(); + } + }, "onFilterUpdated"), + onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick4(event2) { + OverlayEventBus.emit("overlay-click", { + originalEvent: event2, + target: this.$el + }); + }, "onOverlayClick"), + onOverlayKeyDown: /* @__PURE__ */ __name(function onOverlayKeyDown3(event2) { + switch (event2.code) { + case "Escape": + this.onEscapeKey(event2); + break; + } + }, "onOverlayKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey6(event2) { + if (!this.overlayVisible) { + this.show(); + } else { + var optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex(); + if (event2.shiftKey) { + this.onOptionSelectRange(event2, this.startRangeIndex, optionIndex); + } + this.changeFocusedOptionIndex(event2, optionIndex); + } + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey6(event2) { + var pressedInInputText = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + if (event2.altKey && !pressedInInputText) { + if (this.focusedOptionIndex !== -1) { + this.onOptionSelect(event2, this.visibleOptions[this.focusedOptionIndex]); + } + this.overlayVisible && this.hide(); + event2.preventDefault(); + } else { + var optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex(); + if (event2.shiftKey) { + this.onOptionSelectRange(event2, optionIndex, this.startRangeIndex); + } + this.changeFocusedOptionIndex(event2, optionIndex); + !this.overlayVisible && this.show(); + event2.preventDefault(); + } + }, "onArrowUpKey"), + onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey3(event2) { + var pressedInInputText = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + pressedInInputText && (this.focusedOptionIndex = -1); + }, "onArrowLeftKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey6(event2) { + var pressedInInputText = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + if (pressedInInputText) { + var target = event2.currentTarget; + if (event2.shiftKey) { + target.setSelectionRange(0, event2.target.selectionStart); + } else { + target.setSelectionRange(0, 0); + this.focusedOptionIndex = -1; + } + } else { + var metaKey = event2.metaKey || event2.ctrlKey; + var optionIndex = this.findFirstOptionIndex(); + if (event2.shiftKey && metaKey) { + this.onOptionSelectRange(event2, optionIndex, this.startRangeIndex); + } + this.changeFocusedOptionIndex(event2, optionIndex); + !this.overlayVisible && this.show(); + } + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey6(event2) { + var pressedInInputText = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + if (pressedInInputText) { + var target = event2.currentTarget; + if (event2.shiftKey) { + target.setSelectionRange(event2.target.selectionStart, target.value.length); + } else { + var len = target.value.length; + target.setSelectionRange(len, len); + this.focusedOptionIndex = -1; + } + } else { + var metaKey = event2.metaKey || event2.ctrlKey; + var optionIndex = this.findLastOptionIndex(); + if (event2.shiftKey && metaKey) { + this.onOptionSelectRange(event2, this.startRangeIndex, optionIndex); + } + this.changeFocusedOptionIndex(event2, optionIndex); + !this.overlayVisible && this.show(); + } + event2.preventDefault(); + }, "onEndKey"), + onPageUpKey: /* @__PURE__ */ __name(function onPageUpKey(event2) { + this.scrollInView(0); + event2.preventDefault(); + }, "onPageUpKey"), + onPageDownKey: /* @__PURE__ */ __name(function onPageDownKey(event2) { + this.scrollInView(this.visibleOptions.length - 1); + event2.preventDefault(); + }, "onPageDownKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey5(event2) { + if (!this.overlayVisible) { + this.focusedOptionIndex = -1; + this.onArrowDownKey(event2); + } else { + if (this.focusedOptionIndex !== -1) { + if (event2.shiftKey) this.onOptionSelectRange(event2, this.focusedOptionIndex); + else this.onOptionSelect(event2, this.visibleOptions[this.focusedOptionIndex]); + } + } + event2.preventDefault(); + }, "onEnterKey"), + onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey3(event2) { + this.overlayVisible && this.hide(true); + event2.preventDefault(); + }, "onEscapeKey"), + onTabKey: /* @__PURE__ */ __name(function onTabKey3(event2) { + var pressedInInputText = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + if (!pressedInInputText) { + if (this.overlayVisible && this.hasFocusableElements()) { + focus(event2.shiftKey ? this.$refs.lastHiddenFocusableElementOnOverlay : this.$refs.firstHiddenFocusableElementOnOverlay); + event2.preventDefault(); + } else { + if (this.focusedOptionIndex !== -1) { + this.onOptionSelect(event2, this.visibleOptions[this.focusedOptionIndex]); + } + this.overlayVisible && this.hide(this.filter); + } + } + }, "onTabKey"), + onShiftKey: /* @__PURE__ */ __name(function onShiftKey() { + this.startRangeIndex = this.focusedOptionIndex; + }, "onShiftKey"), + onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter3(el) { + ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); + addStyle(el, { + position: "absolute", + top: "0", + left: "0" + }); + this.alignOverlay(); + this.scrollInView(); + this.autoFilterFocus && focus(this.$refs.filterInput.$el); + }, "onOverlayEnter"), + onOverlayAfterEnter: /* @__PURE__ */ __name(function onOverlayAfterEnter2() { + this.bindOutsideClickListener(); + this.bindScrollListener(); + this.bindResizeListener(); + this.$emit("show"); + }, "onOverlayAfterEnter"), + onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave3() { + this.unbindOutsideClickListener(); + this.unbindScrollListener(); + this.unbindResizeListener(); + this.$emit("hide"); + this.overlay = null; + }, "onOverlayLeave"), + onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave3(el) { + ZIndex.clear(el); + }, "onOverlayAfterLeave"), + alignOverlay: /* @__PURE__ */ __name(function alignOverlay4() { + if (this.appendTo === "self") { + relativePosition(this.overlay, this.$el); + } else { + this.overlay.style.minWidth = getOuterWidth(this.$el) + "px"; + absolutePosition(this.overlay, this.$el); + } + }, "alignOverlay"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener6() { + var _this6 = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + if (_this6.overlayVisible && _this6.isOutsideClicked(event2)) { + _this6.hide(); + } + }; + document.addEventListener("click", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener6() { + if (this.outsideClickListener) { + document.removeEventListener("click", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener5() { + var _this7 = this; + if (!this.scrollHandler) { + this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function() { + if (_this7.overlayVisible) { + _this7.hide(); + } + }); + } + this.scrollHandler.bindScrollListener(); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener5() { + if (this.scrollHandler) { + this.scrollHandler.unbindScrollListener(); + } + }, "unbindScrollListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener5() { + var _this8 = this; + if (!this.resizeListener) { + this.resizeListener = function() { + if (_this8.overlayVisible && !isTouchDevice()) { + _this8.hide(); + } + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener5() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked3(event2) { + return !(this.$el.isSameNode(event2.target) || this.$el.contains(event2.target) || this.overlay && this.overlay.contains(event2.target)); + }, "isOutsideClicked"), + getLabelByValue: /* @__PURE__ */ __name(function getLabelByValue(value2) { + var _this9 = this; + var options4 = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || []; + var matchedOption = options4.find(function(option4) { + return !_this9.isOptionGroup(option4) && equals(_this9.getOptionValue(option4), value2, _this9.equalityKey); + }); + return matchedOption ? this.getOptionLabel(matchedOption) : null; + }, "getLabelByValue"), + getSelectedItemsLabel: /* @__PURE__ */ __name(function getSelectedItemsLabel() { + var pattern = /{(.*?)}/; + var selectedItemsLabel = this.selectedItemsLabel || this.$primevue.config.locale.selectionMessage; + if (pattern.test(selectedItemsLabel)) { + return selectedItemsLabel.replace(selectedItemsLabel.match(pattern)[0], this.d_value.length + ""); + } + return selectedItemsLabel; + }, "getSelectedItemsLabel"), + onToggleAll: /* @__PURE__ */ __name(function onToggleAll(event2) { + var _this10 = this; + if (this.selectAll !== null) { + this.$emit("selectall-change", { + originalEvent: event2, + checked: !this.allSelected + }); + } else { + var value2 = this.allSelected ? [] : this.visibleOptions.filter(function(option4) { + return _this10.isValidOption(option4); + }).map(function(option4) { + return _this10.getOptionValue(option4); + }); + this.updateModel(event2, value2); + } + }, "onToggleAll"), + removeOption: /* @__PURE__ */ __name(function removeOption(event2, optionValue) { + var _this11 = this; + event2.stopPropagation(); + var value2 = this.d_value.filter(function(val) { + return !equals(val, optionValue, _this11.equalityKey); + }); + this.updateModel(event2, value2); + }, "removeOption"), + clearFilter: /* @__PURE__ */ __name(function clearFilter() { + this.filterValue = null; + }, "clearFilter"), + hasFocusableElements: /* @__PURE__ */ __name(function hasFocusableElements() { + return getFocusableElements(this.overlay, ':not([data-p-hidden-focusable="true"])').length > 0; + }, "hasFocusableElements"), + isOptionMatched: /* @__PURE__ */ __name(function isOptionMatched2(option4) { + var _this$getOptionLabel; + return this.isValidOption(option4) && typeof this.getOptionLabel(option4) === "string" && ((_this$getOptionLabel = this.getOptionLabel(option4)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))); + }, "isOptionMatched"), + isValidOption: /* @__PURE__ */ __name(function isValidOption2(option4) { + return isNotEmpty(option4) && !(this.isOptionDisabled(option4) || this.isOptionGroup(option4)); + }, "isValidOption"), + isValidSelectedOption: /* @__PURE__ */ __name(function isValidSelectedOption2(option4) { + return this.isValidOption(option4) && this.isSelected(option4); + }, "isValidSelectedOption"), + isEquals: /* @__PURE__ */ __name(function isEquals(value1, value2) { + return equals(value1, value2, this.equalityKey); + }, "isEquals"), + isSelected: /* @__PURE__ */ __name(function isSelected4(option4) { + var _this12 = this; + var optionValue = this.getOptionValue(option4); + return (this.d_value || []).some(function(value2) { + return _this12.isEquals(value2, optionValue); + }); + }, "isSelected"), + findFirstOptionIndex: /* @__PURE__ */ __name(function findFirstOptionIndex2() { + var _this13 = this; + return this.visibleOptions.findIndex(function(option4) { + return _this13.isValidOption(option4); + }); + }, "findFirstOptionIndex"), + findLastOptionIndex: /* @__PURE__ */ __name(function findLastOptionIndex2() { + var _this14 = this; + return findLastIndex(this.visibleOptions, function(option4) { + return _this14.isValidOption(option4); + }); + }, "findLastOptionIndex"), + findNextOptionIndex: /* @__PURE__ */ __name(function findNextOptionIndex4(index) { + var _this15 = this; + var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function(option4) { + return _this15.isValidOption(option4); + }) : -1; + return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index; + }, "findNextOptionIndex"), + findPrevOptionIndex: /* @__PURE__ */ __name(function findPrevOptionIndex4(index) { + var _this16 = this; + var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function(option4) { + return _this16.isValidOption(option4); + }) : -1; + return matchedOptionIndex > -1 ? matchedOptionIndex : index; + }, "findPrevOptionIndex"), + findSelectedOptionIndex: /* @__PURE__ */ __name(function findSelectedOptionIndex2() { + var _this17 = this; + if (this.$filled) { + var _loop = /* @__PURE__ */ __name(function _loop2() { + var value2 = _this17.d_value[index]; + var matchedOptionIndex = _this17.visibleOptions.findIndex(function(option4) { + return _this17.isValidSelectedOption(option4) && _this17.isEquals(value2, _this17.getOptionValue(option4)); + }); + if (matchedOptionIndex > -1) return { + v: matchedOptionIndex + }; + }, "_loop"), _ret; + for (var index = this.d_value.length - 1; index >= 0; index--) { + _ret = _loop(); + if (_ret) return _ret.v; + } + } + return -1; + }, "findSelectedOptionIndex"), + findFirstSelectedOptionIndex: /* @__PURE__ */ __name(function findFirstSelectedOptionIndex() { + var _this18 = this; + return this.$filled ? this.visibleOptions.findIndex(function(option4) { + return _this18.isValidSelectedOption(option4); + }) : -1; + }, "findFirstSelectedOptionIndex"), + findLastSelectedOptionIndex: /* @__PURE__ */ __name(function findLastSelectedOptionIndex() { + var _this19 = this; + return this.$filled ? findLastIndex(this.visibleOptions, function(option4) { + return _this19.isValidSelectedOption(option4); + }) : -1; + }, "findLastSelectedOptionIndex"), + findNextSelectedOptionIndex: /* @__PURE__ */ __name(function findNextSelectedOptionIndex(index) { + var _this20 = this; + var matchedOptionIndex = this.$filled && index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function(option4) { + return _this20.isValidSelectedOption(option4); + }) : -1; + return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1; + }, "findNextSelectedOptionIndex"), + findPrevSelectedOptionIndex: /* @__PURE__ */ __name(function findPrevSelectedOptionIndex(index) { + var _this21 = this; + var matchedOptionIndex = this.$filled && index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function(option4) { + return _this21.isValidSelectedOption(option4); + }) : -1; + return matchedOptionIndex > -1 ? matchedOptionIndex : -1; + }, "findPrevSelectedOptionIndex"), + findNearestSelectedOptionIndex: /* @__PURE__ */ __name(function findNearestSelectedOptionIndex(index) { + var firstCheckUp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var matchedOptionIndex = -1; + if (this.$filled) { + if (firstCheckUp) { + matchedOptionIndex = this.findPrevSelectedOptionIndex(index); + matchedOptionIndex = matchedOptionIndex === -1 ? this.findNextSelectedOptionIndex(index) : matchedOptionIndex; + } else { + matchedOptionIndex = this.findNextSelectedOptionIndex(index); + matchedOptionIndex = matchedOptionIndex === -1 ? this.findPrevSelectedOptionIndex(index) : matchedOptionIndex; + } + } + return matchedOptionIndex > -1 ? matchedOptionIndex : index; + }, "findNearestSelectedOptionIndex"), + findFirstFocusedOptionIndex: /* @__PURE__ */ __name(function findFirstFocusedOptionIndex2() { + var selectedIndex = this.findSelectedOptionIndex(); + return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex; + }, "findFirstFocusedOptionIndex"), + findLastFocusedOptionIndex: /* @__PURE__ */ __name(function findLastFocusedOptionIndex2() { + var selectedIndex = this.findSelectedOptionIndex(); + return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex; + }, "findLastFocusedOptionIndex"), + searchOptions: /* @__PURE__ */ __name(function searchOptions2(event2) { + var _this22 = this; + this.searchValue = (this.searchValue || "") + event2.key; + var optionIndex = -1; + if (isNotEmpty(this.searchValue)) { + if (this.focusedOptionIndex !== -1) { + optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function(option4) { + return _this22.isOptionMatched(option4); + }); + optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function(option4) { + return _this22.isOptionMatched(option4); + }) : optionIndex + this.focusedOptionIndex; + } else { + optionIndex = this.visibleOptions.findIndex(function(option4) { + return _this22.isOptionMatched(option4); + }); + } + if (optionIndex === -1 && this.focusedOptionIndex === -1) { + optionIndex = this.findFirstFocusedOptionIndex(); + } + if (optionIndex !== -1) { + this.changeFocusedOptionIndex(event2, optionIndex); + } + } + if (this.searchTimeout) { + clearTimeout(this.searchTimeout); + } + this.searchTimeout = setTimeout(function() { + _this22.searchValue = ""; + _this22.searchTimeout = null; + }, 500); + }, "searchOptions"), + changeFocusedOptionIndex: /* @__PURE__ */ __name(function changeFocusedOptionIndex4(event2, index) { + if (this.focusedOptionIndex !== index) { + this.focusedOptionIndex = index; + this.scrollInView(); + if (this.selectOnFocus) { + this.onOptionSelect(event2, this.visibleOptions[index]); + } + } + }, "changeFocusedOptionIndex"), + scrollInView: /* @__PURE__ */ __name(function scrollInView4() { + var _this23 = this; + var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1; + this.$nextTick(function() { + var id4 = index !== -1 ? "".concat(_this23.id, "_").concat(index) : _this23.focusedOptionId; + var element = findSingle(_this23.list, 'li[id="'.concat(id4, '"]')); + if (element) { + element.scrollIntoView && element.scrollIntoView({ + block: "nearest", + inline: "nearest" + }); + } else if (!_this23.virtualScrollerDisabled) { + _this23.virtualScroller && _this23.virtualScroller.scrollToIndex(index !== -1 ? index : _this23.focusedOptionIndex); + } + }); + }, "scrollInView"), + autoUpdateModel: /* @__PURE__ */ __name(function autoUpdateModel2() { + if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) { + this.focusedOptionIndex = this.findFirstFocusedOptionIndex(); + var value2 = this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]); + this.updateModel(null, [value2]); + } + }, "autoUpdateModel"), + updateModel: /* @__PURE__ */ __name(function updateModel6(event2, value2) { + this.writeValue(value2, event2); + this.$emit("change", { + originalEvent: event2, + value: value2 + }); + }, "updateModel"), + flatOptions: /* @__PURE__ */ __name(function flatOptions(options4) { + var _this24 = this; + return (options4 || []).reduce(function(result, option4, index) { + result.push({ + optionGroup: option4, + group: true, + index + }); + var optionGroupChildren = _this24.getOptionGroupChildren(option4); + optionGroupChildren && optionGroupChildren.forEach(function(o) { + return result.push(o); + }); + return result; + }, []); + }, "flatOptions"), + overlayRef: /* @__PURE__ */ __name(function overlayRef3(el) { + this.overlay = el; + }, "overlayRef"), + listRef: /* @__PURE__ */ __name(function listRef2(el, contentRef2) { + this.list = el; + contentRef2 && contentRef2(el); + }, "listRef"), + virtualScrollerRef: /* @__PURE__ */ __name(function virtualScrollerRef(el) { + this.virtualScroller = el; + }, "virtualScrollerRef") + }, + computed: { + visibleOptions: /* @__PURE__ */ __name(function visibleOptions2() { + var _this25 = this; + var options4 = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || []; + if (this.filterValue) { + var filteredOptions = FilterService.filter(options4, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale); + if (this.optionGroupLabel) { + var optionGroups = this.options || []; + var filtered = []; + optionGroups.forEach(function(group) { + var groupChildren = _this25.getOptionGroupChildren(group); + var filteredItems = groupChildren.filter(function(item8) { + return filteredOptions.includes(item8); + }); + if (filteredItems.length > 0) filtered.push(_objectSpread$d(_objectSpread$d({}, group), {}, _defineProperty$1$2({}, typeof _this25.optionGroupChildren === "string" ? _this25.optionGroupChildren : "items", _toConsumableArray$6(filteredItems)))); + }); + return this.flatOptions(filtered); + } + return filteredOptions; + } + return options4; + }, "visibleOptions"), + label: /* @__PURE__ */ __name(function label7() { + var label12; + if (this.d_value && this.d_value.length) { + if (isNotEmpty(this.maxSelectedLabels) && this.d_value.length > this.maxSelectedLabels) { + return this.getSelectedItemsLabel(); + } else { + label12 = ""; + for (var i = 0; i < this.d_value.length; i++) { + if (i !== 0) { + label12 += ", "; + } + label12 += this.getLabelByValue(this.d_value[i]); + } + } + } else { + label12 = this.placeholder; + } + return label12; + }, "label"), + chipSelectedItems: /* @__PURE__ */ __name(function chipSelectedItems() { + return isNotEmpty(this.maxSelectedLabels) && this.d_value && this.d_value.length > this.maxSelectedLabels; + }, "chipSelectedItems"), + allSelected: /* @__PURE__ */ __name(function allSelected() { + var _this26 = this; + return this.selectAll !== null ? this.selectAll : isNotEmpty(this.visibleOptions) && this.visibleOptions.every(function(option4) { + return _this26.isOptionGroup(option4) || _this26.isOptionDisabled(option4) || _this26.isSelected(option4); + }); + }, "allSelected"), + // @deprecated use $filled instead. + hasSelectedOption: /* @__PURE__ */ __name(function hasSelectedOption2() { + return this.$filled; + }, "hasSelectedOption"), + equalityKey: /* @__PURE__ */ __name(function equalityKey2() { + return this.optionValue ? null : this.dataKey; + }, "equalityKey"), + searchFields: /* @__PURE__ */ __name(function searchFields() { + return this.filterFields || [this.optionLabel]; + }, "searchFields"), + maxSelectionLimitReached: /* @__PURE__ */ __name(function maxSelectionLimitReached() { + return this.selectionLimit && this.d_value && this.d_value.length === this.selectionLimit; + }, "maxSelectionLimitReached"), + filterResultMessageText: /* @__PURE__ */ __name(function filterResultMessageText() { + return isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll("{0}", this.visibleOptions.length) : this.emptyFilterMessageText; + }, "filterResultMessageText"), + filterMessageText: /* @__PURE__ */ __name(function filterMessageText() { + return this.filterMessage || this.$primevue.config.locale.searchMessage || ""; + }, "filterMessageText"), + emptyFilterMessageText: /* @__PURE__ */ __name(function emptyFilterMessageText() { + return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || ""; + }, "emptyFilterMessageText"), + emptyMessageText: /* @__PURE__ */ __name(function emptyMessageText3() { + return this.emptyMessage || this.$primevue.config.locale.emptyMessage || ""; + }, "emptyMessageText"), + selectionMessageText: /* @__PURE__ */ __name(function selectionMessageText2() { + return this.selectionMessage || this.$primevue.config.locale.selectionMessage || ""; + }, "selectionMessageText"), + emptySelectionMessageText: /* @__PURE__ */ __name(function emptySelectionMessageText2() { + return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || ""; + }, "emptySelectionMessageText"), + selectedMessageText: /* @__PURE__ */ __name(function selectedMessageText2() { + return this.$filled ? this.selectionMessageText.replaceAll("{0}", this.d_value.length) : this.emptySelectionMessageText; + }, "selectedMessageText"), + focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId5() { + return this.focusedOptionIndex !== -1 ? "".concat(this.id, "_").concat(this.focusedOptionIndex) : null; + }, "focusedOptionId"), + ariaSetSize: /* @__PURE__ */ __name(function ariaSetSize() { + var _this27 = this; + return this.visibleOptions.filter(function(option4) { + return !_this27.isOptionGroup(option4); + }).length; + }, "ariaSetSize"), + toggleAllAriaLabel: /* @__PURE__ */ __name(function toggleAllAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria[this.allSelected ? "selectAll" : "unselectAll"] : void 0; + }, "toggleAllAriaLabel"), + listAriaLabel: /* @__PURE__ */ __name(function listAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : void 0; + }, "listAriaLabel"), + virtualScrollerDisabled: /* @__PURE__ */ __name(function virtualScrollerDisabled() { + return !this.virtualScrollerOptions; + }, "virtualScrollerDisabled"), + hasFluid: /* @__PURE__ */ __name(function hasFluid() { + return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid; + }, "hasFluid"), + isClearIconVisible: /* @__PURE__ */ __name(function isClearIconVisible2() { + return this.showClear && this.d_value != null && isNotEmpty(this.options); + }, "isClearIconVisible") + }, + directives: { + ripple: Ripple + }, + components: { + InputText: script$1o, + Checkbox: script$1J, + VirtualScroller: script$1K, + Portal: script$1f, + Chip: script$1t, + IconField: script$1L, + InputIcon: script$1M, + TimesIcon: script$1g, + SearchIcon: script$1N, + ChevronDownIcon: script$1k, + SpinnerIcon: script$1r, + CheckIcon: script$1D + } +}; +function _typeof$e(o) { + "@babel/helpers - typeof"; + return _typeof$e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$e(o); +} +__name(_typeof$e, "_typeof$e"); +function _defineProperty$e(e, r, t2) { + return (r = _toPropertyKey$e(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$e, "_defineProperty$e"); +function _toPropertyKey$e(t2) { + var i = _toPrimitive$e(t2, "string"); + return "symbol" == _typeof$e(i) ? i : i + ""; +} +__name(_toPropertyKey$e, "_toPropertyKey$e"); +function _toPrimitive$e(t2, r) { + if ("object" != _typeof$e(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$e(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$e, "_toPrimitive$e"); +var _hoisted_1$f = ["id", "disabled", "placeholder", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; +var _hoisted_2$b = { + key: 0 +}; +var _hoisted_3$8 = ["id", "aria-label"]; +var _hoisted_4$5 = ["id"]; +var _hoisted_5$1 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"]; +function render$r(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Chip = resolveComponent("Chip"); + var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); + var _component_Checkbox = resolveComponent("Checkbox"); + var _component_InputText = resolveComponent("InputText"); + var _component_SearchIcon = resolveComponent("SearchIcon"); + var _component_InputIcon = resolveComponent("InputIcon"); + var _component_IconField = resolveComponent("IconField"); + var _component_VirtualScroller = resolveComponent("VirtualScroller"); + var _component_Portal = resolveComponent("Portal"); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("div", mergeProps({ + ref: "container", + "class": _ctx.cx("root"), + style: _ctx.sx("root"), + onClick: _cache[7] || (_cache[7] = function() { + return $options.onContainerClick && $options.onContainerClick.apply($options, arguments); + }) + }, _ctx.ptmi("root")), [createBaseVNode("div", mergeProps({ + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenInputContainer"), { + "data-p-hidden-accessible": true + }), [createBaseVNode("input", mergeProps({ + ref: "focusInput", + id: _ctx.inputId, + type: "text", + readonly: "", + disabled: _ctx.disabled, + placeholder: _ctx.placeholder, + tabindex: !_ctx.disabled ? _ctx.tabindex : -1, + role: "combobox", + "aria-label": _ctx.ariaLabel, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-haspopup": "listbox", + "aria-expanded": $data.overlayVisible, + "aria-controls": $data.id + "_list", + "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, + "aria-invalid": _ctx.invalid || void 0, + onFocus: _cache[0] || (_cache[0] = function() { + return $options.onFocus && $options.onFocus.apply($options, arguments); + }), + onBlur: _cache[1] || (_cache[1] = function() { + return $options.onBlur && $options.onBlur.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }) + }, _ctx.ptm("hiddenInput")), null, 16, _hoisted_1$f)], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("labelContainer") + }, _ctx.ptm("labelContainer")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("label") + }, _ctx.ptm("label")), [renderSlot(_ctx.$slots, "value", { + value: _ctx.d_value, + placeholder: _ctx.placeholder + }, function() { + return [_ctx.display === "comma" ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [createTextVNode(toDisplayString($options.label || "empty"), 1)], 64)) : _ctx.display === "chip" ? (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [$options.chipSelectedItems ? (openBlock(), createElementBlock("span", _hoisted_2$b, toDisplayString($options.label), 1)) : (openBlock(true), createElementBlock(Fragment, { + key: 1 + }, renderList(_ctx.d_value, function(item8) { + return openBlock(), createElementBlock("span", mergeProps({ + key: $options.getLabelByValue(item8), + "class": _ctx.cx("chipItem"), + ref_for: true + }, _ctx.ptm("chipItem")), [renderSlot(_ctx.$slots, "chip", { + value: item8, + removeCallback: /* @__PURE__ */ __name(function removeCallback(event2) { + return $options.removeOption(event2, item8); + }, "removeCallback") + }, function() { + return [createVNode(_component_Chip, { + "class": normalizeClass(_ctx.cx("pcChip")), + label: $options.getLabelByValue(item8), + removeIcon: _ctx.chipIcon || _ctx.removeTokenIcon, + removable: "", + unstyled: _ctx.unstyled, + onRemove: /* @__PURE__ */ __name(function onRemove($event) { + return $options.removeOption($event, item8); + }, "onRemove"), + pt: _ctx.ptm("pcChip") + }, { + removeicon: withCtx(function() { + return [renderSlot(_ctx.$slots, _ctx.$slots.chipicon ? "chipicon" : "removetokenicon", { + "class": normalizeClass(_ctx.cx("chipIcon")), + item: item8, + removeCallback: /* @__PURE__ */ __name(function removeCallback(event2) { + return $options.removeOption(event2, item8); + }, "removeCallback") + })]; + }), + _: 2 + }, 1032, ["class", "label", "removeIcon", "unstyled", "onRemove", "pt"])]; + })], 16); + }), 128)), !_ctx.d_value || _ctx.d_value.length === 0 ? (openBlock(), createElementBlock(Fragment, { + key: 2 + }, [createTextVNode(toDisplayString(_ctx.placeholder || "empty"), 1)], 64)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true)]; + })], 16)], 16), $options.isClearIconVisible ? renderSlot(_ctx.$slots, "clearicon", { + key: 0, + "class": normalizeClass(_ctx.cx("clearIcon")), + clearCallback: $options.onClearClick + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon ? "i" : "TimesIcon"), mergeProps({ + ref: "clearIcon", + "class": [_ctx.cx("clearIcon"), _ctx.clearIcon], + onClick: $options.onClearClick + }, _ctx.ptm("clearIcon"), { + "data-pc-section": "clearicon" + }), null, 16, ["class", "onClick"]))]; + }) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("dropdown") + }, _ctx.ptm("dropdown")), [_ctx.loading ? renderSlot(_ctx.$slots, "loadingicon", { + key: 0, + "class": normalizeClass(_ctx.cx("loadingIcon")) + }, function() { + return [_ctx.loadingIcon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": [_ctx.cx("loadingIcon"), "pi-spin", _ctx.loadingIcon], + "aria-hidden": "true" + }, _ctx.ptm("loadingIcon")), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({ + key: 1, + "class": _ctx.cx("loadingIcon"), + spin: "", + "aria-hidden": "true" + }, _ctx.ptm("loadingIcon")), null, 16, ["class"]))]; + }) : renderSlot(_ctx.$slots, "dropdownicon", { + key: 1, + "class": normalizeClass(_ctx.cx("dropdownIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? "span" : "ChevronDownIcon"), mergeProps({ + "class": [_ctx.cx("dropdownIcon"), _ctx.dropdownIcon], + "aria-hidden": "true" + }, _ctx.ptm("dropdownIcon")), null, 16, ["class"]))]; + })], 16), createVNode(_component_Portal, { + appendTo: _ctx.appendTo + }, { + "default": withCtx(function() { + return [createVNode(Transition, mergeProps({ + name: "p-connected-overlay", + onEnter: $options.onOverlayEnter, + onAfterEnter: $options.onOverlayAfterEnter, + onLeave: $options.onOverlayLeave, + onAfterLeave: $options.onOverlayAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [$data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.overlayRef, + style: [_ctx.panelStyle, _ctx.overlayStyle], + "class": [_ctx.cx("overlay"), _ctx.panelClass, _ctx.overlayClass], + onClick: _cache[5] || (_cache[5] = function() { + return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); + }), + onKeydown: _cache[6] || (_cache[6] = function() { + return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments); + }) + }, _ctx.ptm("overlay")), [createBaseVNode("span", mergeProps({ + ref: "firstHiddenFocusableElementOnOverlay", + role: "presentation", + "aria-hidden": "true", + "class": "p-hidden-accessible p-hidden-focusable", + tabindex: 0, + onFocus: _cache[3] || (_cache[3] = function() { + return $options.onFirstHiddenFocus && $options.onFirstHiddenFocus.apply($options, arguments); + }) + }, _ctx.ptm("hiddenFirstFocusableEl"), { + "data-p-hidden-accessible": true, + "data-p-hidden-focusable": true + }), null, 16), renderSlot(_ctx.$slots, "header", { + value: _ctx.d_value, + options: $options.visibleOptions + }), _ctx.showToggleAll && _ctx.selectionLimit == null || _ctx.filter ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("header") + }, _ctx.ptm("header")), [_ctx.showToggleAll && _ctx.selectionLimit == null ? (openBlock(), createBlock(_component_Checkbox, { + key: 0, + modelValue: $options.allSelected, + binary: true, + disabled: _ctx.disabled, + variant: _ctx.variant, + "aria-label": $options.toggleAllAriaLabel, + onChange: $options.onToggleAll, + unstyled: _ctx.unstyled, + pt: $options.getHeaderCheckboxPTOptions("pcHeaderCheckbox") + }, { + icon: withCtx(function(slotProps) { + return [_ctx.$slots.headercheckboxicon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.headercheckboxicon), { + key: 0, + checked: slotProps.checked, + "class": normalizeClass(slotProps["class"]) + }, null, 8, ["checked", "class"])) : slotProps.checked ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.checkboxIcon ? "span" : "CheckIcon"), mergeProps({ + key: 1, + "class": [slotProps["class"], _defineProperty$e({}, _ctx.checkboxIcon, slotProps.checked)] + }, $options.getHeaderCheckboxPTOptions("pcHeaderCheckbox.icon")), null, 16, ["class"])) : createCommentVNode("", true)]; + }), + _: 1 + }, 8, ["modelValue", "disabled", "variant", "aria-label", "onChange", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.filter ? (openBlock(), createBlock(_component_IconField, { + key: 1, + "class": normalizeClass(_ctx.cx("pcFilterContainer")), + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcFilterContainer") + }, { + "default": withCtx(function() { + return [createVNode(_component_InputText, { + ref: "filterInput", + value: $data.filterValue, + onVnodeMounted: $options.onFilterUpdated, + onVnodeUpdated: $options.onFilterUpdated, + "class": normalizeClass(_ctx.cx("pcFilter")), + placeholder: _ctx.filterPlaceholder, + disabled: _ctx.disabled, + variant: _ctx.variant, + unstyled: _ctx.unstyled, + role: "searchbox", + autocomplete: "off", + "aria-owns": $data.id + "_list", + "aria-activedescendant": $options.focusedOptionId, + onKeydown: $options.onFilterKeyDown, + onBlur: $options.onFilterBlur, + onInput: $options.onFilterChange, + pt: _ctx.ptm("pcFilter") + }, null, 8, ["value", "onVnodeMounted", "onVnodeUpdated", "class", "placeholder", "disabled", "variant", "unstyled", "aria-owns", "aria-activedescendant", "onKeydown", "onBlur", "onInput", "pt"]), createVNode(_component_InputIcon, { + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcFilterIconContainer") + }, { + "default": withCtx(function() { + return [renderSlot(_ctx.$slots, "filtericon", {}, function() { + return [_ctx.filterIcon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.filterIcon + }, _ctx.ptm("filterIcon")), null, 16)) : (openBlock(), createBlock(_component_SearchIcon, normalizeProps(mergeProps({ + key: 1 + }, _ctx.ptm("filterIcon"))), null, 16))]; + })]; + }), + _: 3 + }, 8, ["unstyled", "pt"])]; + }), + _: 3 + }, 8, ["class", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.filter ? (openBlock(), createElementBlock("span", mergeProps({ + key: 2, + role: "status", + "aria-live": "polite", + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenFilterResult"), { + "data-p-hidden-accessible": true + }), toDisplayString($options.filterResultMessageText), 17)) : createCommentVNode("", true)], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("listContainer"), + style: { + "max-height": $options.virtualScrollerDisabled ? _ctx.scrollHeight : "" + } + }, _ctx.ptm("listContainer")), [createVNode(_component_VirtualScroller, mergeProps({ + ref: $options.virtualScrollerRef + }, _ctx.virtualScrollerOptions, { + items: $options.visibleOptions, + style: { + height: _ctx.scrollHeight + }, + tabindex: -1, + disabled: $options.virtualScrollerDisabled, + pt: _ctx.ptm("virtualScroller") + }), createSlots({ + content: withCtx(function(_ref2) { + var styleClass = _ref2.styleClass, contentRef2 = _ref2.contentRef, items2 = _ref2.items, getItemOptions = _ref2.getItemOptions, contentStyle = _ref2.contentStyle, itemSize = _ref2.itemSize; + return [createBaseVNode("ul", mergeProps({ + ref: /* @__PURE__ */ __name(function ref2(el) { + return $options.listRef(el, contentRef2); + }, "ref"), + id: $data.id + "_list", + "class": [_ctx.cx("list"), styleClass], + style: contentStyle, + role: "listbox", + "aria-multiselectable": "true", + "aria-label": $options.listAriaLabel + }, _ctx.ptm("list")), [(openBlock(true), createElementBlock(Fragment, null, renderList(items2, function(option4, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.getOptionRenderKey(option4, $options.getOptionIndex(i, getItemOptions)) + }, [$options.isOptionGroup(option4) ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + id: $data.id + "_" + $options.getOptionIndex(i, getItemOptions), + style: { + height: itemSize ? itemSize + "px" : void 0 + }, + "class": _ctx.cx("optionGroup"), + role: "option", + ref_for: true + }, _ctx.ptm("optionGroup")), [renderSlot(_ctx.$slots, "optiongroup", { + option: option4.optionGroup, + index: $options.getOptionIndex(i, getItemOptions) + }, function() { + return [createTextVNode(toDisplayString($options.getOptionGroupLabel(option4.optionGroup)), 1)]; + })], 16, _hoisted_4$5)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({ + key: 1, + id: $data.id + "_" + $options.getOptionIndex(i, getItemOptions), + style: { + height: itemSize ? itemSize + "px" : void 0 + }, + "class": _ctx.cx("option", { + option: option4, + index: i, + getItemOptions + }), + role: "option", + "aria-label": $options.getOptionLabel(option4), + "aria-selected": $options.isSelected(option4), + "aria-disabled": $options.isOptionDisabled(option4), + "aria-setsize": $options.ariaSetSize, + "aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onOptionSelect($event, option4, $options.getOptionIndex(i, getItemOptions), true); + }, "onClick"), + onMousemove: /* @__PURE__ */ __name(function onMousemove($event) { + return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions)); + }, "onMousemove"), + ref_for: true + }, $options.getCheckboxPTOptions(option4, getItemOptions, i, "option"), { + "data-p-selected": $options.isSelected(option4), + "data-p-focused": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions), + "data-p-disabled": $options.isOptionDisabled(option4) + }), [createVNode(_component_Checkbox, { + defaultValue: $options.isSelected(option4), + binary: true, + tabindex: -1, + variant: _ctx.variant, + unstyled: _ctx.unstyled, + pt: $options.getCheckboxPTOptions(option4, getItemOptions, i, "pcOptionCheckbox") + }, { + icon: withCtx(function(slotProps) { + return [_ctx.$slots.optioncheckboxicon || _ctx.$slots.itemcheckboxicon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.optioncheckboxicon || _ctx.$slots.itemcheckboxicon), { + key: 0, + checked: slotProps.checked, + "class": normalizeClass(slotProps["class"]) + }, null, 8, ["checked", "class"])) : slotProps.checked ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.checkboxIcon ? "span" : "CheckIcon"), mergeProps({ + key: 1, + "class": [slotProps["class"], _defineProperty$e({}, _ctx.checkboxIcon, slotProps.checked)], + ref_for: true + }, $options.getCheckboxPTOptions(option4, getItemOptions, i, "pcOptionCheckbox.icon")), null, 16, ["class"])) : createCommentVNode("", true)]; + }), + _: 2 + }, 1032, ["defaultValue", "variant", "unstyled", "pt"]), renderSlot(_ctx.$slots, "option", { + option: option4, + selected: $options.isSelected(option4), + index: $options.getOptionIndex(i, getItemOptions) + }, function() { + return [createBaseVNode("span", mergeProps({ + ref_for: true + }, _ctx.ptm("optionLabel")), toDisplayString($options.getOptionLabel(option4)), 17)]; + })], 16, _hoisted_5$1)), [[_directive_ripple]])], 64); + }), 128)), $data.filterValue && (!items2 || items2 && items2.length === 0) ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + "class": _ctx.cx("emptyMessage"), + role: "option" + }, _ctx.ptm("emptyMessage")), [renderSlot(_ctx.$slots, "emptyfilter", {}, function() { + return [createTextVNode(toDisplayString($options.emptyFilterMessageText), 1)]; + })], 16)) : !_ctx.options || _ctx.options && _ctx.options.length === 0 ? (openBlock(), createElementBlock("li", mergeProps({ + key: 1, + "class": _ctx.cx("emptyMessage"), + role: "option" + }, _ctx.ptm("emptyMessage")), [renderSlot(_ctx.$slots, "empty", {}, function() { + return [createTextVNode(toDisplayString($options.emptyMessageText), 1)]; + })], 16)) : createCommentVNode("", true)], 16, _hoisted_3$8)]; + }), + _: 2 + }, [_ctx.$slots.loader ? { + name: "loader", + fn: withCtx(function(_ref4) { + var options4 = _ref4.options; + return [renderSlot(_ctx.$slots, "loader", { + options: options4 + })]; + }), + key: "0" + } : void 0]), 1040, ["items", "style", "disabled", "pt"])], 16), renderSlot(_ctx.$slots, "footer", { + value: _ctx.d_value, + options: $options.visibleOptions + }), !_ctx.options || _ctx.options && _ctx.options.length === 0 ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + role: "status", + "aria-live": "polite", + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenEmptyMessage"), { + "data-p-hidden-accessible": true + }), toDisplayString($options.emptyMessageText), 17)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + role: "status", + "aria-live": "polite", + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenSelectedMessage"), { + "data-p-hidden-accessible": true + }), toDisplayString($options.selectedMessageText), 17), createBaseVNode("span", mergeProps({ + ref: "lastHiddenFocusableElementOnOverlay", + role: "presentation", + "aria-hidden": "true", + "class": "p-hidden-accessible p-hidden-focusable", + tabindex: 0, + onFocus: _cache[4] || (_cache[4] = function() { + return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments); + }) + }, _ctx.ptm("hiddenLastFocusableEl"), { + "data-p-hidden-accessible": true, + "data-p-hidden-focusable": true + }), null, 16)], 16)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; + }), + _: 3 + }, 8, ["appendTo"])], 16); +} +__name(render$r, "render$r"); +script$v.render = render$r; +var script$u = { + name: "AngleDoubleDownIcon", + "extends": script$1m +}; +function render$q(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.70786 6.59831C6.80043 6.63674 6.89974 6.65629 6.99997 6.65581C7.19621 6.64081 7.37877 6.54953 7.50853 6.40153L11.0685 2.8416C11.1364 2.69925 11.1586 2.53932 11.132 2.38384C11.1053 2.22837 11.0311 2.08498 10.9195 1.97343C10.808 1.86188 10.6646 1.78766 10.5091 1.76099C10.3536 1.73431 10.1937 1.75649 10.0513 1.82448L6.99997 4.87585L3.9486 1.82448C3.80625 1.75649 3.64632 1.73431 3.49084 1.76099C3.33536 1.78766 3.19197 1.86188 3.08043 1.97343C2.96888 2.08498 2.89466 2.22837 2.86798 2.38384C2.84131 2.53932 2.86349 2.69925 2.93147 2.8416L6.46089 6.43205C6.53132 6.50336 6.61528 6.55989 6.70786 6.59831ZM6.70786 12.1925C6.80043 12.2309 6.89974 12.2505 6.99997 12.25C7.10241 12.2465 7.20306 12.2222 7.29575 12.1785C7.38845 12.1348 7.47124 12.0726 7.53905 11.9957L11.0685 8.46629C11.1614 8.32292 11.2036 8.15249 11.1881 7.98233C11.1727 7.81216 11.1005 7.6521 10.9833 7.52781C10.866 7.40353 10.7104 7.3222 10.5415 7.29688C10.3725 7.27155 10.1999 7.30369 10.0513 7.38814L6.99997 10.4395L3.9486 7.38814C3.80006 7.30369 3.62747 7.27155 3.45849 7.29688C3.28951 7.3222 3.13393 7.40353 3.01667 7.52781C2.89942 7.6521 2.82729 7.81216 2.81184 7.98233C2.79639 8.15249 2.83852 8.32292 2.93148 8.46629L6.4609 12.0262C6.53133 12.0975 6.61529 12.1541 6.70786 12.1925Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$q, "render$q"); +script$u.render = render$q; +var script$t = { + name: "AngleDoubleUpIcon", + "extends": script$1m +}; +function render$p(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M10.1504 6.67719C10.2417 6.71508 10.3396 6.73436 10.4385 6.73389C10.6338 6.74289 10.8249 6.67441 10.97 6.54334C11.1109 6.4023 11.19 6.21112 11.19 6.01178C11.19 5.81245 11.1109 5.62127 10.97 5.48023L7.45977 1.96998C7.31873 1.82912 7.12755 1.75 6.92821 1.75C6.72888 1.75 6.5377 1.82912 6.39666 1.96998L2.9165 5.45014C2.83353 5.58905 2.79755 5.751 2.81392 5.91196C2.83028 6.07293 2.89811 6.22433 3.00734 6.34369C3.11656 6.46306 3.26137 6.54402 3.42025 6.57456C3.57914 6.60511 3.74364 6.5836 3.88934 6.51325L6.89813 3.50446L9.90691 6.51325C9.97636 6.58357 10.0592 6.6393 10.1504 6.67719ZM9.93702 11.9993C10.065 12.1452 10.245 12.2352 10.4385 12.25C10.632 12.2352 10.812 12.1452 10.9399 11.9993C11.0633 11.8614 11.1315 11.6828 11.1315 11.4978C11.1315 11.3128 11.0633 11.1342 10.9399 10.9963L7.48987 7.48609C7.34883 7.34523 7.15765 7.26611 6.95832 7.26611C6.75899 7.26611 6.5678 7.34523 6.42677 7.48609L2.91652 10.9963C2.84948 11.1367 2.82761 11.2944 2.85391 11.4477C2.88022 11.601 2.9534 11.7424 3.06339 11.8524C3.17338 11.9624 3.31477 12.0356 3.46808 12.0619C3.62139 12.0882 3.77908 12.0663 3.91945 11.9993L6.92823 8.99048L9.93702 11.9993Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$p, "render$p"); +script$t.render = render$p; +var theme$f = /* @__PURE__ */ __name(function theme25(_ref) { + var dt = _ref.dt; + return "\n.p-orderlist {\n display: flex;\n gap: ".concat(dt("orderlist.gap"), ";\n}\n\n.p-orderlist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ").concat(dt("orderlist.controls.gap"), ";\n}\n"); +}, "theme"); +var classes$g = { + root: "p-orderlist p-component", + controls: "p-orderlist-controls" +}; +var OrderListStyle = BaseStyle.extend({ + name: "orderlist", + theme: theme$f, + classes: classes$g +}); +var script$1$g = { + name: "BaseOrderList", + "extends": script$1d, + props: { + modelValue: { + type: Array, + "default": null + }, + selection: { + type: Array, + "default": null + }, + dataKey: { + type: String, + "default": null + }, + listStyle: { + type: null, + "default": null + }, + metaKeySelection: { + type: Boolean, + "default": false + }, + autoOptionFocus: { + type: Boolean, + "default": true + }, + focusOnHover: { + type: Boolean, + "default": true + }, + responsive: { + type: Boolean, + "default": true + }, + breakpoint: { + type: String, + "default": "960px" + }, + striped: { + type: Boolean, + "default": false + }, + scrollHeight: { + type: String, + "default": "14rem" + }, + buttonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default13() { + return { + severity: "secondary" + }; + }, "_default") + }, + moveUpButtonProps: { + type: null, + "default": null + }, + moveTopButtonProps: { + type: null, + "default": null + }, + moveDownButtonProps: { + type: null, + "default": null + }, + moveBottomButtonProps: { + type: null, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + }, + disabled: { + type: Boolean, + "default": false + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: OrderListStyle, + provide: /* @__PURE__ */ __name(function provide35() { + return { + $pcOrderList: this, + $parentInstance: this + }; + }, "provide") +}; +function _toConsumableArray$5(r) { + return _arrayWithoutHoles$5(r) || _iterableToArray$5(r) || _unsupportedIterableToArray$6(r) || _nonIterableSpread$5(); +} +__name(_toConsumableArray$5, "_toConsumableArray$5"); +function _nonIterableSpread$5() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$5, "_nonIterableSpread$5"); +function _unsupportedIterableToArray$6(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$6(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$6(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$6, "_unsupportedIterableToArray$6"); +function _iterableToArray$5(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$5, "_iterableToArray$5"); +function _arrayWithoutHoles$5(r) { + if (Array.isArray(r)) return _arrayLikeToArray$6(r); +} +__name(_arrayWithoutHoles$5, "_arrayWithoutHoles$5"); +function _arrayLikeToArray$6(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$6, "_arrayLikeToArray$6"); +var script$s = { + name: "OrderList", + "extends": script$1$g, + inheritAttrs: false, + emits: ["update:modelValue", "reorder", "update:selection", "selection-change", "focus", "blur"], + itemTouched: false, + reorderDirection: null, + styleElement: null, + list: null, + data: /* @__PURE__ */ __name(function data23() { + return { + id: this.$attrs.id, + d_selection: this.selection + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId8(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId") + }, + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount11() { + this.destroyStyle(); + }, "beforeUnmount"), + updated: /* @__PURE__ */ __name(function updated6() { + if (this.reorderDirection) { + this.updateListScroll(); + this.reorderDirection = null; + } + }, "updated"), + mounted: /* @__PURE__ */ __name(function mounted24() { + this.id = this.id || UniqueComponentId(); + if (this.responsive) { + this.createStyle(); + } + }, "mounted"), + methods: { + updateSelection: /* @__PURE__ */ __name(function updateSelection(event2) { + this.$emit("update:selection", this.d_selection); + this.$emit("selection-change", { + originalEvent: event2, + value: this.d_selection + }); + }, "updateSelection"), + onChangeSelection: /* @__PURE__ */ __name(function onChangeSelection(params) { + this.d_selection = params.value; + this.updateSelection(params.event); + }, "onChangeSelection"), + onListFocus: /* @__PURE__ */ __name(function onListFocus3(event2) { + this.$emit("focus", event2); + }, "onListFocus"), + onListBlur: /* @__PURE__ */ __name(function onListBlur3(event2) { + this.$emit("blur", event2); + }, "onListBlur"), + onReorderUpdate: /* @__PURE__ */ __name(function onReorderUpdate(event2, value2) { + this.$emit("update:modelValue", value2); + this.$emit("reorder", { + originalEvent: event2, + value: value2, + direction: this.reorderDirection + }); + }, "onReorderUpdate"), + moveUp: /* @__PURE__ */ __name(function moveUp(event2) { + if (this.d_selection) { + var value2 = _toConsumableArray$5(this.modelValue); + for (var i = 0; i < this.d_selection.length; i++) { + var selectedItem = this.d_selection[i]; + var selectedItemIndex = findIndexInList(selectedItem, value2); + if (selectedItemIndex !== 0) { + var movedItem = value2[selectedItemIndex]; + var temp = value2[selectedItemIndex - 1]; + value2[selectedItemIndex - 1] = movedItem; + value2[selectedItemIndex] = temp; + } else { + break; + } + } + this.reorderDirection = "up"; + this.onReorderUpdate(event2, value2); + } + }, "moveUp"), + moveTop: /* @__PURE__ */ __name(function moveTop(event2) { + if (this.d_selection) { + var value2 = _toConsumableArray$5(this.modelValue); + for (var i = 0; i < this.d_selection.length; i++) { + var selectedItem = this.d_selection[i]; + var selectedItemIndex = findIndexInList(selectedItem, value2); + if (selectedItemIndex !== 0) { + var movedItem = value2.splice(selectedItemIndex, 1)[0]; + value2.unshift(movedItem); + } else { + break; + } + } + this.reorderDirection = "top"; + this.onReorderUpdate(event2, value2); + } + }, "moveTop"), + moveDown: /* @__PURE__ */ __name(function moveDown(event2) { + if (this.d_selection) { + var value2 = _toConsumableArray$5(this.modelValue); + for (var i = this.d_selection.length - 1; i >= 0; i--) { + var selectedItem = this.d_selection[i]; + var selectedItemIndex = findIndexInList(selectedItem, value2); + if (selectedItemIndex !== value2.length - 1) { + var movedItem = value2[selectedItemIndex]; + var temp = value2[selectedItemIndex + 1]; + value2[selectedItemIndex + 1] = movedItem; + value2[selectedItemIndex] = temp; + } else { + break; + } + } + this.reorderDirection = "down"; + this.onReorderUpdate(event2, value2); + } + }, "moveDown"), + moveBottom: /* @__PURE__ */ __name(function moveBottom(event2) { + if (this.d_selection) { + var value2 = _toConsumableArray$5(this.modelValue); + for (var i = this.d_selection.length - 1; i >= 0; i--) { + var selectedItem = this.d_selection[i]; + var selectedItemIndex = findIndexInList(selectedItem, value2); + if (selectedItemIndex !== value2.length - 1) { + var movedItem = value2.splice(selectedItemIndex, 1)[0]; + value2.push(movedItem); + } else { + break; + } + } + this.reorderDirection = "bottom"; + this.onReorderUpdate(event2, value2); + } + }, "moveBottom"), + updateListScroll: /* @__PURE__ */ __name(function updateListScroll() { + this.list = findSingle(this.$refs.listbox.$el, '[data-pc-section="list"]'); + var listItems = find(this.list, '[data-pc-section="item"][data-p-selected="true"]'); + if (listItems && listItems.length) { + switch (this.reorderDirection) { + case "up": + scrollInView(this.list, listItems[0]); + break; + case "top": + this.list.scrollTop = 0; + break; + case "down": + scrollInView(this.list, listItems[listItems.length - 1]); + break; + case "bottom": + this.list.scrollTop = this.list.scrollHeight; + break; + } + } + }, "updateListScroll"), + createStyle: /* @__PURE__ */ __name(function createStyle() { + if (!this.styleElement && !this.isUnstyled) { + var _this$$primevue; + this.styleElement = document.createElement("style"); + this.styleElement.type = "text/css"; + setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); + document.head.appendChild(this.styleElement); + var innerHTML = "\n@media screen and (max-width: ".concat(this.breakpoint, ") {\n .p-orderlist[").concat(this.$attrSelector, "] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.$attrSelector, "] .p-orderlist-controls {\n flex-direction: row;\n }\n}\n"); + this.styleElement.innerHTML = innerHTML; + } + }, "createStyle"), + destroyStyle: /* @__PURE__ */ __name(function destroyStyle() { + if (this.styleElement) { + document.head.removeChild(this.styleElement); + this.styleElement = null; + } + }, "destroyStyle"), + moveDisabled: /* @__PURE__ */ __name(function moveDisabled() { + return this.disabled ? true : !this.d_selection || !this.d_selection.length ? true : false; + }, "moveDisabled") + }, + computed: { + moveUpAriaLabel: /* @__PURE__ */ __name(function moveUpAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveUp : void 0; + }, "moveUpAriaLabel"), + moveTopAriaLabel: /* @__PURE__ */ __name(function moveTopAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveTop : void 0; + }, "moveTopAriaLabel"), + moveDownAriaLabel: /* @__PURE__ */ __name(function moveDownAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveDown : void 0; + }, "moveDownAriaLabel"), + moveBottomAriaLabel: /* @__PURE__ */ __name(function moveBottomAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveBottom : void 0; + }, "moveBottomAriaLabel"), + hasSelectedOption: /* @__PURE__ */ __name(function hasSelectedOption3() { + return isNotEmpty(this.d_selection); + }, "hasSelectedOption") + }, + components: { + Listbox: script$1O, + Button: script$1e, + AngleUpIcon: script$1P, + AngleDownIcon: script$1H, + AngleDoubleUpIcon: script$t, + AngleDoubleDownIcon: script$u + }, + directives: { + ripple: Ripple + } +}; +function _typeof$d(o) { + "@babel/helpers - typeof"; + return _typeof$d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$d(o); +} +__name(_typeof$d, "_typeof$d"); +function ownKeys$c(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$c, "ownKeys$c"); +function _objectSpread$c(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$c(Object(t2), true).forEach(function(r2) { + _defineProperty$d(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$c(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$c, "_objectSpread$c"); +function _defineProperty$d(e, r, t2) { + return (r = _toPropertyKey$d(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$d, "_defineProperty$d"); +function _toPropertyKey$d(t2) { + var i = _toPrimitive$d(t2, "string"); + return "symbol" == _typeof$d(i) ? i : i + ""; +} +__name(_toPropertyKey$d, "_toPropertyKey$d"); +function _toPrimitive$d(t2, r) { + if ("object" != _typeof$d(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$d(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$d, "_toPrimitive$d"); +function render$o(_ctx, _cache, $props, $setup, $data, $options) { + var _component_AngleUpIcon = resolveComponent("AngleUpIcon"); + var _component_Button = resolveComponent("Button"); + var _component_AngleDoubleUpIcon = resolveComponent("AngleDoubleUpIcon"); + var _component_AngleDownIcon = resolveComponent("AngleDownIcon"); + var _component_AngleDoubleDownIcon = resolveComponent("AngleDoubleDownIcon"); + var _component_Listbox = resolveComponent("Listbox"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("controls") + }, _ctx.ptm("controls")), [renderSlot(_ctx.$slots, "controlsstart"), createVNode(_component_Button, mergeProps({ + onClick: $options.moveUp, + "aria-label": $options.moveUpAriaLabel, + disabled: $options.moveDisabled() + }, _objectSpread$c(_objectSpread$c({}, _ctx.buttonProps), _ctx.moveUpButtonProps), { + pt: _ctx.ptm("pcMoveUpButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "moveupicon", {}, function() { + return [createVNode(_component_AngleUpIcon, mergeProps(_ctx.ptm("pcMoveUpButton")["icon"], { + "data-pc-section": "moveupicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + onClick: $options.moveTop, + "aria-label": $options.moveTopAriaLabel, + disabled: $options.moveDisabled() + }, _objectSpread$c(_objectSpread$c({}, _ctx.buttonProps), _ctx.moveTopButtonProps), { + pt: _ctx.ptm("pcMoveTopButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movetopicon", {}, function() { + return [createVNode(_component_AngleDoubleUpIcon, mergeProps(_ctx.ptm("pcMoveTopButton")["icon"], { + "data-pc-section": "movetopicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + onClick: $options.moveDown, + "aria-label": $options.moveDownAriaLabel, + disabled: $options.moveDisabled() + }, _objectSpread$c(_objectSpread$c({}, _ctx.buttonProps), _ctx.moveDownButtonProps), { + pt: _ctx.ptm("pcMoveDownButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movedownicon", {}, function() { + return [createVNode(_component_AngleDownIcon, mergeProps(_ctx.ptm("pcMoveDownButton")["icon"], { + "data-pc-section": "movedownicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + onClick: $options.moveBottom, + "aria-label": $options.moveBottomAriaLabel, + disabled: $options.moveDisabled() + }, _objectSpread$c(_objectSpread$c({}, _ctx.buttonProps), _ctx.moveBottomButtonProps), { + pt: _ctx.ptm("pcMoveBottomButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movebottomicon", {}, function() { + return [createVNode(_component_AngleDoubleDownIcon, mergeProps(_ctx.ptm("pcMoveBottomButton")["icon"], { + "data-pc-section": "movebottomicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["onClick", "aria-label", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "controlsend")], 16), createVNode(_component_Listbox, { + ref: "listbox", + id: $data.id, + modelValue: $data.d_selection, + options: _ctx.modelValue, + multiple: "", + metaKeySelection: _ctx.metaKeySelection, + listStyle: _ctx.listStyle, + scrollHeight: _ctx.scrollHeight, + tabindex: _ctx.tabindex, + dataKey: _ctx.dataKey, + autoOptionFocus: _ctx.autoOptionFocus, + focusOnHover: _ctx.focusOnHover, + striped: _ctx.striped, + disabled: _ctx.disabled, + ariaLabel: _ctx.ariaLabel, + ariaLabelledby: _ctx.ariaLabelledby, + pt: _ctx.ptm("pcListbox"), + unstyled: _ctx.unstyled, + onFocus: $options.onListFocus, + onBlur: $options.onListBlur, + onChange: $options.onChangeSelection + }, createSlots({ + option: withCtx(function(_ref) { + var option4 = _ref.option, selected3 = _ref.selected, index = _ref.index; + return [renderSlot(_ctx.$slots, _ctx.$slots.option ? "option" : "item", { + item: option4, + option: option4, + selected: selected3, + index + })]; + }), + _: 2 + }, [_ctx.$slots.header ? { + name: "header", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "header")]; + }), + key: "0" + } : void 0]), 1032, ["id", "modelValue", "options", "metaKeySelection", "listStyle", "scrollHeight", "tabindex", "dataKey", "autoOptionFocus", "focusOnHover", "striped", "disabled", "ariaLabel", "ariaLabelledby", "pt", "unstyled", "onFocus", "onBlur", "onChange"])], 16); +} +__name(render$o, "render$o"); +script$s.render = render$o; +var theme$e = /* @__PURE__ */ __name(function theme26(_ref) { + var dt = _ref.dt; + return "\n.p-organizationchart-table {\n border-spacing: 0;\n border-collapse: separate;\n margin: 0 auto;\n}\n\n.p-organizationchart-table > tbody > tr > td {\n text-align: center;\n vertical-align: top;\n padding: 0 ".concat(dt("organizationchart.gutter"), ";\n}\n\n.p-organizationchart-node {\n display: inline-block;\n position: relative;\n border: 1px solid ").concat(dt("organizationchart.node.border.color"), ";\n background: ").concat(dt("organizationchart.node.background"), ";\n color: ").concat(dt("organizationchart.node.color"), ";\n padding: ").concat(dt("organizationchart.node.padding"), ";\n border-radius: ").concat(dt("organizationchart.node.border.radius"), ";\n transition: background ").concat(dt("organizationchart.transition.duration"), ", border-color ").concat(dt("organizationchart.transition.duration"), ", color ").concat(dt("organizationchart.transition.duration"), ", box-shadow ").concat(dt("organizationchart.transition.duration"), ";\n}\n\n.p-organizationchart-node:has(.p-organizationchart-node-toggle-button) {\n padding: ").concat(dt("organizationchart.node.toggleable.padding"), ";\n}\n\n.p-organizationchart-node.p-organizationchart-node-selectable:not(.p-organizationchart-node-selected):hover {\n background: ").concat(dt("organizationchart.node.hover.background"), ";\n color: ").concat(dt("organizationchart.node.hover.color"), ";\n}\n\n.p-organizationchart-node-selected {\n background: ").concat(dt("organizationchart.node.selected.background"), ";\n color: ").concat(dt("organizationchart.node.selected.color"), ";\n}\n\n.p-organizationchart-node-toggle-button {\n position: absolute;\n inset-block-end: calc(-1 * calc(").concat(dt("organizationchart.node.toggle.button.size"), " / 2));\n margin-inline-start: calc(-1 * calc(").concat(dt("organizationchart.node.toggle.button.size"), " / 2));\n z-index: 2;\n inset-inline-start: 50%;\n user-select: none;\n cursor: pointer;\n width: ").concat(dt("organizationchart.node.toggle.button.size"), ";\n height: ").concat(dt("organizationchart.node.toggle.button.size"), ";\n text-decoration: none;\n background: ").concat(dt("organizationchart.node.toggle.button.background"), ";\n color: ").concat(dt("organizationchart.node.toggle.button.color"), ";\n border-radius: ").concat(dt("organizationchart.node.toggle.button.border.radius"), ";\n border: 1px solid ").concat(dt("organizationchart.node.toggle.button.border.color"), ";\n display: inline-flex;\n justify-content: center;\n align-items: center;\n outline-color: transparent;\n transition: background ").concat(dt("organizationchart.transition.duration"), ", color ").concat(dt("organizationchart.transition.duration"), ", border-color ").concat(dt("organizationchart.transition.duration"), ", outline-color ").concat(dt("organizationchart.transition.duration"), ", box-shadow ").concat(dt("organizationchart.transition.duration"), ";\n}\n\n.p-organizationchart-node-toggle-button:hover {\n background: ").concat(dt("organizationchart.node.toggle.button.hover.background"), ";\n color: ").concat(dt("organizationchart.node.toggle.button.hover.color"), ";\n}\n\n.p-organizationchart-node-toggle-button:focus-visible {\n box-shadow: ").concat(dt("breadcrumb.item.focus.ring.shadow"), ";\n outline: ").concat(dt("breadcrumb.item.focus.ring.width"), " ").concat(dt("breadcrumb.item.focus.ring.style"), " ").concat(dt("breadcrumb.item.focus.ring.color"), ";\n outline-offset: ").concat(dt("breadcrumb.item.focus.ring.offset"), ";\n}\n\n.p-organizationchart-node-toggle-button-icon {\n position: relative;\n inset-block-start: 1px;\n}\n\n.p-organizationchart-connector-down {\n margin: 0 auto;\n height: ").concat(dt("organizationchart.connector.height"), ";\n width: 1px;\n background: ").concat(dt("organizationchart.connector.color"), ";\n}\n\n.p-organizationchart-connector-right {\n border-radius: 0;\n}\n\n.p-organizationchart-connector-left {\n border-radius: 0;\n border-inline-end: 1px solid ").concat(dt("organizationchart.connector.color"), ";\n}\n\n.p-organizationchart-connector-top {\n border-block-start: 1px solid ").concat(dt("organizationchart.connector.color"), ";\n}\n\n.p-organizationchart-node-selectable {\n cursor: pointer;\n}\n\n.p-organizationchart-connectors :nth-child(1 of .p-organizationchart-connector-left) {\n border-inline-end: 0 none;\n}\n\n.p-organizationchart-connectors :nth-last-child(1 of .p-organizationchart-connector-left) {\n border-start-end-radius: ").concat(dt("organizationchart.connector.border.radius"), ";\n}\n\n.p-organizationchart-connectors :nth-child(1 of .p-organizationchart-connector-right) {\n border-inline-start: 1px solid ").concat(dt("organizationchart.connector.color"), ";\n border-start-start-radius: ").concat(dt("organizationchart.connector.border.radius"), ";\n}\n"); +}, "theme"); +var classes$f = { + root: "p-organizationchart p-component", + table: "p-organizationchart-table", + node: /* @__PURE__ */ __name(function node(_ref2) { + var instance = _ref2.instance; + return ["p-organizationchart-node", { + "p-organizationchart-node-selectable": instance.selectable, + "p-organizationchart-node-selected": instance.selected + }]; + }, "node"), + nodeToggleButton: "p-organizationchart-node-toggle-button", + nodeToggleButtonIcon: "p-organizationchart-node-toggle-button-icon", + connectors: "p-organizationchart-connectors", + connectorDown: "p-organizationchart-connector-down", + connectorLeft: /* @__PURE__ */ __name(function connectorLeft(_ref3) { + var index = _ref3.index; + return ["p-organizationchart-connector-left", { + "p-organizationchart-connector-top": !(index === 0) + }]; + }, "connectorLeft"), + connectorRight: /* @__PURE__ */ __name(function connectorRight(_ref4) { + var props = _ref4.props, index = _ref4.index; + return ["p-organizationchart-connector-right", { + "p-organizationchart-connector-top": !(index === props.node.children.length - 1) + }]; + }, "connectorRight"), + nodeChildren: "p-organizationchart-node-children" +}; +var OrganizationChartStyle = BaseStyle.extend({ + name: "organizationchart", + theme: theme$e, + classes: classes$f +}); +var script$2$2 = { + name: "BaseOrganizationChart", + "extends": script$1d, + props: { + value: { + type: null, + "default": null + }, + selectionKeys: { + type: null, + "default": null + }, + selectionMode: { + type: String, + "default": null + }, + collapsible: { + type: Boolean, + "default": false + }, + collapsedKeys: { + type: null, + "default": null + } + }, + style: OrganizationChartStyle, + provide: /* @__PURE__ */ __name(function provide36() { + return { + $pcOrganizationChart: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1$f = { + name: "OrganizationChartNode", + hostName: "OrganizationChart", + "extends": script$1d, + emits: ["node-click", "node-toggle"], + props: { + node: { + type: null, + "default": null + }, + templates: { + type: null, + "default": null + }, + collapsible: { + type: Boolean, + "default": false + }, + collapsedKeys: { + type: null, + "default": null + }, + selectionKeys: { + type: null, + "default": null + }, + selectionMode: { + type: String, + "default": null + } + }, + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions6(key) { + return this.ptm(key, { + context: { + expanded: this.expanded, + selectable: this.selectable, + selected: this.selected, + toggleable: this.toggleable, + active: this.selected + } + }); + }, "getPTOptions"), + getNodeOptions: /* @__PURE__ */ __name(function getNodeOptions(lineTop, key) { + return this.ptm(key, { + context: { + lineTop + } + }); + }, "getNodeOptions"), + onNodeClick: /* @__PURE__ */ __name(function onNodeClick(event2) { + if (isAttributeEquals(event2.target, "data-pc-section", "nodetogglebutton") || isAttributeEquals(event2.target, "data-pc-section", "nodetogglebuttonicon")) { + return; + } + if (this.selectionMode) { + this.$emit("node-click", this.node); + } + }, "onNodeClick"), + onChildNodeClick: /* @__PURE__ */ __name(function onChildNodeClick(node2) { + this.$emit("node-click", node2); + }, "onChildNodeClick"), + toggleNode: /* @__PURE__ */ __name(function toggleNode() { + this.$emit("node-toggle", this.node); + }, "toggleNode"), + onChildNodeToggle: /* @__PURE__ */ __name(function onChildNodeToggle(node2) { + this.$emit("node-toggle", node2); + }, "onChildNodeToggle"), + onKeydown: /* @__PURE__ */ __name(function onKeydown4(event2) { + if (event2.code === "Enter" || event2.code === "NumpadEnter" || event2.code === "Space") { + this.toggleNode(); + event2.preventDefault(); + } + }, "onKeydown") + }, + computed: { + leaf: /* @__PURE__ */ __name(function leaf() { + return this.node.leaf === false ? false : !(this.node.children && this.node.children.length); + }, "leaf"), + colspan: /* @__PURE__ */ __name(function colspan() { + return this.node.children && this.node.children.length ? this.node.children.length * 2 : null; + }, "colspan"), + childStyle: /* @__PURE__ */ __name(function childStyle() { + return { + visibility: !this.leaf && this.expanded ? "inherit" : "hidden" + }; + }, "childStyle"), + expanded: /* @__PURE__ */ __name(function expanded() { + return this.collapsedKeys[this.node.key] === void 0; + }, "expanded"), + selectable: /* @__PURE__ */ __name(function selectable() { + return this.selectionMode && this.node.selectable !== false; + }, "selectable"), + selected: /* @__PURE__ */ __name(function selected() { + return this.selectable && this.selectionKeys && this.selectionKeys[this.node.key] === true; + }, "selected"), + toggleable: /* @__PURE__ */ __name(function toggleable() { + return this.collapsible && this.node.collapsible !== false && !this.leaf; + }, "toggleable") + }, + components: { + ChevronDownIcon: script$1k, + ChevronUpIcon: script$1j + } +}; +var _hoisted_1$e = ["colspan"]; +var _hoisted_2$a = ["colspan"]; +var _hoisted_3$7 = ["colspan"]; +function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { + var _component_OrganizationChartNode = resolveComponent("OrganizationChartNode", true); + return openBlock(), createElementBlock("table", mergeProps({ + "class": _ctx.cx("table") + }, _ctx.ptm("table")), [createBaseVNode("tbody", normalizeProps(guardReactiveProps(_ctx.ptm("body"))), [$props.node ? (openBlock(), createElementBlock("tr", normalizeProps(mergeProps({ + key: 0 + }, _ctx.ptm("row"))), [createBaseVNode("td", mergeProps({ + colspan: $options.colspan + }, _ctx.ptm("cell")), [createBaseVNode("div", mergeProps({ + "class": [_ctx.cx("node"), $props.node.styleClass], + onClick: _cache[2] || (_cache[2] = function() { + return $options.onNodeClick && $options.onNodeClick.apply($options, arguments); + }) + }, $options.getPTOptions("node")), [(openBlock(), createBlock(resolveDynamicComponent($props.templates[$props.node.type] || $props.templates["default"]), { + node: $props.node + }, null, 8, ["node"])), $options.toggleable ? (openBlock(), createElementBlock("a", mergeProps({ + key: 0, + tabindex: "0", + "class": _ctx.cx("nodeToggleButton"), + onClick: _cache[0] || (_cache[0] = function() { + return $options.toggleNode && $options.toggleNode.apply($options, arguments); + }), + onKeydown: _cache[1] || (_cache[1] = function() { + return $options.onKeydown && $options.onKeydown.apply($options, arguments); + }) + }, $options.getPTOptions("nodeToggleButton")), [$props.templates.toggleicon || $props.templates.togglericon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.toggleicon || $props.templates.togglericon), mergeProps({ + key: 0, + expanded: $options.expanded, + "class": _ctx.cx("nodeToggleButtonIcon") + }, $options.getPTOptions("nodeToggleButtonIcon")), null, 16, ["expanded", "class"])) : (openBlock(), createBlock(resolveDynamicComponent($options.expanded ? "ChevronDownIcon" : "ChevronUpIcon"), mergeProps({ + key: 1, + "class": _ctx.cx("nodeToggleButtonIcon") + }, $options.getPTOptions("nodeToggleButtonIcon")), null, 16, ["class"]))], 16)) : createCommentVNode("", true)], 16)], 16, _hoisted_1$e)], 16)) : createCommentVNode("", true), createBaseVNode("tr", mergeProps({ + style: $options.childStyle, + "class": _ctx.cx("connectors") + }, _ctx.ptm("connectors")), [createBaseVNode("td", mergeProps({ + colspan: $options.colspan + }, _ctx.ptm("lineCell")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("connectorDown") + }, _ctx.ptm("connectorDown")), null, 16)], 16, _hoisted_2$a)], 16), createBaseVNode("tr", mergeProps({ + style: $options.childStyle, + "class": _ctx.cx("connectors") + }, _ctx.ptm("connectors")), [$props.node.children && $props.node.children.length === 1 ? (openBlock(), createElementBlock("td", mergeProps({ + key: 0, + colspan: $options.colspan + }, _ctx.ptm("lineCell")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("connectorDown") + }, _ctx.ptm("connectorDown")), null, 16)], 16, _hoisted_3$7)) : createCommentVNode("", true), $props.node.children && $props.node.children.length > 1 ? (openBlock(true), createElementBlock(Fragment, { + key: 1 + }, renderList($props.node.children, function(child, i) { + return openBlock(), createElementBlock(Fragment, { + key: child.key + }, [createBaseVNode("td", mergeProps({ + "class": _ctx.cx("connectorLeft", { + index: i + }), + ref_for: true + }, $options.getNodeOptions(!(i === 0), "connectorLeft")), " ", 16), createBaseVNode("td", mergeProps({ + "class": _ctx.cx("connectorRight", { + index: i + }), + ref_for: true + }, $options.getNodeOptions(!(i === $props.node.children.length - 1), "connectorRight")), " ", 16)], 64); + }), 128)) : createCommentVNode("", true)], 16), createBaseVNode("tr", mergeProps({ + style: $options.childStyle, + "class": _ctx.cx("nodeChildren") + }, _ctx.ptm("nodeChildren")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.node.children, function(child) { + return openBlock(), createElementBlock("td", mergeProps({ + key: child.key, + colspan: "2", + ref_for: true + }, _ctx.ptm("nodeCell")), [createVNode(_component_OrganizationChartNode, { + node: child, + templates: $props.templates, + collapsedKeys: $props.collapsedKeys, + onNodeToggle: $options.onChildNodeToggle, + collapsible: $props.collapsible, + selectionMode: $props.selectionMode, + selectionKeys: $props.selectionKeys, + onNodeClick: $options.onChildNodeClick, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["node", "templates", "collapsedKeys", "onNodeToggle", "collapsible", "selectionMode", "selectionKeys", "onNodeClick", "pt", "unstyled"])], 16); + }), 128))], 16)], 16)], 16); +} +__name(render$1$2, "render$1$2"); +script$1$f.render = render$1$2; +function _typeof$c(o) { + "@babel/helpers - typeof"; + return _typeof$c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$c(o); +} +__name(_typeof$c, "_typeof$c"); +function ownKeys$b(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$b, "ownKeys$b"); +function _objectSpread$b(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$b(Object(t2), true).forEach(function(r2) { + _defineProperty$c(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$b(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$b, "_objectSpread$b"); +function _defineProperty$c(e, r, t2) { + return (r = _toPropertyKey$c(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$c, "_defineProperty$c"); +function _toPropertyKey$c(t2) { + var i = _toPrimitive$c(t2, "string"); + return "symbol" == _typeof$c(i) ? i : i + ""; +} +__name(_toPropertyKey$c, "_toPropertyKey$c"); +function _toPrimitive$c(t2, r) { + if ("object" != _typeof$c(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$c(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$c, "_toPrimitive$c"); +var script$r = { + name: "OrganizationChart", + "extends": script$2$2, + inheritAttrs: false, + emits: ["node-unselect", "node-select", "update:selectionKeys", "node-expand", "node-collapse", "update:collapsedKeys"], + data: /* @__PURE__ */ __name(function data24() { + return { + d_collapsedKeys: this.collapsedKeys || {} + }; + }, "data"), + watch: { + collapsedKeys: /* @__PURE__ */ __name(function collapsedKeys(newValue) { + this.d_collapsedKeys = newValue; + }, "collapsedKeys") + }, + methods: { + onNodeClick: /* @__PURE__ */ __name(function onNodeClick2(node2) { + var key = node2.key; + if (this.selectionMode) { + var _selectionKeys = this.selectionKeys ? _objectSpread$b({}, this.selectionKeys) : {}; + if (_selectionKeys[key]) { + delete _selectionKeys[key]; + this.$emit("node-unselect", node2); + } else { + if (this.selectionMode === "single") { + _selectionKeys = {}; + } + _selectionKeys[key] = true; + this.$emit("node-select", node2); + } + this.$emit("update:selectionKeys", _selectionKeys); + } + }, "onNodeClick"), + onNodeToggle: /* @__PURE__ */ __name(function onNodeToggle(node2) { + var key = node2.key; + if (this.d_collapsedKeys[key]) { + delete this.d_collapsedKeys[key]; + this.$emit("node-expand", node2); + } else { + this.d_collapsedKeys[key] = true; + this.$emit("node-collapse", node2); + } + this.d_collapsedKeys = _objectSpread$b({}, this.d_collapsedKeys); + this.$emit("update:collapsedKeys", this.d_collapsedKeys); + }, "onNodeToggle") + }, + components: { + OrganizationChartNode: script$1$f + } +}; +function render$n(_ctx, _cache, $props, $setup, $data, $options) { + var _component_OrganizationChartNode = resolveComponent("OrganizationChartNode"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createVNode(_component_OrganizationChartNode, { + node: _ctx.value, + templates: _ctx.$slots, + onNodeToggle: $options.onNodeToggle, + collapsedKeys: $data.d_collapsedKeys, + collapsible: _ctx.collapsible, + onNodeClick: $options.onNodeClick, + selectionMode: _ctx.selectionMode, + selectionKeys: _ctx.selectionKeys, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["node", "templates", "onNodeToggle", "collapsedKeys", "collapsible", "onNodeClick", "selectionMode", "selectionKeys", "pt", "unstyled"])], 16); +} +__name(render$n, "render$n"); +script$r.render = render$n; +var script$q = { + name: "OverlayPanel", + "extends": script$1Q, + mounted: /* @__PURE__ */ __name(function mounted25() { + console.warn("Deprecated since v4. Use Popover component instead."); + }, "mounted") +}; +var OverlayPanelStyle = BaseStyle.extend({ + name: "overlaypanel" +}); +var theme$d = /* @__PURE__ */ __name(function theme27(_ref) { + var dt = _ref.dt; + return "\n.p-panelmenu {\n display: flex;\n flex-direction: column;\n gap: ".concat(dt("panelmenu.gap"), ";\n}\n\n.p-panelmenu-panel {\n background: ").concat(dt("panelmenu.panel.background"), ";\n border-width: ").concat(dt("panelmenu.panel.border.width"), ";\n border-style: solid;\n border-color: ").concat(dt("panelmenu.panel.border.color"), ";\n color: ").concat(dt("panelmenu.panel.color"), ";\n border-radius: ").concat(dt("panelmenu.panel.border.radius"), ";\n padding: ").concat(dt("panelmenu.panel.padding"), ";\n}\n\n.p-panelmenu-panel:first-child {\n border-width: ").concat(dt("panelmenu.panel.first.border.width"), ";\n border-start-start-radius: ").concat(dt("panelmenu.panel.first.top.border.radius"), ";\n border-start-end-radius: ").concat(dt("panelmenu.panel.first.top.border.radius"), ";\n}\n\n.p-panelmenu-panel:last-child {\n border-width: ").concat(dt("panelmenu.panel.last.border.width"), ";\n border-end-start-radius: ").concat(dt("panelmenu.panel.last.bottom.border.radius"), ";\n border-end-end-radius: ").concat(dt("panelmenu.panel.last.bottom.border.radius"), ";\n}\n\n.p-panelmenu-header {\n outline: 0 none;\n}\n\n.p-panelmenu-header-content {\n border-radius: ").concat(dt("panelmenu.item.border.radius"), ";\n transition: background ").concat(dt("panelmenu.transition.duration"), ", color ").concat(dt("panelmenu.transition.duration"), ", outline-color ").concat(dt("panelmenu.transition.duration"), ", box-shadow ").concat(dt("panelmenu.transition.duration"), ";\n outline-color: transparent;\n color: ").concat(dt("panelmenu.item.color"), ";\n}\n\n.p-panelmenu-header-link {\n display: flex;\n gap: ").concat(dt("panelmenu.item.gap"), ";\n padding: ").concat(dt("panelmenu.item.padding"), ";\n align-items: center;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n color: inherit;\n}\n\n.p-panelmenu-header-icon,\n.p-panelmenu-item-icon {\n color: ").concat(dt("panelmenu.item.icon.color"), ";\n}\n\n.p-panelmenu-submenu-icon {\n color: ").concat(dt("panelmenu.submenu.icon.color"), ";\n}\n\n.p-panelmenu-submenu-icon:dir(rtl) {\n transform: rotate(180deg);\n}\n\n.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content {\n background: ").concat(dt("panelmenu.item.focus.background"), ";\n color: ").concat(dt("panelmenu.item.focus.color"), ";\n}\n\n.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-header-icon {\n color: ").concat(dt("panelmenu.item.icon.focus.color"), ";\n}\n\n.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-submenu-icon {\n color: ").concat(dt("panelmenu.submenu.icon.focus.color"), ";\n}\n\n.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover {\n background: ").concat(dt("panelmenu.item.focus.background"), ";\n color: ").concat(dt("panelmenu.item.focus.color"), ";\n}\n\n.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-header-icon {\n color: ").concat(dt("panelmenu.item.icon.focus.color"), ";\n}\n\n.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-submenu-icon {\n color: ").concat(dt("panelmenu.submenu.icon.focus.color"), ";\n}\n\n.p-panelmenu-submenu {\n margin: 0;\n padding: 0 0 0 ").concat(dt("panelmenu.submenu.indent"), ";\n outline: 0;\n list-style: none;\n}\n\n.p-panelmenu-submenu:dir(rtl) {\n padding: 0 ").concat(dt("panelmenu.submenu.indent"), " 0 0;\n}\n\n.p-panelmenu-item-link {\n display: flex;\n gap: ").concat(dt("panelmenu.item.gap"), ";\n padding: ").concat(dt("panelmenu.item.padding"), ";\n align-items: center;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n color: inherit;\n position: relative;\n overflow: hidden;\n}\n\n.p-panelmenu-item-label {\n line-height: 1;\n}\n\n.p-panelmenu-item-content {\n border-radius: ").concat(dt("panelmenu.item.border.radius"), ";\n transition: background ").concat(dt("panelmenu.transition.duration"), ", color ").concat(dt("panelmenu.transition.duration"), ", outline-color ").concat(dt("panelmenu.transition.duration"), ", box-shadow ").concat(dt("panelmenu.transition.duration"), ";\n color: ").concat(dt("panelmenu.item.color"), ";\n outline-color: transparent;\n}\n\n.p-panelmenu-item.p-focus > .p-panelmenu-item-content {\n background: ").concat(dt("panelmenu.item.focus.background"), ";\n color: ").concat(dt("panelmenu.item.focus.color"), ";\n}\n\n.p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-item-icon {\n color: ").concat(dt("panelmenu.item.focus.color"), ";\n}\n\n.p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-submenu-icon {\n color: ").concat(dt("panelmenu.submenu.icon.focus.color"), ";\n}\n\n.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover {\n background: ").concat(dt("panelmenu.item.focus.background"), ";\n color: ").concat(dt("panelmenu.item.focus.color"), ";\n}\n\n.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-item-icon {\n color: ").concat(dt("panelmenu.item.icon.focus.color"), ";\n}\n\n.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-submenu-icon {\n color: ").concat(dt("panelmenu.submenu.icon.focus.color"), ";\n}\n"); +}, "theme"); +var classes$e = { + root: "p-panelmenu p-component", + panel: "p-panelmenu-panel", + header: /* @__PURE__ */ __name(function header(_ref2) { + var instance = _ref2.instance, item8 = _ref2.item; + return ["p-panelmenu-header", { + "p-panelmenu-header-active": instance.isItemActive(item8) && !!item8.items, + "p-disabled": instance.isItemDisabled(item8) + }]; + }, "header"), + headerContent: "p-panelmenu-header-content", + headerLink: "p-panelmenu-header-link", + headerIcon: "p-panelmenu-header-icon", + headerLabel: "p-panelmenu-header-label", + contentContainer: "p-panelmenu-content-container", + content: "p-panelmenu-content", + rootList: "p-panelmenu-root-list", + item: /* @__PURE__ */ __name(function item5(_ref3) { + var instance = _ref3.instance, processedItem = _ref3.processedItem; + return ["p-panelmenu-item", { + "p-focus": instance.isItemFocused(processedItem), + "p-disabled": instance.isItemDisabled(processedItem) + }]; + }, "item"), + itemContent: "p-panelmenu-item-content", + itemLink: "p-panelmenu-item-link", + itemIcon: "p-panelmenu-item-icon", + itemLabel: "p-panelmenu-item-label", + submenuIcon: "p-panelmenu-submenu-icon", + submenu: "p-panelmenu-submenu", + separator: "p-menuitem-separator" +}; +var PanelMenuStyle = BaseStyle.extend({ + name: "panelmenu", + theme: theme$d, + classes: classes$e +}); +var script$3$1 = { + name: "BasePanelMenu", + "extends": script$1d, + props: { + model: { + type: Array, + "default": null + }, + expandedKeys: { + type: Object, + "default": null + }, + multiple: { + type: Boolean, + "default": false + }, + tabindex: { + type: Number, + "default": 0 + } + }, + style: PanelMenuStyle, + provide: /* @__PURE__ */ __name(function provide37() { + return { + $pcPanelMenu: this, + $parentInstance: this + }; + }, "provide") +}; +var script$2$1 = { + name: "PanelMenuSub", + hostName: "PanelMenu", + "extends": script$1d, + emits: ["item-toggle", "item-mousemove"], + props: { + panelId: { + type: String, + "default": null + }, + focusedItemId: { + type: String, + "default": null + }, + items: { + type: Array, + "default": null + }, + level: { + type: Number, + "default": 0 + }, + templates: { + type: Object, + "default": null + }, + activeItemPath: { + type: Object, + "default": null + }, + tabindex: { + type: Number, + "default": -1 + } + }, + methods: { + getItemId: /* @__PURE__ */ __name(function getItemId3(processedItem) { + return "".concat(this.panelId, "_").concat(processedItem.key); + }, "getItemId"), + getItemKey: /* @__PURE__ */ __name(function getItemKey2(processedItem) { + return this.getItemId(processedItem); + }, "getItemKey"), + getItemProp: /* @__PURE__ */ __name(function getItemProp5(processedItem, name4, params) { + return processedItem && processedItem.item ? resolve(processedItem.item[name4], params) : void 0; + }, "getItemProp"), + getItemLabel: /* @__PURE__ */ __name(function getItemLabel3(processedItem) { + return this.getItemProp(processedItem, "label"); + }, "getItemLabel"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions7(key, processedItem, index) { + return this.ptm(key, { + context: { + item: processedItem.item, + index, + active: this.isItemActive(processedItem), + focused: this.isItemFocused(processedItem), + disabled: this.isItemDisabled(processedItem) + } + }); + }, "getPTOptions"), + isItemActive: /* @__PURE__ */ __name(function isItemActive4(processedItem) { + return this.activeItemPath.some(function(path) { + return path.key === processedItem.key; + }); + }, "isItemActive"), + isItemVisible: /* @__PURE__ */ __name(function isItemVisible3(processedItem) { + return this.getItemProp(processedItem, "visible") !== false; + }, "isItemVisible"), + isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled3(processedItem) { + return this.getItemProp(processedItem, "disabled"); + }, "isItemDisabled"), + isItemFocused: /* @__PURE__ */ __name(function isItemFocused3(processedItem) { + return this.focusedItemId === this.getItemId(processedItem); + }, "isItemFocused"), + isItemGroup: /* @__PURE__ */ __name(function isItemGroup3(processedItem) { + return isNotEmpty(processedItem.items); + }, "isItemGroup"), + onItemClick: /* @__PURE__ */ __name(function onItemClick5(event2, processedItem) { + this.getItemProp(processedItem, "command", { + originalEvent: event2, + item: processedItem.item + }); + this.$emit("item-toggle", { + processedItem, + expanded: !this.isItemActive(processedItem) + }); + }, "onItemClick"), + onItemToggle: /* @__PURE__ */ __name(function onItemToggle(event2) { + this.$emit("item-toggle", event2); + }, "onItemToggle"), + onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove2(event2, processedItem) { + this.$emit("item-mousemove", { + originalEvent: event2, + processedItem + }); + }, "onItemMouseMove"), + getAriaSetSize: /* @__PURE__ */ __name(function getAriaSetSize2() { + var _this = this; + return this.items.filter(function(processedItem) { + return _this.isItemVisible(processedItem) && !_this.getItemProp(processedItem, "separator"); + }).length; + }, "getAriaSetSize"), + getAriaPosInset: /* @__PURE__ */ __name(function getAriaPosInset3(index) { + var _this2 = this; + return index - this.items.slice(0, index).filter(function(processedItem) { + return _this2.isItemVisible(processedItem) && _this2.getItemProp(processedItem, "separator"); + }).length + 1; + }, "getAriaPosInset"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps5(processedItem, index) { + return { + action: mergeProps({ + "class": this.cx("itemLink"), + tabindex: -1 + }, this.getPTOptions("itemLink", processedItem, index)), + icon: mergeProps({ + "class": [this.cx("itemIcon"), this.getItemProp(processedItem, "icon")] + }, this.getPTOptions("itemIcon", processedItem, index)), + label: mergeProps({ + "class": this.cx("itemLabel") + }, this.getPTOptions("itemLabel", processedItem, index)), + submenuicon: mergeProps({ + "class": this.cx("submenuIcon") + }, this.getPTOptions("submenuicon", processedItem, index)) + }; + }, "getMenuItemProps") + }, + components: { + ChevronRightIcon: script$1l, + ChevronDownIcon: script$1k + }, + directives: { + ripple: Ripple + } +}; +var _hoisted_1$1$2 = ["tabindex"]; +var _hoisted_2$1$1 = ["id", "aria-label", "aria-expanded", "aria-level", "aria-setsize", "aria-posinset", "data-p-focused", "data-p-disabled"]; +var _hoisted_3$1$1 = ["onClick", "onMousemove"]; +var _hoisted_4$1$1 = ["href", "target"]; +function render$2$1(_ctx, _cache, $props, $setup, $data, $options) { + var _component_PanelMenuSub = resolveComponent("PanelMenuSub", true); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("ul", { + "class": normalizeClass(_ctx.cx("submenu")), + tabindex: $props.tabindex + }, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function(processedItem, index) { + return openBlock(), createElementBlock(Fragment, { + key: $options.getItemKey(processedItem) + }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + id: $options.getItemId(processedItem), + "class": [_ctx.cx("item", { + processedItem + }), $options.getItemProp(processedItem, "class")], + style: $options.getItemProp(processedItem, "style"), + role: "treeitem", + "aria-label": $options.getItemLabel(processedItem), + "aria-expanded": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : void 0, + "aria-level": $props.level + 1, + "aria-setsize": $options.getAriaSetSize(), + "aria-posinset": $options.getAriaPosInset(index), + ref_for: true + }, $options.getPTOptions("item", processedItem, index), { + "data-p-focused": $options.isItemFocused(processedItem), + "data-p-disabled": $options.isItemDisabled(processedItem) + }), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("itemContent"), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onItemClick($event, processedItem); + }, "onClick"), + onMousemove: /* @__PURE__ */ __name(function onMousemove($event) { + return $options.onItemMouseMove($event, processedItem); + }, "onMousemove"), + ref_for: true + }, $options.getPTOptions("itemContent", processedItem, index)), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ + key: 0, + href: $options.getItemProp(processedItem, "url"), + "class": _ctx.cx("itemLink"), + target: $options.getItemProp(processedItem, "target"), + tabindex: "-1", + ref_for: true + }, $options.getPTOptions("itemLink", processedItem, index)), [$options.isItemGroup(processedItem) ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), mergeProps({ + key: 0, + "class": _ctx.cx("submenuIcon"), + active: $options.isItemActive(processedItem), + ref_for: true + }, $options.getPTOptions("submenuIcon", processedItem, index)), null, 16, ["class", "active"])) : (openBlock(), createBlock(resolveDynamicComponent($options.isItemActive(processedItem) ? "ChevronDownIcon" : "ChevronRightIcon"), mergeProps({ + key: 1, + "class": _ctx.cx("submenuIcon"), + ref_for: true + }, $options.getPTOptions("submenuIcon", processedItem, index)), null, 16, ["class"]))], 64)) : createCommentVNode("", true), $props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), { + key: 1, + item: processedItem.item, + "class": normalizeClass(_ctx.cx("itemIcon")) + }, null, 8, ["item", "class"])) : $options.getItemProp(processedItem, "icon") ? (openBlock(), createElementBlock("span", mergeProps({ + key: 2, + "class": [_ctx.cx("itemIcon"), $options.getItemProp(processedItem, "icon")], + ref_for: true + }, $options.getPTOptions("itemIcon", processedItem, index)), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("itemLabel"), + ref_for: true + }, $options.getPTOptions("itemLabel", processedItem, index)), toDisplayString($options.getItemLabel(processedItem)), 17)], 16, _hoisted_4$1$1)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + key: 1, + item: processedItem.item, + root: false, + active: $options.isItemActive(processedItem), + hasSubmenu: $options.isItemGroup(processedItem), + label: $options.getItemLabel(processedItem), + props: $options.getMenuItemProps(processedItem, index) + }, null, 8, ["item", "active", "hasSubmenu", "label", "props"]))], 16, _hoisted_3$1$1), createVNode(Transition, mergeProps({ + name: "p-toggleable-content", + ref_for: true + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [withDirectives(createBaseVNode("div", mergeProps({ + "class": _ctx.cx("contentContainer"), + ref_for: true + }, _ctx.ptm("contentContainer")), [$options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_PanelMenuSub, mergeProps({ + key: 0, + id: $options.getItemId(processedItem) + "_list", + role: "group", + panelId: $props.panelId, + focusedItemId: $props.focusedItemId, + items: processedItem.items, + level: $props.level + 1, + templates: $props.templates, + activeItemPath: $props.activeItemPath, + onItemToggle: $options.onItemToggle, + onItemMousemove: _cache[0] || (_cache[0] = function($event) { + return _ctx.$emit("item-mousemove", $event); + }), + pt: _ctx.pt, + unstyled: _ctx.unstyled, + ref_for: true + }, _ctx.ptm("submenu")), null, 16, ["id", "panelId", "focusedItemId", "items", "level", "templates", "activeItemPath", "onItemToggle", "pt", "unstyled"])) : createCommentVNode("", true)], 16), [[vShow, $options.isItemActive(processedItem)]])]; + }), + _: 2 + }, 1040)], 16, _hoisted_2$1$1)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ + key: 1, + style: $options.getItemProp(processedItem, "style"), + "class": [_ctx.cx("separator"), $options.getItemProp(processedItem, "class")], + role: "separator", + ref_for: true + }, _ctx.ptm("separator")), null, 16)) : createCommentVNode("", true)], 64); + }), 128))], 10, _hoisted_1$1$2); +} +__name(render$2$1, "render$2$1"); +script$2$1.render = render$2$1; +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$5(r, e) || _nonIterableRest(); +} +__name(_slicedToArray, "_slicedToArray"); +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableRest, "_nonIterableRest"); +function _unsupportedIterableToArray$5(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$5(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$5(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$5, "_unsupportedIterableToArray$5"); +function _arrayLikeToArray$5(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$5, "_arrayLikeToArray$5"); +function _iterableToArrayLimit(r, l) { + var t2 = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t2) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t2 = t2.call(r)).next, 0 === l) ; + else for (; !(f = (e = i.call(t2)).done) && (a.push(e.value), a.length !== l); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t2["return"] && (u = t2["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +__name(_iterableToArrayLimit, "_iterableToArrayLimit"); +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +__name(_arrayWithHoles, "_arrayWithHoles"); +var script$1$e = { + name: "PanelMenuList", + hostName: "PanelMenu", + "extends": script$1d, + emits: ["item-toggle", "header-focus"], + props: { + panelId: { + type: String, + "default": null + }, + items: { + type: Array, + "default": null + }, + templates: { + type: Object, + "default": null + }, + expandedKeys: { + type: Object, + "default": null + } + }, + searchTimeout: null, + searchValue: null, + data: /* @__PURE__ */ __name(function data25() { + return { + focused: false, + focusedItem: null, + activeItemPath: [] + }; + }, "data"), + watch: { + expandedKeys: /* @__PURE__ */ __name(function expandedKeys(newValue) { + this.autoUpdateActiveItemPath(newValue); + }, "expandedKeys") + }, + mounted: /* @__PURE__ */ __name(function mounted26() { + this.autoUpdateActiveItemPath(this.expandedKeys); + }, "mounted"), + methods: { + getItemProp: /* @__PURE__ */ __name(function getItemProp6(processedItem, name4) { + return processedItem && processedItem.item ? resolve(processedItem.item[name4]) : void 0; + }, "getItemProp"), + getItemLabel: /* @__PURE__ */ __name(function getItemLabel4(processedItem) { + return this.getItemProp(processedItem, "label"); + }, "getItemLabel"), + isItemVisible: /* @__PURE__ */ __name(function isItemVisible4(processedItem) { + return this.getItemProp(processedItem, "visible") !== false; + }, "isItemVisible"), + isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled4(processedItem) { + return this.getItemProp(processedItem, "disabled"); + }, "isItemDisabled"), + isItemActive: /* @__PURE__ */ __name(function isItemActive5(processedItem) { + return this.activeItemPath.some(function(path) { + return path.key === processedItem.parentKey; + }); + }, "isItemActive"), + isItemGroup: /* @__PURE__ */ __name(function isItemGroup4(processedItem) { + return isNotEmpty(processedItem.items); + }, "isItemGroup"), + onFocus: /* @__PURE__ */ __name(function onFocus10(event2) { + this.focused = true; + this.focusedItem = this.focusedItem || (this.isElementInPanel(event2, event2.relatedTarget) ? this.findFirstItem() : this.findLastItem()); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur10() { + this.focused = false; + this.focusedItem = null; + this.searchValue = ""; + }, "onBlur"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown10(event2) { + var metaKey = event2.metaKey || event2.ctrlKey; + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "ArrowLeft": + this.onArrowLeftKey(event2); + break; + case "ArrowRight": + this.onArrowRightKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "Space": + this.onSpaceKey(event2); + break; + case "Enter": + case "NumpadEnter": + this.onEnterKey(event2); + break; + case "Escape": + case "Tab": + case "PageDown": + case "PageUp": + case "Backspace": + case "ShiftLeft": + case "ShiftRight": + break; + default: + if (!metaKey && isPrintableCharacter(event2.key)) { + this.searchItems(event2, event2.key); + } + break; + } + }, "onKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey7(event2) { + var processedItem = isNotEmpty(this.focusedItem) ? this.findNextItem(this.focusedItem) : this.findFirstItem(); + this.changeFocusedItem({ + originalEvent: event2, + processedItem, + focusOnNext: true + }); + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey7(event2) { + var processedItem = isNotEmpty(this.focusedItem) ? this.findPrevItem(this.focusedItem) : this.findLastItem(); + this.changeFocusedItem({ + originalEvent: event2, + processedItem, + selfCheck: true + }); + event2.preventDefault(); + }, "onArrowUpKey"), + onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey4(event2) { + var _this = this; + if (isNotEmpty(this.focusedItem)) { + var matched = this.activeItemPath.some(function(p) { + return p.key === _this.focusedItem.key; + }); + if (matched) { + this.activeItemPath = this.activeItemPath.filter(function(p) { + return p.key !== _this.focusedItem.key; + }); + } else { + this.focusedItem = isNotEmpty(this.focusedItem.parent) ? this.focusedItem.parent : this.focusedItem; + } + event2.preventDefault(); + } + }, "onArrowLeftKey"), + onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey3(event2) { + var _this2 = this; + if (isNotEmpty(this.focusedItem)) { + var grouped = this.isItemGroup(this.focusedItem); + if (grouped) { + var matched = this.activeItemPath.some(function(p) { + return p.key === _this2.focusedItem.key; + }); + if (matched) { + this.onArrowDownKey(event2); + } else { + this.activeItemPath = this.activeItemPath.filter(function(p) { + return p.parentKey !== _this2.focusedItem.parentKey; + }); + this.activeItemPath.push(this.focusedItem); + } + } + event2.preventDefault(); + } + }, "onArrowRightKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey7(event2) { + this.changeFocusedItem({ + originalEvent: event2, + processedItem: this.findFirstItem(), + allowHeaderFocus: false + }); + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey7(event2) { + this.changeFocusedItem({ + originalEvent: event2, + processedItem: this.findLastItem(), + focusOnNext: true, + allowHeaderFocus: false + }); + event2.preventDefault(); + }, "onEndKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey6(event2) { + if (isNotEmpty(this.focusedItem)) { + var element = findSingle(this.$el, 'li[id="'.concat("".concat(this.focusedItemId), '"]')); + var anchorElement = element && (findSingle(element, '[data-pc-section="itemlink"]') || findSingle(element, "a,button")); + anchorElement ? anchorElement.click() : element && element.click(); + } + event2.preventDefault(); + }, "onEnterKey"), + onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey5(event2) { + this.onEnterKey(event2); + }, "onSpaceKey"), + onItemToggle: /* @__PURE__ */ __name(function onItemToggle2(event2) { + var processedItem = event2.processedItem, expanded3 = event2.expanded; + if (this.expandedKeys) { + this.$emit("item-toggle", { + item: processedItem.item, + expanded: expanded3 + }); + } else { + this.activeItemPath = this.activeItemPath.filter(function(p) { + return p.parentKey !== processedItem.parentKey; + }); + expanded3 && this.activeItemPath.push(processedItem); + } + this.focusedItem = processedItem; + focus(this.$el); + }, "onItemToggle"), + onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove3(event2) { + if (this.focused) { + this.focusedItem = event2.processedItem; + } + }, "onItemMouseMove"), + isElementInPanel: /* @__PURE__ */ __name(function isElementInPanel(event2, element) { + var panel2 = event2.currentTarget.closest('[data-pc-section="panel"]'); + return panel2 && panel2.contains(element); + }, "isElementInPanel"), + isItemMatched: /* @__PURE__ */ __name(function isItemMatched2(processedItem) { + var _this$getItemLabel; + return this.isValidItem(processedItem) && ((_this$getItemLabel = this.getItemLabel(processedItem)) === null || _this$getItemLabel === void 0 ? void 0 : _this$getItemLabel.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))); + }, "isItemMatched"), + isVisibleItem: /* @__PURE__ */ __name(function isVisibleItem(processedItem) { + return !!processedItem && (processedItem.level === 0 || this.isItemActive(processedItem)) && this.isItemVisible(processedItem); + }, "isVisibleItem"), + isValidItem: /* @__PURE__ */ __name(function isValidItem2(processedItem) { + return !!processedItem && !this.isItemDisabled(processedItem) && !this.getItemProp(processedItem, "separator"); + }, "isValidItem"), + findFirstItem: /* @__PURE__ */ __name(function findFirstItem() { + var _this3 = this; + return this.visibleItems.find(function(processedItem) { + return _this3.isValidItem(processedItem); + }); + }, "findFirstItem"), + findLastItem: /* @__PURE__ */ __name(function findLastItem() { + var _this4 = this; + return findLast(this.visibleItems, function(processedItem) { + return _this4.isValidItem(processedItem); + }); + }, "findLastItem"), + findNextItem: /* @__PURE__ */ __name(function findNextItem(processedItem) { + var _this5 = this; + var index = this.visibleItems.findIndex(function(item8) { + return item8.key === processedItem.key; + }); + var matchedItem = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).find(function(pItem) { + return _this5.isValidItem(pItem); + }) : void 0; + return matchedItem || processedItem; + }, "findNextItem"), + findPrevItem: /* @__PURE__ */ __name(function findPrevItem(processedItem) { + var _this6 = this; + var index = this.visibleItems.findIndex(function(item8) { + return item8.key === processedItem.key; + }); + var matchedItem = index > 0 ? findLast(this.visibleItems.slice(0, index), function(pItem) { + return _this6.isValidItem(pItem); + }) : void 0; + return matchedItem || processedItem; + }, "findPrevItem"), + searchItems: /* @__PURE__ */ __name(function searchItems2(event2, _char) { + var _this7 = this; + this.searchValue = (this.searchValue || "") + _char; + var matchedItem = null; + var matched = false; + if (isNotEmpty(this.focusedItem)) { + var focusedItemIndex = this.visibleItems.findIndex(function(processedItem) { + return processedItem.key === _this7.focusedItem.key; + }); + matchedItem = this.visibleItems.slice(focusedItemIndex).find(function(processedItem) { + return _this7.isItemMatched(processedItem); + }); + matchedItem = isEmpty(matchedItem) ? this.visibleItems.slice(0, focusedItemIndex).find(function(processedItem) { + return _this7.isItemMatched(processedItem); + }) : matchedItem; + } else { + matchedItem = this.visibleItems.find(function(processedItem) { + return _this7.isItemMatched(processedItem); + }); + } + if (isNotEmpty(matchedItem)) { + matched = true; + } + if (isEmpty(matchedItem) && isEmpty(this.focusedItem)) { + matchedItem = this.findFirstItem(); + } + if (isNotEmpty(matchedItem)) { + this.changeFocusedItem({ + originalEvent: event2, + processedItem: matchedItem, + allowHeaderFocus: false + }); + } + if (this.searchTimeout) { + clearTimeout(this.searchTimeout); + } + this.searchTimeout = setTimeout(function() { + _this7.searchValue = ""; + _this7.searchTimeout = null; + }, 500); + return matched; + }, "searchItems"), + changeFocusedItem: /* @__PURE__ */ __name(function changeFocusedItem(event2) { + var originalEvent = event2.originalEvent, processedItem = event2.processedItem, focusOnNext = event2.focusOnNext, selfCheck = event2.selfCheck, _event$allowHeaderFoc = event2.allowHeaderFocus, allowHeaderFocus = _event$allowHeaderFoc === void 0 ? true : _event$allowHeaderFoc; + if (isNotEmpty(this.focusedItem) && this.focusedItem.key !== processedItem.key) { + this.focusedItem = processedItem; + this.scrollInView(); + } else if (allowHeaderFocus) { + this.$emit("header-focus", { + originalEvent, + focusOnNext, + selfCheck + }); + } + }, "changeFocusedItem"), + scrollInView: /* @__PURE__ */ __name(function scrollInView5() { + var element = findSingle(this.$el, 'li[id="'.concat("".concat(this.focusedItemId), '"]')); + if (element) { + element.scrollIntoView && element.scrollIntoView({ + block: "nearest", + inline: "start" + }); + } + }, "scrollInView"), + autoUpdateActiveItemPath: /* @__PURE__ */ __name(function autoUpdateActiveItemPath(expandedKeys4) { + var _this8 = this; + this.activeItemPath = Object.entries(expandedKeys4 || {}).reduce(function(acc, _ref) { + var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], val = _ref2[1]; + if (val) { + var processedItem = _this8.findProcessedItemByItemKey(key); + processedItem && acc.push(processedItem); + } + return acc; + }, []); + }, "autoUpdateActiveItemPath"), + findProcessedItemByItemKey: /* @__PURE__ */ __name(function findProcessedItemByItemKey(key, processedItems3) { + var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + processedItems3 = processedItems3 || level === 0 && this.processedItems; + if (!processedItems3) return null; + for (var i = 0; i < processedItems3.length; i++) { + var processedItem = processedItems3[i]; + if (this.getItemProp(processedItem, "key") === key) return processedItem; + var matchedItem = this.findProcessedItemByItemKey(key, processedItem.items, level + 1); + if (matchedItem) return matchedItem; + } + }, "findProcessedItemByItemKey"), + createProcessedItems: /* @__PURE__ */ __name(function createProcessedItems2(items2) { + var _this9 = this; + var level = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var parentKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ""; + var processedItems3 = []; + items2 && items2.forEach(function(item8, index) { + var key = (parentKey !== "" ? parentKey + "_" : "") + index; + var newItem = { + item: item8, + index, + level, + key, + parent, + parentKey + }; + newItem["items"] = _this9.createProcessedItems(item8.items, level + 1, newItem, key); + processedItems3.push(newItem); + }); + return processedItems3; + }, "createProcessedItems"), + flatItems: /* @__PURE__ */ __name(function flatItems(processedItems3) { + var _this10 = this; + var processedFlattenItems = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []; + processedItems3 && processedItems3.forEach(function(processedItem) { + if (_this10.isVisibleItem(processedItem)) { + processedFlattenItems.push(processedItem); + _this10.flatItems(processedItem.items, processedFlattenItems); + } + }); + return processedFlattenItems; + }, "flatItems") + }, + computed: { + processedItems: /* @__PURE__ */ __name(function processedItems2() { + return this.createProcessedItems(this.items || []); + }, "processedItems"), + visibleItems: /* @__PURE__ */ __name(function visibleItems2() { + return this.flatItems(this.processedItems); + }, "visibleItems"), + focusedItemId: /* @__PURE__ */ __name(function focusedItemId2() { + return isNotEmpty(this.focusedItem) ? "".concat(this.panelId, "_").concat(this.focusedItem.key) : null; + }, "focusedItemId") + }, + components: { + PanelMenuSub: script$2$1 + } +}; +function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { + var _component_PanelMenuSub = resolveComponent("PanelMenuSub"); + return openBlock(), createBlock(_component_PanelMenuSub, mergeProps({ + id: $props.panelId + "_list", + "class": _ctx.cx("rootList"), + role: "tree", + tabindex: -1, + "aria-activedescendant": $data.focused ? $options.focusedItemId : void 0, + panelId: $props.panelId, + focusedItemId: $data.focused ? $options.focusedItemId : void 0, + items: $options.processedItems, + templates: $props.templates, + activeItemPath: $data.activeItemPath, + onFocus: $options.onFocus, + onBlur: $options.onBlur, + onKeydown: $options.onKeyDown, + onItemToggle: $options.onItemToggle, + onItemMousemove: $options.onItemMouseMove, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, _ctx.ptm("rootList")), null, 16, ["id", "class", "aria-activedescendant", "panelId", "focusedItemId", "items", "templates", "activeItemPath", "onFocus", "onBlur", "onKeydown", "onItemToggle", "onItemMousemove", "pt", "unstyled"]); +} +__name(render$1$1, "render$1$1"); +script$1$e.render = render$1$1; +function _typeof$b(o) { + "@babel/helpers - typeof"; + return _typeof$b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$b(o); +} +__name(_typeof$b, "_typeof$b"); +function ownKeys$a(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$a, "ownKeys$a"); +function _objectSpread$a(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$a(Object(t2), true).forEach(function(r2) { + _defineProperty$b(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$a(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$a, "_objectSpread$a"); +function _defineProperty$b(e, r, t2) { + return (r = _toPropertyKey$b(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$b, "_defineProperty$b"); +function _toPropertyKey$b(t2) { + var i = _toPrimitive$b(t2, "string"); + return "symbol" == _typeof$b(i) ? i : i + ""; +} +__name(_toPropertyKey$b, "_toPropertyKey$b"); +function _toPrimitive$b(t2, r) { + if ("object" != _typeof$b(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$b(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$b, "_toPrimitive$b"); +var script$p = { + name: "PanelMenu", + "extends": script$3$1, + inheritAttrs: false, + emits: ["update:expandedKeys", "panel-open", "panel-close"], + data: /* @__PURE__ */ __name(function data26() { + return { + id: this.$attrs.id, + activeItem: null, + activeItems: [] + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId9(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId") + }, + mounted: /* @__PURE__ */ __name(function mounted27() { + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + getItemProp: /* @__PURE__ */ __name(function getItemProp7(item8, name4) { + return item8 ? resolve(item8[name4]) : void 0; + }, "getItemProp"), + getItemLabel: /* @__PURE__ */ __name(function getItemLabel5(item8) { + return this.getItemProp(item8, "label"); + }, "getItemLabel"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions8(key, item8, index) { + return this.ptm(key, { + context: { + index, + active: this.isItemActive(item8), + focused: this.isItemFocused(item8), + disabled: this.isItemDisabled(item8) + } + }); + }, "getPTOptions"), + isItemActive: /* @__PURE__ */ __name(function isItemActive6(item8) { + return this.expandedKeys ? this.expandedKeys[this.getItemProp(item8, "key")] : this.multiple ? this.activeItems.some(function(subItem) { + return equals(item8, subItem); + }) : equals(item8, this.activeItem); + }, "isItemActive"), + isItemVisible: /* @__PURE__ */ __name(function isItemVisible5(item8) { + return this.getItemProp(item8, "visible") !== false; + }, "isItemVisible"), + isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled5(item8) { + return this.getItemProp(item8, "disabled"); + }, "isItemDisabled"), + isItemFocused: /* @__PURE__ */ __name(function isItemFocused4(item8) { + return equals(item8, this.activeItem); + }, "isItemFocused"), + isItemGroup: /* @__PURE__ */ __name(function isItemGroup5(item8) { + return isNotEmpty(item8.items); + }, "isItemGroup"), + getPanelId: /* @__PURE__ */ __name(function getPanelId(index) { + return "".concat(this.id, "_").concat(index); + }, "getPanelId"), + getPanelKey: /* @__PURE__ */ __name(function getPanelKey(index) { + return this.getPanelId(index); + }, "getPanelKey"), + getHeaderId: /* @__PURE__ */ __name(function getHeaderId(index) { + return "".concat(this.getPanelId(index), "_header"); + }, "getHeaderId"), + getContentId: /* @__PURE__ */ __name(function getContentId(index) { + return "".concat(this.getPanelId(index), "_content"); + }, "getContentId"), + onHeaderClick: /* @__PURE__ */ __name(function onHeaderClick(event2, item8) { + if (this.isItemDisabled(item8)) { + event2.preventDefault(); + return; + } + if (item8.command) { + item8.command({ + originalEvent: event2, + item: item8 + }); + } + this.changeActiveItem(event2, item8); + focus(event2.currentTarget); + }, "onHeaderClick"), + onHeaderKeyDown: /* @__PURE__ */ __name(function onHeaderKeyDown(event2, item8) { + switch (event2.code) { + case "ArrowDown": + this.onHeaderArrowDownKey(event2); + break; + case "ArrowUp": + this.onHeaderArrowUpKey(event2); + break; + case "Home": + this.onHeaderHomeKey(event2); + break; + case "End": + this.onHeaderEndKey(event2); + break; + case "Enter": + case "NumpadEnter": + case "Space": + this.onHeaderEnterKey(event2, item8); + break; + } + }, "onHeaderKeyDown"), + onHeaderArrowDownKey: /* @__PURE__ */ __name(function onHeaderArrowDownKey(event2) { + var rootList2 = getAttribute(event2.currentTarget, "data-p-active") === true ? findSingle(event2.currentTarget.nextElementSibling, '[data-pc-section="rootlist"]') : null; + rootList2 ? focus(rootList2) : this.updateFocusedHeader({ + originalEvent: event2, + focusOnNext: true + }); + event2.preventDefault(); + }, "onHeaderArrowDownKey"), + onHeaderArrowUpKey: /* @__PURE__ */ __name(function onHeaderArrowUpKey(event2) { + var prevHeader = this.findPrevHeader(event2.currentTarget.parentElement) || this.findLastHeader(); + var rootList2 = getAttribute(prevHeader, "data-p-active") === true ? findSingle(prevHeader.nextElementSibling, '[data-pc-section="rootlist"]') : null; + rootList2 ? focus(rootList2) : this.updateFocusedHeader({ + originalEvent: event2, + focusOnNext: false + }); + event2.preventDefault(); + }, "onHeaderArrowUpKey"), + onHeaderHomeKey: /* @__PURE__ */ __name(function onHeaderHomeKey(event2) { + this.changeFocusedHeader(event2, this.findFirstHeader()); + event2.preventDefault(); + }, "onHeaderHomeKey"), + onHeaderEndKey: /* @__PURE__ */ __name(function onHeaderEndKey(event2) { + this.changeFocusedHeader(event2, this.findLastHeader()); + event2.preventDefault(); + }, "onHeaderEndKey"), + onHeaderEnterKey: /* @__PURE__ */ __name(function onHeaderEnterKey(event2, item8) { + var headerAction = findSingle(event2.currentTarget, '[data-pc-section="headerlink"]'); + headerAction ? headerAction.click() : this.onHeaderClick(event2, item8); + event2.preventDefault(); + }, "onHeaderEnterKey"), + findNextHeader: /* @__PURE__ */ __name(function findNextHeader(panelElement) { + var selfCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var nextPanelElement = selfCheck ? panelElement : panelElement.nextElementSibling; + var headerElement = findSingle(nextPanelElement, '[data-pc-section="header"]'); + return headerElement ? getAttribute(headerElement, "data-p-disabled") ? this.findNextHeader(headerElement.parentElement) : headerElement : null; + }, "findNextHeader"), + findPrevHeader: /* @__PURE__ */ __name(function findPrevHeader(panelElement) { + var selfCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var prevPanelElement = selfCheck ? panelElement : panelElement.previousElementSibling; + var headerElement = findSingle(prevPanelElement, '[data-pc-section="header"]'); + return headerElement ? getAttribute(headerElement, "data-p-disabled") ? this.findPrevHeader(headerElement.parentElement) : headerElement : null; + }, "findPrevHeader"), + findFirstHeader: /* @__PURE__ */ __name(function findFirstHeader() { + return this.findNextHeader(this.$el.firstElementChild, true); + }, "findFirstHeader"), + findLastHeader: /* @__PURE__ */ __name(function findLastHeader() { + return this.findPrevHeader(this.$el.lastElementChild, true); + }, "findLastHeader"), + updateFocusedHeader: /* @__PURE__ */ __name(function updateFocusedHeader(event2) { + var originalEvent = event2.originalEvent, focusOnNext = event2.focusOnNext, selfCheck = event2.selfCheck; + var panelElement = originalEvent.currentTarget.closest('[data-pc-section="panel"]'); + var header2 = selfCheck ? findSingle(panelElement, '[data-pc-section="header"]') : focusOnNext ? this.findNextHeader(panelElement) : this.findPrevHeader(panelElement); + header2 ? this.changeFocusedHeader(originalEvent, header2) : focusOnNext ? this.onHeaderHomeKey(originalEvent) : this.onHeaderEndKey(originalEvent); + }, "updateFocusedHeader"), + changeActiveItem: /* @__PURE__ */ __name(function changeActiveItem(event2, item8) { + var selfActive = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; + if (!this.isItemDisabled(item8)) { + var active3 = this.isItemActive(item8); + var eventName = !active3 ? "panel-open" : "panel-close"; + this.activeItem = selfActive ? item8 : this.activeItem && equals(item8, this.activeItem) ? null : item8; + if (this.multiple) { + if (this.activeItems.some(function(subItem) { + return equals(item8, subItem); + })) { + this.activeItems = this.activeItems.filter(function(subItem) { + return !equals(item8, subItem); + }); + } else { + this.activeItems.push(item8); + } + } + this.changeExpandedKeys({ + item: item8, + expanded: !active3 + }); + this.$emit(eventName, { + originalEvent: event2, + item: item8 + }); + } + }, "changeActiveItem"), + changeExpandedKeys: /* @__PURE__ */ __name(function changeExpandedKeys(_ref) { + var item8 = _ref.item, _ref$expanded = _ref.expanded, expanded3 = _ref$expanded === void 0 ? false : _ref$expanded; + if (this.expandedKeys) { + var _keys = _objectSpread$a({}, this.expandedKeys); + if (expanded3) _keys[item8.key] = true; + else delete _keys[item8.key]; + this.$emit("update:expandedKeys", _keys); + } + }, "changeExpandedKeys"), + changeFocusedHeader: /* @__PURE__ */ __name(function changeFocusedHeader(event2, element) { + element && focus(element); + }, "changeFocusedHeader"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps6(item8, index) { + return { + icon: mergeProps({ + "class": [this.cx("headerIcon"), this.getItemProp(item8, "icon")] + }, this.getPTOptions("headerIcon", item8, index)), + label: mergeProps({ + "class": this.cx("headerLabel") + }, this.getPTOptions("headerLabel", item8, index)) + }; + }, "getMenuItemProps") + }, + components: { + PanelMenuList: script$1$e, + ChevronRightIcon: script$1l, + ChevronDownIcon: script$1k + } +}; +var _hoisted_1$d = ["id"]; +var _hoisted_2$9 = ["id", "tabindex", "aria-label", "aria-expanded", "aria-controls", "aria-disabled", "onClick", "onKeydown", "data-p-active", "data-p-disabled"]; +var _hoisted_3$6 = ["href"]; +var _hoisted_4$4 = ["id", "aria-labelledby"]; +function render$m(_ctx, _cache, $props, $setup, $data, $options) { + var _component_PanelMenuList = resolveComponent("PanelMenuList"); + return openBlock(), createElementBlock("div", mergeProps({ + id: $data.id, + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function(item8, index) { + return openBlock(), createElementBlock(Fragment, { + key: $options.getPanelKey(index) + }, [$options.isItemVisible(item8) ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + style: $options.getItemProp(item8, "style"), + "class": [_ctx.cx("panel"), $options.getItemProp(item8, "class")], + ref_for: true + }, _ctx.ptm("panel")), [createBaseVNode("div", mergeProps({ + id: $options.getHeaderId(index), + "class": [_ctx.cx("header", { + item: item8 + }), $options.getItemProp(item8, "headerClass")], + tabindex: $options.isItemDisabled(item8) ? -1 : _ctx.tabindex, + role: "button", + "aria-label": $options.getItemLabel(item8), + "aria-expanded": $options.isItemActive(item8), + "aria-controls": $options.getContentId(index), + "aria-disabled": $options.isItemDisabled(item8), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onHeaderClick($event, item8); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + return $options.onHeaderKeyDown($event, item8); + }, "onKeydown"), + ref_for: true + }, $options.getPTOptions("header", item8, index), { + "data-p-active": $options.isItemActive(item8), + "data-p-disabled": $options.isItemDisabled(item8) + }), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("headerContent"), + ref_for: true + }, $options.getPTOptions("headerContent", item8, index)), [!_ctx.$slots.item ? (openBlock(), createElementBlock("a", mergeProps({ + key: 0, + href: $options.getItemProp(item8, "url"), + "class": _ctx.cx("headerLink"), + tabindex: -1, + ref_for: true + }, $options.getPTOptions("headerLink", item8, index)), [$options.getItemProp(item8, "items") ? renderSlot(_ctx.$slots, "submenuicon", { + key: 0, + active: $options.isItemActive(item8) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent($options.isItemActive(item8) ? "ChevronDownIcon" : "ChevronRightIcon"), mergeProps({ + "class": _ctx.cx("submenuIcon"), + ref_for: true + }, $options.getPTOptions("submenuIcon", item8, index)), null, 16, ["class"]))]; + }) : createCommentVNode("", true), _ctx.$slots.headericon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.headericon), { + key: 1, + item: item8, + "class": normalizeClass([_ctx.cx("headerIcon"), $options.getItemProp(item8, "icon")]) + }, null, 8, ["item", "class"])) : $options.getItemProp(item8, "icon") ? (openBlock(), createElementBlock("span", mergeProps({ + key: 2, + "class": [_ctx.cx("headerIcon"), $options.getItemProp(item8, "icon")], + ref_for: true + }, $options.getPTOptions("headerIcon", item8, index)), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("headerLabel"), + ref_for: true + }, $options.getPTOptions("headerLabel", item8, index)), toDisplayString($options.getItemLabel(item8)), 17)], 16, _hoisted_3$6)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), { + key: 1, + item: item8, + root: true, + active: $options.isItemActive(item8), + hasSubmenu: $options.isItemGroup(item8), + label: $options.getItemLabel(item8), + props: $options.getMenuItemProps(item8, index) + }, null, 8, ["item", "active", "hasSubmenu", "label", "props"]))], 16)], 16, _hoisted_2$9), createVNode(Transition, mergeProps({ + name: "p-toggleable-content", + ref_for: true + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [withDirectives(createBaseVNode("div", mergeProps({ + id: $options.getContentId(index), + "class": _ctx.cx("contentContainer"), + role: "region", + "aria-labelledby": $options.getHeaderId(index), + ref_for: true + }, _ctx.ptm("contentContainer")), [$options.getItemProp(item8, "items") ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("content"), + ref_for: true + }, _ctx.ptm("content")), [createVNode(_component_PanelMenuList, { + panelId: $options.getPanelId(index), + items: $options.getItemProp(item8, "items"), + templates: _ctx.$slots, + expandedKeys: _ctx.expandedKeys, + onItemToggle: $options.changeExpandedKeys, + onHeaderFocus: $options.updateFocusedHeader, + pt: _ctx.pt, + unstyled: _ctx.unstyled + }, null, 8, ["panelId", "items", "templates", "expandedKeys", "onItemToggle", "onHeaderFocus", "pt", "unstyled"])], 16)) : createCommentVNode("", true)], 16, _hoisted_4$4), [[vShow, $options.isItemActive(item8)]])]; + }), + _: 2 + }, 1040)], 16)) : createCommentVNode("", true)], 64); + }), 128))], 16, _hoisted_1$d); +} +__name(render$m, "render$m"); +script$p.render = render$m; +var script$o = { + name: "EyeSlashIcon", + "extends": script$1m +}; +function render$l(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$l, "render$l"); +script$o.render = render$l; +var theme$c = /* @__PURE__ */ __name(function theme28(_ref) { + var dt = _ref.dt; + return "\n.p-password {\n display: inline-flex;\n position: relative;\n}\n\n.p-password .p-password-overlay {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: ".concat(dt("password.meter.height"), ";\n background: ").concat(dt("password.meter.background"), ";\n border-radius: ").concat(dt("password.meter.border.radius"), ";\n}\n\n.p-password-meter-label {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n border-radius: ").concat(dt("password.meter.border.radius"), ";\n}\n\n.p-password-meter-weak {\n background: ").concat(dt("password.strength.weak.background"), ";\n}\n\n.p-password-meter-medium {\n background: ").concat(dt("password.strength.medium.background"), ";\n}\n\n.p-password-meter-strong {\n background: ").concat(dt("password.strength.strong.background"), ";\n}\n\n.p-password-fluid {\n display: flex;\n}\n\n.p-password-fluid .p-password-input {\n width: 100%;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n\n.p-password-overlay {\n padding: ").concat(dt("password.overlay.padding"), ";\n background: ").concat(dt("password.overlay.background"), ";\n color: ").concat(dt("password.overlay.color"), ";\n border: 1px solid ").concat(dt("password.overlay.border.color"), ";\n box-shadow: ").concat(dt("password.overlay.shadow"), ";\n border-radius: ").concat(dt("password.overlay.border.radius"), ";\n}\n\n.p-password-content {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("password.content.gap"), ";\n}\n\n.p-password-toggle-mask-icon {\n inset-inline-end: ").concat(dt("form.field.padding.x"), ";\n color: ").concat(dt("password.icon.color"), ";\n position: absolute;\n top: 50%;\n margin-top: calc(-1 * calc(").concat(dt("icon.size"), " / 2));\n width: ").concat(dt("icon.size"), ";\n height: ").concat(dt("icon.size"), ";\n}\n\n.p-password:has(.p-password-toggle-mask-icon) .p-password-input {\n padding-inline-end: calc((").concat(dt("form.field.padding.x"), " * 2) + ").concat(dt("icon.size"), ");\n}\n"); +}, "theme"); +var inlineStyles$4 = { + root: /* @__PURE__ */ __name(function root22(_ref2) { + var props = _ref2.props; + return { + position: props.appendTo === "self" ? "relative" : void 0 + }; + }, "root") +}; +var classes$d = { + root: /* @__PURE__ */ __name(function root23(_ref3) { + var instance = _ref3.instance; + return ["p-password p-component p-inputwrapper", { + "p-inputwrapper-filled": instance.$filled, + "p-inputwrapper-focus": instance.focused, + "p-password-fluid": instance.$fluid + }]; + }, "root"), + pcInputText: "p-password-input", + maskIcon: "p-password-toggle-mask-icon p-password-mask-icon", + unmaskIcon: "p-password-toggle-mask-icon p-password-unmask-icon", + overlay: "p-password-overlay p-component", + content: "p-password-content", + meter: "p-password-meter", + meterLabel: /* @__PURE__ */ __name(function meterLabel(_ref4) { + var instance = _ref4.instance; + return "p-password-meter-label ".concat(instance.meter ? "p-password-meter-" + instance.meter.strength : ""); + }, "meterLabel"), + meterText: "p-password-meter-text" +}; +var PasswordStyle = BaseStyle.extend({ + name: "password", + theme: theme$c, + classes: classes$d, + inlineStyles: inlineStyles$4 +}); +var script$1$d = { + name: "BasePassword", + "extends": script$1n, + props: { + promptLabel: { + type: String, + "default": null + }, + mediumRegex: { + type: [String, RegExp], + "default": "^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})" + // eslint-disable-line + }, + strongRegex: { + type: [String, RegExp], + "default": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})" + // eslint-disable-line + }, + weakLabel: { + type: String, + "default": null + }, + mediumLabel: { + type: String, + "default": null + }, + strongLabel: { + type: String, + "default": null + }, + feedback: { + type: Boolean, + "default": true + }, + appendTo: { + type: [String, Object], + "default": "body" + }, + toggleMask: { + type: Boolean, + "default": false + }, + hideIcon: { + type: String, + "default": void 0 + }, + maskIcon: { + type: String, + "default": void 0 + }, + showIcon: { + type: String, + "default": void 0 + }, + unmaskIcon: { + type: String, + "default": void 0 + }, + disabled: { + type: Boolean, + "default": false + }, + placeholder: { + type: String, + "default": null + }, + required: { + type: Boolean, + "default": false + }, + inputId: { + type: String, + "default": null + }, + inputClass: { + type: [String, Object], + "default": null + }, + inputStyle: { + type: Object, + "default": null + }, + inputProps: { + type: null, + "default": null + }, + panelId: { + type: String, + "default": null + }, + panelClass: { + type: [String, Object], + "default": null + }, + panelStyle: { + type: Object, + "default": null + }, + panelProps: { + type: null, + "default": null + }, + overlayId: { + type: String, + "default": null + }, + overlayClass: { + type: [String, Object], + "default": null + }, + overlayStyle: { + type: Object, + "default": null + }, + overlayProps: { + type: null, + "default": null + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + }, + autofocus: { + type: Boolean, + "default": null + } + }, + style: PasswordStyle, + provide: /* @__PURE__ */ __name(function provide38() { + return { + $pcPassword: this, + $parentInstance: this + }; + }, "provide") +}; +var script$n = { + name: "Password", + "extends": script$1$d, + inheritAttrs: false, + emits: ["change", "focus", "blur", "invalid"], + inject: { + $pcFluid: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data27() { + return { + id: this.$attrs.id, + overlayVisible: false, + meter: null, + infoText: null, + focused: false, + unmasked: false + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId10(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId") + }, + mediumCheckRegExp: null, + strongCheckRegExp: null, + resizeListener: null, + scrollHandler: null, + overlay: null, + mounted: /* @__PURE__ */ __name(function mounted28() { + this.id = this.id || UniqueComponentId(); + this.infoText = this.promptText; + this.mediumCheckRegExp = new RegExp(this.mediumRegex); + this.strongCheckRegExp = new RegExp(this.strongRegex); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount12() { + this.unbindResizeListener(); + if (this.scrollHandler) { + this.scrollHandler.destroy(); + this.scrollHandler = null; + } + if (this.overlay) { + ZIndex.clear(this.overlay); + this.overlay = null; + } + }, "beforeUnmount"), + methods: { + onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter4(el) { + ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); + addStyle(el, { + position: "absolute", + top: "0", + left: "0" + }); + this.alignOverlay(); + this.bindScrollListener(); + this.bindResizeListener(); + }, "onOverlayEnter"), + onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave4() { + this.unbindScrollListener(); + this.unbindResizeListener(); + this.overlay = null; + }, "onOverlayLeave"), + onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave4(el) { + ZIndex.clear(el); + }, "onOverlayAfterLeave"), + alignOverlay: /* @__PURE__ */ __name(function alignOverlay5() { + if (this.appendTo === "self") { + relativePosition(this.overlay, this.$refs.input.$el); + } else { + this.overlay.style.minWidth = getOuterWidth(this.$refs.input.$el) + "px"; + absolutePosition(this.overlay, this.$refs.input.$el); + } + }, "alignOverlay"), + testStrength: /* @__PURE__ */ __name(function testStrength(str) { + var level = 0; + if (this.strongCheckRegExp.test(str)) level = 3; + else if (this.mediumCheckRegExp.test(str)) level = 2; + else if (str.length) level = 1; + return level; + }, "testStrength"), + onInput: /* @__PURE__ */ __name(function onInput5(event2) { + this.writeValue(event2.target.value, event2); + this.$emit("change", event2); + }, "onInput"), + onFocus: /* @__PURE__ */ __name(function onFocus11(event2) { + this.focused = true; + if (this.feedback) { + this.setPasswordMeter(this.d_value); + this.overlayVisible = true; + } + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur11(event2) { + this.focused = false; + if (this.feedback) { + this.overlayVisible = false; + } + this.$emit("blur", event2); + }, "onBlur"), + onKeyUp: /* @__PURE__ */ __name(function onKeyUp(event2) { + if (this.feedback) { + var value2 = event2.target.value; + var _this$checkPasswordSt = this.checkPasswordStrength(value2), meter = _this$checkPasswordSt.meter, label12 = _this$checkPasswordSt.label; + this.meter = meter; + this.infoText = label12; + if (event2.code === "Escape") { + this.overlayVisible && (this.overlayVisible = false); + return; + } + if (!this.overlayVisible) { + this.overlayVisible = true; + } + } + }, "onKeyUp"), + setPasswordMeter: /* @__PURE__ */ __name(function setPasswordMeter() { + if (!this.d_value) { + this.meter = null; + this.infoText = this.promptText; + return; + } + var _this$checkPasswordSt2 = this.checkPasswordStrength(this.d_value), meter = _this$checkPasswordSt2.meter, label12 = _this$checkPasswordSt2.label; + this.meter = meter; + this.infoText = label12; + if (!this.overlayVisible) { + this.overlayVisible = true; + } + }, "setPasswordMeter"), + checkPasswordStrength: /* @__PURE__ */ __name(function checkPasswordStrength(value2) { + var label12 = null; + var meter = null; + switch (this.testStrength(value2)) { + case 1: + label12 = this.weakText; + meter = { + strength: "weak", + width: "33.33%" + }; + break; + case 2: + label12 = this.mediumText; + meter = { + strength: "medium", + width: "66.66%" + }; + break; + case 3: + label12 = this.strongText; + meter = { + strength: "strong", + width: "100%" + }; + break; + default: + label12 = this.promptText; + meter = null; + break; + } + return { + label: label12, + meter + }; + }, "checkPasswordStrength"), + onInvalid: /* @__PURE__ */ __name(function onInvalid(event2) { + this.$emit("invalid", event2); + }, "onInvalid"), + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener6() { + var _this = this; + if (!this.scrollHandler) { + this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.input.$el, function() { + if (_this.overlayVisible) { + _this.overlayVisible = false; + } + }); + } + this.scrollHandler.bindScrollListener(); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener6() { + if (this.scrollHandler) { + this.scrollHandler.unbindScrollListener(); + } + }, "unbindScrollListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener6() { + var _this2 = this; + if (!this.resizeListener) { + this.resizeListener = function() { + if (_this2.overlayVisible && !isTouchDevice()) { + _this2.overlayVisible = false; + } + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener6() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + overlayRef: /* @__PURE__ */ __name(function overlayRef4(el) { + this.overlay = el; + }, "overlayRef"), + onMaskToggle: /* @__PURE__ */ __name(function onMaskToggle() { + this.unmasked = !this.unmasked; + }, "onMaskToggle"), + onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick5(event2) { + OverlayEventBus.emit("overlay-click", { + originalEvent: event2, + target: this.$el + }); + }, "onOverlayClick") + }, + computed: { + inputType: /* @__PURE__ */ __name(function inputType2() { + return this.unmasked ? "text" : "password"; + }, "inputType"), + weakText: /* @__PURE__ */ __name(function weakText() { + return this.weakLabel || this.$primevue.config.locale.weak; + }, "weakText"), + mediumText: /* @__PURE__ */ __name(function mediumText() { + return this.mediumLabel || this.$primevue.config.locale.medium; + }, "mediumText"), + strongText: /* @__PURE__ */ __name(function strongText() { + return this.strongLabel || this.$primevue.config.locale.strong; + }, "strongText"), + promptText: /* @__PURE__ */ __name(function promptText() { + return this.promptLabel || this.$primevue.config.locale.passwordPrompt; + }, "promptText"), + overlayUniqueId: /* @__PURE__ */ __name(function overlayUniqueId() { + return this.id + "_overlay"; + }, "overlayUniqueId") + }, + components: { + InputText: script$1o, + Portal: script$1f, + EyeSlashIcon: script$o, + EyeIcon: script$N + } +}; +function _typeof$a(o) { + "@babel/helpers - typeof"; + return _typeof$a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$a(o); +} +__name(_typeof$a, "_typeof$a"); +function ownKeys$9(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$9, "ownKeys$9"); +function _objectSpread$9(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$9(Object(t2), true).forEach(function(r2) { + _defineProperty$a(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$9(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$9, "_objectSpread$9"); +function _defineProperty$a(e, r, t2) { + return (r = _toPropertyKey$a(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$a, "_defineProperty$a"); +function _toPropertyKey$a(t2) { + var i = _toPrimitive$a(t2, "string"); + return "symbol" == _typeof$a(i) ? i : i + ""; +} +__name(_toPropertyKey$a, "_toPropertyKey$a"); +function _toPrimitive$a(t2, r) { + if ("object" != _typeof$a(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$a(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$a, "_toPrimitive$a"); +var _hoisted_1$c = ["id"]; +function render$k(_ctx, _cache, $props, $setup, $data, $options) { + var _component_InputText = resolveComponent("InputText"); + var _component_Portal = resolveComponent("Portal"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + style: _ctx.sx("root") + }, _ctx.ptmi("root")), [createVNode(_component_InputText, mergeProps({ + ref: "input", + id: _ctx.inputId, + type: $options.inputType, + "class": [_ctx.cx("pcInputText"), _ctx.inputClass], + style: _ctx.inputStyle, + value: _ctx.d_value, + name: _ctx.$formName, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel, + "aria-controls": _ctx.overlayProps && _ctx.overlayProps.id || _ctx.overlayId || _ctx.panelProps && _ctx.panelProps.id || _ctx.panelId || $options.overlayUniqueId, + "aria-expanded": $data.overlayVisible, + "aria-haspopup": true, + placeholder: _ctx.placeholder, + required: _ctx.required, + fluid: _ctx.fluid, + disabled: _ctx.disabled, + variant: _ctx.variant, + invalid: _ctx.invalid, + size: _ctx.size, + autofocus: _ctx.autofocus, + onInput: $options.onInput, + onFocus: $options.onFocus, + onBlur: $options.onBlur, + onKeyup: $options.onKeyUp, + onInvalid: $options.onInvalid + }, _ctx.inputProps, { + pt: _ctx.ptm("pcInputText"), + unstyled: _ctx.unstyled + }), null, 16, ["id", "type", "class", "style", "value", "name", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "fluid", "disabled", "variant", "invalid", "size", "autofocus", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "pt", "unstyled"]), _ctx.toggleMask && $data.unmasked ? renderSlot(_ctx.$slots, _ctx.$slots.maskicon ? "maskicon" : "hideicon", { + key: 0, + toggleCallback: $options.onMaskToggle + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.maskIcon ? "i" : "EyeSlashIcon"), mergeProps({ + "class": [_ctx.cx("maskIcon"), _ctx.maskIcon], + onClick: $options.onMaskToggle + }, _ctx.ptm("maskIcon")), null, 16, ["class", "onClick"]))]; + }) : createCommentVNode("", true), _ctx.toggleMask && !$data.unmasked ? renderSlot(_ctx.$slots, _ctx.$slots.unmaskicon ? "unmaskicon" : "showicon", { + key: 1, + toggleCallback: $options.onMaskToggle + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.unmaskIcon ? "i" : "EyeIcon"), mergeProps({ + "class": [_ctx.cx("unmaskIcon"), _ctx.unmaskIcon], + onClick: $options.onMaskToggle + }, _ctx.ptm("unmaskIcon")), null, 16, ["class", "onClick"]))]; + }) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + "class": "p-hidden-accessible", + "aria-live": "polite" + }, _ctx.ptm("hiddenAccesible"), { + "data-p-hidden-accessible": true + }), toDisplayString($data.infoText), 17), createVNode(_component_Portal, { + appendTo: _ctx.appendTo + }, { + "default": withCtx(function() { + return [createVNode(Transition, mergeProps({ + name: "p-connected-overlay", + onEnter: $options.onOverlayEnter, + onLeave: $options.onOverlayLeave, + onAfterLeave: $options.onOverlayAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [$data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.overlayRef, + id: _ctx.overlayId || _ctx.panelId || $options.overlayUniqueId, + "class": [_ctx.cx("overlay"), _ctx.panelClass, _ctx.overlayClass], + style: [_ctx.overlayStyle, _ctx.panelStyle], + onClick: _cache[0] || (_cache[0] = function() { + return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); + }) + }, _objectSpread$9(_objectSpread$9(_objectSpread$9({}, _ctx.panelProps), _ctx.overlayProps), _ctx.ptm("overlay"))), [renderSlot(_ctx.$slots, "header"), renderSlot(_ctx.$slots, "content", {}, function() { + return [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("content") + }, _ctx.ptm("content")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("meter") + }, _ctx.ptm("meter")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("meterLabel"), + style: { + width: $data.meter ? $data.meter.width : "" + } + }, _ctx.ptm("meterLabel")), null, 16)], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("meterText") + }, _ctx.ptm("meterText")), toDisplayString($data.infoText), 17)], 16)]; + }), renderSlot(_ctx.$slots, "footer")], 16, _hoisted_1$c)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onLeave", "onAfterLeave"])]; + }), + _: 3 + }, 8, ["appendTo"])], 16); +} +__name(render$k, "render$k"); +script$n.render = render$k; +var theme$b = /* @__PURE__ */ __name(function theme29(_ref) { + var dt = _ref.dt; + return "\n.p-picklist {\n display: flex;\n gap: ".concat(dt("picklist.gap"), ";\n}\n\n.p-picklist-controls {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ").concat(dt("picklist.controls.gap"), ";\n}\n\n.p-picklist-list-container {\n flex: 1 1 50%;\n}\n\n.p-picklist .p-listbox {\n height: 100%;\n}\n"); +}, "theme"); +var classes$c = { + root: "p-picklist p-component", + sourceControls: "p-picklist-controls p-picklist-source-controls", + sourceListContainer: "p-picklist-list-container p-picklist-source-list-container", + transferControls: "p-picklist-controls p-picklist-transfer-controls", + targetListContainer: "p-picklist-list-container p-picklist-target-list-container", + targetControls: "p-picklist-controls p-picklist-target-controls" +}; +var PickListStyle = BaseStyle.extend({ + name: "picklist", + theme: theme$b, + classes: classes$c +}); +var script$1$c = { + name: "BasePickList", + "extends": script$1d, + props: { + modelValue: { + type: Array, + "default": /* @__PURE__ */ __name(function _default14() { + return [[], []]; + }, "_default") + }, + selection: { + type: Array, + "default": /* @__PURE__ */ __name(function _default15() { + return [[], []]; + }, "_default") + }, + dataKey: { + type: String, + "default": null + }, + listStyle: { + type: null, + "default": null + }, + metaKeySelection: { + type: Boolean, + "default": false + }, + autoOptionFocus: { + type: Boolean, + "default": true + }, + focusOnHover: { + type: Boolean, + "default": true + }, + responsive: { + type: Boolean, + "default": true + }, + breakpoint: { + type: String, + "default": "960px" + }, + striped: { + type: Boolean, + "default": false + }, + scrollHeight: { + type: String, + "default": "14rem" + }, + showSourceControls: { + type: Boolean, + "default": true + }, + showTargetControls: { + type: Boolean, + "default": true + }, + buttonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default16() { + return { + severity: "secondary" + }; + }, "_default") + }, + moveUpButtonProps: { + type: null, + "default": null + }, + moveTopButtonProps: { + type: null, + "default": null + }, + moveDownButtonProps: { + type: null, + "default": null + }, + moveBottomButtonProps: { + type: null, + "default": null + }, + moveToTargetProps: { + type: null, + "default": null + }, + moveAllToTargetProps: { + type: null, + "default": null + }, + moveToSourceProps: { + type: null, + "default": null + }, + moveAllToSourceProps: { + type: null, + "default": null + }, + tabindex: { + type: Number, + "default": 0 + }, + disabled: { + type: Boolean, + "default": false + } + }, + style: PickListStyle, + provide: /* @__PURE__ */ __name(function provide39() { + return { + $pcPickList: this, + $parentInstance: this + }; + }, "provide") +}; +function _toConsumableArray$4(r) { + return _arrayWithoutHoles$4(r) || _iterableToArray$4(r) || _unsupportedIterableToArray$4(r) || _nonIterableSpread$4(); +} +__name(_toConsumableArray$4, "_toConsumableArray$4"); +function _nonIterableSpread$4() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$4, "_nonIterableSpread$4"); +function _unsupportedIterableToArray$4(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$4(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$4(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$4, "_unsupportedIterableToArray$4"); +function _iterableToArray$4(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$4, "_iterableToArray$4"); +function _arrayWithoutHoles$4(r) { + if (Array.isArray(r)) return _arrayLikeToArray$4(r); +} +__name(_arrayWithoutHoles$4, "_arrayWithoutHoles$4"); +function _arrayLikeToArray$4(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$4, "_arrayLikeToArray$4"); +var script$m = { + name: "PickList", + "extends": script$1$c, + inheritAttrs: false, + emits: ["update:modelValue", "reorder", "update:selection", "selection-change", "move-to-target", "move-to-source", "move-all-to-target", "move-all-to-source", "focus", "blur"], + itemTouched: false, + reorderDirection: null, + styleElement: null, + media: null, + mediaChangeListener: null, + data: /* @__PURE__ */ __name(function data28() { + return { + id: this.$attrs.id, + d_selection: this.selection, + viewChanged: false + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId11(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + selection: /* @__PURE__ */ __name(function selection(newValue) { + this.d_selection = newValue; + }, "selection"), + breakpoint: /* @__PURE__ */ __name(function breakpoint() { + this.destroyMedia(); + this.initMedia(); + }, "breakpoint") + }, + updated: /* @__PURE__ */ __name(function updated7() { + if (this.reorderDirection) { + this.updateListScroll(this.$refs.sourceList.$el); + this.updateListScroll(this.$refs.targetList.$el); + this.reorderDirection = null; + } + }, "updated"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount13() { + this.destroyStyle(); + this.destroyMedia(); + }, "beforeUnmount"), + mounted: /* @__PURE__ */ __name(function mounted29() { + this.id = this.id || UniqueComponentId(); + if (this.responsive) { + this.createStyle(); + this.initMedia(); + } + }, "mounted"), + methods: { + updateSelection: /* @__PURE__ */ __name(function updateSelection2(event2) { + this.$emit("update:selection", this.d_selection); + this.$emit("selection-change", { + originalEvent: event2, + value: this.d_selection + }); + }, "updateSelection"), + onChangeSelection: /* @__PURE__ */ __name(function onChangeSelection2(params, listIndex) { + this.d_selection[listIndex] = params.value; + this.updateSelection(params.event); + }, "onChangeSelection"), + onListFocus: /* @__PURE__ */ __name(function onListFocus4(event2, listType) { + this.$emit("focus", event2, listType); + }, "onListFocus"), + onListBlur: /* @__PURE__ */ __name(function onListBlur4(event2, listType) { + this.$emit("blur", event2, listType); + }, "onListBlur"), + onReorderUpdate: /* @__PURE__ */ __name(function onReorderUpdate2(event2, value2, listIndex) { + this.$emit("update:modelValue", value2); + this.$emit("reorder", { + originalEvent: event2, + value: value2, + direction: this.reorderDirection, + listIndex + }); + }, "onReorderUpdate"), + onItemDblClick: /* @__PURE__ */ __name(function onItemDblClick(event2, listIndex) { + if (listIndex === 0) this.moveToTarget({ + event: event2.originalEvent + }); + else if (listIndex === 1) this.moveToSource({ + event: event2.originalEvent + }); + }, "onItemDblClick"), + moveUp: /* @__PURE__ */ __name(function moveUp2(event2, listIndex) { + if (this.d_selection && this.d_selection[listIndex]) { + var valueList = _toConsumableArray$4(this.modelValue[listIndex]); + var selectionList = this.d_selection[listIndex]; + for (var i = 0; i < selectionList.length; i++) { + var selectedItem = selectionList[i]; + var selectedItemIndex = findIndexInList(selectedItem, valueList); + if (selectedItemIndex !== 0) { + var movedItem = valueList[selectedItemIndex]; + var temp = valueList[selectedItemIndex - 1]; + valueList[selectedItemIndex - 1] = movedItem; + valueList[selectedItemIndex] = temp; + } else { + break; + } + } + var value2 = _toConsumableArray$4(this.modelValue); + value2[listIndex] = valueList; + this.reorderDirection = "up"; + this.onReorderUpdate(event2, value2, listIndex); + } + }, "moveUp"), + moveTop: /* @__PURE__ */ __name(function moveTop2(event2, listIndex) { + if (this.d_selection) { + var valueList = _toConsumableArray$4(this.modelValue[listIndex]); + var selectionList = this.d_selection[listIndex]; + for (var i = 0; i < selectionList.length; i++) { + var selectedItem = selectionList[i]; + var selectedItemIndex = findIndexInList(selectedItem, valueList); + if (selectedItemIndex !== 0) { + var movedItem = valueList.splice(selectedItemIndex, 1)[0]; + valueList.unshift(movedItem); + } else { + break; + } + } + var value2 = _toConsumableArray$4(this.modelValue); + value2[listIndex] = valueList; + this.reorderDirection = "top"; + this.onReorderUpdate(event2, value2, listIndex); + } + }, "moveTop"), + moveDown: /* @__PURE__ */ __name(function moveDown2(event2, listIndex) { + if (this.d_selection) { + var valueList = _toConsumableArray$4(this.modelValue[listIndex]); + var selectionList = this.d_selection[listIndex]; + for (var i = selectionList.length - 1; i >= 0; i--) { + var selectedItem = selectionList[i]; + var selectedItemIndex = findIndexInList(selectedItem, valueList); + if (selectedItemIndex !== valueList.length - 1) { + var movedItem = valueList[selectedItemIndex]; + var temp = valueList[selectedItemIndex + 1]; + valueList[selectedItemIndex + 1] = movedItem; + valueList[selectedItemIndex] = temp; + } else { + break; + } + } + var value2 = _toConsumableArray$4(this.modelValue); + value2[listIndex] = valueList; + this.reorderDirection = "down"; + this.onReorderUpdate(event2, value2, listIndex); + } + }, "moveDown"), + moveBottom: /* @__PURE__ */ __name(function moveBottom2(event2, listIndex) { + if (this.d_selection) { + var valueList = _toConsumableArray$4(this.modelValue[listIndex]); + var selectionList = this.d_selection[listIndex]; + for (var i = selectionList.length - 1; i >= 0; i--) { + var selectedItem = selectionList[i]; + var selectedItemIndex = findIndexInList(selectedItem, valueList); + if (selectedItemIndex !== valueList.length - 1) { + var movedItem = valueList.splice(selectedItemIndex, 1)[0]; + valueList.push(movedItem); + } else { + break; + } + } + var value2 = _toConsumableArray$4(this.modelValue); + value2[listIndex] = valueList; + this.reorderDirection = "bottom"; + this.onReorderUpdate(event2, value2, listIndex); + } + }, "moveBottom"), + moveToTarget: /* @__PURE__ */ __name(function moveToTarget(event2) { + var selection2 = this.d_selection && this.d_selection[0] ? this.d_selection[0] : null; + var sourceList2 = _toConsumableArray$4(this.modelValue[0]); + var targetList2 = _toConsumableArray$4(this.modelValue[1]); + if (selection2) { + for (var i = 0; i < selection2.length; i++) { + var selectedItem = selection2[i]; + if (findIndexInList(selectedItem, targetList2) == -1) { + targetList2.push(sourceList2.splice(findIndexInList(selectedItem, sourceList2), 1)[0]); + } + } + var value2 = _toConsumableArray$4(this.modelValue); + value2[0] = sourceList2; + value2[1] = targetList2; + this.$emit("update:modelValue", value2); + this.$emit("move-to-target", { + originalEvent: event2, + items: _toConsumableArray$4(new Set(selection2)) + }); + this.d_selection[0] = []; + this.updateSelection(event2); + } + }, "moveToTarget"), + moveAllToTarget: /* @__PURE__ */ __name(function moveAllToTarget(event2) { + if (this.modelValue[0]) { + var sourceList2 = _toConsumableArray$4(this.modelValue[0]); + var targetList2 = _toConsumableArray$4(this.modelValue[1]); + this.$emit("move-all-to-target", { + originalEvent: event2, + items: sourceList2 + }); + targetList2 = [].concat(_toConsumableArray$4(targetList2), _toConsumableArray$4(sourceList2)); + sourceList2 = []; + var value2 = _toConsumableArray$4(this.modelValue); + value2[0] = sourceList2; + value2[1] = targetList2; + this.$emit("update:modelValue", value2); + this.d_selection = [[], []]; + this.updateSelection(event2); + } + }, "moveAllToTarget"), + moveToSource: /* @__PURE__ */ __name(function moveToSource(event2) { + var selection2 = this.d_selection && this.d_selection[1] ? this.d_selection[1] : null; + var sourceList2 = _toConsumableArray$4(this.modelValue[0]); + var targetList2 = _toConsumableArray$4(this.modelValue[1]); + if (selection2) { + for (var i = 0; i < selection2.length; i++) { + var selectedItem = selection2[i]; + if (findIndexInList(selectedItem, sourceList2) == -1) { + sourceList2.push(targetList2.splice(findIndexInList(selectedItem, targetList2), 1)[0]); + } + } + var value2 = _toConsumableArray$4(this.modelValue); + value2[0] = sourceList2; + value2[1] = targetList2; + this.$emit("update:modelValue", value2); + this.$emit("move-to-source", { + originalEvent: event2, + items: _toConsumableArray$4(new Set(selection2)) + }); + this.d_selection[1] = []; + this.updateSelection(event2); + } + }, "moveToSource"), + moveAllToSource: /* @__PURE__ */ __name(function moveAllToSource(event2) { + if (this.modelValue[1]) { + var sourceList2 = _toConsumableArray$4(this.modelValue[0]); + var targetList2 = _toConsumableArray$4(this.modelValue[1]); + this.$emit("move-all-to-source", { + originalEvent: event2, + items: targetList2 + }); + sourceList2 = [].concat(_toConsumableArray$4(sourceList2), _toConsumableArray$4(targetList2)); + targetList2 = []; + var value2 = _toConsumableArray$4(this.modelValue); + value2[0] = sourceList2; + value2[1] = targetList2; + this.$emit("update:modelValue", value2); + this.d_selection = [[], []]; + this.updateSelection(event2); + } + }, "moveAllToSource"), + onItemClick: /* @__PURE__ */ __name(function onItemClick6(event2, item8, index, listIndex) { + var listType = listIndex === 0 ? "sourceList" : "targetList"; + this.itemTouched = false; + var selectionList = this.d_selection[listIndex]; + var selectedIndex = findIndexInList(item8, selectionList); + var selected3 = selectedIndex != -1; + var metaSelection = this.itemTouched ? false : this.metaKeySelection; + var selectedId = find(this.$refs[listType].$el, '[data-pc-section="item"]')[index].getAttribute("id"); + this.focusedOptionIndex = selectedId; + var _selection; + if (metaSelection) { + var metaKey = event2.metaKey || event2.ctrlKey; + if (selected3 && metaKey) { + _selection = selectionList.filter(function(val, index2) { + return index2 !== selectedIndex; + }); + } else { + _selection = metaKey ? selectionList ? _toConsumableArray$4(selectionList) : [] : []; + _selection.push(item8); + } + } else { + if (selected3) { + _selection = selectionList.filter(function(val, index2) { + return index2 !== selectedIndex; + }); + } else { + _selection = selectionList ? _toConsumableArray$4(selectionList) : []; + _selection.push(item8); + } + } + var newSelection = _toConsumableArray$4(this.d_selection); + newSelection[listIndex] = _selection; + this.d_selection = newSelection; + this.updateSelection(event2); + }, "onItemClick"), + updateListScroll: /* @__PURE__ */ __name(function updateListScroll2(listElement) { + var listItems = find(listElement, '[data-pc-section="item"][data-p-selected="true"]'); + if (listItems && listItems.length) { + switch (this.reorderDirection) { + case "up": + scrollInView(listElement, listItems[0]); + break; + case "top": + listElement.scrollTop = 0; + break; + case "down": + scrollInView(listElement, listItems[listItems.length - 1]); + break; + case "bottom": + listElement.scrollTop = listElement.scrollHeight; + break; + } + } + }, "updateListScroll"), + initMedia: /* @__PURE__ */ __name(function initMedia() { + this.media = window.matchMedia("(max-width: ".concat(this.breakpoint, ")")); + this.viewChanged = this.media.matches; + this.bindMediaChangeListener(); + }, "initMedia"), + destroyMedia: /* @__PURE__ */ __name(function destroyMedia() { + this.unbindMediaChangeListener(); + }, "destroyMedia"), + bindMediaChangeListener: /* @__PURE__ */ __name(function bindMediaChangeListener() { + var _this = this; + if (this.media && !this.mediaChangeListener) { + this.mediaChangeListener = function(event2) { + _this.viewChanged = event2.matches; + }; + this.media.addEventListener("change", this.mediaChangeListener); + } + }, "bindMediaChangeListener"), + unbindMediaChangeListener: /* @__PURE__ */ __name(function unbindMediaChangeListener() { + if (this.media && this.mediaChangeListener) { + this.media.removeEventListener("change", this.mediaChangeListener); + this.mediaChangeListener = null; + } + }, "unbindMediaChangeListener"), + createStyle: /* @__PURE__ */ __name(function createStyle2() { + if (!this.styleElement && !this.isUnstyled) { + var _this$$primevue; + this.styleElement = document.createElement("style"); + this.styleElement.type = "text/css"; + setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); + document.head.appendChild(this.styleElement); + var innerHTML = "\n@media screen and (max-width: ".concat(this.breakpoint, ") {\n .p-picklist[").concat(this.$attrSelector, "] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.$attrSelector, "] .p-picklist-controls {\n flex-direction: row;\n }\n}\n"); + this.styleElement.innerHTML = innerHTML; + } + }, "createStyle"), + destroyStyle: /* @__PURE__ */ __name(function destroyStyle2() { + if (this.styleElement) { + document.head.removeChild(this.styleElement); + this.styleElement = null; + } + }, "destroyStyle"), + moveDisabled: /* @__PURE__ */ __name(function moveDisabled2(index) { + return this.disabled ? true : this.d_selection && (!this.d_selection[index] || !this.d_selection[index].length) ? true : false; + }, "moveDisabled"), + moveAllDisabled: /* @__PURE__ */ __name(function moveAllDisabled(list2) { + return this.disabled ? true : isEmpty(this[list2]); + }, "moveAllDisabled") + }, + computed: { + idSource: /* @__PURE__ */ __name(function idSource() { + return "".concat(this.id, "_source"); + }, "idSource"), + idTarget: /* @__PURE__ */ __name(function idTarget() { + return "".concat(this.id, "_target"); + }, "idTarget"), + sourceList: /* @__PURE__ */ __name(function sourceList() { + return this.modelValue && this.modelValue[0] ? this.modelValue[0] : null; + }, "sourceList"), + targetList: /* @__PURE__ */ __name(function targetList() { + return this.modelValue && this.modelValue[1] ? this.modelValue[1] : null; + }, "targetList"), + moveUpAriaLabel: /* @__PURE__ */ __name(function moveUpAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveUp : void 0; + }, "moveUpAriaLabel"), + moveTopAriaLabel: /* @__PURE__ */ __name(function moveTopAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveTop : void 0; + }, "moveTopAriaLabel"), + moveDownAriaLabel: /* @__PURE__ */ __name(function moveDownAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveDown : void 0; + }, "moveDownAriaLabel"), + moveBottomAriaLabel: /* @__PURE__ */ __name(function moveBottomAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveBottom : void 0; + }, "moveBottomAriaLabel"), + moveToTargetAriaLabel: /* @__PURE__ */ __name(function moveToTargetAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveToTarget : void 0; + }, "moveToTargetAriaLabel"), + moveAllToTargetAriaLabel: /* @__PURE__ */ __name(function moveAllToTargetAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveAllToTarget : void 0; + }, "moveAllToTargetAriaLabel"), + moveToSourceAriaLabel: /* @__PURE__ */ __name(function moveToSourceAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveToSource : void 0; + }, "moveToSourceAriaLabel"), + moveAllToSourceAriaLabel: /* @__PURE__ */ __name(function moveAllToSourceAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.moveAllToSource : void 0; + }, "moveAllToSourceAriaLabel") + }, + components: { + Listbox: script$1O, + Button: script$1e, + AngleRightIcon: script$1q, + AngleLeftIcon: script$1R, + AngleDownIcon: script$1H, + AngleUpIcon: script$1P, + AngleDoubleRightIcon: script$1S, + AngleDoubleLeftIcon: script$1T, + AngleDoubleDownIcon: script$u, + AngleDoubleUpIcon: script$t + }, + directives: { + ripple: Ripple + } +}; +function _typeof$9(o) { + "@babel/helpers - typeof"; + return _typeof$9 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$9(o); +} +__name(_typeof$9, "_typeof$9"); +function ownKeys$8(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$8, "ownKeys$8"); +function _objectSpread$8(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$8(Object(t2), true).forEach(function(r2) { + _defineProperty$9(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$8(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$8, "_objectSpread$8"); +function _defineProperty$9(e, r, t2) { + return (r = _toPropertyKey$9(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$9, "_defineProperty$9"); +function _toPropertyKey$9(t2) { + var i = _toPrimitive$9(t2, "string"); + return "symbol" == _typeof$9(i) ? i : i + ""; +} +__name(_toPropertyKey$9, "_toPropertyKey$9"); +function _toPrimitive$9(t2, r) { + if ("object" != _typeof$9(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$9(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$9, "_toPrimitive$9"); +function render$j(_ctx, _cache, $props, $setup, $data, $options) { + var _component_AngleUpIcon = resolveComponent("AngleUpIcon"); + var _component_Button = resolveComponent("Button"); + var _component_AngleDoubleUpIcon = resolveComponent("AngleDoubleUpIcon"); + var _component_AngleDownIcon = resolveComponent("AngleDownIcon"); + var _component_AngleDoubleDownIcon = resolveComponent("AngleDoubleDownIcon"); + var _component_Listbox = resolveComponent("Listbox"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [_ctx.showSourceControls ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("sourceControls") + }, _ctx.ptm("sourceControls"), { + "data-pc-group-section": "controls" + }), [renderSlot(_ctx.$slots, "sourcecontrolsstart"), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveUpAriaLabel, + disabled: $options.moveDisabled(0), + onClick: _cache[0] || (_cache[0] = function($event) { + return $options.moveUp($event, 0); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveUpButtonProps), { + pt: _ctx.ptm("pcSourceMoveUpButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "moveupicon", {}, function() { + return [createVNode(_component_AngleUpIcon, mergeProps(_ctx.ptm("pcSourceMoveUpButton")["icon"], { + "data-pc-section": "moveupicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveTopAriaLabel, + disabled: $options.moveDisabled(0), + onClick: _cache[1] || (_cache[1] = function($event) { + return $options.moveTop($event, 0); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveTopButtonProps), { + pt: _ctx.ptm("pcSourceMoveTopButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movetopicon", {}, function() { + return [createVNode(_component_AngleDoubleUpIcon, mergeProps(_ctx.ptm("pcSourceMoveTopButton")["icon"], { + "data-pc-section": "movetopicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveDownAriaLabel, + disabled: $options.moveDisabled(0), + onClick: _cache[2] || (_cache[2] = function($event) { + return $options.moveDown($event, 0); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveDownButtonProps), { + pt: _ctx.ptm("pcSourceMoveDownButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movedownicon", {}, function() { + return [createVNode(_component_AngleDownIcon, mergeProps(_ctx.ptm("pcSourceMoveDownButton")["icon"], { + "data-pc-section": "movedownicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveBottomAriaLabel, + disabled: $options.moveDisabled(0), + onClick: _cache[3] || (_cache[3] = function($event) { + return $options.moveBottom($event, 0); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveBottomButtonProps), { + pt: _ctx.ptm("pcSourceMoveBottomButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movebottomicon", {}, function() { + return [createVNode(_component_AngleDoubleDownIcon, mergeProps(_ctx.ptm("pcSourceMoveBottomButton")["icon"], { + "data-pc-section": "movebottomicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "sourcecontrolsend")], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("sourceListContainer") + }, _ctx.ptm("sourceListContainer"), { + "data-pc-group-section": "listcontainer" + }), [createVNode(_component_Listbox, { + ref: "sourceList", + id: $options.idSource + "_list", + modelValue: $data.d_selection[0], + options: $options.sourceList, + multiple: "", + metaKeySelection: _ctx.metaKeySelection, + listStyle: _ctx.listStyle, + scrollHeight: _ctx.scrollHeight, + tabindex: $options.sourceList && $options.sourceList.length > 0 ? _ctx.tabindex : -1, + dataKey: _ctx.dataKey, + autoOptionFocus: _ctx.autoOptionFocus, + focusOnHover: _ctx.focusOnHover, + striped: _ctx.striped, + disabled: _ctx.disabled, + pt: _ctx.ptm("pcListbox"), + unstyled: _ctx.unstyled, + onFocus: _cache[4] || (_cache[4] = function($event) { + return $options.onListFocus($event, "sourceList"); + }), + onBlur: _cache[5] || (_cache[5] = function($event) { + return $options.onListBlur($event, "sourceList"); + }), + onChange: _cache[6] || (_cache[6] = function($event) { + return $options.onChangeSelection($event, 0); + }), + onItemDblclick: _cache[7] || (_cache[7] = function($event) { + return $options.onItemDblClick($event, 0); + }), + "data-pc-group-section": "list" + }, createSlots({ + option: withCtx(function(_ref) { + var option4 = _ref.option, selected3 = _ref.selected, index = _ref.index; + return [renderSlot(_ctx.$slots, _ctx.$slots.option ? "option" : "item", { + item: option4, + option: option4, + selected: selected3, + index + })]; + }), + _: 2 + }, [_ctx.$slots.sourceheader ? { + name: "header", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "sourceheader")]; + }), + key: "0" + } : void 0]), 1032, ["id", "modelValue", "options", "metaKeySelection", "listStyle", "scrollHeight", "tabindex", "dataKey", "autoOptionFocus", "focusOnHover", "striped", "disabled", "pt", "unstyled"])], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("transferControls") + }, _ctx.ptm("transferControls"), { + "data-pc-group-section": "controls" + }), [renderSlot(_ctx.$slots, "movecontrolsstart"), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveToTargetAriaLabel, + onClick: $options.moveToTarget, + disabled: $options.moveDisabled(0) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveToTargetProps), { + pt: _ctx.ptm("pcMoveToTargetButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movetotargeticon", { + viewChanged: $data.viewChanged + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent($data.viewChanged ? "AngleDownIcon" : "AngleRightIcon"), mergeProps(_ctx.ptm("pcMoveToTargetButton")["icon"], { + "data-pc-section": "movetotargeticon" + }), null, 16))]; + })]; + }), + _: 3 + }, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveAllToTargetAriaLabel, + onClick: $options.moveAllToTarget, + disabled: $options.moveAllDisabled("sourceList") + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveAllToTargetProps), { + pt: _ctx.ptm("pcMoveAllToTargetButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movealltotargeticon", { + viewChanged: $data.viewChanged + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent($data.viewChanged ? "AngleDoubleDownIcon" : "AngleDoubleRightIcon"), mergeProps(_ctx.ptm("pcMoveAllToTargetButton")["icon"], { + "data-pc-section": "movealltotargeticon" + }), null, 16))]; + })]; + }), + _: 3 + }, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveToSourceAriaLabel, + onClick: $options.moveToSource, + disabled: $options.moveDisabled(1) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveToSourceProps), { + pt: _ctx.ptm("pcMoveToSourceButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movetosourceicon", { + viewChanged: $data.viewChanged + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent($data.viewChanged ? "AngleUpIcon" : "AngleLeftIcon"), mergeProps(_ctx.ptm("pcMoveToSourceButton")["icon"], { + "data-pc-section": "movetosourceicon" + }), null, 16))]; + })]; + }), + _: 3 + }, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveAllToSourceAriaLabel, + onClick: $options.moveAllToSource, + disabled: $options.moveAllDisabled("targetList") + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveAllToSourceProps), { + pt: _ctx.ptm("pcMoveAllToSourceButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movealltosourceicon", { + viewChanged: $data.viewChanged + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent($data.viewChanged ? "AngleDoubleUpIcon" : "AngleDoubleLeftIcon"), mergeProps(_ctx.ptm("pcMoveAllToSourceButton")["icon"], { + "data-pc-section": "movealltosourceicon" + }), null, 16))]; + })]; + }), + _: 3 + }, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "movecontrolsend")], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("targetListContainer") + }, _ctx.ptm("targetListContainer"), { + "data-pc-group-section": "listcontainer" + }), [createVNode(_component_Listbox, { + ref: "targetList", + id: $options.idTarget + "_list", + modelValue: $data.d_selection[1], + options: $options.targetList, + multiple: "", + metaKeySelection: _ctx.metaKeySelection, + listStyle: _ctx.listStyle, + scrollHeight: _ctx.scrollHeight, + tabindex: $options.targetList && $options.targetList.length > 0 ? _ctx.tabindex : -1, + dataKey: _ctx.dataKey, + autoOptionFocus: _ctx.autoOptionFocus, + focusOnHover: _ctx.focusOnHover, + striped: _ctx.striped, + disabled: _ctx.disabled, + pt: _ctx.ptm("pcListbox"), + unstyled: _ctx.unstyled, + onFocus: _cache[8] || (_cache[8] = function($event) { + return $options.onListFocus($event, "targetList"); + }), + onBlur: _cache[9] || (_cache[9] = function($event) { + return $options.onListBlur($event, "targetList"); + }), + onChange: _cache[10] || (_cache[10] = function($event) { + return $options.onChangeSelection($event, 1); + }), + onItemDblclick: _cache[11] || (_cache[11] = function($event) { + return $options.onItemDblClick($event, 1); + }), + "data-pc-group-section": "list" + }, createSlots({ + option: withCtx(function(_ref2) { + var option4 = _ref2.option, selected3 = _ref2.selected, index = _ref2.index; + return [renderSlot(_ctx.$slots, _ctx.$slots.option ? "option" : "item", { + item: option4, + option: option4, + selected: selected3, + index + })]; + }), + _: 2 + }, [_ctx.$slots.targetheader ? { + name: "header", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "targetheader")]; + }), + key: "0" + } : void 0]), 1032, ["id", "modelValue", "options", "metaKeySelection", "listStyle", "scrollHeight", "tabindex", "dataKey", "autoOptionFocus", "focusOnHover", "striped", "disabled", "pt", "unstyled"])], 16), _ctx.showTargetControls ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("targetControls") + }, _ctx.ptm("targetControls"), { + "data-pc-group-section": "controls" + }), [renderSlot(_ctx.$slots, "targetcontrolsstart"), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveUpAriaLabel, + disabled: $options.moveDisabled(1), + onClick: _cache[12] || (_cache[12] = function($event) { + return $options.moveUp($event, 1); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveUpButtonProps), { + pt: _ctx.ptm("pcTargetMoveUpButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "moveupicon", {}, function() { + return [createVNode(_component_AngleUpIcon, mergeProps(_ctx.ptm("pcTargetMoveUpButton")["icon"], { + "data-pc-section": "moveupicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveTopAriaLabel, + disabled: $options.moveDisabled(1), + onClick: _cache[13] || (_cache[13] = function($event) { + return $options.moveTop($event, 1); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveTopButtonProps), { + pt: _ctx.ptm("pcTargetMoveTopButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movetopicon", {}, function() { + return [createVNode(_component_AngleDoubleUpIcon, mergeProps(_ctx.ptm("pcTargetMoveTopButton")["icon"], { + "data-pc-section": "movetopicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveDownAriaLabel, + disabled: $options.moveDisabled(1), + onClick: _cache[14] || (_cache[14] = function($event) { + return $options.moveDown($event, 1); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveDownButtonProps), { + pt: _ctx.ptm("pcTargetMoveDownButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movedownicon", {}, function() { + return [createVNode(_component_AngleDownIcon, mergeProps(_ctx.ptm("pcTargetMoveDownButton")["icon"], { + "data-pc-section": "movedownicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), createVNode(_component_Button, mergeProps({ + "aria-label": $options.moveBottomAriaLabel, + disabled: $options.moveDisabled(1), + onClick: _cache[15] || (_cache[15] = function($event) { + return $options.moveBottom($event, 1); + }) + }, _objectSpread$8(_objectSpread$8({}, _ctx.buttonProps), _ctx.moveBottomButtonProps), { + pt: _ctx.ptm("pcTargetMoveBottomButton"), + unstyled: _ctx.unstyled + }), { + icon: withCtx(function() { + return [renderSlot(_ctx.$slots, "movebottomicon", {}, function() { + return [createVNode(_component_AngleDoubleDownIcon, mergeProps(_ctx.ptm("pcTargetMoveBottomButton")["icon"], { + "data-pc-section": "movebottomicon" + }), null, 16)]; + })]; + }), + _: 3 + }, 16, ["aria-label", "disabled", "pt", "unstyled"]), renderSlot(_ctx.$slots, "targetcontrolsend")], 16)) : createCommentVNode("", true)], 16); +} +__name(render$j, "render$j"); +script$m.render = render$j; +var PortalStyle = BaseStyle.extend({ + name: "portal" +}); +var theme$a = /* @__PURE__ */ __name(function theme30(_ref) { + _ref.dt; + return "\n.p-radiobutton-group {\n display: inline-flex;\n}\n"; +}, "theme"); +var classes$b = { + root: "p-radiobutton-group p-component" +}; +var RadioButtonGroupStyle = BaseStyle.extend({ + name: "radiobuttongroup", + theme: theme$a, + classes: classes$b +}); +var script$1$b = { + name: "BaseRadioButtonGroup", + "extends": script$1s, + style: RadioButtonGroupStyle, + provide: /* @__PURE__ */ __name(function provide40() { + return { + $pcRadioButtonGroup: this, + $parentInstance: this + }; + }, "provide") +}; +var script$l = { + name: "RadioButtonGroup", + "extends": script$1$b, + inheritAttrs: false, + data: /* @__PURE__ */ __name(function data29() { + return { + groupName: this.name + }; + }, "data"), + watch: { + name: /* @__PURE__ */ __name(function name2(newValue) { + this.groupName = newValue || uuid("radiobutton-group-"); + }, "name") + }, + mounted: /* @__PURE__ */ __name(function mounted30() { + this.groupName = this.groupName || uuid("radiobutton-group-"); + }, "mounted") +}; +function render$i(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$i, "render$i"); +script$l.render = render$i; +var script$k = { + name: "BanIcon", + "extends": script$1m +}; +function render$h(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M7 0C5.61553 0 4.26215 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.00303296 5.6003 -0.13559 7.00776 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C14 5.14348 13.2625 3.36301 11.9497 2.05025C10.637 0.737498 8.85652 0 7 0ZM1.16667 7C1.16549 5.65478 1.63303 4.35118 2.48889 3.31333L10.6867 11.5111C9.83309 12.2112 8.79816 12.6544 7.70243 12.789C6.60669 12.9236 5.49527 12.744 4.49764 12.2713C3.50001 11.7986 2.65724 11.0521 2.06751 10.1188C1.47778 9.18558 1.16537 8.10397 1.16667 7ZM11.5111 10.6867L3.31334 2.48889C4.43144 1.57388 5.84966 1.10701 7.29265 1.1789C8.73565 1.2508 10.1004 1.85633 11.1221 2.87795C12.1437 3.89956 12.7492 5.26435 12.8211 6.70735C12.893 8.15034 12.4261 9.56856 11.5111 10.6867Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$h, "render$h"); +script$k.render = render$h; +var script$j = { + name: "StarIcon", + "extends": script$1m +}; +function render$g(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M10.9741 13.6721C10.8806 13.6719 10.7886 13.6483 10.7066 13.6033L7.00002 11.6545L3.29345 13.6033C3.19926 13.6539 3.09281 13.6771 2.98612 13.6703C2.87943 13.6636 2.77676 13.6271 2.6897 13.5651C2.60277 13.5014 2.53529 13.4147 2.4948 13.3148C2.45431 13.215 2.44241 13.1058 2.46042 12.9995L3.17881 8.87264L0.167699 5.95324C0.0922333 5.8777 0.039368 5.78258 0.0150625 5.67861C-0.00924303 5.57463 -0.00402231 5.46594 0.030136 5.36477C0.0621323 5.26323 0.122141 5.17278 0.203259 5.10383C0.284377 5.03488 0.383311 4.99023 0.488681 4.97501L4.63087 4.37126L6.48797 0.618832C6.54083 0.530159 6.61581 0.456732 6.70556 0.405741C6.79532 0.35475 6.89678 0.327942 7.00002 0.327942C7.10325 0.327942 7.20471 0.35475 7.29447 0.405741C7.38422 0.456732 7.4592 0.530159 7.51206 0.618832L9.36916 4.37126L13.5114 4.97501C13.6167 4.99023 13.7157 5.03488 13.7968 5.10383C13.8779 5.17278 13.9379 5.26323 13.9699 5.36477C14.0041 5.46594 14.0093 5.57463 13.985 5.67861C13.9607 5.78258 13.9078 5.8777 13.8323 5.95324L10.8212 8.87264L11.532 12.9995C11.55 13.1058 11.5381 13.215 11.4976 13.3148C11.4571 13.4147 11.3896 13.5014 11.3027 13.5651C11.2059 13.632 11.0917 13.6692 10.9741 13.6721ZM7.00002 10.4393C7.09251 10.4404 7.18371 10.4613 7.2675 10.5005L10.2098 12.029L9.65193 8.75036C9.6368 8.6584 9.64343 8.56418 9.6713 8.47526C9.69918 8.38633 9.74751 8.30518 9.81242 8.23832L12.1969 5.94559L8.90298 5.45648C8.81188 5.44198 8.72555 5.406 8.65113 5.35152C8.57671 5.29703 8.51633 5.2256 8.475 5.14314L7.00002 2.1626L5.52503 5.15078C5.4837 5.23324 5.42332 5.30467 5.3489 5.35916C5.27448 5.41365 5.18815 5.44963 5.09705 5.46412L1.80318 5.94559L4.18761 8.23832C4.25252 8.30518 4.30085 8.38633 4.32873 8.47526C4.3566 8.56418 4.36323 8.6584 4.3481 8.75036L3.7902 12.0519L6.73253 10.5234C6.81451 10.4762 6.9058 10.4475 7.00002 10.4393Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$g, "render$g"); +script$j.render = render$g; +var script$i = { + name: "StarFillIcon", + "extends": script$1m +}; +function render$f(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M13.9718 5.36453C13.9398 5.26298 13.8798 5.17252 13.7986 5.10356C13.7175 5.0346 13.6186 4.98994 13.5132 4.97472L9.37043 4.37088L7.51307 0.617955C7.46021 0.529271 7.38522 0.455834 7.29545 0.404836C7.20568 0.353838 7.1042 0.327026 7.00096 0.327026C6.89771 0.327026 6.79624 0.353838 6.70647 0.404836C6.6167 0.455834 6.54171 0.529271 6.48885 0.617955L4.63149 4.37088L0.488746 4.97472C0.383363 4.98994 0.284416 5.0346 0.203286 5.10356C0.122157 5.17252 0.0621407 5.26298 0.03014 5.36453C-0.00402286 5.46571 -0.00924428 5.57442 0.0150645 5.67841C0.0393733 5.7824 0.0922457 5.87753 0.167722 5.95308L3.17924 8.87287L2.4684 13.0003C2.45038 13.1066 2.46229 13.2158 2.50278 13.3157C2.54328 13.4156 2.61077 13.5022 2.6977 13.5659C2.78477 13.628 2.88746 13.6644 2.99416 13.6712C3.10087 13.678 3.20733 13.6547 3.30153 13.6042L7.00096 11.6551L10.708 13.6042C10.79 13.6491 10.882 13.6728 10.9755 13.673C11.0958 13.6716 11.2129 13.6343 11.3119 13.5659C11.3988 13.5022 11.4663 13.4156 11.5068 13.3157C11.5473 13.2158 11.5592 13.1066 11.5412 13.0003L10.8227 8.87287L13.8266 5.95308C13.9033 5.87835 13.9577 5.7836 13.9833 5.67957C14.009 5.57554 14.005 5.4664 13.9718 5.36453Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$f, "render$f"); +script$i.render = render$f; +var theme$9 = /* @__PURE__ */ __name(function theme31(_ref) { + var dt = _ref.dt; + return "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n gap: ".concat(dt("rating.gap"), ";\n}\n\n.p-rating-option {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n outline-color: transparent;\n border-radius: 50%;\n transition: background ").concat(dt("rating.transition.duration"), ", color ").concat(dt("rating.transition.duration"), ", border-color ").concat(dt("rating.transition.duration"), ", outline-color ").concat(dt("rating.transition.duration"), ", box-shadow ").concat(dt("rating.transition.duration"), ";\n}\n\n.p-rating-option.p-focus-visible {\n box-shadow: ").concat(dt("rating.focus.ring.shadow"), ";\n outline: ").concat(dt("rating.focus.ring.width"), " ").concat(dt("rating.focus.ring.style"), " ").concat(dt("rating.focus.ring.color"), ";\n outline-offset: ").concat(dt("rating.focus.ring.offset"), ";\n}\n\n.p-rating-icon {\n color: ").concat(dt("rating.icon.color"), ";\n transition: background ").concat(dt("rating.transition.duration"), ", color ").concat(dt("rating.transition.duration"), ", border-color ").concat(dt("rating.transition.duration"), ", outline-color ").concat(dt("rating.transition.duration"), ", box-shadow ").concat(dt("rating.transition.duration"), ";\n font-size: ").concat(dt("rating.icon.size"), ";\n width: ").concat(dt("rating.icon.size"), ";\n height: ").concat(dt("rating.icon.size"), ";\n}\n\n.p-rating:not(.p-disabled):not(.p-readonly) .p-rating-option:hover .p-rating-icon {\n color: ").concat(dt("rating.icon.hover.color"), ";\n}\n\n.p-rating-option-active .p-rating-icon {\n color: ").concat(dt("rating.icon.active.color"), ";\n}\n\n.p-rating-icon.p-invalid { /* @todo */\n stroke: ").concat(dt("rating.invalid.icon.color"), ";\n}\n"); +}, "theme"); +var classes$a = { + root: /* @__PURE__ */ __name(function root24(_ref2) { + var props = _ref2.props; + return ["p-rating", { + "p-readonly": props.readonly, + "p-disabled": props.disabled + }]; + }, "root"), + option: /* @__PURE__ */ __name(function option3(_ref3) { + var instance = _ref3.instance, value2 = _ref3.value; + return ["p-rating-option", { + "p-rating-option-active": value2 <= instance.d_value, + "p-focus-visible": value2 === instance.focusedOptionIndex && instance.isFocusVisibleItem + }]; + }, "option"), + onIcon: /* @__PURE__ */ __name(function onIcon(_ref4) { + var instance = _ref4.instance; + return ["p-rating-icon p-rating-on-icon", { + "p-invalid": instance.$invalid + }]; + }, "onIcon"), + offIcon: /* @__PURE__ */ __name(function offIcon(_ref5) { + var instance = _ref5.instance; + return ["p-rating-icon p-rating-off-icon", { + "p-invalid": instance.$invalid + }]; + }, "offIcon") +}; +var RatingStyle = BaseStyle.extend({ + name: "rating", + theme: theme$9, + classes: classes$a +}); +var script$1$a = { + name: "BaseRating", + "extends": script$1s, + props: { + readonly: { + type: Boolean, + "default": false + }, + stars: { + type: Number, + "default": 5 + }, + onIcon: { + type: String, + "default": void 0 + }, + offIcon: { + type: String, + "default": void 0 + } + }, + style: RatingStyle, + provide: /* @__PURE__ */ __name(function provide41() { + return { + $pcRating: this, + $parentInstance: this + }; + }, "provide") +}; +var script$h = { + name: "Rating", + "extends": script$1$a, + inheritAttrs: false, + emits: ["change", "focus", "blur"], + data: /* @__PURE__ */ __name(function data30() { + return { + d_name: this.name, + focusedOptionIndex: -1, + isFocusVisibleItem: true + }; + }, "data"), + watch: { + name: /* @__PURE__ */ __name(function name3(newValue) { + this.d_name = newValue || UniqueComponentId(); + }, "name") + }, + mounted: /* @__PURE__ */ __name(function mounted31() { + this.d_name = this.d_name || UniqueComponentId(); + }, "mounted"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions9(key, value2) { + return this.ptm(key, { + context: { + active: value2 <= this.d_value, + focused: value2 === this.focusedOptionIndex + } + }); + }, "getPTOptions"), + onOptionClick: /* @__PURE__ */ __name(function onOptionClick3(event2, value2) { + if (!this.readonly && !this.disabled) { + this.onOptionSelect(event2, value2); + this.isFocusVisibleItem = false; + var firstFocusableEl = getFirstFocusableElement(event2.currentTarget); + firstFocusableEl && focus(firstFocusableEl); + } + }, "onOptionClick"), + onFocus: /* @__PURE__ */ __name(function onFocus12(event2, value2) { + this.focusedOptionIndex = value2; + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur12(event2) { + var _this$formField$onBlu, _this$formField; + this.focusedOptionIndex = -1; + this.$emit("blur", event2); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField); + }, "onBlur"), + onChange: /* @__PURE__ */ __name(function onChange(event2, value2) { + this.onOptionSelect(event2, value2); + this.isFocusVisibleItem = true; + }, "onChange"), + onOptionSelect: /* @__PURE__ */ __name(function onOptionSelect3(event2, value2) { + if (this.focusedOptionIndex === value2 || this.d_value === value2) { + this.focusedOptionIndex = -1; + this.updateModel(event2, null); + } else { + this.focusedOptionIndex = value2; + this.updateModel(event2, value2 || null); + } + }, "onOptionSelect"), + updateModel: /* @__PURE__ */ __name(function updateModel7(event2, value2) { + this.writeValue(value2, event2); + this.$emit("change", { + originalEvent: event2, + value: value2 + }); + }, "updateModel"), + starAriaLabel: /* @__PURE__ */ __name(function starAriaLabel(value2) { + return value2 === 1 ? this.$primevue.config.locale.aria.star : this.$primevue.config.locale.aria.stars.replace(/{star}/g, value2); + }, "starAriaLabel") + }, + components: { + StarFillIcon: script$i, + StarIcon: script$j, + BanIcon: script$k + } +}; +var _hoisted_1$b = ["onClick", "data-p-active", "data-p-focused"]; +var _hoisted_2$8 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"]; +function render$e(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.stars, function(value2) { + return openBlock(), createElementBlock("div", mergeProps({ + key: value2, + "class": _ctx.cx("option", { + value: value2 + }), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onOptionClick($event, value2); + }, "onClick"), + ref_for: true + }, $options.getPTOptions("option", value2), { + "data-p-active": value2 <= _ctx.d_value, + "data-p-focused": value2 === $data.focusedOptionIndex + }), [createBaseVNode("span", mergeProps({ + "class": "p-hidden-accessible", + ref_for: true + }, _ctx.ptm("hiddenOptionInputContainer"), { + "data-p-hidden-accessible": true + }), [createBaseVNode("input", mergeProps({ + type: "radio", + value: value2, + name: $data.d_name, + checked: _ctx.d_value === value2, + disabled: _ctx.disabled, + readonly: _ctx.readonly, + "aria-label": $options.starAriaLabel(value2), + onFocus: /* @__PURE__ */ __name(function onFocus15($event) { + return $options.onFocus($event, value2); + }, "onFocus"), + onBlur: _cache[0] || (_cache[0] = function() { + return $options.onBlur && $options.onBlur.apply($options, arguments); + }), + onChange: /* @__PURE__ */ __name(function onChange2($event) { + return $options.onChange($event, value2); + }, "onChange"), + ref_for: true + }, _ctx.ptm("hiddenOptionInput")), null, 16, _hoisted_2$8)], 16), value2 <= _ctx.d_value ? renderSlot(_ctx.$slots, "onicon", { + key: 0, + value: value2, + "class": normalizeClass(_ctx.cx("onIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.onIcon ? "span" : "StarFillIcon"), mergeProps({ + "class": [_ctx.cx("onIcon"), _ctx.onIcon], + ref_for: true + }, _ctx.ptm("onIcon")), null, 16, ["class"]))]; + }) : renderSlot(_ctx.$slots, "officon", { + key: 1, + value: value2, + "class": normalizeClass(_ctx.cx("offIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.offIcon ? "span" : "StarIcon"), mergeProps({ + "class": [_ctx.cx("offIcon"), _ctx.offIcon], + ref_for: true + }, _ctx.ptm("offIcon")), null, 16, ["class"]))]; + })], 16, _hoisted_1$b); + }), 128))], 16); +} +__name(render$e, "render$e"); +script$h.render = render$e; +var script$g = { + name: "Row", + "extends": script$1d, + inject: ["$rows"], + mounted: /* @__PURE__ */ __name(function mounted32() { + var _this$$rows; + (_this$$rows = this.$rows) === null || _this$$rows === void 0 || _this$$rows.add(this.$); + }, "mounted"), + unmounted: /* @__PURE__ */ __name(function unmounted4() { + var _this$$rows2; + (_this$$rows2 = this.$rows) === null || _this$$rows2 === void 0 || _this$$rows2["delete"](this.$); + }, "unmounted"), + render: /* @__PURE__ */ __name(function render2() { + return null; + }, "render") +}; +var RowStyle = BaseStyle.extend({ + name: "row" +}); +var theme$8 = /* @__PURE__ */ __name(function theme32(_ref) { + _ref.dt; + return "\n.p-scrolltop.p-button {\n position: fixed !important;\n inset-block-end: 20px;\n inset-inline-end: 20px;\n}\n\n.p-scrolltop-sticky.p-button {\n position: sticky !important;\n display: flex;\n margin-inline-start: auto;\n}\n\n.p-scrolltop-enter-from {\n opacity: 0;\n}\n\n.p-scrolltop-enter-active {\n transition: opacity 0.15s;\n}\n\n.p-scrolltop.p-scrolltop-leave-to {\n opacity: 0;\n}\n\n.p-scrolltop-leave-active {\n transition: opacity 0.15s;\n}\n"; +}, "theme"); +var classes$9 = { + root: /* @__PURE__ */ __name(function root25(_ref2) { + var props = _ref2.props; + return ["p-scrolltop", { + "p-scrolltop-sticky": props.target !== "window" + }]; + }, "root"), + icon: "p-scrolltop-icon" +}; +var ScrollTopStyle = BaseStyle.extend({ + name: "scrolltop", + theme: theme$8, + classes: classes$9 +}); +var script$1$9 = { + name: "BaseScrollTop", + "extends": script$1d, + props: { + target: { + type: String, + "default": "window" + }, + threshold: { + type: Number, + "default": 400 + }, + icon: { + type: String, + "default": void 0 + }, + behavior: { + type: String, + "default": "smooth" + }, + buttonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default17() { + return { + rounded: true + }; + }, "_default") + } + }, + style: ScrollTopStyle, + provide: /* @__PURE__ */ __name(function provide42() { + return { + $pcScrollTop: this, + $parentInstance: this + }; + }, "provide") +}; +var script$f = { + name: "ScrollTop", + "extends": script$1$9, + inheritAttrs: false, + scrollListener: null, + container: null, + data: /* @__PURE__ */ __name(function data31() { + return { + visible: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted33() { + if (this.target === "window") this.bindDocumentScrollListener(); + else if (this.target === "parent") this.bindParentScrollListener(); + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount14() { + if (this.target === "window") this.unbindDocumentScrollListener(); + else if (this.target === "parent") this.unbindParentScrollListener(); + if (this.container) { + ZIndex.clear(this.container); + this.overlay = null; + } + }, "beforeUnmount"), + methods: { + onClick: /* @__PURE__ */ __name(function onClick5() { + var scrollElement = this.target === "window" ? window : this.$el.parentElement; + scrollElement.scroll({ + top: 0, + behavior: this.behavior + }); + }, "onClick"), + checkVisibility: /* @__PURE__ */ __name(function checkVisibility(scrollY) { + if (scrollY > this.threshold) this.visible = true; + else this.visible = false; + }, "checkVisibility"), + bindParentScrollListener: /* @__PURE__ */ __name(function bindParentScrollListener() { + var _this = this; + this.scrollListener = function() { + _this.checkVisibility(_this.$el.parentElement.scrollTop); + }; + this.$el.parentElement.addEventListener("scroll", this.scrollListener); + }, "bindParentScrollListener"), + bindDocumentScrollListener: /* @__PURE__ */ __name(function bindDocumentScrollListener() { + var _this2 = this; + this.scrollListener = function() { + _this2.checkVisibility(getWindowScrollTop()); + }; + window.addEventListener("scroll", this.scrollListener); + }, "bindDocumentScrollListener"), + unbindParentScrollListener: /* @__PURE__ */ __name(function unbindParentScrollListener() { + if (this.scrollListener) { + this.$el.parentElement.removeEventListener("scroll", this.scrollListener); + this.scrollListener = null; + } + }, "unbindParentScrollListener"), + unbindDocumentScrollListener: /* @__PURE__ */ __name(function unbindDocumentScrollListener() { + if (this.scrollListener) { + window.removeEventListener("scroll", this.scrollListener); + this.scrollListener = null; + } + }, "unbindDocumentScrollListener"), + onEnter: /* @__PURE__ */ __name(function onEnter4(el) { + ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); + }, "onEnter"), + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave4(el) { + ZIndex.clear(el); + }, "onAfterLeave"), + containerRef: /* @__PURE__ */ __name(function containerRef5(el) { + this.container = el ? el.$el : void 0; + }, "containerRef") + }, + computed: { + scrollTopAriaLabel: /* @__PURE__ */ __name(function scrollTopAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.scrollTop : void 0; + }, "scrollTopAriaLabel") + }, + components: { + ChevronUpIcon: script$1j, + Button: script$1e + } +}; +function render$d(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Button = resolveComponent("Button"); + return openBlock(), createBlock(Transition, mergeProps({ + name: "p-scrolltop", + appear: "", + onEnter: $options.onEnter, + onAfterLeave: $options.onAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [$data.visible ? (openBlock(), createBlock(_component_Button, mergeProps({ + key: 0, + ref: $options.containerRef, + "class": _ctx.cx("root"), + onClick: $options.onClick, + "aria-label": $options.scrollTopAriaLabel, + unstyled: _ctx.unstyled + }, _ctx.buttonProps, { + pt: _ctx.pt + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "icon", { + "class": normalizeClass(_ctx.cx("icon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? "span" : "ChevronUpIcon"), mergeProps({ + "class": [_ctx.cx("icon"), _ctx.icon, slotProps["class"]] + }, _ctx.ptm("icon")), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "onClick", "aria-label", "unstyled", "pt"])) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onAfterLeave"]); +} +__name(render$d, "render$d"); +script$f.render = render$d; +var script$e = { + name: "Sidebar", + "extends": script$1c, + mounted: /* @__PURE__ */ __name(function mounted34() { + console.warn("Deprecated since v4. Use Drawer component instead."); + }, "mounted") +}; +var SidebarStyle = BaseStyle.extend({ + name: "sidebar" +}); +var theme$7 = /* @__PURE__ */ __name(function theme33(_ref) { + var dt = _ref.dt; + return "\n.p-skeleton {\n overflow: hidden;\n background: ".concat(dt("skeleton.background"), ";\n border-radius: ").concat(dt("skeleton.border.radius"), ';\n}\n\n.p-skeleton::after {\n content: "";\n animation: p-skeleton-animation 1.2s infinite;\n height: 100%;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n transform: translateX(-100%);\n z-index: 1;\n background: linear-gradient(90deg, rgba(255, 255, 255, 0), ').concat(dt("skeleton.animation.background"), ", rgba(255, 255, 255, 0));\n}\n\n[dir='rtl'] .p-skeleton::after {\n animation-name: p-skeleton-animation-rtl;\n}\n\n.p-skeleton-circle {\n border-radius: 50%;\n}\n\n.p-skeleton-animation-none::after {\n animation: none;\n}\n\n@keyframes p-skeleton-animation {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(100%);\n }\n}\n\n@keyframes p-skeleton-animation-rtl {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n"); +}, "theme"); +var inlineStyles$3 = { + root: { + position: "relative" + } +}; +var classes$8 = { + root: /* @__PURE__ */ __name(function root26(_ref2) { + var props = _ref2.props; + return ["p-skeleton p-component", { + "p-skeleton-circle": props.shape === "circle", + "p-skeleton-animation-none": props.animation === "none" + }]; + }, "root") +}; +var SkeletonStyle = BaseStyle.extend({ + name: "skeleton", + theme: theme$7, + classes: classes$8, + inlineStyles: inlineStyles$3 +}); +var script$1$8 = { + name: "BaseSkeleton", + "extends": script$1d, + props: { + shape: { + type: String, + "default": "rectangle" + }, + size: { + type: String, + "default": null + }, + width: { + type: String, + "default": "100%" + }, + height: { + type: String, + "default": "1rem" + }, + borderRadius: { + type: String, + "default": null + }, + animation: { + type: String, + "default": "wave" + } + }, + style: SkeletonStyle, + provide: /* @__PURE__ */ __name(function provide43() { + return { + $pcSkeleton: this, + $parentInstance: this + }; + }, "provide") +}; +var script$d = { + name: "Skeleton", + "extends": script$1$8, + inheritAttrs: false, + computed: { + containerStyle: /* @__PURE__ */ __name(function containerStyle() { + if (this.size) return { + width: this.size, + height: this.size, + borderRadius: this.borderRadius + }; + else return { + width: this.width, + height: this.height, + borderRadius: this.borderRadius + }; + }, "containerStyle") + } +}; +function render$c(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + style: [_ctx.sx("root"), $options.containerStyle], + "aria-hidden": "true" + }, _ctx.ptmi("root")), null, 16); +} +__name(render$c, "render$c"); +script$d.render = render$c; +function _typeof$8(o) { + "@babel/helpers - typeof"; + return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$8(o); +} +__name(_typeof$8, "_typeof$8"); +function _defineProperty$8(e, r, t2) { + return (r = _toPropertyKey$8(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$8, "_defineProperty$8"); +function _toPropertyKey$8(t2) { + var i = _toPrimitive$8(t2, "string"); + return "symbol" == _typeof$8(i) ? i : i + ""; +} +__name(_toPropertyKey$8, "_toPropertyKey$8"); +function _toPrimitive$8(t2, r) { + if ("object" != _typeof$8(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$8(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$8, "_toPrimitive$8"); +var theme$6 = /* @__PURE__ */ __name(function theme34(_ref) { + var dt = _ref.dt; + return "\n.p-speeddial {\n position: static;\n display: flex;\n gap: ".concat(dt("speeddial.gap"), ";\n}\n\n.p-speeddial-button {\n z-index: 1;\n}\n\n.p-speeddial-button.p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, background ").concat(dt("speeddial.transition.duration"), ", color ").concat(dt("speeddial.transition.duration"), ", border-color ").concat(dt("speeddial.transition.duration"), ",\n box-shadow ").concat(dt("speeddial.transition.duration"), ", outline-color ").concat(dt("speeddial.transition.duration"), ";\n will-change: transform;\n}\n\n.p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: inset-block-start 0s linear ").concat(dt("speeddial.transition.duration"), ";\n pointer-events: none;\n outline: 0 none;\n z-index: 2;\n gap: ").concat(dt("speeddial.gap"), ";\n}\n\n.p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n}\n\n.p-speeddial-circle .p-speeddial-item,\n.p-speeddial-semi-circle .p-speeddial-item,\n.p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n}\n\n.p-speeddial-mask {\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n background: ").concat(dt("mask.background"), ";\n border-radius: 6px;\n transition: opacity 150ms;\n}\n\n.p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 150ms;\n}\n\n.p-speeddial-open .p-speeddial-list {\n pointer-events: auto;\n}\n\n.p-speeddial-open .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n}\n\n.p-speeddial-open .p-speeddial-rotate {\n transform: rotate(45deg);\n}\n"); +}, "theme"); +var inlineStyles$2 = { + root: /* @__PURE__ */ __name(function root27(_ref2) { + var props = _ref2.props; + return { + alignItems: (props.direction === "up" || props.direction === "down") && "center", + justifyContent: (props.direction === "left" || props.direction === "right") && "center", + flexDirection: props.direction === "up" ? "column-reverse" : props.direction === "down" ? "column" : props.direction === "left" ? "row-reverse" : props.direction === "right" ? "row" : null + }; + }, "root"), + list: /* @__PURE__ */ __name(function list(_ref3) { + var props = _ref3.props; + return { + flexDirection: props.direction === "up" ? "column-reverse" : props.direction === "down" ? "column" : props.direction === "left" ? "row-reverse" : props.direction === "right" ? "row" : null + }; + }, "list") +}; +var classes$7 = { + root: /* @__PURE__ */ __name(function root28(_ref4) { + var instance = _ref4.instance, props = _ref4.props; + return ["p-speeddial p-component p-speeddial-".concat(props.type), _defineProperty$8(_defineProperty$8(_defineProperty$8({}, "p-speeddial-direction-".concat(props.direction), props.type !== "circle"), "p-speeddial-open", instance.d_visible), "p-disabled", props.disabled)]; + }, "root"), + pcButton: /* @__PURE__ */ __name(function pcButton(_ref6) { + var props = _ref6.props; + return ["p-speeddial-button", { + "p-speeddial-rotate": props.rotateAnimation && !props.hideIcon + }]; + }, "pcButton"), + list: "p-speeddial-list", + item: "p-speeddial-item", + action: "p-speeddial-action", + actionIcon: "p-speeddial-action-icon", + mask: /* @__PURE__ */ __name(function mask4(_ref7) { + var instance = _ref7.instance; + return ["p-speeddial-mask", { + "p-speeddial-mask-visible": instance.d_visible + }]; + }, "mask") +}; +var SpeedDialStyle = BaseStyle.extend({ + name: "speeddial", + theme: theme$6, + classes: classes$7, + inlineStyles: inlineStyles$2 +}); +var script$1$7 = { + name: "BaseSpeedDial", + "extends": script$1d, + props: { + model: null, + visible: { + type: Boolean, + "default": false + }, + direction: { + type: String, + "default": "up" + }, + transitionDelay: { + type: Number, + "default": 30 + }, + type: { + type: String, + "default": "linear" + }, + radius: { + type: Number, + "default": 0 + }, + mask: { + type: Boolean, + "default": false + }, + disabled: { + type: Boolean, + "default": false + }, + hideOnClickOutside: { + type: Boolean, + "default": true + }, + buttonClass: null, + maskStyle: null, + maskClass: null, + showIcon: { + type: String, + "default": void 0 + }, + hideIcon: { + type: String, + "default": void 0 + }, + rotateAnimation: { + type: Boolean, + "default": true + }, + tooltipOptions: null, + style: null, + "class": null, + buttonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default18() { + return { + rounded: true + }; + }, "_default") + }, + actionButtonProps: { + type: Object, + "default": /* @__PURE__ */ __name(function _default19() { + return { + severity: "secondary", + rounded: true, + size: "small" + }; + }, "_default") + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: SpeedDialStyle, + provide: /* @__PURE__ */ __name(function provide44() { + return { + $pcSpeedDial: this, + $parentInstance: this + }; + }, "provide") +}; +function _typeof$7(o) { + "@babel/helpers - typeof"; + return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$7(o); +} +__name(_typeof$7, "_typeof$7"); +function ownKeys$7(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$7, "ownKeys$7"); +function _objectSpread$7(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$7(Object(t2), true).forEach(function(r2) { + _defineProperty$7(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$7(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$7, "_objectSpread$7"); +function _defineProperty$7(e, r, t2) { + return (r = _toPropertyKey$7(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$7, "_defineProperty$7"); +function _toPropertyKey$7(t2) { + var i = _toPrimitive$7(t2, "string"); + return "symbol" == _typeof$7(i) ? i : i + ""; +} +__name(_toPropertyKey$7, "_toPropertyKey$7"); +function _toPrimitive$7(t2, r) { + if ("object" != _typeof$7(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$7(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$7, "_toPrimitive$7"); +function _toConsumableArray$3(r) { + return _arrayWithoutHoles$3(r) || _iterableToArray$3(r) || _unsupportedIterableToArray$3(r) || _nonIterableSpread$3(); +} +__name(_toConsumableArray$3, "_toConsumableArray$3"); +function _nonIterableSpread$3() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$3, "_nonIterableSpread$3"); +function _unsupportedIterableToArray$3(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$3(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$3(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$3, "_unsupportedIterableToArray$3"); +function _iterableToArray$3(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$3, "_iterableToArray$3"); +function _arrayWithoutHoles$3(r) { + if (Array.isArray(r)) return _arrayLikeToArray$3(r); +} +__name(_arrayWithoutHoles$3, "_arrayWithoutHoles$3"); +function _arrayLikeToArray$3(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$3, "_arrayLikeToArray$3"); +var Math_PI = 3.14159265358979; +var script$c = { + name: "SpeedDial", + "extends": script$1$7, + inheritAttrs: false, + emits: ["click", "show", "hide", "focus", "blur"], + documentClickListener: null, + container: null, + list: null, + data: /* @__PURE__ */ __name(function data32() { + return { + id: this.$attrs.id, + d_visible: this.visible, + isItemClicked: false, + focused: false, + focusedOptionIndex: -1 + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId12(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + visible: /* @__PURE__ */ __name(function visible4(newValue) { + this.d_visible = newValue; + }, "visible") + }, + mounted: /* @__PURE__ */ __name(function mounted35() { + this.id = this.id || UniqueComponentId(); + if (this.type !== "linear") { + var button = findSingle(this.container, '[data-pc-name="pcbutton"]'); + var firstItem = findSingle(this.list, '[data-pc-section="item"]'); + if (button && firstItem) { + var wDiff = Math.abs(button.offsetWidth - firstItem.offsetWidth); + var hDiff = Math.abs(button.offsetHeight - firstItem.offsetHeight); + this.list.style.setProperty($dt("item.diff.x").name, "".concat(wDiff / 2, "px")); + this.list.style.setProperty($dt("item.diff.y").name, "".concat(hDiff / 2, "px")); + } + } + if (this.hideOnClickOutside) { + this.bindDocumentClickListener(); + } + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount15() { + this.unbindDocumentClickListener(); + }, "beforeUnmount"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions10(id4, key) { + return this.ptm(key, { + context: { + active: this.isItemActive(id4), + hidden: !this.d_visible + } + }); + }, "getPTOptions"), + onFocus: /* @__PURE__ */ __name(function onFocus13(event2) { + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur13(event2) { + this.focusedOptionIndex = -1; + this.$emit("blur", event2); + }, "onBlur"), + onItemClick: /* @__PURE__ */ __name(function onItemClick7(e, item8) { + if (item8.command) { + item8.command({ + originalEvent: e, + item: item8 + }); + } + this.hide(); + this.isItemClicked = true; + e.preventDefault(); + }, "onItemClick"), + onClick: /* @__PURE__ */ __name(function onClick6(event2) { + this.d_visible ? this.hide() : this.show(); + this.isItemClicked = true; + this.$emit("click", event2); + }, "onClick"), + show: /* @__PURE__ */ __name(function show5() { + this.d_visible = true; + this.$emit("show"); + }, "show"), + hide: /* @__PURE__ */ __name(function hide6() { + this.d_visible = false; + this.$emit("hide"); + }, "hide"), + calculateTransitionDelay: /* @__PURE__ */ __name(function calculateTransitionDelay(index) { + var length = this.model.length; + var visible7 = this.d_visible; + return (visible7 ? index : length - index - 1) * this.transitionDelay; + }, "calculateTransitionDelay"), + onTogglerKeydown: /* @__PURE__ */ __name(function onTogglerKeydown(event2) { + switch (event2.code) { + case "ArrowDown": + case "ArrowLeft": + this.onTogglerArrowDown(event2); + break; + case "ArrowUp": + case "ArrowRight": + this.onTogglerArrowUp(event2); + break; + case "Escape": + this.onEscapeKey(); + break; + } + }, "onTogglerKeydown"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown11(event2) { + switch (event2.code) { + case "ArrowDown": + this.onArrowDown(event2); + break; + case "ArrowUp": + this.onArrowUp(event2); + break; + case "ArrowLeft": + this.onArrowLeft(event2); + break; + case "ArrowRight": + this.onArrowRight(event2); + break; + case "Enter": + case "NumpadEnter": + case "Space": + this.onEnterKey(event2); + break; + case "Escape": + this.onEscapeKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + } + }, "onKeyDown"), + onTogglerArrowUp: /* @__PURE__ */ __name(function onTogglerArrowUp(event2) { + this.show(); + this.navigatePrevItem(event2); + event2.preventDefault(); + }, "onTogglerArrowUp"), + onTogglerArrowDown: /* @__PURE__ */ __name(function onTogglerArrowDown(event2) { + this.show(); + this.navigateNextItem(event2); + event2.preventDefault(); + }, "onTogglerArrowDown"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey7(event2) { + var _this = this; + var items2 = find(this.container, '[data-pc-section="item"]'); + var itemIndex = _toConsumableArray$3(items2).findIndex(function(item8) { + return item8.id === _this.focusedOptionIndex; + }); + var buttonEl = findSingle(this.container, "button"); + this.onItemClick(event2, this.model[itemIndex]); + this.onBlur(event2); + buttonEl && focus(buttonEl); + }, "onEnterKey"), + onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey4() { + this.hide(); + var buttonEl = findSingle(this.container, "button"); + buttonEl && focus(buttonEl); + }, "onEscapeKey"), + onArrowUp: /* @__PURE__ */ __name(function onArrowUp(event2) { + if (this.direction === "down") { + this.navigatePrevItem(event2); + } else { + this.navigateNextItem(event2); + } + }, "onArrowUp"), + onArrowDown: /* @__PURE__ */ __name(function onArrowDown(event2) { + if (this.direction === "down") { + this.navigateNextItem(event2); + } else { + this.navigatePrevItem(event2); + } + }, "onArrowDown"), + onArrowLeft: /* @__PURE__ */ __name(function onArrowLeft(event2) { + var leftValidDirections = ["left", "up-right", "down-left"]; + var rightValidDirections = ["right", "up-left", "down-right"]; + if (leftValidDirections.includes(this.direction)) { + this.navigateNextItem(event2); + } else if (rightValidDirections.includes(this.direction)) { + this.navigatePrevItem(event2); + } else { + this.navigatePrevItem(event2); + } + }, "onArrowLeft"), + onArrowRight: /* @__PURE__ */ __name(function onArrowRight(event2) { + var leftValidDirections = ["left", "up-right", "down-left"]; + var rightValidDirections = ["right", "up-left", "down-right"]; + if (leftValidDirections.includes(this.direction)) { + this.navigatePrevItem(event2); + } else if (rightValidDirections.includes(this.direction)) { + this.navigateNextItem(event2); + } else { + this.navigateNextItem(event2); + } + }, "onArrowRight"), + onEndKey: /* @__PURE__ */ __name(function onEndKey8(event2) { + event2.preventDefault(); + this.focusedOptionIndex = -1; + this.navigatePrevItem(event2); + }, "onEndKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey8(event2) { + event2.preventDefault(); + this.focusedOptionIndex = -1; + this.navigateNextItem(event2); + }, "onHomeKey"), + navigateNextItem: /* @__PURE__ */ __name(function navigateNextItem(event2) { + var optionIndex = this.findNextOptionIndex(this.focusedOptionIndex); + this.changeFocusedOptionIndex(optionIndex); + event2.preventDefault(); + }, "navigateNextItem"), + navigatePrevItem: /* @__PURE__ */ __name(function navigatePrevItem(event2) { + var optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex); + this.changeFocusedOptionIndex(optionIndex); + event2.preventDefault(); + }, "navigatePrevItem"), + changeFocusedOptionIndex: /* @__PURE__ */ __name(function changeFocusedOptionIndex5(index) { + var items2 = find(this.container, '[data-pc-section="item"]'); + var filteredItems = _toConsumableArray$3(items2).filter(function(item8) { + return !hasClass(findSingle(item8, "a"), "p-disabled"); + }); + if (filteredItems[index]) { + this.focusedOptionIndex = filteredItems[index].getAttribute("id"); + var buttonEl = findSingle(filteredItems[index], '[type="button"]'); + buttonEl && focus(buttonEl); + } + }, "changeFocusedOptionIndex"), + findPrevOptionIndex: /* @__PURE__ */ __name(function findPrevOptionIndex5(index) { + var items2 = find(this.container, '[data-pc-section="item"]'); + var filteredItems = _toConsumableArray$3(items2).filter(function(item8) { + return !hasClass(findSingle(item8, "a"), "p-disabled"); + }); + var newIndex = index === -1 ? filteredItems[filteredItems.length - 1].id : index; + var matchedOptionIndex = filteredItems.findIndex(function(link) { + return link.getAttribute("id") === newIndex; + }); + matchedOptionIndex = index === -1 ? filteredItems.length - 1 : matchedOptionIndex - 1; + return matchedOptionIndex; + }, "findPrevOptionIndex"), + findNextOptionIndex: /* @__PURE__ */ __name(function findNextOptionIndex5(index) { + var items2 = find(this.container, '[data-pc-section="item"]'); + var filteredItems = _toConsumableArray$3(items2).filter(function(item8) { + return !hasClass(findSingle(item8, "a"), "p-disabled"); + }); + var newIndex = index === -1 ? filteredItems[0].id : index; + var matchedOptionIndex = filteredItems.findIndex(function(link) { + return link.getAttribute("id") === newIndex; + }); + matchedOptionIndex = index === -1 ? 0 : matchedOptionIndex + 1; + return matchedOptionIndex; + }, "findNextOptionIndex"), + calculatePointStyle: /* @__PURE__ */ __name(function calculatePointStyle(index) { + var type = this.type; + if (type !== "linear") { + var length = this.model.length; + var radius = this.radius || length * 20; + if (type === "circle") { + var step = 2 * Math_PI / length; + return { + left: "calc(".concat(radius * Math.cos(step * index), "px + ").concat($dt("item.diff.x", "0px").variable, ")"), + top: "calc(".concat(radius * Math.sin(step * index), "px + ").concat($dt("item.diff.y", "0px").variable, ")") + }; + } else if (type === "semi-circle") { + var direction = this.direction; + var _step = Math_PI / (length - 1); + var x = "calc(".concat(radius * Math.cos(_step * index), "px + ").concat($dt("item.diff.x", "0px").variable, ")"); + var y = "calc(".concat(radius * Math.sin(_step * index), "px + ").concat($dt("item.diff.y", "0px").variable, ")"); + if (direction === "up") { + return { + left: x, + bottom: y + }; + } else if (direction === "down") { + return { + left: x, + top: y + }; + } else if (direction === "left") { + return { + right: y, + top: x + }; + } else if (direction === "right") { + return { + left: y, + top: x + }; + } + } else if (type === "quarter-circle") { + var _direction = this.direction; + var _step2 = Math_PI / (2 * (length - 1)); + var _x = "calc(".concat(radius * Math.cos(_step2 * index), "px + ").concat($dt("item.diff.x", "0px").variable, ")"); + var _y = "calc(".concat(radius * Math.sin(_step2 * index), "px + ").concat($dt("item.diff.y", "0px").variable, ")"); + if (_direction === "up-left") { + return { + right: _x, + bottom: _y + }; + } else if (_direction === "up-right") { + return { + left: _x, + bottom: _y + }; + } else if (_direction === "down-left") { + return { + right: _y, + top: _x + }; + } else if (_direction === "down-right") { + return { + left: _y, + top: _x + }; + } + } + } + return {}; + }, "calculatePointStyle"), + getItemStyle: /* @__PURE__ */ __name(function getItemStyle(index) { + var transitionDelay = this.calculateTransitionDelay(index); + var pointStyle = this.calculatePointStyle(index); + return _objectSpread$7({ + transitionDelay: "".concat(transitionDelay, "ms") + }, pointStyle); + }, "getItemStyle"), + bindDocumentClickListener: /* @__PURE__ */ __name(function bindDocumentClickListener() { + var _this2 = this; + if (!this.documentClickListener) { + this.documentClickListener = function(event2) { + if (_this2.d_visible && _this2.isOutsideClicked(event2)) { + _this2.hide(); + } + _this2.isItemClicked = false; + }; + document.addEventListener("click", this.documentClickListener); + } + }, "bindDocumentClickListener"), + unbindDocumentClickListener: /* @__PURE__ */ __name(function unbindDocumentClickListener() { + if (this.documentClickListener) { + document.removeEventListener("click", this.documentClickListener); + this.documentClickListener = null; + } + }, "unbindDocumentClickListener"), + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked4(event2) { + return this.container && !(this.container.isSameNode(event2.target) || this.container.contains(event2.target) || this.isItemClicked); + }, "isOutsideClicked"), + isItemVisible: /* @__PURE__ */ __name(function isItemVisible6(item8) { + return typeof item8.visible === "function" ? item8.visible() : item8.visible !== false; + }, "isItemVisible"), + isItemActive: /* @__PURE__ */ __name(function isItemActive7(id4) { + return id4 === this.focusedOptionId; + }, "isItemActive"), + containerRef: /* @__PURE__ */ __name(function containerRef6(el) { + this.container = el; + }, "containerRef"), + listRef: /* @__PURE__ */ __name(function listRef3(el) { + this.list = el; + }, "listRef") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass3() { + return [this.cx("root"), this["class"]]; + }, "containerClass"), + focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId6() { + return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null; + }, "focusedOptionId") + }, + components: { + Button: script$1e, + PlusIcon: script$1x + }, + directives: { + ripple: Ripple, + tooltip: Tooltip + } +}; +var _hoisted_1$a = ["id"]; +var _hoisted_2$7 = ["id", "data-p-active"]; +function render$b(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Button = resolveComponent("Button"); + var _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("div", mergeProps({ + ref: $options.containerRef, + "class": $options.containerClass, + style: [_ctx.style, _ctx.sx("root")] + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "button", { + visible: $data.d_visible, + toggleCallback: $options.onClick + }, function() { + return [createVNode(_component_Button, mergeProps({ + "class": [_ctx.cx("pcButton"), _ctx.buttonClass], + disabled: _ctx.disabled, + "aria-expanded": $data.d_visible, + "aria-haspopup": true, + "aria-controls": $data.id + "_list", + "aria-label": _ctx.ariaLabel, + "aria-labelledby": _ctx.ariaLabelledby, + unstyled: _ctx.unstyled, + onClick: _cache[0] || (_cache[0] = function($event) { + return $options.onClick($event); + }), + onKeydown: $options.onTogglerKeydown + }, _ctx.buttonProps, { + pt: _ctx.ptm("pcButton") + }), { + icon: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "icon", { + visible: $data.d_visible + }, function() { + return [$data.d_visible && !!_ctx.hideIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.hideIcon ? "span" : "PlusIcon"), mergeProps({ + key: 0, + "class": [_ctx.hideIcon, slotProps["class"]] + }, _ctx.ptm("pcButton")["icon"], { + "data-pc-section": "icon" + }), null, 16, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showIcon ? "span" : "PlusIcon"), mergeProps({ + key: 1, + "class": [$data.d_visible && !!_ctx.hideIcon ? _ctx.hideIcon : _ctx.showIcon, slotProps["class"]] + }, _ctx.ptm("pcButton")["icon"], { + "data-pc-section": "icon" + }), null, 16, ["class"]))]; + })]; + }), + _: 3 + }, 16, ["class", "disabled", "aria-expanded", "aria-controls", "aria-label", "aria-labelledby", "unstyled", "onKeydown", "pt"])]; + }), createBaseVNode("ul", mergeProps({ + ref: $options.listRef, + id: $data.id + "_list", + "class": _ctx.cx("list"), + style: _ctx.sx("list"), + role: "menu", + tabindex: "-1", + onFocus: _cache[1] || (_cache[1] = function() { + return $options.onFocus && $options.onFocus.apply($options, arguments); + }), + onBlur: _cache[2] || (_cache[2] = function() { + return $options.onBlur && $options.onBlur.apply($options, arguments); + }), + onKeydown: _cache[3] || (_cache[3] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }) + }, _ctx.ptm("list")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function(item8, index) { + return openBlock(), createElementBlock(Fragment, { + key: index + }, [$options.isItemVisible(item8) ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + id: "".concat($data.id, "_").concat(index), + "class": _ctx.cx("item", { + id: "".concat($data.id, "_").concat(index) + }), + style: $options.getItemStyle(index), + role: "none", + "data-p-active": $options.isItemActive("".concat($data.id, "_").concat(index)), + ref_for: true + }, $options.getPTOptions("".concat($data.id, "_").concat(index), "item")), [!_ctx.$slots.item ? withDirectives((openBlock(), createBlock(_component_Button, mergeProps({ + key: 0, + tabindex: -1, + role: "menuitem", + "class": _ctx.cx("pcAction", { + item: item8 + }), + "aria-label": item8.label, + disabled: _ctx.disabled, + unstyled: _ctx.unstyled, + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onItemClick($event, item8); + }, "onClick"), + ref_for: true + }, _ctx.actionButtonProps, { + pt: $options.getPTOptions("".concat($data.id, "_").concat(index), "pcAction") + }), createSlots({ + _: 2 + }, [item8.icon ? { + name: "icon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "itemicon", { + item: item8, + "class": normalizeClass(slotProps["class"]) + }, function() { + return [createBaseVNode("span", mergeProps({ + "class": [item8.icon, slotProps["class"]], + ref_for: true + }, $options.getPTOptions("".concat($data.id, "_").concat(index), "actionIcon")), null, 16)]; + })]; + }), + key: "0" + } : void 0]), 1040, ["class", "aria-label", "disabled", "unstyled", "onClick", "pt"])), [[_directive_tooltip, { + value: item8.label, + disabled: !_ctx.tooltipOptions + }, _ctx.tooltipOptions]]) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), { + key: 1, + item: item8, + onClick: /* @__PURE__ */ __name(function onClick11(event2) { + return $options.onItemClick(event2, item8); + }, "onClick"), + toggleCallback: /* @__PURE__ */ __name(function toggleCallback(event2) { + return $options.onItemClick(event2, item8); + }, "toggleCallback") + }, null, 8, ["item", "onClick", "toggleCallback"]))], 16, _hoisted_2$7)) : createCommentVNode("", true)], 64); + }), 128))], 16, _hoisted_1$a)], 16), _ctx.mask ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": [_ctx.cx("mask"), _ctx.maskClass], + style: _ctx.maskStyle + }, _ctx.ptm("mask")), null, 16)) : createCommentVNode("", true)], 64); +} +__name(render$b, "render$b"); +script$c.render = render$b; +var classes$6 = { + root: /* @__PURE__ */ __name(function root29(_ref) { + var instance = _ref.instance; + return ["p-stepitem", { + "p-stepitem-active": instance.isActive + }]; + }, "root") +}; +var StepItemStyle = BaseStyle.extend({ + name: "stepitem", + classes: classes$6 +}); +var script$1$6 = { + name: "BaseStepItem", + "extends": script$1d, + props: { + value: { + type: [String, Number], + "default": void 0 + } + }, + style: StepItemStyle, + provide: /* @__PURE__ */ __name(function provide45() { + return { + $pcStepItem: this, + $parentInstance: this + }; + }, "provide") +}; +var script$b = { + name: "StepItem", + "extends": script$1$6, + inheritAttrs: false, + inject: ["$pcStepper"], + computed: { + isActive: /* @__PURE__ */ __name(function isActive() { + var _this$$pcStepper; + return ((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.d_value) === this.value; + }, "isActive") + } +}; +var _hoisted_1$9 = ["data-p-active"]; +function render$a(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + "data-p-active": $options.isActive + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$9); +} +__name(render$a, "render$a"); +script$b.render = render$a; +var theme$5 = /* @__PURE__ */ __name(function theme35(_ref) { + var dt = _ref.dt; + return '\n.p-steps {\n position: relative;\n}\n\n.p-steps-list {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: flex;\n}\n\n.p-steps-item {\n position: relative;\n display: flex;\n justify-content: center;\n flex: 1 1 auto;\n}\n\n.p-steps-item.p-disabled,\n.p-steps-item.p-disabled * {\n opacity: 1;\n pointer-events: auto;\n user-select: auto;\n cursor: auto;\n}\n\n.p-steps-item:before {\n content: " ";\n border-top: 2px solid '.concat(dt("steps.separator.background"), ";\n width: 100%;\n top: 50%;\n left: 0;\n display: block;\n position: absolute;\n margin-top: calc(-1rem + 1px);\n}\n\n.p-steps-item:first-child::before {\n width: calc(50% + 1rem);\n transform: translateX(100%);\n}\n\n.p-steps-item:last-child::before {\n width: 50%;\n}\n\n.p-steps-item-link {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n transition: outline-color ").concat(dt("steps.transition.duration"), ", box-shadow ").concat(dt("steps.transition.duration"), ";\n border-radius: ").concat(dt("steps.item.link.border.radius"), ";\n outline-color: transparent;\n gap: ").concat(dt("steps.item.link.gap"), ";\n}\n\n.p-steps-item-link:not(.p-disabled):focus-visible {\n box-shadow: ").concat(dt("steps.item.link.focus.ring.shadow"), ";\n outline: ").concat(dt("steps.item.link.focus.ring.width"), " ").concat(dt("steps.item.link.focus.ring.style"), " ").concat(dt("steps.item.link.focus.ring.color"), ";\n outline-offset: ").concat(dt("steps.item.link.focus.ring.offset"), ";\n}\n\n.p-steps-item-label {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n color: ").concat(dt("steps.item.label.color"), ";\n display: block;\n font-weight: ").concat(dt("steps.item.label.font.weight"), ";\n}\n\n.p-steps-item-number {\n display: flex;\n align-items: center;\n justify-content: center;\n color: ").concat(dt("steps.item.number.color"), ";\n border: 2px solid ").concat(dt("steps.item.number.border.color"), ";\n background: ").concat(dt("steps.item.number.background"), ";\n min-width: ").concat(dt("steps.item.number.size"), ";\n height: ").concat(dt("steps.item.number.size"), ";\n line-height: ").concat(dt("steps.item.number.size"), ";\n font-size: ").concat(dt("steps.item.number.font.size"), ";\n z-index: 1;\n border-radius: ").concat(dt("steps.item.number.border.radius"), ";\n position: relative;\n font-weight: ").concat(dt("steps.item.number.font.weight"), ';\n}\n\n.p-steps-item-number::after {\n content: " ";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ').concat(dt("steps.item.number.border.radius"), ";\n box-shadow: ").concat(dt("steps.item.number.shadow"), ";\n}\n\n.p-steps:not(.p-readonly) .p-steps-item {\n cursor: pointer;\n}\n\n.p-steps-item-active .p-steps-item-number {\n background: ").concat(dt("steps.item.number.active.background"), ";\n border-color: ").concat(dt("steps.item.number.active.border.color"), ";\n color: ").concat(dt("steps.item.number.active.color"), ";\n}\n\n.p-steps-item-active .p-steps-item-label {\n color: ").concat(dt("steps.item.label.active.color"), ";\n}\n"); +}, "theme"); +var classes$5 = { + root: /* @__PURE__ */ __name(function root30(_ref2) { + var props = _ref2.props; + return ["p-steps p-component", { + "p-readonly": props.readonly + }]; + }, "root"), + list: "p-steps-list", + item: /* @__PURE__ */ __name(function item6(_ref3) { + var instance = _ref3.instance, _item = _ref3.item, index = _ref3.index; + return ["p-steps-item", { + "p-steps-item-active": instance.isActive(index), + "p-disabled": instance.isItemDisabled(_item, index) + }]; + }, "item"), + itemLink: "p-steps-item-link", + itemNumber: "p-steps-item-number", + itemLabel: "p-steps-item-label" +}; +var StepsStyle = BaseStyle.extend({ + name: "steps", + theme: theme$5, + classes: classes$5 +}); +var script$1$5 = { + name: "BaseSteps", + "extends": script$1d, + props: { + id: { + type: String + }, + model: { + type: Array, + "default": null + }, + readonly: { + type: Boolean, + "default": true + }, + activeStep: { + type: Number, + "default": 0 + } + }, + style: StepsStyle, + provide: /* @__PURE__ */ __name(function provide46() { + return { + $pcSteps: this, + $parentInstance: this + }; + }, "provide") +}; +var script$a = { + name: "Steps", + "extends": script$1$5, + inheritAttrs: false, + emits: ["update:activeStep", "step-change"], + data: /* @__PURE__ */ __name(function data33() { + return { + d_activeStep: this.activeStep + }; + }, "data"), + watch: { + activeStep: /* @__PURE__ */ __name(function activeStep(newValue) { + this.d_activeStep = newValue; + }, "activeStep") + }, + mounted: /* @__PURE__ */ __name(function mounted36() { + var firstItem = this.findFirstItem(); + firstItem && (firstItem.tabIndex = "0"); + }, "mounted"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions11(key, item8, index) { + return this.ptm(key, { + context: { + item: item8, + index, + active: this.isActive(index), + disabled: this.isItemDisabled(item8, index) + } + }); + }, "getPTOptions"), + onItemClick: /* @__PURE__ */ __name(function onItemClick8(event2, item8, index) { + if (this.disabled(item8) || this.readonly) { + event2.preventDefault(); + return; + } + if (item8.command) { + item8.command({ + originalEvent: event2, + item: item8 + }); + } + if (index !== this.d_activeStep) { + this.d_activeStep = index; + this.$emit("update:activeStep", this.d_activeStep); + } + this.$emit("step-change", { + originalEvent: event2, + index + }); + }, "onItemClick"), + onItemKeydown: /* @__PURE__ */ __name(function onItemKeydown(event2, item8) { + switch (event2.code) { + case "ArrowRight": { + this.navigateToNextItem(event2.target); + event2.preventDefault(); + break; + } + case "ArrowLeft": { + this.navigateToPrevItem(event2.target); + event2.preventDefault(); + break; + } + case "Home": { + this.navigateToFirstItem(event2.target); + event2.preventDefault(); + break; + } + case "End": { + this.navigateToLastItem(event2.target); + event2.preventDefault(); + break; + } + case "Tab": + break; + case "Enter": + case "NumpadEnter": + case "Space": { + this.onItemClick(event2, item8); + event2.preventDefault(); + break; + } + } + }, "onItemKeydown"), + navigateToNextItem: /* @__PURE__ */ __name(function navigateToNextItem(target) { + var nextItem = this.findNextItem(target); + nextItem && this.setFocusToMenuitem(target, nextItem); + }, "navigateToNextItem"), + navigateToPrevItem: /* @__PURE__ */ __name(function navigateToPrevItem(target) { + var prevItem = this.findPrevItem(target); + prevItem && this.setFocusToMenuitem(target, prevItem); + }, "navigateToPrevItem"), + navigateToFirstItem: /* @__PURE__ */ __name(function navigateToFirstItem(target) { + var firstItem = this.findFirstItem(target); + firstItem && this.setFocusToMenuitem(target, firstItem); + }, "navigateToFirstItem"), + navigateToLastItem: /* @__PURE__ */ __name(function navigateToLastItem(target) { + var lastItem = this.findLastItem(target); + lastItem && this.setFocusToMenuitem(target, lastItem); + }, "navigateToLastItem"), + findNextItem: /* @__PURE__ */ __name(function findNextItem2(item8) { + var nextItem = item8.parentElement.nextElementSibling; + return nextItem ? nextItem.children[0] : null; + }, "findNextItem"), + findPrevItem: /* @__PURE__ */ __name(function findPrevItem2(item8) { + var prevItem = item8.parentElement.previousElementSibling; + return prevItem ? prevItem.children[0] : null; + }, "findPrevItem"), + findFirstItem: /* @__PURE__ */ __name(function findFirstItem2() { + var firstSibling = findSingle(this.$refs.list, '[data-pc-section="item"]'); + return firstSibling ? firstSibling.children[0] : null; + }, "findFirstItem"), + findLastItem: /* @__PURE__ */ __name(function findLastItem2() { + var siblings = find(this.$refs.list, '[data-pc-section="item"]'); + return siblings ? siblings[siblings.length - 1].children[0] : null; + }, "findLastItem"), + setFocusToMenuitem: /* @__PURE__ */ __name(function setFocusToMenuitem(target, focusableItem) { + target.tabIndex = "-1"; + focusableItem.tabIndex = "0"; + focusableItem.focus(); + }, "setFocusToMenuitem"), + isActive: /* @__PURE__ */ __name(function isActive2(index) { + return index === this.d_activeStep; + }, "isActive"), + isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled6(item8, index) { + return this.disabled(item8) || this.readonly && !this.isActive(index); + }, "isItemDisabled"), + visible: /* @__PURE__ */ __name(function visible5(item8) { + return typeof item8.visible === "function" ? item8.visible() : item8.visible !== false; + }, "visible"), + disabled: /* @__PURE__ */ __name(function disabled5(item8) { + return typeof item8.disabled === "function" ? item8.disabled() : item8.disabled; + }, "disabled"), + label: /* @__PURE__ */ __name(function label8(item8) { + return typeof item8.label === "function" ? item8.label() : item8.label; + }, "label"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps7(item8, index) { + var _this = this; + return { + action: mergeProps({ + "class": this.cx("itemLink"), + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return _this.onItemClick($event, item8); + }, "onClick"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown15($event) { + return _this.onItemKeydown($event, item8); + }, "onKeyDown") + }, this.getPTOptions("itemLink", item8, index)), + step: mergeProps({ + "class": this.cx("itemNumber") + }, this.getPTOptions("itemNumber", item8, index)), + label: mergeProps({ + "class": this.cx("itemLabel") + }, this.getPTOptions("itemLabel", item8, index)) + }; + }, "getMenuItemProps") + } +}; +var _hoisted_1$8 = ["id"]; +var _hoisted_2$6 = ["aria-current", "onClick", "onKeydown", "data-p-active", "data-p-disabled"]; +function render$9(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("nav", mergeProps({ + id: _ctx.id, + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("ol", mergeProps({ + ref: "list", + "class": _ctx.cx("list") + }, _ctx.ptm("list")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function(item8, index) { + return openBlock(), createElementBlock(Fragment, { + key: $options.label(item8) + "_" + index.toString() + }, [$options.visible(item8) ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + "class": [_ctx.cx("item", { + item: item8, + index + }), item8["class"]], + style: item8.style, + "aria-current": $options.isActive(index) ? "step" : void 0, + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onItemClick($event, item8, index); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + return $options.onItemKeydown($event, item8, index); + }, "onKeydown"), + ref_for: true + }, $options.getPTOptions("item", item8, index), { + "data-p-active": $options.isActive(index), + "data-p-disabled": $options.isItemDisabled(item8, index) + }), [!_ctx.$slots.item ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.cx("itemLink"), + ref_for: true + }, $options.getPTOptions("itemLink", item8, index)), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("itemNumber"), + ref_for: true + }, $options.getPTOptions("itemNumber", item8, index)), toDisplayString(index + 1), 17), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("itemLabel"), + ref_for: true + }, $options.getPTOptions("itemLabel", item8, index)), toDisplayString($options.label(item8)), 17)], 16)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), { + key: 1, + item: item8, + index, + active: index === $data.d_activeStep, + label: $options.label(item8), + props: $options.getMenuItemProps(item8, index) + }, null, 8, ["item", "index", "active", "label", "props"]))], 16, _hoisted_2$6)) : createCommentVNode("", true)], 64); + }), 128))], 16)], 16, _hoisted_1$8); +} +__name(render$9, "render$9"); +script$a.render = render$9; +var StyleClassStyle = BaseStyle.extend({ + name: "styleclass-directive" +}); +var BaseStyleClass = BaseDirective.extend({ + style: StyleClassStyle +}); +var StyleClass = BaseStyleClass.extend("styleclass", { + mounted: /* @__PURE__ */ __name(function mounted37(el, binding) { + el.setAttribute("data-pd-styleclass", true); + this.bind(el, binding); + }, "mounted"), + unmounted: /* @__PURE__ */ __name(function unmounted5(el) { + this.unbind(el); + }, "unmounted"), + methods: { + bind: /* @__PURE__ */ __name(function bind(el, binding) { + var _this = this; + var target = this.resolveTarget(el, binding); + this.$el = target; + el.$_pstyleclass_clicklistener = function() { + if (binding.value.toggleClass) { + if (hasClass(target, binding.value.toggleClass)) removeClass(target, binding.value.toggleClass); + else addClass(target, binding.value.toggleClass); + } else { + if (target.offsetParent === null) _this.enter(target, el, binding); + else _this.leave(target, binding); + } + }; + el.addEventListener("click", el.$_pstyleclass_clicklistener); + }, "bind"), + unbind: /* @__PURE__ */ __name(function unbind(el) { + if (el.$_pstyleclass_clicklistener) { + el.removeEventListener("click", el.$_pstyleclass_clicklistener); + el.$_pstyleclass_clicklistener = null; + } + this.unbindDocumentListener(el); + }, "unbind"), + enter: /* @__PURE__ */ __name(function enter2(target, el, binding) { + if (binding.value.enterActiveClass) { + if (!target.$_pstyleclass_animating) { + target.$_pstyleclass_animating = true; + if (binding.value.enterActiveClass.includes("slidedown")) { + target.style.height = "0px"; + removeClass(target, binding.value.hiddenClass || binding.value.enterFromClass); + target.style.maxHeight = target.scrollHeight + "px"; + addClass(target, binding.value.hiddenClass || binding.value.enterActiveClass); + target.style.height = ""; + } + addClass(target, binding.value.enterActiveClass); + if (binding.value.enterFromClass) { + removeClass(target, binding.value.enterFromClass); + } + target.$p_styleclass_enterlistener = function() { + removeClass(target, binding.value.enterActiveClass); + if (binding.value.enterToClass) { + addClass(target, binding.value.enterToClass); + } + target.removeEventListener("animationend", target.$p_styleclass_enterlistener); + if (binding.value.enterActiveClass.includes("slidedown")) { + target.style.maxHeight = ""; + } + target.$_pstyleclass_animating = false; + }; + target.addEventListener("animationend", target.$p_styleclass_enterlistener); + } + } else { + if (binding.value.enterFromClass) { + removeClass(target, binding.value.enterFromClass); + } + if (binding.value.enterToClass) { + addClass(target, binding.value.enterToClass); + } + } + if (binding.value.hideOnOutsideClick) { + this.bindDocumentListener(target, el, binding); + } + }, "enter"), + leave: /* @__PURE__ */ __name(function leave2(target, binding) { + if (binding.value.leaveActiveClass) { + if (!target.$_pstyleclass_animating) { + target.$_pstyleclass_animating = true; + addClass(target, binding.value.leaveActiveClass); + if (binding.value.leaveFromClass) { + removeClass(target, binding.value.leaveFromClass); + } + target.$p_styleclass_leavelistener = function() { + removeClass(target, binding.value.leaveActiveClass); + if (binding.value.leaveToClass) { + addClass(target, binding.value.leaveToClass); + } + target.removeEventListener("animationend", target.$p_styleclass_leavelistener); + target.$_pstyleclass_animating = false; + }; + target.addEventListener("animationend", target.$p_styleclass_leavelistener); + } + } else { + if (binding.value.leaveFromClass) { + removeClass(target, binding.value.leaveFromClass); + } + if (binding.value.leaveToClass) { + addClass(target, binding.value.leaveToClass); + } + } + if (binding.value.hideOnOutsideClick) { + this.unbindDocumentListener(target); + } + }, "leave"), + resolveTarget: /* @__PURE__ */ __name(function resolveTarget(el, binding) { + switch (binding.value.selector) { + case "@next": + return el.nextElementSibling; + case "@prev": + return el.previousElementSibling; + case "@parent": + return el.parentElement; + case "@grandparent": + return el.parentElement.parentElement; + default: + return document.querySelector(binding.value.selector); + } + }, "resolveTarget"), + bindDocumentListener: /* @__PURE__ */ __name(function bindDocumentListener(target, el, binding) { + var _this2 = this; + if (!target.$p_styleclass_documentlistener) { + target.$p_styleclass_documentlistener = function(event2) { + if (!_this2.isVisible(target) || getComputedStyle(target).getPropertyValue("position") === "static") { + _this2.unbindDocumentListener(target); + } else if (_this2.isOutsideClick(event2, target, el)) { + _this2.leave(target, binding); + } + }; + target.ownerDocument.addEventListener("click", target.$p_styleclass_documentlistener); + } + }, "bindDocumentListener"), + unbindDocumentListener: /* @__PURE__ */ __name(function unbindDocumentListener(target) { + if (target.$p_styleclass_documentlistener) { + target.ownerDocument.removeEventListener("click", target.$p_styleclass_documentlistener); + target.$p_styleclass_documentlistener = null; + } + }, "unbindDocumentListener"), + isVisible: /* @__PURE__ */ __name(function isVisible(target) { + return target.offsetParent !== null; + }, "isVisible"), + isOutsideClick: /* @__PURE__ */ __name(function isOutsideClick(event2, target, el) { + return !el.isSameNode(event2.target) && !el.contains(event2.target) && !target.contains(event2.target); + }, "isOutsideClick") + } +}); +var theme$4 = /* @__PURE__ */ __name(function theme36(_ref) { + var dt = _ref.dt; + return "\n.p-tabmenu {\n overflow-x: auto;\n}\n\n.p-tabmenu-tablist {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n background: ".concat(dt("tabmenu.tablist.background"), ";\n border-style: solid;\n border-color: ").concat(dt("tabmenu.tablist.border.color"), ";\n border-width: ").concat(dt("tabmenu.tablist.border.width"), ";\n position: relative;\n}\n\n.p-tabmenu-item-link {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n text-decoration: none;\n position: relative;\n overflow: hidden;\n background: ").concat(dt("tabmenu.item.background"), ";\n border-style: solid;\n border-width: ").concat(dt("tabmenu.item.border.width"), ";\n border-color: ").concat(dt("tabmenu.item.border.color"), ";\n color: ").concat(dt("tabmenu.item.color"), ";\n padding: ").concat(dt("tabmenu.item.padding"), ";\n font-weight: ").concat(dt("tabmenu.item.font.weight"), ";\n transition: background ").concat(dt("tabmenu.transition.duration"), ", border-color ").concat(dt("tabmenu.transition.duration"), ", color ").concat(dt("tabmenu.transition.duration"), ", outline-color ").concat(dt("tabmenu.transition.duration"), ", box-shadow ").concat(dt("tabmenu.transition.duration"), ";\n margin: ").concat(dt("tabmenu.item.margin"), ";\n outline-color: transparent;\n gap: ").concat(dt("tabmenu.item.gap"), ";\n}\n\n.p-tabmenu-item-link:focus-visible {\n z-index: 1;\n box-shadow: ").concat(dt("tabmenu.item.focus.ring.shadow"), ";\n outline: ").concat(dt("tabmenu.item.focus.ring.width"), " ").concat(dt("tabmenu.item.focus.ring.style"), " ").concat(dt("tabmenu.item.focus.ring.color"), ";\n outline-offset: ").concat(dt("tabmenu.item.focus.ring.offset"), ";\n}\n\n.p-tabmenu-item-icon {\n color: ").concat(dt("tabmenu.item.icon.color"), ";\n transition: background ").concat(dt("tabmenu.transition.duration"), ", border-color ").concat(dt("tabmenu.transition.duration"), ", color ").concat(dt("tabmenu.transition.duration"), ", outline-color ").concat(dt("tabmenu.transition.duration"), ", box-shadow ").concat(dt("tabmenu.transition.duration"), ";\n}\n\n.p-tabmenu-item-label {\n line-height: 1;\n}\n\n.p-tabmenu-item:not(.p-tabmenu-item-active):not(.p-disabled):hover .p-tabmenu-item-link {\n background: ").concat(dt("tabmenu.item.hover.background"), ";\n border-color: ").concat(dt("tabmenu.item.hover.border.color"), ";\n color: ").concat(dt("tabmenu.item.hover.color"), ";\n}\n\n.p-tabmenu-item:not(.p-tabmenu-item-active):not(.p-disabled):hover .p-tabmenu-item-icon {\n color: ").concat(dt("tabmenu.item.icon.hover.color"), ";\n}\n\n.p-tabmenu-item-active .p-tabmenu-item-link {\n background: ").concat(dt("tabmenu.item.active.background"), ";\n border-color: ").concat(dt("tabmenu.item.active.border.color"), ";\n color: ").concat(dt("tabmenu.item.active.color"), ";\n}\n\n.p-tabmenu-item-active .p-tabmenu-item-icon {\n color: ").concat(dt("tabmenu.item.icon.active.color"), ";\n}\n\n.p-tabmenu-active-bar {\n z-index: 1;\n display: block;\n position: absolute;\n bottom: ").concat(dt("tabmenu.active.bar.bottom"), ";\n height: ").concat(dt("tabmenu.active.bar.height"), ";\n background: ").concat(dt("tabmenu.active.bar.background"), ";\n transition: 250ms cubic-bezier(0.35, 0, 0.25, 1);\n}\n\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n"); +}, "theme"); +var classes$4 = { + root: "p-tabmenu p-component", + tablist: "p-tabmenu-tablist", + item: /* @__PURE__ */ __name(function item7(_ref2) { + var instance = _ref2.instance, index = _ref2.index, _item = _ref2.item; + return ["p-tabmenu-item", { + "p-tabmenu-item-active": instance.d_activeIndex === index, + "p-disabled": instance.disabled(_item) + }]; + }, "item"), + itemLink: "p-tabmenu-item-link", + itemIcon: "p-tabmenu-item-icon", + itemLabel: "p-tabmenu-item-label", + activeBar: "p-tabmenu-active-bar" +}; +var TabMenuStyle = BaseStyle.extend({ + name: "tabmenu", + theme: theme$4, + classes: classes$4 +}); +var script$1$4 = { + name: "BaseTabMenu", + "extends": script$1d, + props: { + model: { + type: Array, + "default": null + }, + activeIndex: { + type: Number, + "default": 0 + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + } + }, + style: TabMenuStyle, + provide: /* @__PURE__ */ __name(function provide47() { + return { + $pcTabMenu: this, + $parentInstance: this + }; + }, "provide") +}; +var script$9 = { + name: "TabMenu", + "extends": script$1$4, + inheritAttrs: false, + emits: ["update:activeIndex", "tab-change"], + data: /* @__PURE__ */ __name(function data34() { + return { + d_activeIndex: this.activeIndex + }; + }, "data"), + watch: { + activeIndex: { + flush: "post", + handler: /* @__PURE__ */ __name(function handler3(newValue) { + this.d_activeIndex = newValue; + this.updateInkBar(); + }, "handler") + } + }, + mounted: /* @__PURE__ */ __name(function mounted38() { + var _this = this; + this.$nextTick(function() { + _this.updateInkBar(); + }); + var activeItem2 = this.findActiveItem(); + activeItem2 && (activeItem2.tabIndex = "0"); + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated8() { + this.updateInkBar(); + }, "updated"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions12(key, item8, index) { + return this.ptm(key, { + context: { + item: item8, + index + } + }); + }, "getPTOptions"), + onItemClick: /* @__PURE__ */ __name(function onItemClick9(event2, item8, index) { + if (this.disabled(item8)) { + event2.preventDefault(); + return; + } + if (item8.command) { + item8.command({ + originalEvent: event2, + item: item8 + }); + } + if (index !== this.d_activeIndex) { + this.d_activeIndex = index; + this.$emit("update:activeIndex", this.d_activeIndex); + } + this.$emit("tab-change", { + originalEvent: event2, + index + }); + }, "onItemClick"), + onKeydownItem: /* @__PURE__ */ __name(function onKeydownItem(event2, item8, index) { + switch (event2.code) { + case "ArrowRight": { + this.navigateToNextItem(event2.target); + event2.preventDefault(); + break; + } + case "ArrowLeft": { + this.navigateToPrevItem(event2.target); + event2.preventDefault(); + break; + } + case "Home": { + this.navigateToFirstItem(event2.target); + event2.preventDefault(); + break; + } + case "End": { + this.navigateToLastItem(event2.target); + event2.preventDefault(); + break; + } + case "Space": + case "NumpadEnter": + case "Enter": { + this.onItemClick(event2, item8, index); + event2.preventDefault(); + break; + } + case "Tab": { + this.onTabKey(); + break; + } + } + }, "onKeydownItem"), + navigateToNextItem: /* @__PURE__ */ __name(function navigateToNextItem2(target) { + var nextItem = this.findNextItem(target); + nextItem && this.setFocusToMenuitem(target, nextItem); + }, "navigateToNextItem"), + navigateToPrevItem: /* @__PURE__ */ __name(function navigateToPrevItem2(target) { + var prevItem = this.findPrevItem(target); + prevItem && this.setFocusToMenuitem(target, prevItem); + }, "navigateToPrevItem"), + navigateToFirstItem: /* @__PURE__ */ __name(function navigateToFirstItem2(target) { + var firstItem = this.findFirstItem(target); + firstItem && this.setFocusToMenuitem(target, firstItem); + }, "navigateToFirstItem"), + navigateToLastItem: /* @__PURE__ */ __name(function navigateToLastItem2(target) { + var lastItem = this.findLastItem(target); + lastItem && this.setFocusToMenuitem(target, lastItem); + }, "navigateToLastItem"), + findNextItem: /* @__PURE__ */ __name(function findNextItem3(item8) { + var nextItem = item8.parentElement.nextElementSibling; + return nextItem ? getAttribute(nextItem, "data-p-disabled") === true ? this.findNextItem(nextItem.children[0]) : nextItem.children[0] : null; + }, "findNextItem"), + findPrevItem: /* @__PURE__ */ __name(function findPrevItem3(item8) { + var prevItem = item8.parentElement.previousElementSibling; + return prevItem ? getAttribute(prevItem, "data-p-disabled") === true ? this.findPrevItem(prevItem.children[0]) : prevItem.children[0] : null; + }, "findPrevItem"), + findFirstItem: /* @__PURE__ */ __name(function findFirstItem3() { + var firstSibling = findSingle(this.$refs.nav, '[data-pc-section="item"][data-p-disabled="false"]'); + return firstSibling ? firstSibling.children[0] : null; + }, "findFirstItem"), + findLastItem: /* @__PURE__ */ __name(function findLastItem3() { + var siblings = find(this.$refs.nav, '[data-pc-section="item"][data-p-disabled="false"]'); + return siblings ? siblings[siblings.length - 1].children[0] : null; + }, "findLastItem"), + findActiveItem: /* @__PURE__ */ __name(function findActiveItem() { + var activeItem2 = findSingle(this.$refs.nav, '[data-pc-section="item"][data-p-disabled="false"][data-p-active="true"]'); + return activeItem2 ? activeItem2.children[0] : null; + }, "findActiveItem"), + setFocusToMenuitem: /* @__PURE__ */ __name(function setFocusToMenuitem2(target, focusableItem) { + target.tabIndex = "-1"; + focusableItem.tabIndex = "0"; + focusableItem.focus(); + }, "setFocusToMenuitem"), + onTabKey: /* @__PURE__ */ __name(function onTabKey4() { + var activeItem2 = findSingle(this.$refs.nav, '[data-pc-section="item"][data-p-disabled="false"][data-p-active="true"]'); + var focusedItem = findSingle(this.$refs.nav, '[data-pc-section="itemlink"][tabindex="0"]'); + if (focusedItem !== activeItem2.children[0]) { + activeItem2 && (activeItem2.children[0].tabIndex = "0"); + focusedItem.tabIndex = "-1"; + } + }, "onTabKey"), + visible: /* @__PURE__ */ __name(function visible6(item8) { + return typeof item8.visible === "function" ? item8.visible() : item8.visible !== false; + }, "visible"), + disabled: /* @__PURE__ */ __name(function disabled6(item8) { + return typeof item8.disabled === "function" ? item8.disabled() : item8.disabled === true; + }, "disabled"), + label: /* @__PURE__ */ __name(function label9(item8) { + return typeof item8.label === "function" ? item8.label() : item8.label; + }, "label"), + updateInkBar: /* @__PURE__ */ __name(function updateInkBar() { + var tabs2 = this.$refs.nav.children; + var inkHighlighted = false; + for (var i = 0; i < tabs2.length; i++) { + var tab = tabs2[i]; + if (getAttribute(tab, "data-p-active")) { + this.$refs.inkbar.style.width = getWidth(tab) + "px"; + this.$refs.inkbar.style.left = getOffset(tab).left - getOffset(this.$refs.nav).left + "px"; + inkHighlighted = true; + } + } + if (!inkHighlighted) { + this.$refs.inkbar.style.width = "0px"; + this.$refs.inkbar.style.left = "0px"; + } + }, "updateInkBar"), + getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps8(item8, index) { + var _this2 = this; + return { + action: mergeProps({ + "class": this.cx("itemLink"), + tabindex: -1, + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return _this2.onItemClick($event, item8, index); + }, "onClick"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown15($event) { + return _this2.onKeydownItem($event, item8, index); + }, "onKeyDown") + }, this.getPTOptions("itemLink", item8, index)), + icon: mergeProps({ + "class": [this.cx("itemIcon"), item8.icon] + }, this.getPTOptions("itemIcon", item8, index)), + label: mergeProps({ + "class": this.cx("itemLabel") + }, this.getPTOptions("itemLabel", item8, index)) + }; + }, "getMenuItemProps") + }, + directives: { + ripple: Ripple + } +}; +var _hoisted_1$7 = ["aria-labelledby", "aria-label"]; +var _hoisted_2$5 = ["onClick", "onKeydown", "data-p-active", "data-p-disabled"]; +var _hoisted_3$5 = ["href", "target", "aria-label", "aria-disabled"]; +function render$8(_ctx, _cache, $props, $setup, $data, $options) { + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [createBaseVNode("ul", mergeProps({ + ref: "nav", + "class": _ctx.cx("tablist"), + role: "menubar", + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel + }, _ctx.ptm("tablist")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function(item8, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.label(item8) + "_" + i.toString() + }, [$options.visible(item8) ? (openBlock(), createElementBlock("li", mergeProps({ + key: 0, + ref_for: true, + ref: "tab", + "class": [_ctx.cx("item", { + item: item8, + index: i + }), item8["class"]], + role: "presentation", + onClick: /* @__PURE__ */ __name(function onClick11($event) { + return $options.onItemClick($event, item8, i); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + return $options.onKeydownItem($event, item8, i); + }, "onKeydown") + }, $options.getPTOptions("item", item8, i), { + "data-p-active": $data.d_activeIndex === i, + "data-p-disabled": $options.disabled(item8) + }), [!_ctx.$slots.item ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ + key: 0, + ref_for: true, + ref: "tabLink", + role: "menuitem", + href: item8.url, + "class": _ctx.cx("itemLink"), + target: item8.target, + "aria-label": $options.label(item8), + "aria-disabled": $options.disabled(item8), + tabindex: -1 + }, $options.getPTOptions("itemLink", item8, i)), [_ctx.$slots.itemicon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.itemicon), { + key: 0, + item: item8, + "class": normalizeClass(_ctx.cx("itemIcon")) + }, null, 8, ["item", "class"])) : item8.icon ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": [_ctx.cx("itemIcon"), item8.icon], + ref_for: true + }, $options.getPTOptions("itemIcon", item8, i)), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("itemLabel"), + ref_for: true + }, $options.getPTOptions("itemLabel", item8, i)), toDisplayString($options.label(item8)), 17)], 16, _hoisted_3$5)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), { + key: 1, + item: item8, + index: i, + active: i === $data.d_activeIndex, + label: $options.label(item8), + props: $options.getMenuItemProps(item8, i) + }, null, 8, ["item", "index", "active", "label", "props"]))], 16, _hoisted_2$5)) : createCommentVNode("", true)], 64); + }), 128)), createBaseVNode("li", mergeProps({ + ref: "inkbar", + role: "none", + "class": _ctx.cx("activeBar") + }, _ctx.ptm("activeBar")), null, 16)], 16, _hoisted_1$7)], 16); +} +__name(render$8, "render$8"); +script$9.render = render$8; +var TerminalService = EventBus(); +var theme$3 = /* @__PURE__ */ __name(function theme37(_ref) { + var dt = _ref.dt; + return "\n.p-terminal {\n height: ".concat(dt("terminal.height"), ";\n overflow: auto;\n background: ").concat(dt("terminal.background"), ";\n color: ").concat(dt("terminal.color"), ";\n border: 1px solid ").concat(dt("terminal.border.color"), ";\n padding: ").concat(dt("terminal.padding"), ";\n border-radius: ").concat(dt("terminal.border.radius"), ";\n}\n\n.p-terminal-prompt {\n display: flex;\n align-items: center;\n}\n\n.p-terminal-prompt-value {\n flex: 1 1 auto;\n border: 0 none;\n background: transparent;\n color: inherit;\n padding: 0;\n outline: 0 none;\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n}\n\n.p-terminal-prompt-label {\n margin-inline-end: ").concat(dt("terminal.prompt.gap"), ";\n}\n\n.p-terminal-input::-ms-clear {\n display: none;\n}\n\n.p-terminal-command-response {\n margin: ").concat(dt("terminal.command.response.margin"), ";\n}\n"); +}, "theme"); +var classes$3 = { + root: "p-terminal p-component", + welcomeMessage: "p-terminal-welcome-message", + commandList: "p-terminal-command-list", + command: "p-terminal-command", + commandValue: "p-terminal-command-value", + commandResponse: "p-terminal-command-response", + prompt: "p-terminal-prompt", + promptLabel: "p-terminal-prompt-label", + promptValue: "p-terminal-prompt-value" +}; +var TerminalStyle = BaseStyle.extend({ + name: "terminal", + theme: theme$3, + classes: classes$3 +}); +var script$1$3 = { + name: "BaseTerminal", + "extends": script$1d, + props: { + welcomeMessage: { + type: String, + "default": null + }, + prompt: { + type: String, + "default": null + } + }, + style: TerminalStyle, + provide: /* @__PURE__ */ __name(function provide48() { + return { + $pcTerminal: this, + $parentInstance: this + }; + }, "provide") +}; +var script$8 = { + name: "Terminal", + "extends": script$1$3, + inheritAttrs: false, + data: /* @__PURE__ */ __name(function data35() { + return { + commandText: null, + commands: [] + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted39() { + TerminalService.on("response", this.responseListener); + this.$refs.input.focus(); + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated9() { + this.$el.scrollTop = this.$el.scrollHeight; + }, "updated"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount16() { + TerminalService.off("response", this.responseListener); + }, "beforeUnmount"), + methods: { + onClick: /* @__PURE__ */ __name(function onClick7() { + this.$refs.input.focus(); + }, "onClick"), + onKeydown: /* @__PURE__ */ __name(function onKeydown5(event2) { + if (event2.key === "Enter" && this.commandText) { + this.commands.push({ + text: this.commandText + }); + TerminalService.emit("command", this.commandText); + this.commandText = ""; + } + }, "onKeydown"), + responseListener: /* @__PURE__ */ __name(function responseListener(response) { + this.commands[this.commands.length - 1].response = response; + }, "responseListener") + } +}; +function render$7(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + onClick: _cache[2] || (_cache[2] = function() { + return $options.onClick && $options.onClick.apply($options, arguments); + }) + }, _ctx.ptmi("root")), [_ctx.welcomeMessage ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("welcomeMessage") + }, _ctx.ptm("welcomeMessage")), toDisplayString(_ctx.welcomeMessage), 17)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("commandList") + }, _ctx.ptm("content")), [(openBlock(true), createElementBlock(Fragment, null, renderList($data.commands, function(command, i) { + return openBlock(), createElementBlock("div", mergeProps({ + key: command.text + i.toString(), + "class": _ctx.cx("command"), + ref_for: true + }, _ctx.ptm("commands")), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("promptLabel"), + ref_for: true + }, _ctx.ptm("prompt")), toDisplayString(_ctx.prompt), 17), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("commandValue"), + ref_for: true + }, _ctx.ptm("command")), toDisplayString(command.text), 17), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("commandResponse"), + "aria-live": "polite", + ref_for: true + }, _ctx.ptm("response")), toDisplayString(command.response), 17)], 16); + }), 128))], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("prompt") + }, _ctx.ptm("container")), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("promptLabel") + }, _ctx.ptm("prompt")), toDisplayString(_ctx.prompt), 17), withDirectives(createBaseVNode("input", mergeProps({ + ref: "input", + "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) { + return $data.commandText = $event; + }), + "class": _ctx.cx("promptValue"), + type: "text", + autocomplete: "off", + onKeydown: _cache[1] || (_cache[1] = function() { + return $options.onKeydown && $options.onKeydown.apply($options, arguments); + }) + }, _ctx.ptm("commandText")), null, 16), [[vModelText, $data.commandText]])], 16)], 16); +} +__name(render$7, "render$7"); +script$8.render = render$7; +var theme$2 = /* @__PURE__ */ __name(function theme38(_ref) { + var dt = _ref.dt; + return "\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n direction: ltr;\n}\n\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n\n.p-timeline-vertical .p-timeline-event-opposite,\n.p-timeline-vertical .p-timeline-event-content {\n padding: ".concat(dt("timeline.vertical.event.content.padding"), ";\n}\n\n.p-timeline-vertical .p-timeline-event-connector {\n width: ").concat(dt("timeline.event.connector.size"), ";\n}\n\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: ").concat(dt("timeline.event.min.height"), ";\n}\n\n.p-timeline-event:last-child {\n min-height: 0;\n}\n\n.p-timeline-event-opposite {\n flex: 1;\n}\n\n.p-timeline-event-content {\n flex: 1;\n}\n\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.p-timeline-event-marker {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n align-self: baseline;\n border-width: ").concat(dt("timeline.event.marker.border.width"), ";\n border-style: solid;\n border-color: ").concat(dt("timeline.event.marker.border.color"), ";\n border-radius: ").concat(dt("timeline.event.marker.border.radius"), ";\n width: ").concat(dt("timeline.event.marker.size"), ";\n height: ").concat(dt("timeline.event.marker.size"), ";\n background: ").concat(dt("timeline.event.marker.background"), ';\n}\n\n.p-timeline-event-marker::before {\n content: " ";\n border-radius: ').concat(dt("timeline.event.marker.content.border.radius"), ";\n width: ").concat(dt("timeline.event.marker.content.size"), ";\n height:").concat(dt("timeline.event.marker.content.size"), ";\n background: ").concat(dt("timeline.event.marker.content.background"), ';\n}\n\n.p-timeline-event-marker::after {\n content: " ";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ').concat(dt("timeline.event.marker.border.radius"), ";\n box-shadow: ").concat(dt("timeline.event.marker.content.inset.shadow"), ";\n}\n\n.p-timeline-event-connector {\n flex-grow: 1;\n background: ").concat(dt("timeline.event.connector.color"), ";\n}\n\n.p-timeline-horizontal {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n height: ").concat(dt("timeline.event.connector.size"), ";\n}\n\n.p-timeline-horizontal .p-timeline-event-opposite,\n.p-timeline-horizontal .p-timeline-event-content {\n padding: ").concat(dt("timeline.horizontal.event.content.padding"), ";\n}\n\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n"); +}, "theme"); +var classes$2 = { + root: /* @__PURE__ */ __name(function root31(_ref2) { + var props = _ref2.props; + return ["p-timeline p-component", "p-timeline-" + props.align, "p-timeline-" + props.layout]; + }, "root"), + event: "p-timeline-event", + eventOpposite: "p-timeline-event-opposite", + eventSeparator: "p-timeline-event-separator", + eventMarker: "p-timeline-event-marker", + eventConnector: "p-timeline-event-connector", + eventContent: "p-timeline-event-content" +}; +var TimelineStyle = BaseStyle.extend({ + name: "timeline", + theme: theme$2, + classes: classes$2 +}); +var script$1$2 = { + name: "BaseTimeline", + "extends": script$1d, + props: { + value: null, + align: { + mode: String, + "default": "left" + }, + layout: { + mode: String, + "default": "vertical" + }, + dataKey: null + }, + style: TimelineStyle, + provide: /* @__PURE__ */ __name(function provide49() { + return { + $pcTimeline: this, + $parentInstance: this + }; + }, "provide") +}; +var script$7 = { + name: "Timeline", + "extends": script$1$2, + inheritAttrs: false, + methods: { + getKey: /* @__PURE__ */ __name(function getKey3(item8, index) { + return this.dataKey ? resolveFieldData(item8, this.dataKey) : index; + }, "getKey"), + getPTOptions: /* @__PURE__ */ __name(function getPTOptions13(key, index) { + return this.ptm(key, { + context: { + index, + count: this.value.length + } + }); + }, "getPTOptions") + } +}; +function render$6(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.value, function(item8, index) { + return openBlock(), createElementBlock("div", mergeProps({ + key: $options.getKey(item8, index), + "class": _ctx.cx("event"), + ref_for: true + }, $options.getPTOptions("event", index)), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("eventOpposite", { + index + }), + ref_for: true + }, $options.getPTOptions("eventOpposite", index)), [renderSlot(_ctx.$slots, "opposite", { + item: item8, + index + })], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("eventSeparator"), + ref_for: true + }, $options.getPTOptions("eventSeparator", index)), [renderSlot(_ctx.$slots, "marker", { + item: item8, + index + }, function() { + return [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("eventMarker"), + ref_for: true + }, $options.getPTOptions("eventMarker", index)), null, 16)]; + }), index !== _ctx.value.length - 1 ? renderSlot(_ctx.$slots, "connector", { + key: 0, + item: item8, + index + }, function() { + return [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("eventConnector"), + ref_for: true + }, $options.getPTOptions("eventConnector", index)), null, 16)]; + }) : createCommentVNode("", true)], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("eventContent"), + ref_for: true + }, $options.getPTOptions("eventContent", index)), [renderSlot(_ctx.$slots, "content", { + item: item8, + index + })], 16)], 16); + }), 128))], 16); +} +__name(render$6, "render$6"); +script$7.render = render$6; +var theme$1 = /* @__PURE__ */ __name(function theme39(_ref) { + var dt = _ref.dt; + return "\n.p-treeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n background: ".concat(dt("treeselect.background"), ";\n border: 1px solid ").concat(dt("treeselect.border.color"), ";\n transition: background ").concat(dt("treeselect.transition.duration"), ", color ").concat(dt("treeselect.transition.duration"), ", border-color ").concat(dt("treeselect.transition.duration"), ", outline-color ").concat(dt("treeselect.transition.duration"), ", box-shadow ").concat(dt("treeselect.transition.duration"), ";\n border-radius: ").concat(dt("treeselect.border.radius"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("treeselect.shadow"), ";\n}\n\n.p-treeselect:not(.p-disabled):hover {\n border-color: ").concat(dt("treeselect.hover.border.color"), ";\n}\n\n.p-treeselect:not(.p-disabled).p-focus {\n border-color: ").concat(dt("treeselect.focus.border.color"), ";\n box-shadow: ").concat(dt("treeselect.focus.ring.shadow"), ";\n outline: ").concat(dt("treeselect.focus.ring.width"), " ").concat(dt("treeselect.focus.ring.style"), " ").concat(dt("treeselect.focus.ring.color"), ";\n outline-offset: ").concat(dt("treeselect.focus.ring.offset"), ";\n}\n\n.p-treeselect.p-variant-filled {\n background: ").concat(dt("treeselect.filled.background"), ";\n}\n\n.p-treeselect.p-variant-filled:not(.p-disabled):hover {\n background: ").concat(dt("treeselect.filled.hover.background"), ";\n}\n\n.p-treeselect.p-variant-filled.p-focus {\n background: ").concat(dt("treeselect.filled.focus.background"), ";\n}\n\n.p-treeselect.p-invalid {\n border-color: ").concat(dt("treeselect.invalid.border.color"), ";\n}\n\n.p-treeselect.p-disabled {\n opacity: 1;\n background: ").concat(dt("treeselect.disabled.background"), ";\n}\n\n.p-treeselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n color: ").concat(dt("treeselect.clear.icon.color"), ";\n inset-inline-end: ").concat(dt("treeselect.dropdown.width"), ";\n}\n\n.p-treeselect-dropdown {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n color: ").concat(dt("treeselect.dropdown.color"), ";\n width: ").concat(dt("treeselect.dropdown.width"), ";\n border-start-end-radius: ").concat(dt("border.radius.md"), ";\n border-end-end-radius: ").concat(dt("border.radius.md"), ";\n}\n\n.p-treeselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n}\n\n.p-treeselect-label {\n display: flex;\n align-items: center;\n gap: calc(").concat(dt("treeselect.padding.y"), " / 2);\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: ").concat(dt("treeselect.padding.y"), " ").concat(dt("treeselect.padding.x"), ";\n color: ").concat(dt("treeselect.color"), ";\n}\n\n.p-treeselect-label.p-placeholder {\n color: ").concat(dt("treeselect.placeholder.color"), ";\n}\n\n.p-treeselect.p-invalid .p-treeselect-label.p-placeholder {\n color: ").concat(dt("treeselect.invalid.placeholder.color"), ";\n}\n\n.p-treeselect.p-disabled .p-treeselect-label {\n color: ").concat(dt("treeselect.disabled.color"), ";\n}\n\n.p-treeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n\n.p-treeselect .p-treeselect-overlay {\n min-width: 100%;\n}\n\n.p-treeselect-overlay {\n position: absolute;\n top: 0;\n left: 0;\n background: ").concat(dt("treeselect.overlay.background"), ";\n color: ").concat(dt("treeselect.overlay.color"), ";\n border: 1px solid ").concat(dt("treeselect.overlay.border.color"), ";\n border-radius: ").concat(dt("treeselect.overlay.border.radius"), ";\n box-shadow: ").concat(dt("treeselect.overlay.shadow"), ";\n overflow: hidden;\n}\n\n.p-treeselect-tree-container {\n overflow: auto;\n}\n\n.p-treeselect-empty-message {\n padding: ").concat(dt("treeselect.empty.message.padding"), ";\n background: transparent;\n}\n\n.p-treeselect-fluid {\n display: flex;\n}\n\n.p-treeselect-overlay .p-tree {\n padding: ").concat(dt("treeselect.tree.padding"), ";\n}\n\n.p-treeselect-overlay .p-tree-loading {\n min-height: 3rem;\n}\n\n.p-treeselect-label .p-chip {\n padding-block-start: calc(").concat(dt("treeselect.padding.y"), " / 2);\n padding-block-end: calc(").concat(dt("treeselect.padding.y"), " / 2);\n border-radius: ").concat(dt("treeselect.chip.border.radius"), ";\n}\n\n.p-treeselect-label:has(.p-chip) {\n padding: calc(").concat(dt("treeselect.padding.y"), " / 2) calc(").concat(dt("treeselect.padding.x"), " / 2);\n}\n\n.p-treeselect-sm .p-treeselect-label {\n font-size: ").concat(dt("treeselect.sm.font.size"), ";\n padding-block: ").concat(dt("treeselect.sm.padding.y"), ";\n padding-inline: ").concat(dt("treeselect.sm.padding.x"), ";\n}\n\n.p-treeselect-sm .p-treeselect-dropdown .p-icon {\n font-size: ").concat(dt("treeselect.sm.font.size"), ";\n width: ").concat(dt("treeselect.sm.font.size"), ";\n height: ").concat(dt("treeselect.sm.font.size"), ";\n}\n\n.p-treeselect-lg .p-treeselect-label {\n font-size: ").concat(dt("treeselect.lg.font.size"), ";\n padding-block: ").concat(dt("treeselect.lg.padding.y"), ";\n padding-inline: ").concat(dt("treeselect.lg.padding.x"), ";\n}\n\n.p-treeselect-lg .p-treeselect-dropdown .p-icon {\n font-size: ").concat(dt("treeselect.lg.font.size"), ";\n width: ").concat(dt("treeselect.lg.font.size"), ";\n height: ").concat(dt("treeselect.lg.font.size"), ";\n}\n"); +}, "theme"); +var inlineStyles$1 = { + root: /* @__PURE__ */ __name(function root32(_ref2) { + var props = _ref2.props; + return { + position: props.appendTo === "self" ? "relative" : void 0 + }; + }, "root") +}; +var classes$1 = { + root: /* @__PURE__ */ __name(function root33(_ref3) { + var instance = _ref3.instance, props = _ref3.props; + return ["p-treeselect p-component p-inputwrapper", { + "p-treeselect-display-chip": props.display === "chip", + "p-disabled": props.disabled, + "p-invalid": instance.$invalid, + "p-focus": instance.focused, + "p-variant-filled": instance.$variant === "filled", + "p-inputwrapper-filled": instance.$filled, + "p-inputwrapper-focus": instance.focused || instance.overlayVisible, + "p-treeselect-open": instance.overlayVisible, + "p-treeselect-fluid": instance.$fluid, + "p-treeselect-sm p-inputfield-sm": props.size === "small", + "p-treeselect-lg p-inputfield-lg": props.size === "large" + }]; + }, "root"), + labelContainer: "p-treeselect-label-container", + label: /* @__PURE__ */ __name(function label10(_ref4) { + var instance = _ref4.instance, props = _ref4.props; + return ["p-treeselect-label", { + "p-placeholder": instance.label === props.placeholder, + "p-treeselect-label-empty": !props.placeholder && instance.emptyValue + }]; + }, "label"), + clearIcon: "p-treeselect-clear-icon", + chip: "p-treeselect-chip-item", + pcChip: "p-treeselect-chip", + dropdown: "p-treeselect-dropdown", + dropdownIcon: "p-treeselect-dropdown-icon", + panel: "p-treeselect-overlay p-component", + treeContainer: "p-treeselect-tree-container", + emptyMessage: "p-treeselect-empty-message" +}; +var TreeSelectStyle = BaseStyle.extend({ + name: "treeselect", + theme: theme$1, + classes: classes$1, + inlineStyles: inlineStyles$1 +}); +var script$1$1 = { + name: "BaseTreeSelect", + "extends": script$1n, + props: { + options: Array, + scrollHeight: { + type: String, + "default": "20rem" + }, + placeholder: { + type: String, + "default": null + }, + tabindex: { + type: Number, + "default": null + }, + selectionMode: { + type: String, + "default": "single" + }, + selectedItemsLabel: { + type: String, + "default": null + }, + maxSelectedLabels: { + type: Number, + "default": null + }, + appendTo: { + type: [String, Object], + "default": "body" + }, + emptyMessage: { + type: String, + "default": null + }, + display: { + type: String, + "default": "comma" + }, + metaKeySelection: { + type: Boolean, + "default": false + }, + loading: { + type: Boolean, + "default": false + }, + loadingIcon: { + type: String, + "default": void 0 + }, + loadingMode: { + type: String, + "default": "mask" + }, + showClear: { + type: Boolean, + "default": false + }, + clearIcon: { + type: String, + "default": void 0 + }, + filter: { + type: Boolean, + "default": false + }, + filterBy: { + type: [String, Function], + "default": "label" + }, + filterMode: { + type: String, + "default": "lenient" + }, + filterPlaceholder: { + type: String, + "default": null + }, + filterLocale: { + type: String, + "default": void 0 + }, + inputId: { + type: String, + "default": null + }, + inputClass: { + type: [String, Object], + "default": null + }, + inputStyle: { + type: Object, + "default": null + }, + inputProps: { + type: null, + "default": null + }, + panelClass: { + type: [String, Object], + "default": null + }, + panelProps: { + type: null, + "default": null + }, + ariaLabelledby: { + type: String, + "default": null + }, + ariaLabel: { + type: String, + "default": null + }, + expandedKeys: { + type: null, + "default": null + } + }, + style: TreeSelectStyle, + provide: /* @__PURE__ */ __name(function provide50() { + return { + $pcTreeSelect: this, + $parentInstance: this + }; + }, "provide") +}; +function _typeof$1$1(o) { + "@babel/helpers - typeof"; + return _typeof$1$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$1$1(o); +} +__name(_typeof$1$1, "_typeof$1$1"); +function ownKeys$1$1(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$1$1, "ownKeys$1$1"); +function _objectSpread$1$1(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$1$1(Object(t2), true).forEach(function(r2) { + _defineProperty$1$1(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$1$1(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$1$1, "_objectSpread$1$1"); +function _defineProperty$1$1(e, r, t2) { + return (r = _toPropertyKey$1$1(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$1$1, "_defineProperty$1$1"); +function _toPropertyKey$1$1(t2) { + var i = _toPrimitive$1$1(t2, "string"); + return "symbol" == _typeof$1$1(i) ? i : i + ""; +} +__name(_toPropertyKey$1$1, "_toPropertyKey$1$1"); +function _toPrimitive$1$1(t2, r) { + if ("object" != _typeof$1$1(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$1$1(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$1$1, "_toPrimitive$1$1"); +function _createForOfIteratorHelper$2(r, e) { + var t2 = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t2) { + if (Array.isArray(r) || (t2 = _unsupportedIterableToArray$2(r)) || e) { + t2 && (r = t2); + var _n = 0, F = /* @__PURE__ */ __name(function F2() { + }, "F"); + return { s: F, n: /* @__PURE__ */ __name(function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + throw r2; + }, "e"), f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: /* @__PURE__ */ __name(function s() { + t2 = t2.call(r); + }, "s"), n: /* @__PURE__ */ __name(function n() { + var r2 = t2.next(); + return a = r2.done, r2; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + u = true, o = r2; + }, "e"), f: /* @__PURE__ */ __name(function f() { + try { + a || null == t2["return"] || t2["return"](); + } finally { + if (u) throw o; + } + }, "f") }; +} +__name(_createForOfIteratorHelper$2, "_createForOfIteratorHelper$2"); +function _toConsumableArray$2(r) { + return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$2(); +} +__name(_toConsumableArray$2, "_toConsumableArray$2"); +function _nonIterableSpread$2() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$2, "_nonIterableSpread$2"); +function _unsupportedIterableToArray$2(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$2(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$2(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$2, "_unsupportedIterableToArray$2"); +function _iterableToArray$2(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$2, "_iterableToArray$2"); +function _arrayWithoutHoles$2(r) { + if (Array.isArray(r)) return _arrayLikeToArray$2(r); +} +__name(_arrayWithoutHoles$2, "_arrayWithoutHoles$2"); +function _arrayLikeToArray$2(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$2, "_arrayLikeToArray$2"); +var script$6 = { + name: "TreeSelect", + "extends": script$1$1, + inheritAttrs: false, + emits: ["before-show", "before-hide", "change", "show", "hide", "node-select", "node-unselect", "node-expand", "node-collapse", "focus", "blur", "update:expandedKeys"], + inject: { + $pcFluid: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data36() { + return { + id: this.$attrs.id, + focused: false, + overlayVisible: false, + d_expandedKeys: this.expandedKeys || {} + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId13(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + modelValue: { + handler: /* @__PURE__ */ __name(function handler4() { + if (!this.selfChange) { + this.updateTreeState(); + } + this.selfChange = false; + }, "handler"), + immediate: true + }, + options: /* @__PURE__ */ __name(function options3() { + this.updateTreeState(); + }, "options"), + expandedKeys: /* @__PURE__ */ __name(function expandedKeys2(value2) { + this.d_expandedKeys = value2; + }, "expandedKeys") + }, + outsideClickListener: null, + resizeListener: null, + scrollHandler: null, + overlay: null, + selfChange: false, + selfClick: false, + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount17() { + this.unbindOutsideClickListener(); + this.unbindResizeListener(); + if (this.scrollHandler) { + this.scrollHandler.destroy(); + this.scrollHandler = null; + } + if (this.overlay) { + ZIndex.clear(this.overlay); + this.overlay = null; + } + }, "beforeUnmount"), + mounted: /* @__PURE__ */ __name(function mounted40() { + this.id = this.id || UniqueComponentId(); + this.updateTreeState(); + }, "mounted"), + methods: { + show: /* @__PURE__ */ __name(function show6() { + this.$emit("before-show"); + this.overlayVisible = true; + }, "show"), + hide: /* @__PURE__ */ __name(function hide7() { + this.$emit("before-hide"); + this.overlayVisible = false; + this.$refs.focusInput.focus(); + }, "hide"), + onFocus: /* @__PURE__ */ __name(function onFocus14(event2) { + this.focused = true; + this.$emit("focus", event2); + }, "onFocus"), + onBlur: /* @__PURE__ */ __name(function onBlur14(event2) { + var _this$formField$onBlu, _this$formField; + this.focused = false; + this.$emit("blur", event2); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField); + }, "onBlur"), + onClick: /* @__PURE__ */ __name(function onClick8(event2) { + if (this.disabled) { + return; + } + if (event2.target.tagName === "INPUT" || event2.target.getAttribute("data-pc-section") === "clearicon" || event2.target.closest('[data-pc-section="clearicon"]')) { + return; + } else if (!this.overlay || !this.overlay.contains(event2.target)) { + if (this.overlayVisible) this.hide(); + else this.show(); + focus(this.$refs.focusInput); + } + }, "onClick"), + onClearClick: /* @__PURE__ */ __name(function onClearClick3() { + this.onSelectionChange(null); + }, "onClearClick"), + onSelectionChange: /* @__PURE__ */ __name(function onSelectionChange(keys) { + this.selfChange = true; + this.writeValue(keys); + this.$emit("change", keys); + }, "onSelectionChange"), + onNodeSelect: /* @__PURE__ */ __name(function onNodeSelect(node2) { + this.$emit("node-select", node2); + if (this.selectionMode === "single") { + this.hide(); + } + }, "onNodeSelect"), + onNodeUnselect: /* @__PURE__ */ __name(function onNodeUnselect(node2) { + this.$emit("node-unselect", node2); + }, "onNodeUnselect"), + onNodeToggle: /* @__PURE__ */ __name(function onNodeToggle2(keys) { + this.d_expandedKeys = keys; + this.$emit("update:expandedKeys", this.d_expandedKeys); + }, "onNodeToggle"), + getSelectedItemsLabel: /* @__PURE__ */ __name(function getSelectedItemsLabel2() { + var pattern = /{(.*?)}/; + var selectedItemsLabel = this.selectedItemsLabel || this.$primevue.config.locale.selectionMessage; + if (pattern.test(selectedItemsLabel)) { + return selectedItemsLabel.replace(selectedItemsLabel.match(pattern)[0], Object.keys(this.d_value).length + ""); + } + return selectedItemsLabel; + }, "getSelectedItemsLabel"), + onFirstHiddenFocus: /* @__PURE__ */ __name(function onFirstHiddenFocus2(event2) { + var focusableEl = event2.relatedTarget === this.$refs.focusInput ? getFirstFocusableElement(this.overlay, ':not([data-p-hidden-focusable="true"])') : this.$refs.focusInput; + focus(focusableEl); + }, "onFirstHiddenFocus"), + onLastHiddenFocus: /* @__PURE__ */ __name(function onLastHiddenFocus2(event2) { + var focusableEl = event2.relatedTarget === this.$refs.focusInput ? getLastFocusableElement(this.overlay, ':not([data-p-hidden-focusable="true"])') : this.$refs.focusInput; + focus(focusableEl); + }, "onLastHiddenFocus"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown12(event2) { + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "Space": + case "Enter": + case "NumpadEnter": + this.onEnterKey(event2); + break; + case "Escape": + this.onEscapeKey(event2); + break; + case "Tab": + this.onTabKey(event2); + break; + } + }, "onKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey8(event2) { + var _this = this; + if (this.overlayVisible) return; + this.show(); + this.$nextTick(function() { + var treeNodeEl = find(_this.$refs.tree.$el, '[data-pc-section="treeitem"]'); + var focusedElement = _toConsumableArray$2(treeNodeEl).find(function(item8) { + return item8.getAttribute("tabindex") === "0"; + }); + focus(focusedElement); + }); + event2.preventDefault(); + }, "onArrowDownKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey8(event2) { + if (this.overlayVisible) { + this.hide(); + } else { + this.onArrowDownKey(event2); + } + event2.preventDefault(); + }, "onEnterKey"), + onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey5(event2) { + if (this.overlayVisible) { + this.hide(); + event2.preventDefault(); + } + }, "onEscapeKey"), + onTabKey: /* @__PURE__ */ __name(function onTabKey5(event2) { + var pressedInInputText = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + if (!pressedInInputText) { + if (this.overlayVisible && this.hasFocusableElements()) { + focus(this.$refs.firstHiddenFocusableElementOnOverlay); + event2.preventDefault(); + } + } + }, "onTabKey"), + hasFocusableElements: /* @__PURE__ */ __name(function hasFocusableElements2() { + return getFocusableElements(this.overlay, ':not([data-p-hidden-focusable="true"])').length > 0; + }, "hasFocusableElements"), + onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter5(el) { + ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); + addStyle(el, { + position: "absolute", + top: "0", + left: "0" + }); + this.alignOverlay(); + this.focus(); + }, "onOverlayEnter"), + onOverlayAfterEnter: /* @__PURE__ */ __name(function onOverlayAfterEnter3() { + this.bindOutsideClickListener(); + this.bindScrollListener(); + this.bindResizeListener(); + this.scrollValueInView(); + this.$emit("show"); + }, "onOverlayAfterEnter"), + onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave5() { + this.unbindOutsideClickListener(); + this.unbindScrollListener(); + this.unbindResizeListener(); + this.$emit("hide"); + this.overlay = null; + }, "onOverlayLeave"), + onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave5(el) { + ZIndex.clear(el); + }, "onOverlayAfterLeave"), + focus: /* @__PURE__ */ __name(function focus3() { + var focusableElements = getFocusableElements(this.overlay); + if (focusableElements && focusableElements.length > 0) { + focusableElements[0].focus(); + } + }, "focus"), + alignOverlay: /* @__PURE__ */ __name(function alignOverlay6() { + if (this.appendTo === "self") { + relativePosition(this.overlay, this.$el); + } else { + this.overlay.style.minWidth = getOuterWidth(this.$el) + "px"; + absolutePosition(this.overlay, this.$el); + } + }, "alignOverlay"), + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener7() { + var _this2 = this; + if (!this.outsideClickListener) { + this.outsideClickListener = function(event2) { + if (_this2.overlayVisible && !_this2.selfClick && _this2.isOutsideClicked(event2)) { + _this2.hide(); + } + _this2.selfClick = false; + }; + document.addEventListener("click", this.outsideClickListener); + } + }, "bindOutsideClickListener"), + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener7() { + if (this.outsideClickListener) { + document.removeEventListener("click", this.outsideClickListener); + this.outsideClickListener = null; + } + }, "unbindOutsideClickListener"), + bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener7() { + var _this3 = this; + if (!this.scrollHandler) { + this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function() { + if (_this3.overlayVisible) { + _this3.hide(); + } + }); + } + this.scrollHandler.bindScrollListener(); + }, "bindScrollListener"), + unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener7() { + if (this.scrollHandler) { + this.scrollHandler.unbindScrollListener(); + } + }, "unbindScrollListener"), + bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener7() { + var _this4 = this; + if (!this.resizeListener) { + this.resizeListener = function() { + if (_this4.overlayVisible && !isTouchDevice()) { + _this4.hide(); + } + }; + window.addEventListener("resize", this.resizeListener); + } + }, "bindResizeListener"), + unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener7() { + if (this.resizeListener) { + window.removeEventListener("resize", this.resizeListener); + this.resizeListener = null; + } + }, "unbindResizeListener"), + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked5(event2) { + return !(this.$el.isSameNode(event2.target) || this.$el.contains(event2.target) || this.overlay && this.overlay.contains(event2.target)); + }, "isOutsideClicked"), + overlayRef: /* @__PURE__ */ __name(function overlayRef5(el) { + this.overlay = el; + }, "overlayRef"), + onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick6(event2) { + OverlayEventBus.emit("overlay-click", { + originalEvent: event2, + target: this.$el + }); + this.selfClick = true; + }, "onOverlayClick"), + onOverlayKeydown: /* @__PURE__ */ __name(function onOverlayKeydown(event2) { + if (event2.code === "Escape") this.hide(); + }, "onOverlayKeydown"), + findSelectedNodes: /* @__PURE__ */ __name(function findSelectedNodes(node2, keys, selectedNodes2) { + if (node2) { + if (this.isSelected(node2, keys)) { + selectedNodes2.push(node2); + delete keys[node2.key]; + } + if (Object.keys(keys).length && node2.children) { + var _iterator = _createForOfIteratorHelper$2(node2.children), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var childNode = _step.value; + this.findSelectedNodes(childNode, keys, selectedNodes2); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + } else { + var _iterator2 = _createForOfIteratorHelper$2(this.options), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + var _childNode = _step2.value; + this.findSelectedNodes(_childNode, keys, selectedNodes2); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + }, "findSelectedNodes"), + isSelected: /* @__PURE__ */ __name(function isSelected5(node2, keys) { + return this.selectionMode === "checkbox" ? keys[node2.key] && keys[node2.key].checked : keys[node2.key]; + }, "isSelected"), + updateTreeState: /* @__PURE__ */ __name(function updateTreeState() { + var keys = _objectSpread$1$1({}, this.d_value); + if (keys && this.options) { + this.updateTreeBranchState(null, null, keys); + } + }, "updateTreeState"), + updateTreeBranchState: /* @__PURE__ */ __name(function updateTreeBranchState(node2, path, keys) { + if (node2) { + if (this.isSelected(node2, keys)) { + this.expandPath(path); + delete keys[node2.key]; + } + if (Object.keys(keys).length && node2.children) { + var _iterator3 = _createForOfIteratorHelper$2(node2.children), _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { + var childNode = _step3.value; + path.push(node2.key); + this.updateTreeBranchState(childNode, path, keys); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + } else { + var _iterator4 = _createForOfIteratorHelper$2(this.options), _step4; + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) { + var _childNode2 = _step4.value; + this.updateTreeBranchState(_childNode2, [], keys); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + } + }, "updateTreeBranchState"), + expandPath: /* @__PURE__ */ __name(function expandPath(path) { + if (path.length > 0) { + var _iterator5 = _createForOfIteratorHelper$2(path), _step5; + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done; ) { + var key = _step5.value; + this.d_expandedKeys[key] = true; + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + this.d_expandedKeys = _objectSpread$1$1({}, this.d_expandedKeys); + this.$emit("update:expandedKeys", this.d_expandedKeys); + } + }, "expandPath"), + scrollValueInView: /* @__PURE__ */ __name(function scrollValueInView() { + if (this.overlay) { + var selectedItem = findSingle(this.overlay, '[data-p-selected="true"]'); + if (selectedItem) { + selectedItem.scrollIntoView({ + block: "nearest", + inline: "start" + }); + } + } + }, "scrollValueInView") + }, + computed: { + selectedNodes: /* @__PURE__ */ __name(function selectedNodes() { + var selectedNodes2 = []; + if (this.d_value && this.options) { + var keys = _objectSpread$1$1({}, this.d_value); + this.findSelectedNodes(null, keys, selectedNodes2); + } + return selectedNodes2; + }, "selectedNodes"), + label: /* @__PURE__ */ __name(function label11() { + var value2 = this.selectedNodes; + var label12; + if (value2.length) { + if (isNotEmpty(this.maxSelectedLabels) && value2.length > this.maxSelectedLabels) { + label12 = this.getSelectedItemsLabel(); + } else { + label12 = value2.map(function(node2) { + return node2.label; + }).join(", "); + } + } else { + label12 = this.placeholder; + } + return label12; + }, "label"), + chipSelectedItems: /* @__PURE__ */ __name(function chipSelectedItems2() { + return isNotEmpty(this.maxSelectedLabels) && this.d_value && Object.keys(this.d_value).length > this.maxSelectedLabels; + }, "chipSelectedItems"), + emptyMessageText: /* @__PURE__ */ __name(function emptyMessageText4() { + return this.emptyMessage || this.$primevue.config.locale.emptyMessage; + }, "emptyMessageText"), + emptyValue: /* @__PURE__ */ __name(function emptyValue() { + return !this.$filled; + }, "emptyValue"), + emptyOptions: /* @__PURE__ */ __name(function emptyOptions() { + return !this.options || this.options.length === 0; + }, "emptyOptions"), + listId: /* @__PURE__ */ __name(function listId() { + return this.id + "_list"; + }, "listId"), + hasFluid: /* @__PURE__ */ __name(function hasFluid2() { + return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid; + }, "hasFluid"), + isClearIconVisible: /* @__PURE__ */ __name(function isClearIconVisible3() { + return this.showClear && this.d_value != null && isNotEmpty(this.options); + }, "isClearIconVisible") + }, + components: { + TSTree: script$1U, + Chip: script$1t, + Portal: script$1f, + ChevronDownIcon: script$1k, + TimesIcon: script$1g + }, + directives: { + ripple: Ripple + } +}; +function _typeof$6(o) { + "@babel/helpers - typeof"; + return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$6(o); +} +__name(_typeof$6, "_typeof$6"); +function ownKeys$6(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$6, "ownKeys$6"); +function _objectSpread$6(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$6(Object(t2), true).forEach(function(r2) { + _defineProperty$6(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$6(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$6, "_objectSpread$6"); +function _defineProperty$6(e, r, t2) { + return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$6, "_defineProperty$6"); +function _toPropertyKey$6(t2) { + var i = _toPrimitive$6(t2, "string"); + return "symbol" == _typeof$6(i) ? i : i + ""; +} +__name(_toPropertyKey$6, "_toPropertyKey$6"); +function _toPrimitive$6(t2, r) { + if ("object" != _typeof$6(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$6(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$6, "_toPrimitive$6"); +var _hoisted_1$6 = ["id", "disabled", "tabindex", "aria-labelledby", "aria-label", "aria-expanded", "aria-controls"]; +var _hoisted_2$4 = { + key: 0 +}; +var _hoisted_3$4 = ["aria-expanded"]; +function render$5(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Chip = resolveComponent("Chip"); + var _component_TSTree = resolveComponent("TSTree"); + var _component_Portal = resolveComponent("Portal"); + return openBlock(), createElementBlock("div", mergeProps({ + ref: "container", + "class": _ctx.cx("root"), + style: _ctx.sx("root"), + onClick: _cache[10] || (_cache[10] = function() { + return $options.onClick && $options.onClick.apply($options, arguments); + }) + }, _ctx.ptmi("root")), [createBaseVNode("div", mergeProps({ + "class": "p-hidden-accessible" + }, _ctx.ptm("hiddenInputContainer"), { + "data-p-hidden-accessible": true + }), [createBaseVNode("input", mergeProps({ + ref: "focusInput", + id: _ctx.inputId, + type: "text", + role: "combobox", + "class": _ctx.inputClass, + style: _ctx.inputStyle, + readonly: "", + disabled: _ctx.disabled, + tabindex: !_ctx.disabled ? _ctx.tabindex : -1, + "aria-labelledby": _ctx.ariaLabelledby, + "aria-label": _ctx.ariaLabel, + "aria-haspopup": "tree", + "aria-expanded": $data.overlayVisible, + "aria-controls": $options.listId, + onFocus: _cache[0] || (_cache[0] = function($event) { + return $options.onFocus($event); + }), + onBlur: _cache[1] || (_cache[1] = function($event) { + return $options.onBlur($event); + }), + onKeydown: _cache[2] || (_cache[2] = function($event) { + return $options.onKeyDown($event); + }) + }, _objectSpread$6(_objectSpread$6({}, _ctx.inputProps), _ctx.ptm("hiddenInput"))), null, 16, _hoisted_1$6)], 16), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("labelContainer") + }, _ctx.ptm("labelContainer")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("label") + }, _ctx.ptm("label")), [renderSlot(_ctx.$slots, "value", { + value: $options.selectedNodes, + placeholder: _ctx.placeholder + }, function() { + return [_ctx.display === "comma" ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [createTextVNode(toDisplayString($options.label || "empty"), 1)], 64)) : _ctx.display === "chip" ? (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [$options.chipSelectedItems ? (openBlock(), createElementBlock("span", _hoisted_2$4, toDisplayString($options.label), 1)) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [(openBlock(true), createElementBlock(Fragment, null, renderList($options.selectedNodes, function(node2) { + return openBlock(), createElementBlock("div", mergeProps({ + key: node2.key, + "class": _ctx.cx("chipItem"), + ref_for: true + }, _ctx.ptm("chipItem")), [createVNode(_component_Chip, { + "class": normalizeClass(_ctx.cx("pcChip")), + label: node2.label, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcChip") + }, null, 8, ["class", "label", "unstyled", "pt"])], 16); + }), 128)), $options.emptyValue ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [createTextVNode(toDisplayString(_ctx.placeholder || "empty"), 1)], 64)) : createCommentVNode("", true)], 64))], 64)) : createCommentVNode("", true)]; + })], 16)], 16), $options.isClearIconVisible ? renderSlot(_ctx.$slots, "clearicon", { + key: 0, + "class": normalizeClass(_ctx.cx("clearIcon")), + clearCallback: $options.onClearClick + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon ? "i" : "TimesIcon"), mergeProps({ + ref: "clearIcon", + "class": [_ctx.cx("clearIcon"), _ctx.clearIcon], + onClick: $options.onClearClick + }, _ctx.ptm("clearIcon"), { + "data-pc-section": "clearicon" + }), null, 16, ["class", "onClick"]))]; + }) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("dropdown"), + role: "button", + "aria-haspopup": "tree", + "aria-expanded": $data.overlayVisible + }, _ctx.ptm("dropdown")), [renderSlot(_ctx.$slots, _ctx.$slots.dropdownicon ? "dropdownicon" : "triggericon", { + "class": normalizeClass(_ctx.cx("dropdownIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent("ChevronDownIcon"), mergeProps({ + "class": _ctx.cx("dropdownIcon") + }, _ctx.ptm("dropdownIcon")), null, 16, ["class"]))]; + })], 16, _hoisted_3$4), createVNode(_component_Portal, { + appendTo: _ctx.appendTo + }, { + "default": withCtx(function() { + return [createVNode(Transition, mergeProps({ + name: "p-connected-overlay", + onEnter: $options.onOverlayEnter, + onAfterEnter: $options.onOverlayAfterEnter, + onLeave: $options.onOverlayLeave, + onAfterLeave: $options.onOverlayAfterLeave + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [$data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + ref: $options.overlayRef, + onClick: _cache[8] || (_cache[8] = function() { + return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); + }), + "class": [_ctx.cx("panel"), _ctx.panelClass], + onKeydown: _cache[9] || (_cache[9] = function() { + return $options.onOverlayKeydown && $options.onOverlayKeydown.apply($options, arguments); + }) + }, _objectSpread$6(_objectSpread$6({}, _ctx.panelProps), _ctx.ptm("panel"))), [createBaseVNode("span", mergeProps({ + ref: "firstHiddenFocusableElementOnOverlay", + role: "presentation", + "class": "p-hidden-accessible p-hidden-focusable", + tabindex: 0, + onFocus: _cache[3] || (_cache[3] = function() { + return $options.onFirstHiddenFocus && $options.onFirstHiddenFocus.apply($options, arguments); + }) + }, _ctx.ptm("hiddenFirstFocusableEl"), { + "data-p-hidden-accessible": true, + "data-p-hidden-focusable": true + }), null, 16), renderSlot(_ctx.$slots, "header", { + value: _ctx.d_value, + options: _ctx.options + }), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("treeContainer"), + style: { + "max-height": _ctx.scrollHeight + } + }, _ctx.ptm("treeContainer")), [createVNode(_component_TSTree, { + ref: "tree", + id: $options.listId, + value: _ctx.options, + selectionMode: _ctx.selectionMode, + loading: _ctx.loading, + loadingIcon: _ctx.loadingIcon, + loadingMode: _ctx.loadingMode, + filter: _ctx.filter, + filterBy: _ctx.filterBy, + filterMode: _ctx.filterMode, + filterPlaceholder: _ctx.filterPlaceholder, + filterLocale: _ctx.filterLocale, + "onUpdate:selectionKeys": $options.onSelectionChange, + selectionKeys: _ctx.d_value, + expandedKeys: $data.d_expandedKeys, + "onUpdate:expandedKeys": $options.onNodeToggle, + metaKeySelection: _ctx.metaKeySelection, + onNodeExpand: _cache[4] || (_cache[4] = function($event) { + return _ctx.$emit("node-expand", $event); + }), + onNodeCollapse: _cache[5] || (_cache[5] = function($event) { + return _ctx.$emit("node-collapse", $event); + }), + onNodeSelect: $options.onNodeSelect, + onNodeUnselect: $options.onNodeUnselect, + onClick: _cache[6] || (_cache[6] = withModifiers(function() { + }, ["stop"])), + level: 0, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcTree") + }, createSlots({ + _: 2 + }, [_ctx.$slots.option ? { + name: "default", + fn: withCtx(function(optionSlotProps) { + return [renderSlot(_ctx.$slots, "option", { + node: optionSlotProps.node, + expanded: optionSlotProps.expanded, + selected: optionSlotProps.selected + })]; + }), + key: "0" + } : void 0, _ctx.$slots.itemtoggleicon ? { + name: "toggleicon", + fn: withCtx(function(iconSlotProps) { + return [renderSlot(_ctx.$slots, "itemtoggleicon", { + node: iconSlotProps.node, + expanded: iconSlotProps.expanded, + "class": normalizeClass(iconSlotProps["class"]) + })]; + }), + key: "1" + } : _ctx.$slots.itemtogglericon ? { + name: "togglericon", + fn: withCtx(function(iconSlotProps) { + return [renderSlot(_ctx.$slots, "itemtogglericon", { + node: iconSlotProps.node, + expanded: iconSlotProps.expanded, + "class": normalizeClass(iconSlotProps["class"]) + })]; + }), + key: "2" + } : void 0, _ctx.$slots.itemcheckboxicon ? { + name: "checkboxicon", + fn: withCtx(function(iconSlotProps) { + return [renderSlot(_ctx.$slots, "itemcheckboxicon", { + checked: iconSlotProps.checked, + partialChecked: iconSlotProps.partialChecked, + "class": normalizeClass(iconSlotProps["class"]) + })]; + }), + key: "3" + } : void 0]), 1032, ["id", "value", "selectionMode", "loading", "loadingIcon", "loadingMode", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "onUpdate:selectionKeys", "selectionKeys", "expandedKeys", "onUpdate:expandedKeys", "metaKeySelection", "onNodeSelect", "onNodeUnselect", "unstyled", "pt"]), $options.emptyOptions && !_ctx.loading ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("emptyMessage") + }, _ctx.ptm("emptyMessage")), [renderSlot(_ctx.$slots, "empty", {}, function() { + return [createTextVNode(toDisplayString($options.emptyMessageText), 1)]; + })], 16)) : createCommentVNode("", true)], 16), renderSlot(_ctx.$slots, "footer", { + value: _ctx.d_value, + options: _ctx.options + }), createBaseVNode("span", mergeProps({ + ref: "lastHiddenFocusableElementOnOverlay", + role: "presentation", + "class": "p-hidden-accessible p-hidden-focusable", + tabindex: 0, + onFocus: _cache[7] || (_cache[7] = function() { + return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments); + }) + }, _ctx.ptm("hiddenLastFocusableEl"), { + "data-p-hidden-accessible": true, + "data-p-hidden-focusable": true + }), null, 16)], 16)) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; + }), + _: 3 + }, 8, ["appendTo"])], 16); +} +__name(render$5, "render$5"); +script$6.render = render$5; +var theme40 = /* @__PURE__ */ __name(function theme41(_ref) { + var dt = _ref.dt; + return "\n.p-treetable {\n position: relative;\n}\n\n.p-treetable-table {\n border-spacing: 0;\n border-collapse: separate;\n width: 100%;\n}\n\n.p-treetable-scrollable > .p-treetable-table-container {\n position: relative;\n}\n\n.p-treetable-scrollable-table > .p-treetable-thead {\n inset-block-start: 0;\n z-index: 1;\n}\n\n.p-treetable-scrollable-table > .p-treetable-frozen-tbody {\n position: sticky;\n z-index: 1;\n}\n\n.p-treetable-scrollable-table > .p-treetable-tfoot {\n inset-block-end: 0;\n z-index: 1;\n}\n\n.p-treetable-scrollable .p-treetable-frozen-column {\n position: sticky;\n background: ".concat(dt("treetable.header.cell.background"), ";\n}\n\n.p-treetable-scrollable th.p-treetable-frozen-column {\n z-index: 1;\n}\n\n.p-treetable-scrollable > .p-treetable-table-container > .p-treetable-table > .p-treetable-thead {\n background: ").concat(dt("treetable.header.cell.background"), ";\n}\n\n.p-treetable-scrollable > .p-treetable-table-container > .p-treetable-table > .p-treetable-tfoot {\n background: ").concat(dt("treetable.footer.cell.background"), ";\n}\n\n.p-treetable-flex-scrollable {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.p-treetable-flex-scrollable > .p-treetable-table-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n}\n\n.p-treetable-scrollable-table > .p-treetable-tbody > .p-treetable-row-group-header {\n position: sticky;\n z-index: 1;\n}\n\n.p-treetable-resizable-table > .p-treetable-thead > tr > th,\n.p-treetable-resizable-table > .p-treetable-tfoot > tr > td,\n.p-treetable-resizable-table > .p-treetable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.p-treetable-resizable-table > .p-treetable-thead > tr > th.p-treetable-resizable-column:not(.p-treetable-frozen-column) {\n background-clip: padding-box;\n position: relative;\n}\n\n.p-treetable-resizable-table-fit > .p-treetable-thead > tr > th.p-treetable-resizable-column:last-child .p-treetable-column-resizer {\n display: none;\n}\n\n.p-treetable-column-resizer {\n display: block;\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n margin: 0;\n width: ").concat(dt("treetable.column.resizer.width"), ";\n height: 100%;\n padding: 0;\n cursor: col-resize;\n border: 1px solid transparent;\n}\n\n.p-treetable-column-header-content {\n display: flex;\n align-items: center;\n gap: ").concat(dt("treetable.header.cell.gap"), ";\n}\n\n.p-treetable-column-resize-indicator {\n width: ").concat(dt("treetable.resize.indicator.width"), ";\n position: absolute;\n z-index: 10;\n display: none;\n background: ").concat(dt("treetable.resize.indicator.color"), ";\n}\n\n.p-treetable-mask {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n}\n\n.p-treetable-paginator-top {\n border-color: ").concat(dt("treetable.paginator.top.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("treetable.paginator.top.border.width"), ";\n}\n\n.p-treetable-paginator-bottom {\n border-color: ").concat(dt("treetable.paginator.bottom.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("treetable.paginator.bottom.border.width"), ";\n}\n\n.p-treetable-header {\n background: ").concat(dt("treetable.header.background"), ";\n color: ").concat(dt("treetable.header.color"), ";\n border-color: ").concat(dt("treetable.header.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("treetable.header.border.width"), ";\n padding: ").concat(dt("treetable.header.padding"), ";\n}\n\n.p-treetable-footer {\n background: ").concat(dt("treetable.footer.background"), ";\n color: ").concat(dt("treetable.footer.color"), ";\n border-color: ").concat(dt("treetable.footer.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("treetable.footer.border.width"), ";\n padding: ").concat(dt("treetable.footer.padding"), ";\n}\n\n.p-treetable-header-cell {\n padding: ").concat(dt("treetable.header.cell.padding"), ";\n background: ").concat(dt("treetable.header.cell.background"), ";\n border-color: ").concat(dt("treetable.header.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("treetable.header.cell.color"), ";\n font-weight: normal;\n text-align: start;\n transition: background ").concat(dt("treetable.transition.duration"), ", color ").concat(dt("treetable.transition.duration"), ", border-color ").concat(dt("treetable.transition.duration"), ",\n outline-color ").concat(dt("treetable.transition.duration"), ", box-shadow ").concat(dt("treetable.transition.duration"), ";\n}\n\n.p-treetable-column-title {\n font-weight: ").concat(dt("treetable.column.title.font.weight"), ";\n}\n\n.p-treetable-tbody > tr {\n outline-color: transparent;\n background: ").concat(dt("treetable.row.background"), ";\n color: ").concat(dt("treetable.row.color"), ";\n transition: background ").concat(dt("treetable.transition.duration"), ", color ").concat(dt("treetable.transition.duration"), ", border-color ").concat(dt("treetable.transition.duration"), ",\n outline-color ").concat(dt("treetable.transition.duration"), ", box-shadow ").concat(dt("treetable.transition.duration"), ";\n}\n\n.p-treetable-tbody > tr > td {\n text-align: start;\n border-color: ").concat(dt("treetable.body.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n padding: ").concat(dt("treetable.body.cell.padding"), ";\n}\n\n.p-treetable-hoverable .p-treetable-tbody > tr:not(.p-treetable-row-selected):hover {\n background: ").concat(dt("treetable.row.hover.background"), ";\n color: ").concat(dt("treetable.row.hover.color"), ";\n}\n\n.p-treetable-tbody > tr.p-treetable-row-selected {\n background: ").concat(dt("treetable.row.selected.background"), ";\n color: ").concat(dt("treetable.row.selected.color"), ";\n}\n\n.p-treetable-tbody > tr:has(+ .p-treetable-row-selected) > td {\n border-block-end-color: ").concat(dt("treetable.body.cell.selected.border.color"), ";\n}\n\n.p-treetable-tbody > tr.p-treetable-row-selected > td {\n border-block-end-color: ").concat(dt("treetable.body.cell.selected.border.color"), ";\n}\n\n.p-treetable-tbody > tr:focus-visible,\n.p-treetable-tbody > tr.p-treetable-contextmenu-row-selected {\n box-shadow: ").concat(dt("treetable.row.focus.ring.shadow"), ";\n outline: ").concat(dt("treetable.row.focus.ring.width"), " ").concat(dt("treetable.row.focus.ring.style"), " ").concat(dt("treetable.row.focus.ring.color"), ";\n outline-offset: ").concat(dt("treetable.row.focus.ring.offset"), ";\n}\n\n.p-treetable-tfoot > tr > td {\n text-align: start;\n padding: ").concat(dt("treetable.footer.cell.padding"), ";\n border-color: ").concat(dt("treetable.footer.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("treetable.footer.cell.color"), ";\n background: ").concat(dt("treetable.footer.cell.background"), ";\n}\n\n.p-treetable-column-footer {\n font-weight: ").concat(dt("treetable.column.footer.font.weight"), ";\n}\n\n.p-treetable-sortable-column {\n cursor: pointer;\n user-select: none;\n outline-color: transparent;\n}\n\n.p-treetable-column-title,\n.p-treetable-sort-icon,\n.p-treetable-sort-badge {\n vertical-align: middle;\n}\n\n.p-treetable-sort-icon {\n color: ").concat(dt("treetable.sort.icon.color"), ";\n font-size: ").concat(dt("treetable.sort.icon.size"), ";\n width: ").concat(dt("treetable.sort.icon.size"), ";\n height: ").concat(dt("treetable.sort.icon.size"), ";\n transition: color ").concat(dt("treetable.transition.duration"), ";\n}\n\n.p-treetable-sortable-column:not(.p-treetable-column-sorted):hover {\n background: ").concat(dt("treetable.header.cell.hover.background"), ";\n color: ").concat(dt("treetable.header.cell.hover.color"), ";\n}\n\n.p-treetable-sortable-column:not(.p-treetable-column-sorted):hover .p-treetable-sort-icon {\n color: ").concat(dt("treetable.sort.icon.hover.color"), ";\n}\n\n.p-treetable-column-sorted {\n background: ").concat(dt("treetable.header.cell.selected.background"), ";\n color: ").concat(dt("treetable.header.cell.selected.color"), ";\n}\n\n.p-treetable-column-sorted .p-treetable-sort-icon {\n color: ").concat(dt("treetable.header.cell.selected.color"), ";\n}\n\n.p-treetable-sortable-column:focus-visible {\n box-shadow: ").concat(dt("treetable.header.cell.focus.ring.shadow"), ";\n outline: ").concat(dt("treetable.header.cell.focus.ring.width"), " ").concat(dt("treetable.header.cell.focus.ring.style"), " ").concat(dt("treetable.header.cell.focus.ring.color"), ";\n outline-offset: ").concat(dt("treetable.header.cell.focus.ring.offset"), ";\n}\n\n.p-treetable-hoverable .p-treetable-selectable-row {\n cursor: pointer;\n}\n\n.p-treetable-loading-icon {\n font-size: ").concat(dt("treetable.loading.icon.size"), ";\n width: ").concat(dt("treetable.loading.icon.size"), ";\n height: ").concat(dt("treetable.loading.icon.size"), ";\n}\n\n.p-treetable-gridlines .p-treetable-header {\n border-width: 1px 1px 0 1px;\n}\n\n.p-treetable-gridlines .p-treetable-footer {\n border-width: 0 1px 1px 1px;\n}\n\n.p-treetable-gridlines .p-treetable-paginator-top {\n border-width: 1px 1px 0 1px;\n}\n\n.p-treetable-gridlines .p-treetable-paginator-bottom {\n border-width: 0 1px 1px 1px;\n}\n\n.p-treetable-gridlines .p-treetable-thead > tr > th {\n border-width: 1px 0 1px 1px;\n}\n\n.p-treetable-gridlines .p-treetable-thead > tr > th:last-child {\n border-width: 1px;\n}\n\n.p-treetable-gridlines .p-treetable-tbody > tr > td {\n border-width: 1px 0 0 1px;\n}\n\n.p-treetable-gridlines .p-treetable-tbody > tr > td:last-child {\n border-width: 1px 1px 0 1px;\n}\n\n.p-treetable-gridlines .p-treetable-tbody > tr:last-child > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-treetable-gridlines .p-treetable-tbody > tr:last-child > td:last-child {\n border-width: 1px;\n}\n\n.p-treetable-gridlines .p-treetable-tfoot > tr > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-treetable-gridlines .p-treetable-tfoot > tr > td:last-child {\n border-width: 1px 1px 1px 1px;\n}\n\n.p-treetable.p-treetable-gridlines .p-treetable-thead + .p-treetable-tfoot > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-treetable.p-treetable-gridlines .p-treetable-thead + .p-treetable-tfoot > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-treetable.p-treetable-gridlines:has(.p-treetable-thead):has(.p-treetable-tbody) .p-treetable-tbody > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-treetable.p-treetable-gridlines:has(.p-treetable-thead):has(.p-treetable-tbody) .p-treetable-tbody > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-treetable.p-treetable-gridlines:has(.p-treetable-tbody):has(.p-treetable-tfoot) .p-treetable-tbody > tr:last-child > td {\n border-width: 0 0 0 1px;\n}\n\n.p-treetable.p-treetable-gridlines:has(.p-treetable-tbody):has(.p-treetable-tfoot) .p-treetable-tbody > tr:last-child > td:last-child {\n border-width: 0 1px 0 1px;\n}\n\n.p-treetable.p-treetable-sm .p-treetable-header {\n padding: 0.375rem 0.5rem;\n}\n\n.p-treetable.p-treetable-sm .p-treetable-thead > tr > th {\n padding: 0.375rem 0.5rem;\n}\n\n.p-treetable.p-treetable-sm .p-treetable-tbody > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-treetable.p-treetable-sm .p-treetable-tfoot > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-treetable.p-treetable-sm .p-treetable-footer {\n padding: 0.375rem 0.5rem;\n}\n\n.p-treetable.p-treetable-lg .p-treetable-header {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-treetable.p-treetable-lg .p-treetable-thead > tr > th {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-treetable.p-treetable-lg .p-treetable-tbody > tr > td {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-treetable.p-treetable-lg .p-treetable-tfoot > tr > td {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-treetable.p-treetable-lg .p-treetable-footer {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-treetable-body-cell-content {\n display: flex;\n align-items: center;\n gap: ").concat(dt("treetable.body.cell.gap"), ";\n}\n\n.p-treetable-tbody > tr.p-treetable-row-selected .p-treetable-node-toggle-button {\n color: inherit;\n}\n\n.p-treetable-node-toggle-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("treetable.node.toggle.button.size"), ";\n height: ").concat(dt("treetable.node.toggle.button.size"), ";\n color: ").concat(dt("treetable.node.toggle.button.color"), ";\n border: 0 none;\n background: transparent;\n cursor: pointer;\n border-radius: ").concat(dt("treetable.node.toggle.button.border.radius"), ";\n transition: background ").concat(dt("treetable.transition.duration"), ", color ").concat(dt("treetable.transition.duration"), ", border-color ").concat(dt("treetable.transition.duration"), ",\n outline-color ").concat(dt("treetable.transition.duration"), ", box-shadow ").concat(dt("treetable.transition.duration"), ";\n outline-color: transparent;\n user-select: none;\n}\n\n.p-treetable-node-toggle-button:enabled:hover {\n color: ").concat(dt("treetable.node.toggle.button.hover.color"), ";\n background: ").concat(dt("treetable.node.toggle.button.hover.background"), ";\n}\n\n.p-treetable-tbody > tr.p-treetable-row-selected .p-treetable-node-toggle-button:hover {\n background: ").concat(dt("treetable.node.toggle.button.selected.hover.background"), ";\n color: ").concat(dt("treetable.node.toggle.button.selected.hover.color"), ";\n}\n\n.p-treetable-node-toggle-button:focus-visible {\n box-shadow: ").concat(dt("treetable.node.toggle.button.focus.ring.shadow"), ";\n outline: ").concat(dt("treetable.node.toggle.button.focus.ring.width"), " ").concat(dt("treetable.node.toggle.button.focus.ring.style"), " ").concat(dt("treetable.node.toggle.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("treetable.node.toggle.button.focus.ring.offset"), ";\n}\n\n.p-treetable-node-toggle-icon:dir(rtl) {\n transform: rotate(180deg);\n}\n"); +}, "theme"); +var classes = { + root: /* @__PURE__ */ __name(function root34(_ref2) { + var instance = _ref2.instance, props = _ref2.props; + return ["p-treetable p-component", { + "p-treetable-hoverable": props.rowHover || instance.rowSelectionMode, + "p-treetable-resizable": props.resizableColumns, + "p-treetable-resizable-fit": props.resizableColumns && props.columnResizeMode === "fit", + "p-treetable-scrollable": props.scrollable, + "p-treetable-flex-scrollable": props.scrollable && props.scrollHeight === "flex", + "p-treetable-gridlines": props.showGridlines, + "p-treetable-sm": props.size === "small", + "p-treetable-lg": props.size === "large" + }]; + }, "root"), + loading: "p-treetable-loading", + //TODO: required? + mask: "p-treetable-mask p-overlay-mask", + loadingIcon: "p-treetable-loading-icon", + header: "p-treetable-header", + paginator: /* @__PURE__ */ __name(function paginator(_ref3) { + var position = _ref3.position; + return "p-treetable-paginator-" + position; + }, "paginator"), + tableContainer: "p-treetable-table-container", + table: /* @__PURE__ */ __name(function table(_ref4) { + var props = _ref4.props; + return ["p-treetable-table", { + "p-treetable-scrollable-table": props.scrollable, + "p-treetable-resizable-table": props.resizableColumns, + "p-treetable-resizable-table-fit": props.resizableColumns && props.columnResizeMode === "fit" + }]; + }, "table"), + thead: "p-treetable-thead", + headerCell: /* @__PURE__ */ __name(function headerCell(_ref5) { + var instance = _ref5.instance, props = _ref5.props, context = _ref5.context; + return ["p-treetable-header-cell", { + "p-treetable-sortable-column": instance.columnProp("sortable"), + "p-treetable-resizable-column": props.resizableColumns, + "p-treetable-column-sorted": context === null || context === void 0 ? void 0 : context.sorted, + "p-treetable-frozen-column": instance.columnProp("frozen") + }]; + }, "headerCell"), + columnResizer: "p-treetable-column-resizer", + columnHeaderContent: "p-treetable-column-header-content", + columnTitle: "p-treetable-column-title", + sortIcon: "p-treetable-sort-icon", + pcSortBadge: "p-treetable-sort-badge", + tbody: "p-treetable-tbody", + row: /* @__PURE__ */ __name(function row(_ref6) { + var props = _ref6.props, instance = _ref6.instance; + return [{ + "p-treetable-row-selected": instance.selected, + "p-treetable-contextmenu-row-selected": props.contextMenuSelection && instance.isSelectedWithContextMenu + }]; + }, "row"), + bodyCell: /* @__PURE__ */ __name(function bodyCell(_ref7) { + var instance = _ref7.instance; + return [{ + "p-treetable-frozen-column": instance.columnProp("frozen") + }]; + }, "bodyCell"), + bodyCellContent: /* @__PURE__ */ __name(function bodyCellContent(_ref8) { + var instance = _ref8.instance; + return ["p-treetable-body-cell-content", { + "p-treetable-body-cell-content-expander": instance.columnProp("expander") + }]; + }, "bodyCellContent"), + nodeToggleButton: "p-treetable-node-toggle-button", + nodeToggleIcon: "p-treetable-node-toggle-icon", + pcNodeCheckbox: "p-treetable-node-checkbox", + emptyMessage: "p-treetable-empty-message", + tfoot: "p-treetable-tfoot", + footerCell: /* @__PURE__ */ __name(function footerCell(_ref9) { + var instance = _ref9.instance; + return [{ + "p-treetable-frozen-column": instance.columnProp("frozen") + }]; + }, "footerCell"), + footer: "p-treetable-footer", + columnResizeIndicator: "p-treetable-column-resize-indicator" +}; +var inlineStyles = { + tableContainer: { + overflow: "auto" + }, + thead: { + position: "sticky" + }, + tfoot: { + position: "sticky" + } +}; +var TreeTableStyle = BaseStyle.extend({ + name: "treetable", + theme: theme40, + classes, + inlineStyles +}); +var script$5 = { + name: "BaseTreeTable", + "extends": script$1d, + props: { + value: { + type: null, + "default": null + }, + dataKey: { + type: [String, Function], + "default": "key" + }, + expandedKeys: { + type: null, + "default": null + }, + selectionKeys: { + type: null, + "default": null + }, + selectionMode: { + type: String, + "default": null + }, + metaKeySelection: { + type: Boolean, + "default": false + }, + contextMenu: { + type: Boolean, + "default": false + }, + contextMenuSelection: { + type: Object, + "default": null + }, + rows: { + type: Number, + "default": 0 + }, + first: { + type: Number, + "default": 0 + }, + totalRecords: { + type: Number, + "default": 0 + }, + paginator: { + type: Boolean, + "default": false + }, + paginatorPosition: { + type: String, + "default": "bottom" + }, + alwaysShowPaginator: { + type: Boolean, + "default": true + }, + paginatorTemplate: { + type: String, + "default": "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown" + }, + pageLinkSize: { + type: Number, + "default": 5 + }, + rowsPerPageOptions: { + type: Array, + "default": null + }, + currentPageReportTemplate: { + type: String, + "default": "({currentPage} of {totalPages})" + }, + lazy: { + type: Boolean, + "default": false + }, + loading: { + type: Boolean, + "default": false + }, + loadingIcon: { + type: String, + "default": void 0 + }, + loadingMode: { + type: String, + "default": "mask" + }, + rowHover: { + type: Boolean, + "default": false + }, + autoLayout: { + type: Boolean, + "default": false + }, + sortField: { + type: [String, Function], + "default": null + }, + sortOrder: { + type: Number, + "default": null + }, + defaultSortOrder: { + type: Number, + "default": 1 + }, + multiSortMeta: { + type: Array, + "default": null + }, + sortMode: { + type: String, + "default": "single" + }, + removableSort: { + type: Boolean, + "default": false + }, + filters: { + type: Object, + "default": null + }, + filterMode: { + type: String, + "default": "lenient" + }, + filterLocale: { + type: String, + "default": void 0 + }, + resizableColumns: { + type: Boolean, + "default": false + }, + columnResizeMode: { + type: String, + "default": "fit" + }, + indentation: { + type: Number, + "default": 1 + }, + showGridlines: { + type: Boolean, + "default": false + }, + scrollable: { + type: Boolean, + "default": false + }, + scrollHeight: { + type: String, + "default": null + }, + size: { + type: String, + "default": null + }, + tableStyle: { + type: null, + "default": null + }, + tableClass: { + type: [String, Object], + "default": null + }, + tableProps: { + type: Object, + "default": null + } + }, + style: TreeTableStyle, + provide: /* @__PURE__ */ __name(function provide51() { + return { + $pcTreeTable: this, + $parentInstance: this + }; + }, "provide") +}; +var script$4 = { + name: "FooterCell", + hostName: "TreeTable", + "extends": script$1d, + props: { + column: { + type: Object, + "default": null + }, + index: { + type: Number, + "default": null + } + }, + data: /* @__PURE__ */ __name(function data37() { + return { + styleObject: {} + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted41() { + if (this.columnProp("frozen")) { + this.updateStickyPosition(); + } + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated10() { + if (this.columnProp("frozen")) { + this.updateStickyPosition(); + } + }, "updated"), + methods: { + columnProp: /* @__PURE__ */ __name(function columnProp(prop) { + return getVNodeProp(this.column, prop); + }, "columnProp"), + getColumnPT: /* @__PURE__ */ __name(function getColumnPT(key) { + var _this$$parentInstance; + var columnMetaData = { + props: this.column.props, + parent: { + instance: this, + props: this.$props, + state: this.$data + }, + context: { + index: this.index, + frozen: this.columnProp("frozen"), + size: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.size + } + }; + return mergeProps(this.ptm("column.".concat(key), { + column: columnMetaData + }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); + }, "getColumnPT"), + getColumnProp: /* @__PURE__ */ __name(function getColumnProp() { + return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; + }, "getColumnProp"), + updateStickyPosition: /* @__PURE__ */ __name(function updateStickyPosition() { + if (this.columnProp("frozen")) { + var align = this.columnProp("alignFrozen"); + if (align === "right") { + var pos = 0; + var next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); + if (next) { + pos = getOuterWidth(next) + parseFloat(next.style.right || 0); + } + this.styleObject.insetInlineEnd = pos + "px"; + } else { + var _pos = 0; + var prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); + if (prev) { + _pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0); + } + this.styleObject.insetInlineStart = _pos + "px"; + } + } + }, "updateStickyPosition") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass4() { + return [this.columnProp("footerClass"), this.columnProp("class"), this.cx("footerCell")]; + }, "containerClass"), + containerStyle: /* @__PURE__ */ __name(function containerStyle2() { + var bodyStyle = this.columnProp("footerStyle"); + var columnStyle = this.columnProp("style"); + return this.columnProp("frozen") ? [columnStyle, bodyStyle, this.styleObject] : [columnStyle, bodyStyle]; + }, "containerStyle") + } +}; +function _typeof$5(o) { + "@babel/helpers - typeof"; + return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$5(o); +} +__name(_typeof$5, "_typeof$5"); +function ownKeys$5(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$5, "ownKeys$5"); +function _objectSpread$5(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$5(Object(t2), true).forEach(function(r2) { + _defineProperty$5(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$5(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$5, "_objectSpread$5"); +function _defineProperty$5(e, r, t2) { + return (r = _toPropertyKey$5(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$5, "_defineProperty$5"); +function _toPropertyKey$5(t2) { + var i = _toPrimitive$5(t2, "string"); + return "symbol" == _typeof$5(i) ? i : i + ""; +} +__name(_toPropertyKey$5, "_toPropertyKey$5"); +function _toPrimitive$5(t2, r) { + if ("object" != _typeof$5(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$5(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$5, "_toPrimitive$5"); +var _hoisted_1$4 = ["data-p-frozen-column"]; +function render$4(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("td", mergeProps({ + style: $options.containerStyle, + "class": $options.containerClass, + role: "cell" + }, _objectSpread$5(_objectSpread$5({}, $options.getColumnPT("root")), $options.getColumnPT("footerCell")), { + "data-p-frozen-column": $options.columnProp("frozen") + }), [$props.column.children && $props.column.children.footer ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.footer), { + key: 0, + column: $props.column + }, null, 8, ["column"])) : createCommentVNode("", true), $options.columnProp("footer") ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": _ctx.cx("columnFooter") + }, $options.getColumnPT("columnFooter")), toDisplayString($options.columnProp("footer")), 17)) : createCommentVNode("", true)], 16, _hoisted_1$4); +} +__name(render$4, "render$4"); +script$4.render = render$4; +var script$3 = { + name: "HeaderCell", + hostName: "TreeTable", + "extends": script$1d, + emits: ["column-click", "column-resizestart"], + props: { + column: { + type: Object, + "default": null + }, + resizableColumns: { + type: Boolean, + "default": false + }, + sortField: { + type: [String, Function], + "default": null + }, + sortOrder: { + type: Number, + "default": null + }, + multiSortMeta: { + type: Array, + "default": null + }, + sortMode: { + type: String, + "default": "single" + }, + index: { + type: Number, + "default": null + } + }, + data: /* @__PURE__ */ __name(function data38() { + return { + styleObject: {} + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted42() { + if (this.columnProp("frozen")) { + this.updateStickyPosition(); + } + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated11() { + if (this.columnProp("frozen")) { + this.updateStickyPosition(); + } + }, "updated"), + methods: { + columnProp: /* @__PURE__ */ __name(function columnProp2(prop) { + return getVNodeProp(this.column, prop); + }, "columnProp"), + getColumnPT: /* @__PURE__ */ __name(function getColumnPT2(key) { + var _this$$parentInstance; + var columnMetaData = { + props: this.column.props, + parent: { + instance: this, + props: this.$props, + state: this.$data + }, + context: { + index: this.index, + sorted: this.isColumnSorted(), + frozen: this.$parentInstance.scrollable && this.columnProp("frozen"), + resizable: this.resizableColumns, + scrollable: this.$parentInstance.scrollable, + showGridlines: this.$parentInstance.showGridlines, + size: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.size + } + }; + return mergeProps(this.ptm("column.".concat(key), { + column: columnMetaData + }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); + }, "getColumnPT"), + getColumnProp: /* @__PURE__ */ __name(function getColumnProp2() { + return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; + }, "getColumnProp"), + updateStickyPosition: /* @__PURE__ */ __name(function updateStickyPosition2() { + if (this.columnProp("frozen")) { + var align = this.columnProp("alignFrozen"); + if (align === "right") { + var pos = 0; + var next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); + if (next) { + pos = getOuterWidth(next) + parseFloat(next.style.right || 0); + } + this.styleObject.insetInlineEnd = pos + "px"; + } else { + var _pos = 0; + var prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); + if (prev) { + _pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0); + } + this.styleObject.insetInlineStart = _pos + "px"; + } + var filterRow = this.$el.parentElement.nextElementSibling; + if (filterRow) { + var index = getIndex(this.$el); + filterRow.children[index].style.left = this.styleObject.left; + filterRow.children[index].style.right = this.styleObject.right; + } + } + }, "updateStickyPosition"), + onClick: /* @__PURE__ */ __name(function onClick9(event2) { + this.$emit("column-click", { + originalEvent: event2, + column: this.column + }); + }, "onClick"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown13(event2) { + if ((event2.code === "Enter" || event2.code === "NumpadEnter" || event2.code === "Space") && event2.currentTarget.nodeName === "TH" && getAttribute(event2.currentTarget, "data-p-sortable-column")) { + this.$emit("column-click", { + originalEvent: event2, + column: this.column + }); + event2.preventDefault(); + } + }, "onKeyDown"), + onResizeStart: /* @__PURE__ */ __name(function onResizeStart(event2) { + this.$emit("column-resizestart", event2); + }, "onResizeStart"), + getMultiSortMetaIndex: /* @__PURE__ */ __name(function getMultiSortMetaIndex() { + var index = -1; + for (var i = 0; i < this.multiSortMeta.length; i++) { + var meta = this.multiSortMeta[i]; + if (meta.field === this.columnProp("field") || meta.field === this.columnProp("sortField")) { + index = i; + break; + } + } + return index; + }, "getMultiSortMetaIndex"), + isMultiSorted: /* @__PURE__ */ __name(function isMultiSorted() { + return this.columnProp("sortable") && this.getMultiSortMetaIndex() > -1; + }, "isMultiSorted"), + isColumnSorted: /* @__PURE__ */ __name(function isColumnSorted() { + return this.sortMode === "single" ? this.sortField && (this.sortField === this.columnProp("field") || this.sortField === this.columnProp("sortField")) : this.isMultiSorted(); + }, "isColumnSorted") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass5() { + return [this.columnProp("headerClass"), this.columnProp("class"), this.cx("headerCell")]; + }, "containerClass"), + containerStyle: /* @__PURE__ */ __name(function containerStyle3() { + var headerStyle = this.columnProp("headerStyle"); + var columnStyle = this.columnProp("style"); + return this.columnProp("frozen") ? [columnStyle, headerStyle, this.styleObject] : [columnStyle, headerStyle]; + }, "containerStyle"), + sortState: /* @__PURE__ */ __name(function sortState() { + var sorted2 = false; + var sortOrder3 = null; + if (this.sortMode === "single") { + sorted2 = this.sortField && (this.sortField === this.columnProp("field") || this.sortField === this.columnProp("sortField")); + sortOrder3 = sorted2 ? this.sortOrder : 0; + } else if (this.sortMode === "multiple") { + var metaIndex = this.getMultiSortMetaIndex(); + if (metaIndex > -1) { + sorted2 = true; + sortOrder3 = this.multiSortMeta[metaIndex].order; + } + } + return { + sorted: sorted2, + sortOrder: sortOrder3 + }; + }, "sortState"), + sortableColumnIcon: /* @__PURE__ */ __name(function sortableColumnIcon() { + var _this$sortState = this.sortState, sorted2 = _this$sortState.sorted, sortOrder3 = _this$sortState.sortOrder; + if (!sorted2) return script$1V; + else if (sorted2 && sortOrder3 > 0) return script$1W; + else if (sorted2 && sortOrder3 < 0) return script$1X; + return null; + }, "sortableColumnIcon"), + ariaSort: /* @__PURE__ */ __name(function ariaSort() { + if (this.columnProp("sortable")) { + var _this$sortState2 = this.sortState, sorted2 = _this$sortState2.sorted, sortOrder3 = _this$sortState2.sortOrder; + if (sorted2 && sortOrder3 < 0) return "descending"; + else if (sorted2 && sortOrder3 > 0) return "ascending"; + else return "none"; + } else { + return null; + } + }, "ariaSort") + }, + components: { + Badge: script$1z, + SortAltIcon: script$1V, + SortAmountUpAltIcon: script$1W, + SortAmountDownIcon: script$1X + } +}; +function _typeof$4(o) { + "@babel/helpers - typeof"; + return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$4(o); +} +__name(_typeof$4, "_typeof$4"); +function ownKeys$4(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$4, "ownKeys$4"); +function _objectSpread$4(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$4(Object(t2), true).forEach(function(r2) { + _defineProperty$4(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$4(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$4, "_objectSpread$4"); +function _defineProperty$4(e, r, t2) { + return (r = _toPropertyKey$4(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$4, "_defineProperty$4"); +function _toPropertyKey$4(t2) { + var i = _toPrimitive$4(t2, "string"); + return "symbol" == _typeof$4(i) ? i : i + ""; +} +__name(_toPropertyKey$4, "_toPropertyKey$4"); +function _toPrimitive$4(t2, r) { + if ("object" != _typeof$4(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$4(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$4, "_toPrimitive$4"); +var _hoisted_1$3$1 = ["tabindex", "aria-sort", "data-p-sortable-column", "data-p-resizable-column", "data-p-sorted", "data-p-frozen-column"]; +function render$3(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Badge = resolveComponent("Badge"); + return openBlock(), createElementBlock("th", mergeProps({ + "class": $options.containerClass, + style: [$options.containerStyle], + onClick: _cache[1] || (_cache[1] = function() { + return $options.onClick && $options.onClick.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }), + tabindex: $options.columnProp("sortable") ? "0" : null, + "aria-sort": $options.ariaSort, + role: "columnheader" + }, _objectSpread$4(_objectSpread$4({}, $options.getColumnPT("root")), $options.getColumnPT("headerCell")), { + "data-p-sortable-column": $options.columnProp("sortable"), + "data-p-resizable-column": $props.resizableColumns, + "data-p-sorted": $options.isColumnSorted(), + "data-p-frozen-column": $options.columnProp("frozen") + }), [$props.resizableColumns && !$options.columnProp("frozen") ? (openBlock(), createElementBlock("span", mergeProps({ + key: 0, + "class": _ctx.cx("columnResizer"), + onMousedown: _cache[0] || (_cache[0] = function() { + return $options.onResizeStart && $options.onResizeStart.apply($options, arguments); + }) + }, $options.getColumnPT("columnResizer")), null, 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("columnHeaderContent") + }, $options.getColumnPT("columnHeaderContent")), [$props.column.children && $props.column.children.header ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.header), { + key: 0, + column: $props.column + }, null, 8, ["column"])) : createCommentVNode("", true), $options.columnProp("header") ? (openBlock(), createElementBlock("span", mergeProps({ + key: 1, + "class": _ctx.cx("columnTitle") + }, $options.getColumnPT("columnTitle")), toDisplayString($options.columnProp("header")), 17)) : createCommentVNode("", true), $options.columnProp("sortable") ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ + key: 2 + }, $options.getColumnPT("sort"))), [(openBlock(), createBlock(resolveDynamicComponent($props.column.children && $props.column.children.sorticon || $options.sortableColumnIcon), mergeProps({ + sorted: $options.sortState.sorted, + sortOrder: $options.sortState.sortOrder, + "class": _ctx.cx("sortIcon") + }, $options.getColumnPT("sortIcon")), null, 16, ["sorted", "sortOrder", "class"]))], 16)) : createCommentVNode("", true), $options.isMultiSorted() ? (openBlock(), createBlock(_component_Badge, mergeProps({ + key: 3, + "class": _ctx.cx("pcSortBadge") + }, $options.getColumnPT("pcSortBadge"), { + value: $options.getMultiSortMetaIndex() + 1, + size: "small" + }), null, 16, ["class", "value"])) : createCommentVNode("", true)], 16)], 16, _hoisted_1$3$1); +} +__name(render$3, "render$3"); +script$3.render = render$3; +var script$2 = { + name: "BodyCell", + hostName: "TreeTable", + "extends": script$1d, + emits: ["node-toggle", "checkbox-toggle"], + props: { + node: { + type: Object, + "default": null + }, + column: { + type: Object, + "default": null + }, + level: { + type: Number, + "default": 0 + }, + indentation: { + type: Number, + "default": 1 + }, + leaf: { + type: Boolean, + "default": false + }, + expanded: { + type: Boolean, + "default": false + }, + selectionMode: { + type: String, + "default": null + }, + checked: { + type: Boolean, + "default": false + }, + partialChecked: { + type: Boolean, + "default": false + }, + templates: { + type: Object, + "default": null + }, + index: { + type: Number, + "default": null + }, + loadingMode: { + type: String, + "default": "mask" + } + }, + data: /* @__PURE__ */ __name(function data39() { + return { + styleObject: {} + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted43() { + if (this.columnProp("frozen")) { + this.updateStickyPosition(); + } + }, "mounted"), + updated: /* @__PURE__ */ __name(function updated12() { + if (this.columnProp("frozen")) { + this.updateStickyPosition(); + } + }, "updated"), + methods: { + toggle: /* @__PURE__ */ __name(function toggle4() { + this.$emit("node-toggle", this.node); + }, "toggle"), + columnProp: /* @__PURE__ */ __name(function columnProp3(prop) { + return getVNodeProp(this.column, prop); + }, "columnProp"), + getColumnPT: /* @__PURE__ */ __name(function getColumnPT3(key) { + var _this$$parentInstance; + var columnMetaData = { + props: this.column.props, + parent: { + instance: this, + props: this.$props, + state: this.$data + }, + context: { + index: this.index, + selectable: this.$parentInstance.rowHover || this.$parentInstance.rowSelectionMode, + selected: this.$parent.selected, + frozen: this.columnProp("frozen"), + scrollable: this.$parentInstance.scrollable, + showGridlines: this.$parentInstance.showGridlines, + size: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.size + } + }; + return mergeProps(this.ptm("column.".concat(key), { + column: columnMetaData + }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); + }, "getColumnPT"), + getColumnProp: /* @__PURE__ */ __name(function getColumnProp3() { + return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; + }, "getColumnProp"), + getColumnCheckboxPT: /* @__PURE__ */ __name(function getColumnCheckboxPT(key) { + var columnMetaData = { + props: this.column.props, + parent: { + instance: this, + props: this.$props, + state: this.$data + }, + context: { + checked: this.checked, + partialChecked: this.partialChecked + } + }; + return mergeProps(this.ptm("column.".concat(key), { + column: columnMetaData + }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); + }, "getColumnCheckboxPT"), + updateStickyPosition: /* @__PURE__ */ __name(function updateStickyPosition3() { + if (this.columnProp("frozen")) { + var align = this.columnProp("alignFrozen"); + if (align === "right") { + var pos = 0; + var next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); + if (next) { + pos = getOuterWidth(next) + parseFloat(next.style.right || 0); + } + this.styleObject.insetInlineEnd = pos + "px"; + } else { + var _pos = 0; + var prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); + if (prev) { + _pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0); + } + this.styleObject.insetInlineStart = _pos + "px"; + } + } + }, "updateStickyPosition"), + resolveFieldData: /* @__PURE__ */ __name(function resolveFieldData$1(rowData, field) { + return resolveFieldData(rowData, field); + }, "resolveFieldData$1"), + toggleCheckbox: /* @__PURE__ */ __name(function toggleCheckbox() { + this.$emit("checkbox-toggle"); + }, "toggleCheckbox") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass6() { + return [this.columnProp("bodyClass"), this.columnProp("class"), this.cx("bodyCell")]; + }, "containerClass"), + containerStyle: /* @__PURE__ */ __name(function containerStyle4() { + var bodyStyle = this.columnProp("bodyStyle"); + var columnStyle = this.columnProp("style"); + return this.columnProp("frozen") ? [columnStyle, bodyStyle, this.styleObject] : [columnStyle, bodyStyle]; + }, "containerStyle"), + togglerStyle: /* @__PURE__ */ __name(function togglerStyle() { + return { + marginLeft: this.level * this.indentation + "rem", + visibility: this.leaf ? "hidden" : "visible" + }; + }, "togglerStyle"), + checkboxSelectionMode: /* @__PURE__ */ __name(function checkboxSelectionMode() { + return this.selectionMode === "checkbox"; + }, "checkboxSelectionMode") + }, + components: { + Checkbox: script$1J, + ChevronRightIcon: script$1l, + ChevronDownIcon: script$1k, + CheckIcon: script$1D, + MinusIcon: script$1y, + SpinnerIcon: script$1r + }, + directives: { + ripple: Ripple + } +}; +function _typeof$3(o) { + "@babel/helpers - typeof"; + return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$3(o); +} +__name(_typeof$3, "_typeof$3"); +function ownKeys$3(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$3, "ownKeys$3"); +function _objectSpread$3(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$3(Object(t2), true).forEach(function(r2) { + _defineProperty$3(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$3(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$3, "_objectSpread$3"); +function _defineProperty$3(e, r, t2) { + return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$3, "_defineProperty$3"); +function _toPropertyKey$3(t2) { + var i = _toPrimitive$3(t2, "string"); + return "symbol" == _typeof$3(i) ? i : i + ""; +} +__name(_toPropertyKey$3, "_toPropertyKey$3"); +function _toPrimitive$3(t2, r) { + if ("object" != _typeof$3(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$3(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$3, "_toPrimitive$3"); +var _hoisted_1$2$1 = ["data-p-frozen-column"]; +function render$2(_ctx, _cache, $props, $setup, $data, $options) { + var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); + var _component_Checkbox = resolveComponent("Checkbox"); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("td", mergeProps({ + style: $options.containerStyle, + "class": $options.containerClass, + role: "cell" + }, _objectSpread$3(_objectSpread$3({}, $options.getColumnPT("root")), $options.getColumnPT("bodyCell")), { + "data-p-frozen-column": $options.columnProp("frozen") + }), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("bodyCellContent") + }, $options.getColumnPT("bodyCellContent")), [$options.columnProp("expander") ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ + key: 0, + type: "button", + "class": _ctx.cx("nodeToggleButton"), + onClick: _cache[0] || (_cache[0] = function() { + return $options.toggle && $options.toggle.apply($options, arguments); + }), + style: $options.togglerStyle, + tabindex: "-1" + }, $options.getColumnPT("nodeToggleButton"), { + "data-pc-group-section": "rowactionbutton" + }), [$props.node.loading && $props.loadingMode === "icon" ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [$props.templates["nodetoggleicon"] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates["nodetoggleicon"]), { + key: 0 + })) : createCommentVNode("", true), $props.templates["nodetogglericon"] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates["nodetogglericon"]), { + key: 1 + })) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({ + key: 2, + spin: "" + }, _ctx.ptm("nodetoggleicon")), null, 16))], 64)) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [$props.column.children && $props.column.children.rowtoggleicon ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.rowtoggleicon), { + key: 0, + node: $props.node, + expanded: $props.expanded, + "class": normalizeClass(_ctx.cx("nodeToggleIcon")) + }, null, 8, ["node", "expanded", "class"])) : createCommentVNode("", true), $props.column.children && $props.column.children.rowtogglericon ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.rowtogglericon), { + key: 1, + node: $props.node, + expanded: $props.expanded, + "class": normalizeClass(_ctx.cx("nodeToggleIcon")) + }, null, 8, ["node", "expanded", "class"])) : $props.expanded ? (openBlock(), createBlock(resolveDynamicComponent($props.node.expandedIcon ? "span" : "ChevronDownIcon"), mergeProps({ + key: 2, + "class": _ctx.cx("nodeToggleIcon") + }, $options.getColumnPT("nodeToggleIcon")), null, 16, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent($props.node.collapsedIcon ? "span" : "ChevronRightIcon"), mergeProps({ + key: 3, + "class": _ctx.cx("nodeToggleIcon") + }, $options.getColumnPT("nodeToggleIcon")), null, 16, ["class"]))], 64))], 16)), [[_directive_ripple]]) : createCommentVNode("", true), $options.checkboxSelectionMode && $options.columnProp("expander") ? (openBlock(), createBlock(_component_Checkbox, { + key: 1, + modelValue: $props.checked, + binary: true, + "class": normalizeClass(_ctx.cx("pcNodeCheckbox")), + disabled: $props.node.selectable === false, + onChange: $options.toggleCheckbox, + tabindex: -1, + indeterminate: $props.partialChecked, + unstyled: _ctx.unstyled, + pt: $options.getColumnCheckboxPT("pcNodeCheckbox"), + "data-p-partialchecked": $props.partialChecked + }, { + icon: withCtx(function(slotProps) { + return [$props.templates["checkboxicon"] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates["checkboxicon"]), { + key: 0, + checked: slotProps.checked, + partialChecked: $props.partialChecked, + "class": normalizeClass(slotProps["class"]) + }, null, 8, ["checked", "partialChecked", "class"])) : createCommentVNode("", true)]; + }), + _: 1 + }, 8, ["modelValue", "class", "disabled", "onChange", "indeterminate", "unstyled", "pt", "data-p-partialchecked"])) : createCommentVNode("", true), $props.column.children && $props.column.children.body ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.body), { + key: 2, + node: $props.node, + column: $props.column + }, null, 8, ["node", "column"])) : (openBlock(), createElementBlock(Fragment, { + key: 3 + }, [createTextVNode(toDisplayString($options.resolveFieldData($props.node.data, $options.columnProp("field"))), 1)], 64))], 16)], 16, _hoisted_1$2$1); +} +__name(render$2, "render$2"); +script$2.render = render$2; +function _typeof$2(o) { + "@babel/helpers - typeof"; + return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$2(o); +} +__name(_typeof$2, "_typeof$2"); +function _createForOfIteratorHelper$1(r, e) { + var t2 = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t2) { + if (Array.isArray(r) || (t2 = _unsupportedIterableToArray$1(r)) || e) { + t2 && (r = t2); + var _n = 0, F = /* @__PURE__ */ __name(function F2() { + }, "F"); + return { s: F, n: /* @__PURE__ */ __name(function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + throw r2; + }, "e"), f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: /* @__PURE__ */ __name(function s() { + t2 = t2.call(r); + }, "s"), n: /* @__PURE__ */ __name(function n() { + var r2 = t2.next(); + return a = r2.done, r2; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + u = true, o = r2; + }, "e"), f: /* @__PURE__ */ __name(function f() { + try { + a || null == t2["return"] || t2["return"](); + } finally { + if (u) throw o; + } + }, "f") }; +} +__name(_createForOfIteratorHelper$1, "_createForOfIteratorHelper$1"); +function ownKeys$2(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$2, "ownKeys$2"); +function _objectSpread$2(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$2(Object(t2), true).forEach(function(r2) { + _defineProperty$2(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$2(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$2, "_objectSpread$2"); +function _defineProperty$2(e, r, t2) { + return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$2, "_defineProperty$2"); +function _toPropertyKey$2(t2) { + var i = _toPrimitive$2(t2, "string"); + return "symbol" == _typeof$2(i) ? i : i + ""; +} +__name(_toPropertyKey$2, "_toPropertyKey$2"); +function _toPrimitive$2(t2, r) { + if ("object" != _typeof$2(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$2(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$2, "_toPrimitive$2"); +function _toConsumableArray$1(r) { + return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); +} +__name(_toConsumableArray$1, "_toConsumableArray$1"); +function _nonIterableSpread$1() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread$1, "_nonIterableSpread$1"); +function _unsupportedIterableToArray$1(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray$1(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$1(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray$1"); +function _iterableToArray$1(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray$1, "_iterableToArray$1"); +function _arrayWithoutHoles$1(r) { + if (Array.isArray(r)) return _arrayLikeToArray$1(r); +} +__name(_arrayWithoutHoles$1, "_arrayWithoutHoles$1"); +function _arrayLikeToArray$1(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray$1, "_arrayLikeToArray$1"); +var script$1 = { + name: "TreeTableRow", + hostName: "TreeTable", + "extends": script$1d, + emits: ["node-click", "node-toggle", "checkbox-change", "nodeClick", "nodeToggle", "checkboxChange", "row-rightclick", "rowRightclick"], + props: { + node: { + type: null, + "default": null + }, + dataKey: { + type: [String, Function], + "default": "key" + }, + parentNode: { + type: null, + "default": null + }, + columns: { + type: null, + "default": null + }, + expandedKeys: { + type: null, + "default": null + }, + selectionKeys: { + type: null, + "default": null + }, + selectionMode: { + type: String, + "default": null + }, + level: { + type: Number, + "default": 0 + }, + indentation: { + type: Number, + "default": 1 + }, + tabindex: { + type: Number, + "default": -1 + }, + ariaSetSize: { + type: Number, + "default": null + }, + ariaPosInset: { + type: Number, + "default": null + }, + loadingMode: { + type: String, + "default": "mask" + }, + templates: { + type: Object, + "default": null + }, + contextMenu: { + type: Boolean, + "default": false + }, + contextMenuSelection: { + type: Object, + "default": null + } + }, + nodeTouched: false, + methods: { + columnProp: /* @__PURE__ */ __name(function columnProp4(col, prop) { + return getVNodeProp(col, prop); + }, "columnProp"), + toggle: /* @__PURE__ */ __name(function toggle5() { + this.$emit("node-toggle", this.node); + }, "toggle"), + onClick: /* @__PURE__ */ __name(function onClick10(event2) { + if (isClickable(event2.target) || getAttribute(event2.target, "data-pc-section") === "nodetogglebutton" || getAttribute(event2.target, "data-pc-section") === "nodetoggleicon" || event2.target.tagName === "path") { + return; + } + this.setTabIndexForSelectionMode(event2, this.nodeTouched); + this.$emit("node-click", { + originalEvent: event2, + nodeTouched: this.nodeTouched, + node: this.node + }); + this.nodeTouched = false; + }, "onClick"), + onRowRightClick: /* @__PURE__ */ __name(function onRowRightClick(event2) { + this.$emit("row-rightclick", { + originalEvent: event2, + node: this.node + }); + }, "onRowRightClick"), + onTouchEnd: /* @__PURE__ */ __name(function onTouchEnd2() { + this.nodeTouched = true; + }, "onTouchEnd"), + nodeKey: /* @__PURE__ */ __name(function nodeKey(node2) { + return resolveFieldData(node2, this.dataKey); + }, "nodeKey"), + onKeyDown: /* @__PURE__ */ __name(function onKeyDown14(event2, item8) { + switch (event2.code) { + case "ArrowDown": + this.onArrowDownKey(event2); + break; + case "ArrowUp": + this.onArrowUpKey(event2); + break; + case "ArrowLeft": + this.onArrowLeftKey(event2); + break; + case "ArrowRight": + this.onArrowRightKey(event2); + break; + case "Home": + this.onHomeKey(event2); + break; + case "End": + this.onEndKey(event2); + break; + case "Enter": + case "NumpadEnter": + case "Space": + if (!isClickable(event2.target)) { + this.onEnterKey(event2, item8); + } + break; + case "Tab": + this.onTabKey(event2); + break; + } + }, "onKeyDown"), + onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey9(event2) { + var nextElementSibling = event2.currentTarget.nextElementSibling; + nextElementSibling && this.focusRowChange(event2.currentTarget, nextElementSibling); + event2.preventDefault(); + }, "onArrowDownKey"), + onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey8(event2) { + var previousElementSibling = event2.currentTarget.previousElementSibling; + previousElementSibling && this.focusRowChange(event2.currentTarget, previousElementSibling); + event2.preventDefault(); + }, "onArrowUpKey"), + onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey4(event2) { + var _this = this; + var ishiddenIcon = findSingle(event2.currentTarget, "button").style.visibility === "hidden"; + var togglerElement = findSingle(this.$refs.node, '[data-pc-section="nodetogglebutton"]'); + if (ishiddenIcon) return; + !this.expanded && togglerElement.click(); + this.$nextTick(function() { + _this.onArrowDownKey(event2); + }); + event2.preventDefault(); + }, "onArrowRightKey"), + onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey5(event2) { + if (this.level === 0 && !this.expanded) { + return; + } + var currentTarget = event2.currentTarget; + var ishiddenIcon = findSingle(currentTarget, "button").style.visibility === "hidden"; + var togglerElement = findSingle(currentTarget, '[data-pc-section="nodetogglebutton"]'); + if (this.expanded && !ishiddenIcon) { + togglerElement.click(); + return; + } + var target = this.findBeforeClickableNode(currentTarget); + target && this.focusRowChange(currentTarget, target); + }, "onArrowLeftKey"), + onHomeKey: /* @__PURE__ */ __name(function onHomeKey9(event2) { + var findFirstElement = findSingle(event2.currentTarget.parentElement, 'tr[aria-level="'.concat(this.level + 1, '"]')); + findFirstElement && focus(findFirstElement); + event2.preventDefault(); + }, "onHomeKey"), + onEndKey: /* @__PURE__ */ __name(function onEndKey9(event2) { + var nodes = find(event2.currentTarget.parentElement, 'tr[aria-level="'.concat(this.level + 1, '"]')); + var findFirstElement = nodes[nodes.length - 1]; + focus(findFirstElement); + event2.preventDefault(); + }, "onEndKey"), + onEnterKey: /* @__PURE__ */ __name(function onEnterKey9(event2) { + event2.preventDefault(); + this.setTabIndexForSelectionMode(event2, this.nodeTouched); + if (this.selectionMode === "checkbox") { + this.toggleCheckbox(); + return; + } + this.$emit("node-click", { + originalEvent: event2, + nodeTouched: this.nodeTouched, + node: this.node + }); + this.nodeTouched = false; + }, "onEnterKey"), + onTabKey: /* @__PURE__ */ __name(function onTabKey6() { + var rows3 = _toConsumableArray$1(find(this.$refs.node.parentElement, "tr")); + var hasSelectedRow = rows3.some(function(row2) { + return getAttribute(row2, "data-p-selected") || row2.getAttribute("aria-checked") === "true"; + }); + rows3.forEach(function(row2) { + row2.tabIndex = -1; + }); + if (hasSelectedRow) { + var selectedNodes2 = rows3.filter(function(node2) { + return getAttribute(node2, "data-p-selected") || node2.getAttribute("aria-checked") === "true"; + }); + selectedNodes2[0].tabIndex = 0; + return; + } + rows3[0].tabIndex = 0; + }, "onTabKey"), + focusRowChange: /* @__PURE__ */ __name(function focusRowChange(firstFocusableRow, currentFocusedRow) { + firstFocusableRow.tabIndex = "-1"; + currentFocusedRow.tabIndex = "0"; + focus(currentFocusedRow); + }, "focusRowChange"), + findBeforeClickableNode: /* @__PURE__ */ __name(function findBeforeClickableNode(node2) { + var prevNode = node2.previousElementSibling; + if (prevNode) { + var prevNodeButton = prevNode.querySelector("button"); + if (prevNodeButton && prevNodeButton.style.visibility !== "hidden") { + return prevNode; + } + return this.findBeforeClickableNode(prevNode); + } + return null; + }, "findBeforeClickableNode"), + toggleCheckbox: /* @__PURE__ */ __name(function toggleCheckbox2() { + var _selectionKeys = this.selectionKeys ? _objectSpread$2({}, this.selectionKeys) : {}; + var _check = !this.checked; + this.propagateDown(this.node, _check, _selectionKeys); + this.$emit("checkbox-change", { + node: this.node, + check: _check, + selectionKeys: _selectionKeys + }); + }, "toggleCheckbox"), + propagateDown: /* @__PURE__ */ __name(function propagateDown(node2, check, selectionKeys) { + if (check) selectionKeys[this.nodeKey(node2)] = { + checked: true, + partialChecked: false + }; + else delete selectionKeys[this.nodeKey(node2)]; + if (node2.children && node2.children.length) { + var _iterator = _createForOfIteratorHelper$1(node2.children), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var child = _step.value; + this.propagateDown(child, check, selectionKeys); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }, "propagateDown"), + propagateUp: /* @__PURE__ */ __name(function propagateUp(event2) { + var check = event2.check; + var _selectionKeys = _objectSpread$2({}, event2.selectionKeys); + var checkedChildCount = 0; + var childPartialSelected = false; + var _iterator2 = _createForOfIteratorHelper$1(this.node.children), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + var child = _step2.value; + if (_selectionKeys[this.nodeKey(child)] && _selectionKeys[this.nodeKey(child)].checked) checkedChildCount++; + else if (_selectionKeys[this.nodeKey(child)] && _selectionKeys[this.nodeKey(child)].partialChecked) childPartialSelected = true; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + if (check && checkedChildCount === this.node.children.length) { + _selectionKeys[this.nodeKey(this.node)] = { + checked: true, + partialChecked: false + }; + } else { + if (!check) { + delete _selectionKeys[this.nodeKey(this.node)]; + } + if (childPartialSelected || checkedChildCount > 0 && checkedChildCount !== this.node.children.length) _selectionKeys[this.nodeKey(this.node)] = { + checked: false, + partialChecked: true + }; + else _selectionKeys[this.nodeKey(this.node)] = { + checked: false, + partialChecked: false + }; + } + this.$emit("checkbox-change", { + node: event2.node, + check: event2.check, + selectionKeys: _selectionKeys + }); + }, "propagateUp"), + onCheckboxChange: /* @__PURE__ */ __name(function onCheckboxChange(event2) { + var check = event2.check; + var _selectionKeys = _objectSpread$2({}, event2.selectionKeys); + var checkedChildCount = 0; + var childPartialSelected = false; + var _iterator3 = _createForOfIteratorHelper$1(this.node.children), _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { + var child = _step3.value; + if (_selectionKeys[this.nodeKey(child)] && _selectionKeys[this.nodeKey(child)].checked) checkedChildCount++; + else if (_selectionKeys[this.nodeKey(child)] && _selectionKeys[this.nodeKey(child)].partialChecked) childPartialSelected = true; + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + if (check && checkedChildCount === this.node.children.length) { + _selectionKeys[this.nodeKey(this.node)] = { + checked: true, + partialChecked: false + }; + } else { + if (!check) { + delete _selectionKeys[this.nodeKey(this.node)]; + } + if (childPartialSelected || checkedChildCount > 0 && checkedChildCount !== this.node.children.length) _selectionKeys[this.nodeKey(this.node)] = { + checked: false, + partialChecked: true + }; + else _selectionKeys[this.nodeKey(this.node)] = { + checked: false, + partialChecked: false + }; + } + this.$emit("checkbox-change", { + node: event2.node, + check: event2.check, + selectionKeys: _selectionKeys + }); + }, "onCheckboxChange"), + setTabIndexForSelectionMode: /* @__PURE__ */ __name(function setTabIndexForSelectionMode(event2, nodeTouched) { + if (this.selectionMode !== null) { + var elements = _toConsumableArray$1(find(this.$refs.node.parentElement, "tr")); + event2.currentTarget.tabIndex = nodeTouched === false ? -1 : 0; + if (elements.every(function(element) { + return element.tabIndex === -1; + })) { + elements[0].tabIndex = 0; + } + } + }, "setTabIndexForSelectionMode") + }, + computed: { + containerClass: /* @__PURE__ */ __name(function containerClass7() { + return [this.node.styleClass, this.cx("row")]; + }, "containerClass"), + expanded: /* @__PURE__ */ __name(function expanded2() { + return this.expandedKeys && this.expandedKeys[this.nodeKey(this.node)] === true; + }, "expanded"), + leaf: /* @__PURE__ */ __name(function leaf2() { + return this.node.leaf === false ? false : !(this.node.children && this.node.children.length); + }, "leaf"), + selected: /* @__PURE__ */ __name(function selected2() { + return this.selectionMode && this.selectionKeys ? this.selectionKeys[this.nodeKey(this.node)] === true : false; + }, "selected"), + isSelectedWithContextMenu: /* @__PURE__ */ __name(function isSelectedWithContextMenu() { + if (this.node && this.contextMenuSelection) { + return equals(this.node, this.contextMenuSelection, this.dataKey); + } + return false; + }, "isSelectedWithContextMenu"), + checked: /* @__PURE__ */ __name(function checked() { + return this.selectionKeys ? this.selectionKeys[this.nodeKey(this.node)] && this.selectionKeys[this.nodeKey(this.node)].checked : false; + }, "checked"), + partialChecked: /* @__PURE__ */ __name(function partialChecked() { + return this.selectionKeys ? this.selectionKeys[this.nodeKey(this.node)] && this.selectionKeys[this.nodeKey(this.node)].partialChecked : false; + }, "partialChecked"), + getAriaSelected: /* @__PURE__ */ __name(function getAriaSelected() { + return this.selectionMode === "single" || this.selectionMode === "multiple" ? this.selected : null; + }, "getAriaSelected"), + ptmOptions: /* @__PURE__ */ __name(function ptmOptions2() { + return { + context: { + selectable: this.$parentInstance.rowHover || this.$parentInstance.rowSelectionMode, + selected: this.selected, + scrollable: this.$parentInstance.scrollable + } + }; + }, "ptmOptions") + }, + components: { + TTBodyCell: script$2 + } +}; +var _hoisted_1$1$1 = ["tabindex", "aria-expanded", "aria-level", "aria-setsize", "aria-posinset", "aria-selected", "aria-checked", "data-p-selected", "data-p-selected-contextmenu"]; +function render$1(_ctx, _cache, $props, $setup, $data, $options) { + var _component_TTBodyCell = resolveComponent("TTBodyCell"); + var _component_TreeTableRow = resolveComponent("TreeTableRow", true); + return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("tr", mergeProps({ + ref: "node", + "class": $options.containerClass, + style: $props.node.style, + tabindex: $props.tabindex, + role: "row", + "aria-expanded": $props.node.children && $props.node.children.length ? $options.expanded : void 0, + "aria-level": $props.level + 1, + "aria-setsize": $props.ariaSetSize, + "aria-posinset": $props.ariaPosInset, + "aria-selected": $options.getAriaSelected, + "aria-checked": $options.checked || void 0, + onClick: _cache[1] || (_cache[1] = function() { + return $options.onClick && $options.onClick.apply($options, arguments); + }), + onKeydown: _cache[2] || (_cache[2] = function() { + return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); + }), + onTouchend: _cache[3] || (_cache[3] = function() { + return $options.onTouchEnd && $options.onTouchEnd.apply($options, arguments); + }), + onContextmenu: _cache[4] || (_cache[4] = function() { + return $options.onRowRightClick && $options.onRowRightClick.apply($options, arguments); + }) + }, _ctx.ptm("row", $options.ptmOptions), { + "data-p-selected": $options.selected, + "data-p-selected-contextmenu": $props.contextMenuSelection && $options.isSelectedWithContextMenu + }), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i + }, [!$options.columnProp(col, "hidden") ? (openBlock(), createBlock(_component_TTBodyCell, { + key: 0, + column: col, + node: $props.node, + level: $props.level, + leaf: $options.leaf, + indentation: $props.indentation, + expanded: $options.expanded, + selectionMode: $props.selectionMode, + checked: $options.checked, + partialChecked: $options.partialChecked, + templates: $props.templates, + onNodeToggle: _cache[0] || (_cache[0] = function($event) { + return _ctx.$emit("node-toggle", $event); + }), + onCheckboxToggle: $options.toggleCheckbox, + index: i, + loadingMode: $props.loadingMode, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["column", "node", "level", "leaf", "indentation", "expanded", "selectionMode", "checked", "partialChecked", "templates", "onCheckboxToggle", "index", "loadingMode", "unstyled", "pt"])) : createCommentVNode("", true)], 64); + }), 128))], 16, _hoisted_1$1$1), $options.expanded && $props.node.children && $props.node.children.length ? (openBlock(true), createElementBlock(Fragment, { + key: 0 + }, renderList($props.node.children, function(childNode) { + return openBlock(), createBlock(_component_TreeTableRow, { + key: $options.nodeKey(childNode), + dataKey: $props.dataKey, + columns: $props.columns, + node: childNode, + parentNode: $props.node, + level: $props.level + 1, + expandedKeys: $props.expandedKeys, + selectionMode: $props.selectionMode, + selectionKeys: $props.selectionKeys, + contextMenu: $props.contextMenu, + contextMenuSelection: $props.contextMenuSelection, + indentation: $props.indentation, + ariaPosInset: $props.node.children.indexOf(childNode) + 1, + ariaSetSize: $props.node.children.length, + templates: $props.templates, + onNodeToggle: _cache[5] || (_cache[5] = function($event) { + return _ctx.$emit("node-toggle", $event); + }), + onNodeClick: _cache[6] || (_cache[6] = function($event) { + return _ctx.$emit("node-click", $event); + }), + onRowRightclick: _cache[7] || (_cache[7] = function($event) { + return _ctx.$emit("row-rightclick", $event); + }), + onCheckboxChange: $options.onCheckboxChange, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["dataKey", "columns", "node", "parentNode", "level", "expandedKeys", "selectionMode", "selectionKeys", "contextMenu", "contextMenuSelection", "indentation", "ariaPosInset", "ariaSetSize", "templates", "onCheckboxChange", "unstyled", "pt"]); + }), 128)) : createCommentVNode("", true)], 64); +} +__name(render$1, "render$1"); +script$1.render = render$1; +function _typeof$1(o) { + "@babel/helpers - typeof"; + return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof$1(o); +} +__name(_typeof$1, "_typeof$1"); +function _createForOfIteratorHelper(r, e) { + var t2 = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t2) { + if (Array.isArray(r) || (t2 = _unsupportedIterableToArray(r)) || e) { + t2 && (r = t2); + var _n = 0, F = /* @__PURE__ */ __name(function F2() { + }, "F"); + return { s: F, n: /* @__PURE__ */ __name(function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + throw r2; + }, "e"), f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: /* @__PURE__ */ __name(function s() { + t2 = t2.call(r); + }, "s"), n: /* @__PURE__ */ __name(function n() { + var r2 = t2.next(); + return a = r2.done, r2; + }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { + u = true, o = r2; + }, "e"), f: /* @__PURE__ */ __name(function f() { + try { + a || null == t2["return"] || t2["return"](); + } finally { + if (u) throw o; + } + }, "f") }; +} +__name(_createForOfIteratorHelper, "_createForOfIteratorHelper"); +function ownKeys$1(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys$1, "ownKeys$1"); +function _objectSpread$1(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$1(Object(t2), true).forEach(function(r2) { + _defineProperty$1(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys$1(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread$1, "_objectSpread$1"); +function _defineProperty$1(e, r, t2) { + return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty$1, "_defineProperty$1"); +function _toPropertyKey$1(t2) { + var i = _toPrimitive$1(t2, "string"); + return "symbol" == _typeof$1(i) ? i : i + ""; +} +__name(_toPropertyKey$1, "_toPropertyKey$1"); +function _toPrimitive$1(t2, r) { + if ("object" != _typeof$1(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof$1(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive$1, "_toPrimitive$1"); +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +__name(_toConsumableArray, "_toConsumableArray"); +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +__name(_nonIterableSpread, "_nonIterableSpread"); +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t2 = {}.toString.call(r).slice(8, -1); + return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r, a) : void 0; + } +} +__name(_unsupportedIterableToArray, "_unsupportedIterableToArray"); +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +__name(_iterableToArray, "_iterableToArray"); +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +__name(_arrayWithoutHoles, "_arrayWithoutHoles"); +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +__name(_arrayLikeToArray, "_arrayLikeToArray"); +var script = { + name: "TreeTable", + "extends": script$5, + inheritAttrs: false, + emits: ["node-expand", "node-collapse", "update:expandedKeys", "update:selectionKeys", "node-select", "node-unselect", "update:first", "update:rows", "page", "update:sortField", "update:sortOrder", "update:multiSortMeta", "sort", "filter", "column-resize-end", "update:contextMenuSelection", "row-contextmenu"], + provide: /* @__PURE__ */ __name(function provide52() { + return { + $columns: this.d_columns + }; + }, "provide"), + data: /* @__PURE__ */ __name(function data40() { + return { + d_expandedKeys: this.expandedKeys || {}, + d_first: this.first, + d_rows: this.rows, + d_sortField: this.sortField, + d_sortOrder: this.sortOrder, + d_multiSortMeta: this.multiSortMeta ? _toConsumableArray(this.multiSortMeta) : [], + hasASelectedNode: false, + d_columns: new _default({ + type: "Column" + }) + }; + }, "data"), + documentColumnResizeListener: null, + documentColumnResizeEndListener: null, + lastResizeHelperX: null, + resizeColumnElement: null, + watch: { + expandedKeys: /* @__PURE__ */ __name(function expandedKeys3(newValue) { + this.d_expandedKeys = newValue; + }, "expandedKeys"), + first: /* @__PURE__ */ __name(function first2(newValue) { + this.d_first = newValue; + }, "first"), + rows: /* @__PURE__ */ __name(function rows2(newValue) { + this.d_rows = newValue; + }, "rows"), + sortField: /* @__PURE__ */ __name(function sortField2(newValue) { + this.d_sortField = newValue; + }, "sortField"), + sortOrder: /* @__PURE__ */ __name(function sortOrder2(newValue) { + this.d_sortOrder = newValue; + }, "sortOrder"), + multiSortMeta: /* @__PURE__ */ __name(function multiSortMeta(newValue) { + this.d_multiSortMeta = newValue; + }, "multiSortMeta") + }, + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount18() { + this.destroyStyleElement(); + this.d_columns.clear(); + }, "beforeUnmount"), + methods: { + columnProp: /* @__PURE__ */ __name(function columnProp5(col, prop) { + return getVNodeProp(col, prop); + }, "columnProp"), + ptHeaderCellOptions: /* @__PURE__ */ __name(function ptHeaderCellOptions(column2) { + return { + context: { + frozen: this.columnProp(column2, "frozen") + } + }; + }, "ptHeaderCellOptions"), + onNodeToggle: /* @__PURE__ */ __name(function onNodeToggle3(node2) { + var key = this.nodeKey(node2); + if (this.d_expandedKeys[key]) { + delete this.d_expandedKeys[key]; + this.$emit("node-collapse", node2); + } else { + this.d_expandedKeys[key] = true; + this.$emit("node-expand", node2); + } + this.d_expandedKeys = _objectSpread$1({}, this.d_expandedKeys); + this.$emit("update:expandedKeys", this.d_expandedKeys); + }, "onNodeToggle"), + onNodeClick: /* @__PURE__ */ __name(function onNodeClick3(event2) { + if (this.rowSelectionMode && event2.node.selectable !== false) { + var metaSelection = event2.nodeTouched ? false : this.metaKeySelection; + var _selectionKeys = metaSelection ? this.handleSelectionWithMetaKey(event2) : this.handleSelectionWithoutMetaKey(event2); + this.$emit("update:selectionKeys", _selectionKeys); + } + }, "onNodeClick"), + nodeKey: /* @__PURE__ */ __name(function nodeKey2(node2) { + return resolveFieldData(node2, this.dataKey); + }, "nodeKey"), + handleSelectionWithMetaKey: /* @__PURE__ */ __name(function handleSelectionWithMetaKey(event2) { + var originalEvent = event2.originalEvent; + var node2 = event2.node; + var nodeKey3 = this.nodeKey(node2); + var metaKey = originalEvent.metaKey || originalEvent.ctrlKey; + var selected3 = this.isNodeSelected(node2); + var _selectionKeys; + if (selected3 && metaKey) { + if (this.isSingleSelectionMode()) { + _selectionKeys = {}; + } else { + _selectionKeys = _objectSpread$1({}, this.selectionKeys); + delete _selectionKeys[nodeKey3]; + } + this.$emit("node-unselect", node2); + } else { + if (this.isSingleSelectionMode()) { + _selectionKeys = {}; + } else if (this.isMultipleSelectionMode()) { + _selectionKeys = !metaKey ? {} : this.selectionKeys ? _objectSpread$1({}, this.selectionKeys) : {}; + } + _selectionKeys[nodeKey3] = true; + this.$emit("node-select", node2); + } + return _selectionKeys; + }, "handleSelectionWithMetaKey"), + handleSelectionWithoutMetaKey: /* @__PURE__ */ __name(function handleSelectionWithoutMetaKey(event2) { + var node2 = event2.node; + var nodeKey3 = this.nodeKey(node2); + var selected3 = this.isNodeSelected(node2); + var _selectionKeys; + if (this.isSingleSelectionMode()) { + if (selected3) { + _selectionKeys = {}; + this.$emit("node-unselect", node2); + } else { + _selectionKeys = {}; + _selectionKeys[nodeKey3] = true; + this.$emit("node-select", node2); + } + } else { + if (selected3) { + _selectionKeys = _objectSpread$1({}, this.selectionKeys); + delete _selectionKeys[nodeKey3]; + this.$emit("node-unselect", node2); + } else { + _selectionKeys = this.selectionKeys ? _objectSpread$1({}, this.selectionKeys) : {}; + _selectionKeys[nodeKey3] = true; + this.$emit("node-select", node2); + } + } + return _selectionKeys; + }, "handleSelectionWithoutMetaKey"), + onCheckboxChange: /* @__PURE__ */ __name(function onCheckboxChange2(event2) { + this.$emit("update:selectionKeys", event2.selectionKeys); + if (event2.check) this.$emit("node-select", event2.node); + else this.$emit("node-unselect", event2.node); + }, "onCheckboxChange"), + onRowRightClick: /* @__PURE__ */ __name(function onRowRightClick2(event2) { + if (this.contextMenu) { + clearSelection(); + event2.originalEvent.target.focus(); + } + this.$emit("update:contextMenuSelection", event2.node); + this.$emit("row-contextmenu", event2); + }, "onRowRightClick"), + isSingleSelectionMode: /* @__PURE__ */ __name(function isSingleSelectionMode() { + return this.selectionMode === "single"; + }, "isSingleSelectionMode"), + isMultipleSelectionMode: /* @__PURE__ */ __name(function isMultipleSelectionMode() { + return this.selectionMode === "multiple"; + }, "isMultipleSelectionMode"), + onPage: /* @__PURE__ */ __name(function onPage2(event2) { + this.d_first = event2.first; + this.d_rows = event2.rows; + var pageEvent = this.createLazyLoadEvent(event2); + pageEvent.pageCount = event2.pageCount; + pageEvent.page = event2.page; + this.d_expandedKeys = {}; + this.$emit("update:expandedKeys", this.d_expandedKeys); + this.$emit("update:first", this.d_first); + this.$emit("update:rows", this.d_rows); + this.$emit("page", pageEvent); + }, "onPage"), + resetPage: /* @__PURE__ */ __name(function resetPage2() { + this.d_first = 0; + this.$emit("update:first", this.d_first); + }, "resetPage"), + getFilterColumnHeaderClass: /* @__PURE__ */ __name(function getFilterColumnHeaderClass(column2) { + return [this.cx("headerCell", { + column: column2 + }), this.columnProp(column2, "filterHeaderClass")]; + }, "getFilterColumnHeaderClass"), + onColumnHeaderClick: /* @__PURE__ */ __name(function onColumnHeaderClick(e) { + var event2 = e.originalEvent; + var column2 = e.column; + if (this.columnProp(column2, "sortable")) { + var targetNode = event2.target; + var columnField = this.columnProp(column2, "sortField") || this.columnProp(column2, "field"); + if (getAttribute(targetNode, "data-p-sortable-column") === true || getAttribute(targetNode, "data-pc-section") === "columntitle" || getAttribute(targetNode, "data-pc-section") === "columnheadercontent" || getAttribute(targetNode, "data-pc-section") === "sorticon" || getAttribute(targetNode.parentElement, "data-pc-section") === "sorticon" || getAttribute(targetNode.parentElement.parentElement, "data-pc-section") === "sorticon" || targetNode.closest('[data-p-sortable-column="true"]')) { + clearSelection(); + if (this.sortMode === "single") { + if (this.d_sortField === columnField) { + if (this.removableSort && this.d_sortOrder * -1 === this.defaultSortOrder) { + this.d_sortOrder = null; + this.d_sortField = null; + } else { + this.d_sortOrder = this.d_sortOrder * -1; + } + } else { + this.d_sortOrder = this.defaultSortOrder; + this.d_sortField = columnField; + } + this.$emit("update:sortField", this.d_sortField); + this.$emit("update:sortOrder", this.d_sortOrder); + this.resetPage(); + } else if (this.sortMode === "multiple") { + var metaKey = event2.metaKey || event2.ctrlKey; + if (!metaKey) { + this.d_multiSortMeta = this.d_multiSortMeta.filter(function(meta) { + return meta.field === columnField; + }); + } + this.addMultiSortField(columnField); + this.$emit("update:multiSortMeta", this.d_multiSortMeta); + } + this.$emit("sort", this.createLazyLoadEvent(event2)); + } + } + }, "onColumnHeaderClick"), + addMultiSortField: /* @__PURE__ */ __name(function addMultiSortField(field) { + var index = this.d_multiSortMeta.findIndex(function(meta) { + return meta.field === field; + }); + if (index >= 0) { + if (this.removableSort && this.d_multiSortMeta[index].order * -1 === this.defaultSortOrder) this.d_multiSortMeta.splice(index, 1); + else this.d_multiSortMeta[index] = { + field, + order: this.d_multiSortMeta[index].order * -1 + }; + } else { + this.d_multiSortMeta.push({ + field, + order: this.defaultSortOrder + }); + } + this.d_multiSortMeta = _toConsumableArray(this.d_multiSortMeta); + }, "addMultiSortField"), + sortSingle: /* @__PURE__ */ __name(function sortSingle(nodes) { + return this.sortNodesSingle(nodes); + }, "sortSingle"), + sortNodesSingle: /* @__PURE__ */ __name(function sortNodesSingle(nodes) { + var _this = this; + var _nodes = _toConsumableArray(nodes); + var comparer = localeComparator(); + _nodes.sort(function(node1, node2) { + var value1 = resolveFieldData(node1.data, _this.d_sortField); + var value2 = resolveFieldData(node2.data, _this.d_sortField); + return sort(value1, value2, _this.d_sortOrder, comparer); + }); + return _nodes; + }, "sortNodesSingle"), + sortMultiple: /* @__PURE__ */ __name(function sortMultiple(nodes) { + return this.sortNodesMultiple(nodes); + }, "sortMultiple"), + sortNodesMultiple: /* @__PURE__ */ __name(function sortNodesMultiple(nodes) { + var _this2 = this; + var _nodes = _toConsumableArray(nodes); + _nodes.sort(function(node1, node2) { + return _this2.multisortField(node1, node2, 0); + }); + return _nodes; + }, "sortNodesMultiple"), + multisortField: /* @__PURE__ */ __name(function multisortField(node1, node2, index) { + var value1 = resolveFieldData(node1.data, this.d_multiSortMeta[index].field); + var value2 = resolveFieldData(node2.data, this.d_multiSortMeta[index].field); + var comparer = localeComparator(); + if (value1 === value2) { + return this.d_multiSortMeta.length - 1 > index ? this.multisortField(node1, node2, index + 1) : 0; + } + return sort(value1, value2, this.d_multiSortMeta[index].order, comparer); + }, "multisortField"), + filter: /* @__PURE__ */ __name(function filter(value2) { + var filteredNodes = []; + var strict = this.filterMode === "strict"; + var _iterator = _createForOfIteratorHelper(value2), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var node2 = _step.value; + var copyNode = _objectSpread$1({}, node2); + var localMatch = true; + var globalMatch = false; + for (var j = 0; j < this.columns.length; j++) { + var col = this.columns[j]; + var filterField = this.columnProp(col, "filterField") || this.columnProp(col, "field"); + if (Object.prototype.hasOwnProperty.call(this.filters, filterField)) { + var filterMatchMode = this.columnProp(col, "filterMatchMode") || "startsWith"; + var filterValue = this.filters[filterField]; + var filterConstraint = FilterService.filters[filterMatchMode]; + var paramsWithoutNode = { + filterField, + filterValue, + filterConstraint, + strict + }; + if (strict && !(this.findFilteredNodes(copyNode, paramsWithoutNode) || this.isFilterMatched(copyNode, paramsWithoutNode)) || !strict && !(this.isFilterMatched(copyNode, paramsWithoutNode) || this.findFilteredNodes(copyNode, paramsWithoutNode))) { + localMatch = false; + } + if (!localMatch) { + break; + } + } + if (this.hasGlobalFilter() && !globalMatch) { + var copyNodeForGlobal = _objectSpread$1({}, copyNode); + var _filterValue = this.filters["global"]; + var _filterConstraint = FilterService.filters["contains"]; + var globalFilterParamsWithoutNode = { + filterField, + filterValue: _filterValue, + filterConstraint: _filterConstraint, + strict + }; + if (strict && (this.findFilteredNodes(copyNodeForGlobal, globalFilterParamsWithoutNode) || this.isFilterMatched(copyNodeForGlobal, globalFilterParamsWithoutNode)) || !strict && (this.isFilterMatched(copyNodeForGlobal, globalFilterParamsWithoutNode) || this.findFilteredNodes(copyNodeForGlobal, globalFilterParamsWithoutNode))) { + globalMatch = true; + copyNode = copyNodeForGlobal; + } + } + } + var matches = localMatch; + if (this.hasGlobalFilter()) { + matches = localMatch && globalMatch; + } + if (matches) { + filteredNodes.push(copyNode); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var filterEvent = this.createLazyLoadEvent(event); + filterEvent.filteredValue = filteredNodes; + this.$emit("filter", filterEvent); + return filteredNodes; + }, "filter"), + findFilteredNodes: /* @__PURE__ */ __name(function findFilteredNodes(node2, paramsWithoutNode) { + if (node2) { + var matched = false; + if (node2.children) { + var childNodes = _toConsumableArray(node2.children); + node2.children = []; + var _iterator2 = _createForOfIteratorHelper(childNodes), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + var childNode = _step2.value; + var copyChildNode = _objectSpread$1({}, childNode); + if (this.isFilterMatched(copyChildNode, paramsWithoutNode)) { + matched = true; + node2.children.push(copyChildNode); + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + if (matched) { + return true; + } + } + }, "findFilteredNodes"), + isFilterMatched: /* @__PURE__ */ __name(function isFilterMatched(node2, _ref) { + var filterField = _ref.filterField, filterValue = _ref.filterValue, filterConstraint = _ref.filterConstraint, strict = _ref.strict; + var matched = false; + var dataFieldValue = resolveFieldData(node2.data, filterField); + if (filterConstraint(dataFieldValue, filterValue, this.filterLocale)) { + matched = true; + } + if (!matched || strict && !this.isNodeLeaf(node2)) { + matched = this.findFilteredNodes(node2, { + filterField, + filterValue, + filterConstraint, + strict + }) || matched; + } + return matched; + }, "isFilterMatched"), + isNodeSelected: /* @__PURE__ */ __name(function isNodeSelected(node2) { + return this.selectionMode && this.selectionKeys ? this.selectionKeys[this.nodeKey(node2)] === true : false; + }, "isNodeSelected"), + isNodeLeaf: /* @__PURE__ */ __name(function isNodeLeaf(node2) { + return node2.leaf === false ? false : !(node2.children && node2.children.length); + }, "isNodeLeaf"), + createLazyLoadEvent: /* @__PURE__ */ __name(function createLazyLoadEvent(event2) { + var _this3 = this; + var filterMatchModes; + if (this.hasFilters()) { + filterMatchModes = {}; + this.columns.forEach(function(col) { + if (_this3.columnProp(col, "field")) { + filterMatchModes[col.props.field] = _this3.columnProp(col, "filterMatchMode"); + } + }); + } + return { + originalEvent: event2, + first: this.d_first, + rows: this.d_rows, + sortField: this.d_sortField, + sortOrder: this.d_sortOrder, + multiSortMeta: this.d_multiSortMeta, + filters: this.filters, + filterMatchModes + }; + }, "createLazyLoadEvent"), + onColumnResizeStart: /* @__PURE__ */ __name(function onColumnResizeStart(event2) { + var containerLeft = getOffset(this.$el).left; + this.resizeColumnElement = event2.target.parentElement; + this.columnResizing = true; + this.lastResizeHelperX = event2.pageX - containerLeft + this.$el.scrollLeft; + this.bindColumnResizeEvents(); + }, "onColumnResizeStart"), + onColumnResize: /* @__PURE__ */ __name(function onColumnResize(event2) { + var containerLeft = getOffset(this.$el).left; + this.$el.setAttribute("data-p-unselectable-text", "true"); + !this.isUnstyled && addStyle(this.$el, { + "user-select": "none" + }); + this.$refs.resizeHelper.style.height = this.$el.offsetHeight + "px"; + this.$refs.resizeHelper.style.top = "0px"; + this.$refs.resizeHelper.style.left = event2.pageX - containerLeft + this.$el.scrollLeft + "px"; + this.$refs.resizeHelper.style.display = "block"; + }, "onColumnResize"), + onColumnResizeEnd: /* @__PURE__ */ __name(function onColumnResizeEnd() { + var delta = isRTL(this.$el) ? this.lastResizeHelperX - this.$refs.resizeHelper.offsetLeft : this.$refs.resizeHelper.offsetLeft - this.lastResizeHelperX; + var columnWidth = this.resizeColumnElement.offsetWidth; + var newColumnWidth = columnWidth + delta; + var minWidth = this.resizeColumnElement.style.minWidth || 15; + if (columnWidth + delta > parseInt(minWidth, 10)) { + if (this.columnResizeMode === "fit") { + var nextColumn = this.resizeColumnElement.nextElementSibling; + var nextColumnWidth = nextColumn.offsetWidth - delta; + if (newColumnWidth > 15 && nextColumnWidth > 15) { + this.resizeTableCells(newColumnWidth, nextColumnWidth); + } + } else if (this.columnResizeMode === "expand") { + var tableWidth = this.$refs.table.offsetWidth + delta + "px"; + var updateTableWidth = /* @__PURE__ */ __name(function updateTableWidth2(el) { + !!el && (el.style.width = el.style.minWidth = tableWidth); + }, "updateTableWidth"); + this.resizeTableCells(newColumnWidth); + updateTableWidth(this.$refs.table); + } + this.$emit("column-resize-end", { + element: this.resizeColumnElement, + delta + }); + } + this.$refs.resizeHelper.style.display = "none"; + this.resizeColumn = null; + this.$el.removeAttribute("data-p-unselectable-text"); + !this.isUnstyled && (this.$el.style["user-select"] = ""); + this.unbindColumnResizeEvents(); + }, "onColumnResizeEnd"), + resizeTableCells: /* @__PURE__ */ __name(function resizeTableCells(newColumnWidth, nextColumnWidth) { + var colIndex = getIndex(this.resizeColumnElement); + var widths = []; + var headers = find(this.$refs.table, 'thead[data-pc-section="thead"] > tr > th'); + headers.forEach(function(header2) { + return widths.push(getOuterWidth(header2)); + }); + this.destroyStyleElement(); + this.createStyleElement(); + var innerHTML = ""; + var selector = '[data-pc-name="treetable"]['.concat(this.$attrSelector, '] > [data-pc-section="tablecontainer"] > table[data-pc-section="table"]'); + widths.forEach(function(width, index) { + var colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width; + var style = "width: ".concat(colWidth, "px !important; max-width: ").concat(colWidth, "px !important"); + innerHTML += "\n ".concat(selector, ' > thead[data-pc-section="thead"] > tr > th:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tbody[data-pc-section="tbody"] > tr > td:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tfoot[data-pc-section="tfoot"] > tr > td:nth-child(').concat(index + 1, ") {\n ").concat(style, "\n }\n "); + }); + this.styleElement.innerHTML = innerHTML; + }, "resizeTableCells"), + bindColumnResizeEvents: /* @__PURE__ */ __name(function bindColumnResizeEvents() { + var _this4 = this; + if (!this.documentColumnResizeListener) { + this.documentColumnResizeListener = document.addEventListener("mousemove", function(event2) { + if (_this4.columnResizing) { + _this4.onColumnResize(event2); + } + }); + } + if (!this.documentColumnResizeEndListener) { + this.documentColumnResizeEndListener = document.addEventListener("mouseup", function() { + if (_this4.columnResizing) { + _this4.columnResizing = false; + _this4.onColumnResizeEnd(); + } + }); + } + }, "bindColumnResizeEvents"), + unbindColumnResizeEvents: /* @__PURE__ */ __name(function unbindColumnResizeEvents() { + if (this.documentColumnResizeListener) { + document.removeEventListener("document", this.documentColumnResizeListener); + this.documentColumnResizeListener = null; + } + if (this.documentColumnResizeEndListener) { + document.removeEventListener("document", this.documentColumnResizeEndListener); + this.documentColumnResizeEndListener = null; + } + }, "unbindColumnResizeEvents"), + onColumnKeyDown: /* @__PURE__ */ __name(function onColumnKeyDown(event2, col) { + if ((event2.code === "Enter" || event2.code === "NumpadEnter") && event2.currentTarget.nodeName === "TH" && getAttribute(event2.currentTarget, "data-p-sortable-column")) { + this.onColumnHeaderClick(event2, col); + } + }, "onColumnKeyDown"), + hasColumnFilter: /* @__PURE__ */ __name(function hasColumnFilter() { + if (this.columns) { + var _iterator3 = _createForOfIteratorHelper(this.columns), _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { + var col = _step3.value; + if (col.children && col.children.filter) { + return true; + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + return false; + }, "hasColumnFilter"), + hasFilters: /* @__PURE__ */ __name(function hasFilters() { + return this.filters && Object.keys(this.filters).length > 0 && this.filters.constructor === Object; + }, "hasFilters"), + hasGlobalFilter: /* @__PURE__ */ __name(function hasGlobalFilter() { + return this.filters && Object.prototype.hasOwnProperty.call(this.filters, "global"); + }, "hasGlobalFilter"), + getItemLabel: /* @__PURE__ */ __name(function getItemLabel6(node2) { + return node2.data.name; + }, "getItemLabel"), + createStyleElement: /* @__PURE__ */ __name(function createStyleElement() { + var _this$$primevue; + this.styleElement = document.createElement("style"); + this.styleElement.type = "text/css"; + setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); + document.head.appendChild(this.styleElement); + }, "createStyleElement"), + destroyStyleElement: /* @__PURE__ */ __name(function destroyStyleElement() { + if (this.styleElement) { + document.head.removeChild(this.styleElement); + this.styleElement = null; + } + }, "destroyStyleElement"), + setTabindex: /* @__PURE__ */ __name(function setTabindex(node2, index) { + if (this.isNodeSelected(node2)) { + this.hasASelectedNode = true; + return 0; + } + if (this.selectionMode) { + if (!this.isNodeSelected(node2) && index === 0 && !this.hasASelectedNode) return 0; + } else if (!this.selectionMode && index === 0) { + return 0; + } + return -1; + }, "setTabindex") + }, + computed: { + columns: /* @__PURE__ */ __name(function columns() { + return this.d_columns.get(this); + }, "columns"), + processedData: /* @__PURE__ */ __name(function processedData() { + if (this.lazy) { + return this.value; + } else { + if (this.value && this.value.length) { + var data41 = this.value; + if (this.sorted) { + if (this.sortMode === "single") data41 = this.sortSingle(data41); + else if (this.sortMode === "multiple") data41 = this.sortMultiple(data41); + } + if (this.hasFilters()) { + data41 = this.filter(data41); + } + return data41; + } else { + return null; + } + } + }, "processedData"), + dataToRender: /* @__PURE__ */ __name(function dataToRender() { + var data41 = this.processedData; + if (this.paginator) { + var first3 = this.lazy ? 0 : this.d_first; + return data41.slice(first3, first3 + this.d_rows); + } else { + return data41; + } + }, "dataToRender"), + empty: /* @__PURE__ */ __name(function empty2() { + var data41 = this.processedData; + return !data41 || data41.length === 0; + }, "empty"), + sorted: /* @__PURE__ */ __name(function sorted() { + return this.d_sortField || this.d_multiSortMeta && this.d_multiSortMeta.length > 0; + }, "sorted"), + hasFooter: /* @__PURE__ */ __name(function hasFooter() { + var hasFooter2 = false; + var _iterator4 = _createForOfIteratorHelper(this.columns), _step4; + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) { + var col = _step4.value; + if (this.columnProp(col, "footer") || col.children && col.children.footer) { + hasFooter2 = true; + break; + } + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + return hasFooter2; + }, "hasFooter"), + paginatorTop: /* @__PURE__ */ __name(function paginatorTop2() { + return this.paginator && (this.paginatorPosition !== "bottom" || this.paginatorPosition === "both"); + }, "paginatorTop"), + paginatorBottom: /* @__PURE__ */ __name(function paginatorBottom2() { + return this.paginator && (this.paginatorPosition !== "top" || this.paginatorPosition === "both"); + }, "paginatorBottom"), + singleSelectionMode: /* @__PURE__ */ __name(function singleSelectionMode() { + return this.selectionMode && this.selectionMode === "single"; + }, "singleSelectionMode"), + multipleSelectionMode: /* @__PURE__ */ __name(function multipleSelectionMode() { + return this.selectionMode && this.selectionMode === "multiple"; + }, "multipleSelectionMode"), + rowSelectionMode: /* @__PURE__ */ __name(function rowSelectionMode() { + return this.singleSelectionMode || this.multipleSelectionMode; + }, "rowSelectionMode"), + totalRecordsLength: /* @__PURE__ */ __name(function totalRecordsLength() { + if (this.lazy) { + return this.totalRecords; + } else { + var data41 = this.processedData; + return data41 ? data41.length : 0; + } + }, "totalRecordsLength") + }, + components: { + TTRow: script$1, + TTPaginator: script$1u, + TTHeaderCell: script$3, + TTFooterCell: script$4, + SpinnerIcon: script$1r + } +}; +function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); +} +__name(_typeof, "_typeof"); +function ownKeys(e, r) { + var t2 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t2.push.apply(t2, o); + } + return t2; +} +__name(ownKeys, "ownKeys"); +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t2 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t2), true).forEach(function(r2) { + _defineProperty(e, r2, t2[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t2, r2)); + }); + } + return e; +} +__name(_objectSpread, "_objectSpread"); +function _defineProperty(e, r, t2) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t2, enumerable: true, configurable: true, writable: true }) : e[r] = t2, e; +} +__name(_defineProperty, "_defineProperty"); +function _toPropertyKey(t2) { + var i = _toPrimitive(t2, "string"); + return "symbol" == _typeof(i) ? i : i + ""; +} +__name(_toPropertyKey, "_toPropertyKey"); +function _toPrimitive(t2, r) { + if ("object" != _typeof(t2) || !t2) return t2; + var e = t2[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t2, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t2); +} +__name(_toPrimitive, "_toPrimitive"); +var _hoisted_1$5 = ["colspan"]; +function render3(_ctx, _cache, $props, $setup, $data, $options) { + var _component_TTPaginator = resolveComponent("TTPaginator"); + var _component_TTHeaderCell = resolveComponent("TTHeaderCell"); + var _component_TTRow = resolveComponent("TTRow"); + var _component_TTFooterCell = resolveComponent("TTFooterCell"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + "data-scrollselectors": ".p-treetable-scrollable-body" + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default"), _ctx.loading && _ctx.loadingMode === "mask" ? (openBlock(), createElementBlock("div", mergeProps({ + key: 0, + "class": _ctx.cx("loading") + }, _ctx.ptm("loading")), [createBaseVNode("div", mergeProps({ + "class": _ctx.cx("mask") + }, _ctx.ptm("mask")), [renderSlot(_ctx.$slots, "loadingicon", { + "class": normalizeClass(_ctx.cx("loadingIcon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon ? "span" : "SpinnerIcon"), mergeProps({ + spin: "", + "class": [_ctx.cx("loadingIcon"), _ctx.loadingIcon] + }, _ctx.ptm("loadingIcon")), null, 16, ["class"]))]; + })], 16)], 16)) : createCommentVNode("", true), _ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": _ctx.cx("header") + }, _ctx.ptm("header")), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), $options.paginatorTop ? (openBlock(), createBlock(_component_TTPaginator, { + key: 2, + rows: $data.d_rows, + first: $data.d_first, + totalRecords: $options.totalRecordsLength, + pageLinkSize: _ctx.pageLinkSize, + template: _ctx.paginatorTemplate, + rowsPerPageOptions: _ctx.rowsPerPageOptions, + currentPageReportTemplate: _ctx.currentPageReportTemplate, + "class": normalizeClass(_ctx.cx("pcPaginator", { + position: "top" + })), + onPage: _cache[0] || (_cache[0] = function($event) { + return $options.onPage($event); + }), + alwaysShow: _ctx.alwaysShowPaginator, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcPaginator") + }, createSlots({ + _: 2 + }, [_ctx.$slots.paginatorcontainer ? { + name: "container", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorcontainer", { + first: slotProps.first, + last: slotProps.last, + rows: slotProps.rows, + page: slotProps.page, + pageCount: slotProps.pageCount, + totalRecords: slotProps.totalRecords, + firstPageCallback: slotProps.firstPageCallback, + lastPageCallback: slotProps.lastPageCallback, + prevPageCallback: slotProps.prevPageCallback, + nextPageCallback: slotProps.nextPageCallback, + rowChangeCallback: slotProps.rowChangeCallback + })]; + }), + key: "0" + } : void 0, _ctx.$slots.paginatorstart ? { + name: "start", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorstart")]; + }), + key: "1" + } : void 0, _ctx.$slots.paginatorend ? { + name: "end", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorend")]; + }), + key: "2" + } : void 0, _ctx.$slots.paginatorfirstpagelinkicon ? { + name: "firstpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorfirstpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "3" + } : void 0, _ctx.$slots.paginatorprevpagelinkicon ? { + name: "prevpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorprevpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "4" + } : void 0, _ctx.$slots.paginatornextpagelinkicon ? { + name: "nextpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatornextpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "5" + } : void 0, _ctx.$slots.paginatorlastpagelinkicon ? { + name: "lastpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorlastpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "6" + } : void 0, _ctx.$slots.paginatorjumptopagedropdownicon ? { + name: "jumptopagedropdownicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorjumptopagedropdownicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "7" + } : void 0, _ctx.$slots.paginatorrowsperpagedropdownicon ? { + name: "rowsperpagedropdownicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorrowsperpagedropdownicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "8" + } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("tableContainer"), + style: [_ctx.sx("tableContainer"), { + maxHeight: _ctx.scrollHeight + }] + }, _ctx.ptm("tableContainer")), [createBaseVNode("table", mergeProps({ + ref: "table", + role: "table", + "class": [_ctx.cx("table"), _ctx.tableClass], + style: _ctx.tableStyle + }, _objectSpread(_objectSpread({}, _ctx.tableProps), _ctx.ptm("table"))), [createBaseVNode("thead", mergeProps({ + "class": _ctx.cx("thead"), + style: _ctx.sx("thead"), + role: "rowgroup" + }, _ctx.ptm("thead")), [createBaseVNode("tr", mergeProps({ + role: "row" + }, _ctx.ptm("headerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.columns, function(col, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i + }, [!$options.columnProp(col, "hidden") ? (openBlock(), createBlock(_component_TTHeaderCell, { + key: 0, + column: col, + resizableColumns: _ctx.resizableColumns, + sortField: $data.d_sortField, + sortOrder: $data.d_sortOrder, + multiSortMeta: $data.d_multiSortMeta, + sortMode: _ctx.sortMode, + onColumnClick: _cache[1] || (_cache[1] = function($event) { + return $options.onColumnHeaderClick($event); + }), + onColumnResizestart: _cache[2] || (_cache[2] = function($event) { + return $options.onColumnResizeStart($event); + }), + index: i, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["column", "resizableColumns", "sortField", "sortOrder", "multiSortMeta", "sortMode", "index", "unstyled", "pt"])) : createCommentVNode("", true)], 64); + }), 128))], 16), $options.hasColumnFilter() ? (openBlock(), createElementBlock("tr", normalizeProps(mergeProps({ + key: 0 + }, _ctx.ptm("headerRow"))), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.columns, function(col, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i + }, [!$options.columnProp(col, "hidden") ? (openBlock(), createElementBlock("th", mergeProps({ + key: 0, + "class": $options.getFilterColumnHeaderClass(col), + style: [$options.columnProp(col, "style"), $options.columnProp(col, "filterHeaderStyle")], + ref_for: true + }, _ctx.ptm("headerCell", $options.ptHeaderCellOptions(col))), [col.children && col.children.filter ? (openBlock(), createBlock(resolveDynamicComponent(col.children.filter), { + key: 0, + column: col, + index: i + }, null, 8, ["column", "index"])) : createCommentVNode("", true)], 16)) : createCommentVNode("", true)], 64); + }), 128))], 16)) : createCommentVNode("", true)], 16), createBaseVNode("tbody", mergeProps({ + "class": _ctx.cx("tbody"), + role: "rowgroup" + }, _ctx.ptm("tbody")), [!$options.empty ? (openBlock(true), createElementBlock(Fragment, { + key: 0 + }, renderList($options.dataToRender, function(node2, index) { + return openBlock(), createBlock(_component_TTRow, { + key: $options.nodeKey(node2), + dataKey: _ctx.dataKey, + columns: $options.columns, + node: node2, + level: 0, + expandedKeys: $data.d_expandedKeys, + indentation: _ctx.indentation, + selectionMode: _ctx.selectionMode, + selectionKeys: _ctx.selectionKeys, + ariaSetSize: $options.dataToRender.length, + ariaPosInset: index + 1, + tabindex: $options.setTabindex(node2, index), + loadingMode: _ctx.loadingMode, + contextMenu: _ctx.contextMenu, + contextMenuSelection: _ctx.contextMenuSelection, + templates: _ctx.$slots, + onNodeToggle: $options.onNodeToggle, + onNodeClick: $options.onNodeClick, + onCheckboxChange: $options.onCheckboxChange, + onRowRightclick: _cache[3] || (_cache[3] = function($event) { + return $options.onRowRightClick($event); + }), + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["dataKey", "columns", "node", "expandedKeys", "indentation", "selectionMode", "selectionKeys", "ariaSetSize", "ariaPosInset", "tabindex", "loadingMode", "contextMenu", "contextMenuSelection", "templates", "onNodeToggle", "onNodeClick", "onCheckboxChange", "unstyled", "pt"]); + }), 128)) : (openBlock(), createElementBlock("tr", mergeProps({ + key: 1, + "class": _ctx.cx("emptyMessage") + }, _ctx.ptm("emptyMessage")), [createBaseVNode("td", mergeProps({ + colspan: $options.columns.length + }, _ctx.ptm("emptyMessageCell")), [renderSlot(_ctx.$slots, "empty")], 16, _hoisted_1$5)], 16))], 16), $options.hasFooter ? (openBlock(), createElementBlock("tfoot", mergeProps({ + key: 0, + "class": _ctx.cx("tfoot"), + style: _ctx.sx("tfoot"), + role: "rowgroup" + }, _ctx.ptm("tfoot")), [createBaseVNode("tr", mergeProps({ + role: "row" + }, _ctx.ptm("footerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.columns, function(col, i) { + return openBlock(), createElementBlock(Fragment, { + key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i + }, [!$options.columnProp(col, "hidden") ? (openBlock(), createBlock(_component_TTFooterCell, { + key: 0, + column: col, + index: i, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["column", "index", "unstyled", "pt"])) : createCommentVNode("", true)], 64); + }), 128))], 16)], 16)) : createCommentVNode("", true)], 16)], 16), $options.paginatorBottom ? (openBlock(), createBlock(_component_TTPaginator, { + key: 3, + rows: $data.d_rows, + first: $data.d_first, + totalRecords: $options.totalRecordsLength, + pageLinkSize: _ctx.pageLinkSize, + template: _ctx.paginatorTemplate, + rowsPerPageOptions: _ctx.rowsPerPageOptions, + currentPageReportTemplate: _ctx.currentPageReportTemplate, + "class": normalizeClass(_ctx.cx("pcPaginator", { + position: "bottom" + })), + onPage: _cache[4] || (_cache[4] = function($event) { + return $options.onPage($event); + }), + alwaysShow: _ctx.alwaysShowPaginator, + unstyled: _ctx.unstyled, + pt: _ctx.ptm("pcPaginator") + }, createSlots({ + _: 2 + }, [_ctx.$slots.paginatorcontainer ? { + name: "container", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorcontainer", { + first: slotProps.first, + last: slotProps.last, + rows: slotProps.rows, + page: slotProps.page, + pageCount: slotProps.pageCount, + totalRecords: slotProps.totalRecords, + firstPageCallback: slotProps.firstPageCallback, + lastPageCallback: slotProps.lastPageCallback, + prevPageCallback: slotProps.prevPageCallback, + nextPageCallback: slotProps.nextPageCallback, + rowChangeCallback: slotProps.rowChangeCallback + })]; + }), + key: "0" + } : void 0, _ctx.$slots.paginatorstart ? { + name: "start", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorstart")]; + }), + key: "1" + } : void 0, _ctx.$slots.paginatorend ? { + name: "end", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorend")]; + }), + key: "2" + } : void 0, _ctx.$slots.paginatorfirstpagelinkicon ? { + name: "firstpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorfirstpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "3" + } : void 0, _ctx.$slots.paginatorprevpagelinkicon ? { + name: "prevpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorprevpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "4" + } : void 0, _ctx.$slots.paginatornextpagelinkicon ? { + name: "nextpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatornextpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "5" + } : void 0, _ctx.$slots.paginatorlastpagelinkicon ? { + name: "lastpagelinkicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorlastpagelinkicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "6" + } : void 0, _ctx.$slots.paginatorjumptopagedropdownicon ? { + name: "jumptopagedropdownicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorjumptopagedropdownicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "7" + } : void 0, _ctx.$slots.paginatorrowsperpagedropdownicon ? { + name: "rowsperpagedropdownicon", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorrowsperpagedropdownicon", { + "class": normalizeClass(slotProps["class"]) + })]; + }), + key: "8" + } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({ + key: 4, + "class": _ctx.cx("footer") + }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + ref: "resizeHelper", + "class": _ctx.cx("columnResizeIndicator"), + style: { + "display": "none" + } + }, _ctx.ptm("columnResizeIndicator")), null, 16)], 16); +} +__name(render3, "render"); +script.render = render3; +const electron = electronAPI(); +const openUrl = /* @__PURE__ */ __name((url) => { + window.open(url, "_blank"); + return true; +}, "openUrl"); +const DESKTOP_MAINTENANCE_TASKS = [ + { + id: "basePath", + execute: /* @__PURE__ */ __name(async () => await electron.setBasePath(), "execute"), + name: "Base path", + shortDescription: "Change the application base path.", + errorDescription: "Unable to open the base path. Please select a new one.", + description: "The base path is the default location where ComfyUI stores data. It is the location fo the python environment, and may also contain models, custom nodes, and other extensions.", + isInstallationFix: true, + button: { + icon: PrimeIcons.QUESTION, + text: "Select" + } + }, + { + id: "git", + headerImg: "/assets/images/Git-Logo-White.svg", + execute: /* @__PURE__ */ __name(() => openUrl("https://git-scm.com/downloads/"), "execute"), + name: "Download git", + shortDescription: "Open the git download page.", + errorDescription: "Git is missing. Please download and install git, then restart ComfyUI Desktop.", + description: "Git is required to download and manage custom nodes and other extensions. This task opens the download page in your default browser, where you can download the latest version of git. Once you have installed git, please restart ComfyUI Desktop.", + button: { + icon: PrimeIcons.EXTERNAL_LINK, + text: "Download" + } + }, + { + id: "vcRedist", + execute: /* @__PURE__ */ __name(() => openUrl("https://aka.ms/vs/17/release/vc_redist.x64.exe"), "execute"), + name: "Download VC++ Redist", + shortDescription: "Download the latest VC++ Redistributable runtime.", + description: "The Visual C++ runtime libraries are required to run ComfyUI. You will need to download and install this file.", + button: { + icon: PrimeIcons.EXTERNAL_LINK, + text: "Download" + } + }, + { + id: "reinstall", + severity: "danger", + requireConfirm: true, + execute: /* @__PURE__ */ __name(async () => { + await electron.reinstall(); + return true; + }, "execute"), + name: "Reinstall ComfyUI", + shortDescription: "Deletes the desktop app config and load the welcome screen.", + description: "Delete the desktop app config, restart the app, and load the installation screen.", + confirmText: "Delete all saved config and reinstall?", + button: { + icon: PrimeIcons.EXCLAMATION_TRIANGLE, + text: "Reinstall" + } + }, + { + id: "pythonPackages", + requireConfirm: true, + execute: /* @__PURE__ */ __name(async () => { + try { + await electron.uv.installRequirements(); + return true; + } catch (error) { + return false; + } + }, "execute"), + name: "Install python packages", + shortDescription: "Installs the base python packages required to run ComfyUI.", + errorDescription: "Python packages that are required to run ComfyUI are not installed.", + description: "This will install the python packages required to run ComfyUI. This includes torch, torchvision, and other dependencies.", + usesTerminal: true, + isInstallationFix: true, + button: { + icon: PrimeIcons.DOWNLOAD, + text: "Install" + } + }, + { + id: "uv", + execute: /* @__PURE__ */ __name(() => openUrl("https://docs.astral.sh/uv/getting-started/installation/"), "execute"), + name: "uv executable", + shortDescription: "uv installs and maintains the python environment.", + description: "This will open the download page for Astral's uv tool. uv is used to install python and manage python packages.", + button: { + icon: "pi pi-asterisk", + text: "Download" + } + }, + { + id: "uvCache", + severity: "danger", + requireConfirm: true, + execute: /* @__PURE__ */ __name(async () => await electron.uv.clearCache(), "execute"), + name: "uv cache", + shortDescription: "Remove the Astral uv cache of python packages.", + description: "This will remove the uv cache directory and its contents. All downloaded python packages will need to be downloaded again.", + confirmText: "Delete uv cache of python packages?", + isInstallationFix: true, + button: { + icon: PrimeIcons.TRASH, + text: "Clear cache" + } + }, + { + id: "venvDirectory", + severity: "danger", + requireConfirm: true, + execute: /* @__PURE__ */ __name(async () => await electron.uv.resetVenv(), "execute"), + name: "Reset virtual environment", + shortDescription: "Remove and recreate the .venv directory. This removes all python packages.", + description: "The python environment is where ComfyUI installs python and python packages. It is used to run the ComfyUI server.", + confirmText: "Delete the .venv directory?", + usesTerminal: true, + isInstallationFix: true, + button: { + icon: PrimeIcons.FOLDER, + text: "Recreate" + } + } +]; +class MaintenanceTaskRunner { + static { + __name(this, "MaintenanceTaskRunner"); + } + constructor(task) { + this.task = task; + } + _state; + /** The current state of the task. Setter also controls {@link resolved} as a side-effect. */ + get state() { + return this._state; + } + /** Updates the task state and {@link resolved} status. */ + setState(value2) { + if (this._state === "error" && value2 === "OK") this.resolved = true; + if (value2 === "error") this.resolved &&= false; + this._state = value2; + } + /** `true` if the task has been resolved (was `error`, now `OK`). This is a side-effect of the {@link state} setter. */ + resolved; + /** Whether the task state is currently being refreshed. */ + refreshing; + /** Whether the task is currently running. */ + executing; + /** The error message that occurred when the task failed. */ + error; + update(update) { + const state = update[this.task.id]; + this.refreshing = state === void 0; + if (state) this.setState(state); + } + finaliseUpdate(update) { + this.refreshing = false; + this.setState(update[this.task.id] ?? "skipped"); + } + /** Wraps the execution of a maintenance task, updating state and rethrowing errors. */ + async execute(task) { + try { + this.executing = true; + const success = await task.execute(); + if (!success) return false; + this.error = void 0; + return true; + } catch (error) { + this.error = error?.message; + throw error; + } finally { + this.executing = false; + } + } +} +const useMaintenanceTaskStore = defineStore("maintenanceTask", () => { + const electron2 = electronAPI(); + const isRefreshing = ref(false); + const isRunningTerminalCommand = computed( + () => tasks.value.filter((task) => task.usesTerminal).some((task) => getRunner(task)?.executing) + ); + const isRunningInstallationFix = computed( + () => tasks.value.filter((task) => task.isInstallationFix).some((task) => getRunner(task)?.executing) + ); + const tasks = ref(DESKTOP_MAINTENANCE_TASKS); + const taskStates = ref( + new Map( + DESKTOP_MAINTENANCE_TASKS.map((x) => [x.id, new MaintenanceTaskRunner(x)]) + ) + ); + const anyErrors = computed( + () => tasks.value.some((task) => getRunner(task).state === "error") + ); + const getRunner = /* @__PURE__ */ __name((task) => taskStates.value.get(task.id), "getRunner"); + const processUpdate = /* @__PURE__ */ __name((validationUpdate) => { + const update = validationUpdate; + isRefreshing.value = true; + for (const task of tasks.value) { + getRunner(task).update(update); + } + if (!update.inProgress && isRefreshing.value) { + isRefreshing.value = false; + for (const task of tasks.value) { + getRunner(task).finaliseUpdate(update); + } + } + }, "processUpdate"); + const clearResolved = /* @__PURE__ */ __name(() => { + for (const task of tasks.value) { + getRunner(task).resolved &&= false; + } + }, "clearResolved"); + const refreshDesktopTasks = /* @__PURE__ */ __name(async () => { + isRefreshing.value = true; + console.log("Refreshing desktop tasks"); + await electron2.Validation.validateInstallation(processUpdate); + }, "refreshDesktopTasks"); + const execute = /* @__PURE__ */ __name(async (task) => { + return getRunner(task).execute(task); + }, "execute"); + return { + tasks, + isRefreshing, + isRunningTerminalCommand, + isRunningInstallationFix, + execute, + getRunner, + processUpdate, + clearResolved, + /** True if any tasks are in an error state. */ + anyErrors, + refreshDesktopTasks + }; +}); +function useMinLoadingDurationRef(value2, minDuration = 250) { + const current = ref(value2.value); + const { ready, start } = useTimeout(minDuration, { + controls: true, + immediate: false + }); + watch(value2, (newValue) => { + if (newValue && !current.value) start(); + current.value = newValue; + }); + return computed(() => current.value || !ready.value); +} +__name(useMinLoadingDurationRef, "useMinLoadingDurationRef"); +const _hoisted_1$3 = { + key: 0, + class: "pi pi-exclamation-triangle text-red-500 absolute m-2 top-0 -right-14 opacity-15", + style: { "font-size": "10rem" } +}; +const _hoisted_2$3 = ["src"]; +const _hoisted_3$3 = { class: "flex gap-4 mt-1" }; +const _hoisted_4$3 = { + key: 0, + class: "task-card-ok pi pi-check" +}; +const _sfc_main$4 = /* @__PURE__ */ defineComponent({ + __name: "TaskCard", + props: { + task: {} + }, + emits: ["execute"], + setup(__props) { + const taskStore = useMaintenanceTaskStore(); + const runner = computed(() => taskStore.getRunner(props.task)); + const props = __props; + const description = computed( + () => runner.value.state === "error" ? props.task.errorDescription ?? props.task.shortDescription : props.task.shortDescription + ); + const reactiveLoading = computed(() => runner.value.refreshing); + const reactiveExecuting = computed(() => runner.value.executing); + const isLoading = useMinLoadingDurationRef(reactiveLoading, 250); + const isExecuting = useMinLoadingDurationRef(reactiveExecuting, 250); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", { + class: normalizeClass(["task-div max-w-48 min-h-52 grid relative", { "opacity-75": unref(isLoading) }]) + }, [ + createVNode(unref(script$1Y), mergeProps({ + class: ["max-w-48 relative h-full overflow-hidden", { "opacity-65": runner.value.state !== "error" }] + }, (({ onClick: onClick11, ...rest }) => rest)(_ctx.$attrs)), { + header: withCtx(() => [ + runner.value.state === "error" ? (openBlock(), createElementBlock("i", _hoisted_1$3)) : createCommentVNode("", true), + _ctx.task.headerImg ? (openBlock(), createElementBlock("img", { + key: 1, + src: _ctx.task.headerImg, + class: "object-contain w-full h-full opacity-25 pt-4 px-4" + }, null, 8, _hoisted_2$3)) : createCommentVNode("", true) + ]), + title: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.task.name), 1) + ]), + content: withCtx(() => [ + createTextVNode(toDisplayString(description.value), 1) + ]), + footer: withCtx(() => [ + createBaseVNode("div", _hoisted_3$3, [ + createVNode(unref(script$1e), { + icon: _ctx.task.button?.icon, + label: _ctx.task.button?.text, + class: "w-full", + raised: "", + "icon-pos": "right", + onClick: _cache[0] || (_cache[0] = (event2) => _ctx.$emit("execute", event2)), + loading: unref(isExecuting) + }, null, 8, ["icon", "label", "loading"]) + ]) + ]), + _: 1 + }, 16, ["class"]), + !unref(isLoading) && runner.value.state === "OK" ? (openBlock(), createElementBlock("i", _hoisted_4$3)) : createCommentVNode("", true) + ], 2); + }; + } +}); +const TaskCard = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c3bd7658"]]); +const _sfc_main$3 = /* @__PURE__ */ defineComponent({ + __name: "TaskListStatusIcon", + props: { + state: {}, + loading: {} + }, + setup(__props) { + const tooltip = computed(() => { + if (props.state === "error") { + return t("g.error"); + } else if (props.state === "OK") { + return t("maintenance.OK"); + } else { + return t("maintenance.Skipped"); + } + }); + const cssClasses = computed(() => { + let classes2; + if (props.state === "error") { + classes2 = `${PrimeIcons.EXCLAMATION_TRIANGLE} text-red-500`; + } else if (props.state === "OK") { + classes2 = `${PrimeIcons.CHECK} text-green-500`; + } else { + classes2 = PrimeIcons.MINUS; + } + return `text-3xl pi ${classes2}`; + }); + const props = __props; + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return !_ctx.state || _ctx.loading ? (openBlock(), createBlock(unref(script$1h), { + key: 0, + class: "h-8 w-8" + })) : withDirectives((openBlock(), createElementBlock("i", { + key: 1, + class: normalizeClass(cssClasses.value) + }, null, 2)), [ + [ + _directive_tooltip, + { value: tooltip.value, showDelay: 250 }, + void 0, + { top: true } + ] + ]); + }; + } +}); +const _hoisted_1$2 = { class: "text-center w-16" }; +const _hoisted_2$2 = { class: "inline-block" }; +const _hoisted_3$2 = { class: "whitespace-pre-line" }; +const _hoisted_4$2 = { class: "text-right px-4" }; +const _sfc_main$2 = /* @__PURE__ */ defineComponent({ + __name: "TaskListItem", + props: { + task: {} + }, + emits: ["execute"], + setup(__props) { + const taskStore = useMaintenanceTaskStore(); + const runner = computed(() => taskStore.getRunner(props.task)); + const props = __props; + const severity = computed( + () => runner.value.state === "error" || runner.value.state === "warning" ? "primary" : "secondary" + ); + const reactiveLoading = computed(() => runner.value.refreshing); + const reactiveExecuting = computed(() => runner.value.executing); + const isLoading = useMinLoadingDurationRef(reactiveLoading, 250); + const isExecuting = useMinLoadingDurationRef(reactiveExecuting, 250); + const infoPopover = ref(); + const toggle6 = /* @__PURE__ */ __name((event2) => { + infoPopover.value.toggle(event2); + }, "toggle"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("tr", { + class: normalizeClass(["border-neutral-700 border-solid border-y", { + "opacity-50": runner.value.resolved, + "opacity-75": unref(isLoading) && runner.value.resolved + }]) + }, [ + createBaseVNode("td", _hoisted_1$2, [ + createVNode(_sfc_main$3, { + state: runner.value.state, + loading: unref(isLoading) + }, null, 8, ["state", "loading"]) + ]), + createBaseVNode("td", null, [ + createBaseVNode("p", _hoisted_2$2, toDisplayString(_ctx.task.name), 1), + createVNode(unref(script$1e), { + class: "inline-block mx-2", + type: "button", + icon: unref(PrimeIcons).INFO_CIRCLE, + severity: "secondary", + text: true, + onClick: toggle6 + }, null, 8, ["icon"]), + createVNode(unref(script$1Q), { + ref_key: "infoPopover", + ref: infoPopover, + class: "block m-1 max-w-64 min-w-32" + }, { + default: withCtx(() => [ + createBaseVNode("span", _hoisted_3$2, toDisplayString(_ctx.task.description), 1) + ]), + _: 1 + }, 512) + ]), + createBaseVNode("td", _hoisted_4$2, [ + createVNode(unref(script$1e), { + icon: _ctx.task.button?.icon, + label: _ctx.task.button?.text, + severity: severity.value, + "icon-pos": "right", + onClick: _cache[0] || (_cache[0] = (event2) => _ctx.$emit("execute", event2)), + loading: unref(isExecuting) + }, null, 8, ["icon", "label", "severity", "loading"]) + ]) + ], 2); + }; + } +}); +const _hoisted_1$1 = { class: "my-4" }; +const _hoisted_2$1 = { class: "text-neutral-400 w-full text-center" }; +const _hoisted_3$1 = { + key: 0, + class: "w-full border-collapse border-hidden" +}; +const _hoisted_4$1 = { + key: 1, + class: "flex flex-wrap justify-evenly gap-8 pad-y my-4" +}; +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "TaskListPanel", + props: { + displayAsList: {}, + filter: {}, + isRefreshing: { type: Boolean } + }, + setup(__props) { + const toast = useToast(); + const confirm = useConfirm(); + const taskStore = useMaintenanceTaskStore(); + const props = __props; + const executeTask = /* @__PURE__ */ __name(async (task) => { + let message; + try { + if (await taskStore.execute(task) === true) return; + message = t("maintenance.error.taskFailed"); + } catch (error) { + message = error?.message; + } + toast.add({ + severity: "error", + summary: t("maintenance.error.toastTitle"), + detail: message ?? t("maintenance.error.defaultDescription"), + life: 1e4 + }); + }, "executeTask"); + const confirmButton = /* @__PURE__ */ __name(async (event2, task) => { + if (!task.requireConfirm) { + await executeTask(task); + return; + } + confirm.require({ + target: event2.currentTarget, + message: task.confirmText ?? t("maintenance.confirmTitle"), + icon: "pi pi-exclamation-circle", + rejectProps: { + label: t("g.cancel"), + severity: "secondary", + outlined: true + }, + acceptProps: { + label: task.button?.text ?? t("g.save"), + severity: task.severity ?? "primary" + }, + // TODO: Not awaited. + accept: /* @__PURE__ */ __name(async () => { + await executeTask(task); + }, "accept") + }); + }, "confirmButton"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("section", _hoisted_1$1, [ + _ctx.filter.tasks.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ + createVNode(unref(script$1Z)), + createBaseVNode("p", _hoisted_2$1, toDisplayString(_ctx.$t("maintenance.allOk")), 1) + ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ + _ctx.displayAsList === unref(PrimeIcons).LIST ? (openBlock(), createElementBlock("table", _hoisted_3$1, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filter.tasks, (task) => { + return openBlock(), createBlock(_sfc_main$2, { + key: task.id, + task, + onExecute: /* @__PURE__ */ __name((event2) => confirmButton(event2, task), "onExecute") + }, null, 8, ["task", "onExecute"]); + }), 128)) + ])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filter.tasks, (task) => { + return openBlock(), createBlock(TaskCard, { + key: task.id, + task, + onExecute: /* @__PURE__ */ __name((event2) => confirmButton(event2, task), "onExecute") + }, null, 8, ["task", "onExecute"]); + }), 128)) + ])) + ], 64)), + createVNode(unref(script$1_)) + ]); + }; + } +}); +const _hoisted_1 = { class: "min-w-full min-h-full font-sans w-screen h-screen grid justify-around text-neutral-300 bg-neutral-900 dark-theme pointer-events-auto overflow-y-auto" }; +const _hoisted_2 = { class: "max-w-screen-sm w-screen m-8 relative" }; +const _hoisted_3 = { class: "w-full flex flex-wrap gap-4 items-center" }; +const _hoisted_4 = { class: "grow" }; +const _hoisted_5 = { class: "flex gap-4 items-center" }; +const _hoisted_6 = { class: "max-sm:hidden" }; +const _hoisted_7 = { class: "flex justify-between gap-4 flex-row" }; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "MaintenanceView", + setup(__props) { + const electron2 = electronAPI(); + const toast = useToast(); + const taskStore = useMaintenanceTaskStore(); + const { clearResolved, processUpdate, refreshDesktopTasks } = taskStore; + const terminalVisible = ref(false); + const reactiveIsRefreshing = computed(() => taskStore.isRefreshing); + const isRefreshing = useMinLoadingDurationRef(reactiveIsRefreshing, 250); + const anyErrors = computed(() => taskStore.anyErrors); + const displayAsList = ref(PrimeIcons.TH_LARGE); + const errorFilter = computed( + () => taskStore.tasks.filter((x) => { + const { state, resolved } = taskStore.getRunner(x); + return state === "error" || resolved; + }) + ); + const filterOptions = ref([ + { icon: PrimeIcons.FILTER_FILL, value: "All", tasks: taskStore.tasks }, + { icon: PrimeIcons.EXCLAMATION_TRIANGLE, value: "Errors", tasks: errorFilter } + ]); + const filter2 = ref(filterOptions.value[1]); + const completeValidation = /* @__PURE__ */ __name(async (alertOnFail = true) => { + const isValid = await electron2.Validation.complete(); + if (alertOnFail && !isValid) { + toast.add({ + severity: "error", + summary: "Error", + detail: "Unable to continue - errors remain", + life: 5e3 + }); + } + }, "completeValidation"); + const terminalCreated = /* @__PURE__ */ __name(({ terminal, useAutoSize }, root35) => { + useAutoSize({ root: root35, autoRows: true, autoCols: true }); + electron2.onLogMessage((message) => { + terminal.write(message); + }); + terminal.options.cursorBlink = false; + terminal.options.cursorStyle = "bar"; + terminal.options.cursorInactiveStyle = "bar"; + terminal.options.disableStdin = true; + }, "terminalCreated"); + const toggleConsoleDrawer = /* @__PURE__ */ __name(() => { + terminalVisible.value = !terminalVisible.value; + }, "toggleConsoleDrawer"); + watch( + () => taskStore.isRunningTerminalCommand, + (value2) => { + terminalVisible.value = value2; + } + ); + watch( + () => taskStore.isRunningInstallationFix, + (value2, oldValue) => { + if (!value2 && oldValue) completeValidation(false); + } + ); + onMounted(async () => { + electron2.Validation.onUpdate(processUpdate); + const update = await electron2.Validation.getStatus(); + processUpdate(update); + }); + onUnmounted(() => electron2.Validation.dispose()); + return (_ctx, _cache) => { + return openBlock(), createBlock(_sfc_main$7, { dark: "" }, { + default: withCtx(() => [ + createBaseVNode("div", _hoisted_1, [ + createBaseVNode("div", _hoisted_2, [ + _cache[6] || (_cache[6] = createBaseVNode("h1", { class: "backspan pi-wrench text-4xl font-bold" }, "Maintenance", -1)), + createBaseVNode("div", _hoisted_3, [ + createBaseVNode("span", _hoisted_4, [ + _cache[5] || (_cache[5] = createTextVNode(" Status: ")), + createVNode(_sfc_main$5, { + refreshing: unref(isRefreshing), + error: anyErrors.value + }, null, 8, ["refreshing", "error"]) + ]), + createBaseVNode("div", _hoisted_5, [ + createVNode(unref(script$1$), { + modelValue: displayAsList.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => displayAsList.value = $event), + options: [unref(PrimeIcons).LIST, unref(PrimeIcons).TH_LARGE], + "allow-empty": false + }, { + option: withCtx((opts) => [ + createBaseVNode("i", { + class: normalizeClass(opts.option) + }, null, 2) + ]), + _: 1 + }, 8, ["modelValue", "options"]), + createVNode(unref(script$1$), { + modelValue: filter2.value, + "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter2.value = $event), + options: filterOptions.value, + "allow-empty": false, + optionLabel: "value", + dataKey: "value", + "area-labelledby": "custom", + onChange: unref(clearResolved) + }, { + option: withCtx((opts) => [ + createBaseVNode("i", { + class: normalizeClass(opts.option.icon) + }, null, 2), + createBaseVNode("span", _hoisted_6, toDisplayString(opts.option.value), 1) + ]), + _: 1 + }, 8, ["modelValue", "options", "onChange"]), + createVNode(_sfc_main$6, { + modelValue: unref(isRefreshing), + "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(isRefreshing) ? isRefreshing.value = $event : null), + severity: "secondary", + onRefresh: unref(refreshDesktopTasks) + }, null, 8, ["modelValue", "onRefresh"]) + ]) + ]), + createVNode(_sfc_main$1, { + class: "border-neutral-700 border-solid border-x-0 border-y", + filter: filter2.value, + displayAsList: displayAsList.value, + isRefreshing: unref(isRefreshing) + }, null, 8, ["filter", "displayAsList", "isRefreshing"]), + createBaseVNode("div", _hoisted_7, [ + createVNode(unref(script$1e), { + label: "Console Logs", + icon: "pi pi-desktop", + "icon-pos": "left", + severity: "secondary", + onClick: toggleConsoleDrawer + }), + createVNode(unref(script$1e), { + label: "Continue", + icon: "pi pi-arrow-right", + "icon-pos": "left", + severity: anyErrors.value ? "secondary" : "primary", + onClick: _cache[3] || (_cache[3] = () => completeValidation()), + loading: unref(isRefreshing) + }, null, 8, ["severity", "loading"]) + ]) + ]), + createVNode(unref(script$1c), { + visible: terminalVisible.value, + "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => terminalVisible.value = $event), + header: "Terminal", + position: "bottom", + style: { "height": "max(50vh, 34rem)" } + }, { + default: withCtx(() => [ + createVNode(BaseTerminal, { onCreated: terminalCreated }) + ]), + _: 1 + }, 8, ["visible"]), + createVNode(unref(script$20)) + ]) + ]), + _: 1 + }); + }; + } +}); +const MaintenanceView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-74b78f7d"]]); +export { + MaintenanceView as default +}; +//# sourceMappingURL=MaintenanceView-D3drnrFc.js.map diff --git a/web/assets/ManualConfigurationView-enyqGo0M.js b/web/assets/ManualConfigurationView-CtZMj_n_.js similarity index 85% rename from web/assets/ManualConfigurationView-enyqGo0M.js rename to web/assets/ManualConfigurationView-CtZMj_n_.js index 43131f52..59a79f8f 100644 --- a/web/assets/ManualConfigurationView-enyqGo0M.js +++ b/web/assets/ManualConfigurationView-CtZMj_n_.js @@ -1,8 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, a3 as useI18n, ad as ref, t as onMounted, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, aK as script, bN as script$1, l as script$2, p as pushScopeId, q as popScopeId, bV as electronAPI, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-dc169863"), n = n(), popScopeId(), n), "_withScopeId"); +import { d as defineComponent, K as useI18n, U as ref, p as onMounted, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, k as createVNode, j as unref, a4 as script, a$ as script$1, l as script$2, b5 as electronAPI, _ as _export_sfc } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _hoisted_1 = { class: "comfy-installer grow flex flex-col gap-4 text-neutral-300 max-w-110" }; const _hoisted_2 = { class: "text-2xl font-semibold text-neutral-100" }; const _hoisted_3 = { class: "m-1 text-neutral-300" }; @@ -72,4 +71,4 @@ const ManualConfigurationView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scop export { ManualConfigurationView as default }; -//# sourceMappingURL=ManualConfigurationView-enyqGo0M.js.map +//# sourceMappingURL=ManualConfigurationView-CtZMj_n_.js.map diff --git a/web/assets/MetricsConsentView-lSfLu4nr.js b/web/assets/MetricsConsentView-Df03LOI_.js similarity index 87% rename from web/assets/MetricsConsentView-lSfLu4nr.js rename to web/assets/MetricsConsentView-Df03LOI_.js index a53fdbb9..db07875e 100644 --- a/web/assets/MetricsConsentView-lSfLu4nr.js +++ b/web/assets/MetricsConsentView-Df03LOI_.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -import { d as defineComponent, bz as useToast, a3 as useI18n, ad as ref, c2 as useRouter, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, aG as createTextVNode, k as createVNode, j as unref, cc as script, l as script$1, bV as electronAPI } from "./index-QvfM__ze.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; +import { d as defineComponent, aR as useToast, K as useI18n, U as ref, be as useRouter, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, a7 as createTextVNode, k as createVNode, j as unref, bn as script, l as script$1, b5 as electronAPI } from "./index-CmVtQCAR.js"; const _hoisted_1 = { class: "h-full p-8 2xl:p-16 flex flex-col items-center justify-center" }; const _hoisted_2 = { class: "bg-neutral-800 rounded-lg shadow-lg p-6 w-full max-w-[600px] flex flex-col gap-6" }; const _hoisted_3 = { class: "text-3xl font-semibold text-neutral-100" }; @@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ createBaseVNode("p", _hoisted_5, [ createTextVNode(toDisplayString(_ctx.$t("install.moreInfo")) + " ", 1), createBaseVNode("a", _hoisted_6, toDisplayString(_ctx.$t("install.privacyPolicy")), 1), - createTextVNode(". ") + _cache[1] || (_cache[1] = createTextVNode(". ")) ]), createBaseVNode("div", _hoisted_7, [ createVNode(unref(script), { @@ -83,4 +83,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=MetricsConsentView-lSfLu4nr.js.map +//# sourceMappingURL=MetricsConsentView-Df03LOI_.js.map diff --git a/web/assets/NotSupportedView-Vc8_xWgH.js b/web/assets/NotSupportedView-BRtvC5Gx.js similarity index 64% rename from web/assets/NotSupportedView-Vc8_xWgH.js rename to web/assets/NotSupportedView-BRtvC5Gx.js index ebc712a4..20fd1a28 100644 --- a/web/assets/NotSupportedView-Vc8_xWgH.js +++ b/web/assets/NotSupportedView-BRtvC5Gx.js @@ -1,22 +1,16 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, c2 as useRouter, r as resolveDirective, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, l as script, i as withDirectives, p as pushScopeId, q as popScopeId, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; +import { d as defineComponent, be as useRouter, r as resolveDirective, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, k as createVNode, j as unref, l as script, i as withDirectives, _ as _export_sfc } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _imports_0 = "" + new URL("images/sad_girl.png", import.meta.url).href; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-ebb20958"), n = n(), popScopeId(), n), "_withScopeId"); const _hoisted_1 = { class: "sad-container" }; -const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("img", { - class: "sad-girl", - src: _imports_0, - alt: "Sad girl illustration" -}, null, -1)); -const _hoisted_3 = { class: "no-drag sad-text flex items-center" }; -const _hoisted_4 = { class: "flex flex-col gap-8 p-8 min-w-110" }; -const _hoisted_5 = { class: "text-4xl font-bold text-red-500" }; -const _hoisted_6 = { class: "space-y-4" }; -const _hoisted_7 = { class: "text-xl" }; -const _hoisted_8 = { class: "list-disc list-inside space-y-1 text-neutral-800" }; -const _hoisted_9 = { class: "flex gap-4" }; +const _hoisted_2 = { class: "no-drag sad-text flex items-center" }; +const _hoisted_3 = { class: "flex flex-col gap-8 p-8 min-w-110" }; +const _hoisted_4 = { class: "text-4xl font-bold text-red-500" }; +const _hoisted_5 = { class: "space-y-4" }; +const _hoisted_6 = { class: "text-xl" }; +const _hoisted_7 = { class: "list-disc list-inside space-y-1 text-neutral-800" }; +const _hoisted_8 = { class: "flex gap-4" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "NotSupportedView", setup(__props) { @@ -38,18 +32,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ return openBlock(), createBlock(_sfc_main$1, null, { default: withCtx(() => [ createBaseVNode("div", _hoisted_1, [ - _hoisted_2, - createBaseVNode("div", _hoisted_3, [ - createBaseVNode("div", _hoisted_4, [ - createBaseVNode("h1", _hoisted_5, toDisplayString(_ctx.$t("notSupported.title")), 1), - createBaseVNode("div", _hoisted_6, [ - createBaseVNode("p", _hoisted_7, toDisplayString(_ctx.$t("notSupported.message")), 1), - createBaseVNode("ul", _hoisted_8, [ + _cache[0] || (_cache[0] = createBaseVNode("img", { + class: "sad-girl", + src: _imports_0, + alt: "Sad girl illustration" + }, null, -1)), + createBaseVNode("div", _hoisted_2, [ + createBaseVNode("div", _hoisted_3, [ + createBaseVNode("h1", _hoisted_4, toDisplayString(_ctx.$t("notSupported.title")), 1), + createBaseVNode("div", _hoisted_5, [ + createBaseVNode("p", _hoisted_6, toDisplayString(_ctx.$t("notSupported.message")), 1), + createBaseVNode("ul", _hoisted_7, [ createBaseVNode("li", null, toDisplayString(_ctx.$t("notSupported.supportedDevices.macos")), 1), createBaseVNode("li", null, toDisplayString(_ctx.$t("notSupported.supportedDevices.windows")), 1) ]) ]), - createBaseVNode("div", _hoisted_9, [ + createBaseVNode("div", _hoisted_8, [ createVNode(unref(script), { label: _ctx.$t("notSupported.learnMore"), icon: "pi pi-github", @@ -85,4 +83,4 @@ const NotSupportedView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", " export { NotSupportedView as default }; -//# sourceMappingURL=NotSupportedView-Vc8_xWgH.js.map +//# sourceMappingURL=NotSupportedView-BRtvC5Gx.js.map diff --git a/web/assets/NotSupportedView-DQerxQzi.css b/web/assets/NotSupportedView-RFx6eCkN.css similarity index 87% rename from web/assets/NotSupportedView-DQerxQzi.css rename to web/assets/NotSupportedView-RFx6eCkN.css index 3b90d279..59478381 100644 --- a/web/assets/NotSupportedView-DQerxQzi.css +++ b/web/assets/NotSupportedView-RFx6eCkN.css @@ -1,9 +1,11 @@ -.sad-container[data-v-ebb20958] { +.sad-container { +&[data-v-ebb20958] { display: grid; align-items: center; justify-content: space-evenly; grid-template-columns: 25rem 1fr; +} &[data-v-ebb20958] > * { grid-row: 1; } diff --git a/web/assets/ServerConfigPanel-B-w0HFlz.js b/web/assets/ServerConfigPanel-C2nrpEEV.js similarity index 86% rename from web/assets/ServerConfigPanel-B-w0HFlz.js rename to web/assets/ServerConfigPanel-C2nrpEEV.js index d00cf672..4993d68e 100644 --- a/web/assets/ServerConfigPanel-B-w0HFlz.js +++ b/web/assets/ServerConfigPanel-C2nrpEEV.js @@ -1,25 +1,23 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { m as createBaseVNode, o as openBlock, f as createElementBlock, a0 as markRaw, d as defineComponent, a as useSettingStore, aS as storeToRefs, a7 as watch, cW as useCopyToClipboard, a3 as useI18n, J as createBlock, P as withCtx, j as unref, c6 as script, Z as toDisplayString, I as renderList, H as Fragment, k as createVNode, l as script$1, L as createCommentVNode, c4 as script$2, cX as FormItem, cw as _sfc_main$1, bV as electronAPI } from "./index-QvfM__ze.js"; -import { u as useServerConfigStore } from "./serverConfigStore-DCme3xlV.js"; +import { o as openBlock, f as createElementBlock, m as createBaseVNode, H as markRaw, d as defineComponent, a as useSettingStore, ae as storeToRefs, O as watch, dy as useCopyToClipboard, K as useI18n, y as createBlock, z as withCtx, j as unref, bj as script, E as toDisplayString, D as renderList, F as Fragment, k as createVNode, l as script$1, B as createCommentVNode, bh as script$2, dz as FormItem, dn as _sfc_main$1, b5 as electronAPI } from "./index-CmVtQCAR.js"; +import { u as useServerConfigStore } from "./serverConfigStore-BUvaGcxp.js"; const _hoisted_1$1 = { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em" }; -const _hoisted_2$1 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "m4 17l6-6l-6-6m8 14h8" -}, null, -1); -const _hoisted_3$1 = [ - _hoisted_2$1 -]; function render(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._hoisted_3$1]); + return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [ + createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "m4 17l6-6l-6-6m8 14h8" + }, null, -1) + ])); } __name(render, "render"); const __unplugin_components_0 = markRaw({ name: "lucide-terminal", render }); @@ -155,4 +153,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=ServerConfigPanel-B-w0HFlz.js.map +//# sourceMappingURL=ServerConfigPanel-C2nrpEEV.js.map diff --git a/web/assets/ServerStartView-48wfE1MS.js b/web/assets/ServerStartView-M5VckhgZ.js similarity index 85% rename from web/assets/ServerStartView-48wfE1MS.js rename to web/assets/ServerStartView-M5VckhgZ.js index 4b74f5ad..c19fa837 100644 --- a/web/assets/ServerStartView-48wfE1MS.js +++ b/web/assets/ServerStartView-M5VckhgZ.js @@ -1,8 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, a3 as useI18n, ad as ref, c7 as ProgressStatus, t as onMounted, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, aG as createTextVNode, Z as toDisplayString, j as unref, f as createElementBlock, L as createCommentVNode, k as createVNode, l as script, i as withDirectives, v as vShow, c8 as BaseTerminal, p as pushScopeId, q as popScopeId, bV as electronAPI, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-4140d62b"), n = n(), popScopeId(), n), "_withScopeId"); +import { d as defineComponent, K as useI18n, U as ref, bk as ProgressStatus, p as onMounted, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, a7 as createTextVNode, E as toDisplayString, j as unref, f as createElementBlock, B as createCommentVNode, k as createVNode, l as script, i as withDirectives, v as vShow, bl as BaseTerminal, b5 as electronAPI, _ as _export_sfc } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _hoisted_1 = { class: "flex flex-col w-full h-full items-center" }; const _hoisted_2 = { class: "text-2xl font-bold" }; const _hoisted_3 = { key: 0 }; @@ -98,4 +97,4 @@ const ServerStartView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "d export { ServerStartView as default }; -//# sourceMappingURL=ServerStartView-48wfE1MS.js.map +//# sourceMappingURL=ServerStartView-M5VckhgZ.js.map diff --git a/web/assets/UserSelectView-CXmVKOeK.js b/web/assets/UserSelectView-DNnNy-AZ.js similarity index 72% rename from web/assets/UserSelectView-CXmVKOeK.js rename to web/assets/UserSelectView-DNnNy-AZ.js index 88b4d3f3..88736e45 100644 --- a/web/assets/UserSelectView-CXmVKOeK.js +++ b/web/assets/UserSelectView-DNnNy-AZ.js @@ -1,18 +1,17 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, aX as useUserStore, c2 as useRouter, ad as ref, c as computed, t as onMounted, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, c3 as withKeys, j as unref, ax as script, c4 as script$1, c5 as script$2, c6 as script$3, aG as createTextVNode, L as createCommentVNode, l as script$4 } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; +import { d as defineComponent, aj as useUserStore, be as useRouter, U as ref, c as computed, p as onMounted, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, k as createVNode, bf as withKeys, j as unref, bg as script, bh as script$1, bi as script$2, bj as script$3, a7 as createTextVNode, B as createCommentVNode, l as script$4 } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _hoisted_1 = { id: "comfy-user-selection", class: "min-w-84 relative rounded-lg bg-[var(--comfy-menu-bg)] p-5 px-10 shadow-lg" }; -const _hoisted_2 = /* @__PURE__ */ createBaseVNode("h1", { class: "my-2.5 mb-7 font-normal" }, "ComfyUI", -1); -const _hoisted_3 = { class: "flex w-full flex-col items-center" }; -const _hoisted_4 = { class: "flex w-full flex-col gap-2" }; -const _hoisted_5 = { for: "new-user-input" }; -const _hoisted_6 = { class: "flex w-full flex-col gap-2" }; -const _hoisted_7 = { for: "existing-user-select" }; -const _hoisted_8 = { class: "mt-5" }; +const _hoisted_2 = { class: "flex w-full flex-col items-center" }; +const _hoisted_3 = { class: "flex w-full flex-col gap-2" }; +const _hoisted_4 = { for: "new-user-input" }; +const _hoisted_5 = { class: "flex w-full flex-col gap-2" }; +const _hoisted_6 = { for: "existing-user-select" }; +const _hoisted_7 = { class: "mt-5" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "UserSelectView", setup(__props) { @@ -47,10 +46,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { default: withCtx(() => [ createBaseVNode("main", _hoisted_1, [ - _hoisted_2, - createBaseVNode("div", _hoisted_3, [ - createBaseVNode("div", _hoisted_4, [ - createBaseVNode("label", _hoisted_5, toDisplayString(_ctx.$t("userSelect.newUser")) + ":", 1), + _cache[2] || (_cache[2] = createBaseVNode("h1", { class: "my-2.5 mb-7 font-normal" }, "ComfyUI", -1)), + createBaseVNode("div", _hoisted_2, [ + createBaseVNode("div", _hoisted_3, [ + createBaseVNode("label", _hoisted_4, toDisplayString(_ctx.$t("userSelect.newUser")) + ":", 1), createVNode(unref(script), { id: "new-user-input", modelValue: newUsername.value, @@ -60,8 +59,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }, null, 8, ["modelValue", "placeholder"]) ]), createVNode(unref(script$1)), - createBaseVNode("div", _hoisted_6, [ - createBaseVNode("label", _hoisted_7, toDisplayString(_ctx.$t("userSelect.existingUser")) + ":", 1), + createBaseVNode("div", _hoisted_5, [ + createBaseVNode("label", _hoisted_6, toDisplayString(_ctx.$t("userSelect.existingUser")) + ":", 1), createVNode(unref(script$2), { modelValue: selectedUser.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedUser.value = $event), @@ -82,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ _: 1 })) : createCommentVNode("", true) ]), - createBaseVNode("footer", _hoisted_8, [ + createBaseVNode("footer", _hoisted_7, [ createVNode(unref(script$4), { label: _ctx.$t("userSelect.next"), onClick: login @@ -99,4 +98,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=UserSelectView-CXmVKOeK.js.map +//# sourceMappingURL=UserSelectView-DNnNy-AZ.js.map diff --git a/web/assets/WelcomeView-C8whKl15.js b/web/assets/WelcomeView-Nvn1jaCx.js similarity index 73% rename from web/assets/WelcomeView-C8whKl15.js rename to web/assets/WelcomeView-Nvn1jaCx.js index 7625ec43..75b0d677 100644 --- a/web/assets/WelcomeView-C8whKl15.js +++ b/web/assets/WelcomeView-Nvn1jaCx.js @@ -1,8 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, c2 as useRouter, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, l as script, p as pushScopeId, q as popScopeId, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-7dfaf74c"), n = n(), popScopeId(), n), "_withScopeId"); +import { d as defineComponent, be as useRouter, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, k as createVNode, j as unref, l as script, _ as _export_sfc } from "./index-CmVtQCAR.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cof5Ihf_.js"; const _hoisted_1 = { class: "flex flex-col items-center justify-center gap-8 p-8" }; const _hoisted_2 = { class: "animated-gradient-text text-glow select-none" }; const _sfc_main = /* @__PURE__ */ defineComponent({ @@ -37,4 +36,4 @@ const WelcomeView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data- export { WelcomeView as default }; -//# sourceMappingURL=WelcomeView-C8whKl15.js.map +//# sourceMappingURL=WelcomeView-Nvn1jaCx.js.map diff --git a/web/assets/index-je62U6DH.js b/web/assets/index-BPn8eYlx.js similarity index 98% rename from web/assets/index-je62U6DH.js rename to web/assets/index-BPn8eYlx.js index 6acbfcc2..8adb2181 100644 --- a/web/assets/index-je62U6DH.js +++ b/web/assets/index-BPn8eYlx.js @@ -1,6 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { ci as ComfyDialog, cj as $el, ck as ComfyApp, h as app, a5 as LiteGraph, bl as LGraphCanvas, cl as useExtensionService, cm as processDynamicPrompt, bT as isElectron, bV as electronAPI, bW as useDialogService, cn as t, co as DraggableList, bA as useToastStore, aj as LGraphNode, cp as applyTextReplacements, cq as ComfyWidgets, cr as addValueControlWidgets, a8 as useNodeDefStore, cs as serialise, ct as deserialiseAndCreate, bh as api, a as useSettingStore, ai as LGraphGroup, af as nextTick, bO as lodashExports, bg as setStorageValue, bb as getStorageValue } from "./index-QvfM__ze.js"; +import { da as ComfyDialog, db as $el, dc as ComfyApp, h as app, M as LiteGraph, aF as LGraphCanvas, dd as useExtensionService, de as processDynamicPrompt, b4 as isElectron, b5 as electronAPI, b as useWorkflowStore, bu as checkMirrorReachable, b7 as useDialogService, bc as t, df as DraggableList, aS as useToastStore, $ as LGraphNode, dg as applyTextReplacements, dh as ComfyWidgets, di as addValueControlWidgets, P as useNodeDefStore, dj as serialise, dk as deserialiseAndCreate, aH as api, a as useSettingStore, Z as LGraphGroup, W as nextTick, b0 as lodashExports, aK as setStorageValue, aI as getStorageValue } from "./index-CmVtQCAR.js"; +import { P as PYTHON_MIRROR } from "./uvMirrors-B-HKMf6X.js"; class ClipspaceDialog extends ComfyDialog { static { __name(this, "ClipspaceDialog"); @@ -422,6 +423,7 @@ app.registerExtension({ if (!isElectron()) return; const electronAPI$1 = electronAPI(); const desktopAppVersion = await electronAPI$1.getElectronVersion(); + const workflowStore = useWorkflowStore(); const onChangeRestartApp = /* @__PURE__ */ __name((newValue, oldValue) => { if (oldValue !== void 0 && newValue !== oldValue) { electronAPI$1.restartApp("Restart ComfyUI to apply changes.", 1500); @@ -450,15 +452,49 @@ app.registerExtension({ id: "Comfy-Desktop.WindowStyle", category: ["Comfy-Desktop", "General", "Window Style"], name: "Window Style", - tooltip: "Choose custom option to hide the system title bar", + tooltip: "Custom: Replace the system title bar with ComfyUI's Top menu", type: "combo", experimental: true, defaultValue: "default", options: ["default", "custom"], onChange: /* @__PURE__ */ __name((newValue, oldValue) => { + if (!oldValue) return; electronAPI$1.Config.setWindowStyle(newValue); - onChangeRestartApp(newValue, oldValue); }, "onChange") + }, + { + id: "Comfy-Desktop.UV.PythonInstallMirror", + name: "Python Install Mirror", + tooltip: `Managed Python installations are downloaded from the Astral python-build-standalone project. This variable can be set to a mirror URL to use a different source for Python installations. The provided URL will replace https://github.com/astral-sh/python-build-standalone/releases/download in, e.g., https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz. Distributions can be read from a local directory by using the file:// URL scheme.`, + type: "url", + defaultValue: "", + attrs: { + validateUrlFn(mirror) { + return checkMirrorReachable( + mirror + PYTHON_MIRROR.validationPathSuffix + ); + } + } + }, + { + id: "Comfy-Desktop.UV.PypiInstallMirror", + name: "Pypi Install Mirror", + tooltip: `Default pip install mirror`, + type: "url", + defaultValue: "", + attrs: { + validateUrlFn: checkMirrorReachable + } + }, + { + id: "Comfy-Desktop.UV.TorchInstallMirror", + name: "Torch Install Mirror", + tooltip: `Pip install mirror for pytorch`, + type: "url", + defaultValue: "", + attrs: { + validateUrlFn: checkMirrorReachable + } } ], commands: [ @@ -518,14 +554,6 @@ app.registerExtension({ electronAPI$1.openDevTools(); } }, - { - id: "Comfy-Desktop.OpenFeedbackPage", - label: "Feedback", - icon: "pi pi-envelope", - function() { - window.open("https://forum.comfy.org/c/v1-feedback/", "_blank"); - } - }, { id: "Comfy-Desktop.OpenUserGuide", label: "Desktop User Guide", @@ -554,15 +582,28 @@ app.registerExtension({ function() { electronAPI$1.restartApp(); } + }, + { + id: "Comfy-Desktop.Quit", + label: "Quit", + icon: "pi pi-sign-out", + async function() { + if (workflowStore.modifiedWorkflows.length > 0) { + const confirmed = await useDialogService().confirm({ + message: t("desktopMenu.confirmQuit"), + title: t("desktopMenu.quit"), + type: "default" + }); + if (!confirmed) return; + } + electronAPI$1.quit(); + } } ], menuCommands: [ { path: ["Help"], - commands: [ - "Comfy-Desktop.OpenUserGuide", - "Comfy-Desktop.OpenFeedbackPage" - ] + commands: ["Comfy-Desktop.OpenUserGuide"] }, { path: ["Help"], @@ -584,6 +625,15 @@ app.registerExtension({ commands: ["Comfy-Desktop.Reinstall"] } ], + keybindings: [ + { + commandId: "Workspace.CloseWorkflow", + combo: { + key: "w", + ctrl: true + } + } + ], aboutPageBadges: [ { label: "ComfyUI_desktop v" + desktopAppVersion, @@ -1631,7 +1681,25 @@ app.registerExtension({ }; nodeType.prototype.getExtraMenuOptions = function(_, options) { const r = origGetExtraMenuOptions ? origGetExtraMenuOptions.apply(this, arguments) : void 0; + const getPointerCanvasPos = /* @__PURE__ */ __name(() => { + const pos = this.graph?.list_of_graphcanvas?.at(0)?.graph_mouse; + return pos ? { canvasX: pos[0], canvasY: pos[1] } : void 0; + }, "getPointerCanvasPos"); if (this.widgets) { + const { canvasX, canvasY } = getPointerCanvasPos(); + const widget = this.getWidgetOnPos(canvasX, canvasY); + if (widget && widget.type !== CONVERTED_TYPE) { + const config = getConfig.call(this, widget.name) ?? [ + widget.type, + widget.options || {} + ]; + if (isConvertibleWidget(widget, config)) { + options.push({ + content: `Convert ${widget.name} to input`, + callback: /* @__PURE__ */ __name(() => convertToInput(this, widget, config) && false, "callback") + }); + } + } let toInput = []; let toWidget = []; for (const w of this.widgets) { @@ -2126,14 +2194,22 @@ class GroupNodeConfig { let name = customConfig?.name ?? node.inputs?.find((inp) => inp.name === inputName)?.label ?? inputName; let key = name; let prefix = ""; - if (node.type === "PrimitiveNode" && node.title || name in seenInputs) { + seenInputs[key] = (seenInputs[key] ?? 0) + 1; + if (node.type === "PrimitiveNode" && node.title || seenInputs[name] > 1) { prefix = `${node.title ?? node.type} `; key = name = `${prefix}${inputName}`; - if (name in seenInputs) { - name = `${prefix}${seenInputs[name]} ${inputName}`; + seenInputs[name] = seenInputs[name] ?? 0; + let finalName; + if (seenInputs[name] > 0) { + prefix = `${node.title ?? node.type} `; + finalName = `${prefix} ${seenInputs[name] + 1} ${inputName}`; + } else { + prefix = `${node.title ?? node.type} `; + finalName = `${prefix}${inputName}`; } + seenInputs[name]++; + this.nodeDef.input.required[finalName] = config; } - seenInputs[key] = (seenInputs[key] ?? 1) + 1; if (inputName === "seed" || inputName === "noise_seed") { if (!extra) extra = {}; extra.control_after_generate = `${prefix}control_after_generate`; @@ -2307,23 +2383,20 @@ class GroupNodeConfig { }; this.nodeDef.output.push(def.output[outputId]); this.nodeDef.output_is_list.push(def.output_is_list[outputId]); - let label = customConfig?.name; + let label = customConfig?.name ?? // If no custom name, check if the definition provides an output name + def.output_name?.[outputId] ?? // If neither exist, fallback to the raw output type (e.g., "FLOAT", "INT") + def.output[outputId]; if (!label) { - label = def.output_name?.[outputId] ?? def.output[outputId]; - const output = node.outputs.find((o) => o.name === label); - if (output?.label) { - label = output.label; - } + const output = node.outputs.find((o) => o.name); + label = output?.label ?? "UnnamedOutput"; } let name = label; - if (name in seenOutputs) { - const prefix = `${node.title ?? node.type} `; - name = `${prefix}${label}`; - if (name in seenOutputs) { - name = `${prefix}${node.index} ${label}`; - } + const prefix = `${node.title ?? node.type} `; + name = `${prefix}${label}`; + if (seenOutputs[name]) { + name = `${prefix} ${seenOutputs[name] + 1} ${label}`; } - seenOutputs[name] = 1; + seenOutputs[name] = (seenOutputs[name] ?? 0) + 1; this.nodeDef.output_name.push(name); } } @@ -3248,6 +3321,194 @@ app.registerExtension({ }; } }); +class Load3dUtils { + static { + __name(this, "Load3dUtils"); + } + static async uploadTempImage(imageData, prefix) { + const blob = await fetch(imageData).then((r) => r.blob()); + const name = `${prefix}_${Date.now()}.png`; + const file2 = new File([blob], name); + const body = new FormData(); + body.append("image", file2); + body.append("subfolder", "threed"); + body.append("type", "temp"); + const resp = await api.fetchApi("/upload/image", { + method: "POST", + body + }); + if (resp.status !== 200) { + const err2 = `Error uploading temp image: ${resp.status} - ${resp.statusText}`; + useToastStore().addAlert(err2); + throw new Error(err2); + } + return await resp.json(); + } + static async uploadFile(load3d, file2, fileInput) { + let uploadPath; + try { + const body = new FormData(); + body.append("image", file2); + body.append("subfolder", "3d"); + const resp = await api.fetchApi("/upload/image", { + method: "POST", + body + }); + if (resp.status === 200) { + const data = await resp.json(); + let path = data.name; + if (data.subfolder) path = data.subfolder + "/" + path; + uploadPath = path; + const modelUrl = api.apiURL( + this.getResourceURL(...this.splitFilePath(path), "input") + ); + await load3d.loadModel(modelUrl, file2.name); + const fileExt = file2.name.split(".").pop()?.toLowerCase(); + if (fileExt === "obj" && fileInput?.files) { + try { + const mtlFile = Array.from(fileInput.files).find( + (f) => f.name.toLowerCase().endsWith(".mtl") + ); + if (mtlFile) { + const mtlFormData = new FormData(); + mtlFormData.append("image", mtlFile); + mtlFormData.append("subfolder", "3d"); + await api.fetchApi("/upload/image", { + method: "POST", + body: mtlFormData + }); + } + } catch (mtlError) { + console.warn("Failed to upload MTL file:", mtlError); + } + } + } else { + useToastStore().addAlert(resp.status + " - " + resp.statusText); + } + } catch (error) { + console.error("Upload error:", error); + useToastStore().addAlert( + error instanceof Error ? error.message : "Upload failed" + ); + } + return uploadPath; + } + static splitFilePath(path) { + const folder_separator = path.lastIndexOf("/"); + if (folder_separator === -1) { + return ["", path]; + } + return [ + path.substring(0, folder_separator), + path.substring(folder_separator + 1) + ]; + } + static getResourceURL(subfolder, filename, type = "input") { + const params = [ + "filename=" + encodeURIComponent(filename), + "type=" + type, + "subfolder=" + subfolder, + app.getRandParam().substring(1) + ].join("&"); + return `/view?${params}`; + } +} +class Load3DConfiguration { + static { + __name(this, "Load3DConfiguration"); + } + constructor(load3d) { + this.load3d = load3d; + } + configure(loadFolder, modelWidget, material, lightIntensity, upDirection, fov2, cameraState, postModelUpdateFunc) { + this.setupModelHandling( + modelWidget, + loadFolder, + cameraState, + postModelUpdateFunc + ); + this.setupMaterial(material); + this.setupLighting(lightIntensity); + this.setupDirection(upDirection); + this.setupCamera(fov2); + this.setupDefaultProperties(); + } + setupModelHandling(modelWidget, loadFolder, cameraState, postModelUpdateFunc) { + const onModelWidgetUpdate = this.createModelUpdateHandler( + loadFolder, + cameraState, + postModelUpdateFunc + ); + if (modelWidget.value) { + onModelWidgetUpdate(modelWidget.value); + } + modelWidget.callback = onModelWidgetUpdate; + } + setupMaterial(material) { + material.callback = (value) => { + this.load3d.setMaterialMode(value); + }; + this.load3d.setMaterialMode( + material.value + ); + } + setupLighting(lightIntensity) { + lightIntensity.callback = (value) => { + this.load3d.setLightIntensity(value); + }; + this.load3d.setLightIntensity(lightIntensity.value); + } + setupDirection(upDirection) { + upDirection.callback = (value) => { + this.load3d.setUpDirection(value); + }; + this.load3d.setUpDirection( + upDirection.value + ); + } + setupCamera(fov2) { + fov2.callback = (value) => { + this.load3d.setFOV(value); + }; + this.load3d.setFOV(fov2.value); + } + setupDefaultProperties() { + const cameraType = this.load3d.loadNodeProperty( + "Camera Type", + "perspective" + ); + this.load3d.toggleCamera(cameraType); + const showGrid = this.load3d.loadNodeProperty("Show Grid", true); + this.load3d.toggleGrid(showGrid); + const bgColor = this.load3d.loadNodeProperty("Background Color", "#282828"); + this.load3d.setBackgroundColor(bgColor); + } + createModelUpdateHandler(loadFolder, cameraState, postModelUpdateFunc) { + let isFirstLoad = true; + return async (value) => { + if (!value) return; + const filename = value; + const modelUrl = api.apiURL( + Load3dUtils.getResourceURL( + ...Load3dUtils.splitFilePath(filename), + loadFolder + ) + ); + await this.load3d.loadModel(modelUrl, filename); + if (postModelUpdateFunc) { + postModelUpdateFunc(this.load3d); + } + if (isFirstLoad && cameraState && typeof cameraState === "object") { + try { + this.load3d.setCameraState(cameraState); + } catch (error) { + console.warn("Failed to restore camera state:", error); + } + isFirstLoad = false; + } + }; + } +} /** * @license * Copyright 2010-2024 Three.js Authors @@ -45950,76 +46211,6 @@ class STLLoader extends Loader { return isBinary(binData) ? parseBinary(binData) : parseASCII(ensureString(data)); } } -async function uploadTempImage(imageData, prefix) { - const blob = await fetch(imageData).then((r) => r.blob()); - const name = `${prefix}_${Date.now()}.png`; - const file2 = new File([blob], name); - const body = new FormData(); - body.append("image", file2); - body.append("subfolder", "threed"); - body.append("type", "temp"); - const resp = await api.fetchApi("/upload/image", { - method: "POST", - body - }); - if (resp.status !== 200) { - const err2 = `Error uploading temp image: ${resp.status} - ${resp.statusText}`; - useToastStore().addAlert(err2); - throw new Error(err2); - } - return await resp.json(); -} -__name(uploadTempImage, "uploadTempImage"); -async function uploadFile$1(load3d, file2, fileInput) { - let uploadPath; - try { - const body = new FormData(); - body.append("image", file2); - body.append("subfolder", "3d"); - const resp = await api.fetchApi("/upload/image", { - method: "POST", - body - }); - if (resp.status === 200) { - const data = await resp.json(); - let path = data.name; - if (data.subfolder) path = data.subfolder + "/" + path; - uploadPath = path; - const modelUrl = api.apiURL( - getResourceURL$1(...splitFilePath$1(path), "input") - ); - await load3d.loadModel(modelUrl, file2.name); - const fileExt = file2.name.split(".").pop()?.toLowerCase(); - if (fileExt === "obj" && fileInput?.files) { - try { - const mtlFile = Array.from(fileInput.files).find( - (f) => f.name.toLowerCase().endsWith(".mtl") - ); - if (mtlFile) { - const mtlFormData = new FormData(); - mtlFormData.append("image", mtlFile); - mtlFormData.append("subfolder", "3d"); - await api.fetchApi("/upload/image", { - method: "POST", - body: mtlFormData - }); - } - } catch (mtlError) { - console.warn("Failed to upload MTL file:", mtlError); - } - } - } else { - useToastStore().addAlert(resp.status + " - " + resp.statusText); - } - } catch (error) { - console.error("Upload error:", error); - useToastStore().addAlert( - error instanceof Error ? error.message : "Upload failed" - ); - } - return uploadPath; -} -__name(uploadFile$1, "uploadFile$1"); class Load3d { static { __name(this, "Load3d"); @@ -46049,10 +46240,12 @@ class Load3d { materialMode = "original"; currentUpDirection = "original"; originalRotation = null; - viewHelper; - viewHelperContainer; - cameraSwitcherContainer; - gridSwitcherContainer; + viewHelper = {}; + viewHelperContainer = {}; + cameraSwitcherContainer = {}; + gridSwitcherContainer = {}; + node = {}; + bgColorInput = {}; constructor(container) { this.scene = new Scene(); this.perspectiveCamera = new PerspectiveCamera(75, 1, 0.1, 1e3); @@ -46081,6 +46274,9 @@ class Load3d { this.renderer.domElement ); this.controls.enableDamping = true; + this.controls.addEventListener("end", () => { + this.storeNodeProperty("Camera Info", this.getCameraState()); + }); this.gltfLoader = new GLTFLoader(); this.objLoader = new OBJLoader(); this.mtlLoader = new MTLLoader(); @@ -46112,9 +46308,24 @@ class Load3d { this.createViewHelper(container); this.createGridSwitcher(container); this.createCameraSwitcher(container); + this.createColorPicker(container); this.handleResize(); this.startAnimation(); } + setNode(node) { + this.node = node; + } + storeNodeProperty(name, value) { + if (this.node) { + this.node.properties[name] = value; + } + } + loadNodeProperty(name, defaultValue) { + if (!this.node || !this.node.properties || !(name in this.node.properties)) { + return defaultValue; + } + return this.node.properties[name]; + } createViewHelper(container) { this.viewHelperContainer = document.createElement("div"); this.viewHelperContainer.style.position = "absolute"; @@ -46216,6 +46427,42 @@ class Load3d { this.cameraSwitcherContainer.appendChild(cameraIcon); container.appendChild(this.cameraSwitcherContainer); } + createColorPicker(container) { + const colorPickerContainer = document.createElement("div"); + colorPickerContainer.style.position = "absolute"; + colorPickerContainer.style.top = "53px"; + colorPickerContainer.style.left = "3px"; + colorPickerContainer.style.width = "20px"; + colorPickerContainer.style.height = "20px"; + colorPickerContainer.style.cursor = "pointer"; + colorPickerContainer.style.alignItems = "center"; + colorPickerContainer.style.justifyContent = "center"; + colorPickerContainer.title = "Background Color"; + const colorInput = document.createElement("input"); + colorInput.type = "color"; + colorInput.style.opacity = "0"; + colorInput.style.position = "absolute"; + colorInput.style.width = "100%"; + colorInput.style.height = "100%"; + colorInput.style.cursor = "pointer"; + const colorIcon = document.createElement("div"); + colorIcon.innerHTML = ` + + + + + + `; + colorInput.addEventListener("input", (event) => { + const color = event.target.value; + this.setBackgroundColor(color); + this.storeNodeProperty("Background Color", color); + }); + this.bgColorInput = colorInput; + colorPickerContainer.appendChild(colorInput); + colorPickerContainer.appendChild(colorIcon); + container.appendChild(colorPickerContainer); + } setFOV(fov2) { if (this.activeCamera === this.perspectiveCamera) { this.perspectiveCamera.fov = fov2; @@ -46234,7 +46481,6 @@ class Load3d { } setCameraState(state) { if (this.activeCamera !== (state.cameraType === "perspective" ? this.perspectiveCamera : this.orthographicCamera)) { - this.toggleCamera(state.cameraType); } this.activeCamera.position.copy(state.position); this.controls.target.copy(state.target); @@ -46414,6 +46660,7 @@ class Load3d { this.viewHelperContainer ); this.viewHelper.center = this.controls.target; + this.storeNodeProperty("Camera Type", this.getCurrentCameraType()); this.handleResize(); } getCurrentCameraType() { @@ -46422,6 +46669,7 @@ class Load3d { toggleGrid(showGrid) { if (this.gridHelper) { this.gridHelper.visible = showGrid; + this.storeNodeProperty("Show Grid", showGrid); } } setLightIntensity(intensity) { @@ -46447,6 +46695,9 @@ class Load3d { const delta = this.clock.getDelta(); if (this.viewHelper.animating) { this.viewHelper.update(delta); + if (!this.viewHelper.animating) { + this.storeNodeProperty("Camera Info", this.getCameraState()); + } } this.renderer.clear(); this.controls.update(); @@ -46724,6 +46975,9 @@ class Load3d { setBackgroundColor(color) { this.renderer.setClearColor(new Color(color)); this.renderer.render(this.scene, this.activeCamera); + if (this.bgColorInput) { + this.bgColorInput.value = color; + } } } class Load3dAnimation extends Load3d { @@ -46736,8 +46990,143 @@ class Load3dAnimation extends Load3d { selectedAnimationIndex = 0; isAnimationPlaying = false; animationSpeed = 1; + playPauseContainer = {}; + animationSelect = {}; + speedSelect = {}; constructor(container) { super(container); + this.createPlayPauseButton(container); + this.createAnimationList(container); + this.createSpeedSelect(container); + } + createAnimationList(container) { + this.animationSelect = document.createElement("select"); + Object.assign(this.animationSelect.style, { + position: "absolute", + top: "3px", + left: "50%", + transform: "translateX(15px)", + width: "90px", + height: "20px", + backgroundColor: "rgba(0, 0, 0, 0.3)", + color: "white", + border: "none", + borderRadius: "4px", + fontSize: "12px", + padding: "0 8px", + cursor: "pointer", + display: "none", + outline: "none" + }); + this.animationSelect.addEventListener("mouseenter", () => { + this.animationSelect.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; + }); + this.animationSelect.addEventListener("mouseleave", () => { + this.animationSelect.style.backgroundColor = "rgba(0, 0, 0, 0.3)"; + }); + this.animationSelect.addEventListener("change", (event) => { + const select = event.target; + this.updateSelectedAnimation(select.selectedIndex); + }); + container.appendChild(this.animationSelect); + } + updateAnimationList() { + this.animationSelect.innerHTML = ""; + this.animationClips.forEach((clip, index) => { + const option = document.createElement("option"); + option.value = index.toString(); + option.text = clip.name || `Animation ${index + 1}`; + option.selected = index === this.selectedAnimationIndex; + this.animationSelect.appendChild(option); + }); + } + createPlayPauseButton(container) { + this.playPauseContainer = document.createElement("div"); + this.playPauseContainer.style.position = "absolute"; + this.playPauseContainer.style.top = "3px"; + this.playPauseContainer.style.left = "50%"; + this.playPauseContainer.style.transform = "translateX(-50%)"; + this.playPauseContainer.style.width = "20px"; + this.playPauseContainer.style.height = "20px"; + this.playPauseContainer.style.cursor = "pointer"; + this.playPauseContainer.style.alignItems = "center"; + this.playPauseContainer.style.justifyContent = "center"; + const updateButtonState = /* @__PURE__ */ __name(() => { + const icon = this.playPauseContainer.querySelector("svg"); + if (icon) { + if (this.isAnimationPlaying) { + icon.innerHTML = ` + + `; + this.playPauseContainer.title = "Pause Animation"; + } else { + icon.innerHTML = ` + + `; + this.playPauseContainer.title = "Play Animation"; + } + } + }, "updateButtonState"); + const playIcon = document.createElement("div"); + playIcon.innerHTML = ` + + + + `; + this.playPauseContainer.addEventListener("mouseenter", () => { + this.playPauseContainer.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; + }); + this.playPauseContainer.addEventListener("mouseleave", () => { + this.playPauseContainer.style.backgroundColor = "transparent"; + }); + this.playPauseContainer.addEventListener("click", (event) => { + event.stopPropagation(); + this.toggleAnimation(); + updateButtonState(); + }); + this.playPauseContainer.appendChild(playIcon); + container.appendChild(this.playPauseContainer); + this.playPauseContainer.style.display = "none"; + } + createSpeedSelect(container) { + this.speedSelect = document.createElement("select"); + Object.assign(this.speedSelect.style, { + position: "absolute", + top: "3px", + left: "50%", + transform: "translateX(-75px)", + width: "60px", + height: "20px", + backgroundColor: "rgba(0, 0, 0, 0.3)", + color: "white", + border: "none", + borderRadius: "4px", + fontSize: "12px", + padding: "0 8px", + cursor: "pointer", + display: "none", + outline: "none" + }); + const speeds = [0.1, 0.5, 1, 1.5, 2]; + speeds.forEach((speed) => { + const option = document.createElement("option"); + option.value = speed.toString(); + option.text = `${speed}x`; + option.selected = speed === 1; + this.speedSelect.appendChild(option); + }); + this.speedSelect.addEventListener("mouseenter", () => { + this.speedSelect.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; + }); + this.speedSelect.addEventListener("mouseleave", () => { + this.speedSelect.style.backgroundColor = "rgba(0, 0, 0, 0.3)"; + }); + this.speedSelect.addEventListener("change", (event) => { + const select = event.target; + const newSpeed = parseFloat(select.value); + this.setAnimationSpeed(newSpeed); + }); + container.appendChild(this.speedSelect); } async setupModel(model) { await super.setupModel(model); @@ -46762,6 +47151,21 @@ class Load3dAnimation extends Load3d { this.updateSelectedAnimation(0); } } + if (this.animationClips.length > 0) { + this.playPauseContainer.style.display = "block"; + } else { + this.playPauseContainer.style.display = "none"; + } + if (this.animationClips.length > 0) { + this.playPauseContainer.style.display = "block"; + this.animationSelect.style.display = "block"; + this.speedSelect.style.display = "block"; + this.updateAnimationList(); + } else { + this.playPauseContainer.style.display = "none"; + this.animationSelect.style.display = "none"; + this.speedSelect.style.display = "none"; + } } setAnimationSpeed(speed) { this.animationSpeed = speed; @@ -46793,6 +47197,7 @@ class Load3dAnimation extends Load3d { action.paused = true; } this.animationActions = [action]; + this.updateAnimationList(); } clearModel() { if (this.currentAnimation) { @@ -46807,6 +47212,14 @@ class Load3dAnimation extends Load3d { this.isAnimationPlaying = false; this.animationSpeed = 1; super.clearModel(); + if (this.animationSelect) { + this.animationSelect.style.display = "none"; + this.animationSelect.innerHTML = ""; + } + if (this.speedSelect) { + this.speedSelect.style.display = "none"; + this.speedSelect.value = "1"; + } } getAnimationNames() { return this.animationClips.map((clip, index) => { @@ -46819,6 +47232,16 @@ class Load3dAnimation extends Load3d { return; } this.isAnimationPlaying = play ?? !this.isAnimationPlaying; + const icon = this.playPauseContainer.querySelector("svg"); + if (icon) { + if (this.isAnimationPlaying) { + icon.innerHTML = ''; + this.playPauseContainer.title = "Pause Animation"; + } else { + icon.innerHTML = ''; + this.playPauseContainer.title = "Play Animation"; + } + } this.animationActions.forEach((action) => { if (this.isAnimationPlaying) { action.paused = false; @@ -46842,101 +47265,16 @@ class Load3dAnimation extends Load3d { this.renderer.render(this.scene, this.activeCamera); if (this.viewHelper.animating) { this.viewHelper.update(delta); + if (!this.viewHelper.animating) { + this.storeNodeProperty("Camera Info", this.getCameraState()); + } } this.viewHelper.render(this.renderer); }, "animate"); animate(); } } -function splitFilePath$1(path) { - const folder_separator = path.lastIndexOf("/"); - if (folder_separator === -1) { - return ["", path]; - } - return [ - path.substring(0, folder_separator), - path.substring(folder_separator + 1) - ]; -} -__name(splitFilePath$1, "splitFilePath$1"); -function getResourceURL$1(subfolder, filename, type = "input") { - const params = [ - "filename=" + encodeURIComponent(filename), - "type=" + type, - "subfolder=" + subfolder, - app.getRandParam().substring(1) - ].join("&"); - return `/view?${params}`; -} -__name(getResourceURL$1, "getResourceURL$1"); -const load3dCSSCLASS = `display: flex; - flex-direction: column; - background: transparent; - flex: 1; - position: relative; - overflow: hidden;`; -const load3dCanvasCSSCLASS = `display: flex; - width: 100% !important; - height: 100% !important;`; const containerToLoad3D = /* @__PURE__ */ new Map(); -function configureLoad3D(load3d, loadFolder, modelWidget, material, bgColor, lightIntensity, upDirection, fov2, cameraState, postModelUpdateFunc) { - const createModelUpdateHandler = /* @__PURE__ */ __name(() => { - let isFirstLoad = true; - return async (value) => { - if (!value) return; - const filename = value; - const modelUrl = api.apiURL( - getResourceURL$1(...splitFilePath$1(filename), loadFolder) - ); - await load3d.loadModel(modelUrl, filename); - load3d.setMaterialMode( - material.value - ); - load3d.setUpDirection( - upDirection.value - ); - if (postModelUpdateFunc) { - postModelUpdateFunc(load3d); - } - if (isFirstLoad && cameraState && typeof cameraState === "object") { - try { - load3d.setCameraState(cameraState); - } catch (error) { - console.warn("Failed to restore camera state:", error); - } - isFirstLoad = false; - } - }; - }, "createModelUpdateHandler"); - const onModelWidgetUpdate = createModelUpdateHandler(); - if (modelWidget.value) { - onModelWidgetUpdate(modelWidget.value); - } - modelWidget.callback = onModelWidgetUpdate; - material.callback = (value) => { - load3d.setMaterialMode(value); - }; - load3d.setMaterialMode(material.value); - load3d.setBackgroundColor(bgColor.value); - bgColor.callback = (value) => { - load3d.setBackgroundColor(value); - }; - load3d.setLightIntensity(lightIntensity.value); - lightIntensity.callback = (value) => { - load3d.setLightIntensity(value); - }; - upDirection.callback = (value) => { - load3d.setUpDirection(value); - }; - load3d.setUpDirection( - upDirection.value - ); - fov2.callback = (value) => { - load3d.setFOV(value); - }; - load3d.setFOV(fov2.value); -} -__name(configureLoad3D, "configureLoad3D"); app.registerExtension({ name: "Comfy.Load3D", getCustomWidgets(app2) { @@ -46974,7 +47312,7 @@ app.registerExtension({ const modelWidget = node.widgets?.find( (w) => w.name === "model_file" ); - const uploadPath = await uploadFile$1( + const uploadPath = await Load3dUtils.uploadFile( load3d, fileInput.files[0], fileInput @@ -47008,19 +47346,6 @@ app.registerExtension({ } }; }, - init() { - const style = document.createElement("style"); - style.innerText = ` - .comfy-load-3d { - ${load3dCSSCLASS} - } - - .comfy-load-3d canvas { - ${load3dCanvasCSSCLASS} - } - `; - document.head.appendChild(style); - }, async nodeCreated(node) { if (node.constructor.comfyClass !== "Load3D") return; const [oldWidth, oldHeight] = node.size; @@ -47029,11 +47354,11 @@ app.registerExtension({ const sceneWidget = node.widgets.find((w2) => w2.name === "image"); const container = sceneWidget.element; const load3d = containerToLoad3D.get(container.id); + load3d.setNode(node); const modelWidget = node.widgets.find( (w2) => w2.name === "model_file" ); const material = node.widgets.find((w2) => w2.name === "material"); - const bgColor = node.widgets.find((w2) => w2.name === "bg_color"); const lightIntensity = node.widgets.find( (w2) => w2.name === "light_intensity" ); @@ -47041,22 +47366,12 @@ app.registerExtension({ (w2) => w2.name === "up_direction" ); const fov2 = node.widgets.find((w2) => w2.name === "fov"); - let cameraState; - try { - const cameraInfo = node.properties["Camera Info"]; - if (cameraInfo && typeof cameraInfo === "string" && cameraInfo.trim() !== "") { - cameraState = JSON.parse(cameraInfo); - } - } catch (error) { - console.warn("Failed to parse camera state:", error); - cameraState = void 0; - } - configureLoad3D( - load3d, + let cameraState = node.properties["Camera Info"]; + const config = new Load3DConfiguration(load3d); + config.configure( "input", modelWidget, material, - bgColor, lightIntensity, upDirection, fov2, @@ -47065,14 +47380,14 @@ app.registerExtension({ const w = node.widgets.find((w2) => w2.name === "width"); const h = node.widgets.find((w2) => w2.name === "height"); sceneWidget.serializeValue = async () => { - node.properties["Camera Info"] = JSON.stringify(load3d.getCameraState()); + node.properties["Camera Info"] = load3d.getCameraState(); const { scene: imageData, mask: maskData } = await load3d.captureScene( w.value, h.value ); const [data, dataMask] = await Promise.all([ - uploadTempImage(imageData, "scene"), - uploadTempImage(maskData, "scene_mask") + Load3dUtils.uploadTempImage(imageData, "scene"), + Load3dUtils.uploadTempImage(maskData, "scene_mask") ]); return { image: `threed/${data.name} [temp]`, @@ -47120,7 +47435,7 @@ app.registerExtension({ const modelWidget = node.widgets?.find( (w) => w.name === "model_file" ); - const uploadPath = await uploadFile$1( + const uploadPath = await Load3dUtils.uploadFile( load3d, fileInput.files[0], fileInput @@ -47147,70 +47462,13 @@ app.registerExtension({ if (modelWidget) { modelWidget.value = ""; } - const animationSelect2 = node.widgets?.find( - (w) => w.name === "animation" - ); - if (animationSelect2) { - animationSelect2.options.values = []; - animationSelect2.value = ""; - } - const speedSelect = node.widgets?.find( - (w) => w.name === "animation_speed" - ); - if (speedSelect) { - speedSelect.value = "1"; - } }); - node.addWidget( - "button", - "Play/Pause Animation", - "toggle_animation", - () => { - load3d.toggleAnimation(); - } - ); - const animationSelect = node.addWidget( - "combo", - "animation", - "", - () => "", - { - values: [] - } - ); - animationSelect.callback = (value) => { - const names = load3d.getAnimationNames(); - const index = names.indexOf(value); - if (index !== -1) { - const wasPlaying = load3d.isAnimationPlaying; - if (wasPlaying) { - load3d.toggleAnimation(false); - } - load3d.updateSelectedAnimation(index); - if (wasPlaying) { - load3d.toggleAnimation(true); - } - } - }; return { widget: node.addDOMWidget(inputName, "LOAD_3D_ANIMATION", container) }; } }; }, - init() { - const style = document.createElement("style"); - style.innerText = ` - .comfy-load-3d-animation { - ${load3dCSSCLASS} - } - - .comfy-load-3d-animation canvas { - ${load3dCanvasCSSCLASS} - } - `; - document.head.appendChild(style); - }, async nodeCreated(node) { if (node.constructor.comfyClass !== "Load3DAnimation") return; const [oldWidth, oldHeight] = node.size; @@ -47219,71 +47477,41 @@ app.registerExtension({ const sceneWidget = node.widgets.find((w2) => w2.name === "image"); const container = sceneWidget.element; const load3d = containerToLoad3D.get(container.id); + load3d.setNode(node); const modelWidget = node.widgets.find( (w2) => w2.name === "model_file" ); const material = node.widgets.find((w2) => w2.name === "material"); - const bgColor = node.widgets.find((w2) => w2.name === "bg_color"); const lightIntensity = node.widgets.find( (w2) => w2.name === "light_intensity" ); const upDirection = node.widgets.find( (w2) => w2.name === "up_direction" ); - const speedSelect = node.widgets.find( - (w2) => w2.name === "animation_speed" - ); - speedSelect.callback = (value) => { - const load3d2 = containerToLoad3D.get(container.id); - if (load3d2) { - load3d2.setAnimationSpeed(parseFloat(value)); - } - }; const fov2 = node.widgets.find((w2) => w2.name === "fov"); - let cameraState; - try { - const cameraInfo = node.properties["Camera Info"]; - if (cameraInfo && typeof cameraInfo === "string" && cameraInfo.trim() !== "") { - cameraState = JSON.parse(cameraInfo); - } - } catch (error) { - console.warn("Failed to parse camera state:", error); - cameraState = void 0; - } - configureLoad3D( - load3d, + let cameraState = node.properties["Camera Info"]; + const config = new Load3DConfiguration(load3d); + config.configure( "input", modelWidget, material, - bgColor, lightIntensity, upDirection, fov2, - cameraState, - (load3d2) => { - const animationLoad3d = load3d2; - const names = animationLoad3d.getAnimationNames(); - const animationSelect = node.widgets.find( - (w2) => w2.name === "animation" - ); - animationSelect.options.values = names; - if (names.length) { - animationSelect.value = names[0]; - } - } + cameraState ); const w = node.widgets.find((w2) => w2.name === "width"); const h = node.widgets.find((w2) => w2.name === "height"); sceneWidget.serializeValue = async () => { - node.properties["Camera Info"] = JSON.stringify(load3d.getCameraState()); + node.properties["Camera Info"] = load3d.getCameraState(); load3d.toggleAnimation(false); const { scene: imageData, mask: maskData } = await load3d.captureScene( w.value, h.value ); const [data, dataMask] = await Promise.all([ - uploadTempImage(imageData, "scene"), - uploadTempImage(maskData, "scene_mask") + Load3dUtils.uploadTempImage(imageData, "scene"), + Load3dUtils.uploadTempImage(maskData, "scene_mask") ]); return { image: `threed/${data.name} [temp]`, @@ -47333,19 +47561,6 @@ app.registerExtension({ } }; }, - init() { - const style = document.createElement("style"); - style.innerText = ` - .comfy-preview-3d { - ${load3dCSSCLASS} - } - - .comfy-preview-3d canvas { - ${load3dCanvasCSSCLASS} - } - `; - document.head.appendChild(style); - }, async nodeCreated(node) { if (node.constructor.comfyClass !== "Preview3D") return; const [oldWidth, oldHeight] = node.size; @@ -47354,11 +47569,11 @@ app.registerExtension({ const sceneWidget = node.widgets.find((w) => w.name === "image"); const container = sceneWidget.element; const load3d = containerToLoad3D.get(container.id); + load3d.setNode(node); const modelWidget = node.widgets.find( (w) => w.name === "model_file" ); const material = node.widgets.find((w) => w.name === "material"); - const bgColor = node.widgets.find((w) => w.name === "bg_color"); const lightIntensity = node.widgets.find( (w) => w.name === "light_intensity" ); @@ -47376,12 +47591,100 @@ app.registerExtension({ useToastStore().addAlert(msg); } modelWidget.value = filePath.replaceAll("\\", "/"); - configureLoad3D( - load3d, + const config = new Load3DConfiguration(load3d); + config.configure( + "output", + modelWidget, + material, + lightIntensity, + upDirection, + fov2 + ); + }; + } +}); +app.registerExtension({ + name: "Comfy.Preview3DAnimation", + async beforeRegisterNodeDef(nodeType, nodeData) { + if ( + // @ts-expect-error ComfyNode + ["Preview3DAnimation"].includes(nodeType.comfyClass) + ) { + nodeData.input.required.image = ["PREVIEW_3D_ANIMATION"]; + } + }, + getCustomWidgets(app2) { + return { + PREVIEW_3D_ANIMATION(node, inputName) { + let load3dNode = app2.graph._nodes.filter( + (wi) => wi.type == "Preview3DAnimation" + ); + const container = document.createElement("div"); + container.id = `comfy-preview-3d-animation-${load3dNode.length}`; + container.classList.add("comfy-preview-3d-animation"); + const load3d = new Load3dAnimation(container); + containerToLoad3D.set(container.id, load3d); + node.onResize = function() { + if (load3d) { + load3d.handleResize(); + } + }; + const origOnRemoved = node.onRemoved; + node.onRemoved = function() { + if (load3d) { + load3d.remove(); + } + containerToLoad3D.delete(container.id); + origOnRemoved?.apply(this, []); + }; + node.onDrawBackground = function() { + load3d.renderer.domElement.hidden = this.flags.collapsed ?? false; + }; + return { + widget: node.addDOMWidget( + inputName, + "PREVIEW_3D_ANIMATION", + container + ) + }; + } + }; + }, + async nodeCreated(node) { + if (node.constructor.comfyClass !== "Preview3DAnimation") return; + const [oldWidth, oldHeight] = node.size; + node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 550)]); + await nextTick(); + const sceneWidget = node.widgets.find((w) => w.name === "image"); + const container = sceneWidget.element; + const load3d = containerToLoad3D.get(container.id); + load3d.setNode(node); + const modelWidget = node.widgets.find( + (w) => w.name === "model_file" + ); + const material = node.widgets.find((w) => w.name === "material"); + const lightIntensity = node.widgets.find( + (w) => w.name === "light_intensity" + ); + const upDirection = node.widgets.find( + (w) => w.name === "up_direction" + ); + const fov2 = node.widgets.find((w) => w.name === "fov"); + const onExecuted = node.onExecuted; + node.onExecuted = function(message) { + onExecuted?.apply(this, arguments); + let filePath = message.model_file[0]; + if (!filePath) { + const msg = "unable to get model file path."; + console.error(msg); + useToastStore().addAlert(msg); + } + modelWidget.value = filePath.replaceAll("\\", "/"); + const config = new Load3DConfiguration(load3d); + config.configure( "output", modelWidget, material, - bgColor, lightIntensity, upDirection, fov2 @@ -53546,4 +53849,4 @@ app.registerExtension({ }); } }); -//# sourceMappingURL=index-je62U6DH.js.map +//# sourceMappingURL=index-BPn8eYlx.js.map diff --git a/web/assets/GraphView-CDDCHVO0.js b/web/assets/index-BWow9lpT.js similarity index 51% rename from web/assets/GraphView-CDDCHVO0.js rename to web/assets/index-BWow9lpT.js index 34b0cd73..25679fc8 100644 --- a/web/assets/GraphView-CDDCHVO0.js +++ b/web/assets/index-BWow9lpT.js @@ -1,122 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, u as useExecutionStore, c as computed, a as useSettingStore, b as useWorkflowStore, e as useTitle, o as openBlock, f as createElementBlock, g as useWorkspaceStore, w as watchEffect, h as app, r as resolveDirective, i as withDirectives, v as vShow, j as unref, k as createVNode, s as showNativeMenu, l as script$d, m as createBaseVNode, n as normalizeStyle, p as pushScopeId, q as popScopeId, _ as _export_sfc, t as onMounted, x as onBeforeUnmount, B as BaseStyle, y as script$e, z as getWidth, A as getHeight, C as getOuterWidth, D as getOuterHeight, E as getVNodeProp, F as isArray, G as mergeProps, H as Fragment, I as renderList, J as createBlock, K as resolveDynamicComponent, L as createCommentVNode, M as renderSlot, N as useSidebarTabStore, O as useBottomPanelStore, P as withCtx, Q as getAttribute, R as findSingle, S as focus, T as equals, U as Ripple, V as normalizeClass, W as getOffset, X as script$f, Y as script$g, Z as toDisplayString, $ as script$h, a0 as markRaw, a1 as defineStore, a2 as shallowRef, a3 as useI18n, a4 as useCommandStore, a5 as LiteGraph, a6 as useColorPaletteStore, a7 as watch, a8 as useNodeDefStore, a9 as BadgePosition, aa as LGraphBadge, ab as _, ac as NodeBadgeMode, ad as ref, ae as useEventListener, af as nextTick, ag as st, ah as normalizeI18nKey, ai as LGraphGroup, aj as LGraphNode, ak as EditableText, al as isNotEmpty, am as UniqueComponentId, an as ZIndex, ao as resolveFieldData, ap as OverlayEventBus, aq as isEmpty, ar as addStyle, as as relativePosition, at as absolutePosition, au as ConnectedOverlayScrollHandler, av as isTouchDevice, aw as findLastIndex, ax as script$i, ay as script$j, az as script$k, aA as script$l, aB as script$m, aC as script$n, aD as resolveComponent, aE as Transition, aF as createSlots, aG as createTextVNode, aH as useNodeFrequencyStore, aI as useNodeBookmarkStore, aJ as highlightQuery, aK as script$o, aL as formatNumberWithSuffix, aM as NodeSourceType, aN as NodePreview, aO as NodeSearchFilter, aP as script$p, aQ as SearchFilterChip, aR as useLitegraphService, aS as storeToRefs, aT as isRef, aU as toRaw, aV as LinkReleaseTriggerAction, aW as script$q, aX as useUserStore, aY as useDialogStore, aZ as SettingDialogHeader, a_ as SettingDialogContent, a$ as useKeybindingStore, b0 as Teleport, b1 as usePragmaticDraggable, b2 as usePragmaticDroppable, b3 as withModifiers, b4 as useWorkflowService, b5 as useWorkflowBookmarkStore, b6 as script$r, b7 as script$s, b8 as script$t, b9 as LinkMarkerShape, ba as useModelToNodeStore, bb as getStorageValue, bc as CanvasPointer, bd as IS_CONTROL_WIDGET, be as updateControlWidgetLabel, bf as useColorPaletteService, bg as setStorageValue, bh as api, bi as LGraph, bj as LLink, bk as DragAndScale, bl as LGraphCanvas, bm as ContextMenu, bn as ChangeTracker, bo as ComfyNodeDefImpl, bp as ComfyModelDef, bq as script$u, br as script$v, bs as script$w, bt as script$x, bu as script$y, bv as normalizeProps, bw as ToastEventBus, bx as setAttribute, by as TransitionGroup, bz as useToast, bA as useToastStore, bB as resolve, bC as nestedPosition, bD as script$z, bE as isPrintableCharacter, bF as useQueueSettingsStore, bG as script$A, bH as useQueuePendingTaskCountStore, bI as useLocalStorage, bJ as useDraggable, bK as watchDebounced, bL as inject, bM as useElementBounding, bN as script$B, bO as lodashExports, bP as useEventBus, bQ as script$C, bR as guardReactiveProps, bS as useMenuItemStore, bT as isElectron, bU as provide, bV as electronAPI, bW as useDialogService, bX as LGraphEventMode, bY as useQueueStore, bZ as DEFAULT_DARK_COLOR_PALETTE, b_ as DEFAULT_LIGHT_COLOR_PALETTE, b$ as i18n, c0 as useErrorHandling, c1 as useModelStore } from "./index-QvfM__ze.js"; -import { s as script$D } from "./index-Q1cQr26V.js"; -import { u as useKeybindingService } from "./keybindingService-Cak1En5n.js"; -import { u as useServerConfigStore } from "./serverConfigStore-DCme3xlV.js"; -const DEFAULT_TITLE = "ComfyUI"; -const TITLE_SUFFIX = " - ComfyUI"; -const _sfc_main$u = /* @__PURE__ */ defineComponent({ - __name: "BrowserTabTitle", - setup(__props) { - const executionStore = useExecutionStore(); - const executionText = computed( - () => executionStore.isIdle ? "" : `[${executionStore.executionProgress}%]` - ); - const settingStore = useSettingStore(); - const betaMenuEnabled = computed( - () => settingStore.get("Comfy.UseNewMenu") !== "Disabled" - ); - const workflowStore = useWorkflowStore(); - const isUnsavedText = computed( - () => workflowStore.activeWorkflow?.isModified || !workflowStore.activeWorkflow?.isPersisted ? " *" : "" - ); - const workflowNameText = computed(() => { - const workflowName = workflowStore.activeWorkflow?.filename; - return workflowName ? isUnsavedText.value + workflowName + TITLE_SUFFIX : DEFAULT_TITLE; - }); - const nodeExecutionTitle = computed( - () => executionStore.executingNode && executionStore.executingNodeProgress ? `${executionText.value}[${executionStore.executingNodeProgress}%] ${executionStore.executingNode.type}` : "" - ); - const workflowTitle = computed( - () => executionText.value + (betaMenuEnabled.value ? workflowNameText.value : DEFAULT_TITLE) - ); - const title = computed(() => nodeExecutionTitle.value || workflowTitle.value); - useTitle(title); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div"); - }; - } -}); -const _withScopeId$9 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-7ed57d1a"), n = n(), popScopeId(), n), "_withScopeId$9"); -const _hoisted_1$q = { class: "window-actions-spacer" }; -const _sfc_main$t = /* @__PURE__ */ defineComponent({ - __name: "MenuHamburger", - setup(__props) { - const workspaceState = useWorkspaceStore(); - const settingStore = useSettingStore(); - const exitFocusMode = /* @__PURE__ */ __name(() => { - workspaceState.focusMode = false; - }, "exitFocusMode"); - watchEffect(() => { - if (settingStore.get("Comfy.UseNewMenu") !== "Disabled") { - return; - } - if (workspaceState.focusMode) { - app.ui.menuContainer.style.display = "none"; - } else { - app.ui.menuContainer.style.display = "block"; - } - }); - const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); - const positionCSS = computed( - () => ( - // 'Bottom' menuSetting shows the hamburger button in the bottom right corner - // 'Disabled', 'Top' menuSetting shows the hamburger button in the top right corner - menuSetting.value === "Bottom" ? { bottom: "0px", right: "0px" } : { top: "0px", right: "0px" } - ) - ); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createElementBlock("div", { - class: "comfy-menu-hamburger no-drag", - style: normalizeStyle(positionCSS.value) - }, [ - withDirectives(createVNode(unref(script$d), { - icon: "pi pi-bars", - severity: "secondary", - text: "", - size: "large", - "aria-label": _ctx.$t("menu.showMenu"), - "aria-live": "assertive", - onClick: exitFocusMode, - onContextmenu: unref(showNativeMenu) - }, null, 8, ["aria-label", "onContextmenu"]), [ - [_directive_tooltip, { value: _ctx.$t("menu.showMenu"), showDelay: 300 }] - ]), - withDirectives(createBaseVNode("div", _hoisted_1$q, null, 512), [ - [vShow, menuSetting.value !== "Bottom"] - ]) - ], 4)), [ - [vShow, unref(workspaceState).focusMode] - ]); - }; - } -}); -const MenuHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-7ed57d1a"]]); -const _sfc_main$s = /* @__PURE__ */ defineComponent({ - __name: "UnloadWindowConfirmDialog", - setup(__props) { - const settingStore = useSettingStore(); - const workflowStore = useWorkflowStore(); - const handleBeforeUnload = /* @__PURE__ */ __name((event) => { - if (settingStore.get("Comfy.Window.UnloadConfirmation") && workflowStore.modifiedWorkflows.length > 0) { - event.preventDefault(); - return true; - } - return void 0; - }, "handleBeforeUnload"); - onMounted(() => { - window.addEventListener("beforeunload", handleBeforeUnload); - }); - onBeforeUnmount(() => { - window.removeEventListener("beforeunload", handleBeforeUnload); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div"); - }; - } -}); +import { bA as BaseStyle, bB as script$f, cQ as getWidth, d4 as getHeight, c3 as getOuterWidth, d5 as getOuterHeight, c_ as isRTL, cU as getVNodeProp, d6 as isArray, o as openBlock, f as createElementBlock, as as mergeProps, F as Fragment, D as renderList, y as createBlock, C as resolveDynamicComponent, m as createBaseVNode, B as createCommentVNode, A as renderSlot, bP as getAttribute, bO as findSingle, bE as focus, ce as equals, bS as Ripple, r as resolveDirective, i as withDirectives, z as withCtx, ai as normalizeClass, cR as getOffset, cb as script$g, bU as script$h, cd as isNotEmpty, b_ as script$i, bT as UniqueComponentId, bC as ZIndex, cc as resolveFieldData, c8 as OverlayEventBus, ci as isEmpty, b$ as addStyle, c2 as relativePosition, c4 as absolutePosition, c0 as ConnectedOverlayScrollHandler, c1 as isTouchDevice, cj as findLastIndex, bg as script$j, cH as script$k, bI as script$l, bR as script$m, ck as script$n, a8 as script$o, bK as resolveComponent, n as normalizeStyle, k as createVNode, E as toDisplayString, bL as Transition, co as createSlots, a7 as createTextVNode, cu as script$p, bZ as script$q, cA as script$r, cB as script$s, bJ as script$t, cv as normalizeProps, d7 as ToastEventBus, c9 as setAttribute, d8 as TransitionGroup, cq as resolve, d9 as nestedPosition, cf as script$u, ch as isPrintableCharacter, l as script$v, cD as script$w, cx as guardReactiveProps } from "./index-CmVtQCAR.js"; +import { s as script$x } from "./index-I0brO37W.js"; var theme$7 = /* @__PURE__ */ __name(function theme(_ref) { var dt = _ref.dt; return "\n.p-splitter {\n display: flex;\n flex-wrap: nowrap;\n border: 1px solid ".concat(dt("splitter.border.color"), ";\n background: ").concat(dt("splitter.background"), ";\n border-radius: ").concat(dt("border.radius.md"), ";\n color: ").concat(dt("splitter.color"), ";\n}\n\n.p-splitter-vertical {\n flex-direction: column;\n}\n\n.p-splitter-gutter {\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n background: ").concat(dt("splitter.gutter.background"), ";\n}\n\n.p-splitter-gutter-handle {\n border-radius: ").concat(dt("splitter.handle.border.radius"), ";\n background: ").concat(dt("splitter.handle.background"), ";\n transition: outline-color ").concat(dt("splitter.transition.duration"), ", box-shadow ").concat(dt("splitter.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-splitter-gutter-handle:focus-visible {\n box-shadow: ").concat(dt("splitter.handle.focus.ring.shadow"), ";\n outline: ").concat(dt("splitter.handle.focus.ring.width"), " ").concat(dt("splitter.handle.focus.ring.style"), " ").concat(dt("splitter.handle.focus.ring.color"), ";\n outline-offset: ").concat(dt("splitter.handle.focus.ring.offset"), ";\n}\n\n.p-splitter-horizontal.p-splitter-resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.p-splitter-vertical.p-splitter-resizing {\n cursor: row-resize;\n user-select: none;\n}\n\n.p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle {\n height: ").concat(dt("splitter.handle.size"), ";\n width: 100%;\n}\n\n.p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle {\n width: ").concat(dt("splitter.handle.size"), ";\n height: 100%;\n}\n\n.p-splitter-horizontal > .p-splitter-gutter {\n cursor: col-resize;\n}\n\n.p-splitter-vertical > .p-splitter-gutter {\n cursor: row-resize;\n}\n\n.p-splitterpanel {\n flex-grow: 1;\n overflow: hidden;\n}\n\n.p-splitterpanel-nested {\n display: flex;\n}\n\n.p-splitterpanel .p-splitter {\n flex-grow: 1;\n border: 0 none;\n}\n"); @@ -148,7 +33,7 @@ var SplitterStyle = BaseStyle.extend({ }); var script$1$a = { name: "BaseSplitter", - "extends": script$e, + "extends": script$f, props: { layout: { type: String, @@ -172,7 +57,7 @@ var script$1$a = { } }, style: SplitterStyle, - provide: /* @__PURE__ */ __name(function provide2() { + provide: /* @__PURE__ */ __name(function provide() { return { $pcSplitter: this, $parentInstance: this @@ -209,7 +94,7 @@ function _arrayLikeToArray$2(r, a) { return n; } __name(_arrayLikeToArray$2, "_arrayLikeToArray$2"); -var script$c = { +var script$e = { name: "Splitter", "extends": script$1$a, inheritAttrs: false, @@ -235,27 +120,7 @@ var script$c = { }; }, "data"), mounted: /* @__PURE__ */ __name(function mounted() { - var _this = this; - if (this.panels && this.panels.length) { - var initialized = false; - if (this.isStateful()) { - initialized = this.restoreState(); - } - if (!initialized) { - var children = _toConsumableArray$2(this.$el.children).filter(function(child) { - return child.getAttribute("data-pc-name") === "splitterpanel"; - }); - var _panelSizes = []; - this.panels.map(function(panel, i) { - var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null; - var panelSize = panelInitialSize || 100 / _this.panels.length; - _panelSizes[i] = panelSize; - children[i].style.flexBasis = "calc(" + panelSize + "% - " + (_this.panels.length - 1) * _this.gutterSize + "px)"; - }); - this.panelSizes = _panelSizes; - this.prevSize = parseFloat(_panelSizes[0]).toFixed(4); - } - } + this.initializePanels(); }, "mounted"), beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount() { this.clear(); @@ -265,6 +130,29 @@ var script$c = { isSplitterPanel: /* @__PURE__ */ __name(function isSplitterPanel(child) { return child.type.name === "SplitterPanel"; }, "isSplitterPanel"), + initializePanels: /* @__PURE__ */ __name(function initializePanels() { + var _this = this; + if (this.panels && this.panels.length) { + var initialized = false; + if (this.isStateful()) { + initialized = this.restoreState(); + } + if (!initialized) { + var children = _toConsumableArray$2(this.$el.children).filter(function(child) { + return child.getAttribute("data-pc-name") === "splitterpanel"; + }); + var _panelSizes = []; + this.panels.map(function(panel, i) { + var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null; + var panelSize = panelInitialSize || 100 / _this.panels.length; + _panelSizes[i] = panelSize; + children[i].style.flexBasis = "calc(" + panelSize + "% - " + (_this.panels.length - 1) * _this.gutterSize + "px)"; + }); + this.panelSizes = _panelSizes; + this.prevSize = parseFloat(_panelSizes[0]).toFixed(4); + } + } + }, "initializePanels"), onResizeStart: /* @__PURE__ */ __name(function onResizeStart(event, index, isKeyDown) { this.gutterElement = event.currentTarget || event.target.parentElement; this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el); @@ -300,8 +188,15 @@ var script$c = { newNextPanelSize = 100 * (this.nextPanelSize + step) / this.size; } } else { - if (this.horizontal) newPos = event.pageX * 100 / this.size - this.startPos * 100 / this.size; - else newPos = event.pageY * 100 / this.size - this.startPos * 100 / this.size; + if (this.horizontal) { + if (isRTL(this.$el)) { + newPos = (this.startPos - event.pageX) * 100 / this.size; + } else { + newPos = (event.pageX - this.startPos) * 100 / this.size; + } + } else { + newPos = (event.pageY - this.startPos) * 100 / this.size; + } newPrevPanelSize = this.prevPanelSize + newPos; newNextPanelSize = this.nextPanelSize - newPos; } @@ -512,7 +407,10 @@ var script$c = { return true; } return false; - }, "restoreState") + }, "restoreState"), + resetState: /* @__PURE__ */ __name(function resetState() { + this.initializePanels(); + }, "resetState") }, computed: { panels: /* @__PURE__ */ __name(function panels() { @@ -552,9 +450,9 @@ var script$c = { }, "getPTOptions") } }; -var _hoisted_1$p = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; -var _hoisted_2$j = ["aria-orientation", "aria-valuenow", "onKeydown"]; -function render$j(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$7 = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; +var _hoisted_2$4 = ["aria-orientation", "aria-valuenow", "onKeydown"]; +function render$d(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root"), style: _ctx.sx("root"), @@ -597,11 +495,11 @@ function render$j(_ctx, _cache, $props, $setup, $data, $options) { return $options.onGutterKeyDown($event, i); }, "onKeydown"), ref_for: true - }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$j)], 16, _hoisted_1$p)) : createCommentVNode("", true)], 64); + }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$4)], 16, _hoisted_1$7)) : createCommentVNode("", true)], 64); }), 128))], 16); } -__name(render$j, "render$j"); -script$c.render = render$j; +__name(render$d, "render$d"); +script$e.render = render$d; var classes$9 = { root: /* @__PURE__ */ __name(function root3(_ref) { var instance = _ref.instance; @@ -616,7 +514,7 @@ var SplitterPanelStyle = BaseStyle.extend({ }); var script$1$9 = { name: "BaseSplitterPanel", - "extends": script$e, + "extends": script$f, props: { size: { type: Number, @@ -628,14 +526,14 @@ var script$1$9 = { } }, style: SplitterPanelStyle, - provide: /* @__PURE__ */ __name(function provide3() { + provide: /* @__PURE__ */ __name(function provide2() { return { $pcSplitterPanel: this, $parentInstance: this }; }, "provide") }; -var script$b = { +var script$d = { name: "SplitterPanel", "extends": script$1$9, inheritAttrs: false, @@ -661,102 +559,14 @@ var script$b = { }, "getPTOptions") } }; -function render$i(_ctx, _cache, $props, $setup, $data, $options) { +function render$c(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps({ ref: "container", "class": _ctx.cx("root") }, _ctx.ptmi("root", $options.getPTOptions)), [renderSlot(_ctx.$slots, "default")], 16); } -__name(render$i, "render$i"); -script$b.render = render$i; -const _sfc_main$r = /* @__PURE__ */ defineComponent({ - __name: "LiteGraphCanvasSplitterOverlay", - setup(__props) { - const settingStore = useSettingStore(); - const sidebarLocation = computed( - () => settingStore.get("Comfy.Sidebar.Location") - ); - const sidebarPanelVisible = computed( - () => useSidebarTabStore().activeSidebarTab !== null - ); - const bottomPanelVisible = computed( - () => useBottomPanelStore().bottomPanelVisible - ); - const activeSidebarTabId = computed( - () => useSidebarTabStore().activeSidebarTabId - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$c), { - class: "splitter-overlay-root splitter-overlay", - "pt:gutter": sidebarPanelVisible.value ? "" : "hidden", - key: activeSidebarTabId.value, - stateKey: activeSidebarTabId.value, - stateStorage: "local" - }, { - default: withCtx(() => [ - sidebarLocation.value === "left" ? withDirectives((openBlock(), createBlock(unref(script$b), { - key: 0, - class: "side-bar-panel", - minSize: 10, - size: 20 - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "side-bar-panel", {}, void 0, true) - ]), - _: 3 - }, 512)), [ - [vShow, sidebarPanelVisible.value] - ]) : createCommentVNode("", true), - createVNode(unref(script$b), { size: 100 }, { - default: withCtx(() => [ - createVNode(unref(script$c), { - class: "splitter-overlay max-w-full", - layout: "vertical", - "pt:gutter": bottomPanelVisible.value ? "" : "hidden", - stateKey: "bottom-panel-splitter", - stateStorage: "local" - }, { - default: withCtx(() => [ - createVNode(unref(script$b), { class: "graph-canvas-panel relative" }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "graph-canvas-panel", {}, void 0, true) - ]), - _: 3 - }), - withDirectives(createVNode(unref(script$b), { class: "bottom-panel" }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "bottom-panel", {}, void 0, true) - ]), - _: 3 - }, 512), [ - [vShow, bottomPanelVisible.value] - ]) - ]), - _: 3 - }, 8, ["pt:gutter"]) - ]), - _: 3 - }), - sidebarLocation.value === "right" ? withDirectives((openBlock(), createBlock(unref(script$b), { - key: 1, - class: "side-bar-panel", - minSize: 10, - size: 20 - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "side-bar-panel", {}, void 0, true) - ]), - _: 3 - }, 512)), [ - [vShow, sidebarPanelVisible.value] - ]) : createCommentVNode("", true) - ]), - _: 3 - }, 8, ["pt:gutter", "stateKey"]); - }; - } -}); -const LiteGraphCanvasSplitterOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-e50caa15"]]); +__name(render$c, "render$c"); +script$d.render = render$c; var classes$8 = { root: /* @__PURE__ */ __name(function root4(_ref) { var instance = _ref.instance, props = _ref.props; @@ -772,7 +582,7 @@ var TabStyle = BaseStyle.extend({ }); var script$1$8 = { name: "BaseTab", - "extends": script$e, + "extends": script$f, props: { value: { type: [String, Number], @@ -792,14 +602,14 @@ var script$1$8 = { } }, style: TabStyle, - provide: /* @__PURE__ */ __name(function provide4() { + provide: /* @__PURE__ */ __name(function provide3() { return { $pcTab: this, $parentInstance: this }; }, "provide") }; -var script$a = { +var script$c = { name: "Tab", "extends": script$1$8, inheritAttrs: false, @@ -948,7 +758,7 @@ var script$a = { ripple: Ripple } }; -function render$h(_ctx, _cache, $props, $setup, $data, $options) { +function render$b(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, @@ -967,8 +777,8 @@ function render$h(_ctx, _cache, $props, $setup, $data, $options) { onClick: $options.onClick }); } -__name(render$h, "render$h"); -script$a.render = render$h; +__name(render$b, "render$b"); +script$c.render = render$b; var classes$7 = { root: "p-tablist", content: /* @__PURE__ */ __name(function content(_ref) { @@ -988,17 +798,17 @@ var TabListStyle = BaseStyle.extend({ }); var script$1$7 = { name: "BaseTabList", - "extends": script$e, + "extends": script$f, props: {}, style: TabListStyle, - provide: /* @__PURE__ */ __name(function provide5() { + provide: /* @__PURE__ */ __name(function provide4() { return { $pcTabList: this, $parentInstance: this }; }, "provide") }; -var script$9 = { +var script$b = { name: "TabList", "extends": script$1$7, inheritAttrs: false, @@ -1044,16 +854,24 @@ var script$9 = { }, "onScroll"), onPrevButtonClick: /* @__PURE__ */ __name(function onPrevButtonClick() { var content2 = this.$refs.content; - var width = getWidth(content2); - var pos = content2.scrollLeft - width; - content2.scrollLeft = pos <= 0 ? 0 : pos; + var buttonWidths = this.getVisibleButtonWidths(); + var width = getWidth(content2) - buttonWidths; + var currentScrollLeft = Math.abs(content2.scrollLeft); + var scrollStep = width * 0.8; + var targetScrollLeft = currentScrollLeft - scrollStep; + var scrollLeft = Math.max(targetScrollLeft, 0); + content2.scrollLeft = isRTL(content2) ? -1 * scrollLeft : scrollLeft; }, "onPrevButtonClick"), onNextButtonClick: /* @__PURE__ */ __name(function onNextButtonClick() { var content2 = this.$refs.content; - var width = getWidth(content2) - this.getVisibleButtonWidths(); - var pos = content2.scrollLeft + width; - var lastPos = content2.scrollWidth - width; - content2.scrollLeft = pos >= lastPos ? lastPos : pos; + var buttonWidths = this.getVisibleButtonWidths(); + var width = getWidth(content2) - buttonWidths; + var currentScrollLeft = Math.abs(content2.scrollLeft); + var scrollStep = width * 0.8; + var targetScrollLeft = currentScrollLeft + scrollStep; + var maxScrollLeft = content2.scrollWidth - width; + var scrollLeft = Math.min(targetScrollLeft, maxScrollLeft); + content2.scrollLeft = isRTL(content2) ? -1 * scrollLeft : scrollLeft; }, "onNextButtonClick"), bindResizeObserver: /* @__PURE__ */ __name(function bindResizeObserver() { var _this2 = this; @@ -1080,7 +898,8 @@ var script$9 = { }, "updateInkBar"), updateButtonState: /* @__PURE__ */ __name(function updateButtonState() { var _this$$refs2 = this.$refs, list = _this$$refs2.list, content2 = _this$$refs2.content; - var scrollLeft = content2.scrollLeft, scrollTop = content2.scrollTop, scrollWidth = content2.scrollWidth, scrollHeight = content2.scrollHeight, offsetWidth = content2.offsetWidth, offsetHeight = content2.offsetHeight; + var scrollTop = content2.scrollTop, scrollWidth = content2.scrollWidth, scrollHeight = content2.scrollHeight, offsetWidth = content2.offsetWidth, offsetHeight = content2.offsetHeight; + var scrollLeft = Math.abs(content2.scrollLeft); var _ref = [getWidth(content2), getHeight(content2)], width = _ref[0], height = _ref[1]; if (this.$pcTabs.isVertical()) { this.isPrevButtonEnabled = scrollTop !== 0; @@ -1091,10 +910,12 @@ var script$9 = { } }, "updateButtonState"), getVisibleButtonWidths: /* @__PURE__ */ __name(function getVisibleButtonWidths() { - var _this$$refs3 = this.$refs, prevBtn = _this$$refs3.prevBtn, nextBtn = _this$$refs3.nextBtn; - return [prevBtn, nextBtn].reduce(function(acc, el) { - return el ? acc + getWidth(el) : acc; - }, 0); + var _this$$refs3 = this.$refs, prevButton = _this$$refs3.prevButton, nextButton = _this$$refs3.nextButton; + var width = 0; + if (this.showNavigators) { + width = ((prevButton === null || prevButton === void 0 ? void 0 : prevButton.offsetWidth) || 0) + ((nextButton === null || nextButton === void 0 ? void 0 : nextButton.offsetWidth) || 0); + } + return width; }, "getVisibleButtonWidths") }, computed: { @@ -1115,17 +936,17 @@ var script$9 = { }, "nextButtonAriaLabel") }, components: { - ChevronLeftIcon: script$f, - ChevronRightIcon: script$g + ChevronLeftIcon: script$g, + ChevronRightIcon: script$h }, directives: { ripple: Ripple } }; -var _hoisted_1$o = ["aria-label", "tabindex"]; -var _hoisted_2$i = ["aria-orientation"]; -var _hoisted_3$h = ["aria-label", "tabindex"]; -function render$g(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$6 = ["aria-label", "tabindex"]; +var _hoisted_2$3 = ["aria-orientation"]; +var _hoisted_3$3 = ["aria-label", "tabindex"]; +function render$a(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("div", mergeProps({ ref: "list", @@ -1143,7 +964,7 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) { "data-pc-group-section": "navigator" }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.previcon || "ChevronLeftIcon"), mergeProps({ "aria-hidden": "true" - }, _ctx.ptm("prevIcon")), null, 16))], 16, _hoisted_1$o)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + }, _ctx.ptm("prevIcon")), null, 16))], 16, _hoisted_1$6)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ ref: "content", "class": _ctx.cx("content"), onScroll: _cache[1] || (_cache[1] = function() { @@ -1159,7 +980,7 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) { "class": _ctx.cx("activeBar"), role: "presentation", "aria-hidden": "true" - }, _ctx.ptm("activeBar")), null, 16)], 16, _hoisted_2$i)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ + }, _ctx.ptm("activeBar")), null, 16)], 16, _hoisted_2$3)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ key: 1, ref: "nextButton", "class": _ctx.cx("nextButton"), @@ -1172,134 +993,13 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) { "data-pc-group-section": "navigator" }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.nexticon || "ChevronRightIcon"), mergeProps({ "aria-hidden": "true" - }, _ctx.ptm("nextIcon")), null, 16))], 16, _hoisted_3$h)), [[_directive_ripple]]) : createCommentVNode("", true)], 16); + }, _ctx.ptm("nextIcon")), null, 16))], 16, _hoisted_3$3)), [[_directive_ripple]]) : createCommentVNode("", true)], 16); } -__name(render$g, "render$g"); -script$9.render = render$g; -const _sfc_main$q = /* @__PURE__ */ defineComponent({ - __name: "ExtensionSlot", - props: { - extension: {} - }, - setup(__props) { - const props = __props; - const mountCustomExtension = /* @__PURE__ */ __name((extension, el) => { - extension.render(el); - }, "mountCustomExtension"); - onBeforeUnmount(() => { - if (props.extension.type === "custom" && props.extension.destroy) { - props.extension.destroy(); - } - }); - return (_ctx, _cache) => { - return _ctx.extension.type === "vue" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.extension.component), { key: 0 })) : (openBlock(), createElementBlock("div", { - key: 1, - ref: /* @__PURE__ */ __name((el) => { - if (el) - mountCustomExtension( - props.extension, - el - ); - }, "ref") - }, null, 512)); - }; - } -}); -const _hoisted_1$n = { class: "flex flex-col h-full" }; -const _hoisted_2$h = { class: "w-full flex justify-between" }; -const _hoisted_3$g = { class: "tabs-container" }; -const _hoisted_4$6 = { class: "font-bold" }; -const _hoisted_5$4 = { class: "flex-grow h-0" }; -const _sfc_main$p = /* @__PURE__ */ defineComponent({ - __name: "BottomPanel", - setup(__props) { - const bottomPanelStore = useBottomPanelStore(); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$n, [ - createVNode(unref(script$h), { - value: unref(bottomPanelStore).activeBottomPanelTabId, - "onUpdate:value": _cache[1] || (_cache[1] = ($event) => unref(bottomPanelStore).activeBottomPanelTabId = $event) - }, { - default: withCtx(() => [ - createVNode(unref(script$9), { "pt:tabList": "border-none" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_2$h, [ - createBaseVNode("div", _hoisted_3$g, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(unref(bottomPanelStore).bottomPanelTabs, (tab) => { - return openBlock(), createBlock(unref(script$a), { - key: tab.id, - value: tab.id, - class: "p-3 border-none" - }, { - default: withCtx(() => [ - createBaseVNode("span", _hoisted_4$6, toDisplayString(tab.title.toUpperCase()), 1) - ]), - _: 2 - }, 1032, ["value"]); - }), 128)) - ]), - createVNode(unref(script$d), { - class: "justify-self-end", - icon: "pi pi-times", - severity: "secondary", - size: "small", - text: "", - onClick: _cache[0] || (_cache[0] = ($event) => unref(bottomPanelStore).bottomPanelVisible = false) - }) - ]) - ]), - _: 1 - }) - ]), - _: 1 - }, 8, ["value"]), - createBaseVNode("div", _hoisted_5$4, [ - unref(bottomPanelStore).bottomPanelVisible && unref(bottomPanelStore).activeBottomPanelTab ? (openBlock(), createBlock(_sfc_main$q, { - key: 0, - extension: unref(bottomPanelStore).activeBottomPanelTab - }, null, 8, ["extension"])) : createCommentVNode("", true) - ]) - ]); - }; - } -}); -const _hoisted_1$m = { - viewBox: "0 0 1024 1024", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$g = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M921.088 103.232L584.832 889.024L465.52 544.512L121.328 440.48zM1004.46.769c-6.096 0-13.52 1.728-22.096 5.36L27.708 411.2c-34.383 14.592-36.56 42.704-4.847 62.464l395.296 123.584l129.36 403.264c9.28 15.184 20.496 22.72 31.263 22.72c11.936 0 23.296-9.152 31.04-27.248l408.272-953.728C1029.148 16.368 1022.86.769 1004.46.769" -}, null, -1); -const _hoisted_3$f = [ - _hoisted_2$g -]; -function render$f(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$m, [..._hoisted_3$f]); -} -__name(render$f, "render$f"); -const __unplugin_components_1$2 = markRaw({ name: "simple-line-icons-cursor", render: render$f }); -const _hoisted_1$l = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$f = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M10.05 23q-.75 0-1.4-.337T7.575 21.7L1.2 12.375l.6-.575q.475-.475 1.125-.55t1.175.3L7 13.575V4q0-.425.288-.712T8 3t.713.288T9 4v13.425l-3.7-2.6l3.925 5.725q.125.2.35.325t.475.125H17q.825 0 1.413-.587T19 19V5q0-.425.288-.712T20 4t.713.288T21 5v14q0 1.65-1.175 2.825T17 23zM11 12V2q0-.425.288-.712T12 1t.713.288T13 2v10zm4 0V3q0-.425.288-.712T16 2t.713.288T17 3v9zm-2.85 4.5" -}, null, -1); -const _hoisted_3$e = [ - _hoisted_2$f -]; -function render$e(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$l, [..._hoisted_3$e]); -} -__name(render$e, "render$e"); -const __unplugin_components_0$2 = markRaw({ name: "material-symbols-pan-tool-outline", render: render$e }); +__name(render$a, "render$a"); +script$b.render = render$a; var theme$6 = /* @__PURE__ */ __name(function theme2(_ref) { _ref.dt; - return "\n.p-buttongroup .p-button {\n margin: 0;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover {\n border-right: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-buttongroup .p-button:focus {\n position: relative;\n z-index: 1;\n}\n"; + return "\n.p-buttongroup {\n display: inline-flex;\n}\n\n.p-buttongroup .p-button {\n margin: 0;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover {\n border-inline-end: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.p-buttongroup .p-button:focus {\n position: relative;\n z-index: 1;\n}\n"; }, "theme"); var classes$6 = { root: "p-buttongroup p-component" @@ -1311,469 +1011,31 @@ var ButtonGroupStyle = BaseStyle.extend({ }); var script$1$6 = { name: "BaseButtonGroup", - "extends": script$e, + "extends": script$f, style: ButtonGroupStyle, - provide: /* @__PURE__ */ __name(function provide6() { + provide: /* @__PURE__ */ __name(function provide5() { return { $pcButtonGroup: this, $parentInstance: this }; }, "provide") }; -var script$8 = { +var script$a = { name: "ButtonGroup", "extends": script$1$6, inheritAttrs: false }; -function render$d(_ctx, _cache, $props, $setup, $data, $options) { +function render$9(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("span", mergeProps({ "class": _ctx.cx("root"), role: "group" }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); } -__name(render$d, "render$d"); -script$8.render = render$d; -const useTitleEditorStore = defineStore("titleEditor", () => { - const titleEditorTarget = shallowRef(null); - return { - titleEditorTarget - }; -}); -const useCanvasStore = defineStore("canvas", () => { - const canvas = shallowRef(null); - return { - canvas - }; -}); -const _sfc_main$o = /* @__PURE__ */ defineComponent({ - __name: "GraphCanvasMenu", - setup(__props) { - const { t } = useI18n(); - const commandStore = useCommandStore(); - const canvasStore = useCanvasStore(); - const settingStore = useSettingStore(); - const linkHidden = computed( - () => settingStore.get("Comfy.LinkRenderMode") === LiteGraph.HIDDEN_LINK - ); - let interval = null; - const repeat2 = /* @__PURE__ */ __name((command) => { - if (interval) return; - const cmd = /* @__PURE__ */ __name(() => commandStore.execute(command), "cmd"); - cmd(); - interval = window.setInterval(cmd, 100); - }, "repeat"); - const stopRepeat = /* @__PURE__ */ __name(() => { - if (interval) { - clearInterval(interval); - interval = null; - } - }, "stopRepeat"); - return (_ctx, _cache) => { - const _component_i_material_symbols58pan_tool_outline = __unplugin_components_0$2; - const _component_i_simple_line_icons58cursor = __unplugin_components_1$2; - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createBlock(unref(script$8), { class: "p-buttongroup-vertical absolute bottom-[10px] right-[10px] z-[1000] pointer-events-auto" }, { - default: withCtx(() => [ - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: "pi pi-plus", - "aria-label": _ctx.$t("graphCanvasMenu.zoomIn"), - onMousedown: _cache[0] || (_cache[0] = ($event) => repeat2("Comfy.Canvas.ZoomIn")), - onMouseup: stopRepeat - }, null, 8, ["aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.zoomIn"), - void 0, - { left: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: "pi pi-minus", - "aria-label": _ctx.$t("graphCanvasMenu.zoomOut"), - onMousedown: _cache[1] || (_cache[1] = ($event) => repeat2("Comfy.Canvas.ZoomOut")), - onMouseup: stopRepeat - }, null, 8, ["aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.zoomOut"), - void 0, - { left: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: "pi pi-expand", - "aria-label": _ctx.$t("graphCanvasMenu.fitView"), - onClick: _cache[2] || (_cache[2] = () => unref(commandStore).execute("Comfy.Canvas.FitView")) - }, null, 8, ["aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.fitView"), - void 0, - { left: true } - ] - ]), - withDirectives((openBlock(), createBlock(unref(script$d), { - severity: "secondary", - "aria-label": unref(t)( - "graphCanvasMenu." + (unref(canvasStore).canvas?.read_only ? "panMode" : "selectMode") - ), - onClick: _cache[3] || (_cache[3] = () => unref(commandStore).execute("Comfy.Canvas.ToggleLock")) - }, { - icon: withCtx(() => [ - unref(canvasStore).canvas?.read_only ? (openBlock(), createBlock(_component_i_material_symbols58pan_tool_outline, { key: 0 })) : (openBlock(), createBlock(_component_i_simple_line_icons58cursor, { key: 1 })) - ]), - _: 1 - }, 8, ["aria-label"])), [ - [ - _directive_tooltip, - unref(t)( - "graphCanvasMenu." + (unref(canvasStore).canvas?.read_only ? "panMode" : "selectMode") - ) + " (Space)", - void 0, - { left: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: linkHidden.value ? "pi pi-eye-slash" : "pi pi-eye", - "aria-label": _ctx.$t("graphCanvasMenu.toggleLinkVisibility"), - onClick: _cache[4] || (_cache[4] = () => unref(commandStore).execute("Comfy.Canvas.ToggleLinkVisibility")), - "data-testid": "toggle-link-visibility-button" - }, null, 8, ["icon", "aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.toggleLinkVisibility"), - void 0, - { left: true } - ] - ]) - ]), - _: 1 - }); - }; - } -}); -const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-cb8f9a1a"]]); -const _sfc_main$n = /* @__PURE__ */ defineComponent({ - __name: "NodeBadge", - setup(__props) { - const settingStore = useSettingStore(); - const colorPaletteStore = useColorPaletteStore(); - const nodeSourceBadgeMode = computed( - () => settingStore.get("Comfy.NodeBadge.NodeSourceBadgeMode") - ); - const nodeIdBadgeMode = computed( - () => settingStore.get("Comfy.NodeBadge.NodeIdBadgeMode") - ); - const nodeLifeCycleBadgeMode = computed( - () => settingStore.get("Comfy.NodeBadge.NodeLifeCycleBadgeMode") - ); - watch([nodeSourceBadgeMode, nodeIdBadgeMode, nodeLifeCycleBadgeMode], () => { - app.graph?.setDirtyCanvas(true, true); - }); - const nodeDefStore = useNodeDefStore(); - function badgeTextVisible(nodeDef, badgeMode) { - return !(badgeMode === NodeBadgeMode.None || nodeDef?.isCoreNode && badgeMode === NodeBadgeMode.HideBuiltIn); - } - __name(badgeTextVisible, "badgeTextVisible"); - onMounted(() => { - app.registerExtension({ - name: "Comfy.NodeBadge", - nodeCreated(node) { - node.badgePosition = BadgePosition.TopRight; - const badge = computed(() => { - const nodeDef = nodeDefStore.fromLGraphNode(node); - return new LGraphBadge({ - text: _.truncate( - [ - badgeTextVisible(nodeDef, nodeIdBadgeMode.value) ? `#${node.id}` : "", - badgeTextVisible(nodeDef, nodeLifeCycleBadgeMode.value) ? nodeDef?.nodeLifeCycleBadgeText ?? "" : "", - badgeTextVisible(nodeDef, nodeSourceBadgeMode.value) ? nodeDef?.nodeSource?.badgeText ?? "" : "" - ].filter((s) => s.length > 0).join(" "), - { - length: 31 - } - ), - fgColor: colorPaletteStore.completedActivePalette.colors.litegraph_base.BADGE_FG_COLOR, - bgColor: colorPaletteStore.completedActivePalette.colors.litegraph_base.BADGE_BG_COLOR - }); - }); - node.badges.push(() => badge.value); - } - }); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div"); - }; - } -}); -const _sfc_main$m = /* @__PURE__ */ defineComponent({ - __name: "NodeTooltip", - setup(__props) { - let idleTimeout; - const nodeDefStore = useNodeDefStore(); - const tooltipRef = ref(); - const tooltipText = ref(""); - const left = ref(); - const top = ref(); - const hideTooltip = /* @__PURE__ */ __name(() => tooltipText.value = null, "hideTooltip"); - const showTooltip = /* @__PURE__ */ __name(async (tooltip) => { - if (!tooltip) return; - left.value = app.canvas.mouse[0] + "px"; - top.value = app.canvas.mouse[1] + "px"; - tooltipText.value = tooltip; - await nextTick(); - const rect = tooltipRef.value.getBoundingClientRect(); - if (rect.right > window.innerWidth) { - left.value = app.canvas.mouse[0] - rect.width + "px"; - } - if (rect.top < 0) { - top.value = app.canvas.mouse[1] + rect.height + "px"; - } - }, "showTooltip"); - const onIdle = /* @__PURE__ */ __name(() => { - const { canvas } = app; - const node = canvas.node_over; - if (!node) return; - const ctor = node.constructor; - const nodeDef = nodeDefStore.nodeDefsByName[node.type]; - if (ctor.title_mode !== LiteGraph.NO_TITLE && canvas.graph_mouse[1] < node.pos[1]) { - return showTooltip(nodeDef.description); - } - if (node.flags?.collapsed) return; - const inputSlot = canvas.isOverNodeInput( - node, - canvas.graph_mouse[0], - canvas.graph_mouse[1], - [0, 0] - ); - if (inputSlot !== -1) { - const inputName = node.inputs[inputSlot].name; - const translatedTooltip = st( - `nodeDefs.${normalizeI18nKey(node.type)}.inputs.${normalizeI18nKey(inputName)}.tooltip`, - nodeDef.inputs.getInput(inputName)?.tooltip - ); - return showTooltip(translatedTooltip); - } - const outputSlot = canvas.isOverNodeOutput( - node, - canvas.graph_mouse[0], - canvas.graph_mouse[1], - [0, 0] - ); - if (outputSlot !== -1) { - const translatedTooltip = st( - `nodeDefs.${normalizeI18nKey(node.type)}.outputs.${outputSlot}.tooltip`, - nodeDef.outputs.all?.[outputSlot]?.tooltip - ); - return showTooltip(translatedTooltip); - } - const widget = app.canvas.getWidgetAtCursor(); - if (widget && !widget.element) { - const translatedTooltip = st( - `nodeDefs.${normalizeI18nKey(node.type)}.inputs.${normalizeI18nKey(widget.name)}.tooltip`, - nodeDef.inputs.getInput(widget.name)?.tooltip - ); - return showTooltip(widget.tooltip ?? translatedTooltip); - } - }, "onIdle"); - const onMouseMove = /* @__PURE__ */ __name((e) => { - hideTooltip(); - clearTimeout(idleTimeout); - if (e.target.nodeName !== "CANVAS") return; - idleTimeout = window.setTimeout(onIdle, 500); - }, "onMouseMove"); - useEventListener(window, "mousemove", onMouseMove); - useEventListener(window, "click", hideTooltip); - return (_ctx, _cache) => { - return tooltipText.value ? (openBlock(), createElementBlock("div", { - key: 0, - ref_key: "tooltipRef", - ref: tooltipRef, - class: "node-tooltip", - style: normalizeStyle({ left: left.value, top: top.value }) - }, toDisplayString(tooltipText.value), 5)) : createCommentVNode("", true); - }; - } -}); -const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-46859edf"]]); -const _sfc_main$l = /* @__PURE__ */ defineComponent({ - __name: "TitleEditor", - setup(__props) { - const settingStore = useSettingStore(); - const showInput = ref(false); - const editedTitle = ref(""); - const inputStyle = ref({ - position: "fixed", - left: "0px", - top: "0px", - width: "200px", - height: "20px", - fontSize: "12px" - }); - const titleEditorStore = useTitleEditorStore(); - const canvasStore = useCanvasStore(); - const previousCanvasDraggable = ref(true); - const onEdit = /* @__PURE__ */ __name((newValue) => { - if (titleEditorStore.titleEditorTarget && newValue.trim() !== "") { - titleEditorStore.titleEditorTarget.title = newValue.trim(); - app.graph.setDirtyCanvas(true, true); - } - showInput.value = false; - titleEditorStore.titleEditorTarget = null; - canvasStore.canvas.allow_dragcanvas = previousCanvasDraggable.value; - }, "onEdit"); - watch( - () => titleEditorStore.titleEditorTarget, - (target) => { - if (target === null) { - return; - } - editedTitle.value = target.title; - showInput.value = true; - previousCanvasDraggable.value = canvasStore.canvas.allow_dragcanvas; - canvasStore.canvas.allow_dragcanvas = false; - if (target instanceof LGraphGroup) { - const group = target; - const [x, y] = group.pos; - const [w, h] = group.size; - const [left, top] = app.canvasPosToClientPos([x, y]); - inputStyle.value.left = `${left}px`; - inputStyle.value.top = `${top}px`; - const width = w * app.canvas.ds.scale; - const height = group.titleHeight * app.canvas.ds.scale; - inputStyle.value.width = `${width}px`; - inputStyle.value.height = `${height}px`; - const fontSize = group.font_size * app.canvas.ds.scale; - inputStyle.value.fontSize = `${fontSize}px`; - } else if (target instanceof LGraphNode) { - const node = target; - const [x, y] = node.getBounding(); - const canvasWidth = node.width; - const canvasHeight = LiteGraph.NODE_TITLE_HEIGHT; - const [left, top] = app.canvasPosToClientPos([x, y]); - inputStyle.value.left = `${left}px`; - inputStyle.value.top = `${top}px`; - const width = canvasWidth * app.canvas.ds.scale; - const height = canvasHeight * app.canvas.ds.scale; - inputStyle.value.width = `${width}px`; - inputStyle.value.height = `${height}px`; - const fontSize = 12 * app.canvas.ds.scale; - inputStyle.value.fontSize = `${fontSize}px`; - } - } - ); - const canvasEventHandler = /* @__PURE__ */ __name((event) => { - if (event.detail.subType === "group-double-click") { - if (!settingStore.get("Comfy.Group.DoubleClickTitleToEdit")) { - return; - } - const group = event.detail.group; - const [x, y] = group.pos; - const e = event.detail.originalEvent; - const relativeY = e.canvasY - y; - if (relativeY <= group.titleHeight) { - titleEditorStore.titleEditorTarget = group; - } - } else if (event.detail.subType === "node-double-click") { - if (!settingStore.get("Comfy.Node.DoubleClickTitleToEdit")) { - return; - } - const node = event.detail.node; - const [x, y] = node.pos; - const e = event.detail.originalEvent; - const relativeY = e.canvasY - y; - if (relativeY <= 0) { - titleEditorStore.titleEditorTarget = node; - } - } - }, "canvasEventHandler"); - useEventListener(document, "litegraph:canvas", canvasEventHandler); - return (_ctx, _cache) => { - return showInput.value ? (openBlock(), createElementBlock("div", { - key: 0, - class: "group-title-editor node-title-editor", - style: normalizeStyle(inputStyle.value) - }, [ - createVNode(EditableText, { - isEditing: showInput.value, - modelValue: editedTitle.value, - onEdit - }, null, 8, ["isEditing", "modelValue"]) - ], 4)) : createCommentVNode("", true); - }; - } -}); -const TitleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-12d3fd12"]]); -const useSearchBoxStore = defineStore("searchBox", () => { - const visible = ref(false); - function toggleVisible() { - visible.value = !visible.value; - } - __name(toggleVisible, "toggleVisible"); - return { - visible, - toggleVisible - }; -}); -class ConnectingLinkImpl { - static { - __name(this, "ConnectingLinkImpl"); - } - constructor(node, slot, input, output, pos, afterRerouteId) { - this.node = node; - this.slot = slot; - this.input = input; - this.output = output; - this.pos = pos; - this.afterRerouteId = afterRerouteId; - } - static createFromPlainObject(obj) { - return new ConnectingLinkImpl( - obj.node, - obj.slot, - obj.input, - obj.output, - obj.pos, - obj.afterRerouteId - ); - } - get type() { - const result = this.input ? this.input.type : this.output?.type ?? null; - return result === -1 ? null : result; - } - /** - * Which slot type is release and need to be reconnected. - * - 'output' means we need a new node's outputs slot to connect with this link - */ - get releaseSlotType() { - return this.output ? "input" : "output"; - } - connectTo(newNode) { - const newNodeSlots = this.releaseSlotType === "output" ? newNode.outputs : newNode.inputs; - if (!newNodeSlots) return; - const newNodeSlot = newNodeSlots.findIndex( - (slot) => LiteGraph.isValidConnection(slot.type, this.type) - ); - if (newNodeSlot === -1) { - console.warn( - `Could not find slot with type ${this.type} on node ${newNode.title}. This should never happen` - ); - return; - } - if (this.releaseSlotType === "input") { - this.node.connect(this.slot, newNode, newNodeSlot, this.afterRerouteId); - } else { - newNode.connect(newNodeSlot, this.node, this.slot, this.afterRerouteId); - } - } -} +__name(render$9, "render$9"); +script$a.render = render$9; var theme$5 = /* @__PURE__ */ __name(function theme3(_ref) { var dt = _ref.dt; - return "\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n right: ".concat(dt("autocomplete.padding.x"), ";\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\n right: calc(").concat(dt("autocomplete.dropdown.width"), " + ").concat(dt("autocomplete.padding.x"), ");\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-autocomplete-dropdown {\n cursor: pointer;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("autocomplete.dropdown.width"), ";\n border-top-right-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n border-bottom-right-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n background: ").concat(dt("autocomplete.dropdown.background"), ";\n border: 1px solid ").concat(dt("autocomplete.dropdown.border.color"), ";\n border-left: 0 none;\n color: ").concat(dt("autocomplete.dropdown.color"), ";\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-autocomplete-dropdown:not(:disabled):hover {\n background: ").concat(dt("autocomplete.dropdown.hover.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.hover.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.hover.color"), ";\n}\n\n.p-autocomplete-dropdown:not(:disabled):active {\n background: ").concat(dt("autocomplete.dropdown.active.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.active.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.active.color"), ";\n}\n\n.p-autocomplete-dropdown:focus-visible {\n box-shadow: ").concat(dt("autocomplete.dropdown.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.dropdown.focus.ring.width"), " ").concat(dt("autocomplete.dropdown.focus.ring.style"), " ").concat(dt("autocomplete.dropdown.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.dropdown.focus.ring.offset"), ";\n}\n\n.p-autocomplete .p-autocomplete-overlay {\n min-width: 100%;\n}\n\n.p-autocomplete-overlay {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n background: ").concat(dt("autocomplete.overlay.background"), ";\n color: ").concat(dt("autocomplete.overlay.color"), ";\n border: 1px solid ").concat(dt("autocomplete.overlay.border.color"), ";\n border-radius: ").concat(dt("autocomplete.overlay.border.radius"), ";\n box-shadow: ").concat(dt("autocomplete.overlay.shadow"), ";\n}\n\n.p-autocomplete-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("autocomplete.list.gap"), ";\n padding: ").concat(dt("autocomplete.list.padding"), ";\n}\n\n.p-autocomplete-option {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n padding: ").concat(dt("autocomplete.option.padding"), ";\n border: 0 none;\n color: ").concat(dt("autocomplete.option.color"), ";\n background: transparent;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ";\n border-radius: ").concat(dt("autocomplete.option.border.radius"), ";\n}\n\n.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {\n background: ").concat(dt("autocomplete.option.focus.background"), ";\n color: ").concat(dt("autocomplete.option.focus.color"), ";\n}\n\n.p-autocomplete-option-selected {\n background: ").concat(dt("autocomplete.option.selected.background"), ";\n color: ").concat(dt("autocomplete.option.selected.color"), ";\n}\n\n.p-autocomplete-option-selected.p-focus {\n background: ").concat(dt("autocomplete.option.selected.focus.background"), ";\n color: ").concat(dt("autocomplete.option.selected.focus.color"), ";\n}\n\n.p-autocomplete-option-group {\n margin: 0;\n padding: ").concat(dt("autocomplete.option.group.padding"), ";\n color: ").concat(dt("autocomplete.option.group.color"), ";\n background: ").concat(dt("autocomplete.option.group.background"), ";\n font-weight: ").concat(dt("autocomplete.option.group.font.weight"), ";\n}\n\n.p-autocomplete-input-multiple {\n margin: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: calc(").concat(dt("autocomplete.padding.y"), " / 2) ").concat(dt("autocomplete.padding.x"), ";\n gap: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n color: ").concat(dt("autocomplete.color"), ";\n background: ").concat(dt("autocomplete.background"), ";\n border: 1px solid ").concat(dt("autocomplete.border.color"), ";\n border-radius: ").concat(dt("autocomplete.border.radius"), ";\n width: 100%;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("autocomplete.shadow"), ";\n}\n\n.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.hover.border.color"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.focus.border.color"), ";\n box-shadow: ").concat(dt("autocomplete.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.focus.ring.width"), " ").concat(dt("autocomplete.focus.ring.style"), " ").concat(dt("autocomplete.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.focus.ring.offset"), ";\n}\n\n.p-autocomplete.p-invalid .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.invalid.border.color"), ";\n}\n\n.p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.background"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.focus.background"), ";\n}\n\n.p-autocomplete.p-disabled .p-autocomplete-input-multiple {\n opacity: 1;\n background: ").concat(dt("autocomplete.disabled.background"), ";\n color: ").concat(dt("autocomplete.disabled.color"), ";\n}\n\n.p-autocomplete-chip.p-chip {\n padding-top: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n border-radius: ").concat(dt("autocomplete.chip.border.radius"), ";\n}\n\n.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {\n padding-left: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-right: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {\n background: ").concat(dt("inputchips.chip.focus.background"), ";\n color: ").concat(dt("inputchips.chip.focus.color"), ";\n}\n\n.p-autocomplete-input-chip {\n flex: 1 1 auto;\n display: inline-flex;\n padding-top: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-input-chip input {\n border: 0 none;\n outline: 0 none;\n background: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: inherit;\n}\n\n.p-autocomplete-input-chip input::placeholder {\n color: ").concat(dt("autocomplete.placeholder.color"), ";\n}\n\n.p-autocomplete-empty-message {\n padding: ").concat(dt("autocomplete.empty.message.padding"), ";\n}\n\n.p-autocomplete-fluid {\n display: flex;\n}\n\n.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n width: 1%;\n}\n"); + return "\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n inset-inline-end: ".concat(dt("autocomplete.padding.x"), ";\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\n inset-inline-end: calc(").concat(dt("autocomplete.dropdown.width"), " + ").concat(dt("autocomplete.padding.x"), ");\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-autocomplete-dropdown {\n cursor: pointer;\n display: inline-flex;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("autocomplete.dropdown.width"), ";\n border-start-end-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n border-end-end-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n background: ").concat(dt("autocomplete.dropdown.background"), ";\n border: 1px solid ").concat(dt("autocomplete.dropdown.border.color"), ";\n border-inline-start: 0 none;\n color: ").concat(dt("autocomplete.dropdown.color"), ";\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-autocomplete-dropdown:not(:disabled):hover {\n background: ").concat(dt("autocomplete.dropdown.hover.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.hover.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.hover.color"), ";\n}\n\n.p-autocomplete-dropdown:not(:disabled):active {\n background: ").concat(dt("autocomplete.dropdown.active.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.active.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.active.color"), ";\n}\n\n.p-autocomplete-dropdown:focus-visible {\n box-shadow: ").concat(dt("autocomplete.dropdown.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.dropdown.focus.ring.width"), " ").concat(dt("autocomplete.dropdown.focus.ring.style"), " ").concat(dt("autocomplete.dropdown.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.dropdown.focus.ring.offset"), ";\n}\n\n.p-autocomplete .p-autocomplete-overlay {\n min-width: 100%;\n}\n\n.p-autocomplete-overlay {\n position: absolute;\n top: 0;\n left: 0;\n background: ").concat(dt("autocomplete.overlay.background"), ";\n color: ").concat(dt("autocomplete.overlay.color"), ";\n border: 1px solid ").concat(dt("autocomplete.overlay.border.color"), ";\n border-radius: ").concat(dt("autocomplete.overlay.border.radius"), ";\n box-shadow: ").concat(dt("autocomplete.overlay.shadow"), ";\n}\n\n.p-autocomplete-list-container {\n overflow: auto;\n}\n\n.p-autocomplete-list {\n margin: 0;\n list-style-type: none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("autocomplete.list.gap"), ";\n padding: ").concat(dt("autocomplete.list.padding"), ";\n}\n\n.p-autocomplete-option {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n padding: ").concat(dt("autocomplete.option.padding"), ";\n border: 0 none;\n color: ").concat(dt("autocomplete.option.color"), ";\n background: transparent;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ";\n border-radius: ").concat(dt("autocomplete.option.border.radius"), ";\n}\n\n.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {\n background: ").concat(dt("autocomplete.option.focus.background"), ";\n color: ").concat(dt("autocomplete.option.focus.color"), ";\n}\n\n.p-autocomplete-option-selected {\n background: ").concat(dt("autocomplete.option.selected.background"), ";\n color: ").concat(dt("autocomplete.option.selected.color"), ";\n}\n\n.p-autocomplete-option-selected.p-focus {\n background: ").concat(dt("autocomplete.option.selected.focus.background"), ";\n color: ").concat(dt("autocomplete.option.selected.focus.color"), ";\n}\n\n.p-autocomplete-option-group {\n margin: 0;\n padding: ").concat(dt("autocomplete.option.group.padding"), ";\n color: ").concat(dt("autocomplete.option.group.color"), ";\n background: ").concat(dt("autocomplete.option.group.background"), ";\n font-weight: ").concat(dt("autocomplete.option.group.font.weight"), ";\n}\n\n.p-autocomplete-input-multiple {\n margin: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: calc(").concat(dt("autocomplete.padding.y"), " / 2) ").concat(dt("autocomplete.padding.x"), ";\n gap: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n color: ").concat(dt("autocomplete.color"), ";\n background: ").concat(dt("autocomplete.background"), ";\n border: 1px solid ").concat(dt("autocomplete.border.color"), ";\n border-radius: ").concat(dt("autocomplete.border.radius"), ";\n width: 100%;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("autocomplete.shadow"), ";\n}\n\n.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.hover.border.color"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.focus.border.color"), ";\n box-shadow: ").concat(dt("autocomplete.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.focus.ring.width"), " ").concat(dt("autocomplete.focus.ring.style"), " ").concat(dt("autocomplete.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.focus.ring.offset"), ";\n}\n\n.p-autocomplete.p-invalid .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.invalid.border.color"), ";\n}\n\n.p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.background"), ";\n}\n\n.p-autocomplete:not(.p-disabled):hover .p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.hover.background"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.focus.background"), ";\n}\n\n.p-autocomplete.p-disabled .p-autocomplete-input-multiple {\n opacity: 1;\n background: ").concat(dt("autocomplete.disabled.background"), ";\n color: ").concat(dt("autocomplete.disabled.color"), ";\n}\n\n.p-autocomplete-chip.p-chip {\n padding-block-start: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-block-end: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n border-radius: ").concat(dt("autocomplete.chip.border.radius"), ";\n}\n\n.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {\n padding-inline-start: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-inline-end: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {\n background: ").concat(dt("autocomplete.chip.focus.background"), ";\n color: ").concat(dt("autocomplete.chip.focus.color"), ";\n}\n\n.p-autocomplete-input-chip {\n flex: 1 1 auto;\n display: inline-flex;\n padding-block-start: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-block-end: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-input-chip input {\n border: 0 none;\n outline: 0 none;\n background: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: inherit;\n}\n\n.p-autocomplete-input-chip input::placeholder {\n color: ").concat(dt("autocomplete.placeholder.color"), ";\n}\n\n.p-autocomplete.p-invalid .p-autocomplete-input-chip input::placeholder {\n color: ").concat(dt("autocomplete.invalid.placeholder.color"), ";\n}\n\n.p-autocomplete-empty-message {\n padding: ").concat(dt("autocomplete.empty.message.padding"), ";\n}\n\n.p-autocomplete-fluid {\n display: flex;\n}\n\n.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n width: 1%;\n}\n\n.p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown {\n width: ").concat(dt("autocomplete.dropdown.sm.width"), ";\n}\n\n.p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown .p-icon {\n font-size: ").concat(dt("form.field.sm.font.size"), ";\n width: ").concat(dt("form.field.sm.font.size"), ";\n height: ").concat(dt("form.field.sm.font.size"), ";\n}\n\n.p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown {\n width: ").concat(dt("autocomplete.dropdown.lg.width"), ";\n}\n\n.p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown .p-icon {\n font-size: ").concat(dt("form.field.lg.font.size"), ";\n width: ").concat(dt("form.field.lg.font.size"), ";\n height: ").concat(dt("form.field.lg.font.size"), ";\n}\n"); }, "theme"); var inlineStyles$3 = { root: { @@ -1785,19 +1047,20 @@ var classes$5 = { var instance = _ref2.instance, props = _ref2.props; return ["p-autocomplete p-component p-inputwrapper", { "p-disabled": props.disabled, - "p-invalid": props.invalid, + "p-invalid": instance.$invalid, "p-focus": instance.focused, - "p-inputwrapper-filled": props.modelValue || isNotEmpty(instance.inputValue), + "p-inputwrapper-filled": instance.$filled || isNotEmpty(instance.inputValue), "p-inputwrapper-focus": instance.focused, "p-autocomplete-open": instance.overlayVisible, - "p-autocomplete-fluid": instance.hasFluid + "p-autocomplete-fluid": instance.$fluid }]; }, "root"), - pcInput: "p-autocomplete-input", + pcInputText: "p-autocomplete-input", inputMultiple: /* @__PURE__ */ __name(function inputMultiple(_ref3) { - var props = _ref3.props, instance = _ref3.instance; + _ref3.props; + var instance = _ref3.instance; return ["p-autocomplete-input-multiple", { - "p-variant-filled": props.variant ? props.variant === "filled" : instance.$primevue.config.inputStyle === "filled" || instance.$primevue.config.inputVariant === "filled" + "p-variant-filled": instance.$variant === "filled" }]; }, "inputMultiple"), chipItem: /* @__PURE__ */ __name(function chipItem(_ref4) { @@ -1812,6 +1075,7 @@ var classes$5 = { loader: "p-autocomplete-loader", dropdown: "p-autocomplete-dropdown", overlay: "p-autocomplete-overlay p-component", + listContainer: "p-autocomplete-list-container", list: "p-autocomplete-list", optionGroup: "p-autocomplete-option-group", option: /* @__PURE__ */ __name(function option(_ref5) { @@ -1832,9 +1096,8 @@ var AutoCompleteStyle = BaseStyle.extend({ }); var script$1$5 = { name: "BaseAutoComplete", - "extends": script$e, + "extends": script$i, props: { - modelValue: null, suggestions: { type: Array, "default": null @@ -1863,18 +1126,6 @@ var script$1$5 = { type: Boolean, "default": false }, - variant: { - type: String, - "default": null - }, - invalid: { - type: Boolean, - "default": false - }, - disabled: { - type: Boolean, - "default": false - }, placeholder: { type: String, "default": null @@ -1991,6 +1242,10 @@ var script$1$5 = { type: String, "default": null }, + showEmptyMessage: { + type: Boolean, + "default": true + }, tabindex: { type: Number, "default": 0 @@ -2006,14 +1261,10 @@ var script$1$5 = { ariaLabelledby: { type: String, "default": null - }, - fluid: { - type: Boolean, - "default": null } }, style: AutoCompleteStyle, - provide: /* @__PURE__ */ __name(function provide7() { + provide: /* @__PURE__ */ __name(function provide6() { return { $pcAutoComplete: this, $parentInstance: this @@ -2059,11 +1310,11 @@ function _arrayLikeToArray$1(r, a) { return n; } __name(_arrayLikeToArray$1, "_arrayLikeToArray$1"); -var script$7 = { +var script$9 = { name: "AutoComplete", "extends": script$1$5, inheritAttrs: false, - emits: ["update:modelValue", "change", "focus", "blur", "item-select", "item-unselect", "option-select", "option-unselect", "dropdown-click", "clear", "complete", "before-show", "before-hide", "show", "hide"], + emits: ["change", "focus", "blur", "item-select", "item-unselect", "option-select", "option-unselect", "dropdown-click", "clear", "complete", "before-show", "before-hide", "show", "hide"], inject: { $pcFluid: { "default": null @@ -2096,6 +1347,7 @@ var script$7 = { this.show(); this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1; this.searching = false; + !this.showEmptyMessage && this.visibleOptions.length === 0 && this.hide(); } this.autoUpdateModel(); }, "suggestions") @@ -2171,12 +1423,13 @@ var script$7 = { hide: /* @__PURE__ */ __name(function hide(isFocus) { var _this2 = this; var _hide = /* @__PURE__ */ __name(function _hide2() { + var _this2$$refs$focusInp; _this2.$emit("before-hide"); _this2.dirty = isFocus; _this2.overlayVisible = false; _this2.clicked = false; _this2.focusedOptionIndex = -1; - isFocus && focus(_this2.multiple ? _this2.$refs.focusInput : _this2.$refs.focusInput.$el); + isFocus && focus(_this2.multiple ? _this2.$refs.focusInput : (_this2$$refs$focusInp = _this2.$refs.focusInput) === null || _this2$$refs$focusInp === void 0 ? void 0 : _this2$$refs$focusInp.$el); }, "_hide"); setTimeout(function() { _hide(); @@ -2198,10 +1451,12 @@ var script$7 = { this.$emit("focus", event); }, "onFocus"), onBlur: /* @__PURE__ */ __name(function onBlur(event) { + var _this$formField$onBlu, _this$formField; this.dirty = false; this.focused = false; this.focusedOptionIndex = -1; this.$emit("blur", event); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField); }, "onBlur"), onKeyDown: /* @__PURE__ */ __name(function onKeyDown(event) { if (this.disabled) { @@ -2325,7 +1580,7 @@ var script$7 = { }, "onMultipleContainerKeyDown"), onContainerClick: /* @__PURE__ */ __name(function onContainerClick(event) { this.clicked = true; - if (this.disabled || this.searching || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) { + if (this.disabled || this.searching || this.loading || this.isDropdownClicked(event)) { return; } if (!this.overlay || !this.overlay.contains(event.target)) { @@ -2354,7 +1609,7 @@ var script$7 = { if (this.multiple) { this.$refs.focusInput.value = ""; if (!this.isSelected(option2)) { - this.updateModel(event, [].concat(_toConsumableArray$1(this.modelValue || []), [value])); + this.updateModel(event, [].concat(_toConsumableArray$1(this.d_value || []), [value])); } } else { this.updateModel(event, value); @@ -2415,9 +1670,9 @@ var script$7 = { var target = event.currentTarget; this.focusedOptionIndex = -1; if (this.multiple) { - if (isEmpty(target.value) && this.hasSelectedOption) { + if (isEmpty(target.value) && this.$filled) { focus(this.$refs.multiContainer); - this.focusedMultipleOptionIndex = this.modelValue.length; + this.focusedMultipleOptionIndex = this.d_value.length; } else { event.stopPropagation(); } @@ -2452,7 +1707,7 @@ var script$7 = { onEnterKey: /* @__PURE__ */ __name(function onEnterKey2(event) { if (!this.typeahead) { if (this.multiple) { - this.updateModel(event, [].concat(_toConsumableArray$1(this.modelValue || []), [event.target.value])); + this.updateModel(event, [].concat(_toConsumableArray$1(this.d_value || []), [event.target.value])); this.$refs.focusInput.value = ""; } } else { @@ -2466,6 +1721,7 @@ var script$7 = { this.hide(); } } + event.preventDefault(); }, "onEnterKey"), onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey(event) { this.overlayVisible && this.hide(true); @@ -2479,10 +1735,10 @@ var script$7 = { }, "onTabKey"), onBackspaceKey: /* @__PURE__ */ __name(function onBackspaceKey(event) { if (this.multiple) { - if (isNotEmpty(this.modelValue) && !this.$refs.focusInput.value) { - var removedValue = this.modelValue[this.modelValue.length - 1]; - var newValue = this.modelValue.slice(0, -1); - this.$emit("update:modelValue", newValue); + if (isNotEmpty(this.d_value) && !this.$refs.focusInput.value) { + var removedValue = this.d_value[this.d_value.length - 1]; + var newValue = this.d_value.slice(0, -1); + this.writeValue(newValue, event); this.$emit("item-unselect", { originalEvent: event, value: removedValue @@ -2500,7 +1756,7 @@ var script$7 = { }, "onArrowLeftKeyOnMultiple"), onArrowRightKeyOnMultiple: /* @__PURE__ */ __name(function onArrowRightKeyOnMultiple() { this.focusedMultipleOptionIndex++; - if (this.focusedMultipleOptionIndex > this.modelValue.length - 1) { + if (this.focusedMultipleOptionIndex > this.d_value.length - 1) { this.focusedMultipleOptionIndex = -1; focus(this.$refs.focusInput); } @@ -2620,9 +1876,9 @@ var script$7 = { isSelected: /* @__PURE__ */ __name(function isSelected(option2) { var _this8 = this; var optionValue = this.getOptionValue(option2); - return this.multiple ? (this.modelValue || []).some(function(value) { + return this.multiple ? (this.d_value || []).some(function(value) { return _this8.isEquals(value, optionValue); - }) : this.isEquals(this.modelValue, this.getOptionValue(option2)); + }) : this.isEquals(this.d_value, this.getOptionValue(option2)); }, "isSelected"), findFirstOptionIndex: /* @__PURE__ */ __name(function findFirstOptionIndex() { var _this9 = this; @@ -2652,7 +1908,7 @@ var script$7 = { }, "findPrevOptionIndex"), findSelectedOptionIndex: /* @__PURE__ */ __name(function findSelectedOptionIndex() { var _this13 = this; - return this.hasSelectedOption ? this.visibleOptions.findIndex(function(option2) { + return this.$filled ? this.visibleOptions.findIndex(function(option2) { return _this13.isValidSelectedOption(option2); }) : -1; }, "findSelectedOptionIndex"), @@ -2679,8 +1935,8 @@ var script$7 = { }, "search"), removeOption: /* @__PURE__ */ __name(function removeOption(event, index) { var _this14 = this; - var removedOption = this.modelValue[index]; - var value = this.modelValue.filter(function(_2, i) { + var removedOption = this.d_value[index]; + var value = this.d_value.filter(function(_, i) { return i !== index; }).map(function(option2) { return _this14.getOptionValue(option2); @@ -2723,13 +1979,13 @@ var script$7 = { }); }, "scrollInView"), autoUpdateModel: /* @__PURE__ */ __name(function autoUpdateModel() { - if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) { + if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) { this.focusedOptionIndex = this.findFirstFocusedOptionIndex(); this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex], false); } }, "autoUpdateModel"), updateModel: /* @__PURE__ */ __name(function updateModel(event, value) { - this.$emit("update:modelValue", value); + this.writeValue(value, event); this.$emit("change", { originalEvent: event, value @@ -2766,19 +2022,20 @@ var script$7 = { return this.optionGroupLabel ? this.flatOptions(this.suggestions) : this.suggestions || []; }, "visibleOptions"), inputValue: /* @__PURE__ */ __name(function inputValue() { - if (isNotEmpty(this.modelValue)) { - if (_typeof$1$1(this.modelValue) === "object") { - var label = this.getOptionLabel(this.modelValue); - return label != null ? label : this.modelValue; + if (this.$filled) { + if (_typeof$1$1(this.d_value) === "object") { + var label = this.getOptionLabel(this.d_value); + return label != null ? label : this.d_value; } else { - return this.modelValue; + return this.d_value; } } else { return ""; } }, "inputValue"), + // @deprecated use $filled instead. hasSelectedOption: /* @__PURE__ */ __name(function hasSelectedOption() { - return isNotEmpty(this.modelValue); + return this.$filled; }, "hasSelectedOption"), equalityKey: /* @__PURE__ */ __name(function equalityKey() { return this.dataKey; @@ -2799,7 +2056,7 @@ var script$7 = { return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || ""; }, "emptySelectionMessageText"), selectedMessageText: /* @__PURE__ */ __name(function selectedMessageText() { - return this.hasSelectedOption ? this.selectionMessageText.replaceAll("{0}", this.multiple ? this.modelValue.length : "1") : this.emptySelectionMessageText; + return this.$filled ? this.selectionMessageText.replaceAll("{0}", this.multiple ? this.d_value.length : "1") : this.emptySelectionMessageText; }, "selectedMessageText"), listAriaLabel: /* @__PURE__ */ __name(function listAriaLabel() { return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : void 0; @@ -2821,18 +2078,15 @@ var script$7 = { }, "virtualScrollerDisabled"), panelId: /* @__PURE__ */ __name(function panelId() { return this.id + "_panel"; - }, "panelId"), - hasFluid: /* @__PURE__ */ __name(function hasFluid() { - return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid; - }, "hasFluid") + }, "panelId") }, components: { - InputText: script$i, - VirtualScroller: script$j, - Portal: script$k, - ChevronDownIcon: script$l, - SpinnerIcon: script$m, - Chip: script$n + InputText: script$j, + VirtualScroller: script$k, + Portal: script$l, + ChevronDownIcon: script$m, + SpinnerIcon: script$n, + Chip: script$o }, directives: { ripple: Ripple @@ -2890,15 +2144,15 @@ function _toPrimitive$4(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive$4, "_toPrimitive$4"); -var _hoisted_1$k = ["aria-activedescendant"]; -var _hoisted_2$e = ["id", "aria-label", "aria-setsize", "aria-posinset"]; -var _hoisted_3$d = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; -var _hoisted_4$5 = ["disabled", "aria-expanded", "aria-controls"]; -var _hoisted_5$3 = ["id"]; -var _hoisted_6$2 = ["id", "aria-label"]; -var _hoisted_7$1 = ["id"]; -var _hoisted_8$1 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focus", "data-p-disabled"]; -function render$c(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$5 = ["aria-activedescendant"]; +var _hoisted_2$2 = ["id", "aria-label", "aria-setsize", "aria-posinset"]; +var _hoisted_3$2 = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; +var _hoisted_4$2 = ["disabled", "aria-expanded", "aria-controls"]; +var _hoisted_5$2 = ["id"]; +var _hoisted_6$1 = ["id", "aria-label"]; +var _hoisted_7 = ["id"]; +var _hoisted_8 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focus", "data-p-disabled"]; +function render$8(_ctx, _cache, $props, $setup, $data, $options) { var _component_InputText = resolveComponent("InputText"); var _component_Chip = resolveComponent("Chip"); var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); @@ -2917,13 +2171,15 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { ref: "focusInput", id: _ctx.inputId, type: "text", - "class": normalizeClass([_ctx.cx("pcInput"), _ctx.inputClass]), + name: _ctx.$formName, + "class": normalizeClass([_ctx.cx("pcInputText"), _ctx.inputClass]), style: normalizeStyle(_ctx.inputStyle), value: $options.inputValue, placeholder: _ctx.placeholder, tabindex: !_ctx.disabled ? _ctx.tabindex : -1, - fluid: $options.hasFluid, + fluid: _ctx.$fluid, disabled: _ctx.disabled, + size: _ctx.size, invalid: _ctx.invalid, variant: _ctx.variant, autocomplete: "off", @@ -2941,8 +2197,8 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { onInput: $options.onInput, onChange: $options.onChange, unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcInput") - }, null, 8, ["id", "class", "style", "value", "placeholder", "tabindex", "fluid", "disabled", "invalid", "variant", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "onFocus", "onBlur", "onKeydown", "onInput", "onChange", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.multiple ? (openBlock(), createElementBlock("ul", mergeProps({ + pt: _ctx.ptm("pcInputText") + }, null, 8, ["id", "name", "class", "style", "value", "placeholder", "tabindex", "fluid", "disabled", "size", "invalid", "variant", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "onFocus", "onBlur", "onKeydown", "onInput", "onChange", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.multiple ? (openBlock(), createElementBlock("ul", mergeProps({ key: 1, ref: "multiContainer", "class": _ctx.cx("inputMultiple"), @@ -2959,7 +2215,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { onKeydown: _cache[7] || (_cache[7] = function() { return $options.onMultipleContainerKeyDown && $options.onMultipleContainerKeyDown.apply($options, arguments); }) - }, _ctx.ptm("inputMultiple")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, function(option2, i) { + }, _ctx.ptm("inputMultiple")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.d_value, function(option2, i) { return openBlock(), createElementBlock("li", mergeProps({ key: "".concat(i, "_").concat($options.getOptionLabel(option2)), id: $data.id + "_multiple_option_" + i, @@ -2969,7 +2225,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { role: "option", "aria-label": $options.getOptionLabel(option2), "aria-selected": true, - "aria-setsize": _ctx.modelValue.length, + "aria-setsize": _ctx.d_value.length, "aria-posinset": i + 1, ref_for: true }, _ctx.ptm("chipItem")), [renderSlot(_ctx.$slots, "chip", mergeProps({ @@ -3003,7 +2259,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { }), _: 2 }, 1032, ["class", "label", "removeIcon", "unstyled", "onRemove", "pt"])]; - })], 16, _hoisted_2$e); + })], 16, _hoisted_2$2); }), 128)), createBaseVNode("li", mergeProps({ "class": _ctx.cx("inputChip"), role: "option" @@ -3041,7 +2297,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { onChange: _cache[4] || (_cache[4] = function() { return $options.onChange && $options.onChange.apply($options, arguments); }) - }, _ctx.ptm("input")), null, 16, _hoisted_3$d)], 16)], 16, _hoisted_1$k)) : createCommentVNode("", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? "loader" : "loadingicon", { + }, _ctx.ptm("input")), null, 16, _hoisted_3$2)], 16)], 16, _hoisted_1$5)) : createCommentVNode("", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? "loader" : "loadingicon", { key: 2, "class": normalizeClass(_ctx.cx("loader")) }, function() { @@ -3078,7 +2334,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? "span" : "ChevronDownIcon"), mergeProps({ "class": _ctx.dropdownIcon }, _ctx.ptm("dropdownIcon")), null, 16, ["class"]))]; - })], 16, _hoisted_4$5)) : createCommentVNode("", true)]; + })], 16, _hoisted_4$2)) : createCommentVNode("", true)]; }), createBaseVNode("span", mergeProps({ role: "status", "aria-live": "polite", @@ -3102,9 +2358,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { ref: $options.overlayRef, id: $options.panelId, "class": [_ctx.cx("overlay"), _ctx.panelClass, _ctx.overlayClass], - style: _objectSpread$3(_objectSpread$3(_objectSpread$3({}, _ctx.panelStyle), _ctx.overlayStyle), {}, { - "max-height": $options.virtualScrollerDisabled ? _ctx.scrollHeight : "" - }), + style: _objectSpread$3(_objectSpread$3({}, _ctx.panelStyle), _ctx.overlayStyle), onClick: _cache[9] || (_cache[9] = function() { return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); }), @@ -3112,9 +2366,14 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments); }) }, _ctx.ptm("overlay")), [renderSlot(_ctx.$slots, "header", { - value: _ctx.modelValue, + value: _ctx.d_value, suggestions: $options.visibleOptions - }), createVNode(_component_VirtualScroller, mergeProps({ + }), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("listContainer"), + style: { + "max-height": $options.virtualScrollerDisabled ? _ctx.scrollHeight : "" + } + }, _ctx.ptm("listContainer")), [createVNode(_component_VirtualScroller, mergeProps({ ref: $options.virtualScrollerRef }, _ctx.virtualScrollerOptions, { style: { @@ -3128,7 +2387,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { content: withCtx(function(_ref) { var styleClass = _ref.styleClass, contentRef = _ref.contentRef, items = _ref.items, getItemOptions = _ref.getItemOptions, contentStyle = _ref.contentStyle, itemSize = _ref.itemSize; return [createBaseVNode("ul", mergeProps({ - ref: /* @__PURE__ */ __name(function ref2(el) { + ref: /* @__PURE__ */ __name(function ref(el) { return $options.listRef(el, contentRef); }, "ref"), id: $data.id + "_list", @@ -3153,7 +2412,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { index: $options.getOptionIndex(i, getItemOptions) }, function() { return [createTextVNode(toDisplayString($options.getOptionGroupLabel(option2.optionGroup)), 1)]; - })], 16, _hoisted_7$1)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({ + })], 16, _hoisted_7)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({ key: 1, id: $data.id + "_" + $options.getOptionIndex(i, getItemOptions), style: { @@ -3185,14 +2444,14 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { index: $options.getOptionIndex(i, getItemOptions) }, function() { return [createTextVNode(toDisplayString($options.getOptionLabel(option2)), 1)]; - })], 16, _hoisted_8$1)), [[_directive_ripple]])], 64); - }), 128)), !items || items && items.length === 0 ? (openBlock(), createElementBlock("li", mergeProps({ + })], 16, _hoisted_8)), [[_directive_ripple]])], 64); + }), 128)), _ctx.showEmptyMessage && (!items || items && items.length === 0) ? (openBlock(), createElementBlock("li", mergeProps({ key: 0, "class": _ctx.cx("emptyMessage"), role: "option" }, _ctx.ptm("emptyMessage")), [renderSlot(_ctx.$slots, "empty", {}, function() { return [createTextVNode(toDisplayString($options.searchResultMessageText), 1)]; - })], 16)) : createCommentVNode("", true)], 16, _hoisted_6$2)]; + })], 16)) : createCommentVNode("", true)], 16, _hoisted_6$1)]; }), _: 2 }, [_ctx.$slots.loader ? { @@ -3204,8 +2463,8 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { })]; }), key: "0" - } : void 0]), 1040, ["style", "items", "disabled", "pt"]), renderSlot(_ctx.$slots, "footer", { - value: _ctx.modelValue, + } : void 0]), 1040, ["style", "items", "disabled", "pt"])], 16), renderSlot(_ctx.$slots, "footer", { + value: _ctx.d_value, suggestions: $options.visibleOptions }), createBaseVNode("span", mergeProps({ role: "status", @@ -3213,7 +2472,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { "class": "p-hidden-accessible" }, _ctx.ptm("hiddenSelectedMessage"), { "data-p-hidden-accessible": true - }), toDisplayString($options.selectedMessageText), 17)], 16, _hoisted_5$3)) : createCommentVNode("", true)]; + }), toDisplayString($options.selectedMessageText), 17)], 16, _hoisted_5$2)) : createCommentVNode("", true)]; }), _: 3 }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; @@ -3221,458 +2480,11 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { _: 3 }, 8, ["appendTo"])], 16); } -__name(render$c, "render$c"); -script$7.render = render$c; -const _sfc_main$k = { - name: "AutoCompletePlus", - extends: script$7, - emits: ["focused-option-changed"], - mounted() { - if (typeof script$7.mounted === "function") { - script$7.mounted.call(this); - } - this.$watch( - () => this.focusedOptionIndex, - (newVal, oldVal) => { - this.$emit("focused-option-changed", newVal); - } - ); - } -}; -const _withScopeId$8 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-fd0a74bd"), n = n(), popScopeId(), n), "_withScopeId$8"); -const _hoisted_1$j = { class: "option-container flex justify-between items-center px-2 py-0 cursor-pointer overflow-hidden w-full" }; -const _hoisted_2$d = { class: "option-display-name font-semibold flex flex-col" }; -const _hoisted_3$c = { key: 0 }; -const _hoisted_4$4 = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-bookmark-fill text-sm mr-1" }, null, -1)); -const _hoisted_5$2 = [ - _hoisted_4$4 -]; -const _hoisted_6$1 = ["innerHTML"]; -const _hoisted_7 = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createBaseVNode("span", null, " ", -1)); -const _hoisted_8 = ["innerHTML"]; -const _hoisted_9 = { - key: 0, - class: "option-category font-light text-sm text-muted overflow-hidden text-ellipsis whitespace-nowrap" -}; -const _hoisted_10 = { class: "option-badges" }; -const _sfc_main$j = /* @__PURE__ */ defineComponent({ - __name: "NodeSearchItem", - props: { - nodeDef: {}, - currentQuery: {} - }, - setup(__props) { - const settingStore = useSettingStore(); - const showCategory = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowCategory") - ); - const showIdName = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowIdName") - ); - const showNodeFrequency = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowNodeFrequency") - ); - const nodeFrequencyStore = useNodeFrequencyStore(); - const nodeFrequency = computed( - () => nodeFrequencyStore.getNodeFrequency(props.nodeDef) - ); - const nodeBookmarkStore = useNodeBookmarkStore(); - const isBookmarked = computed( - () => nodeBookmarkStore.isBookmarked(props.nodeDef) - ); - const props = __props; - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$j, [ - createBaseVNode("div", _hoisted_2$d, [ - createBaseVNode("div", null, [ - isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$c, _hoisted_5$2)) : createCommentVNode("", true), - createBaseVNode("span", { - innerHTML: unref(highlightQuery)(_ctx.nodeDef.display_name, _ctx.currentQuery) - }, null, 8, _hoisted_6$1), - _hoisted_7, - showIdName.value ? (openBlock(), createBlock(unref(script$o), { - key: 1, - severity: "secondary" - }, { - default: withCtx(() => [ - createBaseVNode("span", { - innerHTML: unref(highlightQuery)(_ctx.nodeDef.name, _ctx.currentQuery) - }, null, 8, _hoisted_8) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - showCategory.value ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.nodeDef.category.replaceAll("/", " > ")), 1)) : createCommentVNode("", true) - ]), - createBaseVNode("div", _hoisted_10, [ - _ctx.nodeDef.experimental ? (openBlock(), createBlock(unref(script$o), { - key: 0, - value: _ctx.$t("g.experimental"), - severity: "primary" - }, null, 8, ["value"])) : createCommentVNode("", true), - _ctx.nodeDef.deprecated ? (openBlock(), createBlock(unref(script$o), { - key: 1, - value: _ctx.$t("g.deprecated"), - severity: "danger" - }, null, 8, ["value"])) : createCommentVNode("", true), - showNodeFrequency.value && nodeFrequency.value > 0 ? (openBlock(), createBlock(unref(script$o), { - key: 2, - value: unref(formatNumberWithSuffix)(nodeFrequency.value, { roundToInt: true }), - severity: "secondary" - }, null, 8, ["value"])) : createCommentVNode("", true), - _ctx.nodeDef.nodeSource.type !== unref(NodeSourceType).Unknown ? (openBlock(), createBlock(unref(script$n), { - key: 3, - class: "text-sm font-light" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.nodeDef.nodeSource.displayText), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]) - ]); - }; - } -}); -const NodeSearchItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-fd0a74bd"]]); -const _hoisted_1$i = { class: "comfy-vue-node-search-container flex justify-center items-center w-full min-w-96 pointer-events-auto" }; -const _hoisted_2$c = { - key: 0, - class: "comfy-vue-node-preview-container absolute left-[-350px] top-[50px]" -}; -const _hoisted_3$b = /* @__PURE__ */ createBaseVNode("h3", null, "Add node filter condition", -1); -const _hoisted_4$3 = { class: "_dialog-body" }; -const _sfc_main$i = /* @__PURE__ */ defineComponent({ - __name: "NodeSearchBox", - props: { - filters: {}, - searchLimit: { default: 64 } - }, - emits: ["addFilter", "removeFilter", "addNode"], - setup(__props, { emit: __emit }) { - const settingStore = useSettingStore(); - const { t } = useI18n(); - const enableNodePreview = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.NodePreview") - ); - const props = __props; - const nodeSearchFilterVisible = ref(false); - const inputId = `comfy-vue-node-search-box-input-${Math.random()}`; - const suggestions2 = ref([]); - const hoveredSuggestion = ref(null); - const currentQuery = ref(""); - const placeholder = computed(() => { - return props.filters.length === 0 ? t("g.searchNodes") + "..." : ""; - }); - const nodeDefStore = useNodeDefStore(); - const nodeFrequencyStore = useNodeFrequencyStore(); - const search2 = /* @__PURE__ */ __name((query) => { - const queryIsEmpty = query === "" && props.filters.length === 0; - currentQuery.value = query; - suggestions2.value = queryIsEmpty ? nodeFrequencyStore.topNodeDefs : [ - ...nodeDefStore.nodeSearchService.searchNode(query, props.filters, { - limit: props.searchLimit - }) - ]; - }, "search"); - const emit = __emit; - let inputElement = null; - const reFocusInput = /* @__PURE__ */ __name(() => { - inputElement ??= document.getElementById(inputId); - if (inputElement) { - inputElement.blur(); - nextTick(() => inputElement?.focus()); - } - }, "reFocusInput"); - onMounted(reFocusInput); - const onAddFilter = /* @__PURE__ */ __name((filterAndValue) => { - nodeSearchFilterVisible.value = false; - emit("addFilter", filterAndValue); - }, "onAddFilter"); - const onRemoveFilter = /* @__PURE__ */ __name((event, filterAndValue) => { - event.stopPropagation(); - event.preventDefault(); - emit("removeFilter", filterAndValue); - reFocusInput(); - }, "onRemoveFilter"); - const setHoverSuggestion = /* @__PURE__ */ __name((index) => { - if (index === -1) { - hoveredSuggestion.value = null; - return; - } - const value = suggestions2.value[index]; - hoveredSuggestion.value = value; - }, "setHoverSuggestion"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$i, [ - enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$c, [ - hoveredSuggestion.value ? (openBlock(), createBlock(NodePreview, { - nodeDef: hoveredSuggestion.value, - key: hoveredSuggestion.value?.name || "" - }, null, 8, ["nodeDef"])) : createCommentVNode("", true) - ])) : createCommentVNode("", true), - createVNode(unref(script$d), { - icon: "pi pi-filter", - severity: "secondary", - class: "filter-button z-10", - onClick: _cache[0] || (_cache[0] = ($event) => nodeSearchFilterVisible.value = true) - }), - createVNode(unref(script$p), { - visible: nodeSearchFilterVisible.value, - "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => nodeSearchFilterVisible.value = $event), - class: "min-w-96", - "dismissable-mask": "", - modal: "", - onHide: reFocusInput - }, { - header: withCtx(() => [ - _hoisted_3$b - ]), - default: withCtx(() => [ - createBaseVNode("div", _hoisted_4$3, [ - createVNode(NodeSearchFilter, { onAddFilter }) - ]) - ]), - _: 1 - }, 8, ["visible"]), - createVNode(_sfc_main$k, { - "model-value": props.filters, - class: "comfy-vue-node-search-box z-10 flex-grow", - scrollHeight: "40vh", - placeholder: placeholder.value, - "input-id": inputId, - "append-to": "self", - suggestions: suggestions2.value, - "min-length": 0, - delay: 100, - loading: !unref(nodeFrequencyStore).isLoaded, - onComplete: _cache[2] || (_cache[2] = ($event) => search2($event.query)), - onOptionSelect: _cache[3] || (_cache[3] = ($event) => emit("addNode", $event.value)), - onFocusedOptionChanged: _cache[4] || (_cache[4] = ($event) => setHoverSuggestion($event)), - "complete-on-focus": "", - "auto-option-focus": "", - "force-selection": "", - multiple: "", - optionLabel: "display_name" - }, { - option: withCtx(({ option: option2 }) => [ - createVNode(NodeSearchItem, { - nodeDef: option2, - currentQuery: currentQuery.value - }, null, 8, ["nodeDef", "currentQuery"]) - ]), - chip: withCtx(({ value }) => [ - (openBlock(), createBlock(SearchFilterChip, { - key: `${value[0].id}-${value[1]}`, - onRemove: /* @__PURE__ */ __name(($event) => onRemoveFilter($event, value), "onRemove"), - text: value[1], - badge: value[0].invokeSequence.toUpperCase(), - "badge-class": value[0].invokeSequence + "-badge" - }, null, 8, ["onRemove", "text", "badge", "badge-class"])) - ]), - _: 1 - }, 8, ["model-value", "placeholder", "suggestions", "loading"]) - ]); - }; - } -}); -const _sfc_main$h = /* @__PURE__ */ defineComponent({ - __name: "NodeSearchBoxPopover", - setup(__props) { - const settingStore = useSettingStore(); - const litegraphService = useLitegraphService(); - const { visible } = storeToRefs(useSearchBoxStore()); - const dismissable = ref(true); - const triggerEvent = ref(null); - const getNewNodeLocation = /* @__PURE__ */ __name(() => { - if (!triggerEvent.value) { - return litegraphService.getCanvasCenter(); - } - const originalEvent = triggerEvent.value.detail.originalEvent; - return [originalEvent.canvasX, originalEvent.canvasY]; - }, "getNewNodeLocation"); - const nodeFilters = ref([]); - const addFilter = /* @__PURE__ */ __name((filter) => { - nodeFilters.value.push(filter); - }, "addFilter"); - const removeFilter = /* @__PURE__ */ __name((filter) => { - nodeFilters.value = nodeFilters.value.filter( - (f) => toRaw(f) !== toRaw(filter) - ); - }, "removeFilter"); - const clearFilters = /* @__PURE__ */ __name(() => { - nodeFilters.value = []; - }, "clearFilters"); - const closeDialog = /* @__PURE__ */ __name(() => { - visible.value = false; - }, "closeDialog"); - const addNode = /* @__PURE__ */ __name((nodeDef) => { - const node = litegraphService.addNodeOnGraph(nodeDef, { - pos: getNewNodeLocation() - }); - const eventDetail = triggerEvent.value?.detail; - if (eventDetail && eventDetail.subType === "empty-release") { - eventDetail.linkReleaseContext.links.forEach((link) => { - ConnectingLinkImpl.createFromPlainObject(link).connectTo(node); - }); - } - window.setTimeout(() => { - closeDialog(); - }, 100); - }, "addNode"); - const newSearchBoxEnabled = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl") === "default" - ); - const showSearchBox = /* @__PURE__ */ __name((e) => { - const detail = e.detail; - if (newSearchBoxEnabled.value) { - if (detail.originalEvent?.pointerType === "touch") { - setTimeout(() => { - showNewSearchBox(e); - }, 128); - } else { - showNewSearchBox(e); - } - } else { - canvasStore.canvas.showSearchBox(detail.originalEvent); - } - }, "showSearchBox"); - const nodeDefStore = useNodeDefStore(); - const showNewSearchBox = /* @__PURE__ */ __name((e) => { - if (e.detail.subType === "empty-release") { - const links = e.detail.linkReleaseContext.links; - if (links.length === 0) { - console.warn("Empty release with no links! This should never happen"); - return; - } - const firstLink = ConnectingLinkImpl.createFromPlainObject(links[0]); - const filter = nodeDefStore.nodeSearchService.getFilterById( - firstLink.releaseSlotType - ); - const dataType = firstLink.type.toString(); - addFilter([filter, dataType]); - } - visible.value = true; - triggerEvent.value = e; - dismissable.value = false; - setTimeout(() => { - dismissable.value = true; - }, 300); - }, "showNewSearchBox"); - const showContextMenu = /* @__PURE__ */ __name((e) => { - if (e.detail.subType !== "empty-release") { - return; - } - const links = e.detail.linkReleaseContext.links; - if (links.length === 0) { - console.warn("Empty release with no links! This should never happen"); - return; - } - const firstLink = ConnectingLinkImpl.createFromPlainObject(links[0]); - const mouseEvent = e.detail.originalEvent; - const commonOptions = { - e: mouseEvent, - allow_searchbox: true, - showSearchBox: /* @__PURE__ */ __name(() => showSearchBox(e), "showSearchBox") - }; - const connectionOptions = firstLink.output ? { - nodeFrom: firstLink.node, - slotFrom: firstLink.output, - afterRerouteId: firstLink.afterRerouteId - } : { - nodeTo: firstLink.node, - slotTo: firstLink.input, - afterRerouteId: firstLink.afterRerouteId - }; - canvasStore.canvas.showConnectionMenu({ - ...connectionOptions, - ...commonOptions - }); - }, "showContextMenu"); - const canvasStore = useCanvasStore(); - watchEffect(() => { - if (canvasStore.canvas) { - LiteGraph.release_link_on_empty_shows_menu = false; - canvasStore.canvas.allow_searchbox = false; - } - }); - const canvasEventHandler = /* @__PURE__ */ __name((e) => { - if (e.detail.subType === "empty-double-click") { - showSearchBox(e); - } else if (e.detail.subType === "empty-release") { - handleCanvasEmptyRelease(e); - } else if (e.detail.subType === "group-double-click") { - const group = e.detail.group; - const [x, y] = group.pos; - const relativeY = e.detail.originalEvent.canvasY - y; - if (relativeY > group.titleHeight) { - showSearchBox(e); - } - } - }, "canvasEventHandler"); - const linkReleaseAction = computed(() => { - return settingStore.get("Comfy.LinkRelease.Action"); - }); - const linkReleaseActionShift = computed(() => { - return settingStore.get("Comfy.LinkRelease.ActionShift"); - }); - const handleCanvasEmptyRelease = /* @__PURE__ */ __name((e) => { - const detail = e.detail; - const shiftPressed = detail.originalEvent.shiftKey; - const action = shiftPressed ? linkReleaseActionShift.value : linkReleaseAction.value; - switch (action) { - case LinkReleaseTriggerAction.SEARCH_BOX: - showSearchBox(e); - break; - case LinkReleaseTriggerAction.CONTEXT_MENU: - showContextMenu(e); - break; - case LinkReleaseTriggerAction.NO_ACTION: - default: - break; - } - }, "handleCanvasEmptyRelease"); - useEventListener(document, "litegraph:canvas", canvasEventHandler); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", null, [ - createVNode(unref(script$p), { - visible: unref(visible), - "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null), - modal: "", - "dismissable-mask": dismissable.value, - onHide: clearFilters, - pt: { - root: { - class: "invisible-dialog-root", - role: "search" - }, - mask: { class: "node-search-box-dialog-mask" }, - transition: { - enterFromClass: "opacity-0 scale-75", - // 100ms is the duration of the transition in the dialog component - enterActiveClass: "transition-all duration-100 ease-out", - leaveActiveClass: "transition-all duration-100 ease-in", - leaveToClass: "opacity-0 scale-75" - } - } - }, { - container: withCtx(() => [ - createVNode(_sfc_main$i, { - filters: nodeFilters.value, - onAddFilter: addFilter, - onRemoveFilter: removeFilter, - onAddNode: addNode - }, null, 8, ["filters"]) - ]), - _: 1 - }, 8, ["visible", "dismissable-mask"]) - ]); - }; - } -}); +__name(render$8, "render$8"); +script$9.render = render$8; var theme$4 = /* @__PURE__ */ __name(function theme4(_ref) { var dt = _ref.dt; - return "\n.p-overlaybadge {\n position: relative;\n}\n\n.p-overlaybadge .p-badge {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n transform-origin: 100% 0;\n margin: 0;\n outline-width: ".concat(dt("overlaybadge.outline.width"), ";\n outline-style: solid;\n outline-color: ").concat(dt("overlaybadge.outline.color"), ";\n}\n"); + return "\n.p-overlaybadge {\n position: relative;\n}\n\n.p-overlaybadge .p-badge {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n transform-origin: 100% 0;\n margin: 0;\n outline-width: ".concat(dt("overlaybadge.outline.width"), ";\n outline-style: solid;\n outline-color: ").concat(dt("overlaybadge.outline.color"), ";\n}\n\n.p-overlaybadge .p-badge:dir(rtl) {\n transform: translate(-50%, -50%);\n}\n"); }, "theme"); var classes$4 = { root: "p-overlaybadge" @@ -3684,24 +2496,24 @@ var OverlayBadgeStyle = BaseStyle.extend({ }); var script$1$4 = { name: "OverlayBadge", - "extends": script$q, + "extends": script$p, style: OverlayBadgeStyle, - provide: /* @__PURE__ */ __name(function provide8() { + provide: /* @__PURE__ */ __name(function provide7() { return { $pcOverlayBadge: this, $parentInstance: this }; }, "provide") }; -var script$6 = { +var script$8 = { name: "OverlayBadge", "extends": script$1$4, inheritAttrs: false, components: { - Badge: script$q + Badge: script$p } }; -function render$b(_ctx, _cache, $props, $setup, $data, $options) { +function render$7(_ctx, _cache, $props, $setup, $data, $options) { var _component_Badge = resolveComponent("Badge"); return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root") @@ -3709,1454 +2521,8 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) { pt: _ctx.ptm("pcBadge") }), null, 16, ["pt"])], 16); } -__name(render$b, "render$b"); -script$6.render = render$b; -const _sfc_main$g = /* @__PURE__ */ defineComponent({ - __name: "SidebarIcon", - props: { - icon: String, - selected: Boolean, - tooltip: { - type: String, - default: "" - }, - class: { - type: String, - default: "" - }, - iconBadge: { - type: [String, Function], - default: "" - } - }, - emits: ["click"], - setup(__props, { emit: __emit }) { - const props = __props; - const emit = __emit; - const overlayValue = computed( - () => typeof props.iconBadge === "function" ? props.iconBadge() || "" : props.iconBadge - ); - const shouldShowBadge = computed(() => !!overlayValue.value); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createBlock(unref(script$d), { - class: normalizeClass(props.class), - text: "", - pt: { - root: { - class: `side-bar-button ${props.selected ? "p-button-primary side-bar-button-selected" : "p-button-secondary"}`, - "aria-label": props.tooltip - } - }, - onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event)) - }, { - icon: withCtx(() => [ - shouldShowBadge.value ? (openBlock(), createBlock(unref(script$6), { - key: 0, - value: overlayValue.value - }, { - default: withCtx(() => [ - createBaseVNode("i", { - class: normalizeClass(props.icon + " side-bar-button-icon") - }, null, 2) - ]), - _: 1 - }, 8, ["value"])) : (openBlock(), createElementBlock("i", { - key: 1, - class: normalizeClass(props.icon + " side-bar-button-icon") - }, null, 2)) - ]), - _: 1 - }, 8, ["class", "pt"])), [ - [_directive_tooltip, { value: props.tooltip, showDelay: 300, hideDelay: 300 }] - ]); - }; - } -}); -const SidebarIcon = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-6ab4daa6"]]); -const _sfc_main$f = /* @__PURE__ */ defineComponent({ - __name: "SidebarLogoutIcon", - setup(__props) { - const { t } = useI18n(); - const userStore = useUserStore(); - const tooltip = computed( - () => `${t("sideToolbar.logout")} (${userStore.currentUser?.username})` - ); - const logout = /* @__PURE__ */ __name(() => { - userStore.logout(); - window.location.reload(); - }, "logout"); - return (_ctx, _cache) => { - return openBlock(), createBlock(SidebarIcon, { - icon: "pi pi-sign-out", - tooltip: tooltip.value, - onClick: logout - }, null, 8, ["tooltip"]); - }; - } -}); -const _sfc_main$e = /* @__PURE__ */ defineComponent({ - __name: "SidebarSettingsToggleIcon", - setup(__props) { - const dialogStore = useDialogStore(); - const showSetting = /* @__PURE__ */ __name(() => { - dialogStore.showDialog({ - key: "global-settings", - headerComponent: SettingDialogHeader, - component: SettingDialogContent - }); - }, "showSetting"); - return (_ctx, _cache) => { - return openBlock(), createBlock(SidebarIcon, { - icon: "pi pi-cog", - class: "comfy-settings-btn", - onClick: showSetting, - tooltip: _ctx.$t("g.settings") - }, null, 8, ["tooltip"]); - }; - } -}); -const _sfc_main$d = /* @__PURE__ */ defineComponent({ - __name: "SidebarThemeToggleIcon", - setup(__props) { - const colorPaletteStore = useColorPaletteStore(); - const icon = computed( - () => colorPaletteStore.completedActivePalette.light_theme ? "pi pi-sun" : "pi pi-moon" - ); - const commandStore = useCommandStore(); - const toggleTheme = /* @__PURE__ */ __name(() => { - commandStore.execute("Comfy.ToggleTheme"); - }, "toggleTheme"); - return (_ctx, _cache) => { - return openBlock(), createBlock(SidebarIcon, { - icon: icon.value, - onClick: toggleTheme, - tooltip: _ctx.$t("sideToolbar.themeToggle"), - class: "comfy-vue-theme-toggle" - }, null, 8, ["icon", "tooltip"]); - }; - } -}); -const _withScopeId$7 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-33cac83a"), n = n(), popScopeId(), n), "_withScopeId$7"); -const _hoisted_1$h = { class: "side-tool-bar-end" }; -const _hoisted_2$b = { - key: 0, - class: "sidebar-content-container h-full overflow-y-auto overflow-x-hidden" -}; -const _sfc_main$c = /* @__PURE__ */ defineComponent({ - __name: "SideToolbar", - setup(__props) { - const workspaceStore = useWorkspaceStore(); - const settingStore = useSettingStore(); - const userStore = useUserStore(); - const teleportTarget = computed( - () => settingStore.get("Comfy.Sidebar.Location") === "left" ? ".comfyui-body-left" : ".comfyui-body-right" - ); - const isSmall = computed( - () => settingStore.get("Comfy.Sidebar.Size") === "small" - ); - const tabs = computed(() => workspaceStore.getSidebarTabs()); - const selectedTab = computed(() => workspaceStore.sidebarTab.activeSidebarTab); - const onTabClick = /* @__PURE__ */ __name((item3) => { - workspaceStore.sidebarTab.toggleSidebarTab(item3.id); - }, "onTabClick"); - const keybindingStore = useKeybindingStore(); - const getTabTooltipSuffix = /* @__PURE__ */ __name((tab) => { - const keybinding = keybindingStore.getKeybindingByCommandId( - `Workspace.ToggleSidebarTab.${tab.id}` - ); - return keybinding ? ` (${keybinding.combo.toString()})` : ""; - }, "getTabTooltipSuffix"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock(Fragment, null, [ - (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ - createBaseVNode("nav", { - class: normalizeClass(["side-tool-bar-container", { "small-sidebar": isSmall.value }]) - }, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => { - return openBlock(), createBlock(SidebarIcon, { - key: tab.id, - icon: tab.icon, - iconBadge: tab.iconBadge, - tooltip: tab.tooltip + getTabTooltipSuffix(tab), - selected: tab.id === selectedTab.value?.id, - class: normalizeClass(tab.id + "-tab-button"), - onClick: /* @__PURE__ */ __name(($event) => onTabClick(tab), "onClick") - }, null, 8, ["icon", "iconBadge", "tooltip", "selected", "class", "onClick"]); - }), 128)), - createBaseVNode("div", _hoisted_1$h, [ - unref(userStore).isMultiUserServer ? (openBlock(), createBlock(_sfc_main$f, { key: 0 })) : createCommentVNode("", true), - createVNode(_sfc_main$d), - createVNode(_sfc_main$e) - ]) - ], 2) - ], 8, ["to"])), - selectedTab.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [ - createVNode(_sfc_main$q, { extension: selectedTab.value }, null, 8, ["extension"]) - ])) : createCommentVNode("", true) - ], 64); - }; - } -}); -const SideToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-33cac83a"]]); -const _withScopeId$6 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-8d011a31"), n = n(), popScopeId(), n), "_withScopeId$6"); -const _hoisted_1$g = { class: "workflow-label text-sm max-w-[150px] truncate inline-block" }; -const _hoisted_2$a = { class: "relative" }; -const _hoisted_3$a = { - key: 0, - class: "status-indicator" -}; -const _sfc_main$b = /* @__PURE__ */ defineComponent({ - __name: "WorkflowTab", - props: { - class: {}, - workflowOption: {} - }, - setup(__props) { - const props = __props; - const workspaceStore = useWorkspaceStore(); - const workflowStore = useWorkflowStore(); - const workflowTabRef = ref(null); - const closeWorkflows = /* @__PURE__ */ __name(async (options) => { - for (const opt of options) { - if (!await useWorkflowService().closeWorkflow(opt.workflow, { - warnIfUnsaved: !workspaceStore.shiftDown - })) { - break; - } - } - }, "closeWorkflows"); - const onCloseWorkflow = /* @__PURE__ */ __name((option2) => { - closeWorkflows([option2]); - }, "onCloseWorkflow"); - const tabGetter = /* @__PURE__ */ __name(() => workflowTabRef.value, "tabGetter"); - usePragmaticDraggable(tabGetter, { - getInitialData: /* @__PURE__ */ __name(() => { - return { - workflowKey: props.workflowOption.workflow.key - }; - }, "getInitialData") - }); - usePragmaticDroppable(tabGetter, { - getData: /* @__PURE__ */ __name(() => { - return { - workflowKey: props.workflowOption.workflow.key - }; - }, "getData"), - onDrop: /* @__PURE__ */ __name((e) => { - const fromIndex = workflowStore.openWorkflows.findIndex( - (wf) => wf.key === e.source.data.workflowKey - ); - const toIndex = workflowStore.openWorkflows.findIndex( - (wf) => wf.key === e.location.current.dropTargets[0]?.data.workflowKey - ); - if (fromIndex !== toIndex) { - workflowStore.reorderWorkflows(fromIndex, toIndex); - } - }, "onDrop") - }); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", mergeProps({ - class: "flex p-2 gap-2 workflow-tab", - ref_key: "workflowTabRef", - ref: workflowTabRef - }, _ctx.$attrs), [ - withDirectives((openBlock(), createElementBlock("span", _hoisted_1$g, [ - createTextVNode(toDisplayString(_ctx.workflowOption.workflow.filename), 1) - ])), [ - [ - _directive_tooltip, - _ctx.workflowOption.workflow.key, - void 0, - { bottom: true } - ] - ]), - createBaseVNode("div", _hoisted_2$a, [ - !unref(workspaceStore).shiftDown && (_ctx.workflowOption.workflow.isModified || !_ctx.workflowOption.workflow.isPersisted) ? (openBlock(), createElementBlock("span", _hoisted_3$a, "•")) : createCommentVNode("", true), - createVNode(unref(script$d), { - class: "close-button p-0 w-auto", - icon: "pi pi-times", - text: "", - severity: "secondary", - size: "small", - onClick: _cache[0] || (_cache[0] = withModifiers(($event) => onCloseWorkflow(_ctx.workflowOption), ["stop"])) - }) - ]) - ], 16); - }; - } -}); -const WorkflowTab = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8d011a31"]]); -const _withScopeId$5 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-54fadc45"), n = n(), popScopeId(), n), "_withScopeId$5"); -const _hoisted_1$f = { class: "workflow-tabs-container flex flex-row max-w-full h-full" }; -const _sfc_main$a = /* @__PURE__ */ defineComponent({ - __name: "WorkflowTabs", - props: { - class: {} - }, - setup(__props) { - const props = __props; - const { t } = useI18n(); - const workspaceStore = useWorkspaceStore(); - const workflowStore = useWorkflowStore(); - const workflowService = useWorkflowService(); - const workflowBookmarkStore = useWorkflowBookmarkStore(); - const rightClickedTab = ref(null); - const menu = ref(); - const workflowToOption = /* @__PURE__ */ __name((workflow) => ({ - value: workflow.path, - workflow - }), "workflowToOption"); - const options = computed( - () => workflowStore.openWorkflows.map(workflowToOption) - ); - const selectedWorkflow = computed( - () => workflowStore.activeWorkflow ? workflowToOption(workflowStore.activeWorkflow) : null - ); - const onWorkflowChange = /* @__PURE__ */ __name((option2) => { - if (!option2) { - return; - } - if (selectedWorkflow.value?.value === option2.value) { - return; - } - workflowService.openWorkflow(option2.workflow); - }, "onWorkflowChange"); - const closeWorkflows = /* @__PURE__ */ __name(async (options2) => { - for (const opt of options2) { - if (!await workflowService.closeWorkflow(opt.workflow, { - warnIfUnsaved: !workspaceStore.shiftDown - })) { - break; - } - } - }, "closeWorkflows"); - const onCloseWorkflow = /* @__PURE__ */ __name((option2) => { - closeWorkflows([option2]); - }, "onCloseWorkflow"); - const showContextMenu = /* @__PURE__ */ __name((event, option2) => { - rightClickedTab.value = option2; - menu.value.show(event); - }, "showContextMenu"); - const contextMenuItems = computed(() => { - const tab = rightClickedTab.value; - if (!tab) return []; - const index = options.value.findIndex((v) => v.workflow === tab.workflow); - return [ - { - label: t("tabMenu.duplicateTab"), - command: /* @__PURE__ */ __name(() => { - workflowService.duplicateWorkflow(tab.workflow); - }, "command") - }, - { - separator: true - }, - { - label: t("tabMenu.closeTab"), - command: /* @__PURE__ */ __name(() => onCloseWorkflow(tab), "command") - }, - { - label: t("tabMenu.closeTabsToLeft"), - command: /* @__PURE__ */ __name(() => closeWorkflows(options.value.slice(0, index)), "command"), - disabled: index <= 0 - }, - { - label: t("tabMenu.closeTabsToRight"), - command: /* @__PURE__ */ __name(() => closeWorkflows(options.value.slice(index + 1)), "command"), - disabled: index === options.value.length - 1 - }, - { - label: t("tabMenu.closeOtherTabs"), - command: /* @__PURE__ */ __name(() => closeWorkflows([ - ...options.value.slice(index + 1), - ...options.value.slice(0, index) - ]), "command"), - disabled: options.value.length <= 1 - }, - { - label: workflowBookmarkStore.isBookmarked(tab.workflow.path) ? t("tabMenu.removeFromBookmarks") : t("tabMenu.addToBookmarks"), - command: /* @__PURE__ */ __name(() => workflowBookmarkStore.toggleBookmarked(tab.workflow.path), "command"), - disabled: tab.workflow.isTemporary - } - ]; - }); - const commandStore = useCommandStore(); - const handleWheel = /* @__PURE__ */ __name((event) => { - const scrollElement = event.currentTarget; - const scrollAmount = event.deltaX || event.deltaY; - scrollElement.scroll({ - left: scrollElement.scrollLeft + scrollAmount - }); - }, "handleWheel"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$f, [ - createVNode(unref(script$s), { - class: "overflow-hidden no-drag", - "pt:content": { - class: "p-0 w-full", - onwheel: handleWheel - }, - "pt:barX": "h-1" - }, { - default: withCtx(() => [ - createVNode(unref(script$r), { - class: normalizeClass(["workflow-tabs bg-transparent", props.class]), - modelValue: selectedWorkflow.value, - "onUpdate:modelValue": onWorkflowChange, - options: options.value, - optionLabel: "label", - dataKey: "value" - }, { - option: withCtx(({ option: option2 }) => [ - createVNode(WorkflowTab, { - onContextmenu: /* @__PURE__ */ __name(($event) => showContextMenu($event, option2), "onContextmenu"), - onMouseup: withModifiers(($event) => onCloseWorkflow(option2), ["middle"]), - "workflow-option": option2 - }, null, 8, ["onContextmenu", "onMouseup", "workflow-option"]) - ]), - _: 1 - }, 8, ["class", "modelValue", "options"]) - ]), - _: 1 - }, 8, ["pt:content"]), - withDirectives(createVNode(unref(script$d), { - class: "new-blank-workflow-button flex-shrink-0 no-drag", - icon: "pi pi-plus", - text: "", - severity: "secondary", - "aria-label": _ctx.$t("sideToolbar.newBlankWorkflow"), - onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.NewBlankWorkflow")) - }, null, 8, ["aria-label"]), [ - [_directive_tooltip, { value: _ctx.$t("sideToolbar.newBlankWorkflow"), showDelay: 300 }] - ]), - createVNode(unref(script$t), { - ref_key: "menu", - ref: menu, - model: contextMenuItems.value - }, null, 8, ["model"]) - ]); - }; - } -}); -const WorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-54fadc45"]]); -const _withScopeId$4 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-38831d8e"), n = n(), popScopeId(), n), "_withScopeId$4"); -const _hoisted_1$e = { class: "absolute top-0 left-0 w-auto max-w-full pointer-events-auto" }; -const _sfc_main$9 = /* @__PURE__ */ defineComponent({ - __name: "SecondRowWorkflowTabs", - setup(__props) { - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$e, [ - createVNode(WorkflowTabs) - ]); - }; - } -}); -const SecondRowWorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-38831d8e"]]); -const CORE_SETTINGS = [ - { - id: "Comfy.Validation.Workflows", - name: "Validate workflows", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.NodeSearchBoxImpl", - category: ["Comfy", "Node Search Box", "Implementation"], - experimental: true, - name: "Node search box implementation", - type: "combo", - options: ["default", "litegraph (legacy)"], - defaultValue: "default" - }, - { - id: "Comfy.LinkRelease.Action", - category: ["LiteGraph", "LinkRelease", "Action"], - name: "Action on link release (No modifier)", - type: "combo", - options: Object.values(LinkReleaseTriggerAction), - defaultValue: LinkReleaseTriggerAction.CONTEXT_MENU - }, - { - id: "Comfy.LinkRelease.ActionShift", - category: ["LiteGraph", "LinkRelease", "ActionShift"], - name: "Action on link release (Shift)", - type: "combo", - options: Object.values(LinkReleaseTriggerAction), - defaultValue: LinkReleaseTriggerAction.SEARCH_BOX - }, - { - id: "Comfy.NodeSearchBoxImpl.NodePreview", - category: ["Comfy", "Node Search Box", "NodePreview"], - name: "Node preview", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.NodeSearchBoxImpl.ShowCategory", - category: ["Comfy", "Node Search Box", "ShowCategory"], - name: "Show node category in search results", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.NodeSearchBoxImpl.ShowIdName", - category: ["Comfy", "Node Search Box", "ShowIdName"], - name: "Show node id name in search results", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.NodeSearchBoxImpl.ShowNodeFrequency", - category: ["Comfy", "Node Search Box", "ShowNodeFrequency"], - name: "Show node frequency in search results", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Sidebar.Location", - category: ["Appearance", "Sidebar", "Location"], - name: "Sidebar location", - type: "combo", - options: ["left", "right"], - defaultValue: "left" - }, - { - id: "Comfy.Sidebar.Size", - category: ["Appearance", "Sidebar", "Size"], - name: "Sidebar size", - type: "combo", - options: ["normal", "small"], - // Default to small if the window is less than 1536px(2xl) wide. - defaultValue: /* @__PURE__ */ __name(() => window.innerWidth < 1536 ? "small" : "normal", "defaultValue") - }, - { - id: "Comfy.TextareaWidget.FontSize", - category: ["Appearance", "Node Widget", "TextareaWidget", "FontSize"], - name: "Textarea widget font size", - type: "slider", - defaultValue: 10, - attrs: { - min: 8, - max: 24 - } - }, - { - id: "Comfy.TextareaWidget.Spellcheck", - category: ["Comfy", "Node Widget", "TextareaWidget", "Spellcheck"], - name: "Textarea widget spellcheck", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Workflow.SortNodeIdOnSave", - name: "Sort node IDs when saving workflow", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Graph.CanvasInfo", - category: ["LiteGraph", "Canvas", "CanvasInfo"], - name: "Show canvas info on bottom left corner (fps, etc.)", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Node.ShowDeprecated", - name: "Show deprecated nodes in search", - tooltip: "Deprecated nodes are hidden by default in the UI, but remain functional in existing workflows that use them.", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Node.ShowExperimental", - name: "Show experimental nodes in search", - tooltip: "Experimental nodes are marked as such in the UI and may be subject to significant changes or removal in future versions. Use with caution in production workflows", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Node.Opacity", - category: ["Appearance", "Node", "Opacity"], - name: "Node opacity", - type: "slider", - defaultValue: 1, - attrs: { - min: 0.01, - max: 1, - step: 0.01 - } - }, - { - id: "Comfy.Workflow.ShowMissingNodesWarning", - name: "Show missing nodes warning", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Workflow.ShowMissingModelsWarning", - name: "Show missing models warning", - type: "boolean", - defaultValue: false, - experimental: true - }, - { - id: "Comfy.Graph.ZoomSpeed", - category: ["LiteGraph", "Canvas", "ZoomSpeed"], - name: "Canvas zoom speed", - type: "slider", - defaultValue: 1.1, - attrs: { - min: 1.01, - max: 2.5, - step: 0.01 - } - }, - // Bookmarks are stored in the settings store. - // Bookmarks are in format of category/display_name. e.g. "conditioning/CLIPTextEncode" - { - id: "Comfy.NodeLibrary.Bookmarks", - name: "Node library bookmarks with display name (deprecated)", - type: "hidden", - defaultValue: [], - deprecated: true - }, - { - id: "Comfy.NodeLibrary.Bookmarks.V2", - name: "Node library bookmarks v2 with unique name", - type: "hidden", - defaultValue: [] - }, - // Stores mapping from bookmark folder name to its customization. - { - id: "Comfy.NodeLibrary.BookmarksCustomization", - name: "Node library bookmarks customization", - type: "hidden", - defaultValue: {} - }, - // Hidden setting used by the queue for how to fit images - { - id: "Comfy.Queue.ImageFit", - name: "Queue image fit", - type: "hidden", - defaultValue: "cover" - }, - { - id: "Comfy.GroupSelectedNodes.Padding", - category: ["LiteGraph", "Group", "Padding"], - name: "Group selected nodes padding", - type: "slider", - defaultValue: 10, - attrs: { - min: 0, - max: 100 - } - }, - { - id: "Comfy.Node.DoubleClickTitleToEdit", - category: ["LiteGraph", "Node", "DoubleClickTitleToEdit"], - name: "Double click node title to edit", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Group.DoubleClickTitleToEdit", - category: ["LiteGraph", "Group", "DoubleClickTitleToEdit"], - name: "Double click group title to edit", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Window.UnloadConfirmation", - name: "Show confirmation when closing window", - type: "boolean", - defaultValue: true, - versionModified: "1.7.12" - }, - { - id: "Comfy.TreeExplorer.ItemPadding", - category: ["Appearance", "Tree Explorer", "ItemPadding"], - name: "Tree explorer item padding", - type: "slider", - defaultValue: 2, - attrs: { - min: 0, - max: 8, - step: 1 - } - }, - { - id: "Comfy.ModelLibrary.AutoLoadAll", - name: "Automatically load all model folders", - tooltip: "If true, all folders will load as soon as you open the model library (this may cause delays while it loads). If false, root level model folders will only load once you click on them.", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.ModelLibrary.NameFormat", - name: "What name to display in the model library tree view", - tooltip: 'Select "filename" to render a simplified view of the raw filename (without directory or ".safetensors" extension) in the model list. Select "title" to display the configurable model metadata title.', - type: "combo", - options: ["filename", "title"], - defaultValue: "title" - }, - { - id: "Comfy.Locale", - name: "Language", - type: "combo", - options: [ - { value: "en", text: "English" }, - { value: "zh", text: "中文" }, - { value: "ru", text: "Русский" }, - { value: "ja", text: "日本語" }, - { value: "ko", text: "한국어" }, - { value: "fr", text: "Français" } - ], - defaultValue: /* @__PURE__ */ __name(() => navigator.language.split("-")[0] || "en", "defaultValue") - }, - { - id: "Comfy.NodeBadge.NodeSourceBadgeMode", - category: ["LiteGraph", "Node", "NodeSourceBadgeMode"], - name: "Node source badge mode", - type: "combo", - options: Object.values(NodeBadgeMode), - defaultValue: NodeBadgeMode.HideBuiltIn - }, - { - id: "Comfy.NodeBadge.NodeIdBadgeMode", - category: ["LiteGraph", "Node", "NodeIdBadgeMode"], - name: "Node ID badge mode", - type: "combo", - options: [NodeBadgeMode.None, NodeBadgeMode.ShowAll], - defaultValue: NodeBadgeMode.ShowAll - }, - { - id: "Comfy.NodeBadge.NodeLifeCycleBadgeMode", - category: ["LiteGraph", "Node", "NodeLifeCycleBadgeMode"], - name: "Node life cycle badge mode", - type: "combo", - options: [NodeBadgeMode.None, NodeBadgeMode.ShowAll], - defaultValue: NodeBadgeMode.ShowAll - }, - { - id: "Comfy.ConfirmClear", - category: ["Comfy", "Workflow", "ConfirmClear"], - name: "Require confirmation when clearing workflow", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.PromptFilename", - category: ["Comfy", "Workflow", "PromptFilename"], - name: "Prompt for filename when saving workflow", - type: "boolean", - defaultValue: true - }, - /** - * file format for preview - * - * format;quality - * - * ex) - * webp;50 -> webp, quality 50 - * jpeg;80 -> rgb, jpeg, quality 80 - * - * @type {string} - */ - { - id: "Comfy.PreviewFormat", - category: ["LiteGraph", "Node Widget", "PreviewFormat"], - name: "Preview image format", - tooltip: "When displaying a preview in the image widget, convert it to a lightweight image, e.g. webp, jpeg, webp;50, etc.", - type: "text", - defaultValue: "" - }, - { - id: "Comfy.DisableSliders", - category: ["LiteGraph", "Node Widget", "DisableSliders"], - name: "Disable node widget sliders", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.DisableFloatRounding", - category: ["LiteGraph", "Node Widget", "DisableFloatRounding"], - name: "Disable default float widget rounding.", - tooltip: "(requires page reload) Cannot disable round when round is set by the node in the backend.", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.FloatRoundingPrecision", - category: ["LiteGraph", "Node Widget", "FloatRoundingPrecision"], - name: "Float widget rounding decimal places [0 = auto].", - tooltip: "(requires page reload)", - type: "slider", - attrs: { - min: 0, - max: 6, - step: 1 - }, - defaultValue: 0 - }, - { - id: "Comfy.EnableTooltips", - category: ["LiteGraph", "Node", "EnableTooltips"], - name: "Enable Tooltips", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.DevMode", - name: "Enable dev mode options (API save, etc.)", - type: "boolean", - defaultValue: false, - onChange: /* @__PURE__ */ __name((value) => { - const element = document.getElementById("comfy-dev-save-api-button"); - if (element) { - element.style.display = value ? "flex" : "none"; - } - }, "onChange") - }, - { - id: "Comfy.UseNewMenu", - category: ["Comfy", "Menu", "UseNewMenu"], - defaultValue: "Top", - name: "Use new menu", - type: "combo", - options: ["Disabled", "Top", "Bottom"], - migrateDeprecatedValue: /* @__PURE__ */ __name((value) => { - if (value === "Floating") { - return "Top"; - } - return value; - }, "migrateDeprecatedValue") - }, - { - id: "Comfy.Workflow.WorkflowTabsPosition", - name: "Opened workflows position", - type: "combo", - options: ["Sidebar", "Topbar", "Topbar (2nd-row)"], - // Default to topbar (2nd-row) if the window is less than 1536px(2xl) wide. - defaultValue: /* @__PURE__ */ __name(() => window.innerWidth < 1536 ? "Topbar (2nd-row)" : "Topbar", "defaultValue") - }, - { - id: "Comfy.Graph.CanvasMenu", - category: ["LiteGraph", "Canvas", "CanvasMenu"], - name: "Show graph canvas menu", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.QueueButton.BatchCountLimit", - name: "Batch count limit", - tooltip: "The maximum number of tasks added to the queue at one button click", - type: "number", - defaultValue: 100, - versionAdded: "1.3.5" - }, - { - id: "Comfy.Keybinding.UnsetBindings", - name: "Keybindings unset by the user", - type: "hidden", - defaultValue: [], - versionAdded: "1.3.7", - versionModified: "1.7.3", - migrateDeprecatedValue: /* @__PURE__ */ __name((value) => { - return value.map((keybinding) => { - if (keybinding["targetSelector"] === "#graph-canvas") { - keybinding["targetElementId"] = "graph-canvas"; - } - return keybinding; - }); - }, "migrateDeprecatedValue") - }, - { - id: "Comfy.Keybinding.NewBindings", - name: "Keybindings set by the user", - type: "hidden", - defaultValue: [], - versionAdded: "1.3.7" - }, - { - id: "Comfy.Extension.Disabled", - name: "Disabled extension names", - type: "hidden", - defaultValue: [], - versionAdded: "1.3.11" - }, - { - id: "Comfy.Validation.NodeDefs", - name: "Validate node definitions (slow)", - type: "boolean", - tooltip: "Recommended for node developers. This will validate all node definitions on startup.", - defaultValue: false, - versionAdded: "1.3.14" - }, - { - id: "Comfy.LinkRenderMode", - category: ["LiteGraph", "Graph", "LinkRenderMode"], - name: "Link Render Mode", - defaultValue: 2, - type: "combo", - options: [ - { value: LiteGraph.STRAIGHT_LINK, text: "Straight" }, - { value: LiteGraph.LINEAR_LINK, text: "Linear" }, - { value: LiteGraph.SPLINE_LINK, text: "Spline" }, - { value: LiteGraph.HIDDEN_LINK, text: "Hidden" } - ] - }, - { - id: "Comfy.Node.AutoSnapLinkToSlot", - category: ["LiteGraph", "Node", "AutoSnapLinkToSlot"], - name: "Auto snap link to node slot", - tooltip: "When dragging a link over a node, the link automatically snap to a viable input slot on the node", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.29" - }, - { - id: "Comfy.Node.SnapHighlightsNode", - category: ["LiteGraph", "Node", "SnapHighlightsNode"], - name: "Snap highlights node", - tooltip: "When dragging a link over a node with viable input slot, highlight the node", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.29" - }, - { - id: "Comfy.Node.BypassAllLinksOnDelete", - category: ["LiteGraph", "Node", "BypassAllLinksOnDelete"], - name: "Keep all links when deleting nodes", - tooltip: "When deleting a node, attempt to reconnect all of its input and output links (bypassing the deleted node)", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.40" - }, - { - id: "Comfy.Node.MiddleClickRerouteNode", - category: ["LiteGraph", "Node", "MiddleClickRerouteNode"], - name: "Middle-click creates a new Reroute node", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.42" - }, - { - id: "Comfy.RerouteBeta", - category: ["LiteGraph", "RerouteBeta"], - name: "Opt-in to the reroute beta test", - tooltip: "Enables the new native reroutes.\n\nReroutes can be added by holding alt and dragging from a link line, or on the link menu.\n\nDisabling this option is non-destructive - reroutes are hidden.", - experimental: true, - type: "boolean", - defaultValue: false, - versionAdded: "1.3.42" - }, - { - id: "Comfy.Graph.LinkMarkers", - category: ["LiteGraph", "Link", "LinkMarkers"], - name: "Link midpoint markers", - defaultValue: LinkMarkerShape.Circle, - type: "combo", - options: [ - { value: LinkMarkerShape.None, text: "None" }, - { value: LinkMarkerShape.Circle, text: "Circle" }, - { value: LinkMarkerShape.Arrow, text: "Arrow" } - ], - versionAdded: "1.3.42" - }, - { - id: "Comfy.DOMClippingEnabled", - category: ["LiteGraph", "Node", "DOMClippingEnabled"], - name: "Enable DOM element clipping (enabling may reduce performance)", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Graph.CtrlShiftZoom", - category: ["LiteGraph", "Canvas", "CtrlShiftZoom"], - name: "Enable fast-zoom shortcut (Ctrl + Shift + Drag)", - type: "boolean", - defaultValue: true, - versionAdded: "1.4.0" - }, - { - id: "Comfy.Pointer.ClickDrift", - category: ["LiteGraph", "Pointer", "ClickDrift"], - name: "Pointer click drift (maximum distance)", - tooltip: "If the pointer moves more than this distance while holding a button down, it is considered dragging (rather than clicking).\n\nHelps prevent objects from being unintentionally nudged if the pointer is moved whilst clicking.", - experimental: true, - type: "slider", - attrs: { - min: 0, - max: 20, - step: 1 - }, - defaultValue: 6, - versionAdded: "1.4.3" - }, - { - id: "Comfy.Pointer.ClickBufferTime", - category: ["LiteGraph", "Pointer", "ClickBufferTime"], - name: "Pointer click drift delay", - tooltip: "After pressing a pointer button down, this is the maximum time (in milliseconds) that pointer movement can be ignored for.\n\nHelps prevent objects from being unintentionally nudged if the pointer is moved whilst clicking.", - experimental: true, - type: "slider", - attrs: { - min: 0, - max: 1e3, - step: 25 - }, - defaultValue: 150, - versionAdded: "1.4.3" - }, - { - id: "Comfy.Pointer.DoubleClickTime", - category: ["LiteGraph", "Pointer", "DoubleClickTime"], - name: "Double click interval (maximum)", - tooltip: "The maximum time in milliseconds between the two clicks of a double-click. Increasing this value may assist if double-clicks are sometimes not registered.", - type: "slider", - attrs: { - min: 100, - max: 1e3, - step: 50 - }, - defaultValue: 300, - versionAdded: "1.4.3" - }, - { - id: "Comfy.SnapToGrid.GridSize", - category: ["LiteGraph", "Canvas", "GridSize"], - name: "Snap to grid size", - type: "slider", - attrs: { - min: 1, - max: 500 - }, - tooltip: "When dragging and resizing nodes while holding shift they will be aligned to the grid, this controls the size of that grid.", - defaultValue: LiteGraph.CANVAS_GRID_SIZE - }, - // Keep the 'pysssss.SnapToGrid' setting id so we don't need to migrate setting values. - // Using a new setting id can cause existing users to lose their existing settings. - { - id: "pysssss.SnapToGrid", - category: ["LiteGraph", "Canvas", "AlwaysSnapToGrid"], - name: "Always snap to grid", - type: "boolean", - defaultValue: false, - versionAdded: "1.3.13" - }, - { - id: "Comfy.Server.ServerConfigValues", - name: "Server config values for frontend display", - tooltip: "Server config values used for frontend display only", - type: "hidden", - // Mapping from server config id to value. - defaultValue: {}, - versionAdded: "1.4.8" - }, - { - id: "Comfy.Server.LaunchArgs", - name: "Server launch arguments", - tooltip: "These are the actual arguments that are passed to the server when it is launched.", - type: "hidden", - defaultValue: {}, - versionAdded: "1.4.8" - }, - { - id: "Comfy.Queue.MaxHistoryItems", - name: "Queue history size", - tooltip: "The maximum number of tasks that show in the queue history.", - type: "slider", - attrs: { - min: 16, - max: 256, - step: 16 - }, - defaultValue: 64, - versionAdded: "1.4.12" - }, - { - id: "LiteGraph.Canvas.MaximumFps", - name: "Maxium FPS", - tooltip: "The maximum frames per second that the canvas is allowed to render. Caps GPU usage at the cost of smoothness. If 0, the screen refresh rate is used. Default: 0", - type: "slider", - attrs: { - min: 0, - max: 120 - }, - defaultValue: 0, - versionAdded: "1.5.1" - }, - { - id: "Comfy.EnableWorkflowViewRestore", - category: ["Comfy", "Workflow", "EnableWorkflowViewRestore"], - name: "Save and restore canvas position and zoom level in workflows", - type: "boolean", - defaultValue: true, - versionModified: "1.5.4" - }, - { - id: "Comfy.Workflow.ConfirmDelete", - name: "Show confirmation when deleting workflows", - type: "boolean", - defaultValue: true, - versionAdded: "1.5.6" - }, - { - id: "Comfy.ColorPalette", - name: "The active color palette id", - type: "hidden", - defaultValue: "dark", - versionModified: "1.6.7", - migrateDeprecatedValue(value) { - return value.startsWith("custom_") ? value.replace("custom_", "") : value; - } - }, - { - id: "Comfy.CustomColorPalettes", - name: "Custom color palettes", - type: "hidden", - defaultValue: {}, - versionModified: "1.6.7" - }, - { - id: "Comfy.WidgetControlMode", - category: ["Comfy", "Node Widget", "WidgetControlMode"], - name: "Widget control mode", - tooltip: "Controls when widget values are updated (randomize/increment/decrement), either before the prompt is queued or after.", - type: "combo", - defaultValue: "after", - options: ["before", "after"], - versionModified: "1.6.10" - } -]; -const _sfc_main$8 = /* @__PURE__ */ defineComponent({ - __name: "GraphCanvas", - emits: ["ready"], - setup(__props, { emit: __emit }) { - const emit = __emit; - const canvasRef = ref(null); - const litegraphService = useLitegraphService(); - const settingStore = useSettingStore(); - const nodeDefStore = useNodeDefStore(); - const workspaceStore = useWorkspaceStore(); - const canvasStore = useCanvasStore(); - const modelToNodeStore = useModelToNodeStore(); - const betaMenuEnabled = computed( - () => settingStore.get("Comfy.UseNewMenu") !== "Disabled" - ); - const workflowTabsPosition = computed( - () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") - ); - const canvasMenuEnabled = computed( - () => settingStore.get("Comfy.Graph.CanvasMenu") - ); - const tooltipEnabled = computed(() => settingStore.get("Comfy.EnableTooltips")); - const storedWorkflows = JSON.parse( - getStorageValue("Comfy.OpenWorkflowsPaths") || "[]" - ); - const storedActiveIndex = JSON.parse( - getStorageValue("Comfy.ActiveWorkflowIndex") || "-1" - ); - const openWorkflows = computed(() => workspaceStore?.workflow?.openWorkflows); - const activeWorkflow = computed(() => workspaceStore?.workflow?.activeWorkflow); - const restoreState2 = computed(() => { - if (!openWorkflows.value || !activeWorkflow.value) { - return { paths: [], activeIndex: -1 }; - } - const paths = openWorkflows.value.filter((workflow) => workflow?.isPersisted && !workflow.isModified).map((workflow) => workflow.path); - const activeIndex = openWorkflows.value.findIndex( - (workflow) => workflow.path === activeWorkflow.value?.path - ); - return { paths, activeIndex }; - }); - watchEffect(() => { - const canvasInfoEnabled = settingStore.get("Comfy.Graph.CanvasInfo"); - if (canvasStore.canvas) { - canvasStore.canvas.show_info = canvasInfoEnabled; - } - }); - watchEffect(() => { - const zoomSpeed = settingStore.get("Comfy.Graph.ZoomSpeed"); - if (canvasStore.canvas) { - canvasStore.canvas.zoom_speed = zoomSpeed; - } - }); - watchEffect(() => { - LiteGraph.snaps_for_comfy = settingStore.get("Comfy.Node.AutoSnapLinkToSlot"); - }); - watchEffect(() => { - LiteGraph.snap_highlights_node = settingStore.get( - "Comfy.Node.SnapHighlightsNode" - ); - }); - watchEffect(() => { - LGraphNode.keepAllLinksOnBypass = settingStore.get( - "Comfy.Node.BypassAllLinksOnDelete" - ); - }); - watchEffect(() => { - LiteGraph.middle_click_slot_add_default_node = settingStore.get( - "Comfy.Node.MiddleClickRerouteNode" - ); - }); - watchEffect(() => { - nodeDefStore.showDeprecated = settingStore.get("Comfy.Node.ShowDeprecated"); - }); - watchEffect(() => { - nodeDefStore.showExperimental = settingStore.get( - "Comfy.Node.ShowExperimental" - ); - }); - watchEffect(() => { - const spellcheckEnabled = settingStore.get("Comfy.TextareaWidget.Spellcheck"); - const textareas = document.querySelectorAll("textarea.comfy-multiline-input"); - textareas.forEach((textarea) => { - textarea.spellcheck = spellcheckEnabled; - textarea.focus(); - textarea.blur(); - }); - }); - watchEffect(() => { - const linkRenderMode = settingStore.get("Comfy.LinkRenderMode"); - if (canvasStore.canvas) { - canvasStore.canvas.links_render_mode = linkRenderMode; - canvasStore.canvas.setDirty( - /* fg */ - false, - /* bg */ - true - ); - } - }); - watchEffect(() => { - const linkMarkerShape = settingStore.get("Comfy.Graph.LinkMarkers"); - const { canvas } = canvasStore; - if (canvas) { - canvas.linkMarkerShape = linkMarkerShape; - canvas.setDirty(false, true); - } - }); - watchEffect(() => { - const reroutesEnabled = settingStore.get("Comfy.RerouteBeta"); - const { canvas } = canvasStore; - if (canvas) { - canvas.reroutesEnabled = reroutesEnabled; - canvas.setDirty(false, true); - } - }); - watchEffect(() => { - const maximumFps = settingStore.get("LiteGraph.Canvas.MaximumFps"); - const { canvas } = canvasStore; - if (canvas) canvas.maximumFps = maximumFps; - }); - watchEffect(() => { - CanvasPointer.doubleClickTime = settingStore.get( - "Comfy.Pointer.DoubleClickTime" - ); - }); - watchEffect(() => { - CanvasPointer.bufferTime = settingStore.get("Comfy.Pointer.ClickBufferTime"); - }); - watchEffect(() => { - CanvasPointer.maxClickDrift = settingStore.get("Comfy.Pointer.ClickDrift"); - }); - watchEffect(() => { - LiteGraph.CANVAS_GRID_SIZE = settingStore.get("Comfy.SnapToGrid.GridSize"); - }); - watchEffect(() => { - LiteGraph.alwaysSnapToGrid = settingStore.get("pysssss.SnapToGrid"); - }); - watch( - () => settingStore.get("Comfy.WidgetControlMode"), - () => { - if (!canvasStore.canvas) return; - for (const n of app.graph.nodes) { - if (!n.widgets) continue; - for (const w of n.widgets) { - if (w[IS_CONTROL_WIDGET]) { - updateControlWidgetLabel(w); - if (w.linkedWidgets) { - for (const l of w.linkedWidgets) { - updateControlWidgetLabel(l); - } - } - } - } - } - app.graph.setDirtyCanvas(true); - } - ); - const colorPaletteService = useColorPaletteService(); - const colorPaletteStore = useColorPaletteStore(); - watch( - [() => canvasStore.canvas, () => settingStore.get("Comfy.ColorPalette")], - ([canvas, currentPaletteId]) => { - if (!canvas) return; - colorPaletteService.loadColorPalette(currentPaletteId); - } - ); - watch( - () => colorPaletteStore.activePaletteId, - (newValue) => { - settingStore.set("Comfy.ColorPalette", newValue); - } - ); - const workflowStore = useWorkflowStore(); - const persistCurrentWorkflow = /* @__PURE__ */ __name(() => { - const workflow = JSON.stringify(app.serializeGraph()); - localStorage.setItem("workflow", workflow); - if (api.clientId) { - sessionStorage.setItem(`workflow:${api.clientId}`, workflow); - } - }, "persistCurrentWorkflow"); - watchEffect(() => { - if (workflowStore.activeWorkflow) { - const workflow = workflowStore.activeWorkflow; - setStorageValue("Comfy.PreviousWorkflow", workflow.key); - persistCurrentWorkflow(); - } - }); - api.addEventListener("graphChanged", persistCurrentWorkflow); - usePragmaticDroppable(() => canvasRef.value, { - onDrop: /* @__PURE__ */ __name((event) => { - const loc = event.location.current.input; - const dndData = event.source.data; - if (dndData.type === "tree-explorer-node") { - const node = dndData.data; - if (node.data instanceof ComfyNodeDefImpl) { - const nodeDef = node.data; - const pos = app.clientPosToCanvasPos([ - loc.clientX - 20, - loc.clientY - ]); - litegraphService.addNodeOnGraph(nodeDef, { pos }); - } else if (node.data instanceof ComfyModelDef) { - const model = node.data; - const pos = app.clientPosToCanvasPos([loc.clientX, loc.clientY]); - const nodeAtPos = app.graph.getNodeOnPos(pos[0], pos[1]); - let targetProvider = null; - let targetGraphNode = null; - if (nodeAtPos) { - const providers = modelToNodeStore.getAllNodeProviders( - model.directory - ); - for (const provider of providers) { - if (provider.nodeDef.name === nodeAtPos.comfyClass) { - targetGraphNode = nodeAtPos; - targetProvider = provider; - } - } - } - if (!targetGraphNode) { - const provider = modelToNodeStore.getNodeProvider(model.directory); - if (provider) { - targetGraphNode = litegraphService.addNodeOnGraph( - provider.nodeDef, - { - pos - } - ); - targetProvider = provider; - } - } - if (targetGraphNode) { - const widget = targetGraphNode.widgets.find( - (widget2) => widget2.name === targetProvider.key - ); - if (widget) { - widget.value = model.file_name; - } - } - } - } - }, "onDrop") - }); - const comfyAppReady = ref(false); - onMounted(async () => { - window["LiteGraph"] = LiteGraph; - window["LGraph"] = LGraph; - window["LLink"] = LLink; - window["LGraphNode"] = LGraphNode; - window["LGraphGroup"] = LGraphGroup; - window["DragAndScale"] = DragAndScale; - window["LGraphCanvas"] = LGraphCanvas; - window["ContextMenu"] = ContextMenu; - window["LGraphBadge"] = LGraphBadge; - app.vueAppReady = true; - workspaceStore.spinner = true; - ChangeTracker.init(app); - await settingStore.loadSettingValues(); - CORE_SETTINGS.forEach((setting) => { - settingStore.addSetting(setting); - }); - await app.setup(canvasRef.value); - canvasStore.canvas = app.canvas; - canvasStore.canvas.render_canvas_border = false; - workspaceStore.spinner = false; - window["app"] = app; - window["graph"] = app.graph; - comfyAppReady.value = true; - colorPaletteStore.customPalettes = settingStore.get( - "Comfy.CustomColorPalettes" - ); - const isRestorable = storedWorkflows?.length > 0 && storedActiveIndex >= 0; - if (isRestorable) - workflowStore.openWorkflowsInBackground({ - left: storedWorkflows.slice(0, storedActiveIndex), - right: storedWorkflows.slice(storedActiveIndex) - }); - watch(restoreState2, ({ paths, activeIndex }) => { - setStorageValue("Comfy.OpenWorkflowsPaths", JSON.stringify(paths)); - setStorageValue("Comfy.ActiveWorkflowIndex", JSON.stringify(activeIndex)); - }); - watch( - () => settingStore.get("Comfy.Locale"), - async () => { - await useCommandStore().execute("Comfy.RefreshNodeDefinitions"); - useWorkflowService().reloadCurrentWorkflow(); - } - ); - emit("ready"); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock(Fragment, null, [ - (openBlock(), createBlock(Teleport, { to: ".graph-canvas-container" }, [ - comfyAppReady.value && betaMenuEnabled.value && !unref(workspaceStore).focusMode ? (openBlock(), createBlock(LiteGraphCanvasSplitterOverlay, { key: 0 }, { - "side-bar-panel": withCtx(() => [ - createVNode(SideToolbar) - ]), - "bottom-panel": withCtx(() => [ - createVNode(_sfc_main$p) - ]), - "graph-canvas-panel": withCtx(() => [ - workflowTabsPosition.value === "Topbar (2nd-row)" ? (openBlock(), createBlock(SecondRowWorkflowTabs, { key: 0 })) : createCommentVNode("", true), - canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 1 })) : createCommentVNode("", true) - ]), - _: 1 - })) : createCommentVNode("", true), - createVNode(TitleEditor), - !betaMenuEnabled.value && canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 1 })) : createCommentVNode("", true), - createBaseVNode("canvas", { - ref_key: "canvasRef", - ref: canvasRef, - id: "graph-canvas", - tabindex: "1" - }, null, 512) - ])), - createVNode(_sfc_main$h), - tooltipEnabled.value ? (openBlock(), createBlock(NodeTooltip, { key: 0 })) : createCommentVNode("", true), - createVNode(_sfc_main$n) - ], 64); - }; - } -}); +__name(render$7, "render$7"); +script$8.render = render$7; function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { @@ -5188,7 +2554,7 @@ function _toPrimitive$3(t, r) { __name(_toPrimitive$3, "_toPrimitive$3"); var theme$3 = /* @__PURE__ */ __name(function theme5(_ref) { var dt = _ref.dt; - return "\n.p-toast {\n width: ".concat(dt("toast.width"), ";\n white-space: pre-line;\n word-break: break-word;\n}\n\n.p-toast-message {\n margin: 0 0 1rem 0;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n font-size: ").concat(dt("toast.icon.size"), ";\n width: ").concat(dt("toast.icon.size"), ";\n height: ").concat(dt("toast.icon.size"), ";\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n padding: ").concat(dt("toast.content.padding"), ";\n gap: ").concat(dt("toast.content.gap"), ";\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("toast.text.gap"), ";\n}\n\n.p-toast-summary {\n font-weight: ").concat(dt("toast.summary.font.weight"), ";\n font-size: ").concat(dt("toast.summary.font.size"), ";\n}\n\n.p-toast-detail {\n font-weight: ").concat(dt("toast.detail.font.weight"), ";\n font-size: ").concat(dt("toast.detail.font.size"), ";\n}\n\n.p-toast-close-button {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n cursor: pointer;\n background: transparent;\n transition: background ").concat(dt("toast.transition.duration"), ", color ").concat(dt("toast.transition.duration"), ", outline-color ").concat(dt("toast.transition.duration"), ", box-shadow ").concat(dt("toast.transition.duration"), ";\n outline-color: transparent;\n color: inherit;\n width: ").concat(dt("toast.close.button.width"), ";\n height: ").concat(dt("toast.close.button.height"), ";\n border-radius: ").concat(dt("toast.close.button.border.radius"), ";\n margin: -25% 0 0 0;\n right: -25%;\n padding: 0;\n border: none;\n user-select: none;\n}\n\n.p-toast-message-info,\n.p-toast-message-success,\n.p-toast-message-warn,\n.p-toast-message-error,\n.p-toast-message-secondary,\n.p-toast-message-contrast {\n border-width: ").concat(dt("toast.border.width"), ";\n border-style: solid;\n backdrop-filter: blur(").concat(dt("toast.blur"), ");\n border-radius: ").concat(dt("toast.border.radius"), ";\n}\n\n.p-toast-close-icon {\n font-size: ").concat(dt("toast.close.icon.size"), ";\n width: ").concat(dt("toast.close.icon.size"), ";\n height: ").concat(dt("toast.close.icon.size"), ";\n}\n\n.p-toast-close-button:focus-visible {\n outline-width: ").concat(dt("focus.ring.width"), ";\n outline-style: ").concat(dt("focus.ring.style"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-toast-message-info {\n background: ").concat(dt("toast.info.background"), ";\n border-color: ").concat(dt("toast.info.border.color"), ";\n color: ").concat(dt("toast.info.color"), ";\n box-shadow: ").concat(dt("toast.info.shadow"), ";\n}\n\n.p-toast-message-info .p-toast-detail {\n color: ").concat(dt("toast.info.detail.color"), ";\n}\n\n.p-toast-message-info .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.info.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.info.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-info .p-toast-close-button:hover {\n background: ").concat(dt("toast.info.close.button.hover.background"), ";\n}\n\n.p-toast-message-success {\n background: ").concat(dt("toast.success.background"), ";\n border-color: ").concat(dt("toast.success.border.color"), ";\n color: ").concat(dt("toast.success.color"), ";\n box-shadow: ").concat(dt("toast.success.shadow"), ";\n}\n\n.p-toast-message-success .p-toast-detail {\n color: ").concat(dt("toast.success.detail.color"), ";\n}\n\n.p-toast-message-success .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.success.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.success.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-success .p-toast-close-button:hover {\n background: ").concat(dt("toast.success.close.button.hover.background"), ";\n}\n\n.p-toast-message-warn {\n background: ").concat(dt("toast.warn.background"), ";\n border-color: ").concat(dt("toast.warn.border.color"), ";\n color: ").concat(dt("toast.warn.color"), ";\n box-shadow: ").concat(dt("toast.warn.shadow"), ";\n}\n\n.p-toast-message-warn .p-toast-detail {\n color: ").concat(dt("toast.warn.detail.color"), ";\n}\n\n.p-toast-message-warn .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.warn.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.warn.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-warn .p-toast-close-button:hover {\n background: ").concat(dt("toast.warn.close.button.hover.background"), ";\n}\n\n.p-toast-message-error {\n background: ").concat(dt("toast.error.background"), ";\n border-color: ").concat(dt("toast.error.border.color"), ";\n color: ").concat(dt("toast.error.color"), ";\n box-shadow: ").concat(dt("toast.error.shadow"), ";\n}\n\n.p-toast-message-error .p-toast-detail {\n color: ").concat(dt("toast.error.detail.color"), ";\n}\n\n.p-toast-message-error .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.error.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.error.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-error .p-toast-close-button:hover {\n background: ").concat(dt("toast.error.close.button.hover.background"), ";\n}\n\n.p-toast-message-secondary {\n background: ").concat(dt("toast.secondary.background"), ";\n border-color: ").concat(dt("toast.secondary.border.color"), ";\n color: ").concat(dt("toast.secondary.color"), ";\n box-shadow: ").concat(dt("toast.secondary.shadow"), ";\n}\n\n.p-toast-message-secondary .p-toast-detail {\n color: ").concat(dt("toast.secondary.detail.color"), ";\n}\n\n.p-toast-message-secondary .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.secondary.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.secondary.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-secondary .p-toast-close-button:hover {\n background: ").concat(dt("toast.secondary.close.button.hover.background"), ";\n}\n\n.p-toast-message-contrast {\n background: ").concat(dt("toast.contrast.background"), ";\n border-color: ").concat(dt("toast.contrast.border.color"), ";\n color: ").concat(dt("toast.contrast.color"), ";\n box-shadow: ").concat(dt("toast.contrast.shadow"), ";\n}\n\n.p-toast-message-contrast .p-toast-detail {\n color: ").concat(dt("toast.contrast.detail.color"), ";\n}\n\n.p-toast-message-contrast .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.contrast.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.contrast.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-contrast .p-toast-close-button:hover {\n background: ").concat(dt("toast.contrast.close.button.hover.background"), ";\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-message-enter-from {\n opacity: 0;\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"); + return "\n.p-toast {\n width: ".concat(dt("toast.width"), ";\n white-space: pre-line;\n word-break: break-word;\n}\n\n.p-toast-message {\n margin: 0 0 1rem 0;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n font-size: ").concat(dt("toast.icon.size"), ";\n width: ").concat(dt("toast.icon.size"), ";\n height: ").concat(dt("toast.icon.size"), ";\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n padding: ").concat(dt("toast.content.padding"), ";\n gap: ").concat(dt("toast.content.gap"), ";\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("toast.text.gap"), ";\n}\n\n.p-toast-summary {\n font-weight: ").concat(dt("toast.summary.font.weight"), ";\n font-size: ").concat(dt("toast.summary.font.size"), ";\n}\n\n.p-toast-detail {\n font-weight: ").concat(dt("toast.detail.font.weight"), ";\n font-size: ").concat(dt("toast.detail.font.size"), ";\n}\n\n.p-toast-close-button {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n cursor: pointer;\n background: transparent;\n transition: background ").concat(dt("toast.transition.duration"), ", color ").concat(dt("toast.transition.duration"), ", outline-color ").concat(dt("toast.transition.duration"), ", box-shadow ").concat(dt("toast.transition.duration"), ";\n outline-color: transparent;\n color: inherit;\n width: ").concat(dt("toast.close.button.width"), ";\n height: ").concat(dt("toast.close.button.height"), ";\n border-radius: ").concat(dt("toast.close.button.border.radius"), ";\n margin: -25% 0 0 0;\n right: -25%;\n padding: 0;\n border: none;\n user-select: none;\n}\n\n.p-toast-close-button:dir(rtl) {\n margin: -25% 0 0 auto;\n left: -25%;\n right: auto;\n}\n\n.p-toast-message-info,\n.p-toast-message-success,\n.p-toast-message-warn,\n.p-toast-message-error,\n.p-toast-message-secondary,\n.p-toast-message-contrast {\n border-width: ").concat(dt("toast.border.width"), ";\n border-style: solid;\n backdrop-filter: blur(").concat(dt("toast.blur"), ");\n border-radius: ").concat(dt("toast.border.radius"), ";\n}\n\n.p-toast-close-icon {\n font-size: ").concat(dt("toast.close.icon.size"), ";\n width: ").concat(dt("toast.close.icon.size"), ";\n height: ").concat(dt("toast.close.icon.size"), ";\n}\n\n.p-toast-close-button:focus-visible {\n outline-width: ").concat(dt("focus.ring.width"), ";\n outline-style: ").concat(dt("focus.ring.style"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-toast-message-info {\n background: ").concat(dt("toast.info.background"), ";\n border-color: ").concat(dt("toast.info.border.color"), ";\n color: ").concat(dt("toast.info.color"), ";\n box-shadow: ").concat(dt("toast.info.shadow"), ";\n}\n\n.p-toast-message-info .p-toast-detail {\n color: ").concat(dt("toast.info.detail.color"), ";\n}\n\n.p-toast-message-info .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.info.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.info.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-info .p-toast-close-button:hover {\n background: ").concat(dt("toast.info.close.button.hover.background"), ";\n}\n\n.p-toast-message-success {\n background: ").concat(dt("toast.success.background"), ";\n border-color: ").concat(dt("toast.success.border.color"), ";\n color: ").concat(dt("toast.success.color"), ";\n box-shadow: ").concat(dt("toast.success.shadow"), ";\n}\n\n.p-toast-message-success .p-toast-detail {\n color: ").concat(dt("toast.success.detail.color"), ";\n}\n\n.p-toast-message-success .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.success.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.success.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-success .p-toast-close-button:hover {\n background: ").concat(dt("toast.success.close.button.hover.background"), ";\n}\n\n.p-toast-message-warn {\n background: ").concat(dt("toast.warn.background"), ";\n border-color: ").concat(dt("toast.warn.border.color"), ";\n color: ").concat(dt("toast.warn.color"), ";\n box-shadow: ").concat(dt("toast.warn.shadow"), ";\n}\n\n.p-toast-message-warn .p-toast-detail {\n color: ").concat(dt("toast.warn.detail.color"), ";\n}\n\n.p-toast-message-warn .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.warn.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.warn.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-warn .p-toast-close-button:hover {\n background: ").concat(dt("toast.warn.close.button.hover.background"), ";\n}\n\n.p-toast-message-error {\n background: ").concat(dt("toast.error.background"), ";\n border-color: ").concat(dt("toast.error.border.color"), ";\n color: ").concat(dt("toast.error.color"), ";\n box-shadow: ").concat(dt("toast.error.shadow"), ";\n}\n\n.p-toast-message-error .p-toast-detail {\n color: ").concat(dt("toast.error.detail.color"), ";\n}\n\n.p-toast-message-error .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.error.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.error.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-error .p-toast-close-button:hover {\n background: ").concat(dt("toast.error.close.button.hover.background"), ";\n}\n\n.p-toast-message-secondary {\n background: ").concat(dt("toast.secondary.background"), ";\n border-color: ").concat(dt("toast.secondary.border.color"), ";\n color: ").concat(dt("toast.secondary.color"), ";\n box-shadow: ").concat(dt("toast.secondary.shadow"), ";\n}\n\n.p-toast-message-secondary .p-toast-detail {\n color: ").concat(dt("toast.secondary.detail.color"), ";\n}\n\n.p-toast-message-secondary .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.secondary.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.secondary.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-secondary .p-toast-close-button:hover {\n background: ").concat(dt("toast.secondary.close.button.hover.background"), ";\n}\n\n.p-toast-message-contrast {\n background: ").concat(dt("toast.contrast.background"), ";\n border-color: ").concat(dt("toast.contrast.border.color"), ";\n color: ").concat(dt("toast.contrast.color"), ";\n box-shadow: ").concat(dt("toast.contrast.shadow"), ";\n}\n\n.p-toast-message-contrast .p-toast-detail {\n color: ").concat(dt("toast.contrast.detail.color"), ";\n}\n\n.p-toast-message-contrast .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.contrast.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.contrast.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-contrast .p-toast-close-button:hover {\n background: ").concat(dt("toast.contrast.close.button.hover.background"), ";\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-message-enter-from {\n opacity: 0;\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"); }, "theme"); var inlineStyles$2 = { root: /* @__PURE__ */ __name(function root6(_ref2) { @@ -5235,9 +2601,53 @@ var ToastStyle = BaseStyle.extend({ classes: classes$3, inlineStyles: inlineStyles$2 }); +var script$7 = { + name: "ExclamationTriangleIcon", + "extends": script$q +}; +function render$6(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z", + fill: "currentColor" + }, null, -1), createBaseVNode("path", { + d: "M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z", + fill: "currentColor" + }, null, -1), createBaseVNode("path", { + d: "M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$6, "render$6"); +script$7.render = render$6; +var script$6 = { + name: "InfoCircleIcon", + "extends": script$q +}; +function render$5(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("svg", mergeProps({ + width: "14", + height: "14", + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z", + fill: "currentColor" + }, null, -1)]), 16); +} +__name(render$5, "render$5"); +script$6.render = render$5; var script$2$2 = { name: "BaseToast", - "extends": script$e, + "extends": script$f, props: { group: { type: String, @@ -5285,7 +2695,7 @@ var script$2$2 = { } }, style: ToastStyle, - provide: /* @__PURE__ */ __name(function provide9() { + provide: /* @__PURE__ */ __name(function provide8() { return { $pcToast: this, $parentInstance: this @@ -5295,7 +2705,7 @@ var script$2$2 = { var script$1$3 = { name: "ToastMessage", hostName: "Toast", - "extends": script$e, + "extends": script$f, emits: ["close"], closeTimeout: null, props: { @@ -5367,10 +2777,10 @@ var script$1$3 = { computed: { iconComponent: /* @__PURE__ */ __name(function iconComponent() { return { - info: !this.infoIcon && script$u, - success: !this.successIcon && script$v, - warn: !this.warnIcon && script$w, - error: !this.errorIcon && script$x + info: !this.infoIcon && script$6, + success: !this.successIcon && script$r, + warn: !this.warnIcon && script$7, + error: !this.errorIcon && script$s }[this.message.severity]; }, "iconComponent"), closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel() { @@ -5378,11 +2788,11 @@ var script$1$3 = { }, "closeAriaLabel") }, components: { - TimesIcon: script$y, - InfoCircleIcon: script$u, - CheckIcon: script$v, - ExclamationTriangleIcon: script$w, - TimesCircleIcon: script$x + TimesIcon: script$t, + InfoCircleIcon: script$6, + CheckIcon: script$r, + ExclamationTriangleIcon: script$7, + TimesCircleIcon: script$s }, directives: { ripple: Ripple @@ -5440,7 +2850,7 @@ function _toPrimitive$1(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive$1, "_toPrimitive$1"); -var _hoisted_1$d = ["aria-label"]; +var _hoisted_1$4 = ["aria-label"]; function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("div", mergeProps({ @@ -5480,7 +2890,7 @@ function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { autofocus: "" }, _objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm("closeButton"))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || "TimesIcon"), mergeProps({ "class": [_ctx.cx("closeIcon"), $props.closeIcon] - }, _ctx.ptm("closeIcon")), null, 16, ["class"]))], 16, _hoisted_1$d)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); + }, _ctx.ptm("closeIcon")), null, 16, ["class"]))], 16, _hoisted_1$4)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); } __name(render$1$2, "render$1$2"); script$1$3.render = render$1$2; @@ -5583,7 +2993,6 @@ var script$5 = { this.messages = []; }, "onRemoveAllGroups"), onEnter: /* @__PURE__ */ __name(function onEnter() { - this.$refs.container.setAttribute(this.attributeSelector, ""); if (this.autoZIndex) { ZIndex.set("modal", this.$refs.container, this.baseZIndex || this.$primevue.config.zIndex.modal); } @@ -5609,7 +3018,7 @@ var script$5 = { for (var styleProp in this.breakpoints[breakpoint]) { breakpointStyle += styleProp + ":" + this.breakpoints[breakpoint][styleProp] + "!important;"; } - innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n .p-toast[").concat(this.attributeSelector, "] {\n ").concat(breakpointStyle, "\n }\n }\n "); + innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n .p-toast[").concat(this.$attrSelector, "] {\n ").concat(breakpointStyle, "\n }\n }\n "); } this.styleElement.innerHTML = innerHTML; } @@ -5621,14 +3030,9 @@ var script$5 = { } }, "destroyStyle") }, - computed: { - attributeSelector: /* @__PURE__ */ __name(function attributeSelector() { - return UniqueComponentId(); - }, "attributeSelector") - }, components: { ToastMessage: script$1$3, - Portal: script$k + Portal: script$l } }; function _typeof$2(o) { @@ -5683,7 +3087,7 @@ function _toPrimitive$2(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive$2, "_toPrimitive$2"); -function render$a(_ctx, _cache, $props, $setup, $data, $options) { +function render$4(_ctx, _cache, $props, $setup, $data, $options) { var _component_ToastMessage = resolveComponent("ToastMessage"); var _component_Portal = resolveComponent("Portal"); return openBlock(), createBlock(_component_Portal, null, { @@ -5726,171 +3130,11 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }); } -__name(render$a, "render$a"); -script$5.render = render$a; -const _sfc_main$7 = /* @__PURE__ */ defineComponent({ - __name: "GlobalToast", - setup(__props) { - const toast = useToast(); - const toastStore = useToastStore(); - const settingStore = useSettingStore(); - watch( - () => toastStore.messagesToAdd, - (newMessages) => { - if (newMessages.length === 0) { - return; - } - newMessages.forEach((message2) => { - toast.add(message2); - }); - toastStore.messagesToAdd = []; - }, - { deep: true } - ); - watch( - () => toastStore.messagesToRemove, - (messagesToRemove) => { - if (messagesToRemove.length === 0) { - return; - } - messagesToRemove.forEach((message2) => { - toast.remove(message2); - }); - toastStore.messagesToRemove = []; - }, - { deep: true } - ); - watch( - () => toastStore.removeAllRequested, - (requested) => { - if (requested) { - toast.removeAllGroups(); - toastStore.removeAllRequested = false; - } - } - ); - function updateToastPosition() { - const styleElement = document.getElementById("dynamic-toast-style") || createStyleElement(); - const rect = document.querySelector(".graph-canvas-container").getBoundingClientRect(); - styleElement.textContent = ` - .p-toast.p-component.p-toast-top-right { - top: ${rect.top + 20}px !important; - right: ${window.innerWidth - (rect.left + rect.width) + 20}px !important; - } - `; - } - __name(updateToastPosition, "updateToastPosition"); - function createStyleElement() { - const style = document.createElement("style"); - style.id = "dynamic-toast-style"; - document.head.appendChild(style); - return style; - } - __name(createStyleElement, "createStyleElement"); - watch( - () => settingStore.get("Comfy.UseNewMenu"), - () => nextTick(updateToastPosition), - { immediate: true } - ); - watch( - () => settingStore.get("Comfy.Sidebar.Location"), - () => nextTick(updateToastPosition), - { immediate: true } - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$5)); - }; - } -}); -const _hoisted_1$c = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$9 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "M6 4v16m4-16l10 8l-10 8z" -}, null, -1); -const _hoisted_3$9 = [ - _hoisted_2$9 -]; -function render$9(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$c, [..._hoisted_3$9]); -} -__name(render$9, "render$9"); -const __unplugin_components_3 = markRaw({ name: "lucide-step-forward", render: render$9 }); -const _hoisted_1$b = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$8 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "m13 19l9-7l-9-7zM2 19l9-7l-9-7z" -}, null, -1); -const _hoisted_3$8 = [ - _hoisted_2$8 -]; -function render$8(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$b, [..._hoisted_3$8]); -} -__name(render$8, "render$8"); -const __unplugin_components_2 = markRaw({ name: "lucide-fast-forward", render: render$8 }); -const _hoisted_1$a = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$7 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "m6 3l14 9l-14 9z" -}, null, -1); -const _hoisted_3$7 = [ - _hoisted_2$7 -]; -function render$7(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$a, [..._hoisted_3$7]); -} -__name(render$7, "render$7"); -const __unplugin_components_1$1 = markRaw({ name: "lucide-play", render: render$7 }); -const _hoisted_1$9 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$6 = /* @__PURE__ */ createBaseVNode("g", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2" -}, [ - /* @__PURE__ */ createBaseVNode("path", { d: "M16 12H3m13 6H3m7-12H3m18 12V8a2 2 0 0 0-2-2h-5" }), - /* @__PURE__ */ createBaseVNode("path", { d: "m16 8l-2-2l2-2" }) -], -1); -const _hoisted_3$6 = [ - _hoisted_2$6 -]; -function render$6(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._hoisted_3$6]); -} -__name(render$6, "render$6"); -const __unplugin_components_0$1 = markRaw({ name: "lucide-list-start", render: render$6 }); +__name(render$4, "render$4"); +script$5.render = render$4; var theme$2 = /* @__PURE__ */ __name(function theme6(_ref) { var dt = _ref.dt; - return "\n.p-tieredmenu {\n background: ".concat(dt("tieredmenu.background"), ";\n color: ").concat(dt("tieredmenu.color"), ";\n border: 1px solid ").concat(dt("tieredmenu.border.color"), ";\n border-radius: ").concat(dt("tieredmenu.border.radius"), ";\n min-width: 12.5rem;\n}\n\n.p-tieredmenu-root-list,\n.p-tieredmenu-submenu {\n margin: 0;\n padding: ").concat(dt("tieredmenu.list.padding"), ";\n list-style: none;\n outline: 0 none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("tieredmenu.list.gap"), ";\n}\n\n.p-tieredmenu-submenu {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n background: ").concat(dt("tieredmenu.background"), ";\n color: ").concat(dt("tieredmenu.color"), ";\n border: 1px solid ").concat(dt("tieredmenu.border.color"), ";\n border-radius: ").concat(dt("tieredmenu.border.radius"), ";\n box-shadow: ").concat(dt("tieredmenu.shadow"), ";\n}\n\n.p-tieredmenu-item {\n position: relative;\n}\n\n.p-tieredmenu-item-content {\n transition: background ").concat(dt("tieredmenu.transition.duration"), ", color ").concat(dt("tieredmenu.transition.duration"), ";\n border-radius: ").concat(dt("tieredmenu.item.border.radius"), ";\n color: ").concat(dt("tieredmenu.item.color"), ";\n}\n\n.p-tieredmenu-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("tieredmenu.item.padding"), ";\n gap: ").concat(dt("tieredmenu.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-tieredmenu-item-label {\n line-height: 1;\n}\n\n.p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.color"), ";\n}\n\n.p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n width: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n height: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {\n color: ").concat(dt("tieredmenu.item.focus.color"), ";\n background: ").concat(dt("tieredmenu.item.focus.background"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {\n color: ").concat(dt("tieredmenu.item.focus.color"), ";\n background: ").concat(dt("tieredmenu.item.focus.background"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content {\n color: ").concat(dt("tieredmenu.item.active.color"), ";\n background: ").concat(dt("tieredmenu.item.active.background"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.active.color"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.active.color"), ";\n}\n\n.p-tieredmenu-separator {\n border-top: 1px solid ").concat(dt("tieredmenu.separator.border.color"), ";\n}\n\n.p-tieredmenu-overlay {\n box-shadow: ").concat(dt("tieredmenu.shadow"), ";\n}\n\n.p-tieredmenu-enter-from,\n.p-tieredmenu-leave-active {\n opacity: 0;\n}\n\n.p-tieredmenu-enter-active {\n transition: opacity 250ms;\n}\n"); + return "\n.p-tieredmenu {\n background: ".concat(dt("tieredmenu.background"), ";\n color: ").concat(dt("tieredmenu.color"), ";\n border: 1px solid ").concat(dt("tieredmenu.border.color"), ";\n border-radius: ").concat(dt("tieredmenu.border.radius"), ";\n min-width: 12.5rem;\n}\n\n.p-tieredmenu-root-list,\n.p-tieredmenu-submenu {\n margin: 0;\n padding: ").concat(dt("tieredmenu.list.padding"), ";\n list-style: none;\n outline: 0 none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("tieredmenu.list.gap"), ";\n}\n\n.p-tieredmenu-submenu {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n background: ").concat(dt("tieredmenu.background"), ";\n color: ").concat(dt("tieredmenu.color"), ";\n border: 1px solid ").concat(dt("tieredmenu.border.color"), ";\n border-radius: ").concat(dt("tieredmenu.border.radius"), ";\n box-shadow: ").concat(dt("tieredmenu.shadow"), ";\n}\n\n.p-tieredmenu-item {\n position: relative;\n}\n\n.p-tieredmenu-item-content {\n transition: background ").concat(dt("tieredmenu.transition.duration"), ", color ").concat(dt("tieredmenu.transition.duration"), ";\n border-radius: ").concat(dt("tieredmenu.item.border.radius"), ";\n color: ").concat(dt("tieredmenu.item.color"), ";\n}\n\n.p-tieredmenu-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("tieredmenu.item.padding"), ";\n gap: ").concat(dt("tieredmenu.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-tieredmenu-item-label {\n line-height: 1;\n}\n\n.p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.color"), ";\n}\n\n.p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n width: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n height: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n}\n\n.p-tieredmenu-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {\n color: ").concat(dt("tieredmenu.item.focus.color"), ";\n background: ").concat(dt("tieredmenu.item.focus.background"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {\n color: ").concat(dt("tieredmenu.item.focus.color"), ";\n background: ").concat(dt("tieredmenu.item.focus.background"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content {\n color: ").concat(dt("tieredmenu.item.active.color"), ";\n background: ").concat(dt("tieredmenu.item.active.background"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.active.color"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.active.color"), ";\n}\n\n.p-tieredmenu-separator {\n border-block-start: 1px solid ").concat(dt("tieredmenu.separator.border.color"), ";\n}\n\n.p-tieredmenu-overlay {\n box-shadow: ").concat(dt("tieredmenu.shadow"), ";\n}\n\n.p-tieredmenu-enter-from,\n.p-tieredmenu-leave-active {\n opacity: 0;\n}\n\n.p-tieredmenu-enter-active {\n transition: opacity 250ms;\n}\n\n.p-tieredmenu-mobile .p-tieredmenu-submenu {\n position: static;\n box-shadow: none;\n border: 0 none;\n padding-inline-start: ").concat(dt("tieredmenu.submenu.mobile.indent"), ";\n padding-inline-end: 0;\n}\n\n.p-tieredmenu-mobile .p-tieredmenu-submenu:dir(rtl) {\n padding-inline-start: 0;\n padding-inline-end: ").concat(dt("tieredmenu.submenu.mobile.indent"), ";\n}\n\n.p-tieredmenu-mobile .p-tieredmenu-submenu-icon {\n transition: transform 0.2s;\n transform: rotate(90deg);\n}\n\n.p-tieredmenu-mobile .p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n transform: rotate(-90deg);\n}\n"); }, "theme"); var inlineStyles$1 = { submenu: /* @__PURE__ */ __name(function submenu(_ref2) { @@ -5902,10 +3146,10 @@ var inlineStyles$1 = { }; var classes$2 = { root: /* @__PURE__ */ __name(function root8(_ref3) { - _ref3.instance; - var props = _ref3.props; + var props = _ref3.props, instance = _ref3.instance; return ["p-tieredmenu p-component", { - "p-tieredmenu-overlay": props.popup + "p-tieredmenu-overlay": props.popup, + "p-tieredmenu-mobile": instance.queryMatches }]; }, "root"), start: "p-tieredmenu-start", @@ -5935,7 +3179,7 @@ var TieredMenuStyle = BaseStyle.extend({ }); var script$2$1 = { name: "BaseTieredMenu", - "extends": script$e, + "extends": script$f, props: { popup: { type: Boolean, @@ -5949,6 +3193,10 @@ var script$2$1 = { type: [String, Object], "default": "body" }, + breakpoint: { + type: String, + "default": "960px" + }, autoZIndex: { type: Boolean, "default": true @@ -5975,7 +3223,7 @@ var script$2$1 = { } }, style: TieredMenuStyle, - provide: /* @__PURE__ */ __name(function provide10() { + provide: /* @__PURE__ */ __name(function provide9() { return { $pcTieredMenu: this, $parentInstance: this @@ -5985,7 +3233,7 @@ var script$2$1 = { var script$1$2 = { name: "TieredMenuSub", hostName: "TieredMenu", - "extends": script$e, + "extends": script$f, emits: ["item-click", "item-mouseenter", "item-mousemove"], container: null, props: { @@ -6108,8 +3356,7 @@ var script$1$2 = { return { action: mergeProps({ "class": this.cx("itemLink"), - tabindex: -1, - "aria-hidden": true + tabindex: -1 }, this.getPTOptions(processedItem, index, "itemLink")), icon: mergeProps({ "class": [this.cx("itemIcon"), this.getItemProp(processedItem, "icon")] @@ -6127,16 +3374,16 @@ var script$1$2 = { }, "containerRef") }, components: { - AngleRightIcon: script$z + AngleRightIcon: script$u }, directives: { ripple: Ripple } }; -var _hoisted_1$1$2 = ["tabindex"]; -var _hoisted_2$5 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; -var _hoisted_3$5 = ["onClick", "onMouseenter", "onMousemove"]; -var _hoisted_4$2 = ["href", "target"]; +var _hoisted_1$1$1 = ["tabindex"]; +var _hoisted_2$1 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; +var _hoisted_3$1 = ["onClick", "onMouseenter", "onMousemove"]; +var _hoisted_4$1 = ["href", "target"]; var _hoisted_5$1 = ["id"]; var _hoisted_6 = ["id"]; function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { @@ -6148,12 +3395,11 @@ function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { onEnter: $options.onEnter }, _ctx.ptm("menu.transition")), { "default": withCtx(function() { - return [($props.level === 0 ? true : $props.visible) ? (openBlock(), createElementBlock("ul", mergeProps({ + return [($props.level === 0 ? true : $props.visible) ? (openBlock(), createElementBlock("ul", { key: 0, ref: $options.containerRef, - "class": $props.level === 0 ? _ctx.cx("rootList") : _ctx.cx("submenu"), tabindex: $props.tabindex - }, $props.level === 0 ? _ctx.ptm("rootList") : _ctx.ptm("submenu")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function(processedItem, index) { + }, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function(processedItem, index) { return openBlock(), createElementBlock(Fragment, { key: $options.getItemKey(processedItem) }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ @@ -6218,18 +3464,19 @@ function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { key: 1, "class": _ctx.cx("submenuIcon"), ref_for: true - }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_4$2)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_4$1)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { key: 1, item: processedItem.item, hasSubmenu: $options.getItemProp(processedItem, "items"), label: $options.getItemLabel(processedItem), props: $options.getMenuItemProps(processedItem, index) - }, null, 8, ["item", "hasSubmenu", "label", "props"]))], 16, _hoisted_3$5), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_TieredMenuSub, { + }, null, 8, ["item", "hasSubmenu", "label", "props"]))], 16, _hoisted_3$1), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_TieredMenuSub, mergeProps({ key: 0, id: $options.getItemId(processedItem) + "_list", - style: normalizeStyle(_ctx.sx("submenu", true, { + "class": _ctx.cx("submenu"), + style: _ctx.sx("submenu", true, { processedItem - })), + }), "aria-labelledby": $options.getItemLabelId(processedItem), role: "menu", menuId: $props.menuId, @@ -6249,8 +3496,9 @@ function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { }), onItemMousemove: _cache[2] || (_cache[2] = function($event) { return _ctx.$emit("item-mousemove", $event); - }) - }, null, 8, ["id", "style", "aria-labelledby", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "level", "visible", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_2$5)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ + }), + ref_for: true + }, _ctx.ptm("submenu")), null, 16, ["id", "class", "style", "aria-labelledby", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "level", "visible", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_2$1)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ key: 1, id: $options.getItemId(processedItem), style: $options.getItemProp(processedItem, "style"), @@ -6258,7 +3506,7 @@ function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { role: "separator", ref_for: true }, _ctx.ptm("separator")), null, 16, _hoisted_6)) : createCommentVNode("", true)], 64); - }), 128))], 16, _hoisted_1$1$2)) : createCommentVNode("", true)]; + }), 128))], 8, _hoisted_1$1$1)) : createCommentVNode("", true)]; }), _: 1 }, 16, ["onEnter"]); @@ -6271,6 +3519,7 @@ var script$4 = { inheritAttrs: false, emits: ["focus", "blur", "before-show", "before-hide", "hide", "show"], outsideClickListener: null, + matchMediaListener: null, scrollHandler: null, resizeListener: null, target: null, @@ -6290,7 +3539,9 @@ var script$4 = { activeItemPath: [], visible: !this.popup, submenuVisible: false, - dirty: false + dirty: false, + query: null, + queryMatches: false }; }, "data"), watch: { @@ -6311,10 +3562,12 @@ var script$4 = { }, mounted: /* @__PURE__ */ __name(function mounted6() { this.id = this.id || UniqueComponentId(); + this.bindMatchMediaListener(); }, "mounted"), beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount6() { this.unbindOutsideClickListener(); this.unbindResizeListener(); + this.unbindMatchMediaListener(); if (this.scrollHandler) { this.scrollHandler.destroy(); this.scrollHandler = null; @@ -6449,7 +3702,7 @@ var script$4 = { break; } }, "onKeyDown"), - onItemChange: /* @__PURE__ */ __name(function onItemChange(event) { + onItemChange: /* @__PURE__ */ __name(function onItemChange(event, type) { var processedItem = event.processedItem, isFocus = event.isFocus; if (isEmpty(processedItem)) return; var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey, items = processedItem.items; @@ -6466,9 +3719,12 @@ var script$4 = { level, parentKey }; - this.activeItemPath = activeItemPath3; grouped && (this.dirty = true); isFocus && focus(this.menubar); + if (type === "hover" && this.queryMatches) { + return; + } + this.activeItemPath = activeItemPath3; }, "onItemChange"), onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick2(event) { OverlayEventBus.emit("overlay-click", { @@ -6508,7 +3764,7 @@ var script$4 = { }, "onItemClick"), onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter2(event) { if (this.dirty) { - this.onItemChange(event); + this.onItemChange(event, "hover"); } }, "onItemMouseEnter"), onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove2(event) { @@ -6713,6 +3969,24 @@ var script$4 = { this.resizeListener = null; } }, "unbindResizeListener"), + bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener() { + var _this5 = this; + if (!this.matchMediaListener) { + var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); + this.query = query; + this.queryMatches = query.matches; + this.matchMediaListener = function() { + _this5.queryMatches = query.matches; + }; + this.query.addEventListener("change", this.matchMediaListener); + } + }, "bindMatchMediaListener"), + unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener() { + if (this.matchMediaListener) { + this.query.removeEventListener("change", this.matchMediaListener); + this.matchMediaListener = null; + } + }, "unbindMatchMediaListener"), isItemMatched: /* @__PURE__ */ __name(function isItemMatched(processedItem) { var _this$getProccessedIt; return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())); @@ -6729,35 +4003,35 @@ var script$4 = { }); }, "isSelected"), findFirstItemIndex: /* @__PURE__ */ __name(function findFirstItemIndex() { - var _this5 = this; + var _this6 = this; return this.visibleItems.findIndex(function(processedItem) { - return _this5.isValidItem(processedItem); + return _this6.isValidItem(processedItem); }); }, "findFirstItemIndex"), findLastItemIndex: /* @__PURE__ */ __name(function findLastItemIndex() { - var _this6 = this; + var _this7 = this; return findLastIndex(this.visibleItems, function(processedItem) { - return _this6.isValidItem(processedItem); + return _this7.isValidItem(processedItem); }); }, "findLastItemIndex"), findNextItemIndex: /* @__PURE__ */ __name(function findNextItemIndex(index) { - var _this7 = this; + var _this8 = this; var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function(processedItem) { - return _this7.isValidItem(processedItem); + return _this8.isValidItem(processedItem); }) : -1; return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index; }, "findNextItemIndex"), findPrevItemIndex: /* @__PURE__ */ __name(function findPrevItemIndex(index) { - var _this8 = this; + var _this9 = this; var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function(processedItem) { - return _this8.isValidItem(processedItem); + return _this9.isValidItem(processedItem); }) : -1; return matchedItemIndex > -1 ? matchedItemIndex : index; }, "findPrevItemIndex"), findSelectedItemIndex: /* @__PURE__ */ __name(function findSelectedItemIndex() { - var _this9 = this; + var _this10 = this; return this.visibleItems.findIndex(function(processedItem) { - return _this9.isValidSelectedItem(processedItem); + return _this10.isValidSelectedItem(processedItem); }); }, "findSelectedItemIndex"), findFirstFocusedItemIndex: /* @__PURE__ */ __name(function findFirstFocusedItemIndex() { @@ -6769,20 +4043,20 @@ var script$4 = { return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex; }, "findLastFocusedItemIndex"), searchItems: /* @__PURE__ */ __name(function searchItems(event, _char) { - var _this10 = this; + var _this11 = this; this.searchValue = (this.searchValue || "") + _char; var itemIndex = -1; var matched = false; if (this.focusedItemInfo.index !== -1) { itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(processedItem) { - return _this10.isItemMatched(processedItem); + return _this11.isItemMatched(processedItem); }); itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function(processedItem) { - return _this10.isItemMatched(processedItem); + return _this11.isItemMatched(processedItem); }) : itemIndex + this.focusedItemInfo.index; } else { itemIndex = this.visibleItems.findIndex(function(processedItem) { - return _this10.isItemMatched(processedItem); + return _this11.isItemMatched(processedItem); }); } if (itemIndex !== -1) { @@ -6798,8 +4072,8 @@ var script$4 = { clearTimeout(this.searchTimeout); } this.searchTimeout = setTimeout(function() { - _this10.searchValue = ""; - _this10.searchTimeout = null; + _this11.searchValue = ""; + _this11.searchTimeout = null; }, 500); return matched; }, "searchItems"), @@ -6821,7 +4095,7 @@ var script$4 = { } }, "scrollInView"), createProcessedItems: /* @__PURE__ */ __name(function createProcessedItems(items) { - var _this11 = this; + var _this12 = this; var level = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; var parentKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ""; @@ -6836,7 +4110,7 @@ var script$4 = { parent, parentKey }; - newItem["items"] = _this11.createProcessedItems(item3.items, level + 1, newItem, key); + newItem["items"] = _this12.createProcessedItems(item3.items, level + 1, newItem, key); processedItems3.push(newItem); }); return processedItems3; @@ -6853,9 +4127,9 @@ var script$4 = { return this.createProcessedItems(this.model || []); }, "processedItems"), visibleItems: /* @__PURE__ */ __name(function visibleItems() { - var _this12 = this; + var _this13 = this; var processedItem = this.activeItemPath.find(function(p) { - return p.key === _this12.focusedItemInfo.parentKey; + return p.key === _this13.focusedItemInfo.parentKey; }); return processedItem ? processedItem.items : this.processedItems; }, "visibleItems"), @@ -6865,11 +4139,11 @@ var script$4 = { }, components: { TieredMenuSub: script$1$2, - Portal: script$k + Portal: script$l } }; -var _hoisted_1$8 = ["id"]; -function render$5(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$3 = ["id"]; +function render$3(_ctx, _cache, $props, $setup, $data, $options) { var _component_TieredMenuSub = resolveComponent("TieredMenuSub"); var _component_Portal = resolveComponent("Portal"); return openBlock(), createBlock(_component_Portal, { @@ -6896,9 +4170,10 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) { }, _ctx.ptmi("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ key: 0, "class": _ctx.cx("start") - }, _ctx.ptm("start")), [renderSlot(_ctx.$slots, "start")], 16)) : createCommentVNode("", true), createVNode(_component_TieredMenuSub, { + }, _ctx.ptm("start")), [renderSlot(_ctx.$slots, "start")], 16)) : createCommentVNode("", true), createVNode(_component_TieredMenuSub, mergeProps({ ref: $options.menubarRef, id: $data.id + "_list", + "class": _ctx.cx("rootList"), tabindex: !_ctx.disabled ? _ctx.tabindex : -1, role: "menubar", "aria-label": _ctx.ariaLabel, @@ -6921,10 +4196,10 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) { onItemClick: $options.onItemClick, onItemMouseenter: $options.onItemMouseEnter, onItemMousemove: $options.onItemMouseMove - }, null, 8, ["id", "tabindex", "aria-label", "aria-labelledby", "aria-disabled", "aria-activedescendant", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "visible", "pt", "unstyled", "onFocus", "onBlur", "onKeydown", "onItemClick", "onItemMouseenter", "onItemMousemove"]), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ + }, _ctx.ptm("rootList")), null, 16, ["id", "class", "tabindex", "aria-label", "aria-labelledby", "aria-disabled", "aria-activedescendant", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "visible", "pt", "unstyled", "onFocus", "onBlur", "onKeydown", "onItemClick", "onItemMouseenter", "onItemMousemove"]), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ key: 1, "class": _ctx.cx("end") - }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$8)) : createCommentVNode("", true)]; + }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$3)) : createCommentVNode("", true)]; }), _: 3 }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; @@ -6932,11 +4207,11 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) { _: 3 }, 8, ["appendTo", "disabled"]); } -__name(render$5, "render$5"); -script$4.render = render$5; +__name(render$3, "render$3"); +script$4.render = render$3; var theme$1 = /* @__PURE__ */ __name(function theme7(_ref) { var dt = _ref.dt; - return "\n.p-splitbutton {\n display: inline-flex;\n position: relative;\n border-radius: ".concat(dt("splitbutton.border.radius"), ";\n}\n\n.p-splitbutton-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n\n.p-splitbutton-button:focus-visible,\n.p-splitbutton-dropdown:focus-visible {\n z-index: 1;\n}\n\n.p-splitbutton-button:not(:disabled):hover,\n.p-splitbutton-button:not(:disabled):active {\n border-right: 0 none;\n}\n\n.p-splitbutton-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-splitbutton .p-menu {\n min-width: 100%;\n}\n\n.p-splitbutton-fluid {\n display: flex;\n}\n\n.p-splitbutton-rounded .p-splitbutton-dropdown {\n border-top-right-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n border-bottom-right-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n}\n\n.p-splitbutton-rounded .p-splitbutton-button {\n border-top-left-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n border-bottom-left-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n}\n\n.p-splitbutton-raised {\n box-shadow: ").concat(dt("splitbutton.raised.shadow"), ";\n}\n"); + return "\n.p-splitbutton {\n display: inline-flex;\n position: relative;\n border-radius: ".concat(dt("splitbutton.border.radius"), ";\n}\n\n.p-splitbutton-button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: 0 none;\n}\n\n.p-splitbutton-button:focus-visible,\n.p-splitbutton-dropdown:focus-visible {\n z-index: 1;\n}\n\n.p-splitbutton-button:not(:disabled):hover,\n.p-splitbutton-button:not(:disabled):active {\n border-inline-end: 0 none;\n}\n\n.p-splitbutton-dropdown {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.p-splitbutton .p-menu {\n min-width: 100%;\n}\n\n.p-splitbutton-fluid {\n display: flex;\n}\n\n.p-splitbutton-rounded .p-splitbutton-dropdown {\n border-start-end-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n border-end-end-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n}\n\n.p-splitbutton-rounded .p-splitbutton-button {\n border-start-start-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n border-end-start-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n}\n\n.p-splitbutton-raised {\n box-shadow: ").concat(dt("splitbutton.raised.shadow"), ";\n}\n"); }, "theme"); var classes$1 = { root: /* @__PURE__ */ __name(function root9(_ref2) { @@ -6957,7 +4232,7 @@ var SplitButtonStyle = BaseStyle.extend({ }); var script$1$1 = { name: "BaseSplitButton", - "extends": script$e, + "extends": script$f, props: { label: { type: String, @@ -7045,7 +4320,7 @@ var script$1$1 = { } }, style: SplitButtonStyle, - provide: /* @__PURE__ */ __name(function provide11() { + provide: /* @__PURE__ */ __name(function provide10() { return { $pcSplitButton: this, $parentInstance: this @@ -7108,18 +4383,18 @@ var script$3 = { containerClass: /* @__PURE__ */ __name(function containerClass() { return [this.cx("root"), this["class"]]; }, "containerClass"), - hasFluid: /* @__PURE__ */ __name(function hasFluid2() { + hasFluid: /* @__PURE__ */ __name(function hasFluid() { return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid; }, "hasFluid") }, components: { - PVSButton: script$d, + PVSButton: script$v, PVSMenu: script$4, - ChevronDownIcon: script$l + ChevronDownIcon: script$m } }; -var _hoisted_1$7 = ["data-p-severity"]; -function render$4(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$2 = ["data-p-severity"]; +function render$2(_ctx, _cache, $props, $setup, $data, $options) { var _component_PVSButton = resolveComponent("PVSButton"); var _component_PVSMenu = resolveComponent("PVSMenu"); return openBlock(), createElementBlock("div", mergeProps({ @@ -7224,442 +4499,13 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) { })]; }), key: "1" - } : void 0]), 1032, ["id", "model", "autoZIndex", "baseZIndex", "appendTo", "unstyled", "pt"])], 16, _hoisted_1$7); -} -__name(render$4, "render$4"); -script$3.render = render$4; -const _withScopeId$3 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-26957f1f"), n = n(), popScopeId(), n), "_withScopeId$3"); -const _hoisted_1$6 = ["aria-label"]; -const minQueueCount = 1; -const _sfc_main$6 = /* @__PURE__ */ defineComponent({ - __name: "BatchCountEdit", - props: { - class: { default: "" } - }, - setup(__props) { - const props = __props; - const queueSettingsStore = useQueueSettingsStore(); - const { batchCount } = storeToRefs(queueSettingsStore); - const settingStore = useSettingStore(); - const maxQueueCount = computed( - () => settingStore.get("Comfy.QueueButton.BatchCountLimit") - ); - const handleClick = /* @__PURE__ */ __name((increment) => { - let newCount; - if (increment) { - const originalCount = batchCount.value - 1; - newCount = Math.min(originalCount * 2, maxQueueCount.value); - } else { - const originalCount = batchCount.value + 1; - newCount = Math.floor(originalCount / 2); - } - batchCount.value = newCount; - }, "handleClick"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createElementBlock("div", { - class: normalizeClass(["batch-count", props.class]), - "aria-label": _ctx.$t("menu.batchCount") - }, [ - createVNode(unref(script$A), { - class: "w-14", - modelValue: unref(batchCount), - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(batchCount) ? batchCount.value = $event : null), - min: minQueueCount, - max: maxQueueCount.value, - fluid: "", - showButtons: "", - pt: { - incrementButton: { - class: "w-6", - onmousedown: /* @__PURE__ */ __name(() => { - handleClick(true); - }, "onmousedown") - }, - decrementButton: { - class: "w-6", - onmousedown: /* @__PURE__ */ __name(() => { - handleClick(false); - }, "onmousedown") - } - } - }, null, 8, ["modelValue", "max", "pt"]) - ], 10, _hoisted_1$6)), [ - [ - _directive_tooltip, - _ctx.$t("menu.batchCount"), - void 0, - { bottom: true } - ] - ]); - }; - } -}); -const BatchCountEdit = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-26957f1f"]]); -const _withScopeId$2 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-e9044686"), n = n(), popScopeId(), n), "_withScopeId$2"); -const _hoisted_1$5 = { class: "queue-button-group flex" }; -const _sfc_main$5 = /* @__PURE__ */ defineComponent({ - __name: "ComfyQueueButton", - setup(__props) { - const workspaceStore = useWorkspaceStore(); - const queueCountStore = storeToRefs(useQueuePendingTaskCountStore()); - const { mode: queueMode } = storeToRefs(useQueueSettingsStore()); - const { t } = useI18n(); - const queueModeMenuItemLookup = computed(() => ({ - disabled: { - key: "disabled", - label: t("menu.queue"), - tooltip: t("menu.disabledTooltip"), - command: /* @__PURE__ */ __name(() => { - queueMode.value = "disabled"; - }, "command") - }, - instant: { - key: "instant", - label: `${t("menu.queue")} (${t("menu.instant")})`, - tooltip: t("menu.instantTooltip"), - command: /* @__PURE__ */ __name(() => { - queueMode.value = "instant"; - }, "command") - }, - change: { - key: "change", - label: `${t("menu.queue")} (${t("menu.onChange")})`, - tooltip: t("menu.onChangeTooltip"), - command: /* @__PURE__ */ __name(() => { - queueMode.value = "change"; - }, "command") - } - })); - const activeQueueModeMenuItem = computed( - () => queueModeMenuItemLookup.value[queueMode.value] - ); - const queueModeMenuItems = computed( - () => Object.values(queueModeMenuItemLookup.value) - ); - const executingPrompt = computed(() => !!queueCountStore.count.value); - const hasPendingTasks = computed(() => queueCountStore.count.value > 1); - const commandStore = useCommandStore(); - const queuePrompt = /* @__PURE__ */ __name((e) => { - const commandId = e.shiftKey ? "Comfy.QueuePromptFront" : "Comfy.QueuePrompt"; - commandStore.execute(commandId); - }, "queuePrompt"); - return (_ctx, _cache) => { - const _component_i_lucide58list_start = __unplugin_components_0$1; - const _component_i_lucide58play = __unplugin_components_1$1; - const _component_i_lucide58fast_forward = __unplugin_components_2; - const _component_i_lucide58step_forward = __unplugin_components_3; - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$5, [ - withDirectives((openBlock(), createBlock(unref(script$3), { - class: "comfyui-queue-button", - label: activeQueueModeMenuItem.value.label, - severity: "primary", - size: "small", - onClick: queuePrompt, - model: queueModeMenuItems.value, - "data-testid": "queue-button" - }, { - icon: withCtx(() => [ - unref(workspaceStore).shiftDown ? (openBlock(), createBlock(_component_i_lucide58list_start, { key: 0 })) : unref(queueMode) === "disabled" ? (openBlock(), createBlock(_component_i_lucide58play, { key: 1 })) : unref(queueMode) === "instant" ? (openBlock(), createBlock(_component_i_lucide58fast_forward, { key: 2 })) : unref(queueMode) === "change" ? (openBlock(), createBlock(_component_i_lucide58step_forward, { key: 3 })) : createCommentVNode("", true) - ]), - item: withCtx(({ item: item3 }) => [ - withDirectives(createVNode(unref(script$d), { - label: item3.label, - icon: item3.icon, - severity: item3.key === unref(queueMode) ? "primary" : "secondary", - size: "small", - text: "" - }, null, 8, ["label", "icon", "severity"]), [ - [_directive_tooltip, item3.tooltip] - ]) - ]), - _: 1 - }, 8, ["label", "model"])), [ - [ - _directive_tooltip, - unref(workspaceStore).shiftDown ? _ctx.$t("menu.queueWorkflowFront") : _ctx.$t("menu.queueWorkflow"), - void 0, - { bottom: true } - ] - ]), - createVNode(BatchCountEdit), - createVNode(unref(script$8), { class: "execution-actions flex flex-nowrap" }, { - default: withCtx(() => [ - withDirectives(createVNode(unref(script$d), { - icon: "pi pi-times", - severity: executingPrompt.value ? "danger" : "secondary", - disabled: !executingPrompt.value, - text: "", - "aria-label": _ctx.$t("menu.interrupt"), - onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.Interrupt")) - }, null, 8, ["severity", "disabled", "aria-label"]), [ - [ - _directive_tooltip, - _ctx.$t("menu.interrupt"), - void 0, - { bottom: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - icon: "pi pi-stop", - severity: hasPendingTasks.value ? "danger" : "secondary", - disabled: !hasPendingTasks.value, - text: "", - "aria-label": _ctx.$t("sideToolbar.queueTab.clearPendingTasks"), - onClick: _cache[1] || (_cache[1] = () => unref(commandStore).execute("Comfy.ClearPendingTasks")) - }, null, 8, ["severity", "disabled", "aria-label"]), [ - [ - _directive_tooltip, - _ctx.$t("sideToolbar.queueTab.clearPendingTasks"), - void 0, - { bottom: true } - ] - ]) - ]), - _: 1 - }) - ]); - }; - } -}); -const ComfyQueueButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e9044686"]]); -const overlapThreshold = 20; -const _sfc_main$4 = /* @__PURE__ */ defineComponent({ - __name: "ComfyActionbar", - setup(__props) { - const settingsStore = useSettingStore(); - const visible = computed( - () => settingsStore.get("Comfy.UseNewMenu") !== "Disabled" - ); - const panelRef = ref(null); - const dragHandleRef = ref(null); - const isDocked = useLocalStorage("Comfy.MenuPosition.Docked", false); - const storedPosition = useLocalStorage("Comfy.MenuPosition.Floating", { - x: 0, - y: 0 - }); - const { - x, - y, - style, - isDragging - } = useDraggable(panelRef, { - initialValue: { x: 0, y: 0 }, - handle: dragHandleRef, - containerElement: document.body - }); - watchDebounced( - [x, y], - ([newX, newY]) => { - storedPosition.value = { x: newX, y: newY }; - }, - { debounce: 300 } - ); - const setInitialPosition = /* @__PURE__ */ __name(() => { - if (x.value !== 0 || y.value !== 0) { - return; - } - if (storedPosition.value.x !== 0 || storedPosition.value.y !== 0) { - x.value = storedPosition.value.x; - y.value = storedPosition.value.y; - captureLastDragState(); - return; - } - if (panelRef.value) { - const screenWidth = window.innerWidth; - const screenHeight = window.innerHeight; - const menuWidth = panelRef.value.offsetWidth; - const menuHeight = panelRef.value.offsetHeight; - if (menuWidth === 0 || menuHeight === 0) { - return; - } - x.value = (screenWidth - menuWidth) / 2; - y.value = screenHeight - menuHeight - 10; - captureLastDragState(); - } - }, "setInitialPosition"); - onMounted(setInitialPosition); - watch(visible, (newVisible) => { - if (newVisible) { - nextTick(setInitialPosition); - } - }); - const lastDragState = ref({ - x: x.value, - y: y.value, - windowWidth: window.innerWidth, - windowHeight: window.innerHeight - }); - const captureLastDragState = /* @__PURE__ */ __name(() => { - lastDragState.value = { - x: x.value, - y: y.value, - windowWidth: window.innerWidth, - windowHeight: window.innerHeight - }; - }, "captureLastDragState"); - watch( - isDragging, - (newIsDragging) => { - if (!newIsDragging) { - captureLastDragState(); - } - }, - { immediate: true } - ); - const adjustMenuPosition = /* @__PURE__ */ __name(() => { - if (panelRef.value) { - const screenWidth = window.innerWidth; - const screenHeight = window.innerHeight; - const menuWidth = panelRef.value.offsetWidth; - const menuHeight = panelRef.value.offsetHeight; - const distanceLeft = lastDragState.value.x; - const distanceRight = lastDragState.value.windowWidth - (lastDragState.value.x + menuWidth); - const distanceTop = lastDragState.value.y; - const distanceBottom = lastDragState.value.windowHeight - (lastDragState.value.y + menuHeight); - const distances = [ - { edge: "left", distance: distanceLeft }, - { edge: "right", distance: distanceRight }, - { edge: "top", distance: distanceTop }, - { edge: "bottom", distance: distanceBottom } - ]; - const closestEdge = distances.reduce( - (min, curr) => curr.distance < min.distance ? curr : min - ); - const verticalRatio = lastDragState.value.y / lastDragState.value.windowHeight; - const horizontalRatio = lastDragState.value.x / lastDragState.value.windowWidth; - if (closestEdge.edge === "left") { - x.value = closestEdge.distance; - y.value = verticalRatio * screenHeight; - } else if (closestEdge.edge === "right") { - x.value = screenWidth - menuWidth - closestEdge.distance; - y.value = verticalRatio * screenHeight; - } else if (closestEdge.edge === "top") { - x.value = horizontalRatio * screenWidth; - y.value = closestEdge.distance; - } else { - x.value = horizontalRatio * screenWidth; - y.value = screenHeight - menuHeight - closestEdge.distance; - } - x.value = lodashExports.clamp(x.value, 0, screenWidth - menuWidth); - y.value = lodashExports.clamp(y.value, 0, screenHeight - menuHeight); - } - }, "adjustMenuPosition"); - useEventListener(window, "resize", adjustMenuPosition); - const topMenuRef = inject("topMenuRef"); - const topMenuBounds = useElementBounding(topMenuRef); - const isOverlappingWithTopMenu = computed(() => { - if (!panelRef.value) { - return false; - } - const { height } = panelRef.value.getBoundingClientRect(); - const actionbarBottom = y.value + height; - const topMenuBottom = topMenuBounds.bottom.value; - const overlapPixels = Math.min(actionbarBottom, topMenuBottom) - Math.max(y.value, topMenuBounds.top.value); - return overlapPixels > overlapThreshold; - }); - watch(isDragging, (newIsDragging) => { - if (!newIsDragging) { - isDocked.value = isOverlappingWithTopMenu.value; - } else { - isDocked.value = false; - } - }); - const eventBus = useEventBus("topMenu"); - watch([isDragging, isOverlappingWithTopMenu], ([dragging, overlapping]) => { - eventBus.emit("updateHighlight", { - isDragging: dragging, - isOverlapping: overlapping - }); - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$B), { - class: normalizeClass(["actionbar w-fit", { "is-dragging": unref(isDragging), "is-docked": unref(isDocked) }]), - style: normalizeStyle(unref(style)) - }, { - default: withCtx(() => [ - createBaseVNode("div", { - class: "actionbar-content flex items-center", - ref_key: "panelRef", - ref: panelRef - }, [ - createBaseVNode("span", { - class: "drag-handle cursor-move mr-2 p-0!", - ref_key: "dragHandleRef", - ref: dragHandleRef - }, null, 512), - createVNode(ComfyQueueButton) - ], 512) - ]), - _: 1 - }, 8, ["style", "class"]); - }; - } -}); -const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-915e5456"]]); -const _hoisted_1$4 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$4 = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-5v3h14v-3zm0-2h14V5H5zm0 2v3z" -}, null, -1); -const _hoisted_3$4 = [ - _hoisted_2$4 -]; -function render$3(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._hoisted_3$4]); -} -__name(render$3, "render$3"); -const __unplugin_components_1 = markRaw({ name: "material-symbols-dock-to-bottom-outline", render: render$3 }); -const _hoisted_1$3 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$3 = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-7h14V5H5z" -}, null, -1); -const _hoisted_3$3 = [ - _hoisted_2$3 -]; -function render$2(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._hoisted_3$3]); + } : void 0]), 1032, ["id", "model", "autoZIndex", "baseZIndex", "appendTo", "unstyled", "pt"])], 16, _hoisted_1$2); } __name(render$2, "render$2"); -const __unplugin_components_0 = markRaw({ name: "material-symbols-dock-to-bottom", render: render$2 }); -const _sfc_main$3 = /* @__PURE__ */ defineComponent({ - __name: "BottomPanelToggleButton", - setup(__props) { - const bottomPanelStore = useBottomPanelStore(); - return (_ctx, _cache) => { - const _component_i_material_symbols58dock_to_bottom = __unplugin_components_0; - const _component_i_material_symbols58dock_to_bottom_outline = __unplugin_components_1; - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createBlock(unref(script$d), { - severity: "secondary", - text: "", - "aria-label": _ctx.$t("menu.toggleBottomPanel"), - onClick: unref(bottomPanelStore).toggleBottomPanel - }, { - icon: withCtx(() => [ - unref(bottomPanelStore).bottomPanelVisible ? (openBlock(), createBlock(_component_i_material_symbols58dock_to_bottom, { key: 0 })) : (openBlock(), createBlock(_component_i_material_symbols58dock_to_bottom_outline, { key: 1 })) - ]), - _: 1 - }, 8, ["aria-label", "onClick"])), [ - [vShow, unref(bottomPanelStore).bottomPanelTabs.length > 0], - [_directive_tooltip, { value: _ctx.$t("menu.toggleBottomPanel"), showDelay: 300 }] - ]); - }; - } -}); +script$3.render = render$2; var theme8 = /* @__PURE__ */ __name(function theme9(_ref) { var dt = _ref.dt; - return "\n.p-menubar {\n display: flex;\n align-items: center;\n background: ".concat(dt("menubar.background"), ";\n border: 1px solid ").concat(dt("menubar.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n color: ").concat(dt("menubar.color"), ";\n padding: ").concat(dt("menubar.padding"), ";\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-start,\n.p-megamenu-end {\n display: flex;\n align-items: center;\n}\n\n.p-menubar-root-list,\n.p-menubar-submenu {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n outline: 0 none;\n}\n\n.p-menubar-root-list {\n align-items: center;\n flex-wrap: wrap;\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.base.item.border.radius"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.base.item.padding"), ";\n}\n\n.p-menubar-item-content {\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ";\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n color: ").concat(dt("menubar.item.color"), ";\n}\n\n.p-menubar-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("menubar.item.padding"), ";\n gap: ").concat(dt("menubar.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-menubar-item-label {\n line-height: 1;\n}\n\n.p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.color"), ";\n}\n\n.p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("menubar.submenu.icon.size"), ";\n width: ").concat(dt("menubar.submenu.icon.size"), ";\n height: ").concat(dt("menubar.submenu.icon.size"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.active.color"), ";\n background: ").concat(dt("menubar.item.active.background"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.active.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.active.color"), ";\n}\n\n.p-menubar-submenu {\n display: none;\n position: absolute;\n min-width: 12.5rem;\n z-index: 1;\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n color: ").concat(dt("menubar.submenu.color"), ";\n flex-direction: column;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n gap: ").concat(dt("menubar.submenu.gap"), ";\n}\n\n.p-menubar-submenu .p-menubar-separator {\n border-top: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-submenu .p-menubar-item {\n position: relative;\n}\n\n .p-menubar-submenu > .p-menubar-item-active > .p-menubar-submenu {\n display: block;\n left: 100%;\n top: 0;\n}\n\n.p-menubar-end {\n margin-left: auto;\n align-self: center;\n}\n\n.p-menubar-button {\n display: none;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: ").concat(dt("menubar.mobile.button.size"), ";\n height: ").concat(dt("menubar.mobile.button.size"), ";\n position: relative;\n color: ").concat(dt("menubar.mobile.button.color"), ";\n border: 0 none;\n background: transparent;\n border-radius: ").concat(dt("menubar.mobile.button.border.radius"), ";\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ", outline-color ").concat(dt("menubar.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-menubar-button:hover {\n color: ").concat(dt("menubar.mobile.button.hover.color"), ";\n background: ").concat(dt("menubar.mobile.button.hover.background"), ";\n}\n\n.p-menubar-button:focus-visible {\n box-shadow: ").concat(dt("menubar.mobile.button.focus.ring.shadow"), ";\n outline: ").concat(dt("menubar.mobile.button.focus.ring.width"), " ").concat(dt("menubar.mobile.button.focus.ring.style"), " ").concat(dt("menubar.mobile.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("menubar.mobile.button.focus.ring.offset"), ";\n}\n\n.p-menubar-mobile {\n position: relative;\n}\n\n.p-menubar-mobile .p-menubar-button {\n display: flex;\n}\n\n.p-menubar-mobile .p-menubar-root-list {\n position: absolute;\n display: none;\n width: 100%;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.item.padding"), ";\n}\n\n.p-menubar-mobile-active .p-menubar-root-list {\n display: flex;\n flex-direction: column;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-item {\n width: 100%;\n position: static;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-separator {\n border-top: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon {\n margin-left: auto;\n transition: transform 0.2s;\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-180deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu .p-menubar-submenu-icon {\n transition: transform 0.2s;\n transform: rotate(90deg);\n}\n\n.p-menubar-mobile .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-90deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu {\n width: 100%;\n position: static;\n box-shadow: none;\n border: 0 none;\n padding-left: ").concat(dt("menubar.submenu.mobile.indent"), ";\n}\n"); + return "\n.p-menubar {\n display: flex;\n align-items: center;\n background: ".concat(dt("menubar.background"), ";\n border: 1px solid ").concat(dt("menubar.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n color: ").concat(dt("menubar.color"), ";\n padding: ").concat(dt("menubar.padding"), ";\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-start,\n.p-megamenu-end {\n display: flex;\n align-items: center;\n}\n\n.p-menubar-root-list,\n.p-menubar-submenu {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n outline: 0 none;\n}\n\n.p-menubar-root-list {\n align-items: center;\n flex-wrap: wrap;\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.base.item.border.radius"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.base.item.padding"), ";\n}\n\n.p-menubar-item-content {\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ";\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n color: ").concat(dt("menubar.item.color"), ";\n}\n\n.p-menubar-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("menubar.item.padding"), ";\n gap: ").concat(dt("menubar.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-menubar-item-label {\n line-height: 1;\n}\n\n.p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.color"), ";\n}\n\n.p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("menubar.submenu.icon.size"), ";\n width: ").concat(dt("menubar.submenu.icon.size"), ";\n height: ").concat(dt("menubar.submenu.icon.size"), ";\n}\n\n.p-menubar-submenu .p-menubar-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.active.color"), ";\n background: ").concat(dt("menubar.item.active.background"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.active.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.active.color"), ";\n}\n\n.p-menubar-submenu {\n display: none;\n position: absolute;\n min-width: 12.5rem;\n z-index: 1;\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n border-radius: ").concat(dt("menubar.submenu.border.radius"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n color: ").concat(dt("menubar.submenu.color"), ";\n flex-direction: column;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n gap: ").concat(dt("menubar.submenu.gap"), ";\n}\n\n.p-menubar-submenu .p-menubar-separator {\n border-block-start: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-submenu .p-menubar-item {\n position: relative;\n}\n\n.p-menubar-submenu > .p-menubar-item-active > .p-menubar-submenu {\n display: block;\n left: 100%;\n top: 0;\n}\n\n.p-menubar-end {\n margin-left: auto;\n align-self: center;\n}\n\n.p-menubar-end:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-menubar-button {\n display: none;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: ").concat(dt("menubar.mobile.button.size"), ";\n height: ").concat(dt("menubar.mobile.button.size"), ";\n position: relative;\n color: ").concat(dt("menubar.mobile.button.color"), ";\n border: 0 none;\n background: transparent;\n border-radius: ").concat(dt("menubar.mobile.button.border.radius"), ";\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ", outline-color ").concat(dt("menubar.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-menubar-button:hover {\n color: ").concat(dt("menubar.mobile.button.hover.color"), ";\n background: ").concat(dt("menubar.mobile.button.hover.background"), ";\n}\n\n.p-menubar-button:focus-visible {\n box-shadow: ").concat(dt("menubar.mobile.button.focus.ring.shadow"), ";\n outline: ").concat(dt("menubar.mobile.button.focus.ring.width"), " ").concat(dt("menubar.mobile.button.focus.ring.style"), " ").concat(dt("menubar.mobile.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("menubar.mobile.button.focus.ring.offset"), ";\n}\n\n.p-menubar-mobile {\n position: relative;\n}\n\n.p-menubar-mobile .p-menubar-button {\n display: flex;\n}\n\n.p-menubar-mobile .p-menubar-root-list {\n position: absolute;\n display: none;\n width: 100%;\n flex-direction: column;\n top: 100%;\n left: 0;\n z-index: 1;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n border-radius: ").concat(dt("menubar.submenu.border.radius"), ";\n gap: ").concat(dt("menubar.submenu.gap"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list:dir(rtl) {\n left: auto;\n right: 0;\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.item.padding"), ";\n}\n\n.p-menubar-mobile-active .p-menubar-root-list {\n display: flex;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-item {\n width: 100%;\n position: static;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-separator {\n border-block-start: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon {\n margin-left: auto;\n transition: transform 0.2s;\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon:dir(rtl),\n.p-menubar-mobile .p-menubar-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-180deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu .p-menubar-submenu-icon {\n transition: transform 0.2s;\n transform: rotate(90deg);\n}\n\n.p-menubar-mobile .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-90deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu {\n width: 100%;\n position: static;\n box-shadow: none;\n border: 0 none;\n padding-inline-start: ").concat(dt("menubar.submenu.mobile.indent"), ";\n padding-inline-end: 0;\n}\n"); }, "theme"); var inlineStyles = { submenu: /* @__PURE__ */ __name(function submenu2(_ref2) { @@ -7705,7 +4551,7 @@ var MenubarStyle = BaseStyle.extend({ }); var script$2 = { name: "BaseMenubar", - "extends": script$e, + "extends": script$f, props: { model: { type: Array, @@ -7729,7 +4575,7 @@ var script$2 = { } }, style: MenubarStyle, - provide: /* @__PURE__ */ __name(function provide12() { + provide: /* @__PURE__ */ __name(function provide11() { return { $pcMenubar: this, $parentInstance: this @@ -7739,7 +4585,7 @@ var script$2 = { var script$1 = { name: "MenubarSub", hostName: "Menubar", - "extends": script$e, + "extends": script$f, emits: ["item-mouseenter", "item-click", "item-mousemove"], props: { items: { @@ -7855,8 +4701,7 @@ var script$1 = { return { action: mergeProps({ "class": this.cx("itemLink"), - tabindex: -1, - "aria-hidden": true + tabindex: -1 }, this.getPTOptions(processedItem, index, "itemLink")), icon: mergeProps({ "class": [this.cx("itemIcon"), this.getItemProp(processedItem, "icon")] @@ -7885,17 +4730,17 @@ var script$1 = { }, "getAriaSetSize") }, components: { - AngleRightIcon: script$z, - AngleDownIcon: script$C + AngleRightIcon: script$u, + AngleDownIcon: script$w }, directives: { ripple: Ripple } }; -var _hoisted_1$1$1 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; -var _hoisted_2$2 = ["onClick", "onMouseenter", "onMousemove"]; -var _hoisted_3$2 = ["href", "target"]; -var _hoisted_4$1 = ["id"]; +var _hoisted_1$1 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; +var _hoisted_2 = ["onClick", "onMouseenter", "onMousemove"]; +var _hoisted_3 = ["href", "target"]; +var _hoisted_4 = ["id"]; var _hoisted_5 = ["id"]; function render$1(_ctx, _cache, $props, $setup, $data, $options) { var _component_MenubarSub = resolveComponent("MenubarSub", true); @@ -7956,7 +4801,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { id: $options.getItemLabelId(processedItem), "class": _ctx.cx("itemLabel"), ref_for: true - }, $options.getPTOptions(processedItem, index, "itemLabel")), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_4$1), $options.getItemProp(processedItem, "items") ? (openBlock(), createElementBlock(Fragment, { + }, $options.getPTOptions(processedItem, index, "itemLabel")), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_4), $options.getItemProp(processedItem, "items") ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), { key: 0, @@ -7967,14 +4812,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { key: 1, "class": _ctx.cx("submenuIcon"), ref_for: true - }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_3$2)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_3)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { key: 1, item: processedItem.item, root: $props.root, hasSubmenu: $options.getItemProp(processedItem, "items"), label: $options.getItemLabel(processedItem), props: $options.getMenuItemProps(processedItem, index) - }, null, 8, ["item", "root", "hasSubmenu", "label", "props"]))], 16, _hoisted_2$2), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, { + }, null, 8, ["item", "root", "hasSubmenu", "label", "props"]))], 16, _hoisted_2), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, { key: 0, id: $options.getItemId(processedItem) + "_list", menuId: $props.menuId, @@ -8000,7 +4845,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { onItemMousemove: _cache[2] || (_cache[2] = function($event) { return _ctx.$emit("item-mousemove", $event); }) - }, null, 8, ["id", "menuId", "style", "focusedItemId", "items", "mobileActive", "activeItemPath", "templates", "level", "aria-labelledby", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_1$1$1)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ + }, null, 8, ["id", "menuId", "style", "focusedItemId", "items", "mobileActive", "activeItemPath", "templates", "level", "aria-labelledby", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_1$1)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ key: 1, id: $options.getItemId(processedItem), "class": [_ctx.cx("separator"), $options.getItemProp(processedItem, "class")], @@ -8193,7 +5038,7 @@ var script = { break; } }, "onKeyDown"), - onItemChange: /* @__PURE__ */ __name(function onItemChange2(event) { + onItemChange: /* @__PURE__ */ __name(function onItemChange2(event, type) { var processedItem = event.processedItem, isFocus = event.isFocus; if (isEmpty(processedItem)) return; var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey, items = processedItem.items; @@ -8207,9 +5052,12 @@ var script = { level, parentKey }; - this.activeItemPath = activeItemPath3; grouped && (this.dirty = true); isFocus && focus(this.menubar); + if (type === "hover" && this.queryMatches) { + return; + } + this.activeItemPath = activeItemPath3; }, "onItemChange"), onItemClick: /* @__PURE__ */ __name(function onItemClick4(event) { var originalEvent = event.originalEvent, processedItem = event.processedItem; @@ -8244,7 +5092,7 @@ var script = { }, "onItemClick"), onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter4(event) { if (this.dirty) { - this.onItemChange(event); + this.onItemChange(event, "hover"); } }, "onItemMouseEnter"), onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove4(event) { @@ -8446,7 +5294,7 @@ var script = { this.resizeListener = null; } }, "unbindResizeListener"), - bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener() { + bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener2() { var _this7 = this; if (!this.matchMediaListener) { var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); @@ -8459,7 +5307,7 @@ var script = { this.query.addEventListener("change", this.matchMediaListener); } }, "bindMatchMediaListener"), - unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener() { + unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener2() { if (this.matchMediaListener) { this.query.removeEventListener("change", this.matchMediaListener); this.matchMediaListener = null; @@ -8617,7 +5465,7 @@ var script = { }, components: { MenubarSub: script$1, - BarsIcon: script$D + BarsIcon: script$x } }; function _typeof(o) { @@ -8672,7 +5520,7 @@ function _toPrimitive(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive, "_toPrimitive"); -var _hoisted_1$2 = ["aria-haspopup", "aria-expanded", "aria-controls", "aria-label"]; +var _hoisted_1 = ["aria-haspopup", "aria-expanded", "aria-controls", "aria-label"]; function render(_ctx, _cache, $props, $setup, $data, $options) { var _component_BarsIcon = resolveComponent("BarsIcon"); var _component_MenubarSub = resolveComponent("MenubarSub"); @@ -8708,7 +5556,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { }) }, _objectSpread(_objectSpread({}, _ctx.buttonProps), _ctx.ptm("button"))), [renderSlot(_ctx.$slots, _ctx.$slots.buttonicon ? "buttonicon" : "menubuttonicon", {}, function() { return [createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm("buttonicon"))), null, 16)]; - })], 16, _hoisted_1$2)) : createCommentVNode("", true)]; + })], 16, _hoisted_1)) : createCommentVNode("", true)]; }), createVNode(_component_MenubarSub, { ref: $options.menubarRef, id: $data.id + "_list", @@ -8740,1324 +5588,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { } __name(render, "render"); script.render = render; -const _withScopeId$1 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-56df69d2"), n = n(), popScopeId(), n), "_withScopeId$1"); -const _hoisted_1$1 = ["href"]; -const _hoisted_2$1 = { class: "p-menubar-item-label" }; -const _hoisted_3$1 = { - key: 1, - class: "ml-auto border border-surface rounded text-muted text-xs text-nowrap p-1 keybinding-tag" -}; -const _sfc_main$2 = /* @__PURE__ */ defineComponent({ - __name: "CommandMenubar", - setup(__props) { - const settingStore = useSettingStore(); - const dropdownDirection = computed( - () => settingStore.get("Comfy.UseNewMenu") === "Top" ? "down" : "up" - ); - const menuItemsStore = useMenuItemStore(); - const { t } = useI18n(); - const translateMenuItem = /* @__PURE__ */ __name((item3) => { - const label = typeof item3.label === "function" ? item3.label() : item3.label; - const translatedLabel = label ? t(`menuLabels.${normalizeI18nKey(label)}`, label) : void 0; - return { - ...item3, - label: translatedLabel, - items: item3.items?.map(translateMenuItem) - }; - }, "translateMenuItem"); - const translatedItems = computed( - () => menuItemsStore.menuItems.map(translateMenuItem) - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script), { - model: translatedItems.value, - class: "top-menubar border-none p-0 bg-transparent", - pt: { - rootList: "gap-0 flex-nowrap w-auto", - submenu: `dropdown-direction-${dropdownDirection.value}`, - item: "relative" - } - }, { - item: withCtx(({ item: item3, props }) => [ - createBaseVNode("a", mergeProps({ class: "p-menubar-item-link" }, props.action, { - href: item3.url, - target: "_blank" - }), [ - item3.icon ? (openBlock(), createElementBlock("span", { - key: 0, - class: normalizeClass(["p-menubar-item-icon", item3.icon]) - }, null, 2)) : createCommentVNode("", true), - createBaseVNode("span", _hoisted_2$1, toDisplayString(item3.label), 1), - item3?.comfyCommand?.keybinding ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(item3.comfyCommand.keybinding.combo.toString()), 1)) : createCommentVNode("", true) - ], 16, _hoisted_1$1) - ]), - _: 1 - }, 8, ["model", "pt"]); - }; - } -}); -const CommandMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-56df69d2"]]); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-6e35440f"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("h1", { class: "comfyui-logo mx-2 app-drag" }, "ComfyUI", -1)); -const _hoisted_2 = { class: "flex-grow min-w-0 app-drag h-full" }; -const _hoisted_3 = { class: "window-actions-spacer flex-shrink-0" }; -const _hoisted_4 = { class: "fixed top-0 left-0 app-drag w-full h-[var(--comfy-topbar-height)]" }; -const _sfc_main$1 = /* @__PURE__ */ defineComponent({ - __name: "TopMenubar", - setup(__props) { - const workspaceState = useWorkspaceStore(); - const settingStore = useSettingStore(); - const workflowTabsPosition = computed( - () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") - ); - const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); - const betaMenuEnabled = computed(() => menuSetting.value !== "Disabled"); - const teleportTarget = computed( - () => settingStore.get("Comfy.UseNewMenu") === "Top" ? ".comfyui-body-top" : ".comfyui-body-bottom" - ); - const isNativeWindow = computed( - () => isElectron() && settingStore.get("Comfy-Desktop.WindowStyle") === "custom" - ); - const showTopMenu = computed( - () => betaMenuEnabled.value && !workspaceState.focusMode - ); - const menuRight = ref(null); - onMounted(() => { - if (menuRight.value) { - menuRight.value.appendChild(app.menu.element); - } - }); - const topMenuRef = ref(null); - provide("topMenuRef", topMenuRef); - const eventBus = useEventBus("topMenu"); - const isDropZone = ref(false); - const isDroppable = ref(false); - eventBus.on((event, payload) => { - if (event === "updateHighlight") { - isDropZone.value = payload.isDragging; - isDroppable.value = payload.isOverlapping && payload.isDragging; - } - }); - onMounted(() => { - if (isElectron()) { - electronAPI().changeTheme({ - height: topMenuRef.value.getBoundingClientRect().height - }); - } - }); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock(Fragment, null, [ - (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ - withDirectives(createBaseVNode("div", { - ref_key: "topMenuRef", - ref: topMenuRef, - class: normalizeClass(["comfyui-menu flex items-center", { dropzone: isDropZone.value, "dropzone-active": isDroppable.value }]) - }, [ - _hoisted_1, - createVNode(CommandMenubar), - createBaseVNode("div", _hoisted_2, [ - workflowTabsPosition.value === "Topbar" ? (openBlock(), createBlock(WorkflowTabs, { key: 0 })) : createCommentVNode("", true) - ]), - createBaseVNode("div", { - class: "comfyui-menu-right", - ref_key: "menuRight", - ref: menuRight - }, null, 512), - createVNode(Actionbar), - createVNode(_sfc_main$3, { class: "flex-shrink-0" }), - withDirectives(createVNode(unref(script$d), { - class: "flex-shrink-0", - icon: "pi pi-bars", - severity: "secondary", - text: "", - "aria-label": _ctx.$t("menu.hideMenu"), - onClick: _cache[0] || (_cache[0] = ($event) => unref(workspaceState).focusMode = true), - onContextmenu: unref(showNativeMenu) - }, null, 8, ["aria-label", "onContextmenu"]), [ - [_directive_tooltip, { value: _ctx.$t("menu.hideMenu"), showDelay: 300 }] - ]), - withDirectives(createBaseVNode("div", _hoisted_3, null, 512), [ - [vShow, menuSetting.value !== "Bottom"] - ]) - ], 2), [ - [vShow, showTopMenu.value] - ]) - ], 8, ["to"])), - withDirectives(createBaseVNode("div", _hoisted_4, null, 512), [ - [vShow, isNativeWindow.value && !showTopMenu.value] - ]) - ], 64); - }; - } -}); -const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6e35440f"]]); -var LatentPreviewMethod = /* @__PURE__ */ ((LatentPreviewMethod2) => { - LatentPreviewMethod2["NoPreviews"] = "none"; - LatentPreviewMethod2["Auto"] = "auto"; - LatentPreviewMethod2["Latent2RGB"] = "latent2rgb"; - LatentPreviewMethod2["TAESD"] = "taesd"; - return LatentPreviewMethod2; -})(LatentPreviewMethod || {}); -var LogLevel = /* @__PURE__ */ ((LogLevel2) => { - LogLevel2["DEBUG"] = "DEBUG"; - LogLevel2["INFO"] = "INFO"; - LogLevel2["WARNING"] = "WARNING"; - LogLevel2["ERROR"] = "ERROR"; - LogLevel2["CRITICAL"] = "CRITICAL"; - return LogLevel2; -})(LogLevel || {}); -var HashFunction = /* @__PURE__ */ ((HashFunction2) => { - HashFunction2["MD5"] = "md5"; - HashFunction2["SHA1"] = "sha1"; - HashFunction2["SHA256"] = "sha256"; - HashFunction2["SHA512"] = "sha512"; - return HashFunction2; -})(HashFunction || {}); -var AutoLaunch = /* @__PURE__ */ ((AutoLaunch2) => { - AutoLaunch2["Auto"] = "auto"; - AutoLaunch2["Disable"] = "disable"; - AutoLaunch2["Enable"] = "enable"; - return AutoLaunch2; -})(AutoLaunch || {}); -var CudaMalloc = /* @__PURE__ */ ((CudaMalloc2) => { - CudaMalloc2["Auto"] = "auto"; - CudaMalloc2["Disable"] = "disable"; - CudaMalloc2["Enable"] = "enable"; - return CudaMalloc2; -})(CudaMalloc || {}); -var FloatingPointPrecision = /* @__PURE__ */ ((FloatingPointPrecision2) => { - FloatingPointPrecision2["AUTO"] = "auto"; - FloatingPointPrecision2["FP64"] = "fp64"; - FloatingPointPrecision2["FP32"] = "fp32"; - FloatingPointPrecision2["FP16"] = "fp16"; - FloatingPointPrecision2["BF16"] = "bf16"; - FloatingPointPrecision2["FP8E4M3FN"] = "fp8_e4m3fn"; - FloatingPointPrecision2["FP8E5M2"] = "fp8_e5m2"; - return FloatingPointPrecision2; -})(FloatingPointPrecision || {}); -var CrossAttentionMethod = /* @__PURE__ */ ((CrossAttentionMethod2) => { - CrossAttentionMethod2["Auto"] = "auto"; - CrossAttentionMethod2["Split"] = "split"; - CrossAttentionMethod2["Quad"] = "quad"; - CrossAttentionMethod2["Pytorch"] = "pytorch"; - return CrossAttentionMethod2; -})(CrossAttentionMethod || {}); -var VramManagement = /* @__PURE__ */ ((VramManagement2) => { - VramManagement2["Auto"] = "auto"; - VramManagement2["GPUOnly"] = "gpu-only"; - VramManagement2["HighVram"] = "highvram"; - VramManagement2["NormalVram"] = "normalvram"; - VramManagement2["LowVram"] = "lowvram"; - VramManagement2["NoVram"] = "novram"; - VramManagement2["CPU"] = "cpu"; - return VramManagement2; -})(VramManagement || {}); -const WEB_ONLY_CONFIG_ITEMS = [ - // Launch behavior - { - id: "auto-launch", - name: "Automatically opens in the browser on startup", - category: ["Launch"], - type: "combo", - options: Object.values(AutoLaunch), - defaultValue: AutoLaunch.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case AutoLaunch.Auto: - return {}; - case AutoLaunch.Enable: - return { - ["auto-launch"]: true - }; - case AutoLaunch.Disable: - return { - ["disable-auto-launch"]: true - }; - } - }, "getValue") - } -]; -const SERVER_CONFIG_ITEMS = [ - // Network settings - { - id: "listen", - name: "Host: The IP address to listen on", - category: ["Network"], - type: "text", - defaultValue: "127.0.0.1" - }, - { - id: "port", - name: "Port: The port to listen on", - category: ["Network"], - type: "number", - // The default launch port for desktop app is 8000 instead of 8188. - defaultValue: 8e3 - }, - { - id: "tls-keyfile", - name: "TLS Key File: Path to TLS key file for HTTPS", - category: ["Network"], - type: "text", - defaultValue: "" - }, - { - id: "tls-certfile", - name: "TLS Certificate File: Path to TLS certificate file for HTTPS", - category: ["Network"], - type: "text", - defaultValue: "" - }, - { - id: "enable-cors-header", - name: 'Enable CORS header: Use "*" for all origins or specify domain', - category: ["Network"], - type: "text", - defaultValue: "" - }, - { - id: "max-upload-size", - name: "Maximum upload size (MB)", - category: ["Network"], - type: "number", - defaultValue: 100 - }, - // CUDA settings - { - id: "cuda-device", - name: "CUDA device index to use", - category: ["CUDA"], - type: "number", - defaultValue: null - }, - { - id: "cuda-malloc", - name: "Use CUDA malloc for memory allocation", - category: ["CUDA"], - type: "combo", - options: Object.values(CudaMalloc), - defaultValue: CudaMalloc.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case CudaMalloc.Auto: - return {}; - case CudaMalloc.Enable: - return { - ["cuda-malloc"]: true - }; - case CudaMalloc.Disable: - return { - ["disable-cuda-malloc"]: true - }; - } - }, "getValue") - }, - // Precision settings - { - id: "global-precision", - name: "Global floating point precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP32, - FloatingPointPrecision.FP16 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "Global floating point precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - case FloatingPointPrecision.FP32: - return { - ["force-fp32"]: true - }; - case FloatingPointPrecision.FP16: - return { - ["force-fp16"]: true - }; - default: - return {}; - } - }, "getValue") - }, - // UNET precision - { - id: "unet-precision", - name: "UNET precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP64, - FloatingPointPrecision.FP32, - FloatingPointPrecision.FP16, - FloatingPointPrecision.BF16, - FloatingPointPrecision.FP8E4M3FN, - FloatingPointPrecision.FP8E5M2 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "UNET precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - default: - return { - [`${value.toLowerCase()}-unet`]: true - }; - } - }, "getValue") - }, - // VAE settings - { - id: "vae-precision", - name: "VAE precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP16, - FloatingPointPrecision.FP32, - FloatingPointPrecision.BF16 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "VAE precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - default: - return { - [`${value.toLowerCase()}-vae`]: true - }; - } - }, "getValue") - }, - { - id: "cpu-vae", - name: "Run VAE on CPU", - category: ["Inference"], - type: "boolean", - defaultValue: false - }, - // Text Encoder settings - { - id: "text-encoder-precision", - name: "Text Encoder precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP8E4M3FN, - FloatingPointPrecision.FP8E5M2, - FloatingPointPrecision.FP16, - FloatingPointPrecision.FP32 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "Text Encoder precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - default: - return { - [`${value.toLowerCase()}-text-enc`]: true - }; - } - }, "getValue") - }, - // Memory and performance settings - { - id: "force-channels-last", - name: "Force channels-last memory format", - category: ["Memory"], - type: "boolean", - defaultValue: false - }, - { - id: "directml", - name: "DirectML device index", - category: ["Memory"], - type: "number", - defaultValue: null - }, - { - id: "disable-ipex-optimize", - name: "Disable IPEX optimization", - category: ["Memory"], - type: "boolean", - defaultValue: false - }, - // Preview settings - { - id: "preview-method", - name: "Method used for latent previews", - category: ["Preview"], - type: "combo", - options: Object.values(LatentPreviewMethod), - defaultValue: LatentPreviewMethod.NoPreviews - }, - { - id: "preview-size", - name: "Size of preview images", - category: ["Preview"], - type: "slider", - defaultValue: 512, - attrs: { - min: 128, - max: 2048, - step: 128 - } - }, - // Cache settings - { - id: "cache-classic", - name: "Use classic cache system", - category: ["Cache"], - type: "boolean", - defaultValue: false - }, - { - id: "cache-lru", - name: "Use LRU caching with a maximum of N node results cached.", - category: ["Cache"], - type: "number", - defaultValue: null, - tooltip: "May use more RAM/VRAM." - }, - // Attention settings - { - id: "cross-attention-method", - name: "Cross attention method", - category: ["Attention"], - type: "combo", - options: Object.values(CrossAttentionMethod), - defaultValue: CrossAttentionMethod.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case CrossAttentionMethod.Auto: - return {}; - default: - return { - [`use-${value.toLowerCase()}-cross-attention`]: true - }; - } - }, "getValue") - }, - { - id: "disable-xformers", - name: "Disable xFormers optimization", - type: "boolean", - defaultValue: false - }, - { - id: "force-upcast-attention", - name: "Force attention upcast", - category: ["Attention"], - type: "boolean", - defaultValue: false - }, - { - id: "dont-upcast-attention", - name: "Prevent attention upcast", - category: ["Attention"], - type: "boolean", - defaultValue: false - }, - // VRAM management - { - id: "vram-management", - name: "VRAM management mode", - category: ["Memory"], - type: "combo", - options: Object.values(VramManagement), - defaultValue: VramManagement.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case VramManagement.Auto: - return {}; - default: - return { - [value]: true - }; - } - }, "getValue") - }, - { - id: "reserve-vram", - name: "Reserved VRAM (GB)", - category: ["Memory"], - type: "number", - defaultValue: null, - tooltip: "Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reverved depending on your OS." - }, - // Misc settings - { - id: "default-hashing-function", - name: "Default hashing function for model files", - type: "combo", - options: Object.values(HashFunction), - defaultValue: HashFunction.SHA256 - }, - { - id: "disable-smart-memory", - name: "Disable smart memory management", - tooltip: "Force ComfyUI to aggressively offload to regular ram instead of keeping models in vram when it can.", - category: ["Memory"], - type: "boolean", - defaultValue: false - }, - { - id: "deterministic", - name: "Make pytorch use slower deterministic algorithms when it can.", - type: "boolean", - defaultValue: false, - tooltip: "Note that this might not make images deterministic in all cases." - }, - { - id: "fast", - name: "Enable some untested and potentially quality deteriorating optimizations.", - type: "boolean", - defaultValue: false - }, - { - id: "dont-print-server", - name: "Don't print server output to console.", - type: "boolean", - defaultValue: false - }, - { - id: "disable-metadata", - name: "Disable saving prompt metadata in files.", - type: "boolean", - defaultValue: false - }, - { - id: "disable-all-custom-nodes", - name: "Disable loading all custom nodes.", - type: "boolean", - defaultValue: false - }, - { - id: "log-level", - name: "Logging verbosity level", - type: "combo", - options: Object.values(LogLevel), - defaultValue: LogLevel.INFO, - getValue: /* @__PURE__ */ __name((value) => { - return { - verbose: value - }; - }, "getValue") - }, - // Directories - { - id: "input-directory", - name: "Input directory", - category: ["Directories"], - type: "text", - defaultValue: "" - }, - { - id: "output-directory", - name: "Output directory", - category: ["Directories"], - type: "text", - defaultValue: "" - } -]; -function useCoreCommands() { - const workflowService = useWorkflowService(); - const workflowStore = useWorkflowStore(); - const dialogService = useDialogService(); - const colorPaletteStore = useColorPaletteStore(); - const getTracker = /* @__PURE__ */ __name(() => workflowStore.activeWorkflow?.changeTracker, "getTracker"); - const getSelectedNodes = /* @__PURE__ */ __name(() => { - const selectedNodes = app.canvas.selected_nodes; - const result = []; - if (selectedNodes) { - for (const i in selectedNodes) { - const node = selectedNodes[i]; - result.push(node); - } - } - return result; - }, "getSelectedNodes"); - const toggleSelectedNodesMode = /* @__PURE__ */ __name((mode) => { - getSelectedNodes().forEach((node) => { - if (node.mode === mode) { - node.mode = LGraphEventMode.ALWAYS; - } else { - node.mode = mode; - } - }); - }, "toggleSelectedNodesMode"); - return [ - { - id: "Comfy.NewBlankWorkflow", - icon: "pi pi-plus", - label: "New Blank Workflow", - menubarLabel: "New", - function: /* @__PURE__ */ __name(() => workflowService.loadBlankWorkflow(), "function") - }, - { - id: "Comfy.OpenWorkflow", - icon: "pi pi-folder-open", - label: "Open Workflow", - menubarLabel: "Open", - function: /* @__PURE__ */ __name(() => { - app.ui.loadFile(); - }, "function") - }, - { - id: "Comfy.LoadDefaultWorkflow", - icon: "pi pi-code", - label: "Load Default Workflow", - function: /* @__PURE__ */ __name(() => workflowService.loadDefaultWorkflow(), "function") - }, - { - id: "Comfy.SaveWorkflow", - icon: "pi pi-save", - label: "Save Workflow", - menubarLabel: "Save", - function: /* @__PURE__ */ __name(async () => { - const workflow = useWorkflowStore().activeWorkflow; - if (!workflow) return; - await workflowService.saveWorkflow(workflow); - }, "function") - }, - { - id: "Comfy.SaveWorkflowAs", - icon: "pi pi-save", - label: "Save Workflow As", - menubarLabel: "Save As", - function: /* @__PURE__ */ __name(async () => { - const workflow = useWorkflowStore().activeWorkflow; - if (!workflow) return; - await workflowService.saveWorkflowAs(workflow); - }, "function") - }, - { - id: "Comfy.ExportWorkflow", - icon: "pi pi-download", - label: "Export Workflow", - menubarLabel: "Export", - function: /* @__PURE__ */ __name(() => { - workflowService.exportWorkflow("workflow", "workflow"); - }, "function") - }, - { - id: "Comfy.ExportWorkflowAPI", - icon: "pi pi-download", - label: "Export Workflow (API Format)", - menubarLabel: "Export (API)", - function: /* @__PURE__ */ __name(() => { - workflowService.exportWorkflow("workflow_api", "output"); - }, "function") - }, - { - id: "Comfy.Undo", - icon: "pi pi-undo", - label: "Undo", - function: /* @__PURE__ */ __name(async () => { - await getTracker()?.undo?.(); - }, "function") - }, - { - id: "Comfy.Redo", - icon: "pi pi-refresh", - label: "Redo", - function: /* @__PURE__ */ __name(async () => { - await getTracker()?.redo?.(); - }, "function") - }, - { - id: "Comfy.ClearWorkflow", - icon: "pi pi-trash", - label: "Clear Workflow", - function: /* @__PURE__ */ __name(() => { - const settingStore = useSettingStore(); - if (!settingStore.get("Comfy.ComfirmClear") || confirm("Clear workflow?")) { - app.clean(); - app.graph.clear(); - api.dispatchCustomEvent("graphCleared"); - } - }, "function") - }, - { - id: "Comfy.Canvas.ResetView", - icon: "pi pi-expand", - label: "Reset View", - function: /* @__PURE__ */ __name(() => { - app.resetView(); - }, "function") - }, - { - id: "Comfy.OpenClipspace", - icon: "pi pi-clipboard", - label: "Clipspace", - function: /* @__PURE__ */ __name(() => { - app.openClipspace(); - }, "function") - }, - { - id: "Comfy.RefreshNodeDefinitions", - icon: "pi pi-refresh", - label: "Refresh Node Definitions", - function: /* @__PURE__ */ __name(async () => { - await app.refreshComboInNodes(); - }, "function") - }, - { - id: "Comfy.Interrupt", - icon: "pi pi-stop", - label: "Interrupt", - function: /* @__PURE__ */ __name(async () => { - await api.interrupt(); - useToastStore().add({ - severity: "info", - summary: "Interrupted", - detail: "Execution has been interrupted", - life: 1e3 - }); - }, "function") - }, - { - id: "Comfy.ClearPendingTasks", - icon: "pi pi-stop", - label: "Clear Pending Tasks", - function: /* @__PURE__ */ __name(async () => { - await useQueueStore().clear(["queue"]); - useToastStore().add({ - severity: "info", - summary: "Confirmed", - detail: "Pending tasks deleted", - life: 3e3 - }); - }, "function") - }, - { - id: "Comfy.BrowseTemplates", - icon: "pi pi-folder-open", - label: "Browse Templates", - function: /* @__PURE__ */ __name(() => { - dialogService.showTemplateWorkflowsDialog(); - }, "function") - }, - { - id: "Comfy.Canvas.ZoomIn", - icon: "pi pi-plus", - label: "Zoom In", - function: /* @__PURE__ */ __name(() => { - const ds = app.canvas.ds; - ds.changeScale( - ds.scale * 1.1, - ds.element ? [ds.element.width / 2, ds.element.height / 2] : void 0 - ); - app.canvas.setDirty(true, true); - }, "function") - }, - { - id: "Comfy.Canvas.ZoomOut", - icon: "pi pi-minus", - label: "Zoom Out", - function: /* @__PURE__ */ __name(() => { - const ds = app.canvas.ds; - ds.changeScale( - ds.scale / 1.1, - ds.element ? [ds.element.width / 2, ds.element.height / 2] : void 0 - ); - app.canvas.setDirty(true, true); - }, "function") - }, - { - id: "Comfy.Canvas.FitView", - icon: "pi pi-expand", - label: "Fit view to selected nodes", - function: /* @__PURE__ */ __name(() => { - if (app.canvas.empty) { - useToastStore().add({ - severity: "error", - summary: "Empty canvas", - life: 3e3 - }); - return; - } - app.canvas.fitViewToSelectionAnimated(); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleLock", - icon: "pi pi-lock", - label: "Canvas Toggle Lock", - function: /* @__PURE__ */ __name(() => { - app.canvas["read_only"] = !app.canvas["read_only"]; - }, "function") - }, - { - id: "Comfy.Canvas.ToggleLinkVisibility", - icon: "pi pi-eye", - label: "Canvas Toggle Link Visibility", - versionAdded: "1.3.6", - function: (() => { - const settingStore = useSettingStore(); - let lastLinksRenderMode = LiteGraph.SPLINE_LINK; - return () => { - const currentMode = settingStore.get("Comfy.LinkRenderMode"); - if (currentMode === LiteGraph.HIDDEN_LINK) { - settingStore.set("Comfy.LinkRenderMode", lastLinksRenderMode); - } else { - lastLinksRenderMode = currentMode; - settingStore.set("Comfy.LinkRenderMode", LiteGraph.HIDDEN_LINK); - } - }; - })() - }, - { - id: "Comfy.QueuePrompt", - icon: "pi pi-play", - label: "Queue Prompt", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - const batchCount = useQueueSettingsStore().batchCount; - app.queuePrompt(0, batchCount); - }, "function") - }, - { - id: "Comfy.QueuePromptFront", - icon: "pi pi-play", - label: "Queue Prompt (Front)", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - const batchCount = useQueueSettingsStore().batchCount; - app.queuePrompt(-1, batchCount); - }, "function") - }, - { - id: "Comfy.ShowSettingsDialog", - icon: "pi pi-cog", - label: "Show Settings Dialog", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - dialogService.showSettingsDialog(); - }, "function") - }, - { - id: "Comfy.Graph.GroupSelectedNodes", - icon: "pi pi-sitemap", - label: "Group Selected Nodes", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - const { canvas } = app; - if (!canvas.selectedItems?.size) { - useToastStore().add({ - severity: "error", - summary: "Nothing to group", - detail: "Please select the nodes (or other groups) to create a group for", - life: 3e3 - }); - return; - } - const group = new LGraphGroup(); - const padding = useSettingStore().get( - "Comfy.GroupSelectedNodes.Padding" - ); - group.resizeTo(canvas.selectedItems, padding); - canvas.graph.add(group); - useTitleEditorStore().titleEditorTarget = group; - }, "function") - }, - { - id: "Workspace.NextOpenedWorkflow", - icon: "pi pi-step-forward", - label: "Next Opened Workflow", - versionAdded: "1.3.9", - function: /* @__PURE__ */ __name(() => { - workflowService.loadNextOpenedWorkflow(); - }, "function") - }, - { - id: "Workspace.PreviousOpenedWorkflow", - icon: "pi pi-step-backward", - label: "Previous Opened Workflow", - versionAdded: "1.3.9", - function: /* @__PURE__ */ __name(() => { - workflowService.loadPreviousOpenedWorkflow(); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Mute", - icon: "pi pi-volume-off", - label: "Mute/Unmute Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - toggleSelectedNodesMode(LGraphEventMode.NEVER); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Bypass", - icon: "pi pi-shield", - label: "Bypass/Unbypass Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - toggleSelectedNodesMode(LGraphEventMode.BYPASS); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Pin", - icon: "pi pi-pin", - label: "Pin/Unpin Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - getSelectedNodes().forEach((node) => { - node.pin(!node.pinned); - }); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelected.Pin", - icon: "pi pi-pin", - label: "Pin/Unpin Selected Items", - versionAdded: "1.3.33", - function: /* @__PURE__ */ __name(() => { - for (const item3 of app.canvas.selectedItems) { - if (item3 instanceof LGraphNode || item3 instanceof LGraphGroup) { - item3.pin(!item3.pinned); - } - } - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Collapse", - icon: "pi pi-minus", - label: "Collapse/Expand Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - getSelectedNodes().forEach((node) => { - node.collapse(); - }); - }, "function") - }, - { - id: "Comfy.ToggleTheme", - icon: "pi pi-moon", - label: "Toggle Theme (Dark/Light)", - versionAdded: "1.3.12", - function: (() => { - let previousDarkTheme = DEFAULT_DARK_COLOR_PALETTE.id; - let previousLightTheme = DEFAULT_LIGHT_COLOR_PALETTE.id; - return () => { - const settingStore = useSettingStore(); - const theme10 = colorPaletteStore.completedActivePalette; - if (theme10.light_theme) { - previousLightTheme = theme10.id; - settingStore.set("Comfy.ColorPalette", previousDarkTheme); - } else { - previousDarkTheme = theme10.id; - settingStore.set("Comfy.ColorPalette", previousLightTheme); - } - }; - })() - }, - { - id: "Workspace.ToggleBottomPanel", - icon: "pi pi-list", - label: "Toggle Bottom Panel", - versionAdded: "1.3.22", - function: /* @__PURE__ */ __name(() => { - useBottomPanelStore().toggleBottomPanel(); - }, "function") - }, - { - id: "Workspace.ToggleFocusMode", - icon: "pi pi-eye", - label: "Toggle Focus Mode", - versionAdded: "1.3.27", - function: /* @__PURE__ */ __name(() => { - useWorkspaceStore().toggleFocusMode(); - }, "function") - }, - { - id: "Comfy.Graph.FitGroupToContents", - icon: "pi pi-expand", - label: "Fit Group To Contents", - versionAdded: "1.4.9", - function: /* @__PURE__ */ __name(() => { - for (const group of app.canvas.selectedItems) { - if (group instanceof LGraphGroup) { - group.recomputeInsideNodes(); - const padding = useSettingStore().get( - "Comfy.GroupSelectedNodes.Padding" - ); - group.resizeTo(group.children, padding); - app.graph.change(); - } - } - }, "function") - }, - { - id: "Comfy.Help.OpenComfyUIIssues", - icon: "pi pi-github", - label: "Open ComfyUI Issues", - menubarLabel: "ComfyUI Issues", - versionAdded: "1.5.5", - function: /* @__PURE__ */ __name(() => { - window.open( - "https://github.com/comfyanonymous/ComfyUI/issues", - "_blank" - ); - }, "function") - }, - { - id: "Comfy.Help.OpenComfyUIDocs", - icon: "pi pi-info-circle", - label: "Open ComfyUI Docs", - menubarLabel: "ComfyUI Docs", - versionAdded: "1.5.5", - function: /* @__PURE__ */ __name(() => { - window.open("https://docs.comfy.org/", "_blank"); - }, "function") - }, - { - id: "Comfy.Help.OpenComfyOrgDiscord", - icon: "pi pi-discord", - label: "Open Comfy-Org Discord", - menubarLabel: "Comfy-Org Discord", - versionAdded: "1.5.5", - function: /* @__PURE__ */ __name(() => { - window.open("https://www.comfy.org/discord", "_blank"); - }, "function") - }, - { - id: "Workspace.SearchBox.Toggle", - icon: "pi pi-search", - label: "Toggle Search Box", - versionAdded: "1.5.7", - function: /* @__PURE__ */ __name(() => { - useSearchBoxStore().toggleVisible(); - }, "function") - }, - { - id: "Comfy.Help.AboutComfyUI", - icon: "pi pi-info-circle", - label: "Open About ComfyUI", - menubarLabel: "About ComfyUI", - versionAdded: "1.6.4", - function: /* @__PURE__ */ __name(() => { - dialogService.showSettingsDialog("about"); - }, "function") - }, - { - id: "Comfy.DuplicateWorkflow", - icon: "pi pi-clone", - label: "Duplicate Current Workflow", - versionAdded: "1.6.15", - function: /* @__PURE__ */ __name(() => { - workflowService.duplicateWorkflow(workflowStore.activeWorkflow); - }, "function") - }, - { - id: "Workspace.CloseWorkflow", - icon: "pi pi-times", - label: "Close Current Workflow", - versionAdded: "1.7.3", - function: /* @__PURE__ */ __name(() => { - if (workflowStore.activeWorkflow) - workflowService.closeWorkflow(workflowStore.activeWorkflow); - }, "function") - } - ]; -} -__name(useCoreCommands, "useCoreCommands"); -function setupAutoQueueHandler() { - const queueCountStore = useQueuePendingTaskCountStore(); - const queueSettingsStore = useQueueSettingsStore(); - let graphHasChanged = false; - let internalCount = 0; - api.addEventListener("graphChanged", () => { - if (queueSettingsStore.mode === "change") { - if (internalCount) { - graphHasChanged = true; - } else { - graphHasChanged = false; - app.queuePrompt(0, queueSettingsStore.batchCount); - internalCount++; - } - } - }); - queueCountStore.$subscribe( - () => { - internalCount = queueCountStore.count; - if (!internalCount && !app.lastExecutionError) { - if (queueSettingsStore.mode === "instant" || queueSettingsStore.mode === "change" && graphHasChanged) { - graphHasChanged = false; - app.queuePrompt(0, queueSettingsStore.batchCount); - } - } - }, - { detached: true } - ); -} -__name(setupAutoQueueHandler, "setupAutoQueueHandler"); -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "GraphView", - setup(__props) { - setupAutoQueueHandler(); - const { t } = useI18n(); - const toast = useToast(); - const settingStore = useSettingStore(); - const executionStore = useExecutionStore(); - const colorPaletteStore = useColorPaletteStore(); - const queueStore = useQueueStore(); - watch( - () => colorPaletteStore.completedActivePalette, - (newTheme) => { - const DARK_THEME_CLASS = "dark-theme"; - if (newTheme.light_theme) { - document.body.classList.remove(DARK_THEME_CLASS); - } else { - document.body.classList.add(DARK_THEME_CLASS); - } - if (isElectron()) { - electronAPI().changeTheme({ - color: "rgba(0, 0, 0, 0)", - symbolColor: newTheme.colors.comfy_base["input-text"] - }); - } - }, - { immediate: true } - ); - if (isElectron()) { - watch( - () => queueStore.tasks, - (newTasks, oldTasks) => { - const oldRunningTaskIds = new Set( - oldTasks.filter((task) => task.isRunning).map((task) => task.promptId) - ); - newTasks.filter( - (task) => oldRunningTaskIds.has(task.promptId) && task.isHistory - ).forEach((task) => { - electronAPI().Events.incrementUserProperty( - `execution:${task.displayStatus.toLowerCase()}`, - 1 - ); - }); - }, - { deep: true } - ); - } - watchEffect(() => { - const fontSize = settingStore.get("Comfy.TextareaWidget.FontSize"); - document.documentElement.style.setProperty( - "--comfy-textarea-font-size", - `${fontSize}px` - ); - }); - watchEffect(() => { - const padding = settingStore.get("Comfy.TreeExplorer.ItemPadding"); - document.documentElement.style.setProperty( - "--comfy-tree-explorer-item-padding", - `${padding}px` - ); - }); - watchEffect(() => { - const locale = settingStore.get("Comfy.Locale"); - if (locale) { - i18n.global.locale.value = locale; - } - }); - watchEffect(() => { - const useNewMenu = settingStore.get("Comfy.UseNewMenu"); - if (useNewMenu === "Disabled") { - app.ui.menuContainer.style.setProperty("display", "block"); - app.ui.restoreMenuPosition(); - } else { - app.ui.menuContainer.style.setProperty("display", "none"); - } - }); - watchEffect(() => { - queueStore.maxHistoryItems = settingStore.get("Comfy.Queue.MaxHistoryItems"); - }); - const init = /* @__PURE__ */ __name(() => { - const coreCommands = useCoreCommands(); - useCommandStore().registerCommands(coreCommands); - useMenuItemStore().registerCoreMenuCommands(); - useKeybindingService().registerCoreKeybindings(); - useSidebarTabStore().registerCoreSidebarTabs(); - useBottomPanelStore().registerCoreBottomPanelTabs(); - app.extensionManager = useWorkspaceStore(); - }, "init"); - const queuePendingTaskCountStore = useQueuePendingTaskCountStore(); - const onStatus = /* @__PURE__ */ __name(async (e) => { - queuePendingTaskCountStore.update(e); - await queueStore.update(); - }, "onStatus"); - const reconnectingMessage = { - severity: "error", - summary: t("g.reconnecting") - }; - const onReconnecting = /* @__PURE__ */ __name(() => { - toast.remove(reconnectingMessage); - toast.add(reconnectingMessage); - }, "onReconnecting"); - const onReconnected = /* @__PURE__ */ __name(() => { - toast.remove(reconnectingMessage); - toast.add({ - severity: "success", - summary: t("g.reconnected"), - life: 2e3 - }); - }, "onReconnected"); - onMounted(() => { - api.addEventListener("status", onStatus); - api.addEventListener("reconnecting", onReconnecting); - api.addEventListener("reconnected", onReconnected); - executionStore.bindExecutionEvents(); - try { - init(); - } catch (e) { - console.error("Failed to init ComfyUI frontend", e); - } - }); - onBeforeUnmount(() => { - api.removeEventListener("status", onStatus); - api.removeEventListener("reconnecting", onReconnecting); - api.removeEventListener("reconnected", onReconnected); - executionStore.unbindExecutionEvents(); - }); - useEventListener(window, "keydown", useKeybindingService().keybindHandler); - const { wrapWithErrorHandling, wrapWithErrorHandlingAsync } = useErrorHandling(); - const onGraphReady = /* @__PURE__ */ __name(() => { - requestIdleCallback( - () => { - wrapWithErrorHandling(useKeybindingService().registerUserKeybindings)(); - wrapWithErrorHandling(useServerConfigStore().loadServerConfig)( - SERVER_CONFIG_ITEMS, - settingStore.get("Comfy.Server.ServerConfigValues") - ); - wrapWithErrorHandlingAsync(useModelStore().loadModelFolders)(); - wrapWithErrorHandlingAsync(useNodeFrequencyStore().loadNodeFrequencies)(); - useNodeDefStore().nodeSearchService.endsWithFilterStartSequence(""); - }, - { timeout: 1e3 } - ); - }, "onGraphReady"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock(Fragment, null, [ - createVNode(TopMenubar), - createVNode(_sfc_main$8, { onReady: onGraphReady }), - createVNode(_sfc_main$7), - createVNode(_sfc_main$s), - createVNode(_sfc_main$u), - createVNode(MenuHamburger) - ], 64); - }; - } -}); export { - _sfc_main as default + script$e as a, + script$b as b, + script$c as c, + script$a as d, + script$9 as e, + script$8 as f, + script$5 as g, + script$3 as h, + script as i, + script$6 as j, + script$7 as k, + script$d as s }; -//# sourceMappingURL=GraphView-CDDCHVO0.js.map +//# sourceMappingURL=index-BWow9lpT.js.map diff --git a/web/assets/index-Bm1HvJhs.js b/web/assets/index-Bm1HvJhs.js new file mode 100644 index 00000000..1c1a5076 --- /dev/null +++ b/web/assets/index-Bm1HvJhs.js @@ -0,0 +1,539 @@ +var __defProp = Object.defineProperty; +var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true }); +import { bA as BaseStyle, bB as script$6, o as openBlock, f as createElementBlock, as as mergeProps, cJ as findIndexInList, c5 as find, bK as resolveComponent, y as createBlock, C as resolveDynamicComponent, z as withCtx, m as createBaseVNode, E as toDisplayString, A as renderSlot, B as createCommentVNode, ai as normalizeClass, bO as findSingle, F as Fragment, bL as Transition, i as withDirectives, v as vShow, bT as UniqueComponentId } from "./index-CmVtQCAR.js"; +var classes$4 = { + root: /* @__PURE__ */ __name(function root(_ref) { + var instance = _ref.instance; + return ["p-step", { + "p-step-active": instance.active, + "p-disabled": instance.isStepDisabled + }]; + }, "root"), + header: "p-step-header", + number: "p-step-number", + title: "p-step-title" +}; +var StepStyle = BaseStyle.extend({ + name: "step", + classes: classes$4 +}); +var script$2$2 = { + name: "StepperSeparator", + hostName: "Stepper", + "extends": script$6 +}; +function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("span", mergeProps({ + "class": _ctx.cx("separator") + }, _ctx.ptm("separator")), null, 16); +} +__name(render$1$2, "render$1$2"); +script$2$2.render = render$1$2; +var script$1$4 = { + name: "BaseStep", + "extends": script$6, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + disabled: { + type: Boolean, + "default": false + }, + asChild: { + type: Boolean, + "default": false + }, + as: { + type: [String, Object], + "default": "DIV" + } + }, + style: StepStyle, + provide: /* @__PURE__ */ __name(function provide() { + return { + $pcStep: this, + $parentInstance: this + }; + }, "provide") +}; +var script$5 = { + name: "Step", + "extends": script$1$4, + inheritAttrs: false, + inject: { + $pcStepper: { + "default": null + }, + $pcStepList: { + "default": null + }, + $pcStepItem: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data() { + return { + isSeparatorVisible: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted() { + if (this.$el && this.$pcStepList) { + var index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name="step"]')); + var stepLen = find(this.$pcStepper.$el, '[data-pc-name="step"]').length; + this.isSeparatorVisible = index !== stepLen - 1; + } + }, "mounted"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions(key) { + var _ptm = key === "root" ? this.ptmi : this.ptm; + return _ptm(key, { + context: { + active: this.active, + disabled: this.isStepDisabled + } + }); + }, "getPTOptions"), + onStepClick: /* @__PURE__ */ __name(function onStepClick() { + this.$pcStepper.updateValue(this.activeValue); + }, "onStepClick") + }, + computed: { + active: /* @__PURE__ */ __name(function active() { + return this.$pcStepper.isStepActive(this.activeValue); + }, "active"), + activeValue: /* @__PURE__ */ __name(function activeValue() { + var _this$$pcStepItem; + return !!this.$pcStepItem ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.value : this.value; + }, "activeValue"), + isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled() { + return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled); + }, "isStepDisabled"), + id: /* @__PURE__ */ __name(function id() { + var _this$$pcStepper; + return "".concat((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.id, "_step_").concat(this.activeValue); + }, "id"), + ariaControls: /* @__PURE__ */ __name(function ariaControls() { + var _this$$pcStepper2; + return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); + }, "ariaControls"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs() { + return { + root: { + role: "presentation", + "aria-current": this.active ? "step" : void 0, + "data-pc-name": "step", + "data-pc-section": "root", + "data-p-disabled": this.isStepDisabled, + "data-p-active": this.active + }, + header: { + id: this.id, + role: "tab", + taindex: this.disabled ? -1 : void 0, + "aria-controls": this.ariaControls, + "data-pc-section": "header", + disabled: this.isStepDisabled, + onClick: this.onStepClick + } + }; + }, "a11yAttrs") + }, + components: { + StepperSeparator: script$2$2 + } +}; +var _hoisted_1 = ["id", "tabindex", "aria-controls", "disabled"]; +function render$4(_ctx, _cache, $props, $setup, $data, $options) { + var _component_StepperSeparator = resolveComponent("StepperSeparator"); + return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + "class": _ctx.cx("root"), + "aria-current": $options.active ? "step" : void 0, + role: "presentation", + "data-p-active": $options.active, + "data-p-disabled": $options.isStepDisabled + }, $options.getPTOptions("root")), { + "default": withCtx(function() { + return [createBaseVNode("button", mergeProps({ + id: $options.id, + "class": _ctx.cx("header"), + role: "tab", + type: "button", + tabindex: $options.isStepDisabled ? -1 : void 0, + "aria-controls": $options.ariaControls, + disabled: $options.isStepDisabled, + onClick: _cache[0] || (_cache[0] = function() { + return $options.onStepClick && $options.onStepClick.apply($options, arguments); + }) + }, $options.getPTOptions("header")), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("number") + }, $options.getPTOptions("number")), toDisplayString($options.activeValue), 17), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("title") + }, $options.getPTOptions("title")), [renderSlot(_ctx.$slots, "default")], 16)], 16, _hoisted_1), $data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { + key: 0 + })) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["class", "aria-current", "data-p-active", "data-p-disabled"])) : renderSlot(_ctx.$slots, "default", { + key: 1, + "class": normalizeClass(_ctx.cx("root")), + active: $options.active, + value: _ctx.value, + a11yAttrs: $options.a11yAttrs, + activateCallback: $options.onStepClick + }); +} +__name(render$4, "render$4"); +script$5.render = render$4; +var classes$3 = { + root: "p-steplist" +}; +var StepListStyle = BaseStyle.extend({ + name: "steplist", + classes: classes$3 +}); +var script$1$3 = { + name: "BaseStepList", + "extends": script$6, + style: StepListStyle, + provide: /* @__PURE__ */ __name(function provide2() { + return { + $pcStepList: this, + $parentInstance: this + }; + }, "provide") +}; +var script$4 = { + name: "StepList", + "extends": script$1$3, + inheritAttrs: false +}; +function render$3(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$3, "render$3"); +script$4.render = render$3; +var classes$2 = { + root: /* @__PURE__ */ __name(function root2(_ref) { + var instance = _ref.instance; + return ["p-steppanel", { + "p-steppanel-active": instance.isVertical && instance.active + }]; + }, "root"), + content: "p-steppanel-content" +}; +var StepPanelStyle = BaseStyle.extend({ + name: "steppanel", + classes: classes$2 +}); +var script$2$1 = { + name: "StepperSeparator", + hostName: "Stepper", + "extends": script$6 +}; +function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("span", mergeProps({ + "class": _ctx.cx("separator") + }, _ctx.ptm("separator")), null, 16); +} +__name(render$1$1, "render$1$1"); +script$2$1.render = render$1$1; +var script$1$2 = { + name: "BaseStepPanel", + "extends": script$6, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + asChild: { + type: Boolean, + "default": false + }, + as: { + type: [String, Object], + "default": "DIV" + } + }, + style: StepPanelStyle, + provide: /* @__PURE__ */ __name(function provide3() { + return { + $pcStepPanel: this, + $parentInstance: this + }; + }, "provide") +}; +var script$3 = { + name: "StepPanel", + "extends": script$1$2, + inheritAttrs: false, + inject: { + $pcStepper: { + "default": null + }, + $pcStepItem: { + "default": null + }, + $pcStepList: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data2() { + return { + isSeparatorVisible: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted2() { + if (this.$el) { + var _this$$pcStepItem, _this$$pcStepList; + var stepElements = find(this.$pcStepper.$el, '[data-pc-name="step"]'); + var stepPanelEl = findSingle(this.isVertical ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.$el : (_this$$pcStepList = this.$pcStepList) === null || _this$$pcStepList === void 0 ? void 0 : _this$$pcStepList.$el, '[data-pc-name="step"]'); + var stepPanelIndex = findIndexInList(stepPanelEl, stepElements); + this.isSeparatorVisible = this.isVertical && stepPanelIndex !== stepElements.length - 1; + } + }, "mounted"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions2(key) { + var _ptm = key === "root" ? this.ptmi : this.ptm; + return _ptm(key, { + context: { + active: this.active + } + }); + }, "getPTOptions"), + updateValue: /* @__PURE__ */ __name(function updateValue(val) { + this.$pcStepper.updateValue(val); + }, "updateValue") + }, + computed: { + active: /* @__PURE__ */ __name(function active2() { + var _this$$pcStepItem2, _this$$pcStepper; + var activeValue3 = !!this.$pcStepItem ? (_this$$pcStepItem2 = this.$pcStepItem) === null || _this$$pcStepItem2 === void 0 ? void 0 : _this$$pcStepItem2.value : this.value; + return activeValue3 === ((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.d_value); + }, "active"), + isVertical: /* @__PURE__ */ __name(function isVertical() { + return !!this.$pcStepItem; + }, "isVertical"), + activeValue: /* @__PURE__ */ __name(function activeValue2() { + var _this$$pcStepItem3; + return this.isVertical ? (_this$$pcStepItem3 = this.$pcStepItem) === null || _this$$pcStepItem3 === void 0 ? void 0 : _this$$pcStepItem3.value : this.value; + }, "activeValue"), + id: /* @__PURE__ */ __name(function id2() { + var _this$$pcStepper2; + return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); + }, "id"), + ariaControls: /* @__PURE__ */ __name(function ariaControls2() { + var _this$$pcStepper3; + return "".concat((_this$$pcStepper3 = this.$pcStepper) === null || _this$$pcStepper3 === void 0 ? void 0 : _this$$pcStepper3.id, "_step_").concat(this.activeValue); + }, "ariaControls"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs2() { + return { + id: this.id, + role: "tabpanel", + "aria-controls": this.ariaControls, + "data-pc-name": "steppanel", + "data-p-active": this.active + }; + }, "a11yAttrs") + }, + components: { + StepperSeparator: script$2$1 + } +}; +function render$2(_ctx, _cache, $props, $setup, $data, $options) { + var _component_StepperSeparator = resolveComponent("StepperSeparator"); + return $options.isVertical ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [!_ctx.asChild ? (openBlock(), createBlock(Transition, mergeProps({ + key: 0, + name: "p-toggleable-content" + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + id: $options.id, + "class": _ctx.cx("root"), + role: "tabpanel", + "aria-controls": $options.ariaControls + }, $options.getPTOptions("root")), { + "default": withCtx(function() { + return [$data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { + key: 0 + })) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("content") + }, $options.getPTOptions("content")), [renderSlot(_ctx.$slots, "default", { + active: $options.active, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + })], 16)]; + }), + _: 3 + }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]])]; + }), + _: 3 + }, 16)) : renderSlot(_ctx.$slots, "default", { + key: 1, + active: $options.active, + a11yAttrs: $options.a11yAttrs, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + })], 64)) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [!_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + id: $options.id, + "class": _ctx.cx("root"), + role: "tabpanel", + "aria-controls": $options.ariaControls + }, $options.getPTOptions("root")), { + "default": withCtx(function() { + return [renderSlot(_ctx.$slots, "default", { + active: $options.active, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + })]; + }), + _: 3 + }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]]) : _ctx.asChild && $options.active ? renderSlot(_ctx.$slots, "default", { + key: 1, + active: $options.active, + a11yAttrs: $options.a11yAttrs, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + }) : createCommentVNode("", true)], 64)); +} +__name(render$2, "render$2"); +script$3.render = render$2; +var classes$1 = { + root: "p-steppanels" +}; +var StepPanelsStyle = BaseStyle.extend({ + name: "steppanels", + classes: classes$1 +}); +var script$1$1 = { + name: "BaseStepPanels", + "extends": script$6, + style: StepPanelsStyle, + provide: /* @__PURE__ */ __name(function provide4() { + return { + $pcStepPanels: this, + $parentInstance: this + }; + }, "provide") +}; +var script$2 = { + name: "StepPanels", + "extends": script$1$1, + inheritAttrs: false +}; +function render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$1, "render$1"); +script$2.render = render$1; +var theme = /* @__PURE__ */ __name(function theme2(_ref) { + var dt = _ref.dt; + return "\n.p-steplist {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style-type: none;\n overflow-x: auto;\n}\n\n.p-step {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: ".concat(dt("stepper.step.gap"), ";\n padding: ").concat(dt("stepper.step.padding"), ";\n}\n\n.p-step:last-of-type {\n flex: initial;\n}\n\n.p-step-header {\n border: 0 none;\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ";\n border-radius: ").concat(dt("stepper.step.header.border.radius"), ";\n outline-color: transparent;\n background: transparent;\n padding: ").concat(dt("stepper.step.header.padding"), ";\n gap: ").concat(dt("stepper.step.header.gap"), ";\n}\n\n.p-step-header:focus-visible {\n box-shadow: ").concat(dt("stepper.step.header.focus.ring.shadow"), ";\n outline: ").concat(dt("stepper.step.header.focus.ring.width"), " ").concat(dt("stepper.step.header.focus.ring.style"), " ").concat(dt("stepper.step.header.focus.ring.color"), ";\n outline-offset: ").concat(dt("stepper.step.header.focus.ring.offset"), ";\n}\n\n.p-stepper.p-stepper-readonly .p-step {\n cursor: auto;\n}\n\n.p-step-title {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n color: ").concat(dt("stepper.step.title.color"), ";\n font-weight: ").concat(dt("stepper.step.title.font.weight"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-step-number {\n display: flex;\n align-items: center;\n justify-content: center;\n color: ").concat(dt("stepper.step.number.color"), ";\n border: 2px solid ").concat(dt("stepper.step.number.border.color"), ";\n background: ").concat(dt("stepper.step.number.background"), ";\n min-width: ").concat(dt("stepper.step.number.size"), ";\n height: ").concat(dt("stepper.step.number.size"), ";\n line-height: ").concat(dt("stepper.step.number.size"), ";\n font-size: ").concat(dt("stepper.step.number.font.size"), ";\n z-index: 1;\n border-radius: ").concat(dt("stepper.step.number.border.radius"), ";\n position: relative;\n font-weight: ").concat(dt("stepper.step.number.font.weight"), ';\n}\n\n.p-step-number::after {\n content: " ";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ').concat(dt("stepper.step.number.border.radius"), ";\n box-shadow: ").concat(dt("stepper.step.number.shadow"), ";\n}\n\n.p-step-active .p-step-header {\n cursor: default;\n}\n\n.p-step-active .p-step-number {\n background: ").concat(dt("stepper.step.number.active.background"), ";\n border-color: ").concat(dt("stepper.step.number.active.border.color"), ";\n color: ").concat(dt("stepper.step.number.active.color"), ";\n}\n\n.p-step-active .p-step-title {\n color: ").concat(dt("stepper.step.title.active.color"), ";\n}\n\n.p-step:not(.p-disabled):focus-visible {\n outline: ").concat(dt("focus.ring.width"), " ").concat(dt("focus.ring.style"), " ").concat(dt("focus.ring.color"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-step:has(~ .p-step-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepper-separator {\n flex: 1 1 0;\n background: ").concat(dt("stepper.separator.background"), ";\n width: 100%;\n height: ").concat(dt("stepper.separator.size"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-steppanels {\n padding: ").concat(dt("stepper.steppanels.padding"), ";\n}\n\n.p-steppanel {\n background: ").concat(dt("stepper.steppanel.background"), ";\n color: ").concat(dt("stepper.steppanel.color"), ";\n}\n\n.p-stepper:has(.p-stepitem) {\n display: flex;\n flex-direction: column;\n}\n\n.p-stepitem {\n display: flex;\n flex-direction: column;\n flex: initial;\n}\n\n.p-stepitem.p-stepitem-active {\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-step {\n flex: initial;\n}\n\n.p-stepitem .p-steppanel-content {\n width: 100%;\n padding: ").concat(dt("stepper.steppanel.padding"), ";\n margin-inline-start: 1rem;\n}\n\n.p-stepitem .p-steppanel {\n display: flex;\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-stepper-separator {\n flex: 0 0 auto;\n width: ").concat(dt("stepper.separator.size"), ";\n height: auto;\n margin: ").concat(dt("stepper.separator.margin"), ";\n position: relative;\n left: calc(-1 * ").concat(dt("stepper.separator.size"), ");\n}\n\n.p-stepitem .p-stepper-separator:dir(rtl) {\n left: calc(-9 * ").concat(dt("stepper.separator.size"), ");\n}\n\n.p-stepitem:has(~ .p-stepitem-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepitem:last-of-type .p-steppanel {\n padding-inline-start: ").concat(dt("stepper.step.number.size"), ";\n}\n"); +}, "theme"); +var classes = { + root: /* @__PURE__ */ __name(function root3(_ref2) { + var props = _ref2.props; + return ["p-stepper p-component", { + "p-readonly": props.linear + }]; + }, "root"), + separator: "p-stepper-separator" +}; +var StepperStyle = BaseStyle.extend({ + name: "stepper", + theme, + classes +}); +var script$1 = { + name: "BaseStepper", + "extends": script$6, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + linear: { + type: Boolean, + "default": false + } + }, + style: StepperStyle, + provide: /* @__PURE__ */ __name(function provide5() { + return { + $pcStepper: this, + $parentInstance: this + }; + }, "provide") +}; +var script = { + name: "Stepper", + "extends": script$1, + inheritAttrs: false, + emits: ["update:value"], + data: /* @__PURE__ */ __name(function data3() { + return { + id: this.$attrs.id, + d_value: this.value + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + value: /* @__PURE__ */ __name(function value(newValue) { + this.d_value = newValue; + }, "value") + }, + mounted: /* @__PURE__ */ __name(function mounted3() { + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + updateValue: /* @__PURE__ */ __name(function updateValue2(newValue) { + if (this.d_value !== newValue) { + this.d_value = newValue; + this.$emit("update:value", newValue); + } + }, "updateValue"), + isStepActive: /* @__PURE__ */ __name(function isStepActive(value2) { + return this.d_value === value2; + }, "isStepActive"), + isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled2() { + return this.linear; + }, "isStepDisabled") + } +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + role: "tablist" + }, _ctx.ptmi("root")), [_ctx.$slots.start ? renderSlot(_ctx.$slots, "start", { + key: 0 + }) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.$slots.end ? renderSlot(_ctx.$slots, "end", { + key: 1 + }) : createCommentVNode("", true)], 16); +} +__name(render, "render"); +script.render = render; +export { + script$5 as a, + script$2 as b, + script$3 as c, + script as d, + script$4 as s +}; +//# sourceMappingURL=index-Bm1HvJhs.js.map diff --git a/web/assets/index-Cf-n7v0V.css b/web/assets/index-C1Hb_Yo9.css similarity index 95% rename from web/assets/index-Cf-n7v0V.css rename to web/assets/index-C1Hb_Yo9.css index b8e6a53a..5e62328c 100644 --- a/web/assets/index-Cf-n7v0V.css +++ b/web/assets/index-C1Hb_Yo9.css @@ -2101,6 +2101,15 @@ .inset-0{ inset: 0px; } + .-bottom-4{ + bottom: -1rem; + } + .-right-14{ + right: -3.5rem; + } + .-right-4{ + right: -1rem; + } .bottom-\[10px\]{ bottom: 10px; } @@ -2134,6 +2143,12 @@ .z-\[9999\]{ z-index: 9999; } + .col-span-full{ + grid-column: 1 / -1; + } + .row-span-full{ + grid-row: 1 / -1; + } .m-0{ margin: 0px; } @@ -2146,6 +2161,9 @@ .m-2{ margin: 0.5rem; } + .m-8{ + margin: 2rem; + } .mx-1{ margin-left: 0.25rem; margin-right: 0.25rem; @@ -2226,6 +2244,9 @@ .mt-5{ margin-top: 1.25rem; } + .mt-6{ + margin-top: 1.5rem; + } .block{ display: block; } @@ -2259,6 +2280,9 @@ .h-1{ height: 0.25rem; } + .h-1\/2{ + height: 50%; + } .h-16{ height: 4rem; } @@ -2268,6 +2292,9 @@ .h-64{ height: 16rem; } + .h-8{ + height: 2rem; + } .h-96{ height: 26rem; } @@ -2292,9 +2319,15 @@ .max-h-full{ max-height: 100%; } + .min-h-52{ + min-height: 13rem; + } .min-h-8{ min-height: 2rem; } + .min-h-full{ + min-height: 100%; + } .min-h-screen{ min-height: 100vh; } @@ -2356,15 +2389,24 @@ .min-w-110{ min-width: 32rem; } + .min-w-32{ + min-width: 8rem; + } .min-w-84{ min-width: 22rem; } .min-w-96{ min-width: 26rem; } + .min-w-full{ + min-width: 100%; + } .max-w-110{ max-width: 32rem; } + .max-w-48{ + max-width: 12rem; + } .max-w-64{ max-width: 16rem; } @@ -2395,6 +2437,9 @@ .grow{ flex-grow: 1; } + .border-collapse{ + border-collapse: collapse; + } .-translate-y-40{ --tw-translate-y: -10rem; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); @@ -2463,9 +2508,15 @@ .justify-around{ justify-content: space-around; } + .justify-evenly{ + justify-content: space-evenly; + } .gap-0{ gap: 0px; } + .gap-1{ + gap: 0.25rem; + } .gap-2{ gap: 0.5rem; } @@ -2481,6 +2532,11 @@ .gap-8{ gap: 2rem; } + .space-x-1 > :not([hidden]) ~ :not([hidden]){ + --tw-space-x-reverse: 0; + margin-right: calc(0.25rem * var(--tw-space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); + } .space-y-1 > :not([hidden]) ~ :not([hidden]){ --tw-space-y-reverse: 0; margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); @@ -2528,9 +2584,6 @@ .whitespace-pre-line{ white-space: pre-line; } - .whitespace-pre-wrap{ - white-space: pre-wrap; - } .text-wrap{ text-wrap: wrap; } @@ -2560,6 +2613,10 @@ border-left-width: 0px; border-right-width: 0px; } + .border-y{ + border-top-width: 1px; + border-bottom-width: 1px; + } .border-b{ border-bottom-width: 1px; } @@ -2575,9 +2632,16 @@ .border-solid{ border-style: solid; } + .border-hidden{ + border-style: hidden; + } .border-none{ border-style: none; } + .border-neutral-700{ + --tw-border-opacity: 1; + border-color: rgb(64 64 64 / var(--tw-border-opacity)); + } .bg-\[var\(--comfy-menu-bg\)\]{ background-color: var(--comfy-menu-bg); } @@ -2732,6 +2796,9 @@ .text-center{ text-align: center; } + .text-right{ + text-align: right; + } .font-mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } @@ -2832,18 +2899,34 @@ .no-underline{ text-decoration-line: none; } + .antialiased{ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } .opacity-0{ opacity: 0; } .opacity-100{ opacity: 1; } + .opacity-15{ + opacity: 0.15; + } + .opacity-25{ + opacity: 0.25; + } .opacity-40{ opacity: 0.4; } .opacity-50{ opacity: 0.5; } + .opacity-65{ + opacity: 0.65; + } + .opacity-75{ + opacity: 0.75; + } .shadow-lg{ --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); @@ -2891,6 +2974,9 @@ .duration-100{ transition-duration: 100ms; } + .duration-200{ + transition-duration: 200ms; + } .duration-300{ transition-duration: 300ms; } @@ -3672,6 +3758,30 @@ audio.comfy-audio.empty-audio-widget { padding: var(--comfy-tree-explorer-item-padding) !important; } +/* Load3d styles */ +.comfy-load-3d, +.comfy-load-3d-animation, +.comfy-preview-3d, +.comfy-preview-3d-animation{ + display: flex; + flex-direction: column; + background: transparent; + flex: 1; + position: relative; + overflow: hidden; +} + +.comfy-load-3d canvas, +.comfy-load-3d-animation canvas, +.comfy-preview-3d canvas, +.comfy-preview-3d-animation canvas{ + display: flex; + width: 100% !important; + height: 100% !important; +} + +/* End of Load3d styles */ + /* [Desktop] Electron window specific styles */ .app-drag { app-region: drag; @@ -3699,6 +3809,42 @@ audio.comfy-audio.empty-audio-widget { .hover\:opacity-100:hover{ opacity: 1; } +@media (prefers-reduced-motion: no-preference){ + + .motion-safe\:w-0{ + width: 0px; + } + + .motion-safe\:opacity-0{ + opacity: 0; + } + + .group\/sidebar-tab:focus-within .motion-safe\:group-focus-within\/sidebar-tab\:w-auto{ + width: auto; + } + + .group\/sidebar-tab:focus-within .motion-safe\:group-focus-within\/sidebar-tab\:opacity-100{ + opacity: 1; + } + + .group\/sidebar-tab:hover .motion-safe\:group-hover\/sidebar-tab\:w-auto{ + width: auto; + } + + .group\/sidebar-tab:hover .motion-safe\:group-hover\/sidebar-tab\:opacity-100{ + opacity: 1; + } + + .group\/tree-node:hover .motion-safe\:group-hover\/tree-node\:opacity-100{ + opacity: 1; + } +} +@media not all and (min-width: 640px){ + + .max-sm\:hidden{ + display: none; + } +} @media (min-width: 768px){ .md\:flex{ @@ -3798,17 +3944,17 @@ audio.comfy-audio.empty-audio-widget { margin-bottom: 1rem; } -.comfy-error-report[data-v-09b72a20] { +.comfy-error-report[data-v-3faf7785] { display: flex; flex-direction: column; gap: 1rem; } -.action-container[data-v-09b72a20] { +.action-container[data-v-3faf7785] { display: flex; gap: 1rem; justify-content: flex-end; } -.wrapper-pre[data-v-09b72a20] { +.wrapper-pre[data-v-3faf7785] { white-space: pre-wrap; word-wrap: break-word; } @@ -3826,7 +3972,7 @@ audio.comfy-audio.empty-audio-widget { margin-left: auto; } -.comfy-missing-models[data-v-ebf9fccc] { +.comfy-missing-models[data-v-f8d63775] { max-height: 300px; overflow-y: auto; } @@ -3868,22 +4014,22 @@ audio.comfy-audio.empty-audio-widget { background-color: rgb(234 179 8 / var(--tw-bg-opacity)) } -[data-v-ba13476b] .p-inputtext { +[data-v-b3ab067d] .p-inputtext { --p-form-field-padding-x: 0.625rem; } -.p-button.p-inputicon[data-v-ba13476b] { +.p-button.p-inputicon[data-v-b3ab067d] { width: auto; border-style: none; padding: 0px; } -.form-input[data-v-e4e3022d] .input-slider .p-inputnumber input, -.form-input[data-v-e4e3022d] .input-slider .slider-part { +.form-input[data-v-1451da7b] .input-slider .p-inputnumber input, +.form-input[data-v-1451da7b] .input-slider .slider-part { width: 5rem } -.form-input[data-v-e4e3022d] .p-inputtext, -.form-input[data-v-e4e3022d] .p-select { +.form-input[data-v-1451da7b] .p-inputtext, +.form-input[data-v-1451da7b] .p-select { width: 11rem } @@ -4504,28 +4650,28 @@ audio.comfy-audio.empty-audio-widget { box-sizing: border-box; } -.tree-node[data-v-a6457774] { +.tree-node[data-v-654109c7] { width: 100%; display: flex; align-items: center; justify-content: space-between; } -.leaf-count-badge[data-v-a6457774] { +.leaf-count-badge[data-v-654109c7] { margin-left: 0.5rem; } -.node-content[data-v-a6457774] { +.node-content[data-v-654109c7] { display: flex; align-items: center; flex-grow: 1; } -.leaf-label[data-v-a6457774] { +.leaf-label[data-v-654109c7] { margin-left: 0.5rem; } -[data-v-a6457774] .editable-text span { +[data-v-654109c7] .editable-text span { word-break: break-all; } -[data-v-31d518da] .tree-explorer-node-label { +[data-v-976a6d58] .tree-explorer-node-label { width: 100%; display: flex; align-items: center; @@ -4538,10 +4684,10 @@ audio.comfy-audio.empty-audio-widget { * By setting the position to relative on the parent and using an absolutely positioned pseudo-element, * we can create a visual indicator for the drop target without affecting the layout of other elements. */ -[data-v-31d518da] .p-tree-node-content:has(.tree-folder) { +[data-v-976a6d58] .p-tree-node-content:has(.tree-folder) { position: relative; } -[data-v-31d518da] .p-tree-node-content:has(.tree-folder.can-drop)::after { +[data-v-976a6d58] .p-tree-node-content:has(.tree-folder.can-drop)::after { content: ''; position: absolute; top: 0; @@ -4552,21 +4698,21 @@ audio.comfy-audio.empty-audio-widget { pointer-events: none; } -[data-v-5e759e25] .p-toolbar-end .p-button { +[data-v-0061c432] .p-toolbar-end .p-button { padding-top: 0.25rem; padding-bottom: 0.25rem } @media (min-width: 1536px) { -[data-v-5e759e25] .p-toolbar-end .p-button { +[data-v-0061c432] .p-toolbar-end .p-button { padding-top: 0.5rem; padding-bottom: 0.5rem } } -[data-v-5e759e25] .p-toolbar-start { +[data-v-0061c432] .p-toolbar-start { min-width: 0px; @@ -4649,31 +4795,6 @@ audio.comfy-audio.empty-audio-widget { width: 16px; } -._content[data-v-c4279e6b] { - - display: flex; - - flex-direction: column -} -._content[data-v-c4279e6b] > :not([hidden]) ~ :not([hidden]) { - - --tw-space-y-reverse: 0; - - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)) -} -._footer[data-v-c4279e6b] { - - display: flex; - - flex-direction: column; - - align-items: flex-end; - - padding-top: 1rem -} - .slot_row[data-v-d9792337] { padding: 2px; } @@ -4801,34 +4922,61 @@ audio.comfy-audio.empty-audio-widget { color: var(--error-text); } +._content[data-v-c4279e6b] { + + display: flex; + + flex-direction: column +} +._content[data-v-c4279e6b] > :not([hidden]) ~ :not([hidden]) { + + --tw-space-y-reverse: 0; + + margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); + + margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)) +} +._footer[data-v-c4279e6b] { + + display: flex; + + flex-direction: column; + + align-items: flex-end; + + padding-top: 1rem +} + .node-lib-node-container[data-v-da9a8962] { height: 100%; width: 100% } -.p-selectbutton .p-button[data-v-05364174] { +.p-selectbutton .p-button[data-v-bd06e12b] { padding: 0.5rem; } -.p-selectbutton .p-button .pi[data-v-05364174] { +.p-selectbutton .p-button .pi[data-v-bd06e12b] { font-size: 1.5rem; } -.field[data-v-05364174] { +.field[data-v-bd06e12b] { display: flex; flex-direction: column; gap: 0.5rem; } -.color-picker-container[data-v-05364174] { +.color-picker-container[data-v-bd06e12b] { display: flex; align-items: center; gap: 0.5rem; } -.scroll-container[data-v-ad33a347] { +.scroll-container { +&[data-v-ad33a347] { height: 100%; overflow-y: auto; /* Firefox */ scrollbar-width: none; +} &[data-v-ad33a347]::-webkit-scrollbar { width: 1px; } diff --git a/web/assets/index-DpF-ptbJ.js b/web/assets/index-CdHVC5qq.js similarity index 86% rename from web/assets/index-DpF-ptbJ.js rename to web/assets/index-CdHVC5qq.js index 792856c6..f7678aec 100644 --- a/web/assets/index-DpF-ptbJ.js +++ b/web/assets/index-CdHVC5qq.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { B as BaseStyle, y as script$s, cA as script$t, m as createBaseVNode, o as openBlock, f as createElementBlock, G as mergeProps, Z as toDisplayString, U as Ripple, r as resolveDirective, i as withDirectives, J as createBlock, K as resolveDynamicComponent, c5 as script$u, aD as resolveComponent, V as normalizeClass, aF as createSlots, P as withCtx, bG as script$v, bD as script$w, H as Fragment, I as renderList, aG as createTextVNode, bx as setAttribute, am as UniqueComponentId, bv as normalizeProps, M as renderSlot, L as createCommentVNode, T as equals, br as script$x, cg as script$y, cB as getFirstFocusableElement, ap as OverlayEventBus, E as getVNodeProp, ao as resolveFieldData, cC as invokeElementMethod, Q as getAttribute, cD as getNextElementSibling, C as getOuterWidth, cE as getPreviousElementSibling, l as script$z, aA as script$A, Y as script$B, bu as script$D, al as isNotEmpty, b3 as withModifiers, D as getOuterHeight, cF as _default, an as ZIndex, S as focus, ar as addStyle, at as absolutePosition, au as ConnectedOverlayScrollHandler, av as isTouchDevice, cG as FilterOperator, az as script$E, cH as script$F, cI as FocusTrap, k as createVNode, aE as Transition, c3 as withKeys, cJ as getIndex, aW as script$G, cK as isClickable, cL as clearSelection, cM as localeComparator, cN as sort, cO as FilterService, cu as FilterMatchMode, R as findSingle, c9 as findIndexInList, ca as find, cP as exportCSV, W as getOffset, cQ as getHiddenElementOuterWidth, cR as getHiddenElementOuterHeight, cS as reorderArray, cT as getWindowScrollTop, cU as removeClass, cV as addClass, aq as isEmpty, ay as script$H, aB as script$I } from "./index-QvfM__ze.js"; -import { s as script$C } from "./index-Q1cQr26V.js"; +import { bA as BaseStyle, bB as script$s, bZ as script$t, o as openBlock, f as createElementBlock, as as mergeProps, m as createBaseVNode, E as toDisplayString, bS as Ripple, r as resolveDirective, i as withDirectives, y as createBlock, C as resolveDynamicComponent, bi as script$u, bK as resolveComponent, ai as normalizeClass, co as createSlots, z as withCtx, aU as script$v, cf as script$w, F as Fragment, D as renderList, a7 as createTextVNode, c9 as setAttribute, cv as normalizeProps, A as renderSlot, B as createCommentVNode, b_ as script$x, ce as equals, cA as script$y, br as script$z, cE as getFirstFocusableElement, c8 as OverlayEventBus, cU as getVNodeProp, cc as resolveFieldData, ds as invokeElementMethod, bP as getAttribute, cV as getNextElementSibling, c3 as getOuterWidth, cW as getPreviousElementSibling, l as script$A, bR as script$B, bU as script$C, bJ as script$E, cd as isNotEmpty, ar as withModifiers, d5 as getOuterHeight, bT as UniqueComponentId, cY as _default, bC as ZIndex, bE as focus, b$ as addStyle, c4 as absolutePosition, c0 as ConnectedOverlayScrollHandler, c1 as isTouchDevice, dt as FilterOperator, bI as script$F, cs as script$G, bH as FocusTrap, k as createVNode, bL as Transition, bf as withKeys, c6 as getIndex, cu as script$H, cX as isClickable, cZ as clearSelection, ca as localeComparator, cn as sort, cG as FilterService, dl as FilterMatchMode, bO as findSingle, cJ as findIndexInList, c5 as find, du as exportCSV, cR as getOffset, c_ as isRTL, dv as getHiddenElementOuterWidth, dw as getHiddenElementOuterHeight, dx as reorderArray, bW as removeClass, bD as addClass, ci as isEmpty, cH as script$I, ck as script$J } from "./index-CmVtQCAR.js"; +import { s as script$D } from "./index-I0brO37W.js"; var ColumnStyle = BaseStyle.extend({ name: "column" }); @@ -215,13 +215,6 @@ var script$q = { name: "ArrowDownIcon", "extends": script$t }; -var _hoisted_1$i = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$f = [_hoisted_1$i]; function render$p(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -229,7 +222,12 @@ function render$p(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$f, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$p, "render$p"); script$q.render = render$p; @@ -237,13 +235,6 @@ var script$p = { name: "ArrowUpIcon", "extends": script$t }; -var _hoisted_1$h = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$e = [_hoisted_1$h]; function render$o(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -251,7 +242,12 @@ function render$o(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$e, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$o, "render$o"); script$p.render = render$o; @@ -286,7 +282,7 @@ function _toPrimitive$b(t, r) { __name(_toPrimitive$b, "_toPrimitive$b"); var theme$2 = /* @__PURE__ */ __name(function theme(_ref) { var dt = _ref.dt; - return "\n.p-paginator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n background: ".concat(dt("paginator.background"), ";\n color: ").concat(dt("paginator.color"), ";\n padding: ").concat(dt("paginator.padding"), ";\n border-radius: ").concat(dt("paginator.border.radius"), ";\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-content {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-content-start {\n margin-right: auto;\n}\n\n.p-paginator-content-end {\n margin-left: auto;\n}\n\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n user-select: none;\n overflow: hidden;\n position: relative;\n background: ").concat(dt("paginator.nav.button.background"), ";\n border: 0 none;\n color: ").concat(dt("paginator.nav.button.color"), ";\n min-width: ").concat(dt("paginator.nav.button.width"), ";\n height: ").concat(dt("paginator.nav.button.height"), ";\n transition: background ").concat(dt("paginator.transition.duration"), ", color ").concat(dt("paginator.transition.duration"), ", outline-color ").concat(dt("paginator.transition.duration"), ", box-shadow ").concat(dt("paginator.transition.duration"), ";\n border-radius: ").concat(dt("paginator.nav.button.border.radius"), ";\n padding: 0;\n margin: 0;\n}\n\n.p-paginator-page:focus-visible,\n.p-paginator-next:focus-visible,\n.p-paginator-last:focus-visible,\n.p-paginator-first:focus-visible,\n.p-paginator-prev:focus-visible {\n box-shadow: ").concat(dt("paginator.nav.button.focus.ring.shadow"), ";\n outline: ").concat(dt("paginator.nav.button.focus.ring.width"), " ").concat(dt("paginator.nav.button.focus.ring.style"), " ").concat(dt("paginator.nav.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("paginator.nav.button.focus.ring.offset"), ";\n}\n\n.p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,\n.p-paginator-first:not(.p-disabled):hover,\n.p-paginator-prev:not(.p-disabled):hover,\n.p-paginator-next:not(.p-disabled):hover,\n.p-paginator-last:not(.p-disabled):hover {\n background: ").concat(dt("paginator.nav.button.hover.background"), ";\n color: ").concat(dt("paginator.nav.button.hover.color"), ";\n}\n\n.p-paginator-page.p-paginator-page-selected {\n background: ").concat(dt("paginator.nav.button.selected.background"), ";\n color: ").concat(dt("paginator.nav.button.selected.color"), ";\n}\n\n.p-paginator-current {\n color: ").concat(dt("paginator.current.page.report.color"), ";\n}\n\n.p-paginator-pages {\n display: flex;\n align-items: center;\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-jtp-input .p-inputtext {\n max-width: ").concat(dt("paginator.jump.to.page.input.max.width"), ";\n}\n"); + return "\n.p-paginator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n background: ".concat(dt("paginator.background"), ";\n color: ").concat(dt("paginator.color"), ";\n padding: ").concat(dt("paginator.padding"), ";\n border-radius: ").concat(dt("paginator.border.radius"), ";\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-content {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-content-start {\n margin-inline-end: auto;\n}\n\n.p-paginator-content-end {\n margin-inline-start: auto;\n}\n\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n user-select: none;\n overflow: hidden;\n position: relative;\n background: ").concat(dt("paginator.nav.button.background"), ";\n border: 0 none;\n color: ").concat(dt("paginator.nav.button.color"), ";\n min-width: ").concat(dt("paginator.nav.button.width"), ";\n height: ").concat(dt("paginator.nav.button.height"), ";\n transition: background ").concat(dt("paginator.transition.duration"), ", color ").concat(dt("paginator.transition.duration"), ", outline-color ").concat(dt("paginator.transition.duration"), ", box-shadow ").concat(dt("paginator.transition.duration"), ";\n border-radius: ").concat(dt("paginator.nav.button.border.radius"), ";\n padding: 0;\n margin: 0;\n}\n\n.p-paginator-page:focus-visible,\n.p-paginator-next:focus-visible,\n.p-paginator-last:focus-visible,\n.p-paginator-first:focus-visible,\n.p-paginator-prev:focus-visible {\n box-shadow: ").concat(dt("paginator.nav.button.focus.ring.shadow"), ";\n outline: ").concat(dt("paginator.nav.button.focus.ring.width"), " ").concat(dt("paginator.nav.button.focus.ring.style"), " ").concat(dt("paginator.nav.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("paginator.nav.button.focus.ring.offset"), ";\n}\n\n.p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,\n.p-paginator-first:not(.p-disabled):hover,\n.p-paginator-prev:not(.p-disabled):hover,\n.p-paginator-next:not(.p-disabled):hover,\n.p-paginator-last:not(.p-disabled):hover {\n background: ").concat(dt("paginator.nav.button.hover.background"), ";\n color: ").concat(dt("paginator.nav.button.hover.color"), ";\n}\n\n.p-paginator-page.p-paginator-page-selected {\n background: ").concat(dt("paginator.nav.button.selected.background"), ";\n color: ").concat(dt("paginator.nav.button.selected.color"), ";\n}\n\n.p-paginator-current {\n color: ").concat(dt("paginator.current.page.report.color"), ";\n}\n\n.p-paginator-pages {\n display: flex;\n align-items: center;\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-jtp-input .p-inputtext {\n max-width: ").concat(dt("paginator.jump.to.page.input.max.width"), ";\n}\n\n.p-paginator-first:dir(rtl),\n.p-paginator-prev:dir(rtl),\n.p-paginator-next:dir(rtl),\n.p-paginator-last:dir(rtl) {\n transform: rotate(180deg);\n}\n"); }, "theme"); var classes$2 = { paginator: /* @__PURE__ */ __name(function paginator(_ref2) { @@ -336,7 +332,7 @@ var classes$2 = { current: "p-paginator-current", pcRowPerPageDropdown: "p-paginator-rpp-dropdown", pcJumpToPageDropdown: "p-paginator-jtp-dropdown", - pcJumpToPageInput: "p-paginator-jtp-input" + pcJumpToPageInputText: "p-paginator-jtp-input" }; var PaginatorStyle = BaseStyle.extend({ name: "paginator", @@ -347,13 +343,6 @@ var script$o = { name: "AngleDoubleLeftIcon", "extends": script$t }; -var _hoisted_1$g = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$d = [_hoisted_1$g]; function render$n(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -361,7 +350,12 @@ function render$n(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$d, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$n, "render$n"); script$o.render = render$n; @@ -369,13 +363,6 @@ var script$n = { name: "AngleDoubleRightIcon", "extends": script$t }; -var _hoisted_1$f = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$c = [_hoisted_1$f]; function render$m(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -383,7 +370,12 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$c, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$m, "render$m"); script$n.render = render$m; @@ -391,11 +383,6 @@ var script$m = { name: "AngleLeftIcon", "extends": script$t }; -var _hoisted_1$e = /* @__PURE__ */ createBaseVNode("path", { - d: "M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$b = [_hoisted_1$e]; function render$l(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -403,7 +390,10 @@ function render$l(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$b, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$l, "render$l"); script$m.render = render$l; @@ -643,12 +633,12 @@ function render$6$1(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createBlock(_component_JTPInput, { ref: "jtpInput", modelValue: $data.d_page, - "class": normalizeClass(_ctx.cx("pcJumpToPageInput")), + "class": normalizeClass(_ctx.cx("pcJumpToPageInputText")), "aria-label": $options.inputArialabel, disabled: $props.disabled, "onUpdate:modelValue": $options.onChange, unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcJumpToPageInput") + pt: _ctx.ptm("pcJumpToPageInputText") }, null, 8, ["modelValue", "class", "aria-label", "disabled", "onUpdate:modelValue", "unstyled", "pt"]); } __name(render$6$1, "render$6$1"); @@ -763,7 +753,7 @@ var script$3$1 = { ripple: Ripple } }; -var _hoisted_1$d = ["aria-label", "aria-current", "onClick", "data-p-active"]; +var _hoisted_1$6 = ["aria-label", "aria-current", "onClick", "data-p-active"]; function render$3$1(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("span", mergeProps({ @@ -783,7 +773,7 @@ function render$3$1(_ctx, _cache, $props, $setup, $data, $options) { ref_for: true }, $options.getPTOptions(pageLink - 1, "page"), { "data-p-active": pageLink - 1 === $props.page - }), [createTextVNode(toDisplayString(pageLink), 1)], 16, _hoisted_1$d)), [[_directive_ripple]]); + }), [createTextVNode(toDisplayString(pageLink), 1)], 16, _hoisted_1$6)), [[_directive_ripple]]); }), 128))], 16); } __name(render$3$1, "render$3$1"); @@ -890,22 +880,6 @@ function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$1$1, "render$1$1"); script$1$2.render = render$1$1; -function _toConsumableArray$1(r) { - return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$3(r) || _nonIterableSpread$1(); -} -__name(_toConsumableArray$1, "_toConsumableArray$1"); -function _nonIterableSpread$1() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableSpread$1, "_nonIterableSpread$1"); -function _iterableToArray$1(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -__name(_iterableToArray$1, "_iterableToArray$1"); -function _arrayWithoutHoles$1(r) { - if (Array.isArray(r)) return _arrayLikeToArray$3(r); -} -__name(_arrayWithoutHoles$1, "_arrayWithoutHoles$1"); function _typeof$b(o) { "@babel/helpers - typeof"; return _typeof$b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { @@ -988,7 +962,6 @@ var script$l = { }, "totalRecords") }, mounted: /* @__PURE__ */ __name(function mounted2() { - this.setPaginatorAttribute(); this.createStyle(); }, "mounted"), methods: { @@ -1042,7 +1015,7 @@ var script$l = { this.styleElement = document.createElement("style"); this.styleElement.type = "text/css"; setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); - document.head.appendChild(this.styleElement); + document.body.appendChild(this.styleElement); var innerHTML = ""; var keys = Object.keys(this.template); var sortedBreakpoints = {}; @@ -1061,9 +1034,9 @@ var script$l = { } minValue = Object.entries(sortedBreakpoints)[index - 1] ? "and (min-width:".concat(calculatedMinValue, ")") : ""; if (key === "default") { - innerHTML += "\n @media screen ".concat(minValue, " {\n .paginator[").concat(this.attributeSelector, "],\n display: flex;\n }\n }\n "); + innerHTML += "\n @media screen ".concat(minValue, " {\n .p-paginator[").concat(this.$attrSelector, "],\n display: flex;\n }\n }\n "); } else { - innerHTML += "\n.paginator[".concat(this.attributeSelector, "], .p-paginator-").concat(key, " {\n display: none;\n}\n@media screen ").concat(minValue, " and (max-width: ").concat(key, ") {\n .paginator[").concat(this.attributeSelector, "], .p-paginator-").concat(key, " {\n display: flex;\n }\n .paginator[").concat(this.attributeSelector, "],\n .p-paginator-default{\n display: none;\n }\n}\n "); + innerHTML += "\n.p-paginator-".concat(key, " {\n display: none;\n}\n@media screen ").concat(minValue, " and (max-width: ").concat(key, ") {\n .p-paginator-").concat(key, " {\n display: flex;\n }\n\n .p-paginator-default{\n display: none;\n }\n}\n "); } } this.styleElement.innerHTML = innerHTML; @@ -1072,14 +1045,6 @@ var script$l = { hasBreakpoints: /* @__PURE__ */ __name(function hasBreakpoints() { return _typeof$b(this.template) === "object"; }, "hasBreakpoints"), - setPaginatorAttribute: /* @__PURE__ */ __name(function setPaginatorAttribute() { - var _this2 = this; - if (this.$refs.paginator && this.$refs.paginator.length >= 0) { - _toConsumableArray$1(this.$refs.paginator).forEach(function(el) { - el.setAttribute(_this2.attributeSelector, ""); - }); - } - }, "setPaginatorAttribute"), getAriaLabel: /* @__PURE__ */ __name(function getAriaLabel(labelType) { return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria[labelType] : void 0; }, "getAriaLabel") @@ -1148,9 +1113,9 @@ var script$l = { currentPage: /* @__PURE__ */ __name(function currentPage() { return this.pageCount > 0 ? this.page + 1 : 0; }, "currentPage"), - attributeSelector: /* @__PURE__ */ __name(function attributeSelector() { - return UniqueComponentId(); - }, "attributeSelector") + last: /* @__PURE__ */ __name(function last2() { + return Math.min(this.d_first + this.rows, this.totalRecords); + }, "last") }, components: { CurrentPageReport: script$9$1, @@ -1184,7 +1149,22 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) { "class": _ctx.cx("paginator", { key }) - }, _ctx.ptm("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ + }, _ctx.ptm("root")), [_ctx.$slots.container ? renderSlot(_ctx.$slots, "container", { + key: 0, + first: $data.d_first + 1, + last: $options.last, + rows: $data.d_rows, + page: $options.page, + pageCount: $options.pageCount, + totalRecords: _ctx.totalRecords, + firstPageCallback: $options.changePageToFirst, + lastPageCallback: $options.changePageToLast, + prevPageCallback: $options.changePageToPrev, + nextPageCallback: $options.changePageToNext, + rowChangeCallback: $options.onRowChange + }) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ key: 0, "class": _ctx.cx("contentStart"), ref_for: true @@ -1298,14 +1278,14 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) { ref_for: true }, _ctx.ptm("contentEnd")), [renderSlot(_ctx.$slots, "end", { state: $options.currentState - })], 16)) : createCommentVNode("", true)], 16); + })], 16)) : createCommentVNode("", true)], 64))], 16); }), 128))], 16)) : createCommentVNode("", true); } __name(render$k, "render$k"); script$l.render = render$k; var theme$1 = /* @__PURE__ */ __name(function theme2(_ref) { var dt = _ref.dt; - return "\n.p-datatable {\n position: relative;\n}\n\n.p-datatable-table {\n border-spacing: 0;\n width: 100%;\n}\n\n.p-datatable-scrollable > .p-datatable-table-container {\n position: relative;\n}\n\n.p-datatable-scrollable-table > .p-datatable-thead {\n top: 0;\n z-index: 1;\n}\n\n.p-datatable-scrollable-table > .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n}\n\n.p-datatable-scrollable-table>.p-datatable-tfoot {\n bottom: 0;\n z-index: 1;\n}\n\n.p-datatable-scrollable .p-datatable-frozen-column {\n position: sticky;\n background: ".concat(dt("datatable.header.cell.background"), ";\n}\n\n.p-datatable-scrollable th.p-datatable-frozen-column {\n z-index: 1;\n}\n\n.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead,\n.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {\n background: ").concat(dt("datatable.header.cell.background"), ";\n}\n\n.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot,\n.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {\n background: ").concat(dt("datatable.footer.cell.background"), ";\n}\n\n.p-datatable-flex-scrollable {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.p-datatable-flex-scrollable > .p-datatable-table-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n}\n\n.p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header {\n position: sticky;\n z-index: 1;\n}\n\n.p-datatable-resizable-table > .p-datatable-thead > tr > th,\n.p-datatable-resizable-table > .p-datatable-tfoot > tr > td,\n.p-datatable-resizable-table > .p-datatable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) {\n background-clip: padding-box;\n position: relative;\n}\n\n.p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer {\n display: none;\n}\n\n.p-datatable-column-resizer {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n margin: 0;\n width: ").concat(dt("datatable.column.resizer.width"), ";\n height: 100%;\n padding: 0px;\n cursor: col-resize;\n border: 1px solid transparent;\n}\n\n.p-datatable-column-header-content {\n display: flex;\n align-items: center;\n gap: ").concat(dt("datatable.header.cell.gap"), ";\n}\n\n.p-datatable-column-resize-indicator {\n width: ").concat(dt("datatable.resize.indicator.width"), ";\n position: absolute;\n z-index: 10;\n display: none;\n background: ").concat(dt("datatable.resize.indicator.color"), ";\n}\n\n.p-datatable-row-reorder-indicator-up,\n.p-datatable-row-reorder-indicator-down {\n position: absolute;\n display: none;\n}\n\n.p-datatable-reorderable-column,\n.p-datatable-reorderable-row-handle {\n cursor: move;\n}\n\n.p-datatable-mask {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n}\n\n.p-datatable-inline-filter {\n display: flex;\n align-items: center;\n width: 100%;\n gap: ").concat(dt("datatable.filter.inline.gap"), ";\n}\n\n.p-datatable-inline-filter .p-datatable-filter-element-container {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-datatable-filter-overlay {\n background: ").concat(dt("datatable.filter.overlay.select.background"), ";\n color: ").concat(dt("datatable.filter.overlay.select.color"), ";\n border: 1px solid ").concat(dt("datatable.filter.overlay.select.border.color"), ";\n border-radius: ").concat(dt("datatable.filter.overlay.select.border.radius"), ";\n box-shadow: ").concat(dt("datatable.filter.overlay.select.shadow"), ";\n min-width: 12.5rem;\n}\n\n.p-datatable-filter-constraint-list {\n margin: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n padding: ").concat(dt("datatable.filter.constraint.list.padding"), ";\n gap: ").concat(dt("datatable.filter.constraint.list.gap"), ";\n}\n\n.p-datatable-filter-constraint {\n padding: ").concat(dt("datatable.filter.constraint.padding"), ";\n color: ").concat(dt("datatable.filter.constraint.color"), ";\n border-radius: ").concat(dt("datatable.filter.constraint.border.radius"), ";\n cursor: pointer;\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-filter-constraint-selected {\n background: ").concat(dt("datatable.filter.constraint.selected.background"), ";\n color: ").concat(dt("datatable.filter.constraint.selected.color"), ";\n}\n\n.p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover {\n background: ").concat(dt("datatable.filter.constraint.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.focus.color"), ";\n}\n\n.p-datatable-filter-constraint:focus-visible {\n outline: 0 none;\n background: ").concat(dt("datatable.filter.constraint.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.focus.color"), ";\n}\n\n.p-datatable-filter-constraint-selected:focus-visible {\n outline: 0 none;\n background: ").concat(dt("datatable.filter.constraint.selected.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.selected.focus.color"), ";\n}\n\n.p-datatable-filter-constraint-separator {\n border-top: 1px solid ").concat(dt("datatable.filter.constraint.separator.border.color"), ";\n}\n\n.p-datatable-popover-filter {\n display: inline-flex;\n margin-left: auto;\n}\n\n.p-datatable-filter-overlay-popover {\n background: ").concat(dt("datatable.filter.overlay.popover.background"), ";\n color: ").concat(dt("datatable.filter.overlay.popover.color"), ";\n border: 1px solid ").concat(dt("datatable.filter.overlay.popover.border.color"), ";\n border-radius: ").concat(dt("datatable.filter.overlay.popover.border.radius"), ";\n box-shadow: ").concat(dt("datatable.filter.overlay.popover.shadow"), ";\n min-width: 12.5rem;\n padding: ").concat(dt("datatable.filter.overlay.popover.padding"), ";\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-operator-dropdown {\n width: 100%;\n}\n\n.p-datatable-filter-rule-list,\n.p-datatable-filter-rule {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-rule {\n border-bottom: 1px solid ").concat(dt("datatable.filter.rule.border.color"), ";\n}\n\n.p-datatable-filter-rule:last-child {\n border-bottom: 0 none;\n}\n\n.p-datatable-filter-add-rule-button {\n width: 100%;\n}\n\n.p-datatable-filter-remove-button {\n width: 100%;\n}\n\n.p-datatable-filter-buttonbar {\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.p-datatable-virtualscroller-spacer {\n display: flex;\n}\n\n.p-datatable .p-virtualscroller .p-virtualscroller-loading {\n transform: none !important;\n min-height: 0;\n position: sticky;\n top: 0;\n left: 0;\n}\n\n.p-datatable-paginator-top {\n border-color: ").concat(dt("datatable.paginator.top.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.paginator.top.border.width"), ";\n}\n\n.p-datatable-paginator-bottom {\n border-color: ").concat(dt("datatable.paginator.bottom.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.paginator.bottom.border.width"), ";\n}\n\n.p-datatable-header {\n background: ").concat(dt("datatable.header.background"), ";\n color: ").concat(dt("datatable.header.color"), ";\n border-color: ").concat(dt("datatable.header.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.header.border.width"), ";\n padding: ").concat(dt("datatable.header.padding"), ";\n}\n\n.p-datatable-footer {\n background: ").concat(dt("datatable.footer.background"), ";\n color: ").concat(dt("datatable.footer.color"), ";\n border-color: ").concat(dt("datatable.footer.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.footer.border.width"), ";\n padding: ").concat(dt("datatable.footer.padding"), ";\n}\n\n.p-datatable-header-cell {\n padding: ").concat(dt("datatable.header.cell.padding"), ";\n background: ").concat(dt("datatable.header.cell.background"), ";\n border-color: ").concat(dt("datatable.header.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("datatable.header.cell.color"), ";\n font-weight: normal;\n text-align: left;\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-column-title {\n font-weight: ").concat(dt("datatable.column.title.font.weight"), ";\n}\n\n.p-datatable-tbody > tr {\n outline-color: transparent;\n background: ").concat(dt("datatable.row.background"), ";\n color: ").concat(dt("datatable.row.color"), ";\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-tbody > tr > td {\n text-align: left;\n border-color: ").concat(dt("datatable.body.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n padding: ").concat(dt("datatable.body.cell.padding"), ";\n}\n\n.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {\n background: ").concat(dt("datatable.row.hover.background"), ";\n color: ").concat(dt("datatable.row.hover.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected {\n background: ").concat(dt("datatable.row.selected.background"), ";\n color: ").concat(dt("datatable.row.selected.color"), ";\n}\n\n.p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td {\n border-bottom-color: ").concat(dt("datatable.body.cell.selected.border.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected > td {\n border-bottom-color: ").concat(dt("datatable.body.cell.selected.border.color"), ";\n}\n\n.p-datatable-tbody > tr:focus-visible,\n.p-datatable-tbody > tr.p-datatable-contextmenu-row-selected {\n box-shadow: ").concat(dt("datatable.body.cell.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.body.cell.focus.ring.width"), " ").concat(dt("datatable.body.cell.focus.ring.style"), " ").concat(dt("datatable.body.cell.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.body.cell.focus.ring.offset"), ";\n}\n\n.p-datatable-tfoot > tr > td {\n text-align: left;\n padding: ").concat(dt("datatable.footer.cell.padding"), ";\n border-color: ").concat(dt("datatable.footer.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("datatable.footer.cell.color"), ";\n background: ").concat(dt("datatable.footer.cell.background"), ";\n}\n\n.p-datatable-column-footer {\n font-weight: ").concat(dt("datatable.column.footer.font.weight"), ";\n}\n\n.p-datatable-sortable-column {\n cursor: pointer;\n user-select: none;\n outline-color: transparent;\n}\n\n.p-datatable-column-title,\n.p-datatable-sort-icon,\n.p-datatable-sort-badge {\n vertical-align: middle;\n}\n\n.p-datatable-sort-icon {\n color: ").concat(dt("datatable.sort.icon.color"), ";\n transition: color ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover {\n background: ").concat(dt("datatable.header.cell.hover.background"), ";\n color: ").concat(dt("datatable.header.cell.hover.color"), ";\n}\n\n.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sort-icon {\n color: ").concat(dt("datatable.sort.icon.hover.color"), ";\n}\n\n.p-datatable-column-sorted {\n background: ").concat(dt("datatable.header.cell.selected.background"), ";\n color: ").concat(dt("datatable.header.cell.selected.color"), ";\n}\n\n.p-datatable-column-sorted .p-datatable-sort-icon {\n color: ").concat(dt("datatable.header.cell.selected.color"), ";\n}\n\n.p-datatable-sortable-column:focus-visible {\n box-shadow: ").concat(dt("datatable.header.cell.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.header.cell.focus.ring.width"), " ").concat(dt("datatable.header.cell.focus.ring.style"), " ").concat(dt("datatable.header.cell.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.header.cell.focus.ring.offset"), ";\n}\n\n.p-datatable-hoverable .p-datatable-selectable-row {\n cursor: pointer;\n}\n\n.p-datatable-tbody > tr.p-datatable-dragpoint-top > td {\n box-shadow: inset 0 2px 0 0 ").concat(dt("datatable.drop.point.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-dragpoint-bottom > td {\n box-shadow: inset 0 -2px 0 0 ").concat(dt("datatable.drop.point.color"), ";\n}\n\n.p-datatable-loading-icon {\n font-size: ").concat(dt("datatable.loading.icon.size"), ";\n width: ").concat(dt("datatable.loading.icon.size"), ";\n height: ").concat(dt("datatable.loading.icon.size"), ";\n}\n\n.p-datatable-gridlines .p-datatable-header {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-footer {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-paginator-top {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-paginator-bottom {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-thead > tr > th {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-thead > tr > th:last-child {\n border-width: 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr > td {\n border-width: 1px 0 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-width: 1px 1px 0 1px;\n}\n\np-datatable-gridlines .p-datatable-tbody > tr:last-child > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child {\n border-width: 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tfoot > tr > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {\n border-width: 1px 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td {\n border-width: 0 0 0 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {\n border-width: 0 1px 0 1px;\n}\n\n.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd {\n background: ").concat(dt("datatable.row.striped.background"), ";\n}\n\n.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd.p-datatable-row-selected {\n background: ").concat(dt("datatable.row.selected.background"), ";\n color: ").concat(dt("datatable.row.selected.color"), ";\n}\n\n.p-datatable.p-datatable-sm .p-datatable-header {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-thead > tr > th {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-tbody > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-tfoot > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-footer {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-header {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-thead > tr > th {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-tbody>tr>td {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-tfoot>tr>td {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-footer {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable-row-toggle-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("datatable.row.toggle.button.size"), ";\n height: ").concat(dt("datatable.row.toggle.button.size"), ";\n color: ").concat(dt("datatable.row.toggle.button.color"), ";\n border: 0 none;\n background: transparent;\n cursor: pointer;\n border-radius: ").concat(dt("datatable.row.toggle.button.border.radius"), ";\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n outline-color: transparent;\n user-select: none;\n}\n\n.p-datatable-row-toggle-button:enabled:hover {\n color: ").concat(dt("datatable.row.toggle.button.hover.color"), ";\n background: ").concat(dt("datatable.row.toggle.button.hover.background"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected .p-datatable-row-toggle-button:hover {\n background: ").concat(dt("datatable.row.toggle.button.selected.hover.background"), ";\n ").concat(dt("datatable.row.toggle.button.selected.hover.color"), ";\n}\n\n.p-datatable-row-toggle-button:focus-visible {\n box-shadow: ").concat(dt("datatable.row.toggle.button.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.row.toggle.button.focus.ring.width"), " ").concat(dt("datatable.row.toggle.button.focus.ring.style"), " ").concat(dt("datatable.row.toggle.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.row.toggle.button.focus.ring.offset"), ";\n}\n"); + return "\n.p-datatable {\n position: relative;\n}\n\n.p-datatable-table {\n border-spacing: 0;\n border-collapse: separate;\n width: 100%;\n}\n\n.p-datatable-scrollable > .p-datatable-table-container {\n position: relative;\n}\n\n.p-datatable-scrollable-table > .p-datatable-thead {\n inset-block-start: 0;\n z-index: 1;\n}\n\n.p-datatable-scrollable-table > .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n}\n\n.p-datatable-scrollable-table > .p-datatable-tfoot {\n inset-block-end: 0;\n z-index: 1;\n}\n\n.p-datatable-scrollable .p-datatable-frozen-column {\n position: sticky;\n background: ".concat(dt("datatable.header.cell.background"), ";\n}\n\n.p-datatable-scrollable th.p-datatable-frozen-column {\n z-index: 1;\n}\n\n.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead,\n.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {\n background: ").concat(dt("datatable.header.cell.background"), ";\n}\n\n.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot,\n.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {\n background: ").concat(dt("datatable.footer.cell.background"), ";\n}\n\n.p-datatable-flex-scrollable {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.p-datatable-flex-scrollable > .p-datatable-table-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n}\n\n.p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header {\n position: sticky;\n z-index: 1;\n}\n\n.p-datatable-resizable-table > .p-datatable-thead > tr > th,\n.p-datatable-resizable-table > .p-datatable-tfoot > tr > td,\n.p-datatable-resizable-table > .p-datatable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) {\n background-clip: padding-box;\n position: relative;\n}\n\n.p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer {\n display: none;\n}\n\n.p-datatable-column-resizer {\n display: block;\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n margin: 0;\n width: ").concat(dt("datatable.column.resizer.width"), ";\n height: 100%;\n padding: 0;\n cursor: col-resize;\n border: 1px solid transparent;\n}\n\n.p-datatable-column-header-content {\n display: flex;\n align-items: center;\n gap: ").concat(dt("datatable.header.cell.gap"), ";\n}\n\n.p-datatable-column-resize-indicator {\n width: ").concat(dt("datatable.resize.indicator.width"), ";\n position: absolute;\n z-index: 10;\n display: none;\n background: ").concat(dt("datatable.resize.indicator.color"), ";\n}\n\n.p-datatable-row-reorder-indicator-up,\n.p-datatable-row-reorder-indicator-down {\n position: absolute;\n display: none;\n}\n\n.p-datatable-reorderable-column,\n.p-datatable-reorderable-row-handle {\n cursor: move;\n}\n\n.p-datatable-mask {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n}\n\n.p-datatable-inline-filter {\n display: flex;\n align-items: center;\n width: 100%;\n gap: ").concat(dt("datatable.filter.inline.gap"), ";\n}\n\n.p-datatable-inline-filter .p-datatable-filter-element-container {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-datatable-filter-overlay {\n background: ").concat(dt("datatable.filter.overlay.select.background"), ";\n color: ").concat(dt("datatable.filter.overlay.select.color"), ";\n border: 1px solid ").concat(dt("datatable.filter.overlay.select.border.color"), ";\n border-radius: ").concat(dt("datatable.filter.overlay.select.border.radius"), ";\n box-shadow: ").concat(dt("datatable.filter.overlay.select.shadow"), ";\n min-width: 12.5rem;\n}\n\n.p-datatable-filter-constraint-list {\n margin: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n padding: ").concat(dt("datatable.filter.constraint.list.padding"), ";\n gap: ").concat(dt("datatable.filter.constraint.list.gap"), ";\n}\n\n.p-datatable-filter-constraint {\n padding: ").concat(dt("datatable.filter.constraint.padding"), ";\n color: ").concat(dt("datatable.filter.constraint.color"), ";\n border-radius: ").concat(dt("datatable.filter.constraint.border.radius"), ";\n cursor: pointer;\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-filter-constraint-selected {\n background: ").concat(dt("datatable.filter.constraint.selected.background"), ";\n color: ").concat(dt("datatable.filter.constraint.selected.color"), ";\n}\n\n.p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover {\n background: ").concat(dt("datatable.filter.constraint.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.focus.color"), ";\n}\n\n.p-datatable-filter-constraint:focus-visible {\n outline: 0 none;\n background: ").concat(dt("datatable.filter.constraint.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.focus.color"), ";\n}\n\n.p-datatable-filter-constraint-selected:focus-visible {\n outline: 0 none;\n background: ").concat(dt("datatable.filter.constraint.selected.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.selected.focus.color"), ";\n}\n\n.p-datatable-filter-constraint-separator {\n border-block-start: 1px solid ").concat(dt("datatable.filter.constraint.separator.border.color"), ";\n}\n\n.p-datatable-popover-filter {\n display: inline-flex;\n margin-inline-start: auto;\n}\n\n.p-datatable-filter-overlay-popover {\n background: ").concat(dt("datatable.filter.overlay.popover.background"), ";\n color: ").concat(dt("datatable.filter.overlay.popover.color"), ";\n border: 1px solid ").concat(dt("datatable.filter.overlay.popover.border.color"), ";\n border-radius: ").concat(dt("datatable.filter.overlay.popover.border.radius"), ";\n box-shadow: ").concat(dt("datatable.filter.overlay.popover.shadow"), ";\n min-width: 12.5rem;\n padding: ").concat(dt("datatable.filter.overlay.popover.padding"), ";\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-operator-dropdown {\n width: 100%;\n}\n\n.p-datatable-filter-rule-list,\n.p-datatable-filter-rule {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-rule {\n border-block-end: 1px solid ").concat(dt("datatable.filter.rule.border.color"), ";\n padding-bottom: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-rule:last-child {\n border-block-end: 0 none;\n padding-bottom: 0;\n}\n\n.p-datatable-filter-add-rule-button {\n width: 100%;\n}\n\n.p-datatable-filter-remove-rule-button {\n width: 100%;\n}\n\n.p-datatable-filter-buttonbar {\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.p-datatable-virtualscroller-spacer {\n display: flex;\n}\n\n.p-datatable .p-virtualscroller .p-virtualscroller-loading {\n transform: none !important;\n min-height: 0;\n position: sticky;\n inset-block-start: 0;\n inset-inline-start: 0;\n}\n\n.p-datatable-paginator-top {\n border-color: ").concat(dt("datatable.paginator.top.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.paginator.top.border.width"), ";\n}\n\n.p-datatable-paginator-bottom {\n border-color: ").concat(dt("datatable.paginator.bottom.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.paginator.bottom.border.width"), ";\n}\n\n.p-datatable-header {\n background: ").concat(dt("datatable.header.background"), ";\n color: ").concat(dt("datatable.header.color"), ";\n border-color: ").concat(dt("datatable.header.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.header.border.width"), ";\n padding: ").concat(dt("datatable.header.padding"), ";\n}\n\n.p-datatable-footer {\n background: ").concat(dt("datatable.footer.background"), ";\n color: ").concat(dt("datatable.footer.color"), ";\n border-color: ").concat(dt("datatable.footer.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.footer.border.width"), ";\n padding: ").concat(dt("datatable.footer.padding"), ";\n}\n\n.p-datatable-header-cell {\n padding: ").concat(dt("datatable.header.cell.padding"), ";\n background: ").concat(dt("datatable.header.cell.background"), ";\n border-color: ").concat(dt("datatable.header.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("datatable.header.cell.color"), ";\n font-weight: normal;\n text-align: start;\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-column-title {\n font-weight: ").concat(dt("datatable.column.title.font.weight"), ";\n}\n\n.p-datatable-tbody > tr {\n outline-color: transparent;\n background: ").concat(dt("datatable.row.background"), ";\n color: ").concat(dt("datatable.row.color"), ";\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-tbody > tr > td {\n text-align: start;\n border-color: ").concat(dt("datatable.body.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n padding: ").concat(dt("datatable.body.cell.padding"), ";\n}\n\n.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {\n background: ").concat(dt("datatable.row.hover.background"), ";\n color: ").concat(dt("datatable.row.hover.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected {\n background: ").concat(dt("datatable.row.selected.background"), ";\n color: ").concat(dt("datatable.row.selected.color"), ";\n}\n\n.p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td {\n border-block-end-color: ").concat(dt("datatable.body.cell.selected.border.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected > td {\n border-block-end-color: ").concat(dt("datatable.body.cell.selected.border.color"), ";\n}\n\n.p-datatable-tbody > tr:focus-visible,\n.p-datatable-tbody > tr.p-datatable-contextmenu-row-selected {\n box-shadow: ").concat(dt("datatable.row.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.row.focus.ring.width"), " ").concat(dt("datatable.row.focus.ring.style"), " ").concat(dt("datatable.row.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.row.focus.ring.offset"), ";\n}\n\n.p-datatable-tfoot > tr > td {\n text-align: start;\n padding: ").concat(dt("datatable.footer.cell.padding"), ";\n border-color: ").concat(dt("datatable.footer.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("datatable.footer.cell.color"), ";\n background: ").concat(dt("datatable.footer.cell.background"), ";\n}\n\n.p-datatable-column-footer {\n font-weight: ").concat(dt("datatable.column.footer.font.weight"), ";\n}\n\n.p-datatable-sortable-column {\n cursor: pointer;\n user-select: none;\n outline-color: transparent;\n}\n\n.p-datatable-column-title,\n.p-datatable-sort-icon,\n.p-datatable-sort-badge {\n vertical-align: middle;\n}\n\n.p-datatable-sort-icon {\n color: ").concat(dt("datatable.sort.icon.color"), ";\n font-size: ").concat(dt("datatable.sort.icon.size"), ";\n width: ").concat(dt("datatable.sort.icon.size"), ";\n height: ").concat(dt("datatable.sort.icon.size"), ";\n transition: color ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover {\n background: ").concat(dt("datatable.header.cell.hover.background"), ";\n color: ").concat(dt("datatable.header.cell.hover.color"), ";\n}\n\n.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sort-icon {\n color: ").concat(dt("datatable.sort.icon.hover.color"), ";\n}\n\n.p-datatable-column-sorted {\n background: ").concat(dt("datatable.header.cell.selected.background"), ";\n color: ").concat(dt("datatable.header.cell.selected.color"), ";\n}\n\n.p-datatable-column-sorted .p-datatable-sort-icon {\n color: ").concat(dt("datatable.header.cell.selected.color"), ";\n}\n\n.p-datatable-sortable-column:focus-visible {\n box-shadow: ").concat(dt("datatable.header.cell.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.header.cell.focus.ring.width"), " ").concat(dt("datatable.header.cell.focus.ring.style"), " ").concat(dt("datatable.header.cell.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.header.cell.focus.ring.offset"), ";\n}\n\n.p-datatable-hoverable .p-datatable-selectable-row {\n cursor: pointer;\n}\n\n.p-datatable-tbody > tr.p-datatable-dragpoint-top > td {\n box-shadow: inset 0 2px 0 0 ").concat(dt("datatable.drop.point.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-dragpoint-bottom > td {\n box-shadow: inset 0 -2px 0 0 ").concat(dt("datatable.drop.point.color"), ";\n}\n\n.p-datatable-loading-icon {\n font-size: ").concat(dt("datatable.loading.icon.size"), ";\n width: ").concat(dt("datatable.loading.icon.size"), ";\n height: ").concat(dt("datatable.loading.icon.size"), ";\n}\n\n.p-datatable-gridlines .p-datatable-header {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-footer {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-paginator-top {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-paginator-bottom {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-thead > tr > th {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-thead > tr > th:last-child {\n border-width: 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr > td {\n border-width: 1px 0 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr:last-child > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child {\n border-width: 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tfoot > tr > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {\n border-width: 1px 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td {\n border-width: 0 0 0 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {\n border-width: 0 1px 0 1px;\n}\n\n.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd {\n background: ").concat(dt("datatable.row.striped.background"), ";\n}\n\n.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd.p-datatable-row-selected {\n background: ").concat(dt("datatable.row.selected.background"), ";\n color: ").concat(dt("datatable.row.selected.color"), ";\n}\n\n.p-datatable-striped.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {\n background: ").concat(dt("datatable.row.hover.background"), ";\n color: ").concat(dt("datatable.row.hover.color"), ";\n}\n\n.p-datatable.p-datatable-sm .p-datatable-header {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-thead > tr > th {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-tbody > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-tfoot > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-footer {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-header {\n padding: 1rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-thead > tr > th {\n padding: 1rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-tbody > tr > td {\n padding: 1rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-tfoot > tr > td {\n padding: 1rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-footer {\n padding: 1rem 1.25rem;\n}\n\n.p-datatable-row-toggle-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("datatable.row.toggle.button.size"), ";\n height: ").concat(dt("datatable.row.toggle.button.size"), ";\n color: ").concat(dt("datatable.row.toggle.button.color"), ";\n border: 0 none;\n background: transparent;\n cursor: pointer;\n border-radius: ").concat(dt("datatable.row.toggle.button.border.radius"), ";\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n outline-color: transparent;\n user-select: none;\n}\n\n.p-datatable-row-toggle-button:enabled:hover {\n color: ").concat(dt("datatable.row.toggle.button.hover.color"), ";\n background: ").concat(dt("datatable.row.toggle.button.hover.background"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected .p-datatable-row-toggle-button:hover {\n background: ").concat(dt("datatable.row.toggle.button.selected.hover.background"), ";\n color: ").concat(dt("datatable.row.toggle.button.selected.hover.color"), ";\n}\n\n.p-datatable-row-toggle-button:focus-visible {\n box-shadow: ").concat(dt("datatable.row.toggle.button.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.row.toggle.button.focus.ring.width"), " ").concat(dt("datatable.row.toggle.button.focus.ring.style"), " ").concat(dt("datatable.row.toggle.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.row.toggle.button.focus.ring.offset"), ";\n}\n\n.p-datatable-row-toggle-icon:dir(rtl) {\n transform: rotate(180deg);\n}\n"); }, "theme"); var classes$1 = { root: /* @__PURE__ */ __name(function root(_ref2) { @@ -1465,11 +1445,6 @@ var script$k = { name: "PencilIcon", "extends": script$t }; -var _hoisted_1$c = /* @__PURE__ */ createBaseVNode("path", { - d: "M0.609628 13.959C0.530658 13.9599 0.452305 13.9451 0.379077 13.9156C0.305849 13.8861 0.239191 13.8424 0.18294 13.787C0.118447 13.7234 0.0688234 13.6464 0.0376166 13.5614C0.00640987 13.4765 -0.00560954 13.3857 0.00241768 13.2956L0.25679 10.1501C0.267698 10.0041 0.331934 9.86709 0.437312 9.76516L9.51265 0.705715C10.0183 0.233014 10.6911 -0.0203041 11.3835 0.00127367C12.0714 0.00660201 12.7315 0.27311 13.2298 0.746671C13.7076 1.23651 13.9824 1.88848 13.9992 2.57201C14.0159 3.25554 13.7733 3.92015 13.32 4.4327L4.23648 13.5331C4.13482 13.6342 4.0017 13.6978 3.85903 13.7133L0.667067 14L0.609628 13.959ZM1.43018 10.4696L1.25787 12.714L3.50619 12.5092L12.4502 3.56444C12.6246 3.35841 12.7361 3.10674 12.7714 2.83933C12.8067 2.57193 12.7644 2.30002 12.6495 2.05591C12.5346 1.8118 12.3519 1.60575 12.1231 1.46224C11.8943 1.31873 11.6291 1.2438 11.3589 1.24633C11.1813 1.23508 11.0033 1.25975 10.8355 1.31887C10.6677 1.37798 10.5136 1.47033 10.3824 1.59036L1.43018 10.4696Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$a = [_hoisted_1$c]; function render$j(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1477,13 +1452,16 @@ function render$j(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$a, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M0.609628 13.959C0.530658 13.9599 0.452305 13.9451 0.379077 13.9156C0.305849 13.8861 0.239191 13.8424 0.18294 13.787C0.118447 13.7234 0.0688234 13.6464 0.0376166 13.5614C0.00640987 13.4765 -0.00560954 13.3857 0.00241768 13.2956L0.25679 10.1501C0.267698 10.0041 0.331934 9.86709 0.437312 9.76516L9.51265 0.705715C10.0183 0.233014 10.6911 -0.0203041 11.3835 0.00127367C12.0714 0.00660201 12.7315 0.27311 13.2298 0.746671C13.7076 1.23651 13.9824 1.88848 13.9992 2.57201C14.0159 3.25554 13.7733 3.92015 13.32 4.4327L4.23648 13.5331C4.13482 13.6342 4.0017 13.6978 3.85903 13.7133L0.667067 14L0.609628 13.959ZM1.43018 10.4696L1.25787 12.714L3.50619 12.5092L12.4502 3.56444C12.6246 3.35841 12.7361 3.10674 12.7714 2.83933C12.8067 2.57193 12.7644 2.30002 12.6495 2.05591C12.5346 1.8118 12.3519 1.60575 12.1231 1.46224C11.8943 1.31873 11.6291 1.2438 11.3589 1.24633C11.1813 1.23508 11.0033 1.25975 10.8355 1.31887C10.6677 1.37798 10.5136 1.47033 10.3824 1.59036L1.43018 10.4696Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$j, "render$j"); script$k.render = render$j; var theme3 = /* @__PURE__ */ __name(function theme4(_ref) { var dt = _ref.dt; - return "\n.p-radiobutton {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n width: ".concat(dt("radiobutton.width"), ";\n height: ").concat(dt("radiobutton.height"), ";\n}\n\n.p-radiobutton-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border: 1px solid transparent;\n border-radius: 50%;\n}\n\n.p-radiobutton-box {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n border: 1px solid ").concat(dt("radiobutton.border.color"), ";\n background: ").concat(dt("radiobutton.background"), ";\n width: ").concat(dt("radiobutton.width"), ";\n height: ").concat(dt("radiobutton.height"), ";\n transition: background ").concat(dt("radiobutton.transition.duration"), ", color ").concat(dt("radiobutton.transition.duration"), ", border-color ").concat(dt("radiobutton.transition.duration"), ", box-shadow ").concat(dt("radiobutton.transition.duration"), ", outline-color ").concat(dt("radiobutton.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("radiobutton.shadow"), ";\n}\n\n.p-radiobutton-icon {\n transition-duration: ").concat(dt("radiobutton.transition.duration"), ";\n background: transparent;\n font-size: ").concat(dt("radiobutton.icon.size"), ";\n width: ").concat(dt("radiobutton.icon.size"), ";\n height: ").concat(dt("radiobutton.icon.size"), ";\n border-radius: 50%;\n backface-visibility: hidden;\n transform: translateZ(0) scale(0.1);\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.hover.border.color"), ";\n}\n\n.p-radiobutton-checked .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.border.color"), ";\n background: ").concat(dt("radiobutton.checked.background"), ";\n}\n\n.p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.checked.color"), ";\n transform: translateZ(0) scale(1, 1);\n visibility: visible;\n}\n\n.p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.hover.border.color"), ";\n background: ").concat(dt("radiobutton.checked.hover.background"), ";\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.checked.hover.color"), ";\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.focus.border.color"), ";\n box-shadow: ").concat(dt("radiobutton.focus.ring.shadow"), ";\n outline: ").concat(dt("radiobutton.focus.ring.width"), " ").concat(dt("radiobutton.focus.ring.style"), " ").concat(dt("radiobutton.focus.ring.color"), ";\n outline-offset: ").concat(dt("radiobutton.focus.ring.offset"), ";\n}\n\n.p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.focus.border.color"), ";\n}\n\n.p-radiobutton.p-invalid > .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.invalid.border.color"), ";\n}\n\n.p-radiobutton.p-variant-filled .p-radiobutton-box {\n background: ").concat(dt("radiobutton.filled.background"), ";\n}\n\n.p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {\n background: ").concat(dt("radiobutton.checked.background"), ";\n}\n\n.p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {\n background: ").concat(dt("radiobutton.checked.hover.background"), ";\n}\n\n.p-radiobutton.p-disabled {\n opacity: 1;\n}\n\n.p-radiobutton.p-disabled .p-radiobutton-box {\n background: ").concat(dt("radiobutton.disabled.background"), ";\n border-color: ").concat(dt("radiobutton.checked.disabled.border.color"), ";\n}\n\n.p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.disabled.color"), ";\n}\n"); + return "\n.p-radiobutton {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n width: ".concat(dt("radiobutton.width"), ";\n height: ").concat(dt("radiobutton.height"), ";\n}\n\n.p-radiobutton-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border: 1px solid transparent;\n border-radius: 50%;\n}\n\n.p-radiobutton-box {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n border: 1px solid ").concat(dt("radiobutton.border.color"), ";\n background: ").concat(dt("radiobutton.background"), ";\n width: ").concat(dt("radiobutton.width"), ";\n height: ").concat(dt("radiobutton.height"), ";\n transition: background ").concat(dt("radiobutton.transition.duration"), ", color ").concat(dt("radiobutton.transition.duration"), ", border-color ").concat(dt("radiobutton.transition.duration"), ", box-shadow ").concat(dt("radiobutton.transition.duration"), ", outline-color ").concat(dt("radiobutton.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("radiobutton.shadow"), ";\n}\n\n.p-radiobutton-icon {\n transition-duration: ").concat(dt("radiobutton.transition.duration"), ";\n background: transparent;\n font-size: ").concat(dt("radiobutton.icon.size"), ";\n width: ").concat(dt("radiobutton.icon.size"), ";\n height: ").concat(dt("radiobutton.icon.size"), ";\n border-radius: 50%;\n backface-visibility: hidden;\n transform: translateZ(0) scale(0.1);\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.hover.border.color"), ";\n}\n\n.p-radiobutton-checked .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.border.color"), ";\n background: ").concat(dt("radiobutton.checked.background"), ";\n}\n\n.p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.checked.color"), ";\n transform: translateZ(0) scale(1, 1);\n visibility: visible;\n}\n\n.p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.hover.border.color"), ";\n background: ").concat(dt("radiobutton.checked.hover.background"), ";\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.checked.hover.color"), ";\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.focus.border.color"), ";\n box-shadow: ").concat(dt("radiobutton.focus.ring.shadow"), ";\n outline: ").concat(dt("radiobutton.focus.ring.width"), " ").concat(dt("radiobutton.focus.ring.style"), " ").concat(dt("radiobutton.focus.ring.color"), ";\n outline-offset: ").concat(dt("radiobutton.focus.ring.offset"), ";\n}\n\n.p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.focus.border.color"), ";\n}\n\n.p-radiobutton.p-invalid > .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.invalid.border.color"), ";\n}\n\n.p-radiobutton.p-variant-filled .p-radiobutton-box {\n background: ").concat(dt("radiobutton.filled.background"), ";\n}\n\n.p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {\n background: ").concat(dt("radiobutton.checked.background"), ";\n}\n\n.p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {\n background: ").concat(dt("radiobutton.checked.hover.background"), ";\n}\n\n.p-radiobutton.p-disabled {\n opacity: 1;\n}\n\n.p-radiobutton.p-disabled .p-radiobutton-box {\n background: ").concat(dt("radiobutton.disabled.background"), ";\n border-color: ").concat(dt("radiobutton.checked.disabled.border.color"), ";\n}\n\n.p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.disabled.color"), ";\n}\n\n.p-radiobutton-sm,\n.p-radiobutton-sm .p-radiobutton-box {\n width: ").concat(dt("radiobutton.sm.width"), ";\n height: ").concat(dt("radiobutton.sm.height"), ";\n}\n\n.p-radiobutton-sm .p-radiobutton-icon {\n font-size: ").concat(dt("radiobutton.icon.sm.size"), ";\n width: ").concat(dt("radiobutton.icon.sm.size"), ";\n height: ").concat(dt("radiobutton.icon.sm.size"), ";\n}\n\n.p-radiobutton-lg,\n.p-radiobutton-lg .p-radiobutton-box {\n width: ").concat(dt("radiobutton.lg.width"), ";\n height: ").concat(dt("radiobutton.lg.height"), ";\n}\n\n.p-radiobutton-lg .p-radiobutton-icon {\n font-size: ").concat(dt("radiobutton.icon.lg.size"), ";\n width: ").concat(dt("radiobutton.icon.lg.size"), ";\n height: ").concat(dt("radiobutton.icon.lg.size"), ";\n}\n"); }, "theme"); var classes = { root: /* @__PURE__ */ __name(function root2(_ref2) { @@ -1491,8 +1469,10 @@ var classes = { return ["p-radiobutton p-component", { "p-radiobutton-checked": instance.checked, "p-disabled": props.disabled, - "p-invalid": props.invalid, - "p-variant-filled": props.variant ? props.variant === "filled" : instance.$primevue.config.inputStyle === "filled" || instance.$primevue.config.inputVariant === "filled" + "p-invalid": instance.$pcRadioButtonGroup ? instance.$pcRadioButtonGroup.$invalid : instance.$invalid, + "p-variant-filled": instance.$variant === "filled", + "p-radiobutton-sm p-inputfield-sm": props.size === "small", + "p-radiobutton-lg p-inputfield-lg": props.size === "large" }]; }, "root"), box: "p-radiobutton-box", @@ -1506,27 +1486,10 @@ var RadioButtonStyle = BaseStyle.extend({ }); var script$1$1 = { name: "BaseRadioButton", - "extends": script$s, + "extends": script$x, props: { value: null, - modelValue: null, binary: Boolean, - name: { - type: String, - "default": null - }, - variant: { - type: String, - "default": null - }, - invalid: { - type: Boolean, - "default": false - }, - disabled: { - type: Boolean, - "default": false - }, readonly: { type: Boolean, "default": false @@ -1568,7 +1531,12 @@ var script$j = { name: "RadioButton", "extends": script$1$1, inheritAttrs: false, - emits: ["update:modelValue", "change", "focus", "blur"], + emits: ["change", "focus", "blur"], + inject: { + $pcRadioButtonGroup: { + "default": void 0 + } + }, methods: { getPTOptions: /* @__PURE__ */ __name(function getPTOptions6(key) { var _ptm = key === "root" ? this.ptmi : this.ptm; @@ -1582,7 +1550,7 @@ var script$j = { onChange: /* @__PURE__ */ __name(function onChange4(event2) { if (!this.disabled && !this.readonly) { var newModelValue = this.binary ? !this.checked : this.value; - this.$emit("update:modelValue", newModelValue); + this.$pcRadioButtonGroup ? this.$pcRadioButtonGroup.writeValue(newModelValue, event2) : this.writeValue(newModelValue, event2); this.$emit("change", event2); } }, "onChange"), @@ -1590,17 +1558,23 @@ var script$j = { this.$emit("focus", event2); }, "onFocus"), onBlur: /* @__PURE__ */ __name(function onBlur(event2) { + var _this$formField$onBlu, _this$formField; this.$emit("blur", event2); + (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField, event2); }, "onBlur") }, computed: { + groupName: /* @__PURE__ */ __name(function groupName() { + return this.$pcRadioButtonGroup ? this.$pcRadioButtonGroup.groupName : this.$formName; + }, "groupName"), checked: /* @__PURE__ */ __name(function checked() { - return this.modelValue != null && (this.binary ? !!this.modelValue : equals(this.modelValue, this.value)); + var value = this.$pcRadioButtonGroup ? this.$pcRadioButtonGroup.d_value : this.d_value; + return value != null && (this.binary ? !!value : equals(value, this.value)); }, "checked") } }; -var _hoisted_1$b = ["data-p-checked", "data-p-disabled"]; -var _hoisted_2$9 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "aria-labelledby", "aria-label", "aria-invalid"]; +var _hoisted_1$5 = ["data-p-checked", "data-p-disabled"]; +var _hoisted_2$3 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "aria-labelledby", "aria-label", "aria-invalid"]; function render$i(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root") @@ -1613,7 +1587,7 @@ function render$i(_ctx, _cache, $props, $setup, $data, $options) { "class": [_ctx.cx("input"), _ctx.inputClass], style: _ctx.inputStyle, value: _ctx.value, - name: _ctx.name, + name: $options.groupName, checked: $options.checked, tabindex: _ctx.tabindex, disabled: _ctx.disabled, @@ -1630,11 +1604,11 @@ function render$i(_ctx, _cache, $props, $setup, $data, $options) { onChange: _cache[2] || (_cache[2] = function() { return $options.onChange && $options.onChange.apply($options, arguments); }) - }, $options.getPTOptions("input")), null, 16, _hoisted_2$9), createBaseVNode("div", mergeProps({ + }, $options.getPTOptions("input")), null, 16, _hoisted_2$3), createBaseVNode("div", mergeProps({ "class": _ctx.cx("box") }, $options.getPTOptions("box")), [createBaseVNode("div", mergeProps({ "class": _ctx.cx("icon") - }, $options.getPTOptions("icon")), null, 16)], 16)], 16, _hoisted_1$b); + }, $options.getPTOptions("icon")), null, 16)], 16)], 16, _hoisted_1$5); } __name(render$i, "render$i"); script$j.render = render$i; @@ -1642,11 +1616,6 @@ var script$i = { name: "FilterIcon", "extends": script$t }; -var _hoisted_1$a = /* @__PURE__ */ createBaseVNode("path", { - d: "M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$8 = [_hoisted_1$a]; function render$h(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1654,7 +1623,10 @@ function render$h(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$8, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$h, "render$h"); script$i.render = render$h; @@ -1662,13 +1634,6 @@ var script$h = { name: "FilterSlashIcon", "extends": script$t }; -var _hoisted_1$9 = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$7 = [_hoisted_1$9]; function render$g(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1676,7 +1641,12 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$7, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$g, "render$g"); script$h.render = render$g; @@ -1684,13 +1654,6 @@ var script$g = { name: "TrashIcon", "extends": script$t }; -var _hoisted_1$8 = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$6 = [_hoisted_1$8]; function render$f(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1698,7 +1661,12 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$6, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$f, "render$f"); script$g.render = render$f; @@ -1706,23 +1674,6 @@ var script$f = { name: "SortAltIcon", "extends": script$t }; -var _hoisted_1$7 = /* @__PURE__ */ createBaseVNode("path", { - d: "M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$5 = /* @__PURE__ */ createBaseVNode("path", { - d: "M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_3$1 = /* @__PURE__ */ createBaseVNode("path", { - d: "M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_4$1 = /* @__PURE__ */ createBaseVNode("path", { - d: "M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_5$1 = [_hoisted_1$7, _hoisted_2$5, _hoisted_3$1, _hoisted_4$1]; function render$e(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1730,7 +1681,19 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_5$1, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z", + fill: "currentColor" + }, null, -1), createBaseVNode("path", { + d: "M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z", + fill: "currentColor" + }, null, -1), createBaseVNode("path", { + d: "M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z", + fill: "currentColor" + }, null, -1), createBaseVNode("path", { + d: "M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$e, "render$e"); script$f.render = render$e; @@ -1738,11 +1701,6 @@ var script$e = { name: "SortAmountDownIcon", "extends": script$t }; -var _hoisted_1$6 = /* @__PURE__ */ createBaseVNode("path", { - d: "M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$4 = [_hoisted_1$6]; function render$d(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1750,7 +1708,10 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$4, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$d, "render$d"); script$e.render = render$d; @@ -1758,11 +1719,6 @@ var script$d = { name: "SortAmountUpAltIcon", "extends": script$t }; -var _hoisted_1$5 = /* @__PURE__ */ createBaseVNode("path", { - d: "M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$3 = [_hoisted_1$5]; function render$c(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ width: "14", @@ -1770,7 +1726,10 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) { viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$3, 16); + }, _ctx.pti()), _cache[0] || (_cache[0] = [createBaseVNode("path", { + d: "M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z", + fill: "currentColor" + }, null, -1)]), 16); } __name(render$c, "render$c"); script$d.render = render$c; @@ -2010,6 +1969,10 @@ var script$c = { type: String, "default": "960px" }, + showHeaders: { + type: Boolean, + "default": true + }, showGridlines: { type: Boolean, "default": false @@ -2166,8 +2129,8 @@ var script$b = { }, "checkboxAriaLabel") }, components: { - CheckIcon: script$x, - Checkbox: script$y + CheckIcon: script$y, + Checkbox: script$z } }; function render$b(_ctx, _cache, $props, $setup, $data, $options) { @@ -2649,19 +2612,19 @@ var script$9 = { if (this.columnProp("frozen")) { var align = this.columnProp("alignFrozen"); if (align === "right") { - var right = 0; + var pos = 0; var next2 = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); if (next2) { - right = getOuterWidth(next2) + parseFloat(next2.style.right || 0); + pos = getOuterWidth(next2) + parseFloat(next2.style.right || 0); } - this.styleObject.right = right + "px"; + this.styleObject.insetInlineEnd = pos + "px"; } else { - var left = 0; + var _pos = 0; var prev2 = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); if (prev2) { - left = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); + _pos = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); } - this.styleObject.left = left + "px"; + this.styleObject.insetInlineStart = _pos + "px"; } } }, "updateStickyPosition"), @@ -2715,13 +2678,13 @@ var script$9 = { components: { DTRadioButton: script$a, DTCheckbox: script$b, - Button: script$z, - ChevronDownIcon: script$A, - ChevronRightIcon: script$B, - BarsIcon: script$C, + Button: script$A, + ChevronDownIcon: script$B, + ChevronRightIcon: script$C, + BarsIcon: script$D, PencilIcon: script$k, - CheckIcon: script$x, - TimesIcon: script$D + CheckIcon: script$y, + TimesIcon: script$E }, directives: { ripple: Ripple @@ -3548,8 +3511,8 @@ var script$8 = { }, components: { DTBodyCell: script$9, - ChevronDownIcon: script$A, - ChevronRightIcon: script$B + ChevronDownIcon: script$B, + ChevronRightIcon: script$C } }; function _typeof$8(o) { @@ -4078,8 +4041,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) { key: 1, empty: $props.empty, columns: $props.columns, - templates: $props.templates - }, null, 8, ["empty", "columns", "templates"]))], 16); + templates: $props.templates, + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["empty", "columns", "templates", "unstyled", "pt"]))], 16); } __name(render$7, "render$7"); script$7.render = render$7; @@ -4142,19 +4107,19 @@ var script$6 = { if (this.columnProp("frozen")) { var align = this.columnProp("alignFrozen"); if (align === "right") { - var right = 0; + var pos = 0; var next2 = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); if (next2) { - right = getOuterWidth(next2) + parseFloat(next2.style.right || 0); + pos = getOuterWidth(next2) + parseFloat(next2.style.right || 0); } - this.styleObject.right = right + "px"; + this.styleObject.insetInlineEnd = pos + "px"; } else { - var left = 0; + var _pos = 0; var prev2 = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); if (prev2) { - left = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); + _pos = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); } - this.styleObject.left = left + "px"; + this.styleObject.insetInlineStart = _pos + "px"; } } }, "updateStickyPosition") @@ -5098,12 +5063,12 @@ var script$4 = { }, components: { Select: script$u, - Button: script$z, - Portal: script$E, + Button: script$A, + Portal: script$F, FilterSlashIcon: script$h, FilterIcon: script$i, TrashIcon: script$g, - PlusIcon: script$F + PlusIcon: script$G }, directives: { focustrap: FocusTrap @@ -5457,8 +5422,8 @@ var script$3 = { }, "headerCheckboxAriaLabel") }, components: { - CheckIcon: script$x, - Checkbox: script$y + CheckIcon: script$y, + Checkbox: script$z } }; function render$3(_ctx, _cache, $props, $setup, $data, $options) { @@ -5470,6 +5435,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) { disabled: $props.disabled, "aria-label": $options.headerCheckboxAriaLabel, onChange: $options.onChange, + unstyled: _ctx.unstyled, pt: $options.getColumnPT("pcHeaderCheckbox") }, { icon: withCtx(function(slotProps) { @@ -5483,7 +5449,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) { }, $options.getColumnPT("pcHeaderCheckbox")["icon"]), null, 16, ["class"])) : createCommentVNode("", true)]; }), _: 1 - }, 8, ["modelValue", "disabled", "aria-label", "onChange", "pt"]); + }, 8, ["modelValue", "disabled", "aria-label", "onChange", "unstyled", "pt"]); } __name(render$3, "render$3"); script$3.render = render$3; @@ -5678,19 +5644,19 @@ var script$2 = { if (this.columnProp("frozen")) { var align = this.columnProp("alignFrozen"); if (align === "right") { - var right = 0; + var pos = 0; var next2 = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); if (next2) { - right = getOuterWidth(next2) + parseFloat(next2.style.right || 0); + pos = getOuterWidth(next2) + parseFloat(next2.style.right || 0); } - this.styleObject.right = right + "px"; + this.styleObject.insetInlineEnd = pos + "px"; } else { - var left = 0; + var _pos = 0; var prev2 = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); if (prev2) { - left = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); + _pos = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); } - this.styleObject.left = left + "px"; + this.styleObject.insetInlineStart = _pos + "px"; } var filterRow = this.$el.parentElement.nextElementSibling; if (filterRow) { @@ -5752,7 +5718,7 @@ var script$2 = { }, "ariaSort") }, components: { - Badge: script$G, + Badge: script$H, DTHeaderCheckbox: script$3, DTColumnFilter: script$4, SortAltIcon: script$f, @@ -6205,9 +6171,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { role: "rowgroup" }, $props.columnGroup ? _objectSpread$2(_objectSpread$2({}, _ctx.ptm("thead", $options.ptmTHeadOptions)), $options.getColumnGroupPT("root")) : _ctx.ptm("thead", $options.ptmTHeadOptions), { "data-pc-section": "thead" - }), [!$props.columnGroup ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [createBaseVNode("tr", mergeProps({ + }), [!$props.columnGroup ? (openBlock(), createElementBlock("tr", mergeProps({ + key: 0, role: "row" }, _ctx.ptm("headerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { return openBlock(), createElementBlock(Fragment, { @@ -6280,8 +6245,66 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { unstyled: _ctx.unstyled, pt: _ctx.pt }, null, 8, ["column", "index", "groupRowsBy", "groupRowSortField", "reorderableColumns", "resizableColumns", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore", "filterInputProps", "filterButtonProps", "first", "unstyled", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16), $props.filterDisplay === "row" ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 0, + }), 128))], 16)) : (openBlock(true), createElementBlock(Fragment, { + key: 1 + }, renderList($options.getHeaderRows(), function(row2, i) { + return openBlock(), createElementBlock("tr", mergeProps({ + key: i, + role: "row", + ref_for: true + }, _objectSpread$2(_objectSpread$2({}, _ctx.ptm("headerRow")), $options.getRowPT(row2, "root", i))), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.getHeaderColumns(row2), function(col, j) { + return openBlock(), createElementBlock(Fragment, { + key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || j + }, [!$options.columnProp(col, "hidden") && ($props.rowGroupMode !== "subheader" || $props.groupRowsBy !== $options.columnProp(col, "field")) && typeof col.children !== "string" ? (openBlock(), createBlock(_component_DTHeaderCell, { + key: 0, + column: col, + onColumnClick: _cache[15] || (_cache[15] = function($event) { + return _ctx.$emit("column-click", $event); + }), + onColumnMousedown: _cache[16] || (_cache[16] = function($event) { + return _ctx.$emit("column-mousedown", $event); + }), + groupRowsBy: $props.groupRowsBy, + groupRowSortField: $props.groupRowSortField, + sortMode: $props.sortMode, + sortField: $props.sortField, + sortOrder: $props.sortOrder, + multiSortMeta: $props.multiSortMeta, + allRowsSelected: $props.allRowsSelected, + empty: $props.empty, + onCheckboxChange: _cache[17] || (_cache[17] = function($event) { + return _ctx.$emit("checkbox-change", $event); + }), + filters: $props.filters, + filterDisplay: $props.filterDisplay, + filtersStore: $props.filtersStore, + onFilterChange: _cache[18] || (_cache[18] = function($event) { + return _ctx.$emit("filter-change", $event); + }), + onFilterApply: _cache[19] || (_cache[19] = function($event) { + return _ctx.$emit("filter-apply"); + }), + onOperatorChange: _cache[20] || (_cache[20] = function($event) { + return _ctx.$emit("operator-change", $event); + }), + onMatchmodeChange: _cache[21] || (_cache[21] = function($event) { + return _ctx.$emit("matchmode-change", $event); + }), + onConstraintAdd: _cache[22] || (_cache[22] = function($event) { + return _ctx.$emit("constraint-add", $event); + }), + onConstraintRemove: _cache[23] || (_cache[23] = function($event) { + return _ctx.$emit("constraint-remove", $event); + }), + onApplyClick: _cache[24] || (_cache[24] = function($event) { + return _ctx.$emit("apply-click", $event); + }), + unstyled: _ctx.unstyled, + pt: _ctx.pt + }, null, 8, ["column", "groupRowsBy", "groupRowSortField", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore", "unstyled", "pt"])) : createCommentVNode("", true)], 64); + }), 128))], 16); + }), 128)), $props.filterDisplay === "row" ? (openBlock(), createElementBlock("tr", mergeProps({ + key: 2, role: "row" }, _ctx.ptm("headerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { return openBlock(), createElementBlock(Fragment, { @@ -6295,7 +6318,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { key: 0, checked: $props.allRowsSelected, disabled: $props.empty, - onChange: _cache[15] || (_cache[15] = function($event) { + onChange: _cache[25] || (_cache[25] = function($event) { return _ctx.$emit("checkbox-change", $event); }), column: col, @@ -6320,10 +6343,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { filtersStore: $props.filtersStore, filterInputProps: $props.filterInputProps, filterButtonProps: $props.filterButtonProps, - onFilterChange: _cache[16] || (_cache[16] = function($event) { + onFilterChange: _cache[26] || (_cache[26] = function($event) { return _ctx.$emit("filter-change", $event); }), - onFilterApply: _cache[17] || (_cache[17] = function($event) { + onFilterApply: _cache[27] || (_cache[27] = function($event) { return _ctx.$emit("filter-apply"); }), filterMenuStyle: $options.columnProp(col, "filterMenuStyle"), @@ -6335,84 +6358,26 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) { showAddButton: $options.columnProp(col, "showAddButton"), matchModeOptions: $options.columnProp(col, "filterMatchModeOptions"), maxConstraints: $options.columnProp(col, "maxConstraints"), - onOperatorChange: _cache[18] || (_cache[18] = function($event) { + onOperatorChange: _cache[28] || (_cache[28] = function($event) { return _ctx.$emit("operator-change", $event); }), - onMatchmodeChange: _cache[19] || (_cache[19] = function($event) { + onMatchmodeChange: _cache[29] || (_cache[29] = function($event) { return _ctx.$emit("matchmode-change", $event); }), - onConstraintAdd: _cache[20] || (_cache[20] = function($event) { + onConstraintAdd: _cache[30] || (_cache[30] = function($event) { return _ctx.$emit("constraint-add", $event); }), - onConstraintRemove: _cache[21] || (_cache[21] = function($event) { + onConstraintRemove: _cache[31] || (_cache[31] = function($event) { return _ctx.$emit("constraint-remove", $event); }), - onApplyClick: _cache[22] || (_cache[22] = function($event) { + onApplyClick: _cache[32] || (_cache[32] = function($event) { return _ctx.$emit("apply-click", $event); }), column: col, unstyled: _ctx.unstyled, pt: _ctx.pt }, null, 8, ["field", "type", "showMenu", "filterElement", "filterHeaderTemplate", "filterFooterTemplate", "filterClearTemplate", "filterApplyTemplate", "filterIconTemplate", "filterAddIconTemplate", "filterRemoveIconTemplate", "filterClearIconTemplate", "filters", "filtersStore", "filterInputProps", "filterButtonProps", "filterMenuStyle", "filterMenuClass", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "matchModeOptions", "maxConstraints", "column", "unstyled", "pt"])) : createCommentVNode("", true)], 16)) : createCommentVNode("", true)], 64); - }), 128))], 16)) : createCommentVNode("", true)], 64)) : (openBlock(true), createElementBlock(Fragment, { - key: 1 - }, renderList($options.getHeaderRows(), function(row2, i) { - return openBlock(), createElementBlock("tr", mergeProps({ - key: i, - role: "row", - ref_for: true - }, _objectSpread$2(_objectSpread$2({}, _ctx.ptm("headerRow")), $options.getRowPT(row2, "root", i))), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.getHeaderColumns(row2), function(col, j) { - return openBlock(), createElementBlock(Fragment, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || j - }, [!$options.columnProp(col, "hidden") && ($props.rowGroupMode !== "subheader" || $props.groupRowsBy !== $options.columnProp(col, "field")) && typeof col.children !== "string" ? (openBlock(), createBlock(_component_DTHeaderCell, { - key: 0, - column: col, - onColumnClick: _cache[23] || (_cache[23] = function($event) { - return _ctx.$emit("column-click", $event); - }), - onColumnMousedown: _cache[24] || (_cache[24] = function($event) { - return _ctx.$emit("column-mousedown", $event); - }), - groupRowsBy: $props.groupRowsBy, - groupRowSortField: $props.groupRowSortField, - sortMode: $props.sortMode, - sortField: $props.sortField, - sortOrder: $props.sortOrder, - multiSortMeta: $props.multiSortMeta, - allRowsSelected: $props.allRowsSelected, - empty: $props.empty, - onCheckboxChange: _cache[25] || (_cache[25] = function($event) { - return _ctx.$emit("checkbox-change", $event); - }), - filters: $props.filters, - filterDisplay: $props.filterDisplay, - filtersStore: $props.filtersStore, - onFilterChange: _cache[26] || (_cache[26] = function($event) { - return _ctx.$emit("filter-change", $event); - }), - onFilterApply: _cache[27] || (_cache[27] = function($event) { - return _ctx.$emit("filter-apply"); - }), - onOperatorChange: _cache[28] || (_cache[28] = function($event) { - return _ctx.$emit("operator-change", $event); - }), - onMatchmodeChange: _cache[29] || (_cache[29] = function($event) { - return _ctx.$emit("matchmode-change", $event); - }), - onConstraintAdd: _cache[30] || (_cache[30] = function($event) { - return _ctx.$emit("constraint-add", $event); - }), - onConstraintRemove: _cache[31] || (_cache[31] = function($event) { - return _ctx.$emit("constraint-remove", $event); - }), - onApplyClick: _cache[32] || (_cache[32] = function($event) { - return _ctx.$emit("apply-click", $event); - }), - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["column", "groupRowsBy", "groupRowSortField", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore", "unstyled", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16); - }), 128))], 16); + }), 128))], 16)) : createCommentVNode("", true)], 16); } __name(render$1, "render$1"); script$1.render = render$1; @@ -6677,7 +6642,6 @@ var script = { } }, mounted: /* @__PURE__ */ __name(function mounted8() { - this.$el.setAttribute(this.attributeSelector, ""); if (this.isStateful()) { this.restoreState(); this.resizableColumns && this.restoreColumnWidths(); @@ -7044,11 +7008,11 @@ var script = { } this.rowTouched = false; if (focusedItem) { - var _event$target, _event$target2, _event$target3; - if (((_event$target = event2.target) === null || _event$target === void 0 ? void 0 : _event$target.getAttribute("data-pc-section")) === "rowtoggleicon" || ((_event$target2 = event2.target) === null || _event$target2 === void 0 || (_event$target2 = _event$target2.parentElement) === null || _event$target2 === void 0 ? void 0 : _event$target2.getAttribute("data-pc-section")) === "rowtoggleicon") return; - var targetRow = (_event$target3 = event2.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.closest('tr[data-p-selectable-row="true"]'); + var _event$target, _event$currentTarget; + if (((_event$target = event2.target) === null || _event$target === void 0 ? void 0 : _event$target.getAttribute("data-pc-section")) === "rowtoggleicon") return; + var targetRow = (_event$currentTarget = event2.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.closest('tr[data-p-selectable-row="true"]'); focusedItem.tabIndex = "-1"; - targetRow.tabIndex = "0"; + if (targetRow) targetRow.tabIndex = "0"; } }, "onRowClick"), onRowDblClick: /* @__PURE__ */ __name(function onRowDblClick2(e) { @@ -7467,7 +7431,7 @@ var script = { this.$refs.resizeHelper.style.display = "block"; }, "onColumnResize"), onColumnResizeEnd: /* @__PURE__ */ __name(function onColumnResizeEnd() { - var delta = this.$refs.resizeHelper.offsetLeft - this.lastResizeHelperX; + var delta = isRTL(this.$el) ? this.lastResizeHelperX - this.$refs.resizeHelper.offsetLeft : this.$refs.resizeHelper.offsetLeft - this.lastResizeHelperX; var columnWidth = this.resizeColumnElement.offsetWidth; var newColumnWidth = columnWidth + delta; var minWidth = this.resizeColumnElement.style.minWidth || 15; @@ -7516,7 +7480,7 @@ var script = { this.destroyStyleElement(); this.createStyleElement(); var innerHTML = ""; - var selector = '[data-pc-name="datatable"]['.concat(this.attributeSelector, '] > [data-pc-section="tablecontainer"] ').concat(this.virtualScrollerDisabled ? "" : '> [data-pc-name="virtualscroller"]', ' > table[data-pc-section="table"]'); + var selector = '[data-pc-name="datatable"]['.concat(this.$attrSelector, '] > [data-pc-section="tablecontainer"] ').concat(this.virtualScrollerDisabled ? "" : '> [data-pc-name="virtualscroller"]', ' > table[data-pc-section="table"]'); widths.forEach(function(width, index) { var colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width; var style = "width: ".concat(colWidth, "px !important; max-width: ").concat(colWidth, "px !important"); @@ -7701,7 +7665,7 @@ var script = { var index = e.index; if (this.rowDragging && this.draggedRowIndex !== index) { var rowElement = event2.currentTarget; - var rowY = getOffset(rowElement).top + getWindowScrollTop(); + var rowY = getOffset(rowElement).top; var pageY = event2.pageY; var rowMidY = rowY + getOuterHeight(rowElement) / 2; var prevRowElement = rowElement.previousElementSibling; @@ -7924,7 +7888,7 @@ var script = { addColumnWidthStyles: /* @__PURE__ */ __name(function addColumnWidthStyles(widths) { this.createStyleElement(); var innerHTML = ""; - var selector = '[data-pc-name="datatable"]['.concat(this.attributeSelector, '] > [data-pc-section="tablecontainer"] ').concat(this.virtualScrollerDisabled ? "" : '> [data-pc-name="virtualscroller"]', ' > table[data-pc-section="table"]'); + var selector = '[data-pc-name="datatable"]['.concat(this.$attrSelector, '] > [data-pc-section="tablecontainer"] ').concat(this.virtualScrollerDisabled ? "" : '> [data-pc-name="virtualscroller"]', ' > table[data-pc-section="table"]'); widths.forEach(function(width, index) { var style = "width: ".concat(width, "px !important; max-width: ").concat(width, "px !important"); innerHTML += "\n ".concat(selector, ' > thead[data-pc-section="thead"] > tr > th:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tbody[data-pc-section="tbody"] > tr > td:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tfoot[data-pc-section="tfoot"] > tr > td:nth-child(').concat(index + 1, ") {\n ").concat(style, "\n }\n "); @@ -8162,9 +8126,6 @@ var script = { }); } }, "allRowsSelected"), - attributeSelector: /* @__PURE__ */ __name(function attributeSelector2() { - return UniqueComponentId(); - }, "attributeSelector"), groupRowSortField: /* @__PURE__ */ __name(function groupRowSortField() { return this.sortMode === "single" ? this.sortField : this.d_groupRowsSortMeta ? this.d_groupRowsSortMeta.field : null; }, "groupRowSortField"), @@ -8232,10 +8193,10 @@ var script = { DTTableHeader: script$1, DTTableBody: script$7, DTTableFooter: script$5, - DTVirtualScroller: script$H, + DTVirtualScroller: script$I, ArrowDownIcon: script$q, ArrowUpIcon: script$p, - SpinnerIcon: script$I + SpinnerIcon: script$J } }; function _typeof(o) { @@ -8340,18 +8301,36 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { pt: _ctx.ptm("pcPaginator") }, createSlots({ _: 2 - }, [_ctx.$slots.paginatorstart ? { + }, [_ctx.$slots.paginatorcontainer ? { + name: "container", + fn: withCtx(function() { + return [renderSlot(_ctx.$slots, "paginatorcontainer", { + first: _ctx.slotProps.first, + last: _ctx.slotProps.last, + rows: _ctx.slotProps.rows, + page: _ctx.slotProps.page, + pageCount: _ctx.slotProps.pageCount, + totalRecords: _ctx.slotProps.totalRecords, + firstPageCallback: _ctx.slotProps.firstPageCallback, + lastPageCallback: _ctx.slotProps.lastPageCallback, + prevPageCallback: _ctx.slotProps.prevPageCallback, + nextPageCallback: _ctx.slotProps.nextPageCallback, + rowChangeCallback: _ctx.slotProps.rowChangeCallback + })]; + }), + key: "0" + } : void 0, _ctx.$slots.paginatorstart ? { name: "start", fn: withCtx(function() { return [renderSlot(_ctx.$slots, "paginatorstart")]; }), - key: "0" + key: "1" } : void 0, _ctx.$slots.paginatorend ? { name: "end", fn: withCtx(function() { return [renderSlot(_ctx.$slots, "paginatorend")]; }), - key: "1" + key: "2" } : void 0, _ctx.$slots.paginatorfirstpagelinkicon ? { name: "firstpagelinkicon", fn: withCtx(function(slotProps) { @@ -8359,7 +8338,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "2" + key: "3" } : void 0, _ctx.$slots.paginatorprevpagelinkicon ? { name: "prevpagelinkicon", fn: withCtx(function(slotProps) { @@ -8367,7 +8346,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "3" + key: "4" } : void 0, _ctx.$slots.paginatornextpagelinkicon ? { name: "nextpagelinkicon", fn: withCtx(function(slotProps) { @@ -8375,7 +8354,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "4" + key: "5" } : void 0, _ctx.$slots.paginatorlastpagelinkicon ? { name: "lastpagelinkicon", fn: withCtx(function(slotProps) { @@ -8383,7 +8362,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "5" + key: "6" } : void 0, _ctx.$slots.paginatorjumptopagedropdownicon ? { name: "jumptopagedropdownicon", fn: withCtx(function(slotProps) { @@ -8391,7 +8370,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "6" + key: "7" } : void 0, _ctx.$slots.paginatorrowsperpagedropdownicon ? { name: "rowsperpagedropdownicon", fn: withCtx(function(slotProps) { @@ -8399,7 +8378,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "7" + key: "8" } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ "class": _ctx.cx("tableContainer"), style: [_ctx.sx("tableContainer"), { @@ -8427,7 +8406,8 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { role: "table", "class": [_ctx.cx("table"), _ctx.tableClass], style: [_ctx.tableStyle, slotProps.spacerStyle] - }, _objectSpread(_objectSpread({}, _ctx.tableProps), _ctx.ptm("table"))), [createVNode(_component_DTTableHeader, { + }, _objectSpread(_objectSpread({}, _ctx.tableProps), _ctx.ptm("table"))), [_ctx.showHeaders ? (openBlock(), createBlock(_component_DTTableHeader, { + key: 0, columnGroup: $options.headerColumnGroup, columns: slotProps.columns, rowGroupMode: _ctx.rowGroupMode, @@ -8475,8 +8455,8 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { }), unstyled: _ctx.unstyled, pt: _ctx.pt - }, null, 8, ["columnGroup", "columns", "rowGroupMode", "groupRowsBy", "groupRowSortField", "reorderableColumns", "resizableColumns", "allRowsSelected", "empty", "sortMode", "sortField", "sortOrder", "multiSortMeta", "filters", "filtersStore", "filterDisplay", "filterButtonProps", "filterInputProps", "first", "onFilterChange", "onFilterApply", "unstyled", "pt"]), _ctx.frozenValue ? (openBlock(), createBlock(_component_DTTableBody, { - key: 0, + }, null, 8, ["columnGroup", "columns", "rowGroupMode", "groupRowsBy", "groupRowSortField", "reorderableColumns", "resizableColumns", "allRowsSelected", "empty", "sortMode", "sortField", "sortOrder", "multiSortMeta", "filters", "filtersStore", "filterDisplay", "filterButtonProps", "filterInputProps", "first", "onFilterChange", "onFilterApply", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.frozenValue ? (openBlock(), createBlock(_component_DTTableBody, { + key: 1, ref: "frozenBodyRef", value: _ctx.frozenValue, frozenRow: true, @@ -8657,7 +8637,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { unstyled: _ctx.unstyled, pt: _ctx.pt }, null, 8, ["value", "class", "columns", "empty", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "editButtonProps", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange", "unstyled", "pt"]), $options.hasSpacerStyle(slotProps.spacerStyle) ? (openBlock(), createElementBlock("tbody", mergeProps({ - key: 1, + key: 2, "class": _ctx.cx("virtualScrollerSpacer"), style: { height: "calc(".concat(slotProps.spacerStyle.height, " - ").concat(slotProps.rows.length * slotProps.itemSize, "px)") @@ -8689,18 +8669,36 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { pt: _ctx.ptm("pcPaginator") }, createSlots({ _: 2 - }, [_ctx.$slots.paginatorstart ? { + }, [_ctx.$slots.paginatorcontainer ? { + name: "container", + fn: withCtx(function(slotProps) { + return [renderSlot(_ctx.$slots, "paginatorcontainer", { + first: slotProps.first, + last: slotProps.last, + rows: slotProps.rows, + page: slotProps.page, + pageCount: slotProps.pageCount, + totalRecords: slotProps.totalRecords, + firstPageCallback: slotProps.firstPageCallback, + lastPageCallback: slotProps.lastPageCallback, + prevPageCallback: slotProps.prevPageCallback, + nextPageCallback: slotProps.nextPageCallback, + rowChangeCallback: slotProps.rowChangeCallback + })]; + }), + key: "0" + } : void 0, _ctx.$slots.paginatorstart ? { name: "start", fn: withCtx(function() { return [renderSlot(_ctx.$slots, "paginatorstart")]; }), - key: "0" + key: "1" } : void 0, _ctx.$slots.paginatorend ? { name: "end", fn: withCtx(function() { return [renderSlot(_ctx.$slots, "paginatorend")]; }), - key: "1" + key: "2" } : void 0, _ctx.$slots.paginatorfirstpagelinkicon ? { name: "firstpagelinkicon", fn: withCtx(function(slotProps) { @@ -8708,7 +8706,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "2" + key: "3" } : void 0, _ctx.$slots.paginatorprevpagelinkicon ? { name: "prevpagelinkicon", fn: withCtx(function(slotProps) { @@ -8716,7 +8714,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "3" + key: "4" } : void 0, _ctx.$slots.paginatornextpagelinkicon ? { name: "nextpagelinkicon", fn: withCtx(function(slotProps) { @@ -8724,7 +8722,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "4" + key: "5" } : void 0, _ctx.$slots.paginatorlastpagelinkicon ? { name: "lastpagelinkicon", fn: withCtx(function(slotProps) { @@ -8732,7 +8730,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "5" + key: "6" } : void 0, _ctx.$slots.paginatorjumptopagedropdownicon ? { name: "jumptopagedropdownicon", fn: withCtx(function(slotProps) { @@ -8740,7 +8738,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "6" + key: "7" } : void 0, _ctx.$slots.paginatorrowsperpagedropdownicon ? { name: "rowsperpagedropdownicon", fn: withCtx(function(slotProps) { @@ -8748,7 +8746,7 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { "class": normalizeClass(slotProps["class"]) })]; }), - key: "7" + key: "8" } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({ key: 4, "class": _ctx.cx("footer") @@ -8779,7 +8777,14 @@ function render2(_ctx, _cache, $props, $setup, $data, $options) { __name(render2, "render"); script.render = render2; export { - script as a, - script$r as s + script$m as a, + script$n as b, + script$o as c, + script$f as d, + script$d as e, + script$e as f, + script$r as g, + script as h, + script$l as s }; -//# sourceMappingURL=index-DpF-ptbJ.js.map +//# sourceMappingURL=index-CdHVC5qq.js.map diff --git a/web/assets/index-QvfM__ze.js b/web/assets/index-CmVtQCAR.js similarity index 90% rename from web/assets/index-QvfM__ze.js rename to web/assets/index-CmVtQCAR.js index dc314376..4d89b4a5 100644 --- a/web/assets/index-QvfM__ze.js +++ b/web/assets/index-CmVtQCAR.js @@ -1,6 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphView-CDDCHVO0.js","./index-Q1cQr26V.js","./keybindingService-Cak1En5n.js","./serverConfigStore-DCme3xlV.js","./GraphView-CqZ3opAX.css","./UserSelectView-CXmVKOeK.js","./BaseViewTemplate-BhQMaVFP.js","./ServerStartView-48wfE1MS.js","./ServerStartView-CJiwVDQY.css","./InstallView-By3hC1fC.js","./InstallView-CxhfFC8Y.css","./WelcomeView-C8whKl15.js","./WelcomeView-Brz3-luE.css","./NotSupportedView-Vc8_xWgH.js","./NotSupportedView-DQerxQzi.css","./DownloadGitView-rPK_vYgU.js","./ManualConfigurationView-enyqGo0M.js","./ManualConfigurationView-CsirlNfV.css","./MetricsConsentView-lSfLu4nr.js","./DesktopStartView-le6AjGZr.js","./KeybindingPanel-D6O16W_1.js","./index-DpF-ptbJ.js","./KeybindingPanel-DvrUYZ4S.css","./ExtensionPanel-3jWrm6Zi.js","./ServerConfigPanel-B-w0HFlz.js","./index-je62U6DH.js","./index-BRhY6FpL.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphView-DKrBTQLe.js","./index-BWow9lpT.js","./index-I0brO37W.js","./keybindingService-CqSjCYw-.js","./serverConfigStore-BUvaGcxp.js","./GraphView-CVCdiww1.css","./UserSelectView-DNnNy-AZ.js","./BaseViewTemplate-Cof5Ihf_.js","./ServerStartView-M5VckhgZ.js","./ServerStartView-CJiwVDQY.css","./InstallView-C6tMsokB.js","./index-Bm1HvJhs.js","./uvMirrors-B-HKMf6X.js","./InstallView-DbJ2cGfL.css","./WelcomeView-Nvn1jaCx.js","./WelcomeView-Brz3-luE.css","./NotSupportedView-BRtvC5Gx.js","./NotSupportedView-RFx6eCkN.css","./DownloadGitView-At9xRwC5.js","./ManualConfigurationView-CtZMj_n_.js","./ManualConfigurationView-CsirlNfV.css","./MetricsConsentView-Df03LOI_.js","./DesktopStartView-DTiwKLp6.js","./MaintenanceView-D3drnrFc.js","./index-CdHVC5qq.js","./MaintenanceView-Bj5_Vr6o.css","./KeybindingPanel-BbfXtVg1.js","./KeybindingPanel-DvrUYZ4S.css","./ExtensionPanel-C_ZBlIyE.js","./ServerConfigPanel-C2nrpEEV.js","./index-BPn8eYlx.js","./index-BRhY6FpL.css"])))=>i.map(i=>d[i]); var __defProp2 = Object.defineProperty; -var __name = (target, value4) => __defProp2(target, "name", { value: value4, configurable: true }); +var __name = (target2, value4) => __defProp2(target2, "name", { value: value4, configurable: true }); (/* @__PURE__ */ __name(function polyfill2() { const relList = document.createElement("link").relList; if (relList && relList.supports && relList.supports("modulepreload")) { @@ -40,93 +40,97 @@ var __name = (target, value4) => __defProp2(target, "name", { value: value4, con } __name(processPreload, "processPreload"); }, "polyfill"))(); -var __defProp$2 = Object.defineProperty; -var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; -var __hasOwnProp$1 = Object.prototype.hasOwnProperty; -var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$2 = /* @__PURE__ */ __name((obj, key, value4) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value: value4 }) : obj[key] = value4, "__defNormalProp$2"); -var __spreadValues$1 = /* @__PURE__ */ __name((a2, b2) => { +var __defProp$7 = Object.defineProperty; +var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols; +var __hasOwnProp$6 = Object.prototype.hasOwnProperty; +var __propIsEnum$6 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$7 = /* @__PURE__ */ __name((obj, key, value4) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value: value4 }) : obj[key] = value4, "__defNormalProp$7"); +var __spreadValues$6 = /* @__PURE__ */ __name((a2, b2) => { for (var prop2 in b2 || (b2 = {})) - if (__hasOwnProp$1.call(b2, prop2)) - __defNormalProp$2(a2, prop2, b2[prop2]); - if (__getOwnPropSymbols$1) - for (var prop2 of __getOwnPropSymbols$1(b2)) { - if (__propIsEnum$1.call(b2, prop2)) - __defNormalProp$2(a2, prop2, b2[prop2]); + if (__hasOwnProp$6.call(b2, prop2)) + __defNormalProp$7(a2, prop2, b2[prop2]); + if (__getOwnPropSymbols$6) + for (var prop2 of __getOwnPropSymbols$6(b2)) { + if (__propIsEnum$6.call(b2, prop2)) + __defNormalProp$7(a2, prop2, b2[prop2]); } return a2; -}, "__spreadValues$1"); -function isEmpty$1(value4) { +}, "__spreadValues$6"); +function isEmpty$3(value4) { return value4 === null || value4 === void 0 || value4 === "" || Array.isArray(value4) && value4.length === 0 || !(value4 instanceof Date) && typeof value4 === "object" && Object.keys(value4).length === 0; } -__name(isEmpty$1, "isEmpty$1"); -function compare$1(value1, value22, comparator2, order = 1) { +__name(isEmpty$3, "isEmpty$3"); +function compare$3(value1, value22, comparator, order = 1) { let result = -1; - const emptyValue1 = isEmpty$1(value1); - const emptyValue2 = isEmpty$1(value22); + const emptyValue1 = isEmpty$3(value1); + const emptyValue2 = isEmpty$3(value22); if (emptyValue1 && emptyValue2) result = 0; else if (emptyValue1) result = order; else if (emptyValue2) result = -order; - else if (typeof value1 === "string" && typeof value22 === "string") result = comparator2(value1, value22); + else if (typeof value1 === "string" && typeof value22 === "string") result = comparator(value1, value22); else result = value1 < value22 ? -1 : value1 > value22 ? 1 : 0; return result; } -__name(compare$1, "compare$1"); -function deepEquals(obj1, obj2) { +__name(compare$3, "compare$3"); +function _deepEquals$2(obj1, obj2, visited = /* @__PURE__ */ new WeakSet()) { if (obj1 === obj2) return true; - if (obj1 && obj2 && typeof obj1 == "object" && typeof obj2 == "object") { - var arrObj1 = Array.isArray(obj1), arrObj2 = Array.isArray(obj2), i2, length, key; - if (arrObj1 && arrObj2) { - length = obj1.length; - if (length != obj2.length) return false; - for (i2 = length; i2-- !== 0; ) if (!deepEquals(obj1[i2], obj2[i2])) return false; - return true; - } - if (arrObj1 != arrObj2) return false; - var dateObj1 = obj1 instanceof Date, dateObj2 = obj2 instanceof Date; - if (dateObj1 != dateObj2) return false; - if (dateObj1 && dateObj2) return obj1.getTime() == obj2.getTime(); - var regexpObj1 = obj1 instanceof RegExp, regexpObj2 = obj2 instanceof RegExp; - if (regexpObj1 != regexpObj2) return false; - if (regexpObj1 && regexpObj2) return obj1.toString() == obj2.toString(); - var keys2 = Object.keys(obj1); - length = keys2.length; - if (length !== Object.keys(obj2).length) return false; - for (i2 = length; i2-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(obj2, keys2[i2])) return false; - for (i2 = length; i2-- !== 0; ) { - key = keys2[i2]; - if (!deepEquals(obj1[key], obj2[key])) return false; - } + if (!obj1 || !obj2 || typeof obj1 !== "object" || typeof obj2 !== "object") return false; + if (visited.has(obj1) || visited.has(obj2)) return false; + visited.add(obj1).add(obj2); + let arrObj1 = Array.isArray(obj1), arrObj2 = Array.isArray(obj2), i2, length, key; + if (arrObj1 && arrObj2) { + length = obj1.length; + if (length != obj2.length) return false; + for (i2 = length; i2-- !== 0; ) if (!_deepEquals$2(obj1[i2], obj2[i2], visited)) return false; return true; } - return obj1 !== obj1 && obj2 !== obj2; + if (arrObj1 != arrObj2) return false; + let dateObj1 = obj1 instanceof Date, dateObj2 = obj2 instanceof Date; + if (dateObj1 != dateObj2) return false; + if (dateObj1 && dateObj2) return obj1.getTime() == obj2.getTime(); + let regexpObj1 = obj1 instanceof RegExp, regexpObj2 = obj2 instanceof RegExp; + if (regexpObj1 != regexpObj2) return false; + if (regexpObj1 && regexpObj2) return obj1.toString() == obj2.toString(); + let keys2 = Object.keys(obj1); + length = keys2.length; + if (length !== Object.keys(obj2).length) return false; + for (i2 = length; i2-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(obj2, keys2[i2])) return false; + for (i2 = length; i2-- !== 0; ) { + key = keys2[i2]; + if (!_deepEquals$2(obj1[key], obj2[key], visited)) return false; + } + return true; } -__name(deepEquals, "deepEquals"); -function isFunction$9(value4) { +__name(_deepEquals$2, "_deepEquals$2"); +function deepEquals$2(obj1, obj2) { + return _deepEquals$2(obj1, obj2); +} +__name(deepEquals$2, "deepEquals$2"); +function isFunction$d(value4) { return !!(value4 && value4.constructor && value4.call && value4.apply); } -__name(isFunction$9, "isFunction$9"); -function isNotEmpty(value4) { - return !isEmpty$1(value4); +__name(isFunction$d, "isFunction$d"); +function isNotEmpty$2(value4) { + return !isEmpty$3(value4); } -__name(isNotEmpty, "isNotEmpty"); -function resolveFieldData(data25, field) { - if (!data25 || !field) { +__name(isNotEmpty$2, "isNotEmpty$2"); +function resolveFieldData$2(data26, field2) { + if (!data26 || !field2) { return null; } try { - const value4 = data25[field]; - if (isNotEmpty(value4)) return value4; + const value4 = data26[field2]; + if (isNotEmpty$2(value4)) return value4; } catch (e2) { } - if (Object.keys(data25).length) { - if (isFunction$9(field)) { - return field(data25); - } else if (field.indexOf(".") === -1) { - return data25[field]; + if (Object.keys(data26).length) { + if (isFunction$d(field2)) { + return field2(data26); + } else if (field2.indexOf(".") === -1) { + return data26[field2]; } else { - let fields = field.split("."); - let value4 = data25; + let fields = field2.split("."); + let value4 = data26; for (let i2 = 0, len = fields.length; i2 < len; ++i2) { if (value4 == null) { return null; @@ -138,27 +142,27 @@ function resolveFieldData(data25, field) { } return null; } -__name(resolveFieldData, "resolveFieldData"); -function equals(obj1, obj2, field) { - if (field) return resolveFieldData(obj1, field) === resolveFieldData(obj2, field); - else return deepEquals(obj1, obj2); +__name(resolveFieldData$2, "resolveFieldData$2"); +function equals$2(obj1, obj2, field2) { + if (field2) return resolveFieldData$2(obj1, field2) === resolveFieldData$2(obj2, field2); + else return deepEquals$2(obj1, obj2); } -__name(equals, "equals"); -function contains(value4, list2) { +__name(equals$2, "equals$2"); +function contains$2(value4, list2) { if (value4 != null && list2 && list2.length) { for (let val of list2) { - if (equals(value4, val)) return true; + if (equals$2(value4, val)) return true; } } return false; } -__name(contains, "contains"); -function filter(value4, fields, filterValue) { +__name(contains$2, "contains$2"); +function filter$2(value4, fields, filterValue) { let filteredItems = []; if (value4) { for (let item3 of value4) { - for (let field of fields) { - if (String(resolveFieldData(item3, field)).toLowerCase().indexOf(filterValue.toLowerCase()) > -1) { + for (let field2 of fields) { + if (String(resolveFieldData$2(item3, field2)).toLowerCase().indexOf(filterValue.toLowerCase()) > -1) { filteredItems.push(item3); break; } @@ -167,8 +171,8 @@ function filter(value4, fields, filterValue) { } return filteredItems; } -__name(filter, "filter"); -function findIndexInList(value4, list2) { +__name(filter$2, "filter$2"); +function findIndexInList$2(value4, list2) { let index2 = -1; if (list2) { for (let i2 = 0; i2 < list2.length; i2++) { @@ -180,10 +184,10 @@ function findIndexInList(value4, list2) { } return index2; } -__name(findIndexInList, "findIndexInList"); -function findLast$1(arr, callback) { +__name(findIndexInList$2, "findIndexInList$2"); +function findLast$3(arr, callback) { let item3; - if (isNotEmpty(arr)) { + if (isNotEmpty$2(arr)) { try { item3 = arr.findLast(callback); } catch (e2) { @@ -192,10 +196,10 @@ function findLast$1(arr, callback) { } return item3; } -__name(findLast$1, "findLast$1"); -function findLastIndex(arr, callback) { +__name(findLast$3, "findLast$3"); +function findLastIndex$2(arr, callback) { let index2 = -1; - if (isNotEmpty(arr)) { + if (isNotEmpty$2(arr)) { try { index2 = arr.findLastIndex(callback); } catch (e2) { @@ -204,34 +208,34 @@ function findLastIndex(arr, callback) { } return index2; } -__name(findLastIndex, "findLastIndex"); -function isObject$e(value4, empty3 = true) { +__name(findLastIndex$2, "findLastIndex$2"); +function isObject$g(value4, empty3 = true) { return value4 instanceof Object && value4.constructor === Object && (empty3 || Object.keys(value4).length !== 0); } -__name(isObject$e, "isObject$e"); -function resolve$2(obj, ...params) { - return isFunction$9(obj) ? obj(...params) : obj; +__name(isObject$g, "isObject$g"); +function resolve$4(obj, ...params) { + return isFunction$d(obj) ? obj(...params) : obj; } -__name(resolve$2, "resolve$2"); -function isString$9(value4, empty3 = true) { +__name(resolve$4, "resolve$4"); +function isString$b(value4, empty3 = true) { return typeof value4 === "string" && (empty3 || value4 !== ""); } -__name(isString$9, "isString$9"); -function toFlatCase(str) { - return isString$9(str) ? str.replace(/(-|_)/g, "").toLowerCase() : str; +__name(isString$b, "isString$b"); +function toFlatCase$2(str) { + return isString$b(str) ? str.replace(/(-|_)/g, "").toLowerCase() : str; } -__name(toFlatCase, "toFlatCase"); -function getKeyValue(obj, key = "", params = {}) { - const fKeys = toFlatCase(key).split("."); +__name(toFlatCase$2, "toFlatCase$2"); +function getKeyValue$2(obj, key = "", params = {}) { + const fKeys = toFlatCase$2(key).split("."); const fKey = fKeys.shift(); - return fKey ? isObject$e(obj) ? getKeyValue(resolve$2(obj[Object.keys(obj).find((k2) => toFlatCase(k2) === fKey) || ""], params), fKeys.join("."), params) : void 0 : resolve$2(obj, params); + return fKey ? isObject$g(obj) ? getKeyValue$2(resolve$4(obj[Object.keys(obj).find((k2) => toFlatCase$2(k2) === fKey) || ""], params), fKeys.join("."), params) : void 0 : resolve$4(obj, params); } -__name(getKeyValue, "getKeyValue"); -function insertIntoOrderedArray(item3, index2, arr, sourceArr) { +__name(getKeyValue$2, "getKeyValue$2"); +function insertIntoOrderedArray$2(item3, index2, arr, sourceArr) { if (arr.length > 0) { let injected = false; for (let i2 = 0; i2 < arr.length; i2++) { - let currentItemIndex = findIndexInList(arr[i2], sourceArr); + let currentItemIndex = findIndexInList$2(arr[i2], sourceArr); if (currentItemIndex > index2) { arr.splice(i2, 0, item3); injected = true; @@ -245,28 +249,36 @@ function insertIntoOrderedArray(item3, index2, arr, sourceArr) { arr.push(item3); } } -__name(insertIntoOrderedArray, "insertIntoOrderedArray"); -function isArray$a(value4, empty3 = true) { +__name(insertIntoOrderedArray$2, "insertIntoOrderedArray$2"); +function isArray$c(value4, empty3 = true) { return Array.isArray(value4) && (empty3 || value4.length !== 0); } -__name(isArray$a, "isArray$a"); -function isDate$3(value4) { +__name(isArray$c, "isArray$c"); +function isDate$5(value4) { return value4 instanceof Date && value4.constructor === Date; } -__name(isDate$3, "isDate$3"); -function isNumber$5(value4) { - return isNotEmpty(value4) && !isNaN(value4); +__name(isDate$5, "isDate$5"); +function isLetter$3(char) { + return /^[a-zA-Z\u00C0-\u017F]$/.test(char); } -__name(isNumber$5, "isNumber$5"); -function isPrintableCharacter(char = "") { - return isNotEmpty(char) && char.length === 1 && !!char.match(/\S| /); +__name(isLetter$3, "isLetter$3"); +function isNumber$7(value4) { + return isNotEmpty$2(value4) && !isNaN(value4); } -__name(isPrintableCharacter, "isPrintableCharacter"); -function localeComparator() { +__name(isNumber$7, "isNumber$7"); +function isPrintableCharacter$2(char = "") { + return isNotEmpty$2(char) && char.length === 1 && !!char.match(/\S| /); +} +__name(isPrintableCharacter$2, "isPrintableCharacter$2"); +function isScalar$2(value4) { + return value4 != null && (typeof value4 === "string" || typeof value4 === "number" || typeof value4 === "bigint" || typeof value4 === "boolean"); +} +__name(isScalar$2, "isScalar$2"); +function localeComparator$2() { return new Intl.Collator(void 0, { numeric: true }).compare; } -__name(localeComparator, "localeComparator"); -function matchRegex(str, regex2) { +__name(localeComparator$2, "localeComparator$2"); +function matchRegex$2(str, regex2) { if (regex2) { const match2 = regex2.test(str); regex2.lastIndex = 0; @@ -274,13 +286,13 @@ function matchRegex(str, regex2) { } return false; } -__name(matchRegex, "matchRegex"); -function mergeKeys(...args) { - const _mergeKeys = /* @__PURE__ */ __name((target = {}, source = {}) => { - const mergedObj = __spreadValues$1({}, target); +__name(matchRegex$2, "matchRegex$2"); +function mergeKeys$2(...args) { + const _mergeKeys = /* @__PURE__ */ __name((target2 = {}, source = {}) => { + const mergedObj = __spreadValues$6({}, target2); Object.keys(source).forEach((key) => { - if (isObject$e(source[key]) && key in target && isObject$e(target[key])) { - mergedObj[key] = _mergeKeys(target[key], source[key]); + if (isObject$g(source[key]) && key in target2 && isObject$g(target2[key])) { + mergedObj[key] = _mergeKeys(target2[key], source[key]); } else { mergedObj[key] = source[key]; } @@ -289,27 +301,83 @@ function mergeKeys(...args) { }, "_mergeKeys"); return args.reduce((acc, obj, i2) => i2 === 0 ? obj : _mergeKeys(acc, obj), {}); } -__name(mergeKeys, "mergeKeys"); -function minifyCSS(css3) { - return css3 ? css3.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/ ([{:}]) /g, "$1").replace(/([;,]) /g, "$1").replace(/ !/g, "!").replace(/: /g, ":") : css3; +__name(mergeKeys$2, "mergeKeys$2"); +function minifyCSS$2(css4) { + return css4 ? css4.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/ ([{:}]) /g, "$1").replace(/([;,]) /g, "$1").replace(/ !/g, "!").replace(/: /g, ":") : css4; } -__name(minifyCSS, "minifyCSS"); -function nestedKeys(obj = {}, parentKey = "") { +__name(minifyCSS$2, "minifyCSS$2"); +function nestedKeys$2(obj = {}, parentKey = "") { return Object.entries(obj).reduce((o2, [key, value4]) => { const currentKey = parentKey ? `${parentKey}.${key}` : key; - isObject$e(value4) ? o2 = o2.concat(nestedKeys(value4, currentKey)) : o2.push(currentKey); + isObject$g(value4) ? o2 = o2.concat(nestedKeys$2(value4, currentKey)) : o2.push(currentKey); return o2; }, []); } -__name(nestedKeys, "nestedKeys"); -function removeAccents(str) { - if (str && str.search(/[\xC0-\xFF]/g) > -1) { - str = str.replace(/[\xC0-\xC5]/g, "A").replace(/[\xC6]/g, "AE").replace(/[\xC7]/g, "C").replace(/[\xC8-\xCB]/g, "E").replace(/[\xCC-\xCF]/g, "I").replace(/[\xD0]/g, "D").replace(/[\xD1]/g, "N").replace(/[\xD2-\xD6\xD8]/g, "O").replace(/[\xD9-\xDC]/g, "U").replace(/[\xDD]/g, "Y").replace(/[\xDE]/g, "P").replace(/[\xE0-\xE5]/g, "a").replace(/[\xE6]/g, "ae").replace(/[\xE7]/g, "c").replace(/[\xE8-\xEB]/g, "e").replace(/[\xEC-\xEF]/g, "i").replace(/[\xF1]/g, "n").replace(/[\xF2-\xF6\xF8]/g, "o").replace(/[\xF9-\xFC]/g, "u").replace(/[\xFE]/g, "p").replace(/[\xFD\xFF]/g, "y"); +__name(nestedKeys$2, "nestedKeys$2"); +function omit$3(obj, ...keys2) { + if (!isObject$g(obj)) return obj; + const copy2 = __spreadValues$6({}, obj); + keys2 == null ? void 0 : keys2.flat().forEach((key) => delete copy2[key]); + return copy2; +} +__name(omit$3, "omit$3"); +function removeAccents$2(str) { + const accentCheckRegex = /[\xC0-\xFF\u0100-\u017E]/; + if (str && accentCheckRegex.test(str)) { + const accentsMap = { + A: /[\xC0-\xC5\u0100\u0102\u0104]/g, + AE: /[\xC6]/g, + C: /[\xC7\u0106\u0108\u010A\u010C]/g, + D: /[\xD0\u010E\u0110]/g, + E: /[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g, + G: /[\u011C\u011E\u0120\u0122]/g, + H: /[\u0124\u0126]/g, + I: /[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g, + IJ: /[\u0132]/g, + J: /[\u0134]/g, + K: /[\u0136]/g, + L: /[\u0139\u013B\u013D\u013F\u0141]/g, + N: /[\xD1\u0143\u0145\u0147\u014A]/g, + O: /[\xD2-\xD6\xD8\u014C\u014E\u0150]/g, + OE: /[\u0152]/g, + R: /[\u0154\u0156\u0158]/g, + S: /[\u015A\u015C\u015E\u0160]/g, + T: /[\u0162\u0164\u0166]/g, + U: /[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g, + W: /[\u0174]/g, + Y: /[\xDD\u0176\u0178]/g, + Z: /[\u0179\u017B\u017D]/g, + a: /[\xE0-\xE5\u0101\u0103\u0105]/g, + ae: /[\xE6]/g, + c: /[\xE7\u0107\u0109\u010B\u010D]/g, + d: /[\u010F\u0111]/g, + e: /[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g, + g: /[\u011D\u011F\u0121\u0123]/g, + i: /[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g, + ij: /[\u0133]/g, + j: /[\u0135]/g, + k: /[\u0137,\u0138]/g, + l: /[\u013A\u013C\u013E\u0140\u0142]/g, + n: /[\xF1\u0144\u0146\u0148\u014B]/g, + p: /[\xFE]/g, + o: /[\xF2-\xF6\xF8\u014D\u014F\u0151]/g, + oe: /[\u0153]/g, + r: /[\u0155\u0157\u0159]/g, + s: /[\u015B\u015D\u015F\u0161]/g, + t: /[\u0163\u0165\u0167]/g, + u: /[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g, + w: /[\u0175]/g, + y: /[\xFD\xFF\u0177]/g, + z: /[\u017A\u017C\u017E]/g + }; + for (let key in accentsMap) { + str = str.replace(accentsMap[key], key); + } } return str; } -__name(removeAccents, "removeAccents"); -function reorderArray(value4, from2, to) { +__name(removeAccents$2, "removeAccents$2"); +function reorderArray$2(value4, from2, to) { if (value4 && from2 !== to) { if (to >= value4.length) { to %= value4.length; @@ -318,67 +386,78 @@ function reorderArray(value4, from2, to) { value4.splice(to, 0, value4.splice(from2, 1)[0]); } } -__name(reorderArray, "reorderArray"); -function sort(value1, value22, order = 1, comparator2, nullSortOrder = 1) { - const result = compare$1(value1, value22, comparator2, order); +__name(reorderArray$2, "reorderArray$2"); +function sort$2(value1, value22, order = 1, comparator, nullSortOrder = 1) { + const result = compare$3(value1, value22, comparator, order); let finalSortOrder = order; - if (isEmpty$1(value1) || isEmpty$1(value22)) { + if (isEmpty$3(value1) || isEmpty$3(value22)) { finalSortOrder = nullSortOrder === 1 ? order : nullSortOrder; } return finalSortOrder * result; } -__name(sort, "sort"); -function stringify(value4, indent = 2, currentIndent = 0) { +__name(sort$2, "sort$2"); +function stringify$2(value4, indent = 2, currentIndent = 0) { const currentIndentStr = " ".repeat(currentIndent); const nextIndentStr = " ".repeat(currentIndent + indent); - if (isArray$a(value4)) { - return "[" + value4.map((v2) => stringify(v2, indent, currentIndent + indent)).join(", ") + "]"; - } else if (isDate$3(value4)) { + if (isArray$c(value4)) { + return "[" + value4.map((v2) => stringify$2(v2, indent, currentIndent + indent)).join(", ") + "]"; + } else if (isDate$5(value4)) { return value4.toISOString(); - } else if (isFunction$9(value4)) { + } else if (isFunction$d(value4)) { return value4.toString(); - } else if (isObject$e(value4)) { - return "{\n" + Object.entries(value4).map(([k2, v2]) => `${nextIndentStr}${k2}: ${stringify(v2, indent, currentIndent + indent)}`).join(",\n") + ` + } else if (isObject$g(value4)) { + return "{\n" + Object.entries(value4).map(([k2, v2]) => `${nextIndentStr}${k2}: ${stringify$2(v2, indent, currentIndent + indent)}`).join(",\n") + ` ${currentIndentStr}}`; } else { return JSON.stringify(value4); } } -__name(stringify, "stringify"); -function toCapitalCase(str) { - return isString$9(str, false) ? str[0].toUpperCase() + str.slice(1) : str; +__name(stringify$2, "stringify$2"); +function toCapitalCase$2(str) { + return isString$b(str, false) ? str[0].toUpperCase() + str.slice(1) : str; } -__name(toCapitalCase, "toCapitalCase"); -function toKebabCase(str) { - return isString$9(str) ? str.replace(/(_)/g, "-").replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "-" + c2.toLowerCase()).toLowerCase() : str; +__name(toCapitalCase$2, "toCapitalCase$2"); +function toKebabCase$2(str) { + return isString$b(str) ? str.replace(/(_)/g, "-").replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "-" + c2.toLowerCase()).toLowerCase() : str; } -__name(toKebabCase, "toKebabCase"); -function toTokenKey$1(str) { - return isString$9(str) ? str.replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "." + c2.toLowerCase()).toLowerCase() : str; +__name(toKebabCase$2, "toKebabCase$2"); +function toTokenKey$4(str) { + return isString$b(str) ? str.replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "." + c2.toLowerCase()).toLowerCase() : str; } -__name(toTokenKey$1, "toTokenKey$1"); -function EventBus() { +__name(toTokenKey$4, "toTokenKey$4"); +function toValue$6(value4) { + if (value4 && typeof value4 === "object") { + if (value4.hasOwnProperty("current")) { + return value4.current; + } else if (value4.hasOwnProperty("value")) { + return value4.value; + } + } + return resolve$4(value4); +} +__name(toValue$6, "toValue$6"); +function EventBus$1() { const allHandlers = /* @__PURE__ */ new Map(); return { - on(type, handler6) { + on(type, handler12) { let handlers2 = allHandlers.get(type); - if (!handlers2) handlers2 = [handler6]; - else handlers2.push(handler6); + if (!handlers2) handlers2 = [handler12]; + else handlers2.push(handler12); allHandlers.set(type, handlers2); return this; }, - off(type, handler6) { + off(type, handler12) { let handlers2 = allHandlers.get(type); if (handlers2) { - handlers2.splice(handlers2.indexOf(handler6) >>> 0, 1); + handlers2.splice(handlers2.indexOf(handler12) >>> 0, 1); } return this; }, emit(type, evt) { let handlers2 = allHandlers.get(type); if (handlers2) { - handlers2.slice().map((handler6) => { - handler6(evt); + handlers2.slice().map((handler12) => { + handler12(evt); }); } }, @@ -387,215 +466,223 @@ function EventBus() { } }; } -__name(EventBus, "EventBus"); -var __defProp$1 = Object.defineProperty; -var __defProps = Object.defineProperties; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp$1 = /* @__PURE__ */ __name((obj, key, value4) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value: value4 }) : obj[key] = value4, "__defNormalProp$1"); -var __spreadValues = /* @__PURE__ */ __name((a2, b2) => { +__name(EventBus$1, "EventBus$1"); +var __defProp$6 = Object.defineProperty; +var __defProps$1 = Object.defineProperties; +var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols; +var __hasOwnProp$5 = Object.prototype.hasOwnProperty; +var __propIsEnum$5 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$6 = /* @__PURE__ */ __name((obj, key, value4) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value: value4 }) : obj[key] = value4, "__defNormalProp$6"); +var __spreadValues$5 = /* @__PURE__ */ __name((a2, b2) => { for (var prop2 in b2 || (b2 = {})) - if (__hasOwnProp.call(b2, prop2)) - __defNormalProp$1(a2, prop2, b2[prop2]); - if (__getOwnPropSymbols) - for (var prop2 of __getOwnPropSymbols(b2)) { - if (__propIsEnum.call(b2, prop2)) - __defNormalProp$1(a2, prop2, b2[prop2]); + if (__hasOwnProp$5.call(b2, prop2)) + __defNormalProp$6(a2, prop2, b2[prop2]); + if (__getOwnPropSymbols$5) + for (var prop2 of __getOwnPropSymbols$5(b2)) { + if (__propIsEnum$5.call(b2, prop2)) + __defNormalProp$6(a2, prop2, b2[prop2]); } return a2; -}, "__spreadValues"); -var __spreadProps = /* @__PURE__ */ __name((a2, b2) => __defProps(a2, __getOwnPropDescs(b2)), "__spreadProps"); -var __objRest = /* @__PURE__ */ __name((source, exclude) => { - var target = {}; +}, "__spreadValues$5"); +var __spreadProps$1 = /* @__PURE__ */ __name((a2, b2) => __defProps$1(a2, __getOwnPropDescs$1(b2)), "__spreadProps$1"); +var __objRest$1 = /* @__PURE__ */ __name((source, exclude) => { + var target2 = {}; for (var prop2 in source) - if (__hasOwnProp.call(source, prop2) && exclude.indexOf(prop2) < 0) - target[prop2] = source[prop2]; - if (source != null && __getOwnPropSymbols) - for (var prop2 of __getOwnPropSymbols(source)) { - if (exclude.indexOf(prop2) < 0 && __propIsEnum.call(source, prop2)) - target[prop2] = source[prop2]; + if (__hasOwnProp$5.call(source, prop2) && exclude.indexOf(prop2) < 0) + target2[prop2] = source[prop2]; + if (source != null && __getOwnPropSymbols$5) + for (var prop2 of __getOwnPropSymbols$5(source)) { + if (exclude.indexOf(prop2) < 0 && __propIsEnum$5.call(source, prop2)) + target2[prop2] = source[prop2]; } - return target; -}, "__objRest"); -function definePreset(...presets) { - return mergeKeys(...presets); + return target2; +}, "__objRest$1"); +function definePreset$1(...presets) { + return mergeKeys$2(...presets); } -__name(definePreset, "definePreset"); -var ThemeService = EventBus(); -var service_default = ThemeService; -function toTokenKey(str) { - return isString$9(str) ? str.replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "." + c2.toLowerCase()).toLowerCase() : str; +__name(definePreset$1, "definePreset$1"); +var ThemeService$1 = EventBus$1(); +var service_default$1 = ThemeService$1; +function toTokenKey$3(str) { + return isString$b(str) ? str.replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "." + c2.toLowerCase()).toLowerCase() : str; } -__name(toTokenKey, "toTokenKey"); -function merge$2(value1, value22) { - if (isArray$a(value1)) { +__name(toTokenKey$3, "toTokenKey$3"); +function merge$3(value1, value22) { + if (isArray$c(value1)) { value1.push(...value22 || []); - } else if (isObject$e(value1)) { + } else if (isObject$g(value1)) { Object.assign(value1, value22); } } -__name(merge$2, "merge$2"); -function toValue$2(value4) { - return isObject$e(value4) && value4.hasOwnProperty("value") && value4.hasOwnProperty("type") ? value4.value : value4; +__name(merge$3, "merge$3"); +function toValue$5(value4) { + return isObject$g(value4) && value4.hasOwnProperty("value") && value4.hasOwnProperty("type") ? value4.value : value4; } -__name(toValue$2, "toValue$2"); -function toUnit(value4, variable = "") { +__name(toValue$5, "toValue$5"); +function toUnit$1(value4, variable = "") { const excludedProperties = ["opacity", "z-index", "line-height", "font-weight", "flex", "flex-grow", "flex-shrink", "order"]; if (!excludedProperties.some((property) => variable.endsWith(property))) { const val = `${value4}`.trim(); const valArr = val.split(" "); - return valArr.map((v2) => isNumber$5(v2) ? `${v2}px` : v2).join(" "); + return valArr.map((v2) => isNumber$7(v2) ? `${v2}px` : v2).join(" "); } return value4; } -__name(toUnit, "toUnit"); -function toNormalizePrefix(prefix2) { +__name(toUnit$1, "toUnit$1"); +function toNormalizePrefix$1(prefix2) { return prefix2.replaceAll(/ /g, "").replace(/[^\w]/g, "-"); } -__name(toNormalizePrefix, "toNormalizePrefix"); -function toNormalizeVariable(prefix2 = "", variable = "") { - return toNormalizePrefix(`${isString$9(prefix2, false) && isString$9(variable, false) ? `${prefix2}-` : prefix2}${variable}`); +__name(toNormalizePrefix$1, "toNormalizePrefix$1"); +function toNormalizeVariable$1(prefix2 = "", variable = "") { + return toNormalizePrefix$1(`${isString$b(prefix2, false) && isString$b(variable, false) ? `${prefix2}-` : prefix2}${variable}`); } -__name(toNormalizeVariable, "toNormalizeVariable"); -function getVariableName(prefix2 = "", variable = "") { - return `--${toNormalizeVariable(prefix2, variable)}`; +__name(toNormalizeVariable$1, "toNormalizeVariable$1"); +function getVariableName$1(prefix2 = "", variable = "") { + return `--${toNormalizeVariable$1(prefix2, variable)}`; } -__name(getVariableName, "getVariableName"); -function getVariableValue(value4, variable = "", prefix2 = "", excludedKeyRegexes = [], fallback) { - if (isString$9(value4)) { +__name(getVariableName$1, "getVariableName$1"); +function hasOddBraces$1(str = "") { + const openBraces = (str.match(/{/g) || []).length; + const closeBraces = (str.match(/}/g) || []).length; + return (openBraces + closeBraces) % 2 !== 0; +} +__name(hasOddBraces$1, "hasOddBraces$1"); +function getVariableValue$1(value4, variable = "", prefix2 = "", excludedKeyRegexes = [], fallback) { + if (isString$b(value4)) { const regex2 = /{([^}]*)}/g; const val = value4.trim(); - if (matchRegex(val, regex2)) { + if (hasOddBraces$1(val)) { + return void 0; + } else if (matchRegex$2(val, regex2)) { const _val = val.replaceAll(regex2, (v2) => { const path = v2.replace(/{|}/g, ""); - const keys2 = path.split(".").filter((_v) => !excludedKeyRegexes.some((_r) => matchRegex(_v, _r))); - return `var(${getVariableName(prefix2, toKebabCase(keys2.join("-")))}${isNotEmpty(fallback) ? `, ${fallback}` : ""})`; + const keys2 = path.split(".").filter((_v) => !excludedKeyRegexes.some((_r) => matchRegex$2(_v, _r))); + return `var(${getVariableName$1(prefix2, toKebabCase$2(keys2.join("-")))}${isNotEmpty$2(fallback) ? `, ${fallback}` : ""})`; }); const calculationRegex = /(\d+\s+[\+\-\*\/]\s+\d+)/g; const cleanedVarRegex = /var\([^)]+\)/g; - return matchRegex(_val.replace(cleanedVarRegex, "0"), calculationRegex) ? `calc(${_val})` : _val; + return matchRegex$2(_val.replace(cleanedVarRegex, "0"), calculationRegex) ? `calc(${_val})` : _val; } - return toUnit(val, variable); - } else if (isNumber$5(value4)) { - return toUnit(value4, variable); - } - return void 0; -} -__name(getVariableValue, "getVariableValue"); -function getComputedValue(obj = {}, value4) { - if (isString$9(value4)) { - const regex2 = /{([^}]*)}/g; - const val = value4.trim(); - return matchRegex(val, regex2) ? val.replaceAll(regex2, (v2) => getKeyValue(obj, v2.replace(/{|}/g, ""))) : val; - } else if (isNumber$5(value4)) { + return val; + } else if (isNumber$7(value4)) { return value4; } return void 0; } -__name(getComputedValue, "getComputedValue"); -function setProperty(properties, key, value4) { - if (isString$9(key, false)) { +__name(getVariableValue$1, "getVariableValue$1"); +function getComputedValue$1(obj = {}, value4) { + if (isString$b(value4)) { + const regex2 = /{([^}]*)}/g; + const val = value4.trim(); + return matchRegex$2(val, regex2) ? val.replaceAll(regex2, (v2) => getKeyValue$2(obj, v2.replace(/{|}/g, ""))) : val; + } else if (isNumber$7(value4)) { + return value4; + } + return void 0; +} +__name(getComputedValue$1, "getComputedValue$1"); +function setProperty$1(properties, key, value4) { + if (isString$b(key, false)) { properties.push(`${key}:${value4};`); } } -__name(setProperty, "setProperty"); -function getRule(selector, properties) { +__name(setProperty$1, "setProperty$1"); +function getRule$1(selector, properties) { if (selector) { return `${selector}{${properties}}`; } return ""; } -__name(getRule, "getRule"); -function normalizeColor(color2) { +__name(getRule$1, "getRule$1"); +function normalizeColor$1(color2) { if (color2.length === 4) { return `#${color2[1]}${color2[1]}${color2[2]}${color2[2]}${color2[3]}${color2[3]}`; } return color2; } -__name(normalizeColor, "normalizeColor"); -function hexToRgb$1(hex) { +__name(normalizeColor$1, "normalizeColor$1"); +function hexToRgb$2(hex) { var bigint = parseInt(hex.substring(1), 16); var r2 = bigint >> 16 & 255; var g2 = bigint >> 8 & 255; var b2 = bigint & 255; return { r: r2, g: g2, b: b2 }; } -__name(hexToRgb$1, "hexToRgb$1"); -function rgbToHex(r2, g2, b2) { +__name(hexToRgb$2, "hexToRgb$2"); +function rgbToHex$1(r2, g2, b2) { return `#${r2.toString(16).padStart(2, "0")}${g2.toString(16).padStart(2, "0")}${b2.toString(16).padStart(2, "0")}`; } -__name(rgbToHex, "rgbToHex"); -var mix_default = /* @__PURE__ */ __name((color1, color2, weight) => { - color1 = normalizeColor(color1); - color2 = normalizeColor(color2); +__name(rgbToHex$1, "rgbToHex$1"); +var mix_default$1 = /* @__PURE__ */ __name((color1, color2, weight) => { + color1 = normalizeColor$1(color1); + color2 = normalizeColor$1(color2); var p2 = weight / 100; var w2 = p2 * 2 - 1; var w1 = (w2 + 1) / 2; var w22 = 1 - w1; - var rgb1 = hexToRgb$1(color1); - var rgb2 = hexToRgb$1(color2); + var rgb1 = hexToRgb$2(color1); + var rgb2 = hexToRgb$2(color2); var r2 = Math.round(rgb1.r * w1 + rgb2.r * w22); var g2 = Math.round(rgb1.g * w1 + rgb2.g * w22); var b2 = Math.round(rgb1.b * w1 + rgb2.b * w22); - return rgbToHex(r2, g2, b2); -}, "mix_default"); -var shade_default = /* @__PURE__ */ __name((color2, percent) => mix_default("#000000", color2, percent), "shade_default"); -var tint_default = /* @__PURE__ */ __name((color2, percent) => mix_default("#ffffff", color2, percent), "tint_default"); -var scales = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]; -var palette_default = /* @__PURE__ */ __name((color2) => { + return rgbToHex$1(r2, g2, b2); +}, "mix_default$1"); +var shade_default$1 = /* @__PURE__ */ __name((color2, percent) => mix_default$1("#000000", color2, percent), "shade_default$1"); +var tint_default$1 = /* @__PURE__ */ __name((color2, percent) => mix_default$1("#ffffff", color2, percent), "tint_default$1"); +var scales$1 = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]; +var palette_default$1 = /* @__PURE__ */ __name((color2) => { if (/{([^}]*)}/g.test(color2)) { const token = color2.replace(/{|}/g, ""); - return scales.reduce((acc, scale) => (acc[scale] = `{${token}.${scale}}`, acc), {}); + return scales$1.reduce((acc, scale) => (acc[scale] = `{${token}.${scale}}`, acc), {}); } - return typeof color2 === "string" ? scales.reduce((acc, scale, i2) => (acc[scale] = i2 <= 5 ? tint_default(color2, (5 - i2) * 19) : shade_default(color2, (i2 - 5) * 15), acc), {}) : color2; -}, "palette_default"); -var $dt = /* @__PURE__ */ __name((tokenPath) => { + return typeof color2 === "string" ? scales$1.reduce((acc, scale, i2) => (acc[scale] = i2 <= 5 ? tint_default$1(color2, (5 - i2) * 19) : shade_default$1(color2, (i2 - 5) * 15), acc), {}) : color2; +}, "palette_default$1"); +var $dt$1 = /* @__PURE__ */ __name((tokenPath) => { var _a2; - const theme42 = config_default.getTheme(); - const variable = dtwt(theme42, tokenPath, void 0, "variable"); - const name2 = (_a2 = variable.match(/--[\w-]+/g)) == null ? void 0 : _a2[0]; - const value4 = dtwt(theme42, tokenPath, void 0, "value"); + const theme43 = config_default$1.getTheme(); + const variable = dtwt$1(theme43, tokenPath, void 0, "variable"); + const name2 = (_a2 = variable == null ? void 0 : variable.match(/--[\w-]+/g)) == null ? void 0 : _a2[0]; + const value4 = dtwt$1(theme43, tokenPath, void 0, "value"); return { name: name2, variable, value: value4 }; -}, "$dt"); -var dt = /* @__PURE__ */ __name((...args) => { - return dtwt(config_default.getTheme(), ...args); -}, "dt"); -var dtwt = /* @__PURE__ */ __name((theme42 = {}, tokenPath, fallback, type = "variable") => { +}, "$dt$1"); +var dt$1 = /* @__PURE__ */ __name((...args) => { + return dtwt$1(config_default$1.getTheme(), ...args); +}, "dt$1"); +var dtwt$1 = /* @__PURE__ */ __name((theme43 = {}, tokenPath, fallback, type) => { if (tokenPath) { - const { variable: VARIABLE, options: OPTIONS } = config_default.defaults || {}; - const { prefix: prefix2, transform: transform2 } = (theme42 == null ? void 0 : theme42.options) || OPTIONS || {}; + const { variable: VARIABLE, options: OPTIONS } = config_default$1.defaults || {}; + const { prefix: prefix2, transform: transform2 } = (theme43 == null ? void 0 : theme43.options) || OPTIONS || {}; const regex2 = /{([^}]*)}/g; - const token = matchRegex(tokenPath, regex2) ? tokenPath : `{${tokenPath}}`; - const isStrictTransform = type === "value" || transform2 === "strict"; - return isStrictTransform ? config_default.getTokenValue(tokenPath) : getVariableValue(token, void 0, prefix2, [VARIABLE.excludedKeyRegex], fallback); + const token = matchRegex$2(tokenPath, regex2) ? tokenPath : `{${tokenPath}}`; + const isStrictTransform = type === "value" || isEmpty$3(type) && transform2 === "strict"; + return isStrictTransform ? config_default$1.getTokenValue(tokenPath) : getVariableValue$1(token, void 0, prefix2, [VARIABLE.excludedKeyRegex], fallback); } return ""; -}, "dtwt"); -function css$2(style2) { - return resolve$2(style2, { dt }); +}, "dtwt$1"); +function css$5(style2) { + return resolve$4(style2, { dt: dt$1 }); } -__name(css$2, "css$2"); -var $t = /* @__PURE__ */ __name((theme42 = {}) => { - let { preset: _preset, options: _options } = theme42; +__name(css$5, "css$5"); +var $t$1 = /* @__PURE__ */ __name((theme43 = {}) => { + let { preset: _preset, options: _options } = theme43; return { preset(value4) { - _preset = _preset ? mergeKeys(_preset, value4) : value4; + _preset = _preset ? mergeKeys$2(_preset, value4) : value4; return this; }, options(value4) { - _options = _options ? __spreadValues(__spreadValues({}, _options), value4) : value4; + _options = _options ? __spreadValues$5(__spreadValues$5({}, _options), value4) : value4; return this; }, // features primaryPalette(primary) { const { semantic } = _preset || {}; - _preset = __spreadProps(__spreadValues({}, _preset), { semantic: __spreadProps(__spreadValues({}, semantic), { primary }) }); + _preset = __spreadProps$1(__spreadValues$5({}, _preset), { semantic: __spreadProps$1(__spreadValues$5({}, semantic), { primary }) }); return this; }, surfacePalette(surface) { @@ -605,66 +692,66 @@ var $t = /* @__PURE__ */ __name((theme42 = {}) => { const darkSurface = (surface == null ? void 0 : surface.hasOwnProperty("dark")) ? surface == null ? void 0 : surface.dark : surface; const newColorScheme = { colorScheme: { - light: __spreadValues(__spreadValues({}, (_a2 = semantic == null ? void 0 : semantic.colorScheme) == null ? void 0 : _a2.light), !!lightSurface && { surface: lightSurface }), - dark: __spreadValues(__spreadValues({}, (_b = semantic == null ? void 0 : semantic.colorScheme) == null ? void 0 : _b.dark), !!darkSurface && { surface: darkSurface }) + light: __spreadValues$5(__spreadValues$5({}, (_a2 = semantic == null ? void 0 : semantic.colorScheme) == null ? void 0 : _a2.light), !!lightSurface && { surface: lightSurface }), + dark: __spreadValues$5(__spreadValues$5({}, (_b = semantic == null ? void 0 : semantic.colorScheme) == null ? void 0 : _b.dark), !!darkSurface && { surface: darkSurface }) } }; - _preset = __spreadProps(__spreadValues({}, _preset), { semantic: __spreadValues(__spreadValues({}, semantic), newColorScheme) }); + _preset = __spreadProps$1(__spreadValues$5({}, _preset), { semantic: __spreadValues$5(__spreadValues$5({}, semantic), newColorScheme) }); return this; }, // actions define({ useDefaultPreset = false, useDefaultOptions = false } = {}) { return { - preset: useDefaultPreset ? config_default.getPreset() : _preset, - options: useDefaultOptions ? config_default.getOptions() : _options + preset: useDefaultPreset ? config_default$1.getPreset() : _preset, + options: useDefaultOptions ? config_default$1.getOptions() : _options }; }, update({ mergePresets = true, mergeOptions: mergeOptions2 = true } = {}) { const newTheme = { - preset: mergePresets ? mergeKeys(config_default.getPreset(), _preset) : _preset, - options: mergeOptions2 ? __spreadValues(__spreadValues({}, config_default.getOptions()), _options) : _options + preset: mergePresets ? mergeKeys$2(config_default$1.getPreset(), _preset) : _preset, + options: mergeOptions2 ? __spreadValues$5(__spreadValues$5({}, config_default$1.getOptions()), _options) : _options }; - config_default.setTheme(newTheme); + config_default$1.setTheme(newTheme); return newTheme; }, use(options4) { const newTheme = this.define(options4); - config_default.setTheme(newTheme); + config_default$1.setTheme(newTheme); return newTheme; } }; -}, "$t"); -function toVariables_default(theme42, options4 = {}) { - const VARIABLE = config_default.defaults.variable; +}, "$t$1"); +function toVariables_default$1(theme43, options4 = {}) { + const VARIABLE = config_default$1.defaults.variable; const { prefix: prefix2 = VARIABLE.prefix, selector = VARIABLE.selector, excludedKeyRegex = VARIABLE.excludedKeyRegex } = options4; const _toVariables = /* @__PURE__ */ __name((_theme, _prefix = "") => { return Object.entries(_theme).reduce( (acc, [key, value4]) => { - const px = matchRegex(key, excludedKeyRegex) ? toNormalizeVariable(_prefix) : toNormalizeVariable(_prefix, toKebabCase(key)); - const v2 = toValue$2(value4); - if (isObject$e(v2)) { + const px = matchRegex$2(key, excludedKeyRegex) ? toNormalizeVariable$1(_prefix) : toNormalizeVariable$1(_prefix, toKebabCase$2(key)); + const v2 = toValue$5(value4); + if (isObject$g(v2)) { const { variables: variables2, tokens: tokens2 } = _toVariables(v2, px); - merge$2(acc["tokens"], tokens2); - merge$2(acc["variables"], variables2); + merge$3(acc["tokens"], tokens2); + merge$3(acc["variables"], variables2); } else { acc["tokens"].push((prefix2 ? px.replace(`${prefix2}-`, "") : px).replaceAll("-", ".")); - setProperty(acc["variables"], getVariableName(px), getVariableValue(v2, px, prefix2, [excludedKeyRegex])); + setProperty$1(acc["variables"], getVariableName$1(px), getVariableValue$1(v2, px, prefix2, [excludedKeyRegex])); } return acc; }, { variables: [], tokens: [] } ); }, "_toVariables"); - const { variables, tokens } = _toVariables(theme42, prefix2); + const { variables, tokens } = _toVariables(theme43, prefix2); return { value: variables, tokens, declarations: variables.join(""), - css: getRule(selector, variables.join("")) + css: getRule$1(selector, variables.join("")) }; } -__name(toVariables_default, "toVariables_default"); -var themeUtils_default = { +__name(toVariables_default$1, "toVariables_default$1"); +var themeUtils_default$1 = { regex: { rules: { class: { @@ -705,31 +792,44 @@ var themeUtils_default = { }); } }, - _toVariables(theme42, options4) { - return toVariables_default(theme42, { prefix: options4 == null ? void 0 : options4.prefix }); + _toVariables(theme43, options4) { + return toVariables_default$1(theme43, { prefix: options4 == null ? void 0 : options4.prefix }); }, - getCommon({ name: name2 = "", theme: theme42 = {}, params, set: set3, defaults: defaults2 }) { - var _c, _d, _e, _f; - const { preset, options: options4 } = theme42; - let primitive_css, primitive_tokens, semantic_css, semantic_tokens; - if (isNotEmpty(preset)) { - const { primitive, semantic } = preset; - const _a2 = semantic || {}, { colorScheme } = _a2, sRest = __objRest(_a2, ["colorScheme"]); - const _b = colorScheme || {}, { dark: dark2 } = _b, csRest = __objRest(_b, ["dark"]); - const prim_var = isNotEmpty(primitive) ? this._toVariables({ primitive }, options4) : {}; - const sRest_var = isNotEmpty(sRest) ? this._toVariables({ semantic: sRest }, options4) : {}; - const csRest_var = isNotEmpty(csRest) ? this._toVariables({ light: csRest }, options4) : {}; - const dark_var = isNotEmpty(dark2) ? this._toVariables({ dark: dark2 }, options4) : {}; - const [prim_css, prim_tokens] = [(_c = prim_var.declarations) != null ? _c : "", prim_var.tokens]; - const [sRest_css, sRest_tokens] = [(_d = sRest_var.declarations) != null ? _d : "", sRest_var.tokens || []]; - const [csRest_css, csRest_tokens] = [(_e = csRest_var.declarations) != null ? _e : "", csRest_var.tokens || []]; - const [dark_css, dark_tokens] = [(_f = dark_var.declarations) != null ? _f : "", dark_var.tokens || []]; + getCommon({ name: name2 = "", theme: theme43 = {}, params, set: set3, defaults: defaults2 }) { + var _e, _f, _g, _h, _i, _j, _k; + const { preset, options: options4 } = theme43; + let primitive_css, primitive_tokens, semantic_css, semantic_tokens, global_css, global_tokens, style2; + if (isNotEmpty$2(preset) && options4.transform !== "strict") { + const { primitive, semantic, extend: extend5 } = preset; + const _a2 = semantic || {}, { colorScheme } = _a2, sRest = __objRest$1(_a2, ["colorScheme"]); + const _b = extend5 || {}, { colorScheme: eColorScheme } = _b, eRest = __objRest$1(_b, ["colorScheme"]); + const _c = colorScheme || {}, { dark: dark2 } = _c, csRest = __objRest$1(_c, ["dark"]); + const _d = eColorScheme || {}, { dark: eDark } = _d, ecsRest = __objRest$1(_d, ["dark"]); + const prim_var = isNotEmpty$2(primitive) ? this._toVariables({ primitive }, options4) : {}; + const sRest_var = isNotEmpty$2(sRest) ? this._toVariables({ semantic: sRest }, options4) : {}; + const csRest_var = isNotEmpty$2(csRest) ? this._toVariables({ light: csRest }, options4) : {}; + const csDark_var = isNotEmpty$2(dark2) ? this._toVariables({ dark: dark2 }, options4) : {}; + const eRest_var = isNotEmpty$2(eRest) ? this._toVariables({ semantic: eRest }, options4) : {}; + const ecsRest_var = isNotEmpty$2(ecsRest) ? this._toVariables({ light: ecsRest }, options4) : {}; + const ecsDark_var = isNotEmpty$2(eDark) ? this._toVariables({ dark: eDark }, options4) : {}; + const [prim_css, prim_tokens] = [(_e = prim_var.declarations) != null ? _e : "", prim_var.tokens]; + const [sRest_css, sRest_tokens] = [(_f = sRest_var.declarations) != null ? _f : "", sRest_var.tokens || []]; + const [csRest_css, csRest_tokens] = [(_g = csRest_var.declarations) != null ? _g : "", csRest_var.tokens || []]; + const [csDark_css, csDark_tokens] = [(_h = csDark_var.declarations) != null ? _h : "", csDark_var.tokens || []]; + const [eRest_css, eRest_tokens] = [(_i = eRest_var.declarations) != null ? _i : "", eRest_var.tokens || []]; + const [ecsRest_css, ecsRest_tokens] = [(_j = ecsRest_var.declarations) != null ? _j : "", ecsRest_var.tokens || []]; + const [ecsDark_css, ecsDark_tokens] = [(_k = ecsDark_var.declarations) != null ? _k : "", ecsDark_var.tokens || []]; primitive_css = this.transformCSS(name2, prim_css, "light", "variable", options4, set3, defaults2); primitive_tokens = prim_tokens; - const semantic_light_css = this.transformCSS(name2, `${sRest_css}${csRest_css}color-scheme:light`, "light", "variable", options4, set3, defaults2); - const semantic_dark_css = this.transformCSS(name2, `${dark_css}color-scheme:dark`, "dark", "variable", options4, set3, defaults2); + const semantic_light_css = this.transformCSS(name2, `${sRest_css}${csRest_css}`, "light", "variable", options4, set3, defaults2); + const semantic_dark_css = this.transformCSS(name2, `${csDark_css}`, "dark", "variable", options4, set3, defaults2); semantic_css = `${semantic_light_css}${semantic_dark_css}`; - semantic_tokens = [.../* @__PURE__ */ new Set([...sRest_tokens, ...csRest_tokens, ...dark_tokens])]; + semantic_tokens = [.../* @__PURE__ */ new Set([...sRest_tokens, ...csRest_tokens, ...csDark_tokens])]; + const global_light_css = this.transformCSS(name2, `${eRest_css}${ecsRest_css}color-scheme:light`, "light", "variable", options4, set3, defaults2); + const global_dark_css = this.transformCSS(name2, `${ecsDark_css}color-scheme:dark`, "dark", "variable", options4, set3, defaults2); + global_css = `${global_light_css}${global_dark_css}`; + global_tokens = [.../* @__PURE__ */ new Set([...eRest_tokens, ...ecsRest_tokens, ...ecsDark_tokens])]; + style2 = resolve$4(preset.css, { dt: dt$1 }); } return { primitive: { @@ -739,85 +839,103 @@ var themeUtils_default = { semantic: { css: semantic_css, tokens: semantic_tokens - } + }, + global: { + css: global_css, + tokens: global_tokens + }, + style: style2 }; }, getPreset({ name: name2 = "", preset = {}, options: options4, params, set: set3, defaults: defaults2, selector }) { - var _c, _d, _e; - const _name = name2.replace("-directive", ""); - const _a2 = preset, { colorScheme } = _a2, vRest = __objRest(_a2, ["colorScheme"]); - const _b = colorScheme || {}, { dark: dark2 } = _b, csRest = __objRest(_b, ["dark"]); - const vRest_var = isNotEmpty(vRest) ? this._toVariables({ [_name]: vRest }, options4) : {}; - const csRest_var = isNotEmpty(csRest) ? this._toVariables({ [_name]: csRest }, options4) : {}; - const dark_var = isNotEmpty(dark2) ? this._toVariables({ [_name]: dark2 }, options4) : {}; - const [vRest_css, vRest_tokens] = [(_c = vRest_var.declarations) != null ? _c : "", vRest_var.tokens || []]; - const [csRest_css, csRest_tokens] = [(_d = csRest_var.declarations) != null ? _d : "", csRest_var.tokens || []]; - const [dark_css, dark_tokens] = [(_e = dark_var.declarations) != null ? _e : "", dark_var.tokens || []]; - const tokens = [.../* @__PURE__ */ new Set([...vRest_tokens, ...csRest_tokens, ...dark_tokens])]; - const light_variable_css = this.transformCSS(_name, `${vRest_css}${csRest_css}`, "light", "variable", options4, set3, defaults2, selector); - const dark_variable_css = this.transformCSS(_name, dark_css, "dark", "variable", options4, set3, defaults2, selector); + var _e, _f, _g; + let p_css, p_tokens, p_style; + if (isNotEmpty$2(preset) && options4.transform !== "strict") { + const _name = name2.replace("-directive", ""); + const _a2 = preset, { colorScheme, extend: extend5, css: css22 } = _a2, vRest = __objRest$1(_a2, ["colorScheme", "extend", "css"]); + const _b = extend5 || {}, { colorScheme: eColorScheme } = _b, evRest = __objRest$1(_b, ["colorScheme"]); + const _c = colorScheme || {}, { dark: dark2 } = _c, csRest = __objRest$1(_c, ["dark"]); + const _d = eColorScheme || {}, { dark: ecsDark } = _d, ecsRest = __objRest$1(_d, ["dark"]); + const vRest_var = isNotEmpty$2(vRest) ? this._toVariables({ [_name]: __spreadValues$5(__spreadValues$5({}, vRest), evRest) }, options4) : {}; + const csRest_var = isNotEmpty$2(csRest) ? this._toVariables({ [_name]: __spreadValues$5(__spreadValues$5({}, csRest), ecsRest) }, options4) : {}; + const csDark_var = isNotEmpty$2(dark2) ? this._toVariables({ [_name]: __spreadValues$5(__spreadValues$5({}, dark2), ecsDark) }, options4) : {}; + const [vRest_css, vRest_tokens] = [(_e = vRest_var.declarations) != null ? _e : "", vRest_var.tokens || []]; + const [csRest_css, csRest_tokens] = [(_f = csRest_var.declarations) != null ? _f : "", csRest_var.tokens || []]; + const [csDark_css, csDark_tokens] = [(_g = csDark_var.declarations) != null ? _g : "", csDark_var.tokens || []]; + const light_variable_css = this.transformCSS(_name, `${vRest_css}${csRest_css}`, "light", "variable", options4, set3, defaults2, selector); + const dark_variable_css = this.transformCSS(_name, csDark_css, "dark", "variable", options4, set3, defaults2, selector); + p_css = `${light_variable_css}${dark_variable_css}`; + p_tokens = [.../* @__PURE__ */ new Set([...vRest_tokens, ...csRest_tokens, ...csDark_tokens])]; + p_style = resolve$4(css22, { dt: dt$1 }); + } return { - css: `${light_variable_css}${dark_variable_css}`, - tokens + css: p_css, + tokens: p_tokens, + style: p_style }; }, - getPresetC({ name: name2 = "", theme: theme42 = {}, params, set: set3, defaults: defaults2 }) { + getPresetC({ name: name2 = "", theme: theme43 = {}, params, set: set3, defaults: defaults2 }) { var _a2; - const { preset, options: options4 } = theme42; + const { preset, options: options4 } = theme43; const cPreset = (_a2 = preset == null ? void 0 : preset.components) == null ? void 0 : _a2[name2]; return this.getPreset({ name: name2, preset: cPreset, options: options4, params, set: set3, defaults: defaults2 }); }, - getPresetD({ name: name2 = "", theme: theme42 = {}, params, set: set3, defaults: defaults2 }) { + getPresetD({ name: name2 = "", theme: theme43 = {}, params, set: set3, defaults: defaults2 }) { var _a2; const dName = name2.replace("-directive", ""); - const { preset, options: options4 } = theme42; + const { preset, options: options4 } = theme43; const dPreset = (_a2 = preset == null ? void 0 : preset.directives) == null ? void 0 : _a2[dName]; return this.getPreset({ name: dName, preset: dPreset, options: options4, params, set: set3, defaults: defaults2 }); }, + applyDarkColorScheme(options4) { + return !(options4.darkModeSelector === "none" || options4.darkModeSelector === false); + }, getColorSchemeOption(options4, defaults2) { var _a2; - return this.regex.resolve((_a2 = options4.darkModeSelector) != null ? _a2 : defaults2.options.darkModeSelector); + return this.applyDarkColorScheme(options4) ? this.regex.resolve(options4.darkModeSelector === true ? defaults2.options.darkModeSelector : (_a2 = options4.darkModeSelector) != null ? _a2 : defaults2.options.darkModeSelector) : []; }, getLayerOrder(name2, options4 = {}, params, defaults2) { const { cssLayer } = options4; if (cssLayer) { - const order = resolve$2(cssLayer.order || "primeui", params); + const order = resolve$4(cssLayer.order || "primeui", params); return `@layer ${order}`; } return ""; }, - getCommonStyleSheet({ name: name2 = "", theme: theme42 = {}, params, props = {}, set: set3, defaults: defaults2 }) { - const common = this.getCommon({ name: name2, theme: theme42, params, set: set3, defaults: defaults2 }); + getCommonStyleSheet({ name: name2 = "", theme: theme43 = {}, params, props = {}, set: set3, defaults: defaults2 }) { + const common = this.getCommon({ name: name2, theme: theme43, params, set: set3, defaults: defaults2 }); const _props = Object.entries(props).reduce((acc, [k2, v2]) => acc.push(`${k2}="${v2}"`) && acc, []).join(" "); return Object.entries(common || {}).reduce((acc, [key, value4]) => { if (value4 == null ? void 0 : value4.css) { - const _css = minifyCSS(value4 == null ? void 0 : value4.css); + const _css = minifyCSS$2(value4 == null ? void 0 : value4.css); const id3 = `${key}-variables`; acc.push(``); } return acc; }, []).join(""); }, - getStyleSheet({ name: name2 = "", theme: theme42 = {}, params, props = {}, set: set3, defaults: defaults2 }) { + getStyleSheet({ name: name2 = "", theme: theme43 = {}, params, props = {}, set: set3, defaults: defaults2 }) { var _a2; - const options4 = { name: name2, theme: theme42, params, set: set3, defaults: defaults2 }; + const options4 = { name: name2, theme: theme43, params, set: set3, defaults: defaults2 }; const preset_css = (_a2 = name2.includes("-directive") ? this.getPresetD(options4) : this.getPresetC(options4)) == null ? void 0 : _a2.css; const _props = Object.entries(props).reduce((acc, [k2, v2]) => acc.push(`${k2}="${v2}"`) && acc, []).join(" "); - return preset_css ? `` : ""; + return preset_css ? `` : ""; }, createTokens(obj = {}, defaults2, parentKey = "", parentPath = "", tokens = {}) { Object.entries(obj).forEach(([key, value4]) => { - const currentKey = matchRegex(key, defaults2.variable.excludedKeyRegex) ? parentKey : parentKey ? `${parentKey}.${toTokenKey$1(key)}` : toTokenKey$1(key); + const currentKey = matchRegex$2(key, defaults2.variable.excludedKeyRegex) ? parentKey : parentKey ? `${parentKey}.${toTokenKey$4(key)}` : toTokenKey$4(key); const currentPath = parentPath ? `${parentPath}.${key}` : key; - if (isObject$e(value4)) { + if (isObject$g(value4)) { this.createTokens(value4, defaults2, currentKey, currentPath, tokens); } else { tokens[currentKey] || (tokens[currentKey] = { paths: [], computed(colorScheme, tokenPathMap = {}) { - if (colorScheme) { - const path = this.paths.find((p2) => p2.scheme === colorScheme) || this.paths.find((p2) => p2.scheme === "none"); - return path == null ? void 0 : path.computed(colorScheme, tokenPathMap["binding"]); + var _a2, _b; + if (this.paths.length === 1) { + return (_a2 = this.paths[0]) == null ? void 0 : _a2.computed(this.paths[0].scheme, tokenPathMap["binding"]); + } else if (colorScheme && colorScheme !== "none") { + return (_b = this.paths.find((p2) => p2.scheme === colorScheme)) == null ? void 0 : _b.computed(colorScheme, tokenPathMap["binding"]); } return this.paths.map((p2) => p2.computed(p2.scheme, tokenPathMap[p2.scheme])); } @@ -831,18 +949,19 @@ var themeUtils_default = { let computedValue = value4; tokenPathMap["name"] = this.path; tokenPathMap["binding"] || (tokenPathMap["binding"] = {}); - if (matchRegex(value4, regex2)) { + if (matchRegex$2(value4, regex2)) { const val = value4.trim(); const _val = val.replaceAll(regex2, (v2) => { - var _a2, _b; + var _a2; const path = v2.replace(/{|}/g, ""); - return (_b = (_a2 = tokens[path]) == null ? void 0 : _a2.computed(colorScheme, tokenPathMap)) == null ? void 0 : _b.value; + const computed2 = (_a2 = tokens[path]) == null ? void 0 : _a2.computed(colorScheme, tokenPathMap); + return isArray$c(computed2) && computed2.length === 2 ? `light-dark(${computed2[0].value},${computed2[1].value})` : computed2 == null ? void 0 : computed2.value; }); const calculationRegex = /(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g; const cleanedVarRegex = /var\([^)]+\)/g; - computedValue = matchRegex(_val.replace(cleanedVarRegex, "0"), calculationRegex) ? `calc(${_val})` : _val; + computedValue = matchRegex$2(_val.replace(cleanedVarRegex, "0"), calculationRegex) ? `calc(${_val})` : _val; } - isEmpty$1(tokenPathMap["binding"]) && delete tokenPathMap["binding"]; + isEmpty$3(tokenPathMap["binding"]) && delete tokenPathMap["binding"]; return { colorScheme, path: this.path, @@ -859,38 +978,40 @@ var themeUtils_default = { var _a2; const normalizePath2 = /* @__PURE__ */ __name((str) => { const strArr = str.split("."); - return strArr.filter((s2) => !matchRegex(s2.toLowerCase(), defaults2.variable.excludedKeyRegex)).join("."); + return strArr.filter((s2) => !matchRegex$2(s2.toLowerCase(), defaults2.variable.excludedKeyRegex)).join("."); }, "normalizePath"); const token = normalizePath2(path); const colorScheme = path.includes("colorScheme.light") ? "light" : path.includes("colorScheme.dark") ? "dark" : void 0; const computedValues = [(_a2 = tokens[token]) == null ? void 0 : _a2.computed(colorScheme)].flat().filter((computed2) => computed2); return computedValues.length === 1 ? computedValues[0].value : computedValues.reduce((acc = {}, computed2) => { - const _a22 = computed2, { colorScheme: cs } = _a22, rest = __objRest(_a22, ["colorScheme"]); + const _a22 = computed2, { colorScheme: cs } = _a22, rest = __objRest$1(_a22, ["colorScheme"]); acc[cs] = rest; return acc; }, void 0); }, + getSelectorRule(selector1, selector2, type, css22) { + return type === "class" || type === "attr" ? getRule$1(isNotEmpty$2(selector2) ? `${selector1}${selector2},${selector1} ${selector2}` : selector1, css22) : getRule$1(selector1, isNotEmpty$2(selector2) ? getRule$1(selector2, css22) : css22); + }, transformCSS(name2, css22, mode2, type, options4 = {}, set3, defaults2, selector) { - if (isNotEmpty(css22)) { + if (isNotEmpty$2(css22)) { const { cssLayer } = options4; if (type !== "style") { const colorSchemeOption = this.getColorSchemeOption(options4, defaults2); - const _css = selector ? getRule(selector, css22) : css22; - css22 = mode2 === "dark" ? colorSchemeOption.reduce((acc, { selector: _selector }) => { - if (isNotEmpty(_selector)) { - acc += _selector.includes("[CSS]") ? _selector.replace("[CSS]", _css) : getRule(_selector, _css); + css22 = mode2 === "dark" ? colorSchemeOption.reduce((acc, { type: type2, selector: _selector }) => { + if (isNotEmpty$2(_selector)) { + acc += _selector.includes("[CSS]") ? _selector.replace("[CSS]", css22) : this.getSelectorRule(_selector, selector, type2, css22); } return acc; - }, "") : getRule(selector != null ? selector : ":root", css22); + }, "") : getRule$1(selector != null ? selector : ":root", css22); } if (cssLayer) { const layerOptions = { name: "primeui", order: "primeui" }; - isObject$e(cssLayer) && (layerOptions.name = resolve$2(cssLayer.name, { name: name2, type })); - if (isNotEmpty(layerOptions.name)) { - css22 = getRule(`@layer ${layerOptions.name}`, css22); + isObject$g(cssLayer) && (layerOptions.name = resolve$4(cssLayer.name, { name: name2, type })); + if (isNotEmpty$2(layerOptions.name)) { + css22 = getRule$1(`@layer ${layerOptions.name}`, css22); set3 == null ? void 0 : set3.layerNames(layerOptions.name); } } @@ -899,12 +1020,12 @@ var themeUtils_default = { return ""; } }; -var config_default = { +var config_default$1 = { defaults: { variable: { prefix: "p", selector: ":root", - excludedKeyRegex: /^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states)$/gi + excludedKeyRegex: /^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi }, options: { prefix: "p", @@ -918,12 +1039,12 @@ var config_default = { _loadingStyles: /* @__PURE__ */ new Set(), _tokens: {}, update(newValues = {}) { - const { theme: theme42 } = newValues; - if (theme42) { - this._theme = __spreadProps(__spreadValues({}, theme42), { - options: __spreadValues(__spreadValues({}, this.defaults.options), theme42.options) + const { theme: theme43 } = newValues; + if (theme43) { + this._theme = __spreadProps$1(__spreadValues$5({}, theme43), { + options: __spreadValues$5(__spreadValues$5({}, this.defaults.options), theme43.options) }); - this._tokens = themeUtils_default.createTokens(this.preset, this.defaults); + this._tokens = themeUtils_default$1.createTokens(this.preset, this.defaults); this.clearLoadedStyleNames(); } }, @@ -946,26 +1067,26 @@ var config_default = { }, setTheme(newValue2) { this.update({ theme: newValue2 }); - service_default.emit("theme:change", newValue2); + service_default$1.emit("theme:change", newValue2); }, getPreset() { return this.preset; }, setPreset(newValue2) { - this._theme = __spreadProps(__spreadValues({}, this.theme), { preset: newValue2 }); - this._tokens = themeUtils_default.createTokens(newValue2, this.defaults); + this._theme = __spreadProps$1(__spreadValues$5({}, this.theme), { preset: newValue2 }); + this._tokens = themeUtils_default$1.createTokens(newValue2, this.defaults); this.clearLoadedStyleNames(); - service_default.emit("preset:change", newValue2); - service_default.emit("theme:change", this.theme); + service_default$1.emit("preset:change", newValue2); + service_default$1.emit("theme:change", this.theme); }, getOptions() { return this.options; }, setOptions(newValue2) { - this._theme = __spreadProps(__spreadValues({}, this.theme), { options: newValue2 }); + this._theme = __spreadProps$1(__spreadValues$5({}, this.theme), { options: newValue2 }); this.clearLoadedStyleNames(); - service_default.emit("options:change", newValue2); - service_default.emit("theme:change", this.theme); + service_default$1.emit("options:change", newValue2); + service_default$1.emit("theme:change", this.theme); }, getLayerNames() { return [...this._layerNames]; @@ -989,34 +1110,34 @@ var config_default = { this._loadedStyleNames.clear(); }, getTokenValue(tokenPath) { - return themeUtils_default.getTokenValue(this.tokens, tokenPath, this.defaults); + return themeUtils_default$1.getTokenValue(this.tokens, tokenPath, this.defaults); }, getCommon(name2 = "", params) { - return themeUtils_default.getCommon({ name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); + return themeUtils_default$1.getCommon({ name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); }, getComponent(name2 = "", params) { const options4 = { name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; - return themeUtils_default.getPresetC(options4); + return themeUtils_default$1.getPresetC(options4); }, getDirective(name2 = "", params) { const options4 = { name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; - return themeUtils_default.getPresetD(options4); + return themeUtils_default$1.getPresetD(options4); }, getCustomPreset(name2 = "", preset, selector, params) { const options4 = { name: name2, preset, options: this.options, selector, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; - return themeUtils_default.getPreset(options4); + return themeUtils_default$1.getPreset(options4); }, getLayerOrderCSS(name2 = "") { - return themeUtils_default.getLayerOrder(name2, this.options, { names: this.getLayerNames() }, this.defaults); + return themeUtils_default$1.getLayerOrder(name2, this.options, { names: this.getLayerNames() }, this.defaults); }, transformCSS(name2 = "", css22, type = "style", mode2) { - return themeUtils_default.transformCSS(name2, css22, mode2, type, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults); + return themeUtils_default$1.transformCSS(name2, css22, mode2, type, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults); }, getCommonStyleSheet(name2 = "", params, props = {}) { - return themeUtils_default.getCommonStyleSheet({ name: name2, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); + return themeUtils_default$1.getCommonStyleSheet({ name: name2, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); }, getStyleSheet(name2, params, props = {}) { - return themeUtils_default.getStyleSheet({ name: name2, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); + return themeUtils_default$1.getStyleSheet({ name: name2, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); }, onStyleMounted(name2) { this._loadingStyles.add(name2); @@ -1027,36 +1148,36 @@ var config_default = { onStyleLoaded(event, { name: name2 }) { if (this._loadingStyles.size) { this._loadingStyles.delete(name2); - service_default.emit(`theme:${name2}:load`, event); - !this._loadingStyles.size && service_default.emit("theme:load"); + service_default$1.emit(`theme:${name2}:load`, event); + !this._loadingStyles.size && service_default$1.emit("theme:load"); } } }; -function updatePreset(...presets) { - const newPreset = mergeKeys(config_default.getPreset(), ...presets); - config_default.setPreset(newPreset); +function updatePreset$1(...presets) { + const newPreset = mergeKeys$2(config_default$1.getPreset(), ...presets); + config_default$1.setPreset(newPreset); return newPreset; } -__name(updatePreset, "updatePreset"); -function updatePrimaryPalette(primary) { - return $t().primaryPalette(primary).update().preset; +__name(updatePreset$1, "updatePreset$1"); +function updatePrimaryPalette$1(primary) { + return $t$1().primaryPalette(primary).update().preset; } -__name(updatePrimaryPalette, "updatePrimaryPalette"); -function updateSurfacePalette(palette) { - return $t().surfacePalette(palette).update().preset; +__name(updatePrimaryPalette$1, "updatePrimaryPalette$1"); +function updateSurfacePalette$1(palette) { + return $t$1().surfacePalette(palette).update().preset; } -__name(updateSurfacePalette, "updateSurfacePalette"); -function usePreset(...presets) { - const newPreset = mergeKeys(...presets); - config_default.setPreset(newPreset); +__name(updateSurfacePalette$1, "updateSurfacePalette$1"); +function usePreset$1(...presets) { + const newPreset = mergeKeys$2(...presets); + config_default$1.setPreset(newPreset); return newPreset; } -__name(usePreset, "usePreset"); -function useTheme(theme42) { - return $t(theme42).update({ mergePresets: false }); +__name(usePreset$1, "usePreset$1"); +function useTheme$1(theme43) { + return $t$1(theme43).update({ mergePresets: false }); } -__name(useTheme, "useTheme"); -var index$1n = { +__name(useTheme$1, "useTheme$1"); +var index$1r = { root: { transitionDuration: "{transition.duration}" }, @@ -1081,7 +1202,7 @@ var index$1n = { width: "{focus.ring.width}", style: "{focus.ring.style}", color: "{focus.ring.color}", - offset: "{focus.ring.offset}", + offset: "-1px", shadow: "{focus.ring.shadow}" }, toggleIcon: { @@ -1107,11 +1228,12 @@ var index$1n = { padding: "0 1.125rem 1.125rem 1.125rem" } }; -var index$1m = { +var index$1q = { root: { background: "{form.field.background}", disabledBackground: "{form.field.disabled.background}", filledBackground: "{form.field.filled.background}", + filledHoverBackground: "{form.field.filled.hover.background}", filledFocusBackground: "{form.field.filled.focus.background}", borderColor: "{form.field.border.color}", hoverBorderColor: "{form.field.hover.border.color}", @@ -1120,6 +1242,7 @@ var index$1m = { color: "{form.field.color}", disabledColor: "{form.field.disabled.color}", placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", shadow: "{form.field.shadow}", paddingX: "{form.field.padding.x}", paddingY: "{form.field.padding.y}", @@ -1163,6 +1286,12 @@ var index$1m = { }, dropdown: { width: "2.5rem", + sm: { + width: "2rem" + }, + lg: { + width: "3rem" + }, borderColor: "{form.field.border.color}", hoverBorderColor: "{form.field.border.color}", activeBorderColor: "{form.field.border.color}", @@ -1183,6 +1312,10 @@ var index$1m = { }, colorScheme: { light: { + chip: { + focusBackground: "{surface.200}", + focusColor: "{surface.800}" + }, dropdown: { background: "{surface.100}", hoverBackground: "{surface.200}", @@ -1193,6 +1326,10 @@ var index$1m = { } }, dark: { + chip: { + focusBackground: "{surface.700}", + focusColor: "{surface.0}" + }, dropdown: { background: "{surface.800}", hoverBackground: "{surface.700}", @@ -1204,30 +1341,46 @@ var index$1m = { } } }; -var index$1l = { +var index$1p = { root: { width: "2rem", height: "2rem", fontSize: "1rem", background: "{content.border.color}", + color: "{content.color}", borderRadius: "{content.border.radius}" }, + icon: { + size: "1rem" + }, group: { borderColor: "{content.background}", - offset: "-1rem" + offset: "-0.75rem" }, lg: { width: "3rem", height: "3rem", - fontSize: "1.5rem" + fontSize: "1.5rem", + icon: { + size: "1.5rem" + }, + group: { + offset: "-1rem" + } }, xl: { width: "4rem", height: "4rem", - fontSize: "2rem" + fontSize: "2rem", + icon: { + size: "2rem" + }, + group: { + offset: "-1.5rem" + } } }; -var index$1k = { +var index$1o = { root: { borderRadius: "{border.radius.md}", padding: "0 0.5rem", @@ -1317,3933 +1470,7 @@ var index$1k = { } } }; -var index$1j = { - root: { - borderRadius: "{content.border.radius}" - } -}; -var index$1i = { - root: { - padding: "1rem", - background: "{content.background}", - gap: "0.5rem", - transitionDuration: "{transition.duration}" - }, - item: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - borderRadius: "{content.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - hoverColor: "{navigation.item.icon.focus.color}" - }, - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - separator: { - color: "{navigation.item.icon.color}" - } -}; -var index$1h = { - root: { - borderRadius: "{form.field.border.radius}", - roundedBorderRadius: "2rem", - gap: "0.5rem", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - iconOnlyWidth: "2.5rem", - sm: { - fontSize: "0.875rem", - paddingX: "0.625rem", - paddingY: "0.375rem" - }, - lg: { - fontSize: "1.125rem", - paddingX: "0.875rem", - paddingY: "0.625rem" - }, - label: { - fontWeight: "500" - }, - raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - offset: "{focus.ring.offset}" - }, - badgeSize: "1rem", - transitionDuration: "{form.field.transition.duration}" - }, - colorScheme: { - light: { - root: { - primary: { - background: "{primary.color}", - hoverBackground: "{primary.hover.color}", - activeBackground: "{primary.active.color}", - borderColor: "{primary.color}", - hoverBorderColor: "{primary.hover.color}", - activeBorderColor: "{primary.active.color}", - color: "{primary.contrast.color}", - hoverColor: "{primary.contrast.color}", - activeColor: "{primary.contrast.color}", - focusRing: { - color: "{primary.color}", - shadow: "none" - } - }, - secondary: { - background: "{surface.100}", - hoverBackground: "{surface.200}", - activeBackground: "{surface.300}", - borderColor: "{surface.100}", - hoverBorderColor: "{surface.200}", - activeBorderColor: "{surface.300}", - color: "{surface.600}", - hoverColor: "{surface.700}", - activeColor: "{surface.800}", - focusRing: { - color: "{surface.600}", - shadow: "none" - } - }, - info: { - background: "{sky.500}", - hoverBackground: "{sky.600}", - activeBackground: "{sky.700}", - borderColor: "{sky.500}", - hoverBorderColor: "{sky.600}", - activeBorderColor: "{sky.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{sky.500}", - shadow: "none" - } - }, - success: { - background: "{green.500}", - hoverBackground: "{green.600}", - activeBackground: "{green.700}", - borderColor: "{green.500}", - hoverBorderColor: "{green.600}", - activeBorderColor: "{green.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{green.500}", - shadow: "none" - } - }, - warn: { - background: "{orange.500}", - hoverBackground: "{orange.600}", - activeBackground: "{orange.700}", - borderColor: "{orange.500}", - hoverBorderColor: "{orange.600}", - activeBorderColor: "{orange.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{orange.500}", - shadow: "none" - } - }, - help: { - background: "{purple.500}", - hoverBackground: "{purple.600}", - activeBackground: "{purple.700}", - borderColor: "{purple.500}", - hoverBorderColor: "{purple.600}", - activeBorderColor: "{purple.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{purple.500}", - shadow: "none" - } - }, - danger: { - background: "{red.500}", - hoverBackground: "{red.600}", - activeBackground: "{red.700}", - borderColor: "{red.500}", - hoverBorderColor: "{red.600}", - activeBorderColor: "{red.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{red.500}", - shadow: "none" - } - }, - contrast: { - background: "{surface.950}", - hoverBackground: "{surface.900}", - activeBackground: "{surface.800}", - borderColor: "{surface.950}", - hoverBorderColor: "{surface.900}", - activeBorderColor: "{surface.800}", - color: "{surface.0}", - hoverColor: "{surface.0}", - activeColor: "{surface.0}", - focusRing: { - color: "{surface.950}", - shadow: "none" - } - } - }, - outlined: { - primary: { - hoverBackground: "{primary.50}", - activeBackground: "{primary.100}", - borderColor: "{primary.200}", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.500}" - }, - success: { - hoverBackground: "{green.50}", - activeBackground: "{green.100}", - borderColor: "{green.200}", - color: "{green.500}" - }, - info: { - hoverBackground: "{sky.50}", - activeBackground: "{sky.100}", - borderColor: "{sky.200}", - color: "{sky.500}" - }, - warn: { - hoverBackground: "{orange.50}", - activeBackground: "{orange.100}", - borderColor: "{orange.200}", - color: "{orange.500}" - }, - help: { - hoverBackground: "{purple.50}", - activeBackground: "{purple.100}", - borderColor: "{purple.200}", - color: "{purple.500}" - }, - danger: { - hoverBackground: "{red.50}", - activeBackground: "{red.100}", - borderColor: "{red.200}", - color: "{red.500}" - }, - contrast: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - borderColor: "{surface.700}", - color: "{surface.950}" - }, - plain: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.700}" - } - }, - text: { - primary: { - hoverBackground: "{primary.50}", - activeBackground: "{primary.100}", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - color: "{surface.500}" - }, - success: { - hoverBackground: "{green.50}", - activeBackground: "{green.100}", - color: "{green.500}" - }, - info: { - hoverBackground: "{sky.50}", - activeBackground: "{sky.100}", - color: "{sky.500}" - }, - warn: { - hoverBackground: "{orange.50}", - activeBackground: "{orange.100}", - color: "{orange.500}" - }, - help: { - hoverBackground: "{purple.50}", - activeBackground: "{purple.100}", - color: "{purple.500}" - }, - danger: { - hoverBackground: "{red.50}", - activeBackground: "{red.100}", - color: "{red.500}" - }, - plain: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - color: "{surface.700}" - } - }, - link: { - color: "{primary.color}", - hoverColor: "{primary.color}", - activeColor: "{primary.color}" - } - }, - dark: { - root: { - primary: { - background: "{primary.color}", - hoverBackground: "{primary.hover.color}", - activeBackground: "{primary.active.color}", - borderColor: "{primary.color}", - hoverBorderColor: "{primary.hover.color}", - activeBorderColor: "{primary.active.color}", - color: "{primary.contrast.color}", - hoverColor: "{primary.contrast.color}", - activeColor: "{primary.contrast.color}", - focusRing: { - color: "{primary.color}", - shadow: "none" - } - }, - secondary: { - background: "{surface.800}", - hoverBackground: "{surface.700}", - activeBackground: "{surface.600}", - borderColor: "{surface.800}", - hoverBorderColor: "{surface.700}", - activeBorderColor: "{surface.600}", - color: "{surface.300}", - hoverColor: "{surface.200}", - activeColor: "{surface.100}", - focusRing: { - color: "{surface.300}", - shadow: "none" - } - }, - info: { - background: "{sky.400}", - hoverBackground: "{sky.300}", - activeBackground: "{sky.200}", - borderColor: "{sky.400}", - hoverBorderColor: "{sky.300}", - activeBorderColor: "{sky.200}", - color: "{sky.950}", - hoverColor: "{sky.950}", - activeColor: "{sky.950}", - focusRing: { - color: "{sky.400}", - shadow: "none" - } - }, - success: { - background: "{green.400}", - hoverBackground: "{green.300}", - activeBackground: "{green.200}", - borderColor: "{green.400}", - hoverBorderColor: "{green.300}", - activeBorderColor: "{green.200}", - color: "{green.950}", - hoverColor: "{green.950}", - activeColor: "{green.950}", - focusRing: { - color: "{green.400}", - shadow: "none" - } - }, - warn: { - background: "{orange.400}", - hoverBackground: "{orange.300}", - activeBackground: "{orange.200}", - borderColor: "{orange.400}", - hoverBorderColor: "{orange.300}", - activeBorderColor: "{orange.200}", - color: "{orange.950}", - hoverColor: "{orange.950}", - activeColor: "{orange.950}", - focusRing: { - color: "{orange.400}", - shadow: "none" - } - }, - help: { - background: "{purple.400}", - hoverBackground: "{purple.300}", - activeBackground: "{purple.200}", - borderColor: "{purple.400}", - hoverBorderColor: "{purple.300}", - activeBorderColor: "{purple.200}", - color: "{purple.950}", - hoverColor: "{purple.950}", - activeColor: "{purple.950}", - focusRing: { - color: "{purple.400}", - shadow: "none" - } - }, - danger: { - background: "{red.400}", - hoverBackground: "{red.300}", - activeBackground: "{red.200}", - borderColor: "{red.400}", - hoverBorderColor: "{red.300}", - activeBorderColor: "{red.200}", - color: "{red.950}", - hoverColor: "{red.950}", - activeColor: "{red.950}", - focusRing: { - color: "{red.400}", - shadow: "none" - } - }, - contrast: { - background: "{surface.0}", - hoverBackground: "{surface.100}", - activeBackground: "{surface.200}", - borderColor: "{surface.0}", - hoverBorderColor: "{surface.100}", - activeBorderColor: "{surface.200}", - color: "{surface.950}", - hoverColor: "{surface.950}", - activeColor: "{surface.950}", - focusRing: { - color: "{surface.0}", - shadow: "none" - } - } - }, - outlined: { - primary: { - hoverBackground: "color-mix(in srgb, {primary.color}, transparent 96%)", - activeBackground: "color-mix(in srgb, {primary.color}, transparent 84%)", - borderColor: "{primary.700}", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "rgba(255,255,255,0.04)", - activeBackground: "rgba(255,255,255,0.16)", - borderColor: "{surface.700}", - color: "{surface.400}" - }, - success: { - hoverBackground: "color-mix(in srgb, {green.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {green.400}, transparent 84%)", - borderColor: "{green.700}", - color: "{green.400}" - }, - info: { - hoverBackground: "color-mix(in srgb, {sky.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {sky.400}, transparent 84%)", - borderColor: "{sky.700}", - color: "{sky.400}" - }, - warn: { - hoverBackground: "color-mix(in srgb, {orange.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {orange.400}, transparent 84%)", - borderColor: "{orange.700}", - color: "{orange.400}" - }, - help: { - hoverBackground: "color-mix(in srgb, {purple.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {purple.400}, transparent 84%)", - borderColor: "{purple.700}", - color: "{purple.400}" - }, - danger: { - hoverBackground: "color-mix(in srgb, {red.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {red.400}, transparent 84%)", - borderColor: "{red.700}", - color: "{red.400}" - }, - contrast: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - borderColor: "{surface.500}", - color: "{surface.0}" - }, - plain: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - borderColor: "{surface.600}", - color: "{surface.0}" - } - }, - text: { - primary: { - hoverBackground: "color-mix(in srgb, {primary.color}, transparent 96%)", - activeBackground: "color-mix(in srgb, {primary.color}, transparent 84%)", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - color: "{surface.400}" - }, - success: { - hoverBackground: "color-mix(in srgb, {green.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {green.400}, transparent 84%)", - color: "{green.400}" - }, - info: { - hoverBackground: "color-mix(in srgb, {sky.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {sky.400}, transparent 84%)", - color: "{sky.400}" - }, - warn: { - hoverBackground: "color-mix(in srgb, {orange.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {orange.400}, transparent 84%)", - color: "{orange.400}" - }, - help: { - hoverBackground: "color-mix(in srgb, {purple.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {purple.400}, transparent 84%)", - color: "{purple.400}" - }, - danger: { - hoverBackground: "color-mix(in srgb, {red.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {red.400}, transparent 84%)", - color: "{red.400}" - }, - plain: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - color: "{surface.0}" - } - }, - link: { - color: "{primary.color}", - hoverColor: "{primary.color}", - activeColor: "{primary.color}" - } - } - } -}; -var index$1g = { - root: { - background: "{content.background}", - borderRadius: "{border.radius.xl}", - color: "{content.color}", - shadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)" - }, - body: { - padding: "1.25rem", - gap: "0.5rem" - }, - caption: { - gap: "0.5rem" - }, - title: { - fontSize: "1.25rem", - fontWeight: "500" - }, - subtitle: { - color: "{text.muted.color}" - } -}; -var index$1f = { - root: { - transitionDuration: "{transition.duration}" - }, - content: { - gap: "0.25rem" - }, - indicatorList: { - padding: "1rem", - gap: "0.5rem" - }, - indicator: { - width: "2rem", - height: "0.5rem", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - colorScheme: { - light: { - indicator: { - background: "{surface.200}", - hoverBackground: "{surface.300}", - activeBackground: "{primary.color}" - } - }, - dark: { - indicator: { - background: "{surface.700}", - hoverBackground: "{surface.600}", - activeBackground: "{primary.color}" - } - } - } -}; -var index$1e = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}" - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}", - icon: { - color: "{list.option.icon.color}", - focusColor: "{list.option.icon.focus.color}", - size: "0.875rem" - } - } -}; -var index$1d = { - root: { - borderRadius: "{border.radius.sm}", - width: "1.25rem", - height: "1.25rem", - background: "{form.field.background}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.border.color}", - checkedBorderColor: "{primary.color}", - checkedHoverBorderColor: "{primary.hover.color}", - checkedFocusBorderColor: "{primary.color}", - checkedDisabledBorderColor: "{form.field.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - shadow: "{form.field.shadow}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - icon: { - size: "0.875rem", - color: "{form.field.color}", - checkedColor: "{primary.contrast.color}", - checkedHoverColor: "{primary.contrast.color}", - disabledColor: "{form.field.disabled.color}" - } -}; -var index$1c = { - root: { - borderRadius: "16px", - paddingX: "0.75rem", - paddingY: "0.5rem", - gap: "0.5rem", - transitionDuration: "{transition.duration}" - }, - image: { - width: "2rem", - height: "2rem" - }, - icon: { - size: "1rem" - }, - removeIcon: { - size: "1rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - } - }, - colorScheme: { - light: { - root: { - background: "{surface.100}", - color: "{surface.800}" - }, - icon: { - color: "{surface.800}" - }, - removeIcon: { - color: "{surface.800}" - } - }, - dark: { - root: { - background: "{surface.800}", - color: "{surface.0}" - }, - icon: { - color: "{surface.0}" - }, - removeIcon: { - color: "{surface.0}" - } - } - } -}; -var index$1b = { - root: { - transitionDuration: "{transition.duration}" - }, - preview: { - width: "1.5rem", - height: "1.5rem", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - panel: { - shadow: "{overlay.popover.shadow}", - borderRadius: "{overlay.popover.borderRadius}" - }, - colorScheme: { - light: { - panel: { - background: "{surface.800}", - borderColor: "{surface.900}" - }, - handle: { - color: "{surface.0}" - } - }, - dark: { - panel: { - background: "{surface.900}", - borderColor: "{surface.700}" - }, - handle: { - color: "{surface.0}" - } - } - } -}; -var index$1a = { - icon: { - size: "2rem", - color: "{overlay.modal.color}" - }, - content: { - gap: "1rem" - } -}; -var index$19 = { - root: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - color: "{overlay.popover.color}", - borderRadius: "{overlay.popover.border.radius}", - shadow: "{overlay.popover.shadow}", - gutter: "10px", - arrowOffset: "1.25rem" - }, - content: { - padding: "{overlay.popover.padding}", - gap: "1rem" - }, - icon: { - size: "1.5rem", - color: "{overlay.popover.color}" - }, - footer: { - gap: "0.5rem", - padding: "0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}" - } -}; -var index$18 = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - transitionDuration: "{transition.duration}" - }, - list: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - } -}; -var index$17 = { - root: { - transitionDuration: "{transition.duration}" - }, - header: { - background: "{content.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - headerCell: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - gap: "0.5rem", - padding: "0.75rem 1rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - columnTitle: { - fontWeight: "600" - }, - row: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - bodyCell: { - borderColor: "{datatable.border.color}", - padding: "0.75rem 1rem" - }, - footerCell: { - background: "{content.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - padding: "0.75rem 1rem" - }, - columnFooter: { - fontWeight: "600" - }, - footer: { - background: "{content.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - dropPointColor: "{primary.color}", - columnResizerWidth: "0.5rem", - resizeIndicator: { - width: "1px", - color: "{primary.color}" - }, - sortIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}" - }, - loadingIcon: { - size: "2rem" - }, - rowToggleButton: { - hoverBackground: "{content.hover.background}", - selectedHoverBackground: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - selectedHoverColor: "{primary.color}", - size: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - filter: { - inlineGap: "0.5rem", - overlaySelect: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - overlayPopover: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - borderRadius: "{overlay.popover.border.radius}", - color: "{overlay.popover.color}", - shadow: "{overlay.popover.shadow}", - padding: "{overlay.popover.padding}", - gap: "0.5rem" - }, - rule: { - borderColor: "{content.border.color}" - }, - constraintList: { - padding: "{list.padding}", - gap: "{list.gap}" - }, - constraint: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - separator: { - borderColor: "{content.border.color}" - }, - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - } - }, - paginatorTop: { - borderColor: "{datatable.border.color}", - borderWidth: "0 0 1px 0" - }, - paginatorBottom: { - borderColor: "{datatable.border.color}", - borderWidth: "0 0 1px 0" - }, - colorScheme: { - light: { - root: { - borderColor: "{content.border.color}" - }, - row: { - stripedBackground: "{surface.50}" - }, - bodyCell: { - selectedBorderColor: "{primary.100}" - } - }, - dark: { - root: { - borderColor: "{surface.800}" - }, - row: { - stripedBackground: "{surface.950}" - }, - bodyCell: { - selectedBorderColor: "{primary.900}" - } - } - } -}; -var index$16 = { - root: { - borderColor: "transparent", - borderWidth: "0", - borderRadius: "0", - padding: "0" - }, - header: { - background: "{content.background}", - color: "{content.color}", - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem", - borderRadius: "0" - }, - content: { - background: "{content.background}", - color: "{content.color}", - borderColor: "transparent", - borderWidth: "0", - padding: "0", - borderRadius: "0" - }, - footer: { - background: "{content.background}", - color: "{content.color}", - borderColor: "{content.border.color}", - borderWidth: "1px 0 0 0", - padding: "0.75rem 1rem", - borderRadius: "0" - }, - paginatorTop: { - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0" - }, - paginatorBottom: { - borderColor: "{content.border.color}", - borderWidth: "1px 0 0 0" - } -}; -var index$15 = { - root: { - transitionDuration: "{transition.duration}" - }, - panel: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.popover.shadow}", - padding: "{overlay.popover.padding}" - }, - header: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - padding: "0 0 0.5rem 0", - fontWeight: "500", - gap: "0.5rem" - }, - title: { - gap: "0.5rem", - fontWeight: "500" - }, - dropdown: { - width: "2.5rem", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - inputIcon: { - color: "{form.field.icon.color}" - }, - selectMonth: { - hoverBackground: "{content.hover.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - padding: "0.25rem 0.5rem", - borderRadius: "{content.border.radius}" - }, - selectYear: { - hoverBackground: "{content.hover.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - padding: "0.25rem 0.5rem", - borderRadius: "{content.border.radius}" - }, - group: { - borderColor: "{content.border.color}", - gap: "{overlay.popover.padding}" - }, - dayView: { - margin: "0.5rem 0 0 0" - }, - weekDay: { - padding: "0.25rem", - fontWeight: "500", - color: "{content.color}" - }, - date: { - hoverBackground: "{content.hover.background}", - selectedBackground: "{primary.color}", - rangeSelectedBackground: "{highlight.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{primary.contrast.color}", - rangeSelectedColor: "{highlight.color}", - width: "2rem", - height: "2rem", - borderRadius: "50%", - padding: "0.25rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - monthView: { - margin: "0.5rem 0 0 0" - }, - month: { - borderRadius: "{content.border.radius}" - }, - yearView: { - margin: "0.5rem 0 0 0" - }, - year: { - borderRadius: "{content.border.radius}" - }, - buttonbar: { - padding: "0.5rem 0 0 0", - borderColor: "{content.border.color}" - }, - timePicker: { - padding: "0.5rem 0 0 0", - borderColor: "{content.border.color}", - gap: "0.5rem", - buttonGap: "0.25rem" - }, - colorScheme: { - light: { - dropdown: { - background: "{surface.100}", - hoverBackground: "{surface.200}", - activeBackground: "{surface.300}", - color: "{surface.600}", - hoverColor: "{surface.700}", - activeColor: "{surface.800}" - }, - today: { - background: "{surface.200}", - color: "{surface.900}" - } - }, - dark: { - dropdown: { - background: "{surface.800}", - hoverBackground: "{surface.700}", - activeBackground: "{surface.600}", - color: "{surface.300}", - hoverColor: "{surface.200}", - activeColor: "{surface.100}" - }, - today: { - background: "{surface.700}", - color: "{surface.0}" - } - } - } -}; -var index$14 = { - root: { - background: "{overlay.modal.background}", - borderColor: "{overlay.modal.border.color}", - color: "{overlay.modal.color}", - borderRadius: "{overlay.modal.border.radius}", - shadow: "{overlay.modal.shadow}" - }, - header: { - padding: "{overlay.modal.padding}", - gap: "0.5rem" - }, - title: { - fontSize: "1.25rem", - fontWeight: "600" - }, - content: { - padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}" - }, - footer: { - padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}", - gap: "0.5rem" - } -}; -var index$13 = { - root: { - borderColor: "{content.border.color}" - }, - content: { - background: "{content.background}", - color: "{text.color}" - }, - horizontal: { - margin: "1rem 0", - padding: "0 1rem", - content: { - padding: "0 0.5rem" - } - }, - vertical: { - margin: "0 1rem", - padding: "0.5rem 0", - content: { - padding: "0.5rem 0" - } - } -}; -var index$12 = { - root: { - background: "rgba(255, 255, 255, 0.1)", - borderColor: "rgba(255, 255, 255, 0.2)", - padding: "0.5rem", - borderRadius: "{border.radius.xl}" - }, - item: { - borderRadius: "{content.border.radius}", - padding: "0.5rem", - size: "3rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$11 = { - root: { - background: "{overlay.modal.background}", - borderColor: "{overlay.modal.border.color}", - color: "{overlay.modal.color}", - borderRadius: "{overlay.modal.border.radius}", - shadow: "{overlay.modal.shadow}" - }, - header: { - padding: "{overlay.modal.padding}" - }, - title: { - fontSize: "1.5rem", - fontWeight: "600" - }, - content: { - padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}" - } -}; -var index$10 = { - toolbar: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}" - }, - toolbarItem: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}", - padding: "{list.padding}" - }, - overlayOption: { - focusBackground: "{list.option.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - content: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}" - } -}; -var index$$ = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - padding: "0 1.125rem 1.125rem 1.125rem", - transitionDuration: "{transition.duration}" - }, - legend: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - borderRadius: "{content.border.radius}", - borderWidth: "1px", - borderColor: "transparent", - padding: "0.5rem 0.75rem", - gap: "0.5rem", - fontWeight: "600", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - toggleIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}" - }, - content: { - padding: "0" - } -}; -var index$_ = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - transitionDuration: "{transition.duration}" - }, - header: { - background: "transparent", - color: "{text.color}", - padding: "1.125rem", - borderWidth: "0", - borderRadius: "0", - gap: "0.5rem" - }, - content: { - highlightBorderColor: "{primary.color}", - padding: "0 1.125rem 1.125rem 1.125rem" - }, - file: { - padding: "1rem", - gap: "1rem", - borderColor: "{content.border.color}", - info: { - gap: "0.5rem" - } - }, - progressbar: { - height: "0.25rem" - }, - basic: { - gap: "0.5rem" - } -}; -var index$Z = { - root: { - color: "{form.field.float.label.color}", - focusColor: "{form.field.float.label.focus.color}", - invalidColor: "{form.field.float.label.invalid.color}", - transitionDuration: "0.2s" - } -}; -var index$Y = { - root: { - borderWidth: "1px", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - transitionDuration: "{transition.duration}" - }, - navButton: { - background: "rgba(255, 255, 255, 0.1)", - hoverBackground: "rgba(255, 255, 255, 0.2)", - color: "{surface.100}", - hoverColor: "{surface.0}", - size: "3rem", - gutter: "0.5rem", - prev: { - borderRadius: "50%" - }, - next: { - borderRadius: "50%" - }, - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - navIcon: { - size: "1.5rem" - }, - thumbnailsContent: { - background: "{content.background}", - padding: "1rem 0.25rem" - }, - thumbnailNavButton: { - size: "2rem", - borderRadius: "{content.border.radius}", - gutter: "0.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - thumbnailNavButtonIcon: { - size: "1rem" - }, - caption: { - background: "rgba(0, 0, 0, 0.5)", - color: "{surface.100}", - padding: "1rem" - }, - indicatorList: { - gap: "0.5rem", - padding: "1rem" - }, - indicatorButton: { - width: "1rem", - height: "1rem", - activeBackground: "{primary.color}", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - insetIndicatorList: { - background: "rgba(0, 0, 0, 0.5)" - }, - insetIndicatorButton: { - background: "rgba(255, 255, 255, 0.4)", - hoverBackground: "rgba(255, 255, 255, 0.6)", - activeBackground: "rgba(255, 255, 255, 0.9)" - }, - mask: { - background: "{mask.background}", - color: "{mask.color}" - }, - closeButton: { - size: "3rem", - gutter: "0.5rem", - background: "rgba(255, 255, 255, 0.1)", - hoverBackground: "rgba(255, 255, 255, 0.2)", - color: "{surface.50}", - hoverColor: "{surface.0}", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - closeButtonIcon: { - size: "1.5rem" - }, - colorScheme: { - light: { - thumbnailNavButton: { - hoverBackground: "{surface.100}", - color: "{surface.600}", - hoverColor: "{surface.700}" - }, - indicatorButton: { - background: "{surface.200}", - hoverBackground: "{surface.300}" - } - }, - dark: { - thumbnailNavButton: { - hoverBackground: "{surface.700}", - color: "{surface.400}", - hoverColor: "{surface.0}" - }, - indicatorButton: { - background: "{surface.700}", - hoverBackground: "{surface.600}" - } - } - } -}; -var index$X = { - icon: { - color: "{form.field.icon.color}" - } -}; -var index$W = { - root: { - transitionDuration: "{transition.duration}" - }, - preview: { - icon: { - size: "1.5rem" - }, - mask: { - background: "{mask.background}", - color: "{mask.color}" - } - }, - toolbar: { - position: { - left: "auto", - right: "1rem", - top: "1rem", - bottom: "auto" - }, - blur: "8px", - background: "rgba(255,255,255,0.1)", - borderColor: "rgba(255,255,255,0.2)", - borderWidth: "1px", - borderRadius: "30px", - padding: ".5rem", - gap: "0.5rem" - }, - action: { - hoverBackground: "rgba(255,255,255,0.1)", - color: "{surface.50}", - hoverColor: "{surface.0}", - size: "3rem", - iconSize: "1.5rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$V = { - root: { - padding: "{form.field.padding.y} {form.field.padding.x}", - borderRadius: "{content.border.radius}", - gap: "0.5rem" - }, - text: { - fontWeight: "500" - }, - icon: { - size: "1rem" - }, - colorScheme: { - light: { - info: { - background: "color-mix(in srgb, {blue.50}, transparent 5%)", - borderColor: "{blue.200}", - color: "{blue.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)" - }, - success: { - background: "color-mix(in srgb, {green.50}, transparent 5%)", - borderColor: "{green.200}", - color: "{green.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)" - }, - warn: { - background: "color-mix(in srgb,{yellow.50}, transparent 5%)", - borderColor: "{yellow.200}", - color: "{yellow.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)" - }, - error: { - background: "color-mix(in srgb, {red.50}, transparent 5%)", - borderColor: "{red.200}", - color: "{red.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)" - }, - secondary: { - background: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)" - }, - contrast: { - background: "{surface.900}", - borderColor: "{surface.950}", - color: "{surface.50}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)" - } - }, - dark: { - info: { - background: "color-mix(in srgb, {blue.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", - color: "{blue.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)" - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", - color: "{green.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)" - }, - warn: { - background: "color-mix(in srgb, {yellow.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", - color: "{yellow.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)" - }, - error: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", - color: "{red.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)" - }, - secondary: { - background: "{surface.800}", - borderColor: "{surface.700}", - color: "{surface.300}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)" - }, - contrast: { - background: "{surface.0}", - borderColor: "{surface.100}", - color: "{surface.950}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)" - } - } - } -}; -var index$U = { - root: { - padding: "{form.field.padding.y} {form.field.padding.x}", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{transition.duration}" - }, - display: { - hoverBackground: "{content.hover.background}", - hoverColor: "{content.hover.color}" - } -}; -var index$T = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - chip: { - borderRadius: "{border.radius.sm}" - }, - colorScheme: { - light: { - chip: { - focusBackground: "{surface.200}", - color: "{surface.800}" - } - }, - dark: { - chip: { - focusBackground: "{surface.700}", - color: "{surface.0}" - } - } - } -}; -var index$S = { - addon: { - background: "{form.field.background}", - borderColor: "{form.field.border.color}", - color: "{form.field.icon.color}", - borderRadius: "{form.field.border.radius}" - } -}; -var index$R = { - root: { - transitionDuration: "{transition.duration}" - }, - button: { - width: "2.5rem", - borderRadius: "{form.field.border.radius}", - verticalPadding: "{form.field.padding.y}" - }, - colorScheme: { - light: { - button: { - background: "transparent", - hoverBackground: "{surface.100}", - activeBackground: "{surface.200}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - color: "{surface.400}", - hoverColor: "{surface.500}", - activeColor: "{surface.600}" - } - }, - dark: { - button: { - background: "transparent", - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - color: "{surface.400}", - hoverColor: "{surface.300}", - activeColor: "{surface.200}" - } - } - } -}; -var index$Q = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}", - sm: { - fontSize: "0.875rem", - paddingX: "0.625rem", - paddingY: "0.375rem" - }, - lg: { - fontSize: "1.125rem", - paddingX: "0.875rem", - paddingY: "0.625rem" - } - } -}; -var index$P = { - root: { - transitionDuration: "{transition.duration}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - value: { - background: "{primary.color}" - }, - range: { - background: "{content.border.color}" - }, - text: { - color: "{text.muted.color}" - } -}; -var index$O = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - shadow: "{form.field.shadow}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}", - header: { - padding: "{list.header.padding}" - } - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - checkmark: { - color: "{list.option.color}", - gutterStart: "-0.375rem", - gutterEnd: "0.375rem" - }, - emptyMessage: { - padding: "{list.option.padding}" - }, - colorScheme: { - light: { - option: { - stripedBackground: "{surface.50}" - } - }, - dark: { - option: { - stripedBackground: "{surface.900}" - } - } - } -}; -var index$N = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - gap: "0.5rem", - verticalOrientation: { - padding: "{navigation.list.padding}", - gap: "0" - }, - horizontalOrientation: { - padding: "0.5rem 0.75rem" - }, - transitionDuration: "{transition.duration}" - }, - baseItem: { - borderRadius: "{content.border.radius}", - padding: "{navigation.item.padding}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - overlay: { - padding: "0", - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - shadow: "{overlay.navigation.shadow}", - gap: "0.5rem" - }, - submenu: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - submenuLabel: { - padding: "{navigation.submenu.label.padding}", - fontWeight: "{navigation.submenu.label.font.weight}", - background: "{navigation.submenu.label.background.}", - color: "{navigation.submenu.label.color}" - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - }, - mobileButton: { - borderRadius: "50%", - size: "1.75rem", - color: "{text.muted.color}", - hoverColor: "{text.muted.hover.color}", - hoverBackground: "{content.hover.background}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$M = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - transitionDuration: "{transition.duration}" - }, - list: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}" - } - }, - submenuLabel: { - padding: "{navigation.submenu.label.padding}", - fontWeight: "{navigation.submenu.label.font.weight}", - background: "{navigation.submenu.label.background}", - color: "{navigation.submenu.label.color}" - }, - separator: { - borderColor: "{content.border.color}" - } -}; -var index$L = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - gap: "0.5rem", - padding: "0.5rem 0.75rem", - transitionDuration: "{transition.duration}" - }, - baseItem: { - borderRadius: "{content.border.radius}", - padding: "{navigation.item.padding}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - submenu: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}", - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - mobileIndent: "1rem" - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - }, - mobileButton: { - borderRadius: "50%", - size: "1.75rem", - color: "{text.muted.color}", - hoverColor: "{text.muted.hover.color}", - hoverBackground: "{content.hover.background}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$K = { - root: { - borderRadius: "{content.border.radius}", - borderWidth: "1px", - transitionDuration: "{transition.duration}" - }, - content: { - padding: "0.5rem 0.75rem", - gap: "0.5rem" - }, - text: { - fontSize: "1rem", - fontWeight: "500" - }, - icon: { - size: "1.125rem" - }, - closeButton: { - width: "1.75rem", - height: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - offset: "{focus.ring.offset}" - } - }, - closeIcon: { - size: "1rem" - }, - colorScheme: { - light: { - info: { - background: "color-mix(in srgb, {blue.50}, transparent 5%)", - borderColor: "{blue.200}", - color: "{blue.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "{blue.100}", - focusRing: { - color: "{blue.600}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.50}, transparent 5%)", - borderColor: "{green.200}", - color: "{green.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "{green.100}", - focusRing: { - color: "{green.600}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb,{yellow.50}, transparent 5%)", - borderColor: "{yellow.200}", - color: "{yellow.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "{yellow.100}", - focusRing: { - color: "{yellow.600}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.50}, transparent 5%)", - borderColor: "{red.200}", - color: "{red.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "{red.100}", - focusRing: { - color: "{red.600}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.200}", - focusRing: { - color: "{surface.600}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.900}", - borderColor: "{surface.950}", - color: "{surface.50}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.800}", - focusRing: { - color: "{surface.50}", - shadow: "none" - } - } - } - }, - dark: { - info: { - background: "color-mix(in srgb, {blue.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", - color: "{blue.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{blue.500}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", - color: "{green.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{green.500}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb, {yellow.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", - color: "{yellow.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{yellow.500}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", - color: "{red.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{red.500}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.800}", - borderColor: "{surface.700}", - color: "{surface.300}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.700}", - focusRing: { - color: "{surface.300}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.0}", - borderColor: "{surface.100}", - color: "{surface.950}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.100}", - focusRing: { - color: "{surface.950}", - shadow: "none" - } - } - } - } - } -}; -var index$J = { - root: { - borderRadius: "{content.border.radius}", - gap: "1rem" - }, - meters: { - background: "{content.border.color}", - size: "0.5rem" - }, - label: { - gap: "0.5rem" - }, - labelMarker: { - size: "0.5rem" - }, - labelIcon: { - size: "1rem" - }, - labelList: { - verticalGap: "0.5rem", - horizontalGap: "1rem" - } -}; -var index$I = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}", - header: { - padding: "{list.header.padding}" - } - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}", - gap: "0.5rem" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - chip: { - borderRadius: "{border.radius.sm}" - }, - emptyMessage: { - padding: "{list.option.padding}" - } -}; -var index$H = { - root: { - gap: "1.125rem" - }, - controls: { - gap: "0.5rem" - } -}; -var index$G = { - root: { - gutter: "0.75rem", - transitionDuration: "{transition.duration}" - }, - node: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - selectedColor: "{highlight.color}", - hoverColor: "{content.hover.color}", - padding: "0.75rem 1rem", - toggleablePadding: "0.75rem 1rem 1.25rem 1rem", - borderRadius: "{content.border.radius}" - }, - nodeToggleButton: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - borderColor: "{content.border.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - size: "1.5rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - connector: { - color: "{content.border.color}", - borderRadius: "{content.border.radius}", - height: "24px" - } -}; -var index$F = { - root: { - outline: { - width: "2px", - color: "{content.background}" - } - } -}; -var index$E = { - root: { - padding: "0.5rem 1rem", - gap: "0.25rem", - borderRadius: "{content.border.radius}", - background: "{content.background}", - color: "{content.color}", - transitionDuration: "{transition.duration}" - }, - navButton: { - background: "transparent", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}", - selectedColor: "{highlight.color}", - width: "2.5rem", - height: "2.5rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - currentPageReport: { - color: "{text.muted.color}" - }, - jumpToPageInput: { - maxWidth: "2.5rem" - } -}; -var index$D = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}" - }, - header: { - background: "transparent", - color: "{text.color}", - padding: "1.125rem", - borderColor: "{content.border.color}", - borderWidth: "0", - borderRadius: "0" - }, - toggleableHeader: { - padding: "0.375rem 1.125rem" - }, - title: { - fontWeight: "600" - }, - content: { - padding: "0 1.125rem 1.125rem 1.125rem" - }, - footer: { - padding: "0 1.125rem 1.125rem 1.125rem" - } -}; -var index$C = { - root: { - gap: "0.5rem", - transitionDuration: "{transition.duration}" - }, - panel: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderWidth: "1px", - color: "{content.color}", - padding: "0.25rem 0.25rem", - borderRadius: "{content.border.radius}", - first: { - borderWidth: "1px", - topBorderRadius: "{content.border.radius}" - }, - last: { - borderWidth: "1px", - bottomBorderRadius: "{content.border.radius}" - } - }, - item: { - focusBackground: "{navigation.item.focus.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - gap: "0.5rem", - padding: "{navigation.item.padding}", - borderRadius: "{content.border.radius}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}" - } - }, - submenu: { - indent: "1rem" - }, - submenuIcon: { - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}" - } -}; -var index$B = { - meter: { - background: "{content.border.color}", - borderRadius: "{content.border.radius}", - height: ".75rem" - }, - icon: { - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - borderRadius: "{overlay.popover.border.radius}", - color: "{overlay.popover.color}", - padding: "{overlay.popover.padding}", - shadow: "{overlay.popover.shadow}" - }, - content: { - gap: "0.5rem" - }, - colorScheme: { - light: { - strength: { - weakBackground: "{red.500}", - mediumBackground: "{amber.500}", - strongBackground: "{green.500}" - } - }, - dark: { - strength: { - weakBackground: "{red.400}", - mediumBackground: "{amber.400}", - strongBackground: "{green.400}" - } - } - } -}; -var index$A = { - root: { - gap: "1.125rem" - }, - controls: { - gap: "0.5rem" - } -}; -var index$z = { - root: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - color: "{overlay.popover.color}", - borderRadius: "{overlay.popover.border.radius}", - shadow: "{overlay.popover.shadow}", - gutter: "10px", - arrowOffset: "1.25rem" - }, - content: { - padding: "{overlay.popover.padding}" - } -}; -var index$y = { - root: { - background: "{content.border.color}", - borderRadius: "{content.border.radius}", - height: "1.25rem" - }, - value: { - background: "{primary.color}" - }, - label: { - color: "{primary.contrast.color}", - fontSize: "0.75rem", - fontWeight: "600" - } -}; -var index$x = { - colorScheme: { - light: { - root: { - "color.1": "{red.500}", - "color.2": "{blue.500}", - "color.3": "{green.500}", - "color.4": "{yellow.500}" - } - }, - dark: { - root: { - "color.1": "{red.400}", - "color.2": "{blue.400}", - "color.3": "{green.400}", - "color.4": "{yellow.400}" - } - } - } -}; -var index$w = { - root: { - width: "1.25rem", - height: "1.25rem", - background: "{form.field.background}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.border.color}", - checkedBorderColor: "{primary.color}", - checkedHoverBorderColor: "{primary.hover.color}", - checkedFocusBorderColor: "{primary.color}", - checkedDisabledBorderColor: "{form.field.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - shadow: "{form.field.shadow}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - icon: { - size: "0.75rem", - checkedColor: "{primary.contrast.color}", - checkedHoverColor: "{primary.contrast.color}", - disabledColor: "{form.field.disabled.color}" - } -}; -var index$v = { - root: { - gap: "0.25rem", - transitionDuration: "{transition.duration}" - }, - icon: { - size: "1rem", - color: "{text.muted.color}", - hoverColor: "{primary.color}", - activeColor: "{primary.color}" - } -}; -var index$u = { - colorScheme: { - light: { - root: { - background: "rgba(0,0,0,0.1)" - } - }, - dark: { - root: { - background: "rgba(255,255,255,0.3)" - } - } - } -}; -var index$t = { - root: { - transitionDuration: "{transition.duration}" - }, - bar: { - size: "9px", - borderRadius: "{border.radius.sm}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - colorScheme: { - light: { - bar: { - background: "{surface.100}" - } - }, - dark: { - bar: { - background: "{surface.800}" - } - } - } -}; -var index$s = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}", - header: { - padding: "{list.header.padding}" - } - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - clearIcon: { - color: "{form.field.icon.color}" - }, - checkmark: { - color: "{list.option.color}", - gutterStart: "-0.375rem", - gutterEnd: "0.375rem" - }, - emptyMessage: { - padding: "{list.option.padding}" - } -}; -var index$r = { - root: { - borderRadius: "{form.field.border.radius}" - }, - colorScheme: { - light: { - root: { - invalidBorderColor: "{form.field.invalid.border.color}" - } - }, - dark: { - root: { - invalidBorderColor: "{form.field.invalid.border.color}" - } - } - } -}; -var index$q = { - root: { - borderRadius: "{content.border.radius}" - }, - colorScheme: { - light: { - root: { - background: "{surface.200}", - animationBackground: "rgba(255,255,255,0.4)" - } - }, - dark: { - root: { - background: "rgba(255, 255, 255, 0.06)", - animationBackground: "rgba(255, 255, 255, 0.04)" - } - } - } -}; -var index$p = { - root: { - transitionDuration: "{transition.duration}" - }, - track: { - background: "{content.border.color}", - borderRadius: "{content.border.radius}", - size: "3px" - }, - range: { - background: "{primary.color}" - }, - handle: { - width: "20px", - height: "20px", - borderRadius: "50%", - background: "{content.border.color}", - hoverBackground: "{content.border.color}", - content: { - borderRadius: "50%", - hoverBackground: "{content.background}", - width: "16px", - height: "16px", - shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)" - }, - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - colorScheme: { - light: { - handle: { - contentBackground: "{surface.0}" - } - }, - dark: { - handle: { - contentBackground: "{surface.950}" - } - } - } -}; -var index$o = { - root: { - gap: "0.5rem", - transitionDuration: "{transition.duration}" - } -}; -var index$n = { - root: { - borderRadius: "{form.field.border.radius}", - roundedBorderRadius: "2rem", - raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)" - } -}; -var index$m = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - transitionDuration: "{transition.duration}" - }, - gutter: { - background: "{content.border.color}" - }, - handle: { - size: "24px", - background: "transparent", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$l = { - root: { - transitionDuration: "{transition.duration}" - }, - separator: { - background: "{content.border.color}", - activeBackground: "{primary.color}", - margin: "0 0 0 1.625rem", - size: "2px" - }, - step: { - padding: "0.5rem", - gap: "1rem" - }, - stepHeader: { - padding: "0", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - gap: "0.5rem" - }, - stepTitle: { - color: "{text.muted.color}", - activeColor: "{primary.color}", - fontWeight: "500" - }, - stepNumber: { - background: "{content.background}", - activeBackground: "{content.background}", - borderColor: "{content.border.color}", - activeBorderColor: "{content.border.color}", - color: "{text.muted.color}", - activeColor: "{primary.color}", - size: "2rem", - fontSize: "1.143rem", - fontWeight: "500", - borderRadius: "50%", - shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" - }, - steppanels: { - padding: "0.875rem 0.5rem 1.125rem 0.5rem" - }, - steppanel: { - background: "{content.background}", - color: "{content.color}", - padding: "0 0 0 1rem" - } -}; -var index$k = { - root: { - transitionDuration: "{transition.duration}" - }, - separator: { - background: "{content.border.color}" - }, - itemLink: { - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - gap: "0.5rem" - }, - itemLabel: { - color: "{text.muted.color}", - activeColor: "{primary.color}", - fontWeight: "500" - }, - itemNumber: { - background: "{content.background}", - activeBackground: "{content.background}", - borderColor: "{content.border.color}", - activeBorderColor: "{content.border.color}", - color: "{text.muted.color}", - activeColor: "{primary.color}", - size: "2rem", - fontSize: "1.143rem", - fontWeight: "500", - borderRadius: "50%", - shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" - } -}; -var index$j = { - root: { - transitionDuration: "{transition.duration}" - }, - tablist: { - borderWidth: "0 0 1px 0", - background: "{content.background}", - borderColor: "{content.border.color}" - }, - item: { - background: "transparent", - hoverBackground: "transparent", - activeBackground: "transparent", - borderWidth: "0 0 1px 0", - borderColor: "{content.border.color}", - hoverBorderColor: "{content.border.color}", - activeBorderColor: "{primary.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}", - padding: "1rem 1.125rem", - fontWeight: "600", - margin: "0 0 -1px 0", - gap: "0.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - itemIcon: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}" - }, - activeBar: { - height: "1px", - bottom: "-1px", - background: "{primary.color}" - } -}; -var index$i = { - root: { - transitionDuration: "{transition.duration}" - }, - tablist: { - borderWidth: "0 0 1px 0", - background: "{content.background}", - borderColor: "{content.border.color}" - }, - tab: { - background: "transparent", - hoverBackground: "transparent", - activeBackground: "transparent", - borderWidth: "0 0 1px 0", - borderColor: "{content.border.color}", - hoverBorderColor: "{content.border.color}", - activeBorderColor: "{primary.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}", - padding: "1rem 1.125rem", - fontWeight: "600", - margin: "0 0 -1px 0", - gap: "0.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - tabpanel: { - background: "{content.background}", - color: "{content.color}", - padding: "0.875rem 1.125rem 1.125rem 1.125rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "inset {focus.ring.shadow}" - } - }, - navButton: { - background: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - width: "2.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - activeBar: { - height: "1px", - bottom: "-1px", - background: "{primary.color}" - }, - colorScheme: { - light: { - navButton: { - shadow: "0px 0px 10px 50px rgba(255, 255, 255, 0.6)" - } - }, - dark: { - navButton: { - shadow: "0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)" - } - } - } -}; -var index$h = { - root: { - transitionDuration: "{transition.duration}" - }, - tabList: { - background: "{content.background}", - borderColor: "{content.border.color}" - }, - tab: { - borderColor: "{content.border.color}", - activeBorderColor: "{primary.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}" - }, - tabPanel: { - background: "{content.background}", - color: "{content.color}" - }, - navButton: { - background: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}" - }, - colorScheme: { - light: { - navButton: { - shadow: "0px 0px 10px 50px rgba(255, 255, 255, 0.6)" - } - }, - dark: { - navButton: { - shadow: "0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)" - } - } - } -}; -var index$g = { - root: { - fontSize: "0.875rem", - fontWeight: "700", - padding: "0.25rem 0.5rem", - gap: "0.25rem", - borderRadius: "{content.border.radius}", - roundedBorderRadius: "{border.radius.xl}" - }, - icon: { - size: "0.75rem" - }, - colorScheme: { - light: { - primary: { - background: "{primary.100}", - color: "{primary.700}" - }, - secondary: { - background: "{surface.100}", - color: "{surface.600}" - }, - success: { - background: "{green.100}", - color: "{green.700}" - }, - info: { - background: "{sky.100}", - color: "{sky.700}" - }, - warn: { - background: "{orange.100}", - color: "{orange.700}" - }, - danger: { - background: "{red.100}", - color: "{red.700}" - }, - contrast: { - background: "{surface.950}", - color: "{surface.0}" - } - }, - dark: { - primary: { - background: "color-mix(in srgb, {primary.500}, transparent 84%)", - color: "{primary.300}" - }, - secondary: { - background: "{surface.800}", - color: "{surface.300}" - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - color: "{green.300}" - }, - info: { - background: "color-mix(in srgb, {sky.500}, transparent 84%)", - color: "{sky.300}" - }, - warn: { - background: "color-mix(in srgb, {orange.500}, transparent 84%)", - color: "{orange.300}" - }, - danger: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - color: "{red.300}" - }, - contrast: { - background: "{surface.0}", - color: "{surface.950}" - } - } - } -}; -var index$f = { - root: { - background: "{form.field.background}", - borderColor: "{form.field.border.color}", - color: "{form.field.color}", - height: "18rem", - padding: "{form.field.padding.y} {form.field.padding.x}", - borderRadius: "{form.field.border.radius}" - }, - prompt: { - gap: "0.25rem" - }, - commandResponse: { - margin: "2px 0" - } -}; -var index$e = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - } -}; -var index$d = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - transitionDuration: "{transition.duration}" - }, - list: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - submenuLabel: { - padding: "{navigation.submenu.label.padding}", - fontWeight: "{navigation.submenu.label.font.weight}", - background: "{navigation.submenu.label.background.}", - color: "{navigation.submenu.label.color}" - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - } -}; -var index$c = { - event: { - minHeight: "5rem" - }, - horizontal: { - eventContent: { - padding: "1rem 0" - } - }, - vertical: { - eventContent: { - padding: "0 1rem" - } - }, - eventMarker: { - size: "1.125rem", - borderRadius: "50%", - borderWidth: "2px", - background: "{content.background}", - borderColor: "{content.border.color}", - content: { - borderRadius: "50%", - size: "0.375rem", - background: "{primary.color}", - insetShadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" - } - }, - eventConnector: { - color: "{content.border.color}", - size: "2px" - } -}; -var index$b = { - root: { - width: "25rem", - borderRadius: "{content.border.radius}", - borderWidth: "1px", - transitionDuration: "{transition.duration}" - }, - icon: { - size: "1.125rem" - }, - content: { - padding: "{overlay.popover.padding}", - gap: "0.5rem" - }, - text: { - gap: "0.5rem" - }, - summary: { - fontWeight: "500", - fontSize: "1rem" - }, - detail: { - fontWeight: "500", - fontSize: "0.875rem" - }, - closeButton: { - width: "1.75rem", - height: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - offset: "{focus.ring.offset}" - } - }, - closeIcon: { - size: "1rem" - }, - colorScheme: { - light: { - blur: "1.5px", - info: { - background: "color-mix(in srgb, {blue.50}, transparent 5%)", - borderColor: "{blue.200}", - color: "{blue.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "{blue.100}", - focusRing: { - color: "{blue.600}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.50}, transparent 5%)", - borderColor: "{green.200}", - color: "{green.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "{green.100}", - focusRing: { - color: "{green.600}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb,{yellow.50}, transparent 5%)", - borderColor: "{yellow.200}", - color: "{yellow.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "{yellow.100}", - focusRing: { - color: "{yellow.600}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.50}, transparent 5%)", - borderColor: "{red.200}", - color: "{red.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "{red.100}", - focusRing: { - color: "{red.600}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.200}", - focusRing: { - color: "{surface.600}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.900}", - borderColor: "{surface.950}", - color: "{surface.50}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.800}", - focusRing: { - color: "{surface.50}", - shadow: "none" - } - } - } - }, - dark: { - blur: "10px", - info: { - background: "color-mix(in srgb, {blue.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", - color: "{blue.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{blue.500}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", - color: "{green.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{green.500}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb, {yellow.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", - color: "{yellow.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{yellow.500}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", - color: "{red.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{red.500}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.800}", - borderColor: "{surface.700}", - color: "{surface.300}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.700}", - focusRing: { - color: "{surface.300}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.0}", - borderColor: "{surface.100}", - color: "{surface.950}", - detailColor: "{surface.950}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.100}", - focusRing: { - color: "{surface.950}", - shadow: "none" - } - } - } - } - } -}; -var index$a = { - root: { - padding: "0.5rem 1rem", - borderRadius: "{content.border.radius}", - gap: "0.5rem", - fontWeight: "500", - disabledBackground: "{form.field.disabled.background}", - disabledBorderColor: "{form.field.disabled.background}", - disabledColor: "{form.field.disabled.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - icon: { - disabledColor: "{form.field.disabled.color}" - }, - content: { - left: "0.25rem", - top: "0.25rem", - checkedShadow: "0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)" - }, - colorScheme: { - light: { - root: { - background: "{surface.100}", - checkedBackground: "{surface.100}", - hoverBackground: "{surface.100}", - borderColor: "{surface.100}", - color: "{surface.500}", - hoverColor: "{surface.700}", - checkedColor: "{surface.900}", - checkedBorderColor: "{surface.100}" - }, - content: { - checkedBackground: "{surface.0}" - }, - icon: { - color: "{surface.500}", - hoverColor: "{surface.700}", - checkedColor: "{surface.900}" - } - }, - dark: { - root: { - background: "{surface.950}", - checkedBackground: "{surface.950}", - hoverBackground: "{surface.950}", - borderColor: "{surface.950}", - color: "{surface.400}", - hoverColor: "{surface.300}", - checkedColor: "{surface.0}", - checkedBorderColor: "{surface.950}" - }, - content: { - checkedBackground: "{surface.800}" - }, - icon: { - color: "{surface.400}", - hoverColor: "{surface.300}", - checkedColor: "{surface.0}" - } - } - } -}; -var index$9 = { - root: { - width: "2.5rem", - height: "1.5rem", - borderRadius: "30px", - gap: "0.25rem", - shadow: "{form.field.shadow}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - borderWidth: "1px", - borderColor: "transparent", - hoverBorderColor: "transparent", - checkedBorderColor: "transparent", - checkedHoverBorderColor: "transparent", - invalidBorderColor: "{form.field.invalid.border.color}", - transitionDuration: "{form.field.transition.duration}", - slideDuration: "0.2s", - disabledBackground: "{form.field.disabled.background}" - }, - handle: { - borderRadius: "50%", - size: "1rem", - disabledBackground: "{form.field.disabled.color}" - }, - colorScheme: { - light: { - root: { - background: "{surface.300}", - hoverBackground: "{surface.400}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}" - }, - handle: { - background: "{surface.0}", - hoverBackground: "{surface.0}", - checkedBackground: "{surface.0}", - checkedHoverBackground: "{surface.0}" - } - }, - dark: { - root: { - background: "{surface.700}", - hoverBackground: "{surface.600}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}" - }, - handle: { - background: "{surface.400}", - hoverBackground: "{surface.300}", - checkedBackground: "{surface.900}", - checkedHoverBackground: "{surface.900}" - } - } - } -}; -var index$8 = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - gap: "0.5rem", - padding: "0.75rem" - } -}; -var index$7 = { - root: { - maxWidth: "12.5rem", - gutter: "0.25rem", - shadow: "{overlay.popover.shadow}", - padding: "0.5rem 0.75rem", - borderRadius: "{overlay.popover.border.radius}" - }, - colorScheme: { - light: { - root: { - background: "{surface.700}", - color: "{surface.0}" - } - }, - dark: { - root: { - background: "{surface.700}", - color: "{surface.0}" - } - } - } -}; -var index$6 = { - root: { - background: "{content.background}", - color: "{content.color}", - padding: "1rem", - gap: "2px", - indent: "1rem", - transitionDuration: "{transition.duration}" - }, - node: { - padding: "0.25rem 0.5rem", - borderRadius: "{content.border.radius}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{text.color}", - hoverColor: "{text.hover.color}", - selectedColor: "{highlight.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - }, - gap: "0.25rem" - }, - nodeIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}", - selectedColor: "{highlight.color}" - }, - nodeToggleButton: { - borderRadius: "50%", - size: "1.75rem", - hoverBackground: "{content.hover.background}", - selectedHoverBackground: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}", - selectedHoverColor: "{primary.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - loadingIcon: { - size: "2rem" - } -}; -var index$5 = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - tree: { - padding: "{list.padding}" - }, - emptyMessage: { - padding: "{list.option.padding}" - }, - chip: { - borderRadius: "{border.radius.sm}" - } -}; -var index$4 = { - root: { - transitionDuration: "{transition.duration}" - }, - header: { - background: "{content.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - headerCell: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - gap: "0.5rem", - padding: "0.75rem 1rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - columnTitle: { - fontWeight: "600" - }, - row: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - bodyCell: { - borderColor: "{treetable.border.color}", - padding: "0.75rem 1rem", - gap: "0.5rem" - }, - footerCell: { - background: "{content.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - padding: "0.75rem 1rem" - }, - columnFooter: { - fontWeight: "600" - }, - footer: { - background: "{content.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - columnResizerWidth: "0.5rem", - resizeIndicator: { - width: "1px", - color: "{primary.color}" - }, - sortIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}" - }, - loadingIcon: { - size: "2rem" - }, - nodeToggleButton: { - hoverBackground: "{content.hover.background}", - selectedHoverBackground: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - selectedHoverColor: "{primary.color}", - size: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - paginatorTop: { - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0" - }, - paginatorBottom: { - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0" - }, - colorScheme: { - light: { - root: { - borderColor: "{content.border.color}" - }, - bodyCell: { - selectedBorderColor: "{primary.100}" - } - }, - dark: { - root: { - borderColor: "{surface.800}" - }, - bodyCell: { - selectedBorderColor: "{primary.900}" - } - } - } -}; -var index$3 = { - loader: { - mask: { - background: "{content.background}", - color: "{text.muted.color}" - }, - icon: { - size: "2rem" - } - } -}; -var index$2 = { +var index$1n = { primitive: { borderRadius: { none: "0", @@ -5568,6 +1795,16 @@ var index$2 = { formField: { paddingX: "0.75rem", paddingY: "0.5rem", + sm: { + fontSize: "0.875rem", + paddingX: "0.625rem", + paddingY: "0.375rem" + }, + lg: { + fontSize: "1.125rem", + paddingX: "0.875rem", + paddingY: "0.625rem" + }, borderRadius: "{border.radius.md}", focusRing: { width: "0", @@ -5672,6 +1909,7 @@ var index$2 = { background: "{surface.0}", disabledBackground: "{surface.200}", filledBackground: "{surface.50}", + filledHoverBackground: "{surface.50}", filledFocusBackground: "{surface.50}", borderColor: "{surface.300}", hoverBorderColor: "{surface.400}", @@ -5680,9 +1918,11 @@ var index$2 = { color: "{surface.700}", disabledColor: "{surface.500}", placeholderColor: "{surface.500}", + invalidPlaceholderColor: "{red.600}", floatLabelColor: "{surface.500}", - floatLabelFocusColor: "{surface.500}", - floatLabelInvalidColor: "{red.400}", + floatLabelFocusColor: "{primary.600}", + floatLabelActiveColor: "{surface.500}", + floatLabelInvalidColor: "{form.field.invalid.placeholder.color}", iconColor: "{surface.400}", shadow: "0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)" }, @@ -5794,17 +2034,20 @@ var index$2 = { background: "{surface.950}", disabledBackground: "{surface.700}", filledBackground: "{surface.800}", + filledHoverBackground: "{surface.800}", filledFocusBackground: "{surface.800}", - borderColor: "{surface.700}", - hoverBorderColor: "{surface.600}", + borderColor: "{surface.600}", + hoverBorderColor: "{surface.500}", focusBorderColor: "{primary.color}", invalidBorderColor: "{red.300}", color: "{surface.0}", disabledColor: "{surface.400}", placeholderColor: "{surface.400}", + invalidPlaceholderColor: "{red.400}", floatLabelColor: "{surface.400}", - floatLabelFocusColor: "{surface.400}", - floatLabelInvalidColor: "{red.300}", + floatLabelFocusColor: "{primary.color}", + floatLabelActiveColor: "{surface.400}", + floatLabelInvalidColor: "{form.field.invalid.placeholder.color}", iconColor: "{surface.400}", shadow: "0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)" }, @@ -5882,43 +2125,4368 @@ var index$2 = { } } } + } +}; +var index$1m = { + root: { + borderRadius: "{content.border.radius}" + } +}; +var index$1l = { + root: { + padding: "1rem", + background: "{content.background}", + gap: "0.5rem", + transitionDuration: "{transition.duration}" }, + item: { + color: "{text.muted.color}", + hoverColor: "{text.color}", + borderRadius: "{content.border.radius}", + gap: "{navigation.item.gap}", + icon: { + color: "{navigation.item.icon.color}", + hoverColor: "{navigation.item.icon.focus.color}" + }, + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + separator: { + color: "{navigation.item.icon.color}" + } +}; +var index$1k = { + root: { + borderRadius: "{form.field.border.radius}", + roundedBorderRadius: "2rem", + gap: "0.5rem", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + iconOnlyWidth: "2.5rem", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + }, + label: { + fontWeight: "500" + }, + raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + offset: "{focus.ring.offset}" + }, + badgeSize: "1rem", + transitionDuration: "{form.field.transition.duration}" + }, + colorScheme: { + light: { + root: { + primary: { + background: "{primary.color}", + hoverBackground: "{primary.hover.color}", + activeBackground: "{primary.active.color}", + borderColor: "{primary.color}", + hoverBorderColor: "{primary.hover.color}", + activeBorderColor: "{primary.active.color}", + color: "{primary.contrast.color}", + hoverColor: "{primary.contrast.color}", + activeColor: "{primary.contrast.color}", + focusRing: { + color: "{primary.color}", + shadow: "none" + } + }, + secondary: { + background: "{surface.100}", + hoverBackground: "{surface.200}", + activeBackground: "{surface.300}", + borderColor: "{surface.100}", + hoverBorderColor: "{surface.200}", + activeBorderColor: "{surface.300}", + color: "{surface.600}", + hoverColor: "{surface.700}", + activeColor: "{surface.800}", + focusRing: { + color: "{surface.600}", + shadow: "none" + } + }, + info: { + background: "{sky.500}", + hoverBackground: "{sky.600}", + activeBackground: "{sky.700}", + borderColor: "{sky.500}", + hoverBorderColor: "{sky.600}", + activeBorderColor: "{sky.700}", + color: "#ffffff", + hoverColor: "#ffffff", + activeColor: "#ffffff", + focusRing: { + color: "{sky.500}", + shadow: "none" + } + }, + success: { + background: "{green.500}", + hoverBackground: "{green.600}", + activeBackground: "{green.700}", + borderColor: "{green.500}", + hoverBorderColor: "{green.600}", + activeBorderColor: "{green.700}", + color: "#ffffff", + hoverColor: "#ffffff", + activeColor: "#ffffff", + focusRing: { + color: "{green.500}", + shadow: "none" + } + }, + warn: { + background: "{orange.500}", + hoverBackground: "{orange.600}", + activeBackground: "{orange.700}", + borderColor: "{orange.500}", + hoverBorderColor: "{orange.600}", + activeBorderColor: "{orange.700}", + color: "#ffffff", + hoverColor: "#ffffff", + activeColor: "#ffffff", + focusRing: { + color: "{orange.500}", + shadow: "none" + } + }, + help: { + background: "{purple.500}", + hoverBackground: "{purple.600}", + activeBackground: "{purple.700}", + borderColor: "{purple.500}", + hoverBorderColor: "{purple.600}", + activeBorderColor: "{purple.700}", + color: "#ffffff", + hoverColor: "#ffffff", + activeColor: "#ffffff", + focusRing: { + color: "{purple.500}", + shadow: "none" + } + }, + danger: { + background: "{red.500}", + hoverBackground: "{red.600}", + activeBackground: "{red.700}", + borderColor: "{red.500}", + hoverBorderColor: "{red.600}", + activeBorderColor: "{red.700}", + color: "#ffffff", + hoverColor: "#ffffff", + activeColor: "#ffffff", + focusRing: { + color: "{red.500}", + shadow: "none" + } + }, + contrast: { + background: "{surface.950}", + hoverBackground: "{surface.900}", + activeBackground: "{surface.800}", + borderColor: "{surface.950}", + hoverBorderColor: "{surface.900}", + activeBorderColor: "{surface.800}", + color: "{surface.0}", + hoverColor: "{surface.0}", + activeColor: "{surface.0}", + focusRing: { + color: "{surface.950}", + shadow: "none" + } + } + }, + outlined: { + primary: { + hoverBackground: "{primary.50}", + activeBackground: "{primary.100}", + borderColor: "{primary.200}", + color: "{primary.color}" + }, + secondary: { + hoverBackground: "{surface.50}", + activeBackground: "{surface.100}", + borderColor: "{surface.200}", + color: "{surface.500}" + }, + success: { + hoverBackground: "{green.50}", + activeBackground: "{green.100}", + borderColor: "{green.200}", + color: "{green.500}" + }, + info: { + hoverBackground: "{sky.50}", + activeBackground: "{sky.100}", + borderColor: "{sky.200}", + color: "{sky.500}" + }, + warn: { + hoverBackground: "{orange.50}", + activeBackground: "{orange.100}", + borderColor: "{orange.200}", + color: "{orange.500}" + }, + help: { + hoverBackground: "{purple.50}", + activeBackground: "{purple.100}", + borderColor: "{purple.200}", + color: "{purple.500}" + }, + danger: { + hoverBackground: "{red.50}", + activeBackground: "{red.100}", + borderColor: "{red.200}", + color: "{red.500}" + }, + contrast: { + hoverBackground: "{surface.50}", + activeBackground: "{surface.100}", + borderColor: "{surface.700}", + color: "{surface.950}" + }, + plain: { + hoverBackground: "{surface.50}", + activeBackground: "{surface.100}", + borderColor: "{surface.200}", + color: "{surface.700}" + } + }, + text: { + primary: { + hoverBackground: "{primary.50}", + activeBackground: "{primary.100}", + color: "{primary.color}" + }, + secondary: { + hoverBackground: "{surface.50}", + activeBackground: "{surface.100}", + color: "{surface.500}" + }, + success: { + hoverBackground: "{green.50}", + activeBackground: "{green.100}", + color: "{green.500}" + }, + info: { + hoverBackground: "{sky.50}", + activeBackground: "{sky.100}", + color: "{sky.500}" + }, + warn: { + hoverBackground: "{orange.50}", + activeBackground: "{orange.100}", + color: "{orange.500}" + }, + help: { + hoverBackground: "{purple.50}", + activeBackground: "{purple.100}", + color: "{purple.500}" + }, + danger: { + hoverBackground: "{red.50}", + activeBackground: "{red.100}", + color: "{red.500}" + }, + contrast: { + hoverBackground: "{surface.50}", + activeBackground: "{surface.100}", + color: "{surface.950}" + }, + plain: { + hoverBackground: "{surface.50}", + activeBackground: "{surface.100}", + color: "{surface.700}" + } + }, + link: { + color: "{primary.color}", + hoverColor: "{primary.color}", + activeColor: "{primary.color}" + } + }, + dark: { + root: { + primary: { + background: "{primary.color}", + hoverBackground: "{primary.hover.color}", + activeBackground: "{primary.active.color}", + borderColor: "{primary.color}", + hoverBorderColor: "{primary.hover.color}", + activeBorderColor: "{primary.active.color}", + color: "{primary.contrast.color}", + hoverColor: "{primary.contrast.color}", + activeColor: "{primary.contrast.color}", + focusRing: { + color: "{primary.color}", + shadow: "none" + } + }, + secondary: { + background: "{surface.800}", + hoverBackground: "{surface.700}", + activeBackground: "{surface.600}", + borderColor: "{surface.800}", + hoverBorderColor: "{surface.700}", + activeBorderColor: "{surface.600}", + color: "{surface.300}", + hoverColor: "{surface.200}", + activeColor: "{surface.100}", + focusRing: { + color: "{surface.300}", + shadow: "none" + } + }, + info: { + background: "{sky.400}", + hoverBackground: "{sky.300}", + activeBackground: "{sky.200}", + borderColor: "{sky.400}", + hoverBorderColor: "{sky.300}", + activeBorderColor: "{sky.200}", + color: "{sky.950}", + hoverColor: "{sky.950}", + activeColor: "{sky.950}", + focusRing: { + color: "{sky.400}", + shadow: "none" + } + }, + success: { + background: "{green.400}", + hoverBackground: "{green.300}", + activeBackground: "{green.200}", + borderColor: "{green.400}", + hoverBorderColor: "{green.300}", + activeBorderColor: "{green.200}", + color: "{green.950}", + hoverColor: "{green.950}", + activeColor: "{green.950}", + focusRing: { + color: "{green.400}", + shadow: "none" + } + }, + warn: { + background: "{orange.400}", + hoverBackground: "{orange.300}", + activeBackground: "{orange.200}", + borderColor: "{orange.400}", + hoverBorderColor: "{orange.300}", + activeBorderColor: "{orange.200}", + color: "{orange.950}", + hoverColor: "{orange.950}", + activeColor: "{orange.950}", + focusRing: { + color: "{orange.400}", + shadow: "none" + } + }, + help: { + background: "{purple.400}", + hoverBackground: "{purple.300}", + activeBackground: "{purple.200}", + borderColor: "{purple.400}", + hoverBorderColor: "{purple.300}", + activeBorderColor: "{purple.200}", + color: "{purple.950}", + hoverColor: "{purple.950}", + activeColor: "{purple.950}", + focusRing: { + color: "{purple.400}", + shadow: "none" + } + }, + danger: { + background: "{red.400}", + hoverBackground: "{red.300}", + activeBackground: "{red.200}", + borderColor: "{red.400}", + hoverBorderColor: "{red.300}", + activeBorderColor: "{red.200}", + color: "{red.950}", + hoverColor: "{red.950}", + activeColor: "{red.950}", + focusRing: { + color: "{red.400}", + shadow: "none" + } + }, + contrast: { + background: "{surface.0}", + hoverBackground: "{surface.100}", + activeBackground: "{surface.200}", + borderColor: "{surface.0}", + hoverBorderColor: "{surface.100}", + activeBorderColor: "{surface.200}", + color: "{surface.950}", + hoverColor: "{surface.950}", + activeColor: "{surface.950}", + focusRing: { + color: "{surface.0}", + shadow: "none" + } + } + }, + outlined: { + primary: { + hoverBackground: "color-mix(in srgb, {primary.color}, transparent 96%)", + activeBackground: "color-mix(in srgb, {primary.color}, transparent 84%)", + borderColor: "{primary.700}", + color: "{primary.color}" + }, + secondary: { + hoverBackground: "rgba(255,255,255,0.04)", + activeBackground: "rgba(255,255,255,0.16)", + borderColor: "{surface.700}", + color: "{surface.400}" + }, + success: { + hoverBackground: "color-mix(in srgb, {green.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {green.400}, transparent 84%)", + borderColor: "{green.700}", + color: "{green.400}" + }, + info: { + hoverBackground: "color-mix(in srgb, {sky.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {sky.400}, transparent 84%)", + borderColor: "{sky.700}", + color: "{sky.400}" + }, + warn: { + hoverBackground: "color-mix(in srgb, {orange.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {orange.400}, transparent 84%)", + borderColor: "{orange.700}", + color: "{orange.400}" + }, + help: { + hoverBackground: "color-mix(in srgb, {purple.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {purple.400}, transparent 84%)", + borderColor: "{purple.700}", + color: "{purple.400}" + }, + danger: { + hoverBackground: "color-mix(in srgb, {red.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {red.400}, transparent 84%)", + borderColor: "{red.700}", + color: "{red.400}" + }, + contrast: { + hoverBackground: "{surface.800}", + activeBackground: "{surface.700}", + borderColor: "{surface.500}", + color: "{surface.0}" + }, + plain: { + hoverBackground: "{surface.800}", + activeBackground: "{surface.700}", + borderColor: "{surface.600}", + color: "{surface.0}" + } + }, + text: { + primary: { + hoverBackground: "color-mix(in srgb, {primary.color}, transparent 96%)", + activeBackground: "color-mix(in srgb, {primary.color}, transparent 84%)", + color: "{primary.color}" + }, + secondary: { + hoverBackground: "{surface.800}", + activeBackground: "{surface.700}", + color: "{surface.400}" + }, + success: { + hoverBackground: "color-mix(in srgb, {green.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {green.400}, transparent 84%)", + color: "{green.400}" + }, + info: { + hoverBackground: "color-mix(in srgb, {sky.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {sky.400}, transparent 84%)", + color: "{sky.400}" + }, + warn: { + hoverBackground: "color-mix(in srgb, {orange.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {orange.400}, transparent 84%)", + color: "{orange.400}" + }, + help: { + hoverBackground: "color-mix(in srgb, {purple.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {purple.400}, transparent 84%)", + color: "{purple.400}" + }, + danger: { + hoverBackground: "color-mix(in srgb, {red.400}, transparent 96%)", + activeBackground: "color-mix(in srgb, {red.400}, transparent 84%)", + color: "{red.400}" + }, + contrast: { + hoverBackground: "{surface.800}", + activeBackground: "{surface.700}", + color: "{surface.0}" + }, + plain: { + hoverBackground: "{surface.800}", + activeBackground: "{surface.700}", + color: "{surface.0}" + } + }, + link: { + color: "{primary.color}", + hoverColor: "{primary.color}", + activeColor: "{primary.color}" + } + } + } +}; +var index$1j = { + root: { + background: "{content.background}", + borderRadius: "{border.radius.xl}", + color: "{content.color}", + shadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)" + }, + body: { + padding: "1.25rem", + gap: "0.5rem" + }, + caption: { + gap: "0.5rem" + }, + title: { + fontSize: "1.25rem", + fontWeight: "500" + }, + subtitle: { + color: "{text.muted.color}" + } +}; +var index$1i = { + root: { + transitionDuration: "{transition.duration}" + }, + content: { + gap: "0.25rem" + }, + indicatorList: { + padding: "1rem", + gap: "0.5rem" + }, + indicator: { + width: "2rem", + height: "0.5rem", + borderRadius: "{content.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + colorScheme: { + light: { + indicator: { + background: "{surface.200}", + hoverBackground: "{surface.300}", + activeBackground: "{primary.color}" + } + }, + dark: { + indicator: { + background: "{surface.700}", + hoverBackground: "{surface.600}", + activeBackground: "{primary.color}" + } + } + } +}; +var index$1h = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledHoverBackground: "{form.field.filled.hover.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + } + }, + dropdown: { + width: "2.5rem", + color: "{form.field.icon.color}" + }, + overlay: { + background: "{overlay.select.background}", + borderColor: "{overlay.select.border.color}", + borderRadius: "{overlay.select.border.radius}", + color: "{overlay.select.color}", + shadow: "{overlay.select.shadow}" + }, + list: { + padding: "{list.padding}", + gap: "{list.gap}", + mobileIndent: "1rem" + }, + option: { + focusBackground: "{list.option.focus.background}", + selectedBackground: "{list.option.selected.background}", + selectedFocusBackground: "{list.option.selected.focus.background}", + color: "{list.option.color}", + focusColor: "{list.option.focus.color}", + selectedColor: "{list.option.selected.color}", + selectedFocusColor: "{list.option.selected.focus.color}", + padding: "{list.option.padding}", + borderRadius: "{list.option.border.radius}", + icon: { + color: "{list.option.icon.color}", + focusColor: "{list.option.icon.focus.color}", + size: "0.875rem" + } + }, + clearIcon: { + color: "{form.field.icon.color}" + } +}; +var index$1g = { + root: { + borderRadius: "{border.radius.sm}", + width: "1.25rem", + height: "1.25rem", + background: "{form.field.background}", + checkedBackground: "{primary.color}", + checkedHoverBackground: "{primary.hover.color}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.border.color}", + checkedBorderColor: "{primary.color}", + checkedHoverBorderColor: "{primary.hover.color}", + checkedFocusBorderColor: "{primary.color}", + checkedDisabledBorderColor: "{form.field.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + shadow: "{form.field.shadow}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + width: "1rem", + height: "1rem" + }, + lg: { + width: "1.5rem", + height: "1.5rem" + } + }, + icon: { + size: "0.875rem", + color: "{form.field.color}", + checkedColor: "{primary.contrast.color}", + checkedHoverColor: "{primary.contrast.color}", + disabledColor: "{form.field.disabled.color}", + sm: { + size: "0.75rem" + }, + lg: { + size: "1rem" + } + } +}; +var index$1f = { + root: { + borderRadius: "16px", + paddingX: "0.75rem", + paddingY: "0.5rem", + gap: "0.5rem", + transitionDuration: "{transition.duration}" + }, + image: { + width: "2rem", + height: "2rem" + }, + icon: { + size: "1rem" + }, + removeIcon: { + size: "1rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + } + }, + colorScheme: { + light: { + root: { + background: "{surface.100}", + color: "{surface.800}" + }, + icon: { + color: "{surface.800}" + }, + removeIcon: { + color: "{surface.800}" + } + }, + dark: { + root: { + background: "{surface.800}", + color: "{surface.0}" + }, + icon: { + color: "{surface.0}" + }, + removeIcon: { + color: "{surface.0}" + } + } + } +}; +var index$1e = { + root: { + transitionDuration: "{transition.duration}" + }, + preview: { + width: "1.5rem", + height: "1.5rem", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + panel: { + shadow: "{overlay.popover.shadow}", + borderRadius: "{overlay.popover.borderRadius}" + }, + colorScheme: { + light: { + panel: { + background: "{surface.800}", + borderColor: "{surface.900}" + }, + handle: { + color: "{surface.0}" + } + }, + dark: { + panel: { + background: "{surface.900}", + borderColor: "{surface.700}" + }, + handle: { + color: "{surface.0}" + } + } + } +}; +var index$1d = { + icon: { + size: "2rem", + color: "{overlay.modal.color}" + }, + content: { + gap: "1rem" + } +}; +var index$1c = { + root: { + background: "{overlay.popover.background}", + borderColor: "{overlay.popover.border.color}", + color: "{overlay.popover.color}", + borderRadius: "{overlay.popover.border.radius}", + shadow: "{overlay.popover.shadow}", + gutter: "10px", + arrowOffset: "1.25rem" + }, + content: { + padding: "{overlay.popover.padding}", + gap: "1rem" + }, + icon: { + size: "1.5rem", + color: "{overlay.popover.color}" + }, + footer: { + gap: "0.5rem", + padding: "0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}" + } +}; +var index$1b = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}", + shadow: "{overlay.navigation.shadow}", + transitionDuration: "{transition.duration}" + }, + list: { + padding: "{navigation.list.padding}", + gap: "{navigation.list.gap}" + }, + item: { + focusBackground: "{navigation.item.focus.background}", + activeBackground: "{navigation.item.active.background}", + color: "{navigation.item.color}", + focusColor: "{navigation.item.focus.color}", + activeColor: "{navigation.item.active.color}", + padding: "{navigation.item.padding}", + borderRadius: "{navigation.item.border.radius}", + gap: "{navigation.item.gap}", + icon: { + color: "{navigation.item.icon.color}", + focusColor: "{navigation.item.icon.focus.color}", + activeColor: "{navigation.item.icon.active.color}" + } + }, + submenu: { + mobileIndent: "1rem" + }, + submenuIcon: { + size: "{navigation.submenu.icon.size}", + color: "{navigation.submenu.icon.color}", + focusColor: "{navigation.submenu.icon.focus.color}", + activeColor: "{navigation.submenu.icon.active.color}" + }, + separator: { + borderColor: "{content.border.color}" + } +}; +var index$1a = { + root: { + transitionDuration: "{transition.duration}" + }, + header: { + background: "{content.background}", + borderColor: "{datatable.border.color}", + color: "{content.color}", + borderWidth: "0 0 1px 0", + padding: "0.75rem 1rem" + }, + headerCell: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + borderColor: "{datatable.border.color}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + selectedColor: "{highlight.color}", + gap: "0.5rem", + padding: "0.75rem 1rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + } + }, + columnTitle: { + fontWeight: "600" + }, + row: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + selectedColor: "{highlight.color}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + } + }, + bodyCell: { + borderColor: "{datatable.border.color}", + padding: "0.75rem 1rem" + }, + footerCell: { + background: "{content.background}", + borderColor: "{datatable.border.color}", + color: "{content.color}", + padding: "0.75rem 1rem" + }, + columnFooter: { + fontWeight: "600" + }, + footer: { + background: "{content.background}", + borderColor: "{datatable.border.color}", + color: "{content.color}", + borderWidth: "0 0 1px 0", + padding: "0.75rem 1rem" + }, + dropPoint: { + color: "{primary.color}" + }, + columnResizerWidth: "0.5rem", + resizeIndicator: { + width: "1px", + color: "{primary.color}" + }, + sortIcon: { + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + size: "0.875rem" + }, + loadingIcon: { + size: "2rem" + }, + rowToggleButton: { + hoverBackground: "{content.hover.background}", + selectedHoverBackground: "{content.background}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + selectedHoverColor: "{primary.color}", + size: "1.75rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + filter: { + inlineGap: "0.5rem", + overlaySelect: { + background: "{overlay.select.background}", + borderColor: "{overlay.select.border.color}", + borderRadius: "{overlay.select.border.radius}", + color: "{overlay.select.color}", + shadow: "{overlay.select.shadow}" + }, + overlayPopover: { + background: "{overlay.popover.background}", + borderColor: "{overlay.popover.border.color}", + borderRadius: "{overlay.popover.border.radius}", + color: "{overlay.popover.color}", + shadow: "{overlay.popover.shadow}", + padding: "{overlay.popover.padding}", + gap: "0.5rem" + }, + rule: { + borderColor: "{content.border.color}" + }, + constraintList: { + padding: "{list.padding}", + gap: "{list.gap}" + }, + constraint: { + focusBackground: "{list.option.focus.background}", + selectedBackground: "{list.option.selected.background}", + selectedFocusBackground: "{list.option.selected.focus.background}", + color: "{list.option.color}", + focusColor: "{list.option.focus.color}", + selectedColor: "{list.option.selected.color}", + selectedFocusColor: "{list.option.selected.focus.color}", + separator: { + borderColor: "{content.border.color}" + }, + padding: "{list.option.padding}", + borderRadius: "{list.option.border.radius}" + } + }, + paginatorTop: { + borderColor: "{datatable.border.color}", + borderWidth: "0 0 1px 0" + }, + paginatorBottom: { + borderColor: "{datatable.border.color}", + borderWidth: "0 0 1px 0" + }, + colorScheme: { + light: { + root: { + borderColor: "{content.border.color}" + }, + row: { + stripedBackground: "{surface.50}" + }, + bodyCell: { + selectedBorderColor: "{primary.100}" + } + }, + dark: { + root: { + borderColor: "{surface.800}" + }, + row: { + stripedBackground: "{surface.950}" + }, + bodyCell: { + selectedBorderColor: "{primary.900}" + } + } + } +}; +var index$19 = { + root: { + borderColor: "transparent", + borderWidth: "0", + borderRadius: "0", + padding: "0" + }, + header: { + background: "{content.background}", + color: "{content.color}", + borderColor: "{content.border.color}", + borderWidth: "0 0 1px 0", + padding: "0.75rem 1rem", + borderRadius: "0" + }, + content: { + background: "{content.background}", + color: "{content.color}", + borderColor: "transparent", + borderWidth: "0", + padding: "0", + borderRadius: "0" + }, + footer: { + background: "{content.background}", + color: "{content.color}", + borderColor: "{content.border.color}", + borderWidth: "1px 0 0 0", + padding: "0.75rem 1rem", + borderRadius: "0" + }, + paginatorTop: { + borderColor: "{content.border.color}", + borderWidth: "0 0 1px 0" + }, + paginatorBottom: { + borderColor: "{content.border.color}", + borderWidth: "1px 0 0 0" + } +}; +var index$18 = { + root: { + transitionDuration: "{transition.duration}" + }, + panel: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}", + shadow: "{overlay.popover.shadow}", + padding: "{overlay.popover.padding}" + }, + header: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + padding: "0 0 0.5rem 0" + }, + title: { + gap: "0.5rem", + fontWeight: "500" + }, + dropdown: { + width: "2.5rem", + sm: { + width: "2rem" + }, + lg: { + width: "3rem" + }, + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.border.color}", + activeBorderColor: "{form.field.border.color}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + inputIcon: { + color: "{form.field.icon.color}" + }, + selectMonth: { + hoverBackground: "{content.hover.background}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + padding: "0.25rem 0.5rem", + borderRadius: "{content.border.radius}" + }, + selectYear: { + hoverBackground: "{content.hover.background}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + padding: "0.25rem 0.5rem", + borderRadius: "{content.border.radius}" + }, + group: { + borderColor: "{content.border.color}", + gap: "{overlay.popover.padding}" + }, + dayView: { + margin: "0.5rem 0 0 0" + }, + weekDay: { + padding: "0.25rem", + fontWeight: "500", + color: "{content.color}" + }, + date: { + hoverBackground: "{content.hover.background}", + selectedBackground: "{primary.color}", + rangeSelectedBackground: "{highlight.background}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + selectedColor: "{primary.contrast.color}", + rangeSelectedColor: "{highlight.color}", + width: "2rem", + height: "2rem", + borderRadius: "50%", + padding: "0.25rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + monthView: { + margin: "0.5rem 0 0 0" + }, + month: { + padding: "0.375rem", + borderRadius: "{content.border.radius}" + }, + yearView: { + margin: "0.5rem 0 0 0" + }, + year: { + padding: "0.375rem", + borderRadius: "{content.border.radius}" + }, + buttonbar: { + padding: "0.5rem 0 0 0", + borderColor: "{content.border.color}" + }, + timePicker: { + padding: "0.5rem 0 0 0", + borderColor: "{content.border.color}", + gap: "0.5rem", + buttonGap: "0.25rem" + }, + colorScheme: { + light: { + dropdown: { + background: "{surface.100}", + hoverBackground: "{surface.200}", + activeBackground: "{surface.300}", + color: "{surface.600}", + hoverColor: "{surface.700}", + activeColor: "{surface.800}" + }, + today: { + background: "{surface.200}", + color: "{surface.900}" + } + }, + dark: { + dropdown: { + background: "{surface.800}", + hoverBackground: "{surface.700}", + activeBackground: "{surface.600}", + color: "{surface.300}", + hoverColor: "{surface.200}", + activeColor: "{surface.100}" + }, + today: { + background: "{surface.700}", + color: "{surface.0}" + } + } + } +}; +var index$17 = { + root: { + background: "{overlay.modal.background}", + borderColor: "{overlay.modal.border.color}", + color: "{overlay.modal.color}", + borderRadius: "{overlay.modal.border.radius}", + shadow: "{overlay.modal.shadow}" + }, + header: { + padding: "{overlay.modal.padding}", + gap: "0.5rem" + }, + title: { + fontSize: "1.25rem", + fontWeight: "600" + }, + content: { + padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}" + }, + footer: { + padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}", + gap: "0.5rem" + } +}; +var index$16 = { + root: { + borderColor: "{content.border.color}" + }, + content: { + background: "{content.background}", + color: "{text.color}" + }, + horizontal: { + margin: "1rem 0", + padding: "0 1rem", + content: { + padding: "0 0.5rem" + } + }, + vertical: { + margin: "0 1rem", + padding: "0.5rem 0", + content: { + padding: "0.5rem 0" + } + } +}; +var index$15 = { + root: { + background: "rgba(255, 255, 255, 0.1)", + borderColor: "rgba(255, 255, 255, 0.2)", + padding: "0.5rem", + borderRadius: "{border.radius.xl}" + }, + item: { + borderRadius: "{content.border.radius}", + padding: "0.5rem", + size: "3rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + } +}; +var index$14 = { + root: { + background: "{overlay.modal.background}", + borderColor: "{overlay.modal.border.color}", + color: "{overlay.modal.color}", + shadow: "{overlay.modal.shadow}" + }, + header: { + padding: "{overlay.modal.padding}" + }, + title: { + fontSize: "1.5rem", + fontWeight: "600" + }, + content: { + padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}" + }, + footer: { + padding: "{overlay.modal.padding}" + } +}; +var index$13 = { + toolbar: { + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}" + }, + toolbarItem: { + color: "{text.muted.color}", + hoverColor: "{text.color}", + activeColor: "{primary.color}" + }, + overlay: { + background: "{overlay.select.background}", + borderColor: "{overlay.select.border.color}", + borderRadius: "{overlay.select.border.radius}", + color: "{overlay.select.color}", + shadow: "{overlay.select.shadow}", + padding: "{list.padding}" + }, + overlayOption: { + focusBackground: "{list.option.focus.background}", + color: "{list.option.color}", + focusColor: "{list.option.focus.color}", + padding: "{list.option.padding}", + borderRadius: "{list.option.border.radius}" + }, + content: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}" + } +}; +var index$12 = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + color: "{content.color}", + padding: "0 1.125rem 1.125rem 1.125rem", + transitionDuration: "{transition.duration}" + }, + legend: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + borderRadius: "{content.border.radius}", + borderWidth: "1px", + borderColor: "transparent", + padding: "0.5rem 0.75rem", + gap: "0.5rem", + fontWeight: "600", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + toggleIcon: { + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}" + }, + content: { + padding: "0" + } +}; +var index$11 = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}", + transitionDuration: "{transition.duration}" + }, + header: { + background: "transparent", + color: "{text.color}", + padding: "1.125rem", + borderColor: "unset", + borderWidth: "0", + borderRadius: "0", + gap: "0.5rem" + }, + content: { + highlightBorderColor: "{primary.color}", + padding: "0 1.125rem 1.125rem 1.125rem", + gap: "1rem" + }, + file: { + padding: "1rem", + gap: "1rem", + borderColor: "{content.border.color}", + info: { + gap: "0.5rem" + } + }, + fileList: { + gap: "0.5rem" + }, + progressbar: { + height: "0.25rem" + }, + basic: { + gap: "0.5rem" + } +}; +var index$10 = { + root: { + color: "{form.field.float.label.color}", + focusColor: "{form.field.float.label.focus.color}", + activeColor: "{form.field.float.label.active.color}", + invalidColor: "{form.field.float.label.invalid.color}", + transitionDuration: "0.2s", + positionX: "{form.field.padding.x}", + positionY: "{form.field.padding.y}", + fontWeight: "500", + active: { + fontSize: "0.75rem", + fontWeight: "400" + } + }, + over: { + active: { + top: "-1.25rem" + } + }, + "in": { + input: { + paddingTop: "1.5rem", + paddingBottom: "{form.field.padding.y}" + }, + active: { + top: "{form.field.padding.y}" + } + }, + on: { + borderRadius: "{border.radius.xs}", + active: { + background: "{form.field.background}", + padding: "0 0.125rem" + } + } +}; +var index$$ = { + root: { + borderWidth: "1px", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + transitionDuration: "{transition.duration}" + }, + navButton: { + background: "rgba(255, 255, 255, 0.1)", + hoverBackground: "rgba(255, 255, 255, 0.2)", + color: "{surface.100}", + hoverColor: "{surface.0}", + size: "3rem", + gutter: "0.5rem", + prev: { + borderRadius: "50%" + }, + next: { + borderRadius: "50%" + }, + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + navIcon: { + size: "1.5rem" + }, + thumbnailsContent: { + background: "{content.background}", + padding: "1rem 0.25rem" + }, + thumbnailNavButton: { + size: "2rem", + borderRadius: "{content.border.radius}", + gutter: "0.5rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + thumbnailNavButtonIcon: { + size: "1rem" + }, + caption: { + background: "rgba(0, 0, 0, 0.5)", + color: "{surface.100}", + padding: "1rem" + }, + indicatorList: { + gap: "0.5rem", + padding: "1rem" + }, + indicatorButton: { + width: "1rem", + height: "1rem", + activeBackground: "{primary.color}", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + insetIndicatorList: { + background: "rgba(0, 0, 0, 0.5)" + }, + insetIndicatorButton: { + background: "rgba(255, 255, 255, 0.4)", + hoverBackground: "rgba(255, 255, 255, 0.6)", + activeBackground: "rgba(255, 255, 255, 0.9)" + }, + closeButton: { + size: "3rem", + gutter: "0.5rem", + background: "rgba(255, 255, 255, 0.1)", + hoverBackground: "rgba(255, 255, 255, 0.2)", + color: "{surface.50}", + hoverColor: "{surface.0}", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + closeButtonIcon: { + size: "1.5rem" + }, + colorScheme: { + light: { + thumbnailNavButton: { + hoverBackground: "{surface.100}", + color: "{surface.600}", + hoverColor: "{surface.700}" + }, + indicatorButton: { + background: "{surface.200}", + hoverBackground: "{surface.300}" + } + }, + dark: { + thumbnailNavButton: { + hoverBackground: "{surface.700}", + color: "{surface.400}", + hoverColor: "{surface.0}" + }, + indicatorButton: { + background: "{surface.700}", + hoverBackground: "{surface.600}" + } + } + } +}; +var index$_ = { + icon: { + color: "{form.field.icon.color}" + } +}; +var index$Z = { + root: { + color: "{form.field.float.label.color}", + focusColor: "{form.field.float.label.focus.color}", + invalidColor: "{form.field.float.label.invalid.color}", + transitionDuration: "0.2s", + positionX: "{form.field.padding.x}", + top: "{form.field.padding.y}", + fontSize: "0.75rem", + fontWeight: "400" + }, + input: { + paddingTop: "1.5rem", + paddingBottom: "{form.field.padding.y}" + } +}; +var index$Y = { + root: { + transitionDuration: "{transition.duration}" + }, + preview: { + icon: { + size: "1.5rem" + }, + mask: { + background: "{mask.background}", + color: "{mask.color}" + } + }, + toolbar: { + position: { + left: "auto", + right: "1rem", + top: "1rem", + bottom: "auto" + }, + blur: "8px", + background: "rgba(255,255,255,0.1)", + borderColor: "rgba(255,255,255,0.2)", + borderWidth: "1px", + borderRadius: "30px", + padding: ".5rem", + gap: "0.5rem" + }, + action: { + hoverBackground: "rgba(255,255,255,0.1)", + color: "{surface.50}", + hoverColor: "{surface.0}", + size: "3rem", + iconSize: "1.5rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + } +}; +var index$X = { + handle: { + size: "15px", + hoverSize: "30px", + background: "rgba(255,255,255,0.3)", + hoverBackground: "rgba(255,255,255,0.3)", + borderColor: "unset", + hoverBorderColor: "unset", + borderWidth: "0", + borderRadius: "50%", + transitionDuration: "{transition.duration}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "rgba(255,255,255,0.3)", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + } +}; +var index$W = { + root: { + padding: "{form.field.padding.y} {form.field.padding.x}", + borderRadius: "{content.border.radius}", + gap: "0.5rem" + }, + text: { + fontWeight: "500" + }, + icon: { + size: "1rem" + }, + colorScheme: { + light: { + info: { + background: "color-mix(in srgb, {blue.50}, transparent 5%)", + borderColor: "{blue.200}", + color: "{blue.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)" + }, + success: { + background: "color-mix(in srgb, {green.50}, transparent 5%)", + borderColor: "{green.200}", + color: "{green.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)" + }, + warn: { + background: "color-mix(in srgb,{yellow.50}, transparent 5%)", + borderColor: "{yellow.200}", + color: "{yellow.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)" + }, + error: { + background: "color-mix(in srgb, {red.50}, transparent 5%)", + borderColor: "{red.200}", + color: "{red.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)" + }, + secondary: { + background: "{surface.100}", + borderColor: "{surface.200}", + color: "{surface.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)" + }, + contrast: { + background: "{surface.900}", + borderColor: "{surface.950}", + color: "{surface.50}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)" + } + }, + dark: { + info: { + background: "color-mix(in srgb, {blue.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", + color: "{blue.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)" + }, + success: { + background: "color-mix(in srgb, {green.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", + color: "{green.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)" + }, + warn: { + background: "color-mix(in srgb, {yellow.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", + color: "{yellow.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)" + }, + error: { + background: "color-mix(in srgb, {red.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", + color: "{red.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)" + }, + secondary: { + background: "{surface.800}", + borderColor: "{surface.700}", + color: "{surface.300}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)" + }, + contrast: { + background: "{surface.0}", + borderColor: "{surface.100}", + color: "{surface.950}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)" + } + } + } +}; +var index$V = { + root: { + padding: "{form.field.padding.y} {form.field.padding.x}", + borderRadius: "{content.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + transitionDuration: "{transition.duration}" + }, + display: { + hoverBackground: "{content.hover.background}", + hoverColor: "{content.hover.color}" + } +}; +var index$U = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}" + }, + chip: { + borderRadius: "{border.radius.sm}" + }, + colorScheme: { + light: { + chip: { + focusBackground: "{surface.200}", + color: "{surface.800}" + } + }, + dark: { + chip: { + focusBackground: "{surface.700}", + color: "{surface.0}" + } + } + } +}; +var index$T = { + addon: { + background: "{form.field.background}", + borderColor: "{form.field.border.color}", + color: "{form.field.icon.color}", + borderRadius: "{form.field.border.radius}", + padding: "0.5rem", + minWidth: "2.5rem" + } +}; +var index$S = { + root: { + transitionDuration: "{transition.duration}" + }, + button: { + width: "2.5rem", + borderRadius: "{form.field.border.radius}", + verticalPadding: "{form.field.padding.y}" + }, + colorScheme: { + light: { + button: { + background: "transparent", + hoverBackground: "{surface.100}", + activeBackground: "{surface.200}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.border.color}", + activeBorderColor: "{form.field.border.color}", + color: "{surface.400}", + hoverColor: "{surface.500}", + activeColor: "{surface.600}" + } + }, + dark: { + button: { + background: "transparent", + hoverBackground: "{surface.800}", + activeBackground: "{surface.700}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.border.color}", + activeBorderColor: "{form.field.border.color}", + color: "{surface.400}", + hoverColor: "{surface.300}", + activeColor: "{surface.200}" + } + } + } +}; +var index$R = { + root: { + gap: "0.5rem" + }, + input: { + width: "2.5rem", + sm: { + width: "2rem" + }, + lg: { + width: "3rem" + } + } +}; +var index$Q = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledHoverBackground: "{form.field.filled.hover.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + } + } +}; +var index$P = { + root: { + transitionDuration: "{transition.duration}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + value: { + background: "{primary.color}" + }, + range: { + background: "{content.border.color}" + }, + text: { + color: "{text.muted.color}" + } +}; +var index$O = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + borderColor: "{form.field.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + shadow: "{form.field.shadow}", + borderRadius: "{form.field.border.radius}", + transitionDuration: "{form.field.transition.duration}" + }, + list: { + padding: "{list.padding}", + gap: "{list.gap}", + header: { + padding: "{list.header.padding}" + } + }, + option: { + focusBackground: "{list.option.focus.background}", + selectedBackground: "{list.option.selected.background}", + selectedFocusBackground: "{list.option.selected.focus.background}", + color: "{list.option.color}", + focusColor: "{list.option.focus.color}", + selectedColor: "{list.option.selected.color}", + selectedFocusColor: "{list.option.selected.focus.color}", + padding: "{list.option.padding}", + borderRadius: "{list.option.border.radius}" + }, + optionGroup: { + background: "{list.option.group.background}", + color: "{list.option.group.color}", + fontWeight: "{list.option.group.font.weight}", + padding: "{list.option.group.padding}" + }, + checkmark: { + color: "{list.option.color}", + gutterStart: "-0.375rem", + gutterEnd: "0.375rem" + }, + emptyMessage: { + padding: "{list.option.padding}" + }, + colorScheme: { + light: { + option: { + stripedBackground: "{surface.50}" + } + }, + dark: { + option: { + stripedBackground: "{surface.900}" + } + } + } +}; +var index$N = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + color: "{content.color}", + gap: "0.5rem", + verticalOrientation: { + padding: "{navigation.list.padding}", + gap: "{navigation.list.gap}" + }, + horizontalOrientation: { + padding: "0.5rem 0.75rem", + gap: "0.5rem" + }, + transitionDuration: "{transition.duration}" + }, + baseItem: { + borderRadius: "{content.border.radius}", + padding: "{navigation.item.padding}" + }, + item: { + focusBackground: "{navigation.item.focus.background}", + activeBackground: "{navigation.item.active.background}", + color: "{navigation.item.color}", + focusColor: "{navigation.item.focus.color}", + activeColor: "{navigation.item.active.color}", + padding: "{navigation.item.padding}", + borderRadius: "{navigation.item.border.radius}", + gap: "{navigation.item.gap}", + icon: { + color: "{navigation.item.icon.color}", + focusColor: "{navigation.item.icon.focus.color}", + activeColor: "{navigation.item.icon.active.color}" + } + }, + overlay: { + padding: "0", + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + color: "{content.color}", + shadow: "{overlay.navigation.shadow}", + gap: "0.5rem" + }, + submenu: { + padding: "{navigation.list.padding}", + gap: "{navigation.list.gap}" + }, + submenuLabel: { + padding: "{navigation.submenu.label.padding}", + fontWeight: "{navigation.submenu.label.font.weight}", + background: "{navigation.submenu.label.background.}", + color: "{navigation.submenu.label.color}" + }, + submenuIcon: { + size: "{navigation.submenu.icon.size}", + color: "{navigation.submenu.icon.color}", + focusColor: "{navigation.submenu.icon.focus.color}", + activeColor: "{navigation.submenu.icon.active.color}" + }, + separator: { + borderColor: "{content.border.color}" + }, + mobileButton: { + borderRadius: "50%", + size: "1.75rem", + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + hoverBackground: "{content.hover.background}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + } +}; +var index$M = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}", + shadow: "{overlay.navigation.shadow}", + transitionDuration: "{transition.duration}" + }, + list: { + padding: "{navigation.list.padding}", + gap: "{navigation.list.gap}" + }, + item: { + focusBackground: "{navigation.item.focus.background}", + color: "{navigation.item.color}", + focusColor: "{navigation.item.focus.color}", + padding: "{navigation.item.padding}", + borderRadius: "{navigation.item.border.radius}", + gap: "{navigation.item.gap}", + icon: { + color: "{navigation.item.icon.color}", + focusColor: "{navigation.item.icon.focus.color}" + } + }, + submenuLabel: { + padding: "{navigation.submenu.label.padding}", + fontWeight: "{navigation.submenu.label.font.weight}", + background: "{navigation.submenu.label.background}", + color: "{navigation.submenu.label.color}" + }, + separator: { + borderColor: "{content.border.color}" + } +}; +var index$L = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + color: "{content.color}", + gap: "0.5rem", + padding: "0.5rem 0.75rem", + transitionDuration: "{transition.duration}" + }, + baseItem: { + borderRadius: "{content.border.radius}", + padding: "{navigation.item.padding}" + }, + item: { + focusBackground: "{navigation.item.focus.background}", + activeBackground: "{navigation.item.active.background}", + color: "{navigation.item.color}", + focusColor: "{navigation.item.focus.color}", + activeColor: "{navigation.item.active.color}", + padding: "{navigation.item.padding}", + borderRadius: "{navigation.item.border.radius}", + gap: "{navigation.item.gap}", + icon: { + color: "{navigation.item.icon.color}", + focusColor: "{navigation.item.icon.focus.color}", + activeColor: "{navigation.item.icon.active.color}" + } + }, + submenu: { + padding: "{navigation.list.padding}", + gap: "{navigation.list.gap}", + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + shadow: "{overlay.navigation.shadow}", + mobileIndent: "1rem", + icon: { + size: "{navigation.submenu.icon.size}", + color: "{navigation.submenu.icon.color}", + focusColor: "{navigation.submenu.icon.focus.color}", + activeColor: "{navigation.submenu.icon.active.color}" + } + }, + separator: { + borderColor: "{content.border.color}" + }, + mobileButton: { + borderRadius: "50%", + size: "1.75rem", + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + hoverBackground: "{content.hover.background}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + } +}; +var index$K = { + root: { + borderRadius: "{content.border.radius}", + borderWidth: "1px", + transitionDuration: "{transition.duration}" + }, + content: { + padding: "0.5rem 0.75rem", + gap: "0.5rem", + sm: { + padding: "0.375rem 0.625rem" + }, + lg: { + padding: "0.625rem 0.875rem" + } + }, + text: { + fontSize: "1rem", + fontWeight: "500", + sm: { + fontSize: "0.875rem" + }, + lg: { + fontSize: "1.125rem" + } + }, + icon: { + size: "1.125rem", + sm: { + size: "1rem" + }, + lg: { + size: "1.25rem" + } + }, + closeButton: { + width: "1.75rem", + height: "1.75rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + offset: "{focus.ring.offset}" + } + }, + closeIcon: { + size: "1rem", + sm: { + size: "0.875rem" + }, + lg: { + size: "1.125rem" + } + }, + outlined: { + root: { + borderWidth: "1px" + } + }, + simple: { + content: { + padding: "0" + } + }, + colorScheme: { + light: { + info: { + background: "color-mix(in srgb, {blue.50}, transparent 5%)", + borderColor: "{blue.200}", + color: "{blue.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", + closeButton: { + hoverBackground: "{blue.100}", + focusRing: { + color: "{blue.600}", + shadow: "none" + } + }, + outlined: { + color: "{blue.600}", + borderColor: "{blue.600}" + }, + simple: { + color: "{blue.600}" + } + }, + success: { + background: "color-mix(in srgb, {green.50}, transparent 5%)", + borderColor: "{green.200}", + color: "{green.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", + closeButton: { + hoverBackground: "{green.100}", + focusRing: { + color: "{green.600}", + shadow: "none" + } + }, + outlined: { + color: "{green.600}", + borderColor: "{green.600}" + }, + simple: { + color: "{green.600}" + } + }, + warn: { + background: "color-mix(in srgb,{yellow.50}, transparent 5%)", + borderColor: "{yellow.200}", + color: "{yellow.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", + closeButton: { + hoverBackground: "{yellow.100}", + focusRing: { + color: "{yellow.600}", + shadow: "none" + } + }, + outlined: { + color: "{yellow.600}", + borderColor: "{yellow.600}" + }, + simple: { + color: "{yellow.600}" + } + }, + error: { + background: "color-mix(in srgb, {red.50}, transparent 5%)", + borderColor: "{red.200}", + color: "{red.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", + closeButton: { + hoverBackground: "{red.100}", + focusRing: { + color: "{red.600}", + shadow: "none" + } + }, + outlined: { + color: "{red.600}", + borderColor: "{red.600}" + }, + simple: { + color: "{red.600}" + } + }, + secondary: { + background: "{surface.100}", + borderColor: "{surface.200}", + color: "{surface.600}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.200}", + focusRing: { + color: "{surface.600}", + shadow: "none" + } + }, + outlined: { + color: "{surface.500}", + borderColor: "{surface.500}" + }, + simple: { + color: "{surface.500}" + } + }, + contrast: { + background: "{surface.900}", + borderColor: "{surface.950}", + color: "{surface.50}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.800}", + focusRing: { + color: "{surface.50}", + shadow: "none" + } + }, + outlined: { + color: "{surface.950}", + borderColor: "{surface.950}" + }, + simple: { + color: "{surface.950}" + } + } + }, + dark: { + info: { + background: "color-mix(in srgb, {blue.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", + color: "{blue.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{blue.500}", + shadow: "none" + } + }, + outlined: { + color: "{blue.500}", + borderColor: "{blue.500}" + }, + simple: { + color: "{blue.500}" + } + }, + success: { + background: "color-mix(in srgb, {green.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", + color: "{green.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{green.500}", + shadow: "none" + } + }, + outlined: { + color: "{green.500}", + borderColor: "{green.500}" + }, + simple: { + color: "{green.500}" + } + }, + warn: { + background: "color-mix(in srgb, {yellow.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", + color: "{yellow.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{yellow.500}", + shadow: "none" + } + }, + outlined: { + color: "{yellow.500}", + borderColor: "{yellow.500}" + }, + simple: { + color: "{yellow.500}" + } + }, + error: { + background: "color-mix(in srgb, {red.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", + color: "{red.500}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{red.500}", + shadow: "none" + } + }, + outlined: { + color: "{red.500}", + borderColor: "{red.500}" + }, + simple: { + color: "{red.500}" + } + }, + secondary: { + background: "{surface.800}", + borderColor: "{surface.700}", + color: "{surface.300}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.700}", + focusRing: { + color: "{surface.300}", + shadow: "none" + } + }, + outlined: { + color: "{surface.400}", + borderColor: "{surface.400}" + }, + simple: { + color: "{surface.400}" + } + }, + contrast: { + background: "{surface.0}", + borderColor: "{surface.100}", + color: "{surface.950}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.100}", + focusRing: { + color: "{surface.950}", + shadow: "none" + } + }, + outlined: { + color: "{surface.0}", + borderColor: "{surface.0}" + }, + simple: { + color: "{surface.0}" + } + } + } + } +}; +var index$J = { + root: { + borderRadius: "{content.border.radius}", + gap: "1rem" + }, + meters: { + background: "{content.border.color}", + size: "0.5rem" + }, + label: { + gap: "0.5rem" + }, + labelMarker: { + size: "0.5rem" + }, + labelIcon: { + size: "1rem" + }, + labelList: { + verticalGap: "0.5rem", + horizontalGap: "1rem" + } +}; +var index$I = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledHoverBackground: "{form.field.filled.hover.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + } + }, + dropdown: { + width: "2.5rem", + color: "{form.field.icon.color}" + }, + overlay: { + background: "{overlay.select.background}", + borderColor: "{overlay.select.border.color}", + borderRadius: "{overlay.select.border.radius}", + color: "{overlay.select.color}", + shadow: "{overlay.select.shadow}" + }, + list: { + padding: "{list.padding}", + gap: "{list.gap}", + header: { + padding: "{list.header.padding}" + } + }, + option: { + focusBackground: "{list.option.focus.background}", + selectedBackground: "{list.option.selected.background}", + selectedFocusBackground: "{list.option.selected.focus.background}", + color: "{list.option.color}", + focusColor: "{list.option.focus.color}", + selectedColor: "{list.option.selected.color}", + selectedFocusColor: "{list.option.selected.focus.color}", + padding: "{list.option.padding}", + borderRadius: "{list.option.border.radius}", + gap: "0.5rem" + }, + optionGroup: { + background: "{list.option.group.background}", + color: "{list.option.group.color}", + fontWeight: "{list.option.group.font.weight}", + padding: "{list.option.group.padding}" + }, + clearIcon: { + color: "{form.field.icon.color}" + }, + chip: { + borderRadius: "{border.radius.sm}" + }, + emptyMessage: { + padding: "{list.option.padding}" + } +}; +var index$H = { + root: { + gap: "1.125rem" + }, + controls: { + gap: "0.5rem" + } +}; +var index$G = { + root: { + gutter: "0.75rem", + transitionDuration: "{transition.duration}" + }, + node: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + selectedColor: "{highlight.color}", + hoverColor: "{content.hover.color}", + padding: "0.75rem 1rem", + toggleablePadding: "0.75rem 1rem 1.25rem 1rem", + borderRadius: "{content.border.radius}" + }, + nodeToggleButton: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + borderColor: "{content.border.color}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + size: "1.5rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + connector: { + color: "{content.border.color}", + borderRadius: "{content.border.radius}", + height: "24px" + } +}; +var index$F = { + root: { + outline: { + width: "2px", + color: "{content.background}" + } + } +}; +var index$E = { + root: { + padding: "0.5rem 1rem", + gap: "0.25rem", + borderRadius: "{content.border.radius}", + background: "{content.background}", + color: "{content.color}", + transitionDuration: "{transition.duration}" + }, + navButton: { + background: "transparent", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + selectedColor: "{highlight.color}", + width: "2.5rem", + height: "2.5rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + currentPageReport: { + color: "{text.muted.color}" + }, + jumpToPageInput: { + maxWidth: "2.5rem" + } +}; +var index$D = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}" + }, + header: { + background: "transparent", + color: "{text.color}", + padding: "1.125rem", + borderColor: "{content.border.color}", + borderWidth: "0", + borderRadius: "0" + }, + toggleableHeader: { + padding: "0.375rem 1.125rem" + }, + title: { + fontWeight: "600" + }, + content: { + padding: "0 1.125rem 1.125rem 1.125rem" + }, + footer: { + padding: "0 1.125rem 1.125rem 1.125rem" + } +}; +var index$C = { + root: { + gap: "0.5rem", + transitionDuration: "{transition.duration}" + }, + panel: { + background: "{content.background}", + borderColor: "{content.border.color}", + borderWidth: "1px", + color: "{content.color}", + padding: "0.25rem 0.25rem", + borderRadius: "{content.border.radius}", + first: { + borderWidth: "1px", + topBorderRadius: "{content.border.radius}" + }, + last: { + borderWidth: "1px", + bottomBorderRadius: "{content.border.radius}" + } + }, + item: { + focusBackground: "{navigation.item.focus.background}", + color: "{navigation.item.color}", + focusColor: "{navigation.item.focus.color}", + gap: "0.5rem", + padding: "{navigation.item.padding}", + borderRadius: "{content.border.radius}", + icon: { + color: "{navigation.item.icon.color}", + focusColor: "{navigation.item.icon.focus.color}" + } + }, + submenu: { + indent: "1rem" + }, + submenuIcon: { + color: "{navigation.submenu.icon.color}", + focusColor: "{navigation.submenu.icon.focus.color}" + } +}; +var index$B = { + meter: { + background: "{content.border.color}", + borderRadius: "{content.border.radius}", + height: ".75rem" + }, + icon: { + color: "{form.field.icon.color}" + }, + overlay: { + background: "{overlay.popover.background}", + borderColor: "{overlay.popover.border.color}", + borderRadius: "{overlay.popover.border.radius}", + color: "{overlay.popover.color}", + padding: "{overlay.popover.padding}", + shadow: "{overlay.popover.shadow}" + }, + content: { + gap: "0.5rem" + }, + colorScheme: { + light: { + strength: { + weakBackground: "{red.500}", + mediumBackground: "{amber.500}", + strongBackground: "{green.500}" + } + }, + dark: { + strength: { + weakBackground: "{red.400}", + mediumBackground: "{amber.400}", + strongBackground: "{green.400}" + } + } + } +}; +var index$A = { + root: { + gap: "1.125rem" + }, + controls: { + gap: "0.5rem" + } +}; +var index$z = { + root: { + background: "{overlay.popover.background}", + borderColor: "{overlay.popover.border.color}", + color: "{overlay.popover.color}", + borderRadius: "{overlay.popover.border.radius}", + shadow: "{overlay.popover.shadow}", + gutter: "10px", + arrowOffset: "1.25rem" + }, + content: { + padding: "{overlay.popover.padding}" + } +}; +var index$y = { + root: { + background: "{content.border.color}", + borderRadius: "{content.border.radius}", + height: "1.25rem" + }, + value: { + background: "{primary.color}" + }, + label: { + color: "{primary.contrast.color}", + fontSize: "0.75rem", + fontWeight: "600" + } +}; +var index$x = { + colorScheme: { + light: { + root: { + "color.1": "{red.500}", + "color.2": "{blue.500}", + "color.3": "{green.500}", + "color.4": "{yellow.500}" + } + }, + dark: { + root: { + "color.1": "{red.400}", + "color.2": "{blue.400}", + "color.3": "{green.400}", + "color.4": "{yellow.400}" + } + } + } +}; +var index$w = { + root: { + width: "1.25rem", + height: "1.25rem", + background: "{form.field.background}", + checkedBackground: "{primary.color}", + checkedHoverBackground: "{primary.hover.color}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.border.color}", + checkedBorderColor: "{primary.color}", + checkedHoverBorderColor: "{primary.hover.color}", + checkedFocusBorderColor: "{primary.color}", + checkedDisabledBorderColor: "{form.field.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + shadow: "{form.field.shadow}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + width: "1rem", + height: "1rem" + }, + lg: { + width: "1.5rem", + height: "1.5rem" + } + }, + icon: { + size: "0.75rem", + checkedColor: "{primary.contrast.color}", + checkedHoverColor: "{primary.contrast.color}", + disabledColor: "{form.field.disabled.color}", + sm: { + size: "0.5rem" + }, + lg: { + size: "1rem" + } + } +}; +var index$v = { + root: { + gap: "0.25rem", + transitionDuration: "{transition.duration}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + icon: { + size: "1rem", + color: "{text.muted.color}", + hoverColor: "{primary.color}", + activeColor: "{primary.color}" + } +}; +var index$u = { + colorScheme: { + light: { + root: { + background: "rgba(0,0,0,0.1)" + } + }, + dark: { + root: { + background: "rgba(255,255,255,0.3)" + } + } + } +}; +var index$t = { + root: { + transitionDuration: "{transition.duration}" + }, + bar: { + size: "9px", + borderRadius: "{border.radius.sm}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + colorScheme: { + light: { + bar: { + background: "{surface.100}" + } + }, + dark: { + bar: { + background: "{surface.800}" + } + } + } +}; +var index$s = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledHoverBackground: "{form.field.filled.hover.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + } + }, + dropdown: { + width: "2.5rem", + color: "{form.field.icon.color}" + }, + overlay: { + background: "{overlay.select.background}", + borderColor: "{overlay.select.border.color}", + borderRadius: "{overlay.select.border.radius}", + color: "{overlay.select.color}", + shadow: "{overlay.select.shadow}" + }, + list: { + padding: "{list.padding}", + gap: "{list.gap}", + header: { + padding: "{list.header.padding}" + } + }, + option: { + focusBackground: "{list.option.focus.background}", + selectedBackground: "{list.option.selected.background}", + selectedFocusBackground: "{list.option.selected.focus.background}", + color: "{list.option.color}", + focusColor: "{list.option.focus.color}", + selectedColor: "{list.option.selected.color}", + selectedFocusColor: "{list.option.selected.focus.color}", + padding: "{list.option.padding}", + borderRadius: "{list.option.border.radius}" + }, + optionGroup: { + background: "{list.option.group.background}", + color: "{list.option.group.color}", + fontWeight: "{list.option.group.font.weight}", + padding: "{list.option.group.padding}" + }, + clearIcon: { + color: "{form.field.icon.color}" + }, + checkmark: { + color: "{list.option.color}", + gutterStart: "-0.375rem", + gutterEnd: "0.375rem" + }, + emptyMessage: { + padding: "{list.option.padding}" + } +}; +var index$r = { + root: { + borderRadius: "{form.field.border.radius}" + }, + colorScheme: { + light: { + root: { + invalidBorderColor: "{form.field.invalid.border.color}" + } + }, + dark: { + root: { + invalidBorderColor: "{form.field.invalid.border.color}" + } + } + } +}; +var index$q = { + root: { + borderRadius: "{content.border.radius}" + }, + colorScheme: { + light: { + root: { + background: "{surface.200}", + animationBackground: "rgba(255,255,255,0.4)" + } + }, + dark: { + root: { + background: "rgba(255, 255, 255, 0.06)", + animationBackground: "rgba(255, 255, 255, 0.04)" + } + } + } +}; +var index$p = { + root: { + transitionDuration: "{transition.duration}" + }, + track: { + background: "{content.border.color}", + borderRadius: "{content.border.radius}", + size: "3px" + }, + range: { + background: "{primary.color}" + }, + handle: { + width: "20px", + height: "20px", + borderRadius: "50%", + background: "{content.border.color}", + hoverBackground: "{content.border.color}", + content: { + borderRadius: "50%", + hoverBackground: "{content.background}", + width: "16px", + height: "16px", + shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)" + }, + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + colorScheme: { + light: { + handle: { + contentBackground: "{surface.0}" + } + }, + dark: { + handle: { + contentBackground: "{surface.950}" + } + } + } +}; +var index$o = { + root: { + gap: "0.5rem", + transitionDuration: "{transition.duration}" + } +}; +var index$n = { + root: { + borderRadius: "{form.field.border.radius}", + roundedBorderRadius: "2rem", + raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)" + } +}; +var index$m = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + transitionDuration: "{transition.duration}" + }, + gutter: { + background: "{content.border.color}" + }, + handle: { + size: "24px", + background: "transparent", + borderRadius: "{content.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + } +}; +var index$l = { + root: { + transitionDuration: "{transition.duration}" + }, + separator: { + background: "{content.border.color}", + activeBackground: "{primary.color}", + margin: "0 0 0 1.625rem", + size: "2px" + }, + step: { + padding: "0.5rem", + gap: "1rem" + }, + stepHeader: { + padding: "0", + borderRadius: "{content.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + gap: "0.5rem" + }, + stepTitle: { + color: "{text.muted.color}", + activeColor: "{primary.color}", + fontWeight: "500" + }, + stepNumber: { + background: "{content.background}", + activeBackground: "{content.background}", + borderColor: "{content.border.color}", + activeBorderColor: "{content.border.color}", + color: "{text.muted.color}", + activeColor: "{primary.color}", + size: "2rem", + fontSize: "1.143rem", + fontWeight: "500", + borderRadius: "50%", + shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" + }, + steppanels: { + padding: "0.875rem 0.5rem 1.125rem 0.5rem" + }, + steppanel: { + background: "{content.background}", + color: "{content.color}", + padding: "0", + indent: "1rem" + } +}; +var index$k = { + root: { + transitionDuration: "{transition.duration}" + }, + separator: { + background: "{content.border.color}" + }, + itemLink: { + borderRadius: "{content.border.radius}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + gap: "0.5rem" + }, + itemLabel: { + color: "{text.muted.color}", + activeColor: "{primary.color}", + fontWeight: "500" + }, + itemNumber: { + background: "{content.background}", + activeBackground: "{content.background}", + borderColor: "{content.border.color}", + activeBorderColor: "{content.border.color}", + color: "{text.muted.color}", + activeColor: "{primary.color}", + size: "2rem", + fontSize: "1.143rem", + fontWeight: "500", + borderRadius: "50%", + shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" + } +}; +var index$j = { + root: { + transitionDuration: "{transition.duration}" + }, + tablist: { + borderWidth: "0 0 1px 0", + background: "{content.background}", + borderColor: "{content.border.color}" + }, + item: { + background: "transparent", + hoverBackground: "transparent", + activeBackground: "transparent", + borderWidth: "0 0 1px 0", + borderColor: "{content.border.color}", + hoverBorderColor: "{content.border.color}", + activeBorderColor: "{primary.color}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + activeColor: "{primary.color}", + padding: "1rem 1.125rem", + fontWeight: "600", + margin: "0 0 -1px 0", + gap: "0.5rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + itemIcon: { + color: "{text.muted.color}", + hoverColor: "{text.color}", + activeColor: "{primary.color}" + }, + activeBar: { + height: "1px", + bottom: "-1px", + background: "{primary.color}" + } +}; +var index$i = { + root: { + transitionDuration: "{transition.duration}" + }, + tablist: { + borderWidth: "0 0 1px 0", + background: "{content.background}", + borderColor: "{content.border.color}" + }, + tab: { + background: "transparent", + hoverBackground: "transparent", + activeBackground: "transparent", + borderWidth: "0 0 1px 0", + borderColor: "{content.border.color}", + hoverBorderColor: "{content.border.color}", + activeBorderColor: "{primary.color}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + activeColor: "{primary.color}", + padding: "1rem 1.125rem", + fontWeight: "600", + margin: "0 0 -1px 0", + gap: "0.5rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + } + }, + tabpanel: { + background: "{content.background}", + color: "{content.color}", + padding: "0.875rem 1.125rem 1.125rem 1.125rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "inset {focus.ring.shadow}" + } + }, + navButton: { + background: "{content.background}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + width: "2.5rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + } + }, + activeBar: { + height: "1px", + bottom: "-1px", + background: "{primary.color}" + }, + colorScheme: { + light: { + navButton: { + shadow: "0px 0px 10px 50px rgba(255, 255, 255, 0.6)" + } + }, + dark: { + navButton: { + shadow: "0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)" + } + } + } +}; +var index$h = { + root: { + transitionDuration: "{transition.duration}" + }, + tabList: { + background: "{content.background}", + borderColor: "{content.border.color}" + }, + tab: { + borderColor: "{content.border.color}", + activeBorderColor: "{primary.color}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + activeColor: "{primary.color}" + }, + tabPanel: { + background: "{content.background}", + color: "{content.color}" + }, + navButton: { + background: "{content.background}", + color: "{text.muted.color}", + hoverColor: "{text.color}" + }, + colorScheme: { + light: { + navButton: { + shadow: "0px 0px 10px 50px rgba(255, 255, 255, 0.6)" + } + }, + dark: { + navButton: { + shadow: "0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)" + } + } + } +}; +var index$g = { + root: { + fontSize: "0.875rem", + fontWeight: "700", + padding: "0.25rem 0.5rem", + gap: "0.25rem", + borderRadius: "{content.border.radius}", + roundedBorderRadius: "{border.radius.xl}" + }, + icon: { + size: "0.75rem" + }, + colorScheme: { + light: { + primary: { + background: "{primary.100}", + color: "{primary.700}" + }, + secondary: { + background: "{surface.100}", + color: "{surface.600}" + }, + success: { + background: "{green.100}", + color: "{green.700}" + }, + info: { + background: "{sky.100}", + color: "{sky.700}" + }, + warn: { + background: "{orange.100}", + color: "{orange.700}" + }, + danger: { + background: "{red.100}", + color: "{red.700}" + }, + contrast: { + background: "{surface.950}", + color: "{surface.0}" + } + }, + dark: { + primary: { + background: "color-mix(in srgb, {primary.500}, transparent 84%)", + color: "{primary.300}" + }, + secondary: { + background: "{surface.800}", + color: "{surface.300}" + }, + success: { + background: "color-mix(in srgb, {green.500}, transparent 84%)", + color: "{green.300}" + }, + info: { + background: "color-mix(in srgb, {sky.500}, transparent 84%)", + color: "{sky.300}" + }, + warn: { + background: "color-mix(in srgb, {orange.500}, transparent 84%)", + color: "{orange.300}" + }, + danger: { + background: "color-mix(in srgb, {red.500}, transparent 84%)", + color: "{red.300}" + }, + contrast: { + background: "{surface.0}", + color: "{surface.950}" + } + } + } +}; +var index$f = { + root: { + background: "{form.field.background}", + borderColor: "{form.field.border.color}", + color: "{form.field.color}", + height: "18rem", + padding: "{form.field.padding.y} {form.field.padding.x}", + borderRadius: "{form.field.border.radius}" + }, + prompt: { + gap: "0.25rem" + }, + commandResponse: { + margin: "2px 0" + } +}; +var index$e = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + } + } +}; +var index$d = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + color: "{content.color}", + borderRadius: "{content.border.radius}", + shadow: "{overlay.navigation.shadow}", + transitionDuration: "{transition.duration}" + }, + list: { + padding: "{navigation.list.padding}", + gap: "{navigation.list.gap}" + }, + item: { + focusBackground: "{navigation.item.focus.background}", + activeBackground: "{navigation.item.active.background}", + color: "{navigation.item.color}", + focusColor: "{navigation.item.focus.color}", + activeColor: "{navigation.item.active.color}", + padding: "{navigation.item.padding}", + borderRadius: "{navigation.item.border.radius}", + gap: "{navigation.item.gap}", + icon: { + color: "{navigation.item.icon.color}", + focusColor: "{navigation.item.icon.focus.color}", + activeColor: "{navigation.item.icon.active.color}" + } + }, + submenu: { + mobileIndent: "1rem" + }, + submenuIcon: { + size: "{navigation.submenu.icon.size}", + color: "{navigation.submenu.icon.color}", + focusColor: "{navigation.submenu.icon.focus.color}", + activeColor: "{navigation.submenu.icon.active.color}" + }, + separator: { + borderColor: "{content.border.color}" + } +}; +var index$c = { + event: { + minHeight: "5rem" + }, + horizontal: { + eventContent: { + padding: "1rem 0" + } + }, + vertical: { + eventContent: { + padding: "0 1rem" + } + }, + eventMarker: { + size: "1.125rem", + borderRadius: "50%", + borderWidth: "2px", + background: "{content.background}", + borderColor: "{content.border.color}", + content: { + borderRadius: "50%", + size: "0.375rem", + background: "{primary.color}", + insetShadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" + } + }, + eventConnector: { + color: "{content.border.color}", + size: "2px" + } +}; +var index$b = { + root: { + width: "25rem", + borderRadius: "{content.border.radius}", + borderWidth: "1px", + transitionDuration: "{transition.duration}" + }, + icon: { + size: "1.125rem" + }, + content: { + padding: "{overlay.popover.padding}", + gap: "0.5rem" + }, + text: { + gap: "0.5rem" + }, + summary: { + fontWeight: "500", + fontSize: "1rem" + }, + detail: { + fontWeight: "500", + fontSize: "0.875rem" + }, + closeButton: { + width: "1.75rem", + height: "1.75rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + offset: "{focus.ring.offset}" + } + }, + closeIcon: { + size: "1rem" + }, + colorScheme: { + light: { + blur: "1.5px", + info: { + background: "color-mix(in srgb, {blue.50}, transparent 5%)", + borderColor: "{blue.200}", + color: "{blue.600}", + detailColor: "{surface.700}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", + closeButton: { + hoverBackground: "{blue.100}", + focusRing: { + color: "{blue.600}", + shadow: "none" + } + } + }, + success: { + background: "color-mix(in srgb, {green.50}, transparent 5%)", + borderColor: "{green.200}", + color: "{green.600}", + detailColor: "{surface.700}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", + closeButton: { + hoverBackground: "{green.100}", + focusRing: { + color: "{green.600}", + shadow: "none" + } + } + }, + warn: { + background: "color-mix(in srgb,{yellow.50}, transparent 5%)", + borderColor: "{yellow.200}", + color: "{yellow.600}", + detailColor: "{surface.700}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", + closeButton: { + hoverBackground: "{yellow.100}", + focusRing: { + color: "{yellow.600}", + shadow: "none" + } + } + }, + error: { + background: "color-mix(in srgb, {red.50}, transparent 5%)", + borderColor: "{red.200}", + color: "{red.600}", + detailColor: "{surface.700}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", + closeButton: { + hoverBackground: "{red.100}", + focusRing: { + color: "{red.600}", + shadow: "none" + } + } + }, + secondary: { + background: "{surface.100}", + borderColor: "{surface.200}", + color: "{surface.600}", + detailColor: "{surface.700}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.200}", + focusRing: { + color: "{surface.600}", + shadow: "none" + } + } + }, + contrast: { + background: "{surface.900}", + borderColor: "{surface.950}", + color: "{surface.50}", + detailColor: "{surface.0}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.800}", + focusRing: { + color: "{surface.50}", + shadow: "none" + } + } + } + }, + dark: { + blur: "10px", + info: { + background: "color-mix(in srgb, {blue.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", + color: "{blue.500}", + detailColor: "{surface.0}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{blue.500}", + shadow: "none" + } + } + }, + success: { + background: "color-mix(in srgb, {green.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", + color: "{green.500}", + detailColor: "{surface.0}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{green.500}", + shadow: "none" + } + } + }, + warn: { + background: "color-mix(in srgb, {yellow.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", + color: "{yellow.500}", + detailColor: "{surface.0}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{yellow.500}", + shadow: "none" + } + } + }, + error: { + background: "color-mix(in srgb, {red.500}, transparent 84%)", + borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", + color: "{red.500}", + detailColor: "{surface.0}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", + closeButton: { + hoverBackground: "rgba(255, 255, 255, 0.05)", + focusRing: { + color: "{red.500}", + shadow: "none" + } + } + }, + secondary: { + background: "{surface.800}", + borderColor: "{surface.700}", + color: "{surface.300}", + detailColor: "{surface.0}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.700}", + focusRing: { + color: "{surface.300}", + shadow: "none" + } + } + }, + contrast: { + background: "{surface.0}", + borderColor: "{surface.100}", + color: "{surface.950}", + detailColor: "{surface.950}", + shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", + closeButton: { + hoverBackground: "{surface.100}", + focusRing: { + color: "{surface.950}", + shadow: "none" + } + } + } + } + } +}; +var index$a = { + root: { + padding: "0.5rem 1rem", + borderRadius: "{content.border.radius}", + gap: "0.5rem", + fontWeight: "500", + disabledBackground: "{form.field.disabled.background}", + disabledBorderColor: "{form.field.disabled.background}", + disabledColor: "{form.field.disabled.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + padding: "0.375rem 0.75rem" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + padding: "0.625rem 1.25rem" + } + }, + icon: { + disabledColor: "{form.field.disabled.color}" + }, + content: { + left: "0.25rem", + top: "0.25rem", + checkedShadow: "0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)" + }, + colorScheme: { + light: { + root: { + background: "{surface.100}", + checkedBackground: "{surface.100}", + hoverBackground: "{surface.100}", + borderColor: "{surface.100}", + color: "{surface.500}", + hoverColor: "{surface.700}", + checkedColor: "{surface.900}", + checkedBorderColor: "{surface.100}" + }, + content: { + checkedBackground: "{surface.0}" + }, + icon: { + color: "{surface.500}", + hoverColor: "{surface.700}", + checkedColor: "{surface.900}" + } + }, + dark: { + root: { + background: "{surface.950}", + checkedBackground: "{surface.950}", + hoverBackground: "{surface.950}", + borderColor: "{surface.950}", + color: "{surface.400}", + hoverColor: "{surface.300}", + checkedColor: "{surface.0}", + checkedBorderColor: "{surface.950}" + }, + content: { + checkedBackground: "{surface.800}" + }, + icon: { + color: "{surface.400}", + hoverColor: "{surface.300}", + checkedColor: "{surface.0}" + } + } + } +}; +var index$9 = { + root: { + width: "2.5rem", + height: "1.5rem", + borderRadius: "30px", + gap: "0.25rem", + shadow: "{form.field.shadow}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + }, + borderWidth: "1px", + borderColor: "transparent", + hoverBorderColor: "transparent", + checkedBorderColor: "transparent", + checkedHoverBorderColor: "transparent", + invalidBorderColor: "{form.field.invalid.border.color}", + transitionDuration: "{form.field.transition.duration}", + slideDuration: "0.2s" + }, + handle: { + borderRadius: "50%", + size: "1rem" + }, + colorScheme: { + light: { + root: { + background: "{surface.300}", + disabledBackground: "{form.field.disabled.background}", + hoverBackground: "{surface.400}", + checkedBackground: "{primary.color}", + checkedHoverBackground: "{primary.hover.color}" + }, + handle: { + background: "{surface.0}", + disabledBackground: "{form.field.disabled.color}", + hoverBackground: "{surface.0}", + checkedBackground: "{surface.0}", + checkedHoverBackground: "{surface.0}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + checkedColor: "{primary.color}", + checkedHoverColor: "{primary.hover.color}" + } + }, + dark: { + root: { + background: "{surface.700}", + disabledBackground: "{surface.600}", + hoverBackground: "{surface.600}", + checkedBackground: "{primary.color}", + checkedHoverBackground: "{primary.hover.color}" + }, + handle: { + background: "{surface.400}", + disabledBackground: "{surface.900}", + hoverBackground: "{surface.300}", + checkedBackground: "{surface.900}", + checkedHoverBackground: "{surface.900}", + color: "{surface.900}", + hoverColor: "{surface.800}", + checkedColor: "{primary.color}", + checkedHoverColor: "{primary.hover.color}" + } + } + } +}; +var index$8 = { + root: { + background: "{content.background}", + borderColor: "{content.border.color}", + borderRadius: "{content.border.radius}", + color: "{content.color}", + gap: "0.5rem", + padding: "0.75rem" + } +}; +var index$7 = { + root: { + maxWidth: "12.5rem", + gutter: "0.25rem", + shadow: "{overlay.popover.shadow}", + padding: "0.5rem 0.75rem", + borderRadius: "{overlay.popover.border.radius}" + }, + colorScheme: { + light: { + root: { + background: "{surface.700}", + color: "{surface.0}" + } + }, + dark: { + root: { + background: "{surface.700}", + color: "{surface.0}" + } + } + } +}; +var index$6 = { + root: { + background: "{content.background}", + color: "{content.color}", + padding: "1rem", + gap: "2px", + indent: "1rem", + transitionDuration: "{transition.duration}" + }, + node: { + padding: "0.25rem 0.5rem", + borderRadius: "{content.border.radius}", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + color: "{text.color}", + hoverColor: "{text.hover.color}", + selectedColor: "{highlight.color}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + }, + gap: "0.25rem" + }, + nodeIcon: { + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + selectedColor: "{highlight.color}" + }, + nodeToggleButton: { + borderRadius: "50%", + size: "1.75rem", + hoverBackground: "{content.hover.background}", + selectedHoverBackground: "{content.background}", + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + selectedHoverColor: "{primary.color}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + loadingIcon: { + size: "2rem" + }, + filter: { + margin: "0 0 0.5rem 0" + } +}; +var index$5 = { + root: { + background: "{form.field.background}", + disabledBackground: "{form.field.disabled.background}", + filledBackground: "{form.field.filled.background}", + filledHoverBackground: "{form.field.filled.hover.background}", + filledFocusBackground: "{form.field.filled.focus.background}", + borderColor: "{form.field.border.color}", + hoverBorderColor: "{form.field.hover.border.color}", + focusBorderColor: "{form.field.focus.border.color}", + invalidBorderColor: "{form.field.invalid.border.color}", + color: "{form.field.color}", + disabledColor: "{form.field.disabled.color}", + placeholderColor: "{form.field.placeholder.color}", + invalidPlaceholderColor: "{form.field.invalid.placeholder.color}", + shadow: "{form.field.shadow}", + paddingX: "{form.field.padding.x}", + paddingY: "{form.field.padding.y}", + borderRadius: "{form.field.border.radius}", + focusRing: { + width: "{form.field.focus.ring.width}", + style: "{form.field.focus.ring.style}", + color: "{form.field.focus.ring.color}", + offset: "{form.field.focus.ring.offset}", + shadow: "{form.field.focus.ring.shadow}" + }, + transitionDuration: "{form.field.transition.duration}", + sm: { + fontSize: "{form.field.sm.font.size}", + paddingX: "{form.field.sm.padding.x}", + paddingY: "{form.field.sm.padding.y}" + }, + lg: { + fontSize: "{form.field.lg.font.size}", + paddingX: "{form.field.lg.padding.x}", + paddingY: "{form.field.lg.padding.y}" + } + }, + dropdown: { + width: "2.5rem", + color: "{form.field.icon.color}" + }, + overlay: { + background: "{overlay.select.background}", + borderColor: "{overlay.select.border.color}", + borderRadius: "{overlay.select.border.radius}", + color: "{overlay.select.color}", + shadow: "{overlay.select.shadow}" + }, + tree: { + padding: "{list.padding}" + }, + clearIcon: { + color: "{form.field.icon.color}" + }, + emptyMessage: { + padding: "{list.option.padding}" + }, + chip: { + borderRadius: "{border.radius.sm}" + } +}; +var index$4 = { + root: { + transitionDuration: "{transition.duration}" + }, + header: { + background: "{content.background}", + borderColor: "{treetable.border.color}", + color: "{content.color}", + borderWidth: "0 0 1px 0", + padding: "0.75rem 1rem" + }, + headerCell: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + borderColor: "{treetable.border.color}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + selectedColor: "{highlight.color}", + gap: "0.5rem", + padding: "0.75rem 1rem", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + } + }, + columnTitle: { + fontWeight: "600" + }, + row: { + background: "{content.background}", + hoverBackground: "{content.hover.background}", + selectedBackground: "{highlight.background}", + color: "{content.color}", + hoverColor: "{content.hover.color}", + selectedColor: "{highlight.color}", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "-1px", + shadow: "{focus.ring.shadow}" + } + }, + bodyCell: { + borderColor: "{treetable.border.color}", + padding: "0.75rem 1rem", + gap: "0.5rem" + }, + footerCell: { + background: "{content.background}", + borderColor: "{treetable.border.color}", + color: "{content.color}", + padding: "0.75rem 1rem" + }, + columnFooter: { + fontWeight: "600" + }, + footer: { + background: "{content.background}", + borderColor: "{treetable.border.color}", + color: "{content.color}", + borderWidth: "0 0 1px 0", + padding: "0.75rem 1rem" + }, + columnResizerWidth: "0.5rem", + resizeIndicator: { + width: "1px", + color: "{primary.color}" + }, + sortIcon: { + color: "{text.muted.color}", + hoverColor: "{text.hover.muted.color}", + size: "0.875rem" + }, + loadingIcon: { + size: "2rem" + }, + nodeToggleButton: { + hoverBackground: "{content.hover.background}", + selectedHoverBackground: "{content.background}", + color: "{text.muted.color}", + hoverColor: "{text.color}", + selectedHoverColor: "{primary.color}", + size: "1.75rem", + borderRadius: "50%", + focusRing: { + width: "{focus.ring.width}", + style: "{focus.ring.style}", + color: "{focus.ring.color}", + offset: "{focus.ring.offset}", + shadow: "{focus.ring.shadow}" + } + }, + paginatorTop: { + borderColor: "{content.border.color}", + borderWidth: "0 0 1px 0" + }, + paginatorBottom: { + borderColor: "{content.border.color}", + borderWidth: "0 0 1px 0" + }, + colorScheme: { + light: { + root: { + borderColor: "{content.border.color}" + }, + bodyCell: { + selectedBorderColor: "{primary.100}" + } + }, + dark: { + root: { + borderColor: "{surface.800}" + }, + bodyCell: { + selectedBorderColor: "{primary.900}" + } + } + } +}; +var index$3 = { + loader: { + mask: { + background: "{content.background}", + color: "{text.muted.color}" + }, + icon: { + size: "2rem" + } + } +}; +function _typeof$t(o2) { + "@babel/helpers - typeof"; + return _typeof$t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) { + return typeof o3; + } : function(o3) { + return o3 && "function" == typeof Symbol && o3.constructor === Symbol && o3 !== Symbol.prototype ? "symbol" : typeof o3; + }, _typeof$t(o2); +} +__name(_typeof$t, "_typeof$t"); +function ownKeys$r(e2, r2) { + var t2 = Object.keys(e2); + if (Object.getOwnPropertySymbols) { + var o2 = Object.getOwnPropertySymbols(e2); + r2 && (o2 = o2.filter(function(r3) { + return Object.getOwnPropertyDescriptor(e2, r3).enumerable; + })), t2.push.apply(t2, o2); + } + return t2; +} +__name(ownKeys$r, "ownKeys$r"); +function _objectSpread$r(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t2 = null != arguments[r2] ? arguments[r2] : {}; + r2 % 2 ? ownKeys$r(Object(t2), true).forEach(function(r3) { + _defineProperty$v(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$r(Object(t2)).forEach(function(r3) { + Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); + }); + } + return e2; +} +__name(_objectSpread$r, "_objectSpread$r"); +function _defineProperty$v(e2, r2, t2) { + return (r2 = _toPropertyKey$s(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +} +__name(_defineProperty$v, "_defineProperty$v"); +function _toPropertyKey$s(t2) { + var i2 = _toPrimitive$s(t2, "string"); + return "symbol" == _typeof$t(i2) ? i2 : i2 + ""; +} +__name(_toPropertyKey$s, "_toPropertyKey$s"); +function _toPrimitive$s(t2, r2) { + if ("object" != _typeof$t(t2) || !t2) return t2; + var e2 = t2[Symbol.toPrimitive]; + if (void 0 !== e2) { + var i2 = e2.call(t2, r2 || "default"); + if ("object" != _typeof$t(i2)) return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r2 ? String : Number)(t2); +} +__name(_toPrimitive$s, "_toPrimitive$s"); +var index$2 = _objectSpread$r(_objectSpread$r({}, index$1n), {}, { components: { - accordion: index$1n, - autocomplete: index$1m, - avatar: index$1l, - badge: index$1k, - blockui: index$1j, - breadcrumb: index$1i, - button: index$1h, - datepicker: index$15, - card: index$1g, - carousel: index$1f, - cascadeselect: index$1e, - checkbox: index$1d, - chip: index$1c, - colorpicker: index$1b, - confirmdialog: index$1a, - confirmpopup: index$19, - contextmenu: index$18, - dataview: index$16, - datatable: index$17, - dialog: index$14, - divider: index$13, - dock: index$12, - drawer: index$11, - editor: index$10, - fieldset: index$$, - fileupload: index$_, - floatlabel: index$Z, - galleria: index$Y, - iconfield: index$X, - image: index$W, - inlinemessage: index$V, - inplace: index$U, - inputchips: index$T, - inputgroup: index$S, - inputnumber: index$R, + accordion: index$1r, + autocomplete: index$1q, + avatar: index$1p, + badge: index$1o, + blockui: index$1m, + breadcrumb: index$1l, + button: index$1k, + datepicker: index$18, + card: index$1j, + carousel: index$1i, + cascadeselect: index$1h, + checkbox: index$1g, + chip: index$1f, + colorpicker: index$1e, + confirmdialog: index$1d, + confirmpopup: index$1c, + contextmenu: index$1b, + dataview: index$19, + datatable: index$1a, + dialog: index$17, + divider: index$16, + dock: index$15, + drawer: index$14, + editor: index$13, + fieldset: index$12, + fileupload: index$11, + iftalabel: index$Z, + floatlabel: index$10, + galleria: index$$, + iconfield: index$_, + image: index$Y, + imagecompare: index$X, + inlinemessage: index$W, + inplace: index$V, + inputchips: index$U, + inputgroup: index$T, + inputnumber: index$S, + inputotp: index$R, inputtext: index$Q, knob: index$P, listbox: index$O, @@ -5972,7 +6540,7 @@ var index$2 = { tooltip: index$7, ripple: index$u } -}; +}); const DEBUG_BUILD$6 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; const SDK_VERSION = "8.48.0"; const GLOBAL_OBJ = globalThis; @@ -6144,9 +6712,9 @@ function getFramesFromEvent(event) { __name(getFramesFromEvent, "getFramesFromEvent"); const handlers$4 = {}; const instrumented$1 = {}; -function addHandler$1(type, handler6) { +function addHandler$1(type, handler12) { handlers$4[type] = handlers$4[type] || []; - handlers$4[type].push(handler6); + handlers$4[type].push(handler12); } __name(addHandler$1, "addHandler$1"); function resetInstrumentationHandlers() { @@ -6166,19 +6734,19 @@ function maybeInstrument(type, instrumentFn) { } } __name(maybeInstrument, "maybeInstrument"); -function triggerHandlers$1(type, data25) { +function triggerHandlers$1(type, data26) { const typeHandlers = type && handlers$4[type]; if (!typeHandlers) { return; } - for (const handler6 of typeHandlers) { + for (const handler12 of typeHandlers) { try { - handler6(data25); + handler12(data26); } catch (e2) { DEBUG_BUILD$5 && logger$2.error( `Error while triggering instrumentation handler. Type: ${type} -Name: ${getFunctionName(handler6)} +Name: ${getFunctionName(handler12)} Error:`, e2 ); @@ -6187,9 +6755,9 @@ Error:`, } __name(triggerHandlers$1, "triggerHandlers$1"); let _oldOnErrorHandler = null; -function addGlobalErrorInstrumentationHandler(handler6) { +function addGlobalErrorInstrumentationHandler(handler12) { const type = "error"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, instrumentError); } __name(addGlobalErrorInstrumentationHandler, "addGlobalErrorInstrumentationHandler"); @@ -6213,9 +6781,9 @@ function instrumentError() { } __name(instrumentError, "instrumentError"); let _oldOnUnhandledRejectionHandler = null; -function addGlobalUnhandledRejectionInstrumentationHandler(handler6) { +function addGlobalUnhandledRejectionInstrumentationHandler(handler12) { const type = "unhandledrejection"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, instrumentUnhandledRejection); } __name(addGlobalUnhandledRejectionInstrumentationHandler, "addGlobalUnhandledRejectionInstrumentationHandler"); @@ -6272,10 +6840,10 @@ function isDOMException(wat) { return isBuiltin(wat, "DOMException"); } __name(isDOMException, "isDOMException"); -function isString$8(wat) { +function isString$a(wat) { return isBuiltin(wat, "String"); } -__name(isString$8, "isString$8"); +__name(isString$a, "isString$a"); function isParameterizedString(wat) { return typeof wat === "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; } @@ -6379,7 +6947,7 @@ function _htmlElementAsString(el, keyAttrs) { out.push(`#${elem.id}`); } const className = elem.className; - if (className && isString$8(className)) { + if (className && isString$a(className)) { const classes2 = className.split(/\s+/); for (const c2 of classes2) { out.push(`.${c2}`); @@ -6492,13 +7060,13 @@ function safeJoin(input, delimiter2) { } __name(safeJoin, "safeJoin"); function isMatchingPattern(value4, pattern, requireExactStringMatch = false) { - if (!isString$8(value4)) { + if (!isString$a(value4)) { return false; } if (isRegExp$5(pattern)) { return pattern.test(value4); } - if (isString$8(pattern)) { + if (isString$a(pattern)) { return requireExactStringMatch ? value4 === pattern : value4.includes(pattern); } return false; @@ -6578,9 +7146,9 @@ function convertToPlainObject(value4) { } } __name(convertToPlainObject, "convertToPlainObject"); -function serializeEventTarget(target) { +function serializeEventTarget(target2) { try { - return isElement$3(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target); + return isElement$3(target2) ? htmlTreeAsString(target2) : Object.prototype.toString.call(target2); } catch (_oO) { return ""; } @@ -6996,17 +7564,17 @@ class SyncPromise { } const cachedHandlers = this._handlers.slice(); this._handlers = []; - cachedHandlers.forEach((handler6) => { - if (handler6[0]) { + cachedHandlers.forEach((handler12) => { + if (handler12[0]) { return; } if (this._state === States.RESOLVED) { - handler6[1](this._value); + handler12[1](this._value); } if (this._state === States.REJECTED) { - handler6[2](this._value); + handler12[2](this._value); } - handler6[0] = true; + handler12[0] = true; }); }; } @@ -7132,7 +7700,7 @@ function generateSpanId() { return uuid4().substring(16); } __name(generateSpanId, "generateSpanId"); -function merge$1(initialObj, mergeObj, levels = 2) { +function merge$2(initialObj, mergeObj, levels = 2) { if (!mergeObj || typeof mergeObj !== "object" || levels <= 0) { return mergeObj; } @@ -7142,12 +7710,12 @@ function merge$1(initialObj, mergeObj, levels = 2) { const output = { ...initialObj }; for (const key in mergeObj) { if (Object.prototype.hasOwnProperty.call(mergeObj, key)) { - output[key] = merge$1(output[key], mergeObj[key], levels - 1); + output[key] = merge$2(output[key], mergeObj[key], levels - 1); } } return output; } -__name(merge$1, "merge$1"); +__name(merge$2, "merge$2"); const SCOPE_SPAN_FIELD = "_sentrySpan"; function _setSpanForScope(scope, span) { if (span) { @@ -7526,7 +8094,7 @@ class ScopeClass { * @inheritDoc */ setSDKProcessingMetadata(newData) { - this._sdkProcessingMetadata = merge$1(this._sdkProcessingMetadata, newData, 2); + this._sdkProcessingMetadata = merge$2(this._sdkProcessingMetadata, newData, 2); return this; } /** @@ -7973,7 +8541,7 @@ function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { } __name(dynamicSamplingContextToSentryBaggageHeader, "dynamicSamplingContextToSentryBaggageHeader"); function parseBaggageHeader(baggageHeader) { - if (!baggageHeader || !isString$8(baggageHeader) && !Array.isArray(baggageHeader)) { + if (!baggageHeader || !isString$a(baggageHeader) && !Array.isArray(baggageHeader)) { return void 0; } if (Array.isArray(baggageHeader)) { @@ -8071,12 +8639,12 @@ const TRACE_FLAG_SAMPLED = 1; let hasShownSpanDropWarning = false; function spanToTransactionTraceContext(span) { const { spanId: span_id, traceId: trace_id } = span.spanContext(); - const { data: data25, op, parent_span_id, status, origin: origin2 } = spanToJSON(span); + const { data: data26, op, parent_span_id, status, origin: origin2 } = spanToJSON(span); return dropUndefinedKeys({ parent_span_id, span_id, trace_id, - data: data25, + data: data26, op, status, origin: origin2 @@ -9694,7 +10262,7 @@ function startIdleSpan(startSpanOptions, options4 = {}) { const previousActiveSpan = getActiveSpan(); const span = _startIdleSpan(startSpanOptions); span.end = new Proxy(span.end, { - apply(target, thisArg, args) { + apply(target2, thisArg, args) { if (beforeSpanEnd) { beforeSpanEnd(span); } @@ -9704,7 +10272,7 @@ function startIdleSpan(startSpanOptions, options4 = {}) { const spans = getSpanDescendants(span).filter((child) => child !== span); if (!spans.length) { onIdleSpanEnded(spanEndTimestamp); - return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]); + return Reflect.apply(target2, thisArg, [spanEndTimestamp, ...rest]); } const childEndTimestamps = spans.map((span2) => spanToJSON(span2).timestamp).filter((timestamp3) => !!timestamp3); const latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : void 0; @@ -9714,7 +10282,7 @@ function startIdleSpan(startSpanOptions, options4 = {}) { Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)) ); onIdleSpanEnded(endTimestamp); - return Reflect.apply(target, thisArg, [endTimestamp, ...rest]); + return Reflect.apply(target2, thisArg, [endTimestamp, ...rest]); } }); function _cancelIdleTimeout() { @@ -9929,9 +10497,9 @@ function getDebugImagesForResources(stackParser, resource_paths) { return images; } __name(getDebugImagesForResources, "getDebugImagesForResources"); -function applyScopeDataToEvent(event, data25) { - const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data25; - applyDataToEvent(event, data25); +function applyScopeDataToEvent(event, data26) { + const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data26; + applyDataToEvent(event, data26); if (span) { applySpanToEvent(event, span); } @@ -9940,7 +10508,7 @@ function applyScopeDataToEvent(event, data25) { applySdkMetadataToEvent(event, sdkProcessingMetadata); } __name(applyScopeDataToEvent, "applyScopeDataToEvent"); -function mergeScopeData(data25, mergeData) { +function mergeScopeData(data26, mergeData) { const { extra, tags, @@ -9956,41 +10524,41 @@ function mergeScopeData(data25, mergeData) { transactionName, span } = mergeData; - mergeAndOverwriteScopeData(data25, "extra", extra); - mergeAndOverwriteScopeData(data25, "tags", tags); - mergeAndOverwriteScopeData(data25, "user", user); - mergeAndOverwriteScopeData(data25, "contexts", contexts); - data25.sdkProcessingMetadata = merge$1(data25.sdkProcessingMetadata, sdkProcessingMetadata, 2); + mergeAndOverwriteScopeData(data26, "extra", extra); + mergeAndOverwriteScopeData(data26, "tags", tags); + mergeAndOverwriteScopeData(data26, "user", user); + mergeAndOverwriteScopeData(data26, "contexts", contexts); + data26.sdkProcessingMetadata = merge$2(data26.sdkProcessingMetadata, sdkProcessingMetadata, 2); if (level) { - data25.level = level; + data26.level = level; } if (transactionName) { - data25.transactionName = transactionName; + data26.transactionName = transactionName; } if (span) { - data25.span = span; + data26.span = span; } if (breadcrumbs.length) { - data25.breadcrumbs = [...data25.breadcrumbs, ...breadcrumbs]; + data26.breadcrumbs = [...data26.breadcrumbs, ...breadcrumbs]; } if (fingerprint.length) { - data25.fingerprint = [...data25.fingerprint, ...fingerprint]; + data26.fingerprint = [...data26.fingerprint, ...fingerprint]; } if (eventProcessors.length) { - data25.eventProcessors = [...data25.eventProcessors, ...eventProcessors]; + data26.eventProcessors = [...data26.eventProcessors, ...eventProcessors]; } if (attachments.length) { - data25.attachments = [...data25.attachments, ...attachments]; + data26.attachments = [...data26.attachments, ...attachments]; } - data25.propagationContext = { ...data25.propagationContext, ...propagationContext }; + data26.propagationContext = { ...data26.propagationContext, ...propagationContext }; } __name(mergeScopeData, "mergeScopeData"); -function mergeAndOverwriteScopeData(data25, prop2, mergeVal) { - data25[prop2] = merge$1(data25[prop2], mergeVal, 1); +function mergeAndOverwriteScopeData(data26, prop2, mergeVal) { + data26[prop2] = merge$2(data26[prop2], mergeVal, 1); } __name(mergeAndOverwriteScopeData, "mergeAndOverwriteScopeData"); -function applyDataToEvent(event, data25) { - const { extra, tags, user, contexts, level, transactionName } = data25; +function applyDataToEvent(event, data26) { + const { extra, tags, user, contexts, level, transactionName } = data26; const cleanedExtra = dropUndefinedKeys(extra); if (cleanedExtra && Object.keys(cleanedExtra).length) { event.extra = { ...cleanedExtra, ...event.extra }; @@ -10074,24 +10642,24 @@ function prepareEvent(options4, event, hint, scope, client, isolationScope) { addExceptionMechanism(prepared, hint.mechanism); } const clientEventProcessors = client ? client.getEventProcessors() : []; - const data25 = getGlobalScope().getScopeData(); + const data26 = getGlobalScope().getScopeData(); if (isolationScope) { const isolationData = isolationScope.getScopeData(); - mergeScopeData(data25, isolationData); + mergeScopeData(data26, isolationData); } if (finalScope) { const finalScopeData = finalScope.getScopeData(); - mergeScopeData(data25, finalScopeData); + mergeScopeData(data26, finalScopeData); } - const attachments = [...hint.attachments || [], ...data25.attachments]; + const attachments = [...hint.attachments || [], ...data26.attachments]; if (attachments.length) { hint.attachments = attachments; } - applyScopeDataToEvent(prepared, data25); + applyScopeDataToEvent(prepared, data26); const eventProcessors = [ ...clientEventProcessors, // Run scope event processors _after_ all other processors - ...data25.eventProcessors + ...data26.eventProcessors ]; const result = notifyEventProcessors(eventProcessors, prepared, hint); return result.then((evt) => { @@ -10444,7 +11012,7 @@ class SessionFlusher { __name(this, "SessionFlusher"); } // We adjust the type here to add the `unref()` part, as setInterval can technically return a number or a NodeJS.Timer - constructor(client, attrs4) { + constructor(client, attrs6) { this._client = client; this.flushTimeout = 60; this._pendingAggregates = /* @__PURE__ */ new Map(); @@ -10453,7 +11021,7 @@ class SessionFlusher { if (this._intervalId.unref) { this._intervalId.unref(); } - this._sessionAttrs = attrs4; + this._sessionAttrs = attrs6; } /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ flush() { @@ -12747,7 +13315,7 @@ function extractRequestData(req, options4 = {}) { } const body = req.body; if (body !== void 0) { - const stringBody = isString$8(body) ? body : isPlainObject$5(body) ? JSON.stringify(normalize$2(body)) : truncate(`${body}`, 1024); + const stringBody = isString$a(body) ? body : isPlainObject$5(body) ? JSON.stringify(normalize$2(body)) : truncate(`${body}`, 1024); if (stringBody) { requestData.data = stringBody; } @@ -12898,7 +13466,7 @@ function httpRequestToRequestData(request) { const protocol = request.socket && request.socket.encrypted ? "https" : "http"; const originalUrl = request.url || ""; const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; - const data25 = request.body || void 0; + const data26 = request.body || void 0; const cookies2 = request.cookies; return dropUndefinedKeys({ url: absoluteUrl, @@ -12906,7 +13474,7 @@ function httpRequestToRequestData(request) { query_string: extractQueryParamsFromUrl(originalUrl), headers: headersToDict(headers), cookies: cookies2, - data: data25 + data: data26 }); } __name(httpRequestToRequestData, "httpRequestToRequestData"); @@ -13043,9 +13611,9 @@ function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { }; } __name(convertReqDataIntegrationOptsToAddReqDataOpts, "convertReqDataIntegrationOptsToAddReqDataOpts"); -function addConsoleInstrumentationHandler(handler6) { +function addConsoleInstrumentationHandler(handler12) { const type = "console"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, instrumentConsole); } __name(addConsoleInstrumentationHandler, "addConsoleInstrumentationHandler"); @@ -13381,7 +13949,7 @@ function splitPath(filename) { return parts2 ? parts2.slice(1) : []; } __name(splitPath, "splitPath"); -function resolve$1(...args) { +function resolve$3(...args) { let resolvedPath = ""; let resolvedAbsolute = false; for (let i2 = args.length - 1; i2 >= -1 && !resolvedAbsolute; i2--) { @@ -13398,7 +13966,7 @@ function resolve$1(...args) { ).join("/"); return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; } -__name(resolve$1, "resolve$1"); +__name(resolve$3, "resolve$3"); function trim$1(arr) { let start2 = 0; for (; start2 < arr.length; start2++) { @@ -13419,8 +13987,8 @@ function trim$1(arr) { } __name(trim$1, "trim$1"); function relative(from2, to) { - from2 = resolve$1(from2).slice(1); - to = resolve$1(to).slice(1); + from2 = resolve$3(from2).slice(1); + to = resolve$3(to).slice(1); const fromParts = trim$1(from2.split("/")); const toParts = trim$1(to.split("/")); const length = Math.min(fromParts.length, toParts.length); @@ -13465,15 +14033,15 @@ function join$3(...args) { __name(join$3, "join$3"); function dirname(path) { const result = splitPath(path); - const root27 = result[0] || ""; + const root29 = result[0] || ""; let dir = result[1]; - if (!root27 && !dir) { + if (!root29 && !dir) { return "."; } if (dir) { dir = dir.slice(0, dir.length - 1); } - return root27 + dir; + return root29 + dir; } __name(dirname, "dirname"); function basename(path, ext) { @@ -13486,10 +14054,10 @@ function basename(path, ext) { __name(basename, "basename"); const INTEGRATION_NAME$d = "RewriteFrames"; const rewriteFramesIntegration = defineIntegration((options4 = {}) => { - const root27 = options4.root; + const root29 = options4.root; const prefix2 = options4.prefix || "app:///"; const isBrowser2 = "window" in GLOBAL_OBJ && GLOBAL_OBJ.window !== void 0; - const iteratee = options4.iteratee || generateIteratee({ isBrowser: isBrowser2, root: root27, prefix: prefix2 }); + const iteratee = options4.iteratee || generateIteratee({ isBrowser: isBrowser2, root: root29, prefix: prefix2 }); function _processExceptionsEvent(event) { try { return { @@ -13529,7 +14097,7 @@ const rewriteFramesIntegration = defineIntegration((options4 = {}) => { }); function generateIteratee({ isBrowser: isBrowser2, - root: root27, + root: root29, prefix: prefix2 }) { return (frame) => { @@ -13540,16 +14108,16 @@ function generateIteratee({ frame.filename.includes("\\") && !frame.filename.includes("/"); const startsWithSlash = /^\//.test(frame.filename); if (isBrowser2) { - if (root27) { + if (root29) { const oldFilename = frame.filename; - if (oldFilename.indexOf(root27) === 0) { - frame.filename = oldFilename.replace(root27, prefix2); + if (oldFilename.indexOf(root29) === 0) { + frame.filename = oldFilename.replace(root29, prefix2); } } } else { if (isWindowsFrame || startsWithSlash) { const filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename; - const base2 = root27 ? relative(root27, filename) : basename(filename); + const base2 = root29 ? relative(root29, filename) : basename(filename); frame.filename = `${prefix2}${base2}`; } } @@ -13718,15 +14286,15 @@ function getMetricsAggregatorForClient$1(client, Aggregator) { return newAggregator; } __name(getMetricsAggregatorForClient$1, "getMetricsAggregatorForClient$1"); -function addToMetricsAggregator(Aggregator, metricType, name2, value4, data25 = {}) { - const client = data25.client || getClient(); +function addToMetricsAggregator(Aggregator, metricType, name2, value4, data26 = {}) { + const client = data26.client || getClient(); if (!client) { return; } const span = getActiveSpan(); const rootSpan = span ? getRootSpan(span) : void 0; const transactionName = rootSpan && spanToJSON(rootSpan).description; - const { unit, tags, timestamp: timestamp2 } = data25; + const { unit, tags, timestamp: timestamp2 } = data26; const { release, environment } = client.getOptions(); const metricTags = {}; if (release) { @@ -13743,15 +14311,15 @@ function addToMetricsAggregator(Aggregator, metricType, name2, value4, data25 = aggregator.add(metricType, name2, value4, unit, { ...metricTags, ...tags }, timestamp2); } __name(addToMetricsAggregator, "addToMetricsAggregator"); -function increment$2(aggregator, name2, value4 = 1, data25) { - addToMetricsAggregator(aggregator, COUNTER_METRIC_TYPE, name2, ensureNumber(value4), data25); +function increment$2(aggregator, name2, value4 = 1, data26) { + addToMetricsAggregator(aggregator, COUNTER_METRIC_TYPE, name2, ensureNumber(value4), data26); } __name(increment$2, "increment$2"); -function distribution$2(aggregator, name2, value4, data25) { - addToMetricsAggregator(aggregator, DISTRIBUTION_METRIC_TYPE, name2, ensureNumber(value4), data25); +function distribution$2(aggregator, name2, value4, data26) { + addToMetricsAggregator(aggregator, DISTRIBUTION_METRIC_TYPE, name2, ensureNumber(value4), data26); } __name(distribution$2, "distribution$2"); -function timing$2(aggregator, name2, value4, unit = "second", data25) { +function timing$2(aggregator, name2, value4, unit = "second", data26) { if (typeof value4 === "function") { const startTime = timestampInSeconds(); return startSpanManual( @@ -13769,28 +14337,28 @@ function timing$2(aggregator, name2, value4, unit = "second", data25) { () => { const endTime = timestampInSeconds(); const timeDiff = endTime - startTime; - distribution$2(aggregator, name2, timeDiff, { ...data25, unit: "second" }); + distribution$2(aggregator, name2, timeDiff, { ...data26, unit: "second" }); span.end(endTime); } ); } ); } - distribution$2(aggregator, name2, value4, { ...data25, unit }); + distribution$2(aggregator, name2, value4, { ...data26, unit }); } __name(timing$2, "timing$2"); -function set$7(aggregator, name2, value4, data25) { - addToMetricsAggregator(aggregator, SET_METRIC_TYPE, name2, value4, data25); +function set$6(aggregator, name2, value4, data26) { + addToMetricsAggregator(aggregator, SET_METRIC_TYPE, name2, value4, data26); } -__name(set$7, "set$7"); -function gauge$2(aggregator, name2, value4, data25) { - addToMetricsAggregator(aggregator, GAUGE_METRIC_TYPE, name2, ensureNumber(value4), data25); +__name(set$6, "set$6"); +function gauge$2(aggregator, name2, value4, data26) { + addToMetricsAggregator(aggregator, GAUGE_METRIC_TYPE, name2, ensureNumber(value4), data26); } __name(gauge$2, "gauge$2"); const metrics$1 = { increment: increment$2, distribution: distribution$2, - set: set$7, + set: set$6, gauge: gauge$2, timing: timing$2, /** @@ -14169,24 +14737,24 @@ class MetricsAggregator { } } } -function increment$1(name2, value4 = 1, data25) { - metrics$1.increment(MetricsAggregator, name2, value4, data25); +function increment$1(name2, value4 = 1, data26) { + metrics$1.increment(MetricsAggregator, name2, value4, data26); } __name(increment$1, "increment$1"); -function distribution$1(name2, value4, data25) { - metrics$1.distribution(MetricsAggregator, name2, value4, data25); +function distribution$1(name2, value4, data26) { + metrics$1.distribution(MetricsAggregator, name2, value4, data26); } __name(distribution$1, "distribution$1"); -function set$6(name2, value4, data25) { - metrics$1.set(MetricsAggregator, name2, value4, data25); +function set$5(name2, value4, data26) { + metrics$1.set(MetricsAggregator, name2, value4, data26); } -__name(set$6, "set$6"); -function gauge$1(name2, value4, data25) { - metrics$1.gauge(MetricsAggregator, name2, value4, data25); +__name(set$5, "set$5"); +function gauge$1(name2, value4, data26) { + metrics$1.gauge(MetricsAggregator, name2, value4, data26); } __name(gauge$1, "gauge$1"); -function timing$1(name2, value4, unit = "second", data25) { - return metrics$1.timing(MetricsAggregator, name2, value4, unit, data25); +function timing$1(name2, value4, unit = "second", data26) { + return metrics$1.timing(MetricsAggregator, name2, value4, unit, data26); } __name(timing$1, "timing$1"); function getMetricsAggregatorForClient(client) { @@ -14196,7 +14764,7 @@ __name(getMetricsAggregatorForClient, "getMetricsAggregatorForClient"); const metricsDefault = { increment: increment$1, distribution: distribution$1, - set: set$6, + set: set$5, gauge: gauge$1, timing: timing$1, /** @@ -14676,15 +15244,15 @@ function supportsReferrerPolicy() { } } __name(supportsReferrerPolicy, "supportsReferrerPolicy"); -function addFetchInstrumentationHandler(handler6, skipNativeFetchCheck) { +function addFetchInstrumentationHandler(handler12, skipNativeFetchCheck) { const type = "fetch"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, () => instrumentFetch(void 0, skipNativeFetchCheck)); } __name(addFetchInstrumentationHandler, "addFetchInstrumentationHandler"); -function addFetchEndInstrumentationHandler(handler6) { +function addFetchEndInstrumentationHandler(handler12) { const type = "fetch-body-resolved"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, () => instrumentFetch(streamHandler)); } __name(addFetchEndInstrumentationHandler, "addFetchEndInstrumentationHandler"); @@ -14957,12 +15525,12 @@ function _parseIntOrUndefined(input) { return parseInt(input || "", 10) || void 0; } __name(_parseIntOrUndefined, "_parseIntOrUndefined"); -function makeFifoCache(size2) { +function makeFifoCache(size) { let evictionOrder = []; let cache2 = {}; return { add(key, value4) { - while (evictionOrder.length >= size2) { + while (evictionOrder.length >= size) { const evictCandidate = evictionOrder.shift(); if (evictCandidate !== void 0) { delete cache2[evictCandidate]; @@ -16043,19 +16611,19 @@ function addPerformanceInstrumentationHandler(type, callback) { return getCleanupCallback(type, callback); } __name(addPerformanceInstrumentationHandler, "addPerformanceInstrumentationHandler"); -function triggerHandlers(type, data25) { +function triggerHandlers(type, data26) { const typeHandlers = handlers$3[type]; if (!typeHandlers || !typeHandlers.length) { return; } - for (const handler6 of typeHandlers) { + for (const handler12 of typeHandlers) { try { - handler6(data25); + handler12(data26); } catch (e2) { DEBUG_BUILD$3 && logger$2.error( `Error while triggering instrumentation handler. Type: ${type} -Name: ${getFunctionName(handler6)} +Name: ${getFunctionName(handler12)} Error:`, e2 ); @@ -16145,9 +16713,9 @@ function instrumentPerformanceObserver(type) { ); } __name(instrumentPerformanceObserver, "instrumentPerformanceObserver"); -function addHandler(type, handler6) { +function addHandler(type, handler12) { handlers$3[type] = handlers$3[type] || []; - handlers$3[type].push(handler6); + handlers$3[type].push(handler12); } __name(addHandler, "addHandler"); function getCleanupCallback(type, callback, stopListening) { @@ -16753,9 +17321,9 @@ const DEBOUNCE_DURATION = 1e3; let debounceTimerID; let lastCapturedEventType; let lastCapturedEventTargetId; -function addClickKeypressInstrumentationHandler(handler6) { +function addClickKeypressInstrumentationHandler(handler12) { const type = "dom"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, instrumentDOM); } __name(addClickKeypressInstrumentationHandler, "addClickKeypressInstrumentationHandler"); @@ -16767,9 +17335,9 @@ function instrumentDOM() { const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true); WINDOW$4.document.addEventListener("click", globalDOMEventHandler, false); WINDOW$4.document.addEventListener("keypress", globalDOMEventHandler, false); - ["EventTarget", "Node"].forEach((target) => { + ["EventTarget", "Node"].forEach((target2) => { const globalObject = WINDOW$4; - const targetObj = globalObject[target]; + const targetObj = globalObject[target2]; const proto = targetObj && targetObj.prototype; if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty("addEventListener")) { return; @@ -16781,9 +17349,9 @@ function instrumentDOM() { const handlers2 = this.__sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__ || {}; const handlerForType = handlers2[type] = handlers2[type] || { refCount: 0 }; if (!handlerForType.handler) { - const handler6 = makeDOMEventHandler(triggerDOMHandler); - handlerForType.handler = handler6; - originalAddEventListener.call(this, type, handler6, options4); + const handler12 = makeDOMEventHandler(triggerDOMHandler); + handlerForType.handler = handler12; + originalAddEventListener.call(this, type, handler12, options4); } handlerForType.refCount++; } catch (e2) { @@ -16835,38 +17403,38 @@ function isSimilarToLastCapturedEvent(event) { return true; } __name(isSimilarToLastCapturedEvent, "isSimilarToLastCapturedEvent"); -function shouldSkipDOMEvent(eventType, target) { +function shouldSkipDOMEvent(eventType, target2) { if (eventType !== "keypress") { return false; } - if (!target || !target.tagName) { + if (!target2 || !target2.tagName) { return true; } - if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) { + if (target2.tagName === "INPUT" || target2.tagName === "TEXTAREA" || target2.isContentEditable) { return false; } return true; } __name(shouldSkipDOMEvent, "shouldSkipDOMEvent"); -function makeDOMEventHandler(handler6, globalListener = false) { +function makeDOMEventHandler(handler12, globalListener = false) { return (event) => { if (!event || event["_sentryCaptured"]) { return; } - const target = getEventTarget$1(event); - if (shouldSkipDOMEvent(event.type, target)) { + const target2 = getEventTarget$1(event); + if (shouldSkipDOMEvent(event.type, target2)) { return; } addNonEnumerableProperty(event, "_sentryCaptured", true); - if (target && !target._sentryId) { - addNonEnumerableProperty(target, "_sentryId", uuid4()); + if (target2 && !target2._sentryId) { + addNonEnumerableProperty(target2, "_sentryId", uuid4()); } const name2 = event.type === "keypress" ? "input" : event.type; if (!isSimilarToLastCapturedEvent(event)) { const handlerData = { event, name: name2, global: globalListener }; - handler6(handlerData); + handler12(handlerData); lastCapturedEventType = event.type; - lastCapturedEventTargetId = target ? target._sentryId : void 0; + lastCapturedEventTargetId = target2 ? target2._sentryId : void 0; } clearTimeout(debounceTimerID); debounceTimerID = WINDOW$4.setTimeout(() => { @@ -16885,9 +17453,9 @@ function getEventTarget$1(event) { } __name(getEventTarget$1, "getEventTarget$1"); let lastHref; -function addHistoryInstrumentationHandler(handler6) { +function addHistoryInstrumentationHandler(handler12) { const type = "history"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, instrumentHistory); } __name(addHistoryInstrumentationHandler, "addHistoryInstrumentationHandler"); @@ -16971,9 +17539,9 @@ function setTimeout$3(...rest) { } __name(setTimeout$3, "setTimeout$3"); const SENTRY_XHR_DATA_KEY = "__sentry_xhr_v3__"; -function addXhrInstrumentationHandler(handler6) { +function addXhrInstrumentationHandler(handler12) { const type = "xhr"; - addHandler$1(type, handler6); + addHandler$1(type, handler12); maybeInstrument(type, instrumentXHR); } __name(addXhrInstrumentationHandler, "addXhrInstrumentationHandler"); @@ -16986,7 +17554,7 @@ function instrumentXHR() { apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) { const virtualError = new Error(); const startTimestamp = timestampInSeconds() * 1e3; - const method = isString$8(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : void 0; + const method = isString$a(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : void 0; const url = parseUrl(xhrOpenArgArray[1]); if (!method || !url) { return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray); @@ -17032,7 +17600,7 @@ function instrumentXHR() { apply(originalSetRequestHeader, setRequestHeaderThisArg, setRequestHeaderArgArray) { const [header3, value4] = setRequestHeaderArgArray; const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY]; - if (xhrInfo && isString$8(header3) && isString$8(value4)) { + if (xhrInfo && isString$a(header3) && isString$a(value4)) { xhrInfo.request_headers[header3.toLowerCase()] = value4; } return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray); @@ -17061,7 +17629,7 @@ function instrumentXHR() { } __name(instrumentXHR, "instrumentXHR"); function parseUrl(url) { - if (isString$8(url)) { + if (isString$a(url)) { return url; } try { @@ -17391,7 +17959,7 @@ function _getDomBreadcrumbHandler(client, dom) { if (getClient() !== client) { return; } - let target; + let target2; let componentName; let keyAttrs = typeof dom === "object" ? dom.serializeAttribute : void 0; let maxStringLength = typeof dom === "object" && typeof dom.maxStringLength === "number" ? dom.maxStringLength : void 0; @@ -17407,17 +17975,17 @@ function _getDomBreadcrumbHandler(client, dom) { try { const event = handlerData.event; const element = _isEvent(event) ? event.target : event; - target = htmlTreeAsString(element, { keyAttrs, maxStringLength }); + target2 = htmlTreeAsString(element, { keyAttrs, maxStringLength }); componentName = getComponentName$1(element); } catch (e2) { - target = ""; + target2 = ""; } - if (target.length === 0) { + if (target2.length === 0) { return; } const breadcrumb = { category: `ui.${handlerData.name}`, - message: target + message: target2 }; if (componentName) { breadcrumb.data = { "ui.component_name": componentName }; @@ -17470,7 +18038,7 @@ function _getXhrBreadcrumbHandler(client) { return; } const { method, url, status_code, body } = sentryXhrData; - const data25 = { + const data26 = { method, url, status_code @@ -17485,7 +18053,7 @@ function _getXhrBreadcrumbHandler(client) { addBreadcrumb( { category: "xhr", - data: data25, + data: data26, type: "http", level }, @@ -17507,7 +18075,7 @@ function _getFetchBreadcrumbHandler(client) { return; } if (handlerData.error) { - const data25 = handlerData.fetchData; + const data26 = handlerData.fetchData; const hint = { data: handlerData.error, input: handlerData.args, @@ -17517,7 +18085,7 @@ function _getFetchBreadcrumbHandler(client) { addBreadcrumb( { category: "fetch", - data: data25, + data: data26, level: "error", type: "http" }, @@ -17525,7 +18093,7 @@ function _getFetchBreadcrumbHandler(client) { ); } else { const response = handlerData.response; - const data25 = { + const data26 = { ...handlerData.fetchData, status_code: response && response.status }; @@ -17535,11 +18103,11 @@ function _getFetchBreadcrumbHandler(client) { startTimestamp, endTimestamp }; - const level = getBreadcrumbLogLevelFromHttpStatusCode(data25.status_code); + const level = getBreadcrumbLogLevelFromHttpStatusCode(data26.status_code); addBreadcrumb( { category: "fetch", - data: data25, + data: data26, type: "http", level }, @@ -17711,9 +18279,9 @@ function _wrapXHR$1(originalSend) { }; } __name(_wrapXHR$1, "_wrapXHR$1"); -function _wrapEventTarget(target) { +function _wrapEventTarget(target2) { const globalObject = WINDOW$5; - const targetObj = globalObject[target]; + const targetObj = globalObject[target2]; const proto = targetObj && targetObj.prototype; if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty("addEventListener")) { return; @@ -17727,7 +18295,7 @@ function _wrapEventTarget(target) { data: { function: "handleEvent", handler: getFunctionName(fn), - target + target: target2 }, handled: false, type: "instrument" @@ -17743,7 +18311,7 @@ function _wrapEventTarget(target) { data: { function: "addEventListener", handler: getFunctionName(fn), - target + target: target2 }, handled: false, type: "instrument" @@ -17816,12 +18384,12 @@ const _globalHandlersIntegration = /* @__PURE__ */ __name((options4 = {}) => { }, "_globalHandlersIntegration"); const globalHandlersIntegration = defineIntegration(_globalHandlersIntegration); function _installGlobalOnErrorHandler(client) { - addGlobalErrorInstrumentationHandler((data25) => { + addGlobalErrorInstrumentationHandler((data26) => { const { stackParser, attachStacktrace } = getOptions(); if (getClient() !== client || shouldIgnoreOnError()) { return; } - const { msg, url, line, column, error: error2 } = data25; + const { msg, url, line, column, error: error2 } = data26; const event = _enhanceEventWithInitialFrame( eventFromUnknownInput(stackParser, error2 || msg, void 0, attachStacktrace, false), url, @@ -17896,7 +18464,7 @@ function _enhanceEventWithInitialFrame(event, url, line, column) { const ev0sf = ev0s.frames = ev0s.frames || []; const colno = column; const lineno = line; - const filename = isString$8(url) && url.length > 0 ? url : getLocationHref(); + const filename = isString$a(url) && url.length > 0 ? url : getLocationHref(); if (ev0sf.length === 0) { ev0sf.push({ colno, @@ -18176,7 +18744,7 @@ const INTEGRATION_NAME$6 = "ReportingObserver"; const SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(); const _reportingObserverIntegration = /* @__PURE__ */ __name((options4 = {}) => { const types = options4.types || ["crash", "deprecation", "intervention"]; - function handler6(reports) { + function handler12(reports) { if (!SETUP_CLIENTS.has(getClient())) { return; } @@ -18203,7 +18771,7 @@ const _reportingObserverIntegration = /* @__PURE__ */ __name((options4 = {}) => }); } } - __name(handler6, "handler"); + __name(handler12, "handler"); return { name: INTEGRATION_NAME$6, setupOnce() { @@ -18211,7 +18779,7 @@ const _reportingObserverIntegration = /* @__PURE__ */ __name((options4 = {}) => return; } const observer = new WINDOW$3.ReportingObserver( - handler6, + handler12, { buffered: true, types @@ -18349,12 +18917,12 @@ function _getXHRResponseHeaders(xhr) { }, {}); } __name(_getXHRResponseHeaders, "_getXHRResponseHeaders"); -function _isInGivenRequestTargets(failedRequestTargets, target) { +function _isInGivenRequestTargets(failedRequestTargets, target2) { return failedRequestTargets.some((givenRequestTarget) => { if (typeof givenRequestTarget === "string") { - return target.includes(givenRequestTarget); + return target2.includes(givenRequestTarget); } - return givenRequestTarget.test(target); + return givenRequestTarget.test(target2); }); } __name(_isInGivenRequestTargets, "_isInGivenRequestTargets"); @@ -18411,11 +18979,11 @@ function _shouldCaptureResponse(options4, status, url) { return _isInGivenStatusRanges(options4.failedRequestStatusCodes, status) && _isInGivenRequestTargets(options4.failedRequestTargets, url) && !isSentryRequestUrl(url, getClient()); } __name(_shouldCaptureResponse, "_shouldCaptureResponse"); -function _createEvent(data25) { +function _createEvent(data26) { const client = getClient(); - const virtualStackTrace = client && data25.error && data25.error instanceof Error ? data25.error.stack : void 0; + const virtualStackTrace = client && data26.error && data26.error instanceof Error ? data26.error.stack : void 0; const stack2 = virtualStackTrace && client ? client.getOptions().stackParser(virtualStackTrace, 0, 1) : void 0; - const message3 = `HTTP Client Error with status code: ${data25.status}`; + const message3 = `HTTP Client Error with status code: ${data26.status}`; const event = { message: message3, exception: { @@ -18428,17 +18996,17 @@ function _createEvent(data25) { ] }, request: { - url: data25.url, - method: data25.method, - headers: data25.requestHeaders, - cookies: data25.requestCookies + url: data26.url, + method: data26.method, + headers: data26.requestHeaders, + cookies: data26.requestCookies }, contexts: { response: { - status_code: data25.status, - headers: data25.responseHeaders, - cookies: data25.responseCookies, - body_size: _getResponseSizeFromHeaders(data25.responseHeaders) + status_code: data26.status, + headers: data26.responseHeaders, + cookies: data26.responseCookies, + body_size: _getResponseSizeFromHeaders(data26.responseHeaders) } } }; @@ -18569,10 +19137,10 @@ var NodeType$3; NodeType3[NodeType3["CDATA"] = 4] = "CDATA"; NodeType3[NodeType3["Comment"] = 5] = "Comment"; })(NodeType$3 || (NodeType$3 = {})); -function isElement$1(n2) { +function isElement$1$1(n2) { return n2.nodeType === n2.ELEMENT_NODE; } -__name(isElement$1, "isElement$1"); +__name(isElement$1$1, "isElement$1$1"); function isShadowRoot(n2) { const host = _optionalChain$5([n2, "optionalAccess", (_2) => _2.host]); return Boolean(_optionalChain$5([host, "optionalAccess", (_2) => _2.shadowRoot]) === n2); @@ -18831,11 +19399,11 @@ function getIframeContentDocument(iframe) { } } __name(getIframeContentDocument, "getIframeContentDocument"); -let _id$2 = 1; +let _id$3 = 1; const tagNameRegex = new RegExp("[^a-z0-9-_:]"); const IGNORED_NODE = -2; function genId() { - return _id$2++; + return _id$3++; } __name(genId, "genId"); function getValidTagName(element) { @@ -19596,7 +20164,7 @@ function serializeNodeWithId(n2, options4) { serializedNode.childNodes.push(serializedChildNode); } } - if (isElement$1(n2) && n2.shadowRoot) { + if (isElement$1$1(n2) && n2.shadowRoot) { for (const childN of Array.from(n2.shadowRoot.childNodes)) { const serializedChildNode = serializeNodeWithId(childN, bypassOptions); if (serializedChildNode) { @@ -19774,10 +20342,10 @@ function _optionalChain$4(ops) { return value4; } __name(_optionalChain$4, "_optionalChain$4"); -function on(type, fn, target = document) { +function on(type, fn, target2 = document) { const options4 = { capture: true, passive: true }; - target.addEventListener(type, fn, options4); - return () => target.removeEventListener(type, fn, options4); + target2.addEventListener(type, fn, options4); + return () => target2.removeEventListener(type, fn, options4); } __name(on, "on"); const DEPARTED_MIRROR_ACCESS_WARNING$1 = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording."; @@ -19804,11 +20372,11 @@ let _mirror$1 = { }; if (typeof window !== "undefined" && window.Proxy && window.Reflect) { _mirror$1 = new Proxy(_mirror$1, { - get(target, prop2, receiver) { + get(target2, prop2, receiver) { if (prop2 === "map") { console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); } - return Reflect.get(target, prop2, receiver); + return Reflect.get(target2, prop2, receiver); } }); } @@ -19839,9 +20407,9 @@ function throttle$1(func, wait, options4 = {}) { }; } __name(throttle$1, "throttle$1"); -function hookSetter$1(target, key, d2, isRevoked, win = window) { - const original = win.Object.getOwnPropertyDescriptor(target, key); - win.Object.defineProperty(target, key, isRevoked ? d2 : { +function hookSetter$1(target2, key, d2, isRevoked, win = window) { + const original = win.Object.getOwnPropertyDescriptor(target2, key); + win.Object.defineProperty(target2, key, isRevoked ? d2 : { set(value4) { setTimeout$1$1(() => { d2.set.call(this, value4); @@ -19851,7 +20419,7 @@ function hookSetter$1(target, key, d2, isRevoked, win = window) { } } }); - return () => hookSetter$1(target, key, original || {}, true); + return () => hookSetter$1(target2, key, original || {}, true); } __name(hookSetter$1, "hookSetter$1"); function patch$2(source, name2, replacement) { @@ -19944,21 +20512,21 @@ function isIgnored(n2, mirror2) { return mirror2.getId(n2) === IGNORED_NODE; } __name(isIgnored, "isIgnored"); -function isAncestorRemoved(target, mirror2) { - if (isShadowRoot(target)) { +function isAncestorRemoved(target2, mirror2) { + if (isShadowRoot(target2)) { return false; } - const id3 = mirror2.getId(target); + const id3 = mirror2.getId(target2); if (!mirror2.has(id3)) { return true; } - if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) { + if (target2.parentNode && target2.parentNode.nodeType === target2.DOCUMENT_NODE) { return false; } - if (!target.parentNode) { + if (!target2.parentNode) { return true; } - return isAncestorRemoved(target.parentNode, mirror2); + return isAncestorRemoved(target2.parentNode, mirror2); } __name(isAncestorRemoved, "isAncestorRemoved"); function legacy_isTouchEvent(event) { @@ -20519,13 +21087,13 @@ class MutationBuffer { break; } case "attributes": { - const target = m2.target; + const target2 = m2.target; let attributeName = m2.attributeName; let value4 = m2.target.getAttribute(attributeName); if (attributeName === "value") { - const type = getInputType(target); - const tagName = target.tagName; - value4 = getInputValue(target, tagName, type); + const type = getInputType(target2); + const tagName = target2.tagName; + value4 = getInputValue(target2, tagName, type); const isInputMasked = shouldMaskInput({ maskInputOptions: this.maskInputOptions, tagName, @@ -20534,7 +21102,7 @@ class MutationBuffer { const forceMask = needMaskingText(m2.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, isInputMasked); value4 = maskInputValue({ isMasked: forceMask, - element: target, + element: target2, value: value4, maskInputFn: this.maskInputFn }); @@ -20543,8 +21111,8 @@ class MutationBuffer { return; } let item3 = this.attributeMap.get(m2.target); - if (target.tagName === "IFRAME" && attributeName === "src" && !this.keepIframeSrcFn(value4)) { - const iframeDoc = getIFrameContentDocument(target); + if (target2.tagName === "IFRAME" && attributeName === "src" && !this.keepIframeSrcFn(value4)) { + const iframeDoc = getIFrameContentDocument(target2); if (!iframeDoc) { attributeName = "rr_src"; } else { @@ -20561,11 +21129,11 @@ class MutationBuffer { this.attributes.push(item3); this.attributeMap.set(m2.target, item3); } - if (attributeName === "type" && target.tagName === "INPUT" && (m2.oldValue || "").toLowerCase() === "password") { - target.setAttribute("data-rr-is-password", "true"); + if (attributeName === "type" && target2.tagName === "INPUT" && (m2.oldValue || "").toLowerCase() === "password") { + target2.setAttribute("data-rr-is-password", "true"); } - if (!ignoreAttribute(target.tagName, attributeName)) { - item3.attributes[attributeName] = transformAttribute(this.doc, toLowerCase(target.tagName), toLowerCase(attributeName), value4, target, this.maskAttributeFn); + if (!ignoreAttribute(target2.tagName, attributeName)) { + item3.attributes[attributeName] = transformAttribute(this.doc, toLowerCase(target2.tagName), toLowerCase(attributeName), value4, target2, this.maskAttributeFn); if (attributeName === "style") { if (!this.unattachedDoc) { try { @@ -20578,9 +21146,9 @@ class MutationBuffer { if (m2.oldValue) { old.setAttribute("style", m2.oldValue); } - for (const pname of Array.from(target.style)) { - const newValue2 = target.style.getPropertyValue(pname); - const newPriority = target.style.getPropertyPriority(pname); + for (const pname of Array.from(target2.style)) { + const newValue2 = target2.style.getPropertyValue(pname); + const newPriority = target2.style.getPropertyPriority(pname); if (newValue2 !== old.style.getPropertyValue(pname) || newPriority !== old.style.getPropertyPriority(pname)) { if (newPriority === "") { item3.styleDiff[pname] = newValue2; @@ -20592,7 +21160,7 @@ class MutationBuffer { } } for (const pname of Array.from(old.style)) { - if (target.style.getPropertyValue(pname) === "") { + if (target2.style.getPropertyValue(pname) === "") { item3.styleDiff[pname] = false; } } @@ -20631,7 +21199,7 @@ class MutationBuffer { } } }; - this.genAdds = (n2, target) => { + this.genAdds = (n2, target2) => { if (this.processedNodeManager.inOtherBuffer(n2, this)) return; if (this.addedSet.has(n2) || this.movedSet.has(n2)) @@ -20642,8 +21210,8 @@ class MutationBuffer { } this.movedSet.add(n2); let targetId = null; - if (target && this.mirror.hasNode(target)) { - targetId = this.mirror.getId(target); + if (target2 && this.mirror.hasNode(target2)) { + targetId = this.mirror.getId(target2); } if (targetId && targetId !== -1) { this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true; @@ -20762,8 +21330,8 @@ function _isAncestorInSet(set3, n2) { } __name(_isAncestorInSet, "_isAncestorInSet"); let errorHandler$1; -function registerErrorHandler$1(handler6) { - errorHandler$1 = handler6; +function registerErrorHandler$1(handler12) { + errorHandler$1 = handler12; } __name(registerErrorHandler$1, "registerErrorHandler$1"); function unregisterErrorHandler() { @@ -20870,7 +21438,7 @@ function initMoveObserver({ mousemoveCb, sampling, doc: doc2, mirror: mirror2 }) timeBaseline = null; }), callbackThreshold); const updatePosition = callbackWrapper$1(throttle$1(callbackWrapper$1((evt) => { - const target = getEventTarget(evt); + const target2 = getEventTarget(evt); const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt; if (!timeBaseline) { timeBaseline = nowTimestamp(); @@ -20878,7 +21446,7 @@ function initMoveObserver({ mousemoveCb, sampling, doc: doc2, mirror: mirror2 }) positions.push({ x: clientX, y: clientY, - id: mirror2.getId(target), + id: mirror2.getId(target2), timeOffset: nowTimestamp() - timeBaseline }); wrappedCb(typeof DragEvent !== "undefined" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove); @@ -20905,8 +21473,8 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc: doc2, mirror: m let currentPointerType = null; const getHandler = /* @__PURE__ */ __name((eventKey) => { return (event) => { - const target = getEventTarget(event); - if (isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { + const target2 = getEventTarget(event); + if (isBlocked$1(target2, blockClass, blockSelector, unblockSelector, true)) { return; } let pointerType = null; @@ -20946,7 +21514,7 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc: doc2, mirror: m if (!e2) { return; } - const id3 = mirror2.getId(target); + const id3 = mirror2.getId(target2); const { clientX, clientY } = e2; callbackWrapper$1(mouseInteractionCb)({ type: MouseInteractions[thisEventKey], @@ -20959,7 +21527,7 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc: doc2, mirror: m }, "getHandler"); Object.keys(MouseInteractions).filter((key) => Number.isNaN(Number(key)) && !key.endsWith("_Departed") && disableMap[key] !== false).forEach((eventKey) => { let eventName = toLowerCase(eventKey); - const handler6 = getHandler(eventKey); + const handler12 = getHandler(eventKey); if (window.PointerEvent) { switch (MouseInteractions[eventKey]) { case MouseInteractions.MouseDown: @@ -20971,7 +21539,7 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc: doc2, mirror: m return; } } - handlers2.push(on(eventName, handler6, doc2)); + handlers2.push(on(eventName, handler12, doc2)); }); return callbackWrapper$1(() => { handlers2.forEach((h2) => h2()); @@ -20980,12 +21548,12 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc: doc2, mirror: m __name(initMouseInteractionObserver, "initMouseInteractionObserver"); function initScrollObserver({ scrollCb, doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, sampling }) { const updatePosition = callbackWrapper$1(throttle$1(callbackWrapper$1((evt) => { - const target = getEventTarget(evt); - if (!target || isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { + const target2 = getEventTarget(evt); + if (!target2 || isBlocked$1(target2, blockClass, blockSelector, unblockSelector, true)) { return; } - const id3 = mirror2.getId(target); - if (target === doc2 && doc2.defaultView) { + const id3 = mirror2.getId(target2); + if (target2 === doc2 && doc2.defaultView) { const scrollLeftTop = getWindowScroll(doc2.defaultView); scrollCb({ id: id3, @@ -20995,8 +21563,8 @@ function initScrollObserver({ scrollCb, doc: doc2, mirror: mirror2, blockClass, } else { scrollCb({ id: id3, - x: target.scrollLeft, - y: target.scrollTop + x: target2.scrollLeft, + y: target2.scrollTop }); } }), sampling.scroll || 100)); @@ -21025,19 +21593,19 @@ const INPUT_TAGS = ["INPUT", "TEXTAREA", "SELECT"]; const lastInputValueMap = /* @__PURE__ */ new WeakMap(); function initInputObserver({ inputCb, doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, ignoreClass, ignoreSelector, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector }) { function eventHandler(event) { - let target = getEventTarget(event); + let target2 = getEventTarget(event); const userTriggered = event.isTrusted; - const tagName = target && toUpperCase(target.tagName); + const tagName = target2 && toUpperCase(target2.tagName); if (tagName === "OPTION") - target = target.parentElement; - if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { + target2 = target2.parentElement; + if (!target2 || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked$1(target2, blockClass, blockSelector, unblockSelector, true)) { return; } - const el = target; + const el = target2; if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) { return; } - const type = getInputType(target); + const type = getInputType(target2); let text2 = getInputValue(el, tagName, type); let isChecked2 = false; const isInputMasked = shouldMaskInput({ @@ -21045,21 +21613,21 @@ function initInputObserver({ inputCb, doc: doc2, mirror: mirror2, blockClass, bl tagName, type }); - const forceMask = needMaskingText(target, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked); + const forceMask = needMaskingText(target2, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked); if (type === "radio" || type === "checkbox") { - isChecked2 = target.checked; + isChecked2 = target2.checked; } text2 = maskInputValue({ isMasked: forceMask, - element: target, + element: target2, value: text2, maskInputFn }); - cbWithDedup(target, userTriggeredOnInput ? { text: text2, isChecked: isChecked2, userTriggered } : { text: text2, isChecked: isChecked2 }); - const name2 = target.name; + cbWithDedup(target2, userTriggeredOnInput ? { text: text2, isChecked: isChecked2, userTriggered } : { text: text2, isChecked: isChecked2 }); + const name2 = target2.name; if (type === "radio" && name2 && isChecked2) { doc2.querySelectorAll(`input[type="radio"][name="${name2}"]`).forEach((el2) => { - if (el2 !== target) { + if (el2 !== target2) { const text3 = maskInputValue({ isMasked: forceMask, element: el2, @@ -21072,11 +21640,11 @@ function initInputObserver({ inputCb, doc: doc2, mirror: mirror2, blockClass, bl } } __name(eventHandler, "eventHandler"); - function cbWithDedup(target, v2) { - const lastInputValue = lastInputValueMap.get(target); + function cbWithDedup(target2, v2) { + const lastInputValue = lastInputValueMap.get(target2); if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) { - lastInputValueMap.set(target, v2); - const id3 = mirror2.getId(target); + lastInputValueMap.set(target2, v2); + const id3 = mirror2.getId(target2); callbackWrapper$1(inputCb)({ ...v2, id: id3 @@ -21155,7 +21723,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM } const insertRule = win.CSSStyleSheet.prototype.insertRule; win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [rule, index2] = argumentsList; const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); if (id3 && id3 !== -1 || styleId && styleId !== -1) { @@ -21165,12 +21733,12 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM adds: [{ rule, index: index2 }] }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); const deleteRule = win.CSSStyleSheet.prototype.deleteRule; win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [index2] = argumentsList; const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); if (id3 && id3 !== -1 || styleId && styleId !== -1) { @@ -21180,14 +21748,14 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM removes: [{ index: index2 }] }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); let replace2; if (win.CSSStyleSheet.prototype.replace) { replace2 = win.CSSStyleSheet.prototype.replace; win.CSSStyleSheet.prototype.replace = new Proxy(replace2, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [text2] = argumentsList; const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); if (id3 && id3 !== -1 || styleId && styleId !== -1) { @@ -21197,7 +21765,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM replace: text2 }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); } @@ -21205,7 +21773,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM if (win.CSSStyleSheet.prototype.replaceSync) { replaceSync = win.CSSStyleSheet.prototype.replaceSync; win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [text2] = argumentsList; const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); if (id3 && id3 !== -1 || styleId && styleId !== -1) { @@ -21215,7 +21783,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM replaceSync: text2 }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); } @@ -21240,7 +21808,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM deleteRule: type.prototype.deleteRule }; type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [rule, index2] = argumentsList; const { id: id3, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror2, stylesheetManager.styleMirror); if (id3 && id3 !== -1 || styleId && styleId !== -1) { @@ -21258,11 +21826,11 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM ] }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [index2] = argumentsList; const { id: id3, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror2, stylesheetManager.styleMirror); if (id3 && id3 !== -1 || styleId && styleId !== -1) { @@ -21274,7 +21842,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM ] }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); }); @@ -21331,7 +21899,7 @@ __name(initAdoptedStyleSheetObserver, "initAdoptedStyleSheetObserver"); function initStyleDeclarationObserver({ styleDeclarationCb, mirror: mirror2, ignoreCSSAttributes, stylesheetManager }, { win }) { const setProperty2 = win.CSSStyleDeclaration.prototype.setProperty; win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty2, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [property, value4, priority] = argumentsList; if (ignoreCSSAttributes.has(property)) { return setProperty2.apply(thisArg, [property, value4, priority]); @@ -21349,12 +21917,12 @@ function initStyleDeclarationObserver({ styleDeclarationCb, mirror: mirror2, ign index: getNestedCSSRulePositions(thisArg.parentRule) }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty; win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { + apply: callbackWrapper$1((target2, thisArg, argumentsList) => { const [property] = argumentsList; if (ignoreCSSAttributes.has(property)) { return removeProperty.apply(thisArg, [property]); @@ -21370,7 +21938,7 @@ function initStyleDeclarationObserver({ styleDeclarationCb, mirror: mirror2, ign index: getNestedCSSRulePositions(thisArg.parentRule) }); } - return target.apply(thisArg, argumentsList); + return target2.apply(thisArg, argumentsList); }) }); return callbackWrapper$1(() => { @@ -21380,15 +21948,15 @@ function initStyleDeclarationObserver({ styleDeclarationCb, mirror: mirror2, ign } __name(initStyleDeclarationObserver, "initStyleDeclarationObserver"); function initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSelector, unblockSelector, mirror: mirror2, sampling, doc: doc2 }) { - const handler6 = callbackWrapper$1((type) => throttle$1(callbackWrapper$1((event) => { - const target = getEventTarget(event); - if (!target || isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { + const handler12 = callbackWrapper$1((type) => throttle$1(callbackWrapper$1((event) => { + const target2 = getEventTarget(event); + if (!target2 || isBlocked$1(target2, blockClass, blockSelector, unblockSelector, true)) { return; } - const { currentTime, volume, muted, playbackRate } = target; + const { currentTime, volume, muted, playbackRate } = target2; mediaInteractionCb({ type, - id: mirror2.getId(target), + id: mirror2.getId(target2), currentTime, volume, muted, @@ -21396,11 +21964,11 @@ function initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSel }); }), sampling.media || 500)); const handlers2 = [ - on("play", handler6(0), doc2), - on("pause", handler6(1), doc2), - on("seeked", handler6(2), doc2), - on("volumechange", handler6(3), doc2), - on("ratechange", handler6(4), doc2) + on("play", handler12(0), doc2), + on("pause", handler12(1), doc2), + on("seeked", handler12(2), doc2), + on("volumechange", handler12(3), doc2), + on("ratechange", handler12(4), doc2) ]; return callbackWrapper$1(() => { handlers2.forEach((h2) => h2()); @@ -21953,9 +22521,9 @@ class ShadowDomManager { })); } reset() { - this.restoreHandlers.forEach((handler6) => { + this.restoreHandlers.forEach((handler12) => { try { - handler6(); + handler12(); } catch (e2) { } }); @@ -22605,11 +23173,11 @@ function getClosestInteractive(element) { } __name(getClosestInteractive, "getClosestInteractive"); function getClickTargetNode(event) { - const target = getTargetNode(event); - if (!target || !(target instanceof Element)) { - return target; + const target2 = getTargetNode(event); + if (!target2 || !(target2 instanceof Element)) { + return target2; } - return getClosestInteractive(target); + return getClosestInteractive(target2); } __name(getClickTargetNode, "getClickTargetNode"); function getTargetNode(event) { @@ -22643,7 +23211,7 @@ function monkeyPatchWindowOpen() { return function(...args) { if (handlers$2) { try { - handlers$2.forEach((handler6) => handler6()); + handlers$2.forEach((handler12) => handler12()); } catch (e2) { } } @@ -22950,8 +23518,8 @@ const handleDomListener = /* @__PURE__ */ __name((replay) => { addBreadcrumbEvent(replay, result); }; }, "handleDomListener"); -function getBaseDomBreadcrumb(target, message3) { - const nodeId = record.mirror.getId(target); +function getBaseDomBreadcrumb(target2, message3) { + const nodeId = record.mirror.getId(target2); const node3 = nodeId && record.mirror.getNode(nodeId); const meta = node3 && record.mirror.getMeta(node3); const element = meta && isElement$2(meta) ? meta : null; @@ -22970,24 +23538,24 @@ function getBaseDomBreadcrumb(target, message3) { } __name(getBaseDomBreadcrumb, "getBaseDomBreadcrumb"); function handleDom(handlerData) { - const { target, message: message3 } = getDomTarget(handlerData); + const { target: target2, message: message3 } = getDomTarget(handlerData); return createBreadcrumb({ category: `ui.${handlerData.name}`, - ...getBaseDomBreadcrumb(target, message3) + ...getBaseDomBreadcrumb(target2, message3) }); } __name(handleDom, "handleDom"); function getDomTarget(handlerData) { const isClick = handlerData.name === "click"; let message3; - let target = null; + let target2 = null; try { - target = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event); - message3 = htmlTreeAsString(target, { maxStringLength: 200 }) || ""; + target2 = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event); + message3 = htmlTreeAsString(target2, { maxStringLength: 200 }) || ""; } catch (e2) { message3 = ""; } - return { target, message: message3 }; + return { target: target2, message: message3 }; } __name(getDomTarget, "getDomTarget"); function isElement$2(node3) { @@ -23007,8 +23575,8 @@ function handleKeyboardEvent(replay, event) { } __name(handleKeyboardEvent, "handleKeyboardEvent"); function getKeyboardBreadcrumb(event) { - const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event; - if (!target || isInputElement(target) || !key) { + const { metaKey, shiftKey, ctrlKey, altKey, key, target: target2 } = event; + if (!target2 || isInputElement(target2) || !key) { return null; } const hasModifierKey = metaKey || ctrlKey || altKey; @@ -23016,8 +23584,8 @@ function getKeyboardBreadcrumb(event) { if (!hasModifierKey && isCharacterKey) { return null; } - const message3 = htmlTreeAsString(target, { maxStringLength: 200 }) || ""; - const baseBreadcrumb = getBaseDomBreadcrumb(target, message3); + const message3 = htmlTreeAsString(target2, { maxStringLength: 200 }) || ""; + const baseBreadcrumb = getBaseDomBreadcrumb(target2, message3); return createBreadcrumb({ category: "ui.keyDown", message: message3, @@ -23032,8 +23600,8 @@ function getKeyboardBreadcrumb(event) { }); } __name(getKeyboardBreadcrumb, "getKeyboardBreadcrumb"); -function isInputElement(target) { - return target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable; +function isInputElement(target2) { + return target2.tagName === "INPUT" || target2.tagName === "TEXTAREA" || target2.isContentEditable; } __name(isInputElement, "isInputElement"); const ENTRY_TYPES = { @@ -23387,8 +23955,8 @@ class WorkerHandler { this._ensureReadyPromise = new Promise((resolve2, reject3) => { this._worker.addEventListener( "message", - ({ data: data25 }) => { - if (data25.success) { + ({ data: data26 }) => { + if (data26.success) { resolve2(); } else { reject3(); @@ -23419,8 +23987,8 @@ class WorkerHandler { postMessage(method, arg) { const id3 = this._getAndIncrementId(); return new Promise((resolve2, reject3) => { - const listener = /* @__PURE__ */ __name(({ data: data25 }) => { - const response = data25; + const listener = /* @__PURE__ */ __name(({ data: data26 }) => { + const response = data26; if (response.method !== method) { return; } @@ -23488,12 +24056,12 @@ class EventBufferCompressionWorker { if (!this._earliestTimestamp || timestamp2 < this._earliestTimestamp) { this._earliestTimestamp = timestamp2; } - const data25 = JSON.stringify(event); - this._totalSize += data25.length; + const data26 = JSON.stringify(event); + this._totalSize += data26.length; if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) { return Promise.reject(new EventBufferSizeExceededError()); } - return this._sendEventToWorker(data25); + return this._sendEventToWorker(data26); } /** * Finish the event buffer and return the compressed data. @@ -23517,8 +24085,8 @@ class EventBufferCompressionWorker { /** * Send the event to the worker. */ - _sendEventToWorker(data25) { - return this._worker.postMessage("addEvent", data25); + _sendEventToWorker(data26) { + return this._worker.postMessage("addEvent", data26); } /** * Finish the request and return the compressed data from the worker. @@ -24160,7 +24728,7 @@ function handleGlobalEventListener(replay) { } __name(handleGlobalEventListener, "handleGlobalEventListener"); function createPerformanceSpans(replay, entries) { - return entries.map(({ type, start: start2, end, name: name2, data: data25 }) => { + return entries.map(({ type, start: start2, end, name: name2, data: data26 }) => { const response = replay.throttledAddEvent({ type: EventType.Custom, timestamp: start2, @@ -24171,7 +24739,7 @@ function createPerformanceSpans(replay, entries) { description: name2, startTimestamp: start2, endTimestamp: end, - data: data25 + data: data26 } } }); @@ -24265,8 +24833,8 @@ function parseContentLengthHeader(header3) { if (!header3) { return void 0; } - const size2 = parseInt(header3, 10); - return isNaN(size2) ? void 0 : size2; + const size = parseInt(header3, 10); + return isNaN(size) ? void 0 : size; } __name(parseContentLengthHeader, "parseContentLengthHeader"); function getBodyString(body) { @@ -24308,11 +24876,11 @@ function mergeWarning(info, warning) { return info; } __name(mergeWarning, "mergeWarning"); -function makeNetworkReplayBreadcrumb(type, data25) { - if (!data25) { +function makeNetworkReplayBreadcrumb(type, data26) { + if (!data26) { return null; } - const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data25; + const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data26; const result = { type, start: startTimestamp / 1e3, @@ -24444,8 +25012,8 @@ function getFullUrl(url, baseURI = WINDOW$1.document.baseURI) { __name(getFullUrl, "getFullUrl"); async function captureFetchBreadcrumbToReplay(breadcrumb, hint, options4) { try { - const data25 = await _prepareFetchData(breadcrumb, hint, options4); - const result = makeNetworkReplayBreadcrumb("resource.fetch", data25); + const data26 = await _prepareFetchData(breadcrumb, hint, options4); + const result = makeNetworkReplayBreadcrumb("resource.fetch", data26); addNetworkBreadcrumb(options4.replay, result); } catch (error2) { DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to capture fetch breadcrumb"); @@ -24496,11 +25064,11 @@ function _getRequestInfo({ networkCaptureBodies, networkRequestHeaders }, input, } const requestBody = _getFetchRequestArgBody(input); const [bodyStr, warning] = getBodyString(requestBody); - const data25 = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr); + const data26 = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr); if (warning) { - return mergeWarning(data25, warning); + return mergeWarning(data26, warning); } - return data25; + return data26; } __name(_getRequestInfo, "_getRequestInfo"); async function _getResponseInfo(captureDetails, { @@ -24534,14 +25102,14 @@ function getResponseData(bodyText, { headers }) { try { - const size2 = bodyText && bodyText.length && responseBodySize === void 0 ? getBodySize(bodyText) : responseBodySize; + const size = bodyText && bodyText.length && responseBodySize === void 0 ? getBodySize(bodyText) : responseBodySize; if (!captureDetails) { - return buildSkippedNetworkRequestOrResponse(size2); + return buildSkippedNetworkRequestOrResponse(size); } if (networkCaptureBodies) { - return buildNetworkRequestOrResponse(headers, size2, bodyText); + return buildNetworkRequestOrResponse(headers, size, bodyText); } - return buildNetworkRequestOrResponse(headers, size2, void 0); + return buildNetworkRequestOrResponse(headers, size, void 0); } catch (error2) { DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to serialize response body"); return buildNetworkRequestOrResponse(headers, responseBodySize, void 0); @@ -24634,8 +25202,8 @@ async function _getResponseText(response) { __name(_getResponseText, "_getResponseText"); async function captureXhrBreadcrumbToReplay(breadcrumb, hint, options4) { try { - const data25 = _prepareXhrData(breadcrumb, hint, options4); - const result = makeNetworkReplayBreadcrumb("resource.xhr", data25); + const data26 = _prepareXhrData(breadcrumb, hint, options4); + const result = makeNetworkReplayBreadcrumb("resource.xhr", data26); addNetworkBreadcrumb(options4.replay, result); } catch (error2) { DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to capture xhr breadcrumb"); @@ -26545,17 +27113,17 @@ let _mirror = { }; if (typeof window !== "undefined" && window.Proxy && window.Reflect) { _mirror = new Proxy(_mirror, { - get(target, prop2, receiver) { + get(target2, prop2, receiver) { if (prop2 === "map") { console.error(DEPARTED_MIRROR_ACCESS_WARNING); } - return Reflect.get(target, prop2, receiver); + return Reflect.get(target2, prop2, receiver); } }); } -function hookSetter(target, key, d2, isRevoked, win = window) { - const original = win.Object.getOwnPropertyDescriptor(target, key); - win.Object.defineProperty(target, key, isRevoked ? d2 : { +function hookSetter(target2, key, d2, isRevoked, win = window) { + const original = win.Object.getOwnPropertyDescriptor(target2, key); + win.Object.defineProperty(target2, key, isRevoked ? d2 : { set(value4) { setTimeout$1(() => { d2.set.call(this, value4); @@ -26565,7 +27133,7 @@ function hookSetter(target, key, d2, isRevoked, win = window) { } } }); - return () => hookSetter(target, key, original || {}, true); + return () => hookSetter(target2, key, original || {}, true); } __name(hookSetter, "hookSetter"); function patch$1(source, name2, replacement) { @@ -26666,8 +27234,8 @@ var CanvasContext = /* @__PURE__ */ ((CanvasContext2) => { return CanvasContext2; })(CanvasContext || {}); let errorHandler; -function registerErrorHandler(handler6) { - errorHandler = handler6; +function registerErrorHandler(handler12) { + errorHandler = handler12; } __name(registerErrorHandler, "registerErrorHandler"); const callbackWrapper = /* @__PURE__ */ __name((cb) => { @@ -26965,9 +27533,9 @@ class CanvasManager { } reset() { this.pendingCanvasMutations.clear(); - this.restoreHandlers.forEach((handler6) => { + this.restoreHandlers.forEach((handler12) => { try { - handler6(); + handler12(); } catch (e2) { } }); @@ -27002,14 +27570,14 @@ class CanvasManager { this.locked = false; this.snapshotInProgressMap = /* @__PURE__ */ new Map(); this.worker = null; - this.processMutation = (target, mutation) => { + this.processMutation = (target2, mutation) => { const newFrame = this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId; if (newFrame || !this.rafStamps.invokeId) this.rafStamps.invokeId = this.rafStamps.latestId; - if (!this.pendingCanvasMutations.has(target)) { - this.pendingCanvasMutations.set(target, []); + if (!this.pendingCanvasMutations.has(target2)) { + this.pendingCanvasMutations.set(target2, []); } - this.pendingCanvasMutations.get(target).push(mutation); + this.pendingCanvasMutations.get(target2).push(mutation); }; const { sampling = "all", win, blockClass, blockSelector, unblockSelector, maxCanvasSize, recordCanvas, dataURLOptions, errorHandler: errorHandler2 } = options4; this.mutationCb = options4.mutationCb; @@ -27069,12 +27637,12 @@ class CanvasManager { initFPSWorker() { const worker = new Worker(t$2()); worker.onmessage = (e2) => { - const data25 = e2.data; - const { id: id3 } = data25; + const data26 = e2.data; + const { id: id3 } = data26; this.snapshotInProgressMap.set(id3, false); - if (!("base64" in data25)) + if (!("base64" in data26)) return; - const { base64, type, width: width2, height } = data25; + const { base64, type, width: width2, height } = data26; this.mutationCb({ id: id3, type: CanvasContext["2D"], @@ -27139,8 +27707,8 @@ class CanvasManager { return [canvasElement2]; } const matchedCanvas = []; - const searchCanvas = /* @__PURE__ */ __name((root27) => { - root27.querySelectorAll("canvas").forEach((canvas) => { + const searchCanvas = /* @__PURE__ */ __name((root29) => { + root29.querySelectorAll("canvas").forEach((canvas) => { if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector)) { matchedCanvas.push(canvas); } @@ -27416,9 +27984,9 @@ function mergeOptions$2(defaultOptions2, optionOverrides) { optionOverrides.onFormClose && optionOverrides.onFormClose(); defaultOptions2.onFormClose && defaultOptions2.onFormClose(); }, "onFormClose"), - onSubmitSuccess: /* @__PURE__ */ __name((data25) => { - optionOverrides.onSubmitSuccess && optionOverrides.onSubmitSuccess(data25); - defaultOptions2.onSubmitSuccess && defaultOptions2.onSubmitSuccess(data25); + onSubmitSuccess: /* @__PURE__ */ __name((data26) => { + optionOverrides.onSubmitSuccess && optionOverrides.onSubmitSuccess(data26); + defaultOptions2.onSubmitSuccess && defaultOptions2.onSubmitSuccess(data26); }, "onSubmitSuccess"), onSubmitError: /* @__PURE__ */ __name((error2) => { optionOverrides.onSubmitError && optionOverrides.onSubmitError(error2); @@ -27597,18 +28165,18 @@ const DEFAULT_DARK = { outline: "1px auto var(--accent-background)", interactiveFilter: "brightness(150%)" }; -function getThemedCssVariables(theme42) { +function getThemedCssVariables(theme43) { return ` - --foreground: ${theme42.foreground}; - --background: ${theme42.background}; - --accent-foreground: ${theme42.accentForeground}; - --accent-background: ${theme42.accentBackground}; - --success-color: ${theme42.successColor}; - --error-color: ${theme42.errorColor}; - --border: ${theme42.border}; - --box-shadow: ${theme42.boxShadow}; - --outline: ${theme42.outline}; - --interactive-filter: ${theme42.interactiveFilter}; + --foreground: ${theme43.foreground}; + --background: ${theme43.background}; + --accent-foreground: ${theme43.accentForeground}; + --accent-background: ${theme43.accentBackground}; + --success-color: ${theme43.successColor}; + --error-color: ${theme43.errorColor}; + --border: ${theme43.border}; + --box-shadow: ${theme43.boxShadow}; + --outline: ${theme43.outline}; + --interactive-filter: ${theme43.interactiveFilter}; `; } __name(getThemedCssVariables, "getThemedCssVariables"); @@ -28455,8 +29023,8 @@ function Form({ setShowScreenshotInput(false); }, []); const hasAllRequiredFields = x( - (data25) => { - const missingFields = getMissingFields(data25, { + (data26) => { + const missingFields = getMissingFields(data26, { emailLabel, isEmailRequired, isNameRequired, @@ -28481,27 +29049,27 @@ function Form({ } const formData = new FormData(e2.target); const attachment = await (screenshotInput && showScreenshotInput ? screenshotInput.value() : void 0); - const data25 = { + const data26 = { name: retrieveStringValue(formData, "name"), email: retrieveStringValue(formData, "email"), message: retrieveStringValue(formData, "message"), attachments: attachment ? [attachment] : void 0 }; - if (!hasAllRequiredFields(data25)) { + if (!hasAllRequiredFields(data26)) { return; } try { await onSubmit( { - name: data25.name, - email: data25.email, - message: data25.message, + name: data26.name, + email: data26.email, + message: data26.message, source: FEEDBACK_WIDGET_SOURCE, tags }, - { attachments: data25.attachments } + { attachments: data26.attachments } ); - onSubmitSuccess(data25); + onSubmitSuccess(data26); } catch (error3) { DEBUG_BUILD$1 && logger$2.error(error3); setError(error3); @@ -28674,8 +29242,8 @@ function Dialog({ open: open2, onFormSubmitted, ...props }) { onFormSubmitted(); }, [timeoutId]); const onSubmitSuccess = x( - (data25) => { - props.onSubmitSuccess(data25); + (data26) => { + props.onSubmitSuccess(data26); setTimeoutId( setTimeout(() => { onFormSubmitted(); @@ -29086,9 +29654,9 @@ const feedbackModalIntegration = /* @__PURE__ */ __name(() => { options4.onFormClose && options4.onFormClose(); }, "onFormClose"), onSubmit: sendFeedback2, - onSubmitSuccess: /* @__PURE__ */ __name((data25) => { + onSubmitSuccess: /* @__PURE__ */ __name((data26) => { renderContent(false); - options4.onSubmitSuccess && options4.onSubmitSuccess(data25); + options4.onSubmitSuccess && options4.onSubmitSuccess(data26); }, "onSubmitSuccess"), onSubmitError: /* @__PURE__ */ __name((error2) => { options4.onSubmitError && options4.onSubmitError(error2); @@ -29623,9 +30191,9 @@ const feedbackScreenshotIntegration = /* @__PURE__ */ __name(() => { imageBuffer.toBlob(resolve2, "image/png"); }); if (blob) { - const data25 = new Uint8Array(await blob.arrayBuffer()); + const data26 = new Uint8Array(await blob.arrayBuffer()); const attachment = { - data: data25, + data: data26, filename: "screenshot.png", contentType: "application/png" // attachmentType?: string; @@ -29645,30 +30213,30 @@ const feedbackSyncIntegration = buildFeedbackIntegration({ getModalIntegration: /* @__PURE__ */ __name(() => feedbackModalIntegration, "getModalIntegration"), getScreenshotIntegration: /* @__PURE__ */ __name(() => feedbackScreenshotIntegration, "getScreenshotIntegration") }); -function increment(name2, value4 = 1, data25) { - metrics$1.increment(BrowserMetricsAggregator, name2, value4, data25); +function increment(name2, value4 = 1, data26) { + metrics$1.increment(BrowserMetricsAggregator, name2, value4, data26); } __name(increment, "increment"); -function distribution(name2, value4, data25) { - metrics$1.distribution(BrowserMetricsAggregator, name2, value4, data25); +function distribution(name2, value4, data26) { + metrics$1.distribution(BrowserMetricsAggregator, name2, value4, data26); } __name(distribution, "distribution"); -function set$5(name2, value4, data25) { - metrics$1.set(BrowserMetricsAggregator, name2, value4, data25); +function set$4(name2, value4, data26) { + metrics$1.set(BrowserMetricsAggregator, name2, value4, data26); } -__name(set$5, "set$5"); -function gauge(name2, value4, data25) { - metrics$1.gauge(BrowserMetricsAggregator, name2, value4, data25); +__name(set$4, "set$4"); +function gauge(name2, value4, data26) { + metrics$1.gauge(BrowserMetricsAggregator, name2, value4, data26); } __name(gauge, "gauge"); -function timing(name2, value4, unit = "second", data25) { - return metrics$1.timing(BrowserMetricsAggregator, name2, value4, unit, data25); +function timing(name2, value4, unit = "second", data26) { + return metrics$1.timing(BrowserMetricsAggregator, name2, value4, unit, data26); } __name(timing, "timing"); const metrics = { increment, distribution, - set: set$5, + set: set$4, gauge, timing }; @@ -29763,7 +30331,7 @@ function addHTTPTimings(span) { entries.forEach((entry) => { if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) { const spanData = resourceTimingEntryToSpanData(entry); - spanData.forEach((data25) => span.setAttribute(...data25)); + spanData.forEach((data26) => span.setAttribute(...data26)); setTimeout(cleanup); } }); @@ -30307,8 +30875,8 @@ let OS_ARCH = ""; let OS_BROWSER = WINDOW$5.navigator && WINDOW$5.navigator.userAgent || ""; let OS_MODEL = ""; const OS_LOCALE = WINDOW$5.navigator && WINDOW$5.navigator.language || WINDOW$5.navigator && WINDOW$5.navigator.languages && WINDOW$5.navigator.languages[0] || ""; -function isUserAgentData(data25) { - return typeof data25 === "object" && data25 !== null && "getHighEntropyValues" in data25; +function isUserAgentData(data26) { + return typeof data26 === "object" && data26 !== null && "getHighEntropyValues" in data26; } __name(isUserAgentData, "isUserAgentData"); const userAgentData = WINDOW$5.navigator && WINDOW$5.navigator.userAgentData; @@ -31359,15 +31927,16 @@ const createSentryPiniaPlugin = /* @__PURE__ */ __name((options4 = { return plugin; }, "createSentryPiniaPlugin"); /** -* @vue/shared v3.4.31 +* @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ -function makeMap(str, expectsLowerCase) { - const set3 = new Set(str.split(",")); - return expectsLowerCase ? (val) => set3.has(val.toLowerCase()) : (val) => set3.has(val); +function makeMap(str) { + const map3 = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map3[key] = 1; + return (val) => val in map3; } __name(makeMap, "makeMap"); const EMPTY_OBJ = false ? Object.freeze({}) : {}; @@ -31379,25 +31948,25 @@ const isOn = /* @__PURE__ */ __name((key) => key.charCodeAt(0) === 111 && key.ch (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97), "isOn"); const isModelListener = /* @__PURE__ */ __name((key) => key.startsWith("onUpdate:"), "isModelListener"); const extend$1 = Object.assign; -const remove$1 = /* @__PURE__ */ __name((arr, el) => { +const remove$2 = /* @__PURE__ */ __name((arr, el) => { const i2 = arr.indexOf(el); if (i2 > -1) { arr.splice(i2, 1); } -}, "remove$1"); +}, "remove$2"); const hasOwnProperty$d = Object.prototype.hasOwnProperty; const hasOwn$3 = /* @__PURE__ */ __name((val, key) => hasOwnProperty$d.call(val, key), "hasOwn$3"); -const isArray$9 = Array.isArray; +const isArray$b = Array.isArray; const isMap$3 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Map]", "isMap$3"); const isSet$3 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Set]", "isSet$3"); -const isDate$2 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Date]", "isDate$2"); +const isDate$4 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Date]", "isDate$4"); const isRegExp$4 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object RegExp]", "isRegExp$4"); -const isFunction$8 = /* @__PURE__ */ __name((val) => typeof val === "function", "isFunction$8"); -const isString$7 = /* @__PURE__ */ __name((val) => typeof val === "string", "isString$7"); +const isFunction$c = /* @__PURE__ */ __name((val) => typeof val === "function", "isFunction$c"); +const isString$9 = /* @__PURE__ */ __name((val) => typeof val === "string", "isString$9"); const isSymbol$1 = /* @__PURE__ */ __name((val) => typeof val === "symbol", "isSymbol$1"); -const isObject$d = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object", "isObject$d"); +const isObject$f = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object", "isObject$f"); const isPromise$1 = /* @__PURE__ */ __name((val) => { - return (isObject$d(val) || isFunction$8(val)) && isFunction$8(val.then) && isFunction$8(val.catch); + return (isObject$f(val) || isFunction$c(val)) && isFunction$c(val.then) && isFunction$c(val.catch); }, "isPromise$1"); const objectToString$3 = Object.prototype.toString; const toTypeString$1 = /* @__PURE__ */ __name((value4) => objectToString$3.call(value4), "toTypeString$1"); @@ -31405,7 +31974,7 @@ const toRawType = /* @__PURE__ */ __name((value4) => { return toTypeString$1(value4).slice(8, -1); }, "toRawType"); const isPlainObject$4 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Object]", "isPlainObject$4"); -const isIntegerKey = /* @__PURE__ */ __name((key) => isString$7(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key, "isIntegerKey"); +const isIntegerKey = /* @__PURE__ */ __name((key) => isString$9(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key, "isIntegerKey"); const isReservedProp = /* @__PURE__ */ makeMap( // the leading comma is intentional so empty string "" is also included ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" @@ -31421,9 +31990,11 @@ const cacheStringFunction$1 = /* @__PURE__ */ __name((fn) => { }; }, "cacheStringFunction$1"); const camelizeRE$1 = /-(\w)/g; -const camelize$1 = cacheStringFunction$1((str) => { - return str.replace(camelizeRE$1, (_2, c2) => c2 ? c2.toUpperCase() : ""); -}); +const camelize$1 = cacheStringFunction$1( + (str) => { + return str.replace(camelizeRE$1, (_2, c2) => c2 ? c2.toUpperCase() : ""); + } +); const hyphenateRE$1 = /\B([A-Z])/g; const hyphenate$1 = cacheStringFunction$1( (str) => str.replace(hyphenateRE$1, "-$1").toLowerCase() @@ -31431,10 +32002,12 @@ const hyphenate$1 = cacheStringFunction$1( const capitalize$1 = cacheStringFunction$1((str) => { return str.charAt(0).toUpperCase() + str.slice(1); }); -const toHandlerKey = cacheStringFunction$1((str) => { - const s2 = str ? `on${capitalize$1(str)}` : ``; - return s2; -}); +const toHandlerKey = cacheStringFunction$1( + (str) => { + const s2 = str ? `on${capitalize$1(str)}` : ``; + return s2; + } +); const hasChanged = /* @__PURE__ */ __name((value4, oldValue2) => !Object.is(value4, oldValue2), "hasChanged"); const invokeArrayFns = /* @__PURE__ */ __name((fns, ...arg) => { for (let i2 = 0; i2 < fns.length; i2++) { @@ -31454,7 +32027,7 @@ const looseToNumber = /* @__PURE__ */ __name((val) => { return isNaN(n2) ? val : n2; }, "looseToNumber"); const toNumber = /* @__PURE__ */ __name((val) => { - const n2 = isString$7(val) ? Number(val) : NaN; + const n2 = isString$9(val) ? Number(val) : NaN; return isNaN(n2) ? val : n2; }, "toNumber"); let _globalThis$1; @@ -31466,6 +32039,13 @@ function genPropsAccessExp(name2) { return identRE.test(name2) ? `__props.${name2}` : `__props[${JSON.stringify(name2)}]`; } __name(genPropsAccessExp, "genPropsAccessExp"); +function genCacheKey(source, options4) { + return source + JSON.stringify( + options4, + (_2, val) => typeof val === "function" ? val.toString() : val + ); +} +__name(genCacheKey, "genCacheKey"); const PatchFlags = { "TEXT": 1, "1": "TEXT", @@ -31491,8 +32071,8 @@ const PatchFlags = { "1024": "DYNAMIC_SLOTS", "DEV_ROOT_FRAGMENT": 2048, "2048": "DEV_ROOT_FRAGMENT", - "HOISTED": -1, - "-1": "HOISTED", + "CACHED": -1, + "-1": "CACHED", "BAIL": -2, "-2": "BAIL" }; @@ -31549,7 +32129,7 @@ const slotFlagsText = { [2]: "DYNAMIC", [3]: "FORWARDED" }; -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); const isGloballyWhitelisted = isGloballyAllowed; const range = 2; @@ -31595,11 +32175,11 @@ function generateCodeFrame$1(source, start2 = 0, end = source.length) { } __name(generateCodeFrame$1, "generateCodeFrame$1"); function normalizeStyle(value4) { - if (isArray$9(value4)) { + if (isArray$b(value4)) { const res = {}; for (let i2 = 0; i2 < value4.length; i2++) { const item3 = value4[i2]; - const normalized = isString$7(item3) ? parseStringStyle(item3) : normalizeStyle(item3); + const normalized = isString$9(item3) ? parseStringStyle(item3) : normalizeStyle(item3); if (normalized) { for (const key in normalized) { res[key] = normalized[key]; @@ -31607,7 +32187,7 @@ function normalizeStyle(value4) { } } return res; - } else if (isString$7(value4) || isObject$d(value4)) { + } else if (isString$9(value4) || isObject$f(value4)) { return value4; } } @@ -31627,13 +32207,12 @@ function parseStringStyle(cssText) { } __name(parseStringStyle, "parseStringStyle"); function stringifyStyle(styles) { + if (!styles) return ""; + if (isString$9(styles)) return styles; let ret = ""; - if (!styles || isString$7(styles)) { - return ret; - } for (const key in styles) { const value4 = styles[key]; - if (isString$7(value4) || typeof value4 === "number") { + if (isString$9(value4) || typeof value4 === "number") { const normalizedKey = key.startsWith(`--`) ? key : hyphenate$1(key); ret += `${normalizedKey}:${value4};`; } @@ -31643,16 +32222,16 @@ function stringifyStyle(styles) { __name(stringifyStyle, "stringifyStyle"); function normalizeClass(value4) { let res = ""; - if (isString$7(value4)) { + if (isString$9(value4)) { res = value4; - } else if (isArray$9(value4)) { + } else if (isArray$b(value4)) { for (let i2 = 0; i2 < value4.length; i2++) { const normalized = normalizeClass(value4[i2]); if (normalized) { res += normalized + " "; } } - } else if (isObject$d(value4)) { + } else if (isObject$f(value4)) { for (const name2 in value4) { if (value4[name2]) { res += name2 + " "; @@ -31665,7 +32244,7 @@ __name(normalizeClass, "normalizeClass"); function normalizeProps(props) { if (!props) return null; let { class: klass, style: style2 } = props; - if (klass && !isString$7(klass)) { + if (klass && !isString$9(klass)) { props.class = normalizeClass(klass); } if (style2) { @@ -31716,6 +32295,9 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap( const isKnownSvgAttr = /* @__PURE__ */ makeMap( `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` ); +const isKnownMathMLAttr = /* @__PURE__ */ makeMap( + `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` +); function isRenderableAttrValue(value4) { if (value4 == null) { return false; @@ -31769,6 +32351,14 @@ function escapeHtmlComment(src) { return src.replace(commentStripRE, ""); } __name(escapeHtmlComment, "escapeHtmlComment"); +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s2) => doubleEscape ? s2 === '"' ? '\\\\\\"' : `\\\\${s2}` : `\\${s2}` + ); +} +__name(getEscapedCssVarName, "getEscapedCssVarName"); function looseCompareArrays(a2, b2) { if (a2.length !== b2.length) return false; let equal = true; @@ -31780,8 +32370,8 @@ function looseCompareArrays(a2, b2) { __name(looseCompareArrays, "looseCompareArrays"); function looseEqual(a2, b2) { if (a2 === b2) return true; - let aValidType = isDate$2(a2); - let bValidType = isDate$2(b2); + let aValidType = isDate$4(a2); + let bValidType = isDate$4(b2); if (aValidType || bValidType) { return aValidType && bValidType ? a2.getTime() === b2.getTime() : false; } @@ -31790,13 +32380,13 @@ function looseEqual(a2, b2) { if (aValidType || bValidType) { return a2 === b2; } - aValidType = isArray$9(a2); - bValidType = isArray$9(b2); + aValidType = isArray$b(a2); + bValidType = isArray$b(b2); if (aValidType || bValidType) { return aValidType && bValidType ? looseCompareArrays(a2, b2) : false; } - aValidType = isObject$d(a2); - bValidType = isObject$d(b2); + aValidType = isObject$f(a2); + bValidType = isObject$f(b2); if (aValidType || bValidType) { if (!aValidType || !bValidType) { return false; @@ -31822,10 +32412,10 @@ function looseIndexOf(arr, val) { } __name(looseIndexOf, "looseIndexOf"); const isRef$1 = /* @__PURE__ */ __name((val) => { - return !!(val && val.__v_isRef === true); + return !!(val && val["__v_isRef"] === true); }, "isRef$1"); const toDisplayString$1 = /* @__PURE__ */ __name((val) => { - return isString$7(val) ? val : val == null ? "" : isArray$9(val) || isObject$d(val) && (val.toString === objectToString$3 || !isFunction$8(val.toString)) ? isRef$1(val) ? toDisplayString$1(val.value) : JSON.stringify(val, replacer, 2) : String(val); + return isString$9(val) ? val : val == null ? "" : isArray$b(val) || isObject$f(val) && (val.toString === objectToString$3 || !isFunction$c(val.toString)) ? isRef$1(val) ? toDisplayString$1(val.value) : JSON.stringify(val, replacer, 2) : String(val); }, "toDisplayString$1"); const replacer = /* @__PURE__ */ __name((_key, val) => { if (isRef$1(val)) { @@ -31846,7 +32436,7 @@ const replacer = /* @__PURE__ */ __name((_key, val) => { }; } else if (isSymbol$1(val)) { return stringifySymbol(val); - } else if (isObject$d(val) && !isArray$9(val) && !isPlainObject$4(val)) { + } else if (isObject$f(val) && !isArray$b(val) && !isPlainObject$4(val)) { return String(val); } return val; @@ -31860,7 +32450,7 @@ const stringifySymbol = /* @__PURE__ */ __name((v2, i2 = "") => { ); }, "stringifySymbol"); /** -* @vue/reactivity v3.4.31 +* @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ @@ -31878,6 +32468,7 @@ class EffectScope { this._active = true; this.effects = []; this.cleanups = []; + this._isPaused = false; this.parent = activeEffectScope; if (!detached && activeEffectScope) { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( @@ -31888,6 +32479,39 @@ class EffectScope { get active() { return this._active; } + pause() { + if (this._active) { + this._isPaused = true; + let i2, l2; + if (this.scopes) { + for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) { + this.scopes[i2].pause(); + } + } + for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) { + this.effects[i2].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i2, l2; + if (this.scopes) { + for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) { + this.scopes[i2].resume(); + } + } + for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) { + this.effects[i2].resume(); + } + } + } + } run(fn) { if (this._active) { const currentEffectScope = activeEffectScope; @@ -31917,17 +32541,21 @@ class EffectScope { } stop(fromParent) { if (this._active) { + this._active = false; let i2, l2; for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) { this.effects[i2].stop(); } + this.effects.length = 0; for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) { this.cleanups[i2](); } + this.cleanups.length = 0; if (this.scopes) { for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) { this.scopes[i2].stop(true); } + this.scopes.length = 0; } if (!this.detached && this.parent && !fromParent) { const last = this.parent.scopes.pop(); @@ -31937,7 +32565,6 @@ class EffectScope { } } this.parent = void 0; - this._active = false; } } } @@ -31945,17 +32572,11 @@ function effectScope(detached) { return new EffectScope(detached); } __name(effectScope, "effectScope"); -function recordEffectScope(effect2, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect2); - } -} -__name(recordEffectScope, "recordEffectScope"); function getCurrentScope() { return activeEffectScope; } __name(getCurrentScope, "getCurrentScope"); -function onScopeDispose(fn) { +function onScopeDispose(fn, failSilently = false) { if (activeEffectScope) { activeEffectScope.cleanups.push(fn); } else if (false) { @@ -31965,122 +32586,307 @@ function onScopeDispose(fn) { } } __name(onScopeDispose, "onScopeDispose"); -let activeEffect; +let activeSub; +const EffectFlags = { + "ACTIVE": 1, + "1": "ACTIVE", + "RUNNING": 2, + "2": "RUNNING", + "TRACKING": 4, + "4": "TRACKING", + "NOTIFIED": 8, + "8": "NOTIFIED", + "DIRTY": 16, + "16": "DIRTY", + "ALLOW_RECURSE": 32, + "32": "ALLOW_RECURSE", + "PAUSED": 64, + "64": "PAUSED" +}; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); class ReactiveEffect { static { __name(this, "ReactiveEffect"); } - constructor(fn, trigger2, scheduler, scope) { + constructor(fn) { this.fn = fn; - this.trigger = trigger2; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this._dirtyLevel = 4; - this._trackId = 0; - this._runnings = 0; - this._shouldSchedule = false; - this._depsLength = 0; - recordEffectScope(this, scope); - } - get dirty() { - if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { - this._dirtyLevel = 1; - pauseTracking(); - for (let i2 = 0; i2 < this._depsLength; i2++) { - const dep = this.deps[i2]; - if (dep.computed) { - triggerComputed(dep.computed); - if (this._dirtyLevel >= 4) { - break; - } - } - } - if (this._dirtyLevel === 1) { - this._dirtyLevel = 0; - } - resetTracking(); + this.deps = void 0; + this.depsTail = void 0; + this.flags = 1 | 4; + this.next = void 0; + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); } - return this._dirtyLevel >= 4; } - set dirty(v2) { - this._dirtyLevel = v2 ? 4 : 0; + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } } run() { - this._dirtyLevel = 0; - if (!this.active) { + if (!(this.flags & 1)) { return this.fn(); } - let lastShouldTrack = shouldTrack; - let lastEffect = activeEffect; + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; try { - shouldTrack = true; - activeEffect = this; - this._runnings++; - preCleanupEffect(this); return this.fn(); } finally { - postCleanupEffect(this); - this._runnings--; - activeEffect = lastEffect; - shouldTrack = lastShouldTrack; + if (false) { + warn$4( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; } } stop() { - if (this.active) { - preCleanupEffect(this); - postCleanupEffect(this); + if (this.flags & 1) { + for (let link2 = this.deps; link2; link2 = link2.nextDep) { + removeSub(link2); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); this.onStop && this.onStop(); - this.active = false; + this.flags &= ~1; } } -} -function triggerComputed(computed2) { - return computed2.value; -} -__name(triggerComputed, "triggerComputed"); -function preCleanupEffect(effect2) { - effect2._trackId++; - effect2._depsLength = 0; -} -__name(preCleanupEffect, "preCleanupEffect"); -function postCleanupEffect(effect2) { - if (effect2.deps.length > effect2._depsLength) { - for (let i2 = effect2._depsLength; i2 < effect2.deps.length; i2++) { - cleanupDepEffect(effect2.deps[i2], effect2); - } - effect2.deps.length = effect2._depsLength; - } -} -__name(postCleanupEffect, "postCleanupEffect"); -function cleanupDepEffect(dep, effect2) { - const trackId = dep.get(effect2); - if (trackId !== void 0 && effect2._trackId !== trackId) { - dep.delete(effect2); - if (dep.size === 0) { - dep.cleanup(); + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); } } + /** + * @internal + */ + runIfDirty() { + if (isDirty$1(this)) { + this.run(); + } + } + get dirty() { + return isDirty$1(this); + } } -__name(cleanupDepEffect, "cleanupDepEffect"); +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed2 = false) { + sub.flags |= 8; + if (isComputed2) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +__name(batch, "batch"); +function startBatch() { + batchDepth++; +} +__name(startBatch, "startBatch"); +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e2 = batchedComputed; + batchedComputed = void 0; + while (e2) { + const next2 = e2.next; + e2.next = void 0; + e2.flags &= ~8; + e2 = next2; + } + } + let error2; + while (batchedSub) { + let e2 = batchedSub; + batchedSub = void 0; + while (e2) { + const next2 = e2.next; + e2.next = void 0; + e2.flags &= ~8; + if (e2.flags & 1) { + try { + ; + e2.trigger(); + } catch (err) { + if (!error2) error2 = err; + } + } + e2 = next2; + } + } + if (error2) throw error2; +} +__name(endBatch, "endBatch"); +function prepareDeps(sub) { + for (let link2 = sub.deps; link2; link2 = link2.nextDep) { + link2.version = -1; + link2.prevActiveLink = link2.dep.activeLink; + link2.dep.activeLink = link2; + } +} +__name(prepareDeps, "prepareDeps"); +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link2 = tail; + while (link2) { + const prev2 = link2.prevDep; + if (link2.version === -1) { + if (link2 === tail) tail = prev2; + removeSub(link2); + removeDep(link2); + } else { + head = link2; + } + link2.dep.activeLink = link2.prevActiveLink; + link2.prevActiveLink = void 0; + link2 = prev2; + } + sub.deps = head; + sub.depsTail = tail; +} +__name(cleanupDeps, "cleanupDeps"); +function isDirty$1(sub) { + for (let link2 = sub.deps; link2; link2 = link2.nextDep) { + if (link2.dep.version !== link2.version || link2.dep.computed && (refreshComputed(link2.dep.computed) || link2.dep.version !== link2.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +__name(isDirty$1, "isDirty$1"); +function refreshComputed(computed2) { + if (computed2.flags & 4 && !(computed2.flags & 16)) { + return; + } + computed2.flags &= ~16; + if (computed2.globalVersion === globalVersion) { + return; + } + computed2.globalVersion = globalVersion; + const dep = computed2.dep; + computed2.flags |= 2; + if (dep.version > 0 && !computed2.isSSR && computed2.deps && !isDirty$1(computed2)) { + computed2.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed2; + shouldTrack = true; + try { + prepareDeps(computed2); + const value4 = computed2.fn(computed2._value); + if (dep.version === 0 || hasChanged(value4, computed2._value)) { + computed2._value = value4; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed2); + computed2.flags &= ~2; + } +} +__name(refreshComputed, "refreshComputed"); +function removeSub(link2, soft = false) { + const { dep, prevSub, nextSub } = link2; + if (prevSub) { + prevSub.nextSub = nextSub; + link2.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link2.nextSub = void 0; + } + if (false) { + dep.subsHead = nextSub; + } + if (dep.subs === link2) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l2 = dep.computed.deps; l2; l2 = l2.nextDep) { + removeSub(l2, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +__name(removeSub, "removeSub"); +function removeDep(link2) { + const { prevDep, nextDep } = link2; + if (prevDep) { + prevDep.nextDep = nextDep; + link2.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link2.nextDep = void 0; + } +} +__name(removeDep, "removeDep"); function effect(fn, options4) { if (fn.effect instanceof ReactiveEffect) { fn = fn.effect.fn; } - const _effect = new ReactiveEffect(fn, NOOP, () => { - if (_effect.dirty) { - _effect.run(); - } - }); + const e2 = new ReactiveEffect(fn); if (options4) { - extend$1(_effect, options4); - if (options4.scope) recordEffectScope(_effect, options4.scope); + extend$1(e2, options4); } - if (!options4 || !options4.lazy) { - _effect.run(); + try { + e2.run(); + } catch (err) { + e2.stop(); + throw err; } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; + const runner = e2.run.bind(e2); + runner.effect = e2; return runner; } __name(effect, "effect"); @@ -32089,7 +32895,6 @@ function stop(runner) { } __name(stop, "stop"); let shouldTrack = true; -let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { trackStack.push(shouldTrack); @@ -32106,197 +32911,454 @@ function resetTracking() { shouldTrack = last === void 0 ? true : last; } __name(resetTracking, "resetTracking"); -function pauseScheduling() { - pauseScheduleStack++; -} -__name(pauseScheduling, "pauseScheduling"); -function resetScheduling() { - pauseScheduleStack--; - while (!pauseScheduleStack && queueEffectSchedulers.length) { - queueEffectSchedulers.shift()(); - } -} -__name(resetScheduling, "resetScheduling"); -function trackEffect(effect2, dep, debuggerEventExtraInfo) { - var _a2; - if (dep.get(effect2) !== effect2._trackId) { - dep.set(effect2, effect2._trackId); - const oldDep = effect2.deps[effect2._depsLength]; - if (oldDep !== dep) { - if (oldDep) { - cleanupDepEffect(oldDep, effect2); - } - effect2.deps[effect2._depsLength++] = dep; - } else { - effect2._depsLength++; - } - if (false) { - (_a2 = effect2.onTrack) == null ? void 0 : _a2.call(effect2, extend$1({ effect: effect2 }, debuggerEventExtraInfo)); - } - } -} -__name(trackEffect, "trackEffect"); -const queueEffectSchedulers = []; -function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { - var _a2; - pauseScheduling(); - for (const effect2 of dep.keys()) { - let tracking; - if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); - effect2._dirtyLevel = dirtyLevel; - } - if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - if (false) { - (_a2 = effect2.onTrigger) == null ? void 0 : _a2.call(effect2, extend$1({ effect: effect2 }, debuggerEventExtraInfo)); - } - effect2.trigger(); - if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) { - effect2._shouldSchedule = false; - if (effect2.scheduler) { - queueEffectSchedulers.push(effect2.scheduler); - } - } - } - } - resetScheduling(); -} -__name(triggerEffects, "triggerEffects"); -const createDep = /* @__PURE__ */ __name((cleanup, computed2) => { - const dep = /* @__PURE__ */ new Map(); - dep.cleanup = cleanup; - dep.computed = computed2; - return dep; -}, "createDep"); -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol(false ? "iterate" : ""); -const MAP_KEY_ITERATE_KEY = Symbol(false ? "Map key iterate" : ""); -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = createDep(() => depsMap.delete(key))); - } - trackEffect( - activeEffect, - dep, - false ? { - target, - type, - key - } : void 0 +function onEffectCleanup(fn, failSilently = false) { + if (activeSub instanceof ReactiveEffect) { + activeSub.cleanup = fn; + } else if (false) { + warn$4( + `onEffectCleanup() was called when there was no active effect to associate with.` ); } } +__name(onEffectCleanup, "onEffectCleanup"); +function cleanupEffect(e2) { + const { cleanup } = e2; + e2.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} +__name(cleanupEffect, "cleanupEffect"); +let globalVersion = 0; +let Link$3 = class Link2 { + static { + __name(this, "Link"); + } + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +}; +class Dep { + static { + __name(this, "Dep"); + } + constructor(computed2) { + this.computed = computed2; + this.version = 0; + this.activeLink = void 0; + this.subs = void 0; + this.map = void 0; + this.key = void 0; + this.sc = 0; + if (false) { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link2 = this.activeLink; + if (link2 === void 0 || link2.sub !== activeSub) { + link2 = this.activeLink = new Link$3(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link2; + } else { + link2.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link2; + activeSub.depsTail = link2; + } + addSub(link2); + } else if (link2.version === -1) { + link2.version = this.version; + if (link2.nextDep) { + const next2 = link2.nextDep; + next2.prevDep = link2.prevDep; + if (link2.prevDep) { + link2.prevDep.nextDep = next2; + } + link2.prevDep = activeSub.depsTail; + link2.nextDep = void 0; + activeSub.depsTail.nextDep = link2; + activeSub.depsTail = link2; + if (activeSub.deps === link2) { + activeSub.deps = next2; + } + } + } + if (false) { + activeSub.onTrack( + extend$1( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link2; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (false) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend$1( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link2 = this.subs; link2; link2 = link2.prevSub) { + if (link2.sub.notify()) { + ; + link2.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link2) { + link2.dep.sc++; + if (link2.sub.flags & 4) { + const computed2 = link2.dep.computed; + if (computed2 && !link2.dep.subs) { + computed2.flags |= 4 | 16; + for (let l2 = computed2.deps; l2; l2 = l2.nextDep) { + addSub(l2); + } + } + const currentTail = link2.dep.subs; + if (currentTail !== link2) { + link2.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link2; + } + if (false) { + link2.dep.subsHead = link2; + } + link2.dep.subs = link2; + } +} +__name(addSub, "addSub"); +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + false ? "Object iterate" : "" +); +const MAP_KEY_ITERATE_KEY = Symbol( + false ? "Map keys iterate" : "" +); +const ARRAY_ITERATE_KEY = Symbol( + false ? "Array iterate" : "" +); +function track(target2, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target2); + if (!depsMap) { + targetMap.set(target2, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + if (false) { + dep.track({ + target: target2, + type, + key + }); + } else { + dep.track(); + } + } +} __name(track, "track"); -function trigger(target, type, key, newValue2, oldValue2, oldTarget) { - const depsMap = targetMap.get(target); +function trigger(target2, type, key, newValue2, oldValue2, oldTarget) { + const depsMap = targetMap.get(target2); if (!depsMap) { + globalVersion++; return; } - let deps = []; - if (type === "clear") { - deps = [...depsMap.values()]; - } else if (key === "length" && isArray$9(target)) { - const newLength = Number(newValue2); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || !isSymbol$1(key2) && key2 >= newLength) { - deps.push(dep); - } - }); - } else { - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - switch (type) { - case "add": - if (!isArray$9(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$3(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isIntegerKey(key)) { - deps.push(depsMap.get("length")); - } - break; - case "delete": - if (!isArray$9(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$3(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap$3(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - pauseScheduling(); - for (const dep of deps) { + const run2 = /* @__PURE__ */ __name((dep) => { if (dep) { - triggerEffects( - dep, - 4, - false ? { - target, + if (false) { + dep.trigger({ + target: target2, type, key, newValue: newValue2, oldValue: oldValue2, oldTarget - } : void 0 - ); + }); + } else { + dep.trigger(); + } + } + }, "run"); + startBatch(); + if (type === "clear") { + depsMap.forEach(run2); + } else { + const targetIsArray = isArray$b(target2); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue2); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol$1(key2) && key2 >= newLength) { + run2(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run2(depsMap.get(key)); + } + if (isArrayIndex) { + run2(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run2(depsMap.get(ITERATE_KEY)); + if (isMap$3(target2)) { + run2(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run2(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run2(depsMap.get(ITERATE_KEY)); + if (isMap$3(target2)) { + run2(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap$3(target2)) { + run2(depsMap.get(ITERATE_KEY)); + } + break; + } } } - resetScheduling(); + endBatch(); } __name(trigger, "trigger"); function getDepFromReactive(object, key) { - const depsMap = targetMap.get(object); - return depsMap && depsMap.get(key); + const depMap = targetMap.get(object); + return depMap && depMap.get(key); } __name(getDepFromReactive, "getDepFromReactive"); +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive$1); +} +__name(reactiveReadArray, "reactiveReadArray"); +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +__name(shallowReadArray, "shallowReadArray"); +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive$1); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x2) => isArray$b(x2) ? reactiveReadArray(x2) : x2) + ); + }, + entries() { + return iterator(this, "entries", (value4) => { + value4[1] = toReactive$1(value4[1]); + return value4; + }); + }, + every(fn, thisArg) { + return apply$2(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply$2(this, "filter", fn, thisArg, (v2) => v2.map(toReactive$1), arguments); + }, + find(fn, thisArg) { + return apply$2(this, "find", fn, thisArg, toReactive$1, arguments); + }, + findIndex(fn, thisArg) { + return apply$2(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply$2(this, "findLast", fn, thisArg, toReactive$1, arguments); + }, + findLastIndex(fn, thisArg) { + return apply$2(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply$2(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply$2(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply$2(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive$1); + } +}; +function iterator(self2, method, wrapValue) { + const arr = shallowReadArray(self2); + const iter = arr[method](); + if (arr !== self2 && !isShallow(self2)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +__name(iterator, "iterator"); +const arrayProto$1 = Array.prototype; +function apply$2(self2, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self2); + const needsWrap = arr !== self2 && !isShallow(self2); + const methodFn = arr[method]; + if (methodFn !== arrayProto$1[method]) { + const result2 = methodFn.apply(self2, args); + return needsWrap ? toReactive$1(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self2) { + if (needsWrap) { + wrappedFn = /* @__PURE__ */ __name(function(item3, index2) { + return fn.call(this, toReactive$1(item3), index2, self2); + }, "wrappedFn"); + } else if (fn.length > 2) { + wrappedFn = /* @__PURE__ */ __name(function(item3, index2) { + return fn.call(this, item3, index2, self2); + }, "wrappedFn"); + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +__name(apply$2, "apply$2"); +function reduce(self2, method, fn, args) { + const arr = shallowReadArray(self2); + let wrappedFn = fn; + if (arr !== self2) { + if (!isShallow(self2)) { + wrappedFn = /* @__PURE__ */ __name(function(acc, item3, index2) { + return fn.call(this, acc, toReactive$1(item3), index2, self2); + }, "wrappedFn"); + } else if (fn.length > 3) { + wrappedFn = /* @__PURE__ */ __name(function(acc, item3, index2) { + return fn.call(this, acc, item3, index2, self2); + }, "wrappedFn"); + } + } + return arr[method](wrappedFn, ...args); +} +__name(reduce, "reduce"); +function searchProxy(self2, method, args) { + const arr = toRaw(self2); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +__name(searchProxy, "searchProxy"); +function noTracking(self2, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self2)[method].apply(self2, args); + endBatch(); + resetTracking(); + return res; +} +__name(noTracking, "noTracking"); const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol$1) ); -const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); -function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i2 = 0, l2 = this.length; i2 < l2; i2++) { - track(arr, "get", i2 + ""); - } - const res = arr[key](...args); - if (res === -1 || res === false) { - return arr[key](...args.map(toRaw)); - } else { - return res; - } - }; - }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - instrumentations[key] = function(...args) { - pauseTracking(); - pauseScheduling(); - const res = toRaw(this)[key].apply(this, args); - resetScheduling(); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -__name(createArrayInstrumentations, "createArrayInstrumentations"); function hasOwnProperty$c(key) { if (!isSymbol$1(key)) key = String(key); const obj = toRaw(this); @@ -32312,7 +33374,8 @@ class BaseReactiveHandler { this._isReadonly = _isReadonly; this._isShallow = _isShallow; } - get(target, key, receiver) { + get(target2, key, receiver) { + if (key === "__v_skip") return target2["__v_skip"]; const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; if (key === "__v_isReactive") { return !isReadonly2; @@ -32321,28 +33384,36 @@ class BaseReactiveHandler { } else if (key === "__v_isShallow") { return isShallow2; } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the reciever is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target2) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target2) === Object.getPrototypeOf(receiver)) { + return target2; } return; } - const targetIsArray = isArray$9(target); + const targetIsArray = isArray$b(target2); if (!isReadonly2) { - if (targetIsArray && hasOwn$3(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; } if (key === "hasOwnProperty") { return hasOwnProperty$c; } } - const res = Reflect.get(target, key, receiver); + const res = Reflect.get( + target2, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target2) ? target2 : receiver + ); if (isSymbol$1(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } if (!isReadonly2) { - track(target, "get", key); + track(target2, "get", key); } if (isShallow2) { return res; @@ -32350,7 +33421,7 @@ class BaseReactiveHandler { if (isRef(res)) { return targetIsArray && isIntegerKey(key) ? res : res.value; } - if (isObject$d(res)) { + if (isObject$f(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; @@ -32363,15 +33434,15 @@ class MutableReactiveHandler extends BaseReactiveHandler { constructor(isShallow2 = false) { super(false, isShallow2); } - set(target, key, value4, receiver) { - let oldValue2 = target[key]; + set(target2, key, value4, receiver) { + let oldValue2 = target2[key]; if (!this._isShallow) { const isOldValueReadonly = isReadonly(oldValue2); if (!isShallow(value4) && !isReadonly(value4)) { oldValue2 = toRaw(oldValue2); value4 = toRaw(value4); } - if (!isArray$9(target) && isRef(oldValue2) && !isRef(value4)) { + if (!isArray$b(target2) && isRef(oldValue2) && !isRef(value4)) { if (isOldValueReadonly) { return false; } else { @@ -32380,40 +33451,45 @@ class MutableReactiveHandler extends BaseReactiveHandler { } } } - const hadKey = isArray$9(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$3(target, key); - const result = Reflect.set(target, key, value4, receiver); - if (target === toRaw(receiver)) { + const hadKey = isArray$b(target2) && isIntegerKey(key) ? Number(key) < target2.length : hasOwn$3(target2, key); + const result = Reflect.set( + target2, + key, + value4, + isRef(target2) ? target2 : receiver + ); + if (target2 === toRaw(receiver)) { if (!hadKey) { - trigger(target, "add", key, value4); + trigger(target2, "add", key, value4); } else if (hasChanged(value4, oldValue2)) { - trigger(target, "set", key, value4, oldValue2); + trigger(target2, "set", key, value4, oldValue2); } } return result; } - deleteProperty(target, key) { - const hadKey = hasOwn$3(target, key); - const oldValue2 = target[key]; - const result = Reflect.deleteProperty(target, key); + deleteProperty(target2, key) { + const hadKey = hasOwn$3(target2, key); + const oldValue2 = target2[key]; + const result = Reflect.deleteProperty(target2, key); if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue2); + trigger(target2, "delete", key, void 0, oldValue2); } return result; } - has(target, key) { - const result = Reflect.has(target, key); + has(target2, key) { + const result = Reflect.has(target2, key); if (!isSymbol$1(key) || !builtInSymbols.has(key)) { - track(target, "has", key); + track(target2, "has", key); } return result; } - ownKeys(target) { + ownKeys(target2) { track( - target, + target2, "iterate", - isArray$9(target) ? "length" : ITERATE_KEY + isArray$b(target2) ? "length" : ITERATE_KEY ); - return Reflect.ownKeys(target); + return Reflect.ownKeys(target2); } } class ReadonlyReactiveHandler extends BaseReactiveHandler { @@ -32423,20 +33499,20 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler { constructor(isShallow2 = false) { super(true, isShallow2); } - set(target, key) { + set(target2, key) { if (false) { warn$4( `Set operation on key "${String(key)}" failed: target is readonly.`, - target + target2 ); } return true; } - deleteProperty(target, key) { + deleteProperty(target2, key) { if (false) { warn$4( `Delete operation on key "${String(key)}" failed: target is readonly.`, - target + target2 ); } return true; @@ -32444,135 +33520,18 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler { } const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( - true -); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = /* @__PURE__ */ __name((value4) => value4, "toShallow"); const getProto = /* @__PURE__ */ __name((v2) => Reflect.getPrototypeOf(v2), "getProto"); -function get$3(target, key, isReadonly2 = false, isShallow2 = false) { - target = target["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has: has2 } = getProto(rawTarget); - const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1; - if (has2.call(rawTarget, key)) { - return wrap2(target.get(key)); - } else if (has2.call(rawTarget, rawKey)) { - return wrap2(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } -} -__name(get$3, "get$3"); -function has$1(key, isReadonly2 = false) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); -} -__name(has$1, "has$1"); -function size(target, isReadonly2 = false) { - target = target["__v_raw"]; - !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); -} -__name(size, "size"); -function add$1(value4) { - value4 = toRaw(value4); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value4); - if (!hadKey) { - target.add(value4); - trigger(target, "add", value4, value4); - } - return this; -} -__name(add$1, "add$1"); -function set$4(key, value4) { - value4 = toRaw(value4); - const target = toRaw(this); - const { has: has2, get: get22 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (false) { - checkIdentityKeys(target, has2, key); - } - const oldValue2 = get22.call(target, key); - target.set(key, value4); - if (!hadKey) { - trigger(target, "add", key, value4); - } else if (hasChanged(value4, oldValue2)) { - trigger(target, "set", key, value4, oldValue2); - } - return this; -} -__name(set$4, "set$4"); -function deleteEntry(key) { - const target = toRaw(this); - const { has: has2, get: get22 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (false) { - checkIdentityKeys(target, has2, key); - } - const oldValue2 = get22 ? get22.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue2); - } - return result; -} -__name(deleteEntry, "deleteEntry"); -function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = false ? isMap$3(target) ? new Map(target) : new Set(target) : void 0; - const result = target.clear(); - if (hadItems) { - trigger(target, "clear", void 0, void 0, oldTarget); - } - return result; -} -__name(clear, "clear"); -function createForEach(isReadonly2, isShallow2) { - return /* @__PURE__ */ __name(function forEach3(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1; - !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value4, key) => { - return callback.call(thisArg, wrap2(value4), wrap2(key), observed); - }); - }, "forEach"); -} -__name(createForEach, "createForEach"); function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); + const target2 = this["__v_raw"]; + const rawTarget = toRaw(target2); const targetIsMap = isMap$3(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); + const innerIterator = target2[method](...args); const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1; !isReadonly2 && track( rawTarget, @@ -32609,67 +33568,134 @@ function createReadonlyMethod(type) { }; } __name(createReadonlyMethod, "createReadonlyMethod"); -function createInstrumentations() { - const mutableInstrumentations2 = { +function createInstrumentations(readonly2, shallow) { + const instrumentations = { get(key) { - return get$3(this, key); + const target2 = this["__v_raw"]; + const rawTarget = toRaw(target2); + const rawKey = toRaw(key); + if (!readonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap2 = shallow ? toShallow : readonly2 ? toReadonly : toReactive$1; + if (has2.call(rawTarget, key)) { + return wrap2(target2.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap2(target2.get(rawKey)); + } else if (target2 !== rawTarget) { + target2.get(key); + } }, get size() { - return size(this); - }, - has: has$1, - add: add$1, - set: set$4, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations2 = { - get(key) { - return get$3(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add: add$1, - set: set$4, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations2 = { - get(key) { - return get$3(this, key, true); - }, - get size() { - return size(this, true); + const target2 = this["__v_raw"]; + !readonly2 && track(toRaw(target2), "iterate", ITERATE_KEY); + return Reflect.get(target2, "size", target2); }, has(key) { - return has$1.call(this, key, true); + const target2 = this["__v_raw"]; + const rawTarget = toRaw(target2); + const rawKey = toRaw(key); + if (!readonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target2.has(key) : target2.has(key) || target2.has(rawKey); }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations2 = { - get(key) { - return get$3(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, true) + forEach(callback, thisArg) { + const observed = this; + const target2 = observed["__v_raw"]; + const rawTarget = toRaw(target2); + const wrap2 = shallow ? toShallow : readonly2 ? toReadonly : toReactive$1; + !readonly2 && track(rawTarget, "iterate", ITERATE_KEY); + return target2.forEach((value4, key) => { + return callback.call(thisArg, wrap2(value4), wrap2(key), observed); + }); + } }; + extend$1( + instrumentations, + readonly2 ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value4) { + if (!shallow && !isShallow(value4) && !isReadonly(value4)) { + value4 = toRaw(value4); + } + const target2 = toRaw(this); + const proto = getProto(target2); + const hadKey = proto.has.call(target2, value4); + if (!hadKey) { + target2.add(value4); + trigger(target2, "add", value4, value4); + } + return this; + }, + set(key, value4) { + if (!shallow && !isShallow(value4) && !isReadonly(value4)) { + value4 = toRaw(value4); + } + const target2 = toRaw(this); + const { has: has2, get: get3 } = getProto(target2); + let hadKey = has2.call(target2, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target2, key); + } else if (false) { + checkIdentityKeys(target2, has2, key); + } + const oldValue2 = get3.call(target2, key); + target2.set(key, value4); + if (!hadKey) { + trigger(target2, "add", key, value4); + } else if (hasChanged(value4, oldValue2)) { + trigger(target2, "set", key, value4, oldValue2); + } + return this; + }, + delete(key) { + const target2 = toRaw(this); + const { has: has2, get: get3 } = getProto(target2); + let hadKey = has2.call(target2, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target2, key); + } else if (false) { + checkIdentityKeys(target2, has2, key); + } + const oldValue2 = get3 ? get3.call(target2, key) : void 0; + const result = target2.delete(key); + if (hadKey) { + trigger(target2, "delete", key, void 0, oldValue2); + } + return result; + }, + clear() { + const target2 = toRaw(this); + const hadItems = target2.size !== 0; + const oldTarget = false ? isMap$3(target2) ? new Map(target2) : new Set(target2) : void 0; + const result = target2.clear(); + if (hadItems) { + trigger( + target2, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); const iteratorMethods = [ "keys", "values", @@ -32677,41 +33703,23 @@ function createInstrumentations() { Symbol.iterator ]; iteratorMethods.forEach((method) => { - mutableInstrumentations2[method] = createIterableMethod(method, false, false); - readonlyInstrumentations2[method] = createIterableMethod(method, true, false); - shallowInstrumentations2[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations2[method] = createIterableMethod( - method, - true, - true - ); + instrumentations[method] = createIterableMethod(method, readonly2, shallow); }); - return [ - mutableInstrumentations2, - readonlyInstrumentations2, - shallowInstrumentations2, - shallowReadonlyInstrumentations2 - ]; + return instrumentations; } __name(createInstrumentations, "createInstrumentations"); -const [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations -] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; - return (target, key, receiver) => { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target2, key, receiver) => { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_raw") { - return target; + return target2; } return Reflect.get( - hasOwn$3(instrumentations, key) && key in target ? instrumentations : target, + hasOwn$3(instrumentations, key) && key in target2 ? instrumentations : target2, key, receiver ); @@ -32730,10 +33738,10 @@ const readonlyCollectionHandlers = { const shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has2, key) { +function checkIdentityKeys(target2, has2, key) { const rawKey = toRaw(key); - if (rawKey !== key && has2.call(target, rawKey)) { - const type = toRawType(target); + if (rawKey !== key && has2.call(target2, rawKey)) { + const type = toRawType(target2); warn$4( `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` ); @@ -32763,12 +33771,12 @@ function getTargetType(value4) { return value4["__v_skip"] || !Object.isExtensible(value4) ? 0 : targetTypeMap(toRawType(value4)); } __name(getTargetType, "getTargetType"); -function reactive(target) { - if (isReadonly(target)) { - return target; +function reactive(target2) { + if (isReadonly(target2)) { + return target2; } return createReactiveObject( - target, + target2, false, mutableHandlers, mutableCollectionHandlers, @@ -32776,9 +33784,9 @@ function reactive(target) { ); } __name(reactive, "reactive"); -function shallowReactive(target) { +function shallowReactive(target2) { return createReactiveObject( - target, + target2, false, shallowReactiveHandlers, shallowCollectionHandlers, @@ -32786,9 +33794,9 @@ function shallowReactive(target) { ); } __name(shallowReactive, "shallowReactive"); -function readonly(target) { +function readonly(target2) { return createReactiveObject( - target, + target2, true, readonlyHandlers, readonlyCollectionHandlers, @@ -32796,9 +33804,9 @@ function readonly(target) { ); } __name(readonly, "readonly"); -function shallowReadonly(target) { +function shallowReadonly(target2) { return createReactiveObject( - target, + target2, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, @@ -32806,33 +33814,33 @@ function shallowReadonly(target) { ); } __name(shallowReadonly, "shallowReadonly"); -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject$d(target)) { +function createReactiveObject(target2, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject$f(target2)) { if (false) { warn$4( `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target + target2 )}` ); } - return target; + return target2; } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; + if (target2["__v_raw"] && !(isReadonly2 && target2["__v_isReactive"])) { + return target2; } - const existingProxy = proxyMap.get(target); + const existingProxy = proxyMap.get(target2); if (existingProxy) { return existingProxy; } - const targetType = getTargetType(target); + const targetType = getTargetType(target2); if (targetType === 0) { - return target; + return target2; } const proxy = new Proxy( - target, + target2, targetType === 2 ? collectionHandlers : baseHandlers ); - proxyMap.set(target, proxy); + proxyMap.set(target2, proxy); return proxy; } __name(createReactiveObject, "createReactiveObject"); @@ -32861,124 +33869,16 @@ function toRaw(observed) { } __name(toRaw, "toRaw"); function markRaw(value4) { - if (Object.isExtensible(value4)) { + if (!hasOwn$3(value4, "__v_skip") && Object.isExtensible(value4)) { def(value4, "__v_skip", true); } return value4; } __name(markRaw, "markRaw"); -const toReactive$1 = /* @__PURE__ */ __name((value4) => isObject$d(value4) ? reactive(value4) : value4, "toReactive$1"); -const toReadonly = /* @__PURE__ */ __name((value4) => isObject$d(value4) ? readonly(value4) : value4, "toReadonly"); -const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; -class ComputedRefImpl { - static { - __name(this, "ComputedRefImpl"); - } - constructor(getter, _setter, isReadonly2, isSSR) { - this.getter = getter; - this._setter = _setter; - this.dep = void 0; - this.__v_isRef = true; - this["__v_isReadonly"] = false; - this.effect = new ReactiveEffect( - () => getter(this._value), - () => triggerRefValue( - this, - this.effect._dirtyLevel === 2 ? 2 : 3 - ) - ); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly"] = isReadonly2; - } - get value() { - const self2 = toRaw(this); - if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) { - triggerRefValue(self2, 4); - } - trackRefValue(self2); - if (self2.effect._dirtyLevel >= 2) { - if (false) { - warn$4(COMPUTED_SIDE_EFFECT_WARN, ` - -getter: `, this.getter); - } - triggerRefValue(self2, 2); - } - return self2._value; - } - set value(newValue2) { - this._setter(newValue2); - } - // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x - get _dirty() { - return this.effect.dirty; - } - set _dirty(v2) { - this.effect.dirty = v2; - } - // #endregion -} -function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction$8(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = false ? () => { - warn$4("Write operation failed: computed value is readonly"); - } : NOOP; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (false) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; -} -__name(computed$1, "computed$1"); -function trackRefValue(ref2) { - var _a2; - if (shouldTrack && activeEffect) { - ref2 = toRaw(ref2); - trackEffect( - activeEffect, - (_a2 = ref2.dep) != null ? _a2 : ref2.dep = createDep( - () => ref2.dep = void 0, - ref2 instanceof ComputedRefImpl ? ref2 : void 0 - ), - false ? { - target: ref2, - type: "get", - key: "value" - } : void 0 - ); - } -} -__name(trackRefValue, "trackRefValue"); -function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) { - ref2 = toRaw(ref2); - const dep = ref2.dep; - if (dep) { - triggerEffects( - dep, - dirtyLevel, - false ? { - target: ref2, - type: "set", - key: "value", - newValue: newVal, - oldValue: oldVal - } : void 0 - ); - } -} -__name(triggerRefValue, "triggerRefValue"); +const toReactive$1 = /* @__PURE__ */ __name((value4) => isObject$f(value4) ? reactive(value4) : value4, "toReactive$1"); +const toReadonly = /* @__PURE__ */ __name((value4) => isObject$f(value4) ? readonly(value4) : value4, "toReadonly"); function isRef(r2) { - return !!(r2 && r2.__v_isRef === true); + return r2 ? r2["__v_isRef"] === true : false; } __name(isRef, "isRef"); function ref(value4) { @@ -33000,49 +33900,79 @@ class RefImpl { static { __name(this, "RefImpl"); } - constructor(value4, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = void 0; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value4 : toRaw(value4); - this._value = __v_isShallow ? value4 : toReactive$1(value4); + constructor(value4, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value4 : toRaw(value4); + this._value = isShallow2 ? value4 : toReactive$1(value4); + this["__v_isShallow"] = isShallow2; } get value() { - trackRefValue(this); + if (false) { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } else { + this.dep.track(); + } return this._value; } - set value(newVal) { - const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); - newVal = useDirectValue ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - const oldVal = this._rawValue; - this._rawValue = newVal; - this._value = useDirectValue ? newVal : toReactive$1(newVal); - triggerRefValue(this, 4, newVal, oldVal); + set value(newValue2) { + const oldValue2 = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue2) || isReadonly(newValue2); + newValue2 = useDirectValue ? newValue2 : toRaw(newValue2); + if (hasChanged(newValue2, oldValue2)) { + this._rawValue = newValue2; + this._value = useDirectValue ? newValue2 : toReactive$1(newValue2); + if (false) { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue: newValue2, + oldValue: oldValue2 + }); + } else { + this.dep.trigger(); + } } } } function triggerRef(ref2) { - triggerRefValue(ref2, 4, false ? ref2.value : void 0); + if (ref2.dep) { + if (false) { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } else { + ref2.dep.trigger(); + } + } } __name(triggerRef, "triggerRef"); function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; } __name(unref, "unref"); -function toValue$1(source) { - return isFunction$8(source) ? source() : unref(source); +function toValue$4(source) { + return isFunction$c(source) ? source() : unref(source); } -__name(toValue$1, "toValue$1"); +__name(toValue$4, "toValue$4"); const shallowUnwrapHandlers = { - get: /* @__PURE__ */ __name((target, key, receiver) => unref(Reflect.get(target, key, receiver)), "get"), - set: /* @__PURE__ */ __name((target, key, value4, receiver) => { - const oldValue2 = target[key]; + get: /* @__PURE__ */ __name((target2, key, receiver) => key === "__v_raw" ? target2 : unref(Reflect.get(target2, key, receiver)), "get"), + set: /* @__PURE__ */ __name((target2, key, value4, receiver) => { + const oldValue2 = target2[key]; if (isRef(oldValue2) && !isRef(value4)) { oldValue2.value = value4; return true; } else { - return Reflect.set(target, key, value4, receiver); + return Reflect.set(target2, key, value4, receiver); } }, "set") }; @@ -33055,17 +33985,15 @@ class CustomRefImpl { __name(this, "CustomRefImpl"); } constructor(factory) { - this.dep = void 0; - this.__v_isRef = true; - const { get: get22, set: set22 } = factory( - () => trackRefValue(this), - () => triggerRefValue(this) - ); - this._get = get22; - this._set = set22; + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get: get3, set: set3 } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get3; + this._set = set3; } get value() { - return this._get(); + return this._value = this._get(); } set value(newVal) { this._set(newVal); @@ -33079,7 +34007,7 @@ function toRefs$1(object) { if (false) { warn$4(`toRefs() expects a reactive object but received a plain one.`); } - const ret = isArray$9(object) ? new Array(object.length) : {}; + const ret = isArray$b(object) ? new Array(object.length) : {}; for (const key in object) { ret[key] = propertyToRef(object, key); } @@ -33094,11 +34022,12 @@ class ObjectRefImpl { this._object = _object; this._key = _key; this._defaultValue = _defaultValue; - this.__v_isRef = true; + this["__v_isRef"] = true; + this._value = void 0; } get value() { const val = this._object[this._key]; - return val === void 0 ? this._defaultValue : val; + return this._value = val === void 0 ? this._defaultValue : val; } set value(newVal) { this._object[this._key] = newVal; @@ -33113,31 +34042,98 @@ class GetterRefImpl { } constructor(_getter) { this._getter = _getter; - this.__v_isRef = true; - this.__v_isReadonly = true; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; } get value() { - return this._getter(); + return this._value = this._getter(); } } -function toRef$1(source, key, defaultValue) { +function toRef$1(source, key, defaultValue2) { if (isRef(source)) { return source; - } else if (isFunction$8(source)) { + } else if (isFunction$c(source)) { return new GetterRefImpl(source); - } else if (isObject$d(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); + } else if (isObject$f(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue2); } else { return ref(source); } } __name(toRef$1, "toRef$1"); -function propertyToRef(source, key, defaultValue) { +function propertyToRef(source, key, defaultValue2) { const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue2); } __name(propertyToRef, "propertyToRef"); -const deferredComputed = computed$1; +class ComputedRefImpl { + static { + __name(this, "ComputedRefImpl"); + } + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + this._value = void 0; + this.dep = new Dep(this); + this.__v_isRef = true; + this.deps = void 0; + this.depsTail = void 0; + this.flags = 16; + this.globalVersion = globalVersion - 1; + this.next = void 0; + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } else if (false) ; + } + get value() { + const link2 = false ? this.dep.track({ + target: this, + type: "get", + key: "value" + }) : this.dep.track(); + refreshComputed(this); + if (link2) { + link2.version = this.dep.version; + } + return this._value; + } + set value(newValue2) { + if (this.setter) { + this.setter(newValue2); + } else if (false) { + warn$4("Write operation failed: computed value is readonly"); + } + } +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction$c(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (false) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} +__name(computed$1, "computed$1"); const TrackOpTypes = { "GET": "get", "HAS": "has", @@ -33154,10 +34150,226 @@ const ReactiveFlags = { "IS_REACTIVE": "__v_isReactive", "IS_READONLY": "__v_isReadonly", "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw" + "RAW": "__v_raw", + "IS_REF": "__v_isRef" }; +const WatchErrorCodes = { + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP" +}; +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +__name(getCurrentWatcher, "getCurrentWatcher"); +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (false) { + warn$4( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +__name(onWatcherCleanup, "onWatcherCleanup"); +function watch$1(source, cb, options4 = EMPTY_OBJ) { + const { immediate, deep, once: once2, scheduler, augmentJob, call } = options4; + const warnInvalidSource = /* @__PURE__ */ __name((s2) => { + (options4.onWarn || warn$4)( + `Invalid watch source: `, + s2, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }, "warnInvalidSource"); + const reactiveGetter = /* @__PURE__ */ __name((source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }, "reactiveGetter"); + let effect2; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = /* @__PURE__ */ __name(() => source.value, "getter"); + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = /* @__PURE__ */ __name(() => reactiveGetter(source), "getter"); + forceTrigger = true; + } else if (isArray$b(source)) { + isMultiSource = true; + forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2)); + getter = /* @__PURE__ */ __name(() => source.map((s2) => { + if (isRef(s2)) { + return s2.value; + } else if (isReactive(s2)) { + return reactiveGetter(s2); + } else if (isFunction$c(s2)) { + return call ? call(s2, 2) : s2(); + } else { + } + }), "getter"); + } else if (isFunction$c(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = /* @__PURE__ */ __name(() => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect2; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }, "getter"); + } + } else { + getter = NOOP; + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = /* @__PURE__ */ __name(() => traverse(baseGetter(), depth), "getter"); + } + const scope = getCurrentScope(); + const watchHandle = /* @__PURE__ */ __name(() => { + effect2.stop(); + if (scope && scope.active) { + remove$2(scope.effects, effect2); + } + }, "watchHandle"); + if (once2 && cb) { + const _cb = cb; + cb = /* @__PURE__ */ __name((...args) => { + _cb(...args); + watchHandle(); + }, "cb"); + } + let oldValue2 = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = /* @__PURE__ */ __name((immediateFirstRun) => { + if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue2 = effect2.run(); + if (deep || forceTrigger || (isMultiSource ? newValue2.some((v2, i2) => hasChanged(v2, oldValue2[i2])) : hasChanged(newValue2, oldValue2))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect2; + try { + const args = [ + newValue2, + // pass undefined as the old value when it's changed for the first time + oldValue2 === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue2[0] === INITIAL_WATCHER_VALUE ? [] : oldValue2, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue2 = newValue2; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect2.run(); + } + }, "job"); + if (augmentJob) { + augmentJob(job); + } + effect2 = new ReactiveEffect(getter); + effect2.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = /* @__PURE__ */ __name((fn) => onWatcherCleanup(fn, false, effect2), "boundCleanup"); + cleanup = effect2.onStop = () => { + const cleanups = cleanupMap.get(effect2); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect2); + } + }; + if (false) { + effect2.onTrack = options4.onTrack; + effect2.onTrigger = options4.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue2 = effect2.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect2.run(); + } + watchHandle.pause = effect2.pause.bind(effect2); + watchHandle.resume = effect2.resume.bind(effect2); + watchHandle.stop = watchHandle; + return watchHandle; +} +__name(watch$1, "watch$1"); +function traverse(value4, depth = Infinity, seen2) { + if (depth <= 0 || !isObject$f(value4) || value4["__v_skip"]) { + return value4; + } + seen2 = seen2 || /* @__PURE__ */ new Set(); + if (seen2.has(value4)) { + return value4; + } + seen2.add(value4); + depth--; + if (isRef(value4)) { + traverse(value4.value, depth, seen2); + } else if (isArray$b(value4)) { + for (let i2 = 0; i2 < value4.length; i2++) { + traverse(value4[i2], depth, seen2); + } + } else if (isSet$3(value4) || isMap$3(value4)) { + value4.forEach((v2) => { + traverse(v2, depth, seen2); + }); + } else if (isPlainObject$4(value4)) { + for (const key in value4) { + traverse(value4[key], depth, seen2); + } + for (const key of Object.getOwnPropertySymbols(value4)) { + if (Object.prototype.propertyIsEnumerable.call(value4, key)) { + traverse(value4[key], depth, seen2); + } + } + } + return value4; +} +__name(traverse, "traverse"); /** -* @vue/runtime-core v3.4.31 +* @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ @@ -33170,7 +34382,10 @@ function popWarningContext() { stack.pop(); } __name(popWarningContext, "popWarningContext"); +let isWarning = false; function warn$1$1(msg, ...args) { + if (isWarning) return; + isWarning = true; pauseTracking(); const instance = stack.length ? stack[stack.length - 1].component : null; const appWarnHandler = instance && instance.appContext.config.warnHandler; @@ -33203,6 +34418,7 @@ function warn$1$1(msg, ...args) { console.warn(...warnArgs); } resetTracking(); + isWarning = false; } __name(warn$1$1, "warn$1$1"); function getComponentTrace() { @@ -33261,7 +34477,7 @@ function formatProps(props) { } __name(formatProps, "formatProps"); function formatProp(key, value4, raw) { - if (isString$7(value4)) { + if (isString$9(value4)) { value4 = JSON.stringify(value4); return raw ? value4 : [`${key}=${value4}`]; } else if (typeof value4 === "number" || typeof value4 === "boolean" || value4 == null) { @@ -33269,7 +34485,7 @@ function formatProp(key, value4, raw) { } else if (isRef(value4)) { value4 = formatProp(key, toRaw(value4.value), true); return raw ? value4 : [`${key}=Ref<`, value4, `>`]; - } else if (isFunction$8(value4)) { + } else if (isFunction$c(value4)) { return [`${key}=fn${value4.name ? `<${value4.name}>` : ``}`]; } else { value4 = toRaw(value4); @@ -33293,12 +34509,6 @@ const ErrorCodes = { "0": "SETUP_FUNCTION", "RENDER_FUNCTION": 1, "1": "RENDER_FUNCTION", - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP", "NATIVE_EVENT_HANDLER": 5, "5": "NATIVE_EVENT_HANDLER", "COMPONENT_EVENT_HANDLER": 6, @@ -33318,7 +34528,11 @@ const ErrorCodes = { "ASYNC_COMPONENT_LOADER": 13, "13": "ASYNC_COMPONENT_LOADER", "SCHEDULER": 14, - "14": "SCHEDULER" + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" }; const ErrorTypeStrings$1 = { ["sp"]: "serverPrefetch hook", @@ -33349,7 +34563,9 @@ const ErrorTypeStrings$1 = { [11]: "app warnHandler", [12]: "ref function", [13]: "async component loader", - [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" }; function callWithErrorHandling(fn, instance, type, args) { try { @@ -33360,7 +34576,7 @@ function callWithErrorHandling(fn, instance, type, args) { } __name(callWithErrorHandling, "callWithErrorHandling"); function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction$8(fn)) { + if (isFunction$c(fn)) { const res = callWithErrorHandling(fn, instance, type, args); if (res && isPromise$1(res)) { res.catch((err) => { @@ -33369,7 +34585,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) { } return res; } - if (isArray$9(fn)) { + if (isArray$b(fn)) { const values = []; for (let i2 = 0; i2 < fn.length; i2++) { values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args)); @@ -33384,6 +34600,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) { __name(callWithAsyncErrorHandling, "callWithAsyncErrorHandling"); function handleError(err, instance, type, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; + const { errorHandler: errorHandler2, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; @@ -33399,23 +34616,21 @@ function handleError(err, instance, type, throwInDev = true) { } cur = cur.parent; } - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { + if (errorHandler2) { pauseTracking(); - callWithErrorHandling( - appErrorHandler, - null, - 10, - [err, exposedInstance, errorInfo] - ); + callWithErrorHandling(errorHandler2, null, 10, [ + err, + exposedInstance, + errorInfo + ]); resetTracking(); return; } } - logError(err, type, contextVNode, throwInDev); + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); } __name(handleError, "handleError"); -function logError(err, type, contextVNode, throwInDev = true) { +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { if (false) { const info = ErrorTypeStrings$1[type]; if (contextVNode) { @@ -33430,15 +34645,15 @@ function logError(err, type, contextVNode, throwInDev = true) { } else { console.error(err); } + } else if (throwInProd) { + throw err; } else { console.error(err); } } __name(logError, "logError"); -let isFlushing = false; -let isFlushPending = false; const queue = []; -let flushIndex = 0; +let flushIndex = -1; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; @@ -33457,7 +34672,7 @@ function findInsertionIndex$1(id3) { const middle = start2 + end >>> 1; const middleJob = queue[middle]; const middleJobId = getId(middleJob); - if (middleJobId < id3 || middleJobId === id3 && middleJob.pre) { + if (middleJobId < id3 || middleJobId === id3 && middleJob.flags & 2) { start2 = middle + 1; } else { end = middle; @@ -33467,40 +34682,33 @@ function findInsertionIndex$1(id3) { } __name(findInsertionIndex$1, "findInsertionIndex$1"); function queueJob(job) { - if (!queue.length || !queue.includes( - job, - isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex - )) { - if (job.id == null) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { queue.push(job); } else { - queue.splice(findInsertionIndex$1(job.id), 0, job); + queue.splice(findInsertionIndex$1(jobId), 0, job); } + job.flags |= 1; queueFlush(); } } __name(queueJob, "queueJob"); function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; + if (!currentFlushPromise) { currentFlushPromise = resolvedPromise.then(flushJobs); } } __name(queueFlush, "queueFlush"); -function invalidateJob(job) { - const i2 = queue.indexOf(job); - if (i2 > flushIndex) { - queue.splice(i2, 1); - } -} -__name(invalidateJob, "invalidateJob"); function queuePostFlushCb(cb) { - if (!isArray$9(cb)) { - if (!activePostFlushCbs || !activePostFlushCbs.includes( - cb, - cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex - )) { + if (!isArray$b(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { pendingPostFlushCbs.push(cb); + cb.flags |= 1; } } else { pendingPostFlushCbs.push(...cb); @@ -33508,13 +34716,13 @@ function queuePostFlushCb(cb) { queueFlush(); } __name(queuePostFlushCb, "queuePostFlushCb"); -function flushPreFlushCbs(instance, seen2, i2 = isFlushing ? flushIndex + 1 : 0) { +function flushPreFlushCbs(instance, seen2, i2 = flushIndex + 1) { if (false) { seen2 = seen2 || /* @__PURE__ */ new Map(); } for (; i2 < queue.length; i2++) { const cb = queue[i2]; - if (cb && cb.pre) { + if (cb && cb.flags & 2) { if (instance && cb.id !== instance.uid) { continue; } @@ -33523,7 +34731,13 @@ function flushPreFlushCbs(instance, seen2, i2 = isFlushing ? flushIndex + 1 : 0) } queue.splice(i2, 1); i2--; + if (cb.flags & 4) { + cb.flags &= ~1; + } cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } } } } @@ -33547,45 +34761,53 @@ function flushPostFlushCbs(seen2) { if (false) { continue; } - if (cb.active !== false) cb(); + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; } activePostFlushCbs = null; postFlushIndex = 0; } } __name(flushPostFlushCbs, "flushPostFlushCbs"); -const getId = /* @__PURE__ */ __name((job) => job.id == null ? Infinity : job.id, "getId"); -const comparator = /* @__PURE__ */ __name((a2, b2) => { - const diff2 = getId(a2) - getId(b2); - if (diff2 === 0) { - if (a2.pre && !b2.pre) return -1; - if (b2.pre && !a2.pre) return 1; - } - return diff2; -}, "comparator"); +const getId = /* @__PURE__ */ __name((job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id, "getId"); function flushJobs(seen2) { - isFlushPending = false; - isFlushing = true; if (false) { seen2 = seen2 || /* @__PURE__ */ new Map(); } - queue.sort(comparator); const check = false ? (job) => checkRecursiveUpdates(seen2, job) : NOOP; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; - if (job && job.active !== false) { + if (job && !(job.flags & 8)) { if (false) { continue; } - callWithErrorHandling(job, null, 14); + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } } } } finally { - flushIndex = 0; + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; queue.length = 0; flushPostFlushCbs(seen2); - isFlushing = false; currentFlushPromise = null; if (queue.length || pendingPostFlushCbs.length) { flushJobs(seen2); @@ -33594,27 +34816,23 @@ function flushJobs(seen2) { } __name(flushJobs, "flushJobs"); function checkRecursiveUpdates(seen2, fn) { - if (!seen2.has(fn)) { - seen2.set(fn, 1); - } else { - const count = seen2.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } else { - seen2.set(fn, count + 1); - } + const count = seen2.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; } + seen2.set(fn, count + 1); + return false; } __name(checkRecursiveUpdates, "checkRecursiveUpdates"); let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Set(); +const hmrDirtyComponents = /* @__PURE__ */ new Map(); if (false) { getGlobalThis$1().__VUE_HMR_RUNTIME__ = { createRecord: tryWrap(createRecord), @@ -33665,7 +34883,6 @@ function rerender(id3, newRender) { } instance.renderCache = []; isHmrUpdating = true; - instance.effect.dirty = true; instance.update(); isHmrUpdating = false; }); @@ -33677,26 +34894,30 @@ function reload(id3, newComp) { newComp = normalizeClassComponent(newComp); updateComponentDef(record2.initialDef, newComp); const instances = [...record2.instances]; - for (const instance of instances) { + for (let i2 = 0; i2 < instances.length; i2++) { + const instance = instances[i2]; const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { if (oldComp !== record2.initialDef) { updateComponentDef(oldComp, newComp); } - hmrDirtyComponents.add(oldComp); + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); } + dirtyInstances.add(instance); instance.appContext.propsCache.delete(instance.type); instance.appContext.emitsCache.delete(instance.type); instance.appContext.optionsCache.delete(instance.type); if (instance.ceReload) { - hmrDirtyComponents.add(oldComp); + dirtyInstances.add(instance); instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); + dirtyInstances.delete(instance); } else if (instance.parent) { - instance.parent.effect.dirty = true; queueJob(() => { + isHmrUpdating = true; instance.parent.update(); - hmrDirtyComponents.delete(oldComp); + isHmrUpdating = false; + dirtyInstances.delete(instance); }); } else if (instance.appContext.reload) { instance.appContext.reload(); @@ -33707,13 +34928,12 @@ function reload(id3, newComp) { "[HMR] Root or manually mounted instance modified. Full reload required." ); } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } } queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete( - normalizeClassComponent(instance.type) - ); - } + hmrDirtyComponents.clear(); }); } __name(reload, "reload"); @@ -33750,7 +34970,7 @@ function emit$1(event, ...args) { } } __name(emit$1, "emit$1"); -function setDevtoolsHook$1(hook, target) { +function setDevtoolsHook$1(hook, target2) { var _a2, _b; devtools$1 = hook; if (devtools$1) { @@ -33766,13 +34986,13 @@ function setDevtoolsHook$1(hook, target) { // eslint-disable-next-line no-restricted-syntax !((_b = (_a2 = window.navigator) == null ? void 0 : _a2.userAgent) == null ? void 0 : _b.includes("jsdom")) ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + const replay = target2.__VUE_DEVTOOLS_HOOK_REPLAY__ = target2.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); + setDevtoolsHook$1(newHook, target2); }); setTimeout(() => { if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + target2.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; } @@ -33852,146 +35072,6 @@ function devtoolsComponentEmit(component, event, params) { ); } __name(devtoolsComponentEmit, "devtoolsComponentEmit"); -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - if (false) { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` - ); - } - } else { - const validator3 = emitsOptions[event]; - if (isFunction$8(validator3)) { - const isValid2 = validator3(...rawArgs); - if (!isValid2) { - warn$1$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener2 = event.startsWith("update:"); - const modelArg = isModelListener2 && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number: number2, trim: trim2 } = props[modifiersKey] || EMPTY_OBJ; - if (trim2) { - args = rawArgs.map((a2) => isString$7(a2) ? a2.trim() : a2); - } - if (number2) { - args = rawArgs.map(looseToNumber); - } - } - if (false) { - devtoolsComponentEmit(instance, event, args); - } - if (false) { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler6 = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize$1(event))]; - if (!handler6 && isModelListener2) { - handler6 = props[handlerName = toHandlerKey(hyphenate$1(event))]; - } - if (handler6) { - callWithAsyncErrorHandling( - handler6, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -__name(emit, "emit"); -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache2 = appContext.emitsCache; - const cached = cache2.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction$8(comp)) { - const extendEmits = /* @__PURE__ */ __name((raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend$1(normalized, normalizedFromExtend); - } - }, "extendEmits"); - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject$d(comp)) { - cache2.set(comp, null); - } - return null; - } - if (isArray$9(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend$1(normalized, raw); - } - if (isObject$d(comp)) { - cache2.set(comp, normalized); - } - return normalized; -} -__name(normalizeEmitsOptions, "normalizeEmitsOptions"); -function isEmitListener(options4, key) { - if (!options4 || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn$3(options4, key[0].toLowerCase() + key.slice(1)) || hasOwn$3(options4, hyphenate$1(key)) || hasOwn$3(options4, key); -} -__name(isEmitListener, "isEmitListener"); let currentRenderingInstance = null; let currentScopeId = null; function setCurrentRenderingInstance(instance) { @@ -34040,1008 +35120,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { return renderFnWithContext; } __name(withCtx, "withCtx"); -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -__name(markAttrsAccessed, "markAttrsAccessed"); -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs: attrs4, - emit: emit2, - render: render2, - renderCache, - props, - data: data25, - setupState, - ctx, - inheritAttrs - } = instance; - const prev2 = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - if (false) { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = false ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render2.call( - thisProxy, - proxyToUse, - renderCache, - false ? shallowReadonly(props) : props, - setupState, - data25, - ctx - ) - ); - fallthroughAttrs = attrs4; - } else { - const render22 = Component; - if (false) { - markAttrsAccessed(); - } - result = normalizeVNode( - render22.length > 1 ? render22( - false ? shallowReadonly(props) : props, - false ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs4); - }, - slots, - emit: emit2 - } : { attrs: attrs4, slots, emit: emit2 } - ) : render22( - false ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs4 : getFunctionalFallthrough(attrs4); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root27 = result; - let setRoot = void 0; - if (false) { - [root27, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys2 = Object.keys(fallthroughAttrs); - const { shapeFlag } = root27; - if (keys2.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys2.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root27 = cloneVNode(root27, fallthroughAttrs, false, true); - } else if (false) { - const allAttrs = Object.keys(attrs4); - const eventAttrs = []; - const extraAttrs = []; - for (let i2 = 0, l2 = allAttrs.length; i2 < l2; i2++) { - const key = allAttrs[i2]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` - ); - } - if (eventAttrs.length) { - warn$1$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (false) { - warn$1$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root27 = cloneVNode(root27, null, false, true); - root27.dirs = root27.dirs ? root27.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (false) { - warn$1$1( - `Component inside renders non-element root node that cannot be animated.` - ); - } - root27.transition = vnode.transition; - } - if (false) { - setRoot(root27); - } else { - result = root27; - } - setCurrentRenderingInstance(prev2); - return result; -} -__name(renderComponentRoot, "renderComponentRoot"); -const getChildRoot = /* @__PURE__ */ __name((vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (false) { - return getChildRoot(childRoot); - } - const index2 = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = /* @__PURE__ */ __name((updatedRoot) => { - rawChildren[index2] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }, "setRoot"); - return [normalizeVNode(childRoot), setRoot]; -}, "getChildRoot"); -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i2 = 0; i2 < children.length; i2++) { - const child = children[i2]; - if (isVNode$1(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (false) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -__name(filterSingleRoot, "filterSingleRoot"); -const getFunctionalFallthrough = /* @__PURE__ */ __name((attrs4) => { - let res; - for (const key in attrs4) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs4[key]; - } - } - return res; -}, "getFunctionalFallthrough"); -const filterModelListeners = /* @__PURE__ */ __name((attrs4, props) => { - const res = {}; - for (const key in attrs4) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs4[key]; - } - } - return res; -}, "filterModelListeners"); -const isElementRoot = /* @__PURE__ */ __name((vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}, "isElementRoot"); -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if (false) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i2 = 0; i2 < dynamicProps.length; i2++) { - const key = dynamicProps[i2]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -__name(shouldUpdateComponent, "shouldUpdateComponent"); -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i2 = 0; i2 < nextKeys.length; i2++) { - const key = nextKeys[i2]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -__name(hasPropsChanged, "hasPropsChanged"); -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root27 = parent.subTree; - if (root27.suspense && root27.suspense.activeBranch === vnode) { - root27.el = vnode.el; - } - if (root27 === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} -__name(updateHOCHostEl, "updateHOCHostEl"); -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name2, maybeSelfReference) { - return resolveAsset(COMPONENTS, name2, true, maybeSelfReference) || name2; -} -__name(resolveComponent, "resolveComponent"); -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString$7(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -__name(resolveDynamicComponent, "resolveDynamicComponent"); -function resolveDirective(name2) { - return resolveAsset(DIRECTIVES, name2); -} -__name(resolveDirective, "resolveDirective"); -function resolveAsset(type, name2, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name2 || selfName === camelize$1(name2) || selfName === capitalize$1(camelize$1(name2)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name2) || // global registration - resolve(instance.appContext[type], name2) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (false) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1$1(`Failed to resolve ${type.slice(0, -1)}: ${name2}${extra}`); - } - return res; - } else if (false) { - warn$1$1( - `resolve${capitalize$1(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -__name(resolveAsset, "resolveAsset"); -function resolve(registry, name2) { - return registry && (registry[name2] || registry[camelize$1(name2)] || registry[capitalize$1(camelize$1(name2))]); -} -__name(resolve, "resolve"); -const isSuspense = /* @__PURE__ */ __name((type) => type.__isSuspense, "isSuspense"); -let suspenseId = 0; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl; -function triggerEvent(vnode, name2) { - const eventListener = vnode.props && vnode.props[name2]; - if (isFunction$8(eventListener)) { - eventListener(); - } -} -__name(triggerEvent, "triggerEvent"); -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch2, - o: { createElement: createElement2 } - } = rendererInternals; - const hiddenContainer = createElement2("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch2( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch2( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -__name(mountSuspense, "mountSuspense"); -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch2, um: unmount, o: { createElement: createElement2 } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch2( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch2( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement2("div"); - if (isInFallback) { - patch2( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch2( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch2( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch2( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch2( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch2( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -__name(patchSuspense, "patchSuspense"); -let hasWarned$1 = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (false) { - hasWarned$1 = true; - console[console.info ? "info" : "log"]( - ` is an experimental feature and its API will likely change.` - ); - } - const { - p: patch2, - m: move, - um: unmount, - n: next2, - o: { parentNode: parentNode2, remove: remove22 } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - if (false) { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - if (false) { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next2(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode2(activeBranch.el) !== suspense.hiddenContainer) { - anchor = next2(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next2(activeBranch); - const mountFallback = /* @__PURE__ */ __name(() => { - if (!suspense.isInFallback) { - return; - } - patch2( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }, "mountFallback"); - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next2(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - if (false) { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode2(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next2(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove22(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - if (false) { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -__name(createSuspenseBoundary, "createSuspenseBoundary"); -function hydrateSuspense(node3, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node3.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node3, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -__name(hydrateSuspense, "hydrateSuspense"); -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -__name(normalizeSuspenseChildren, "normalizeSuspenseChildren"); -function normalizeSuspenseSlot(s2) { - let block3; - if (isFunction$8(s2)) { - const trackBlock = isBlockTreeEnabled && s2._c; - if (trackBlock) { - s2._d = false; - openBlock(); - } - s2 = s2(); - if (trackBlock) { - s2._d = true; - block3 = currentBlock; - closeBlock(); - } - } - if (isArray$9(s2)) { - const singleChild = filterSingleRoot(s2); - if (false) { - warn$1$1(` slots expect a single root node.`); - } - s2 = singleChild; - } - s2 = normalizeVNode(s2); - if (block3 && !s2.dynamicChildren) { - s2.dynamicChildren = block3.filter((c2) => c2 !== s2); - } - return s2; -} -__name(normalizeSuspenseSlot, "normalizeSuspenseSlot"); -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray$9(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -__name(queueEffectWithSuspense, "queueEffectWithSuspense"); -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -__name(setActiveBranch, "setActiveBranch"); -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} -__name(isVNodeSuspensible, "isVNodeSuspensible"); -function injectHook(type, hook, target = currentInstance, prepend2 = false) { - if (target) { - const hooks2 = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset2 = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset2(); - resetTracking(); - return res; - }); - if (prepend2) { - hooks2.unshift(wrappedHook); - } else { - hooks2.push(wrappedHook); - } - return wrappedHook; - } else if (false) { - const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` - ); - } -} -__name(injectHook, "injectHook"); -const createHook = /* @__PURE__ */ __name((lifecycle2) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle2 === "sp") { - injectHook(lifecycle2, (...args) => hook(...args), target); - } -}, "createHook"); -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook("bu"); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook("bum"); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook("sp"); -const onRenderTriggered = createHook( - "rtg" -); -const onRenderTracked = createHook( - "rtc" -); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} -__name(onErrorCaptured, "onErrorCaptured"); function validateDirectiveName(name2) { if (isBuiltInDirective(name2)) { warn$1$1("Do not use built-in directive ids as custom directive id: " + name2); @@ -35057,7 +35135,7 @@ function withDirectives(vnode, directives) { for (let i2 = 0; i2 < directives.length; i2++) { let [dir, value4, arg, modifiers2 = EMPTY_OBJ] = directives[i2]; if (dir) { - if (isFunction$8(dir)) { + if (isFunction$c(dir)) { dir = { mounted: dir, updated: dir @@ -35101,1820 +35179,780 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name2) { } } __name(invokeDirectiveHook, "invokeDirectiveHook"); -function renderList(source, renderItem, cache2, index2) { - let ret; - const cached = cache2 && cache2[index2]; - if (isArray$9(source) || isString$7(source)) { - ret = new Array(source.length); - for (let i2 = 0, l2 = source.length; i2 < l2; i2++) { - ret[i2] = renderItem(source[i2], i2, void 0, cached && cached[i2]); - } - } else if (typeof source === "number") { - if (false) { - warn$1$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i2 = 0; i2 < source; i2++) { - ret[i2] = renderItem(i2 + 1, i2, void 0, cached && cached[i2]); - } - } else if (isObject$d(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item3, i2) => renderItem(item3, i2, void 0, cached && cached[i2]) - ); +const TeleportEndKey = Symbol("_vte"); +const isTeleport = /* @__PURE__ */ __name((type) => type.__isTeleport, "isTeleport"); +const isTeleportDisabled = /* @__PURE__ */ __name((props) => props && (props.disabled || props.disabled === ""), "isTeleportDisabled"); +const isTeleportDeferred = /* @__PURE__ */ __name((props) => props && (props.defer || props.defer === ""), "isTeleportDeferred"); +const isTargetSVG = /* @__PURE__ */ __name((target2) => typeof SVGElement !== "undefined" && target2 instanceof SVGElement, "isTargetSVG"); +const isTargetMathML = /* @__PURE__ */ __name((target2) => typeof MathMLElement === "function" && target2 instanceof MathMLElement, "isTargetMathML"); +const resolveTarget = /* @__PURE__ */ __name((props, select) => { + const targetSelector = props && props.to; + if (isString$9(targetSelector)) { + if (!select) { + return null; } else { - const keys2 = Object.keys(source); - ret = new Array(keys2.length); - for (let i2 = 0, l2 = keys2.length; i2 < l2; i2++) { - const key = keys2[i2]; - ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]); + const target2 = select(targetSelector); + if (false) { + warn$1$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); } + return target2; } } else { - ret = []; + if (false) { + warn$1$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; } - if (cache2) { - cache2[index2] = ret; +}, "resolveTarget"); +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert: insert2, querySelector, createText, createComment } + } = internals; + const disabled2 = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (false) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = false ? createComment("teleport start") : createText(""); + const mainAnchor = n2.anchor = false ? createComment("teleport end") : createText(""); + insert2(placeholder, container, anchor); + insert2(mainAnchor, container, anchor); + const mount2 = /* @__PURE__ */ __name((container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }, "mount"); + const mountToTarget = /* @__PURE__ */ __name(() => { + const target2 = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target2, n2, createText, insert2); + if (target2) { + if (namespace !== "svg" && isTargetSVG(target2)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target2)) { + namespace = "mathml"; + } + if (!disabled2) { + mount2(target2, targetAnchor); + updateCssVars(n2, false); + } + } else if (false) { + warn$1$1( + "Invalid Teleport target on mount:", + target2, + `(${typeof target2})` + ); + } + }, "mountToTarget"); + if (disabled2) { + mount2(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target2 = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target2; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target2)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target2)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled2) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else if (false) { + warn$1$1( + "Invalid Teleport target on update:", + target2, + `(${typeof target2})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target2, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled2); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target: target2, + props + } = vnode; + if (target2) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i2 = 0; i2 < children.length; i2++) { + const child = children[i2]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert: insert2 }, m: move }, moveType = 2) { + if (moveType === 0) { + insert2(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert2(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i2 = 0; i2 < children.length; i2++) { + move( + children[i2], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert2(anchor, container, parentAnchor); + } +} +__name(moveTeleport, "moveTeleport"); +function hydrateTeleport(node3, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode: parentNode2, querySelector, insert: insert2, createText } +}, hydrateChildren) { + const target2 = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target2) { + const disabled2 = isTeleportDisabled(vnode.props); + const targetNode = target2._lpa || target2.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled2) { + vnode.anchor = hydrateChildren( + nextSibling(node3), + vnode, + parentNode2(node3), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node3); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target2._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target2, vnode, createText, insert2); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target2, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled2); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +__name(hydrateTeleport, "hydrateTeleport"); +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node3, anchor; + if (isDisabled) { + node3 = vnode.el; + anchor = vnode.anchor; + } else { + node3 = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node3 && node3 !== anchor) { + if (node3.nodeType === 1) node3.setAttribute("data-v-owner", ctx.uid); + node3 = node3.nextSibling; + } + ctx.ut(); + } +} +__name(updateCssVars, "updateCssVars"); +function prepareAnchor(target2, vnode, createText, insert2) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target2) { + insert2(targetStart, target2); + insert2(targetAnchor, target2); + } + return targetAnchor; +} +__name(prepareAnchor, "prepareAnchor"); +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +__name(useTransitionState, "useTransitionState"); +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = /* @__PURE__ */ __name((instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}, "recursiveGetSubtree"); +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode: mode2 } = rawProps; + if (false) { + warn$1$1(`invalid mode: ${mode2}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks2) => enterHooks = hooks2 + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode2 === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode2 === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c2 of children) { + if (c2.type !== Comment) { + if (false) { + warn$1$1( + " can only be used on a single element or component. Use for lists." + ); + break; + } + child = c2; + hasFound = true; + if (true) break; + } + } + } + return child; +} +__name(findNonCommentChild, "findNonCommentChild"); +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +__name(getLeavingNodesForType, "getLeavingNodesForType"); +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode: mode2, + persisted = false, + onBeforeEnter: onBeforeEnter2, + onEnter: onEnter7, + onAfterEnter: onAfterEnter4, + onEnterCancelled, + onBeforeLeave: onBeforeLeave3, + onLeave: onLeave5, + onAfterLeave: onAfterLeave6, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook2 = /* @__PURE__ */ __name((hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }, "callHook2"); + const callAsyncHook = /* @__PURE__ */ __name((hook, args) => { + const done = args[1]; + callHook2(hook, args); + if (isArray$b(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }, "callAsyncHook"); + const hooks2 = { + mode: mode2, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter2; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter2; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook2(hook, [el]); + }, + enter(el) { + let hook = onEnter7; + let afterHook = onAfterEnter4; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter7; + afterHook = onAfterAppear || onAfterEnter4; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook2(cancelHook, [el]); + } else { + callHook2(afterHook, [el]); + } + if (hooks2.delayedLeave) { + hooks2.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove22) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove22(); + } + callHook2(onBeforeLeave3, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove22(); + if (cancelled) { + callHook2(onLeaveCancelled, [el]); + } else { + callHook2(onAfterLeave6, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave5) { + callAsyncHook(onLeave5, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks22 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks22); + return hooks22; + } + }; + return hooks2; +} +__name(resolveTransitionHooks, "resolveTransitionHooks"); +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +__name(emptyPlaceholder, "emptyPlaceholder"); +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (false) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction$c(children.default)) { + return children.default(); + } + } +} +__name(getInnerChild$1, "getInnerChild$1"); +function setTransitionHooks(vnode, hooks2) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks2; + setTransitionHooks(vnode.component.subTree, hooks2); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks2.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks2.clone(vnode.ssFallback); + } else { + vnode.transition = hooks2; + } +} +__name(setTransitionHooks, "setTransitionHooks"); +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i2 = 0; i2 < children.length; i2++) { + let child = children[i2]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i2); + if (child.type === Fragment$1) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i2 = 0; i2 < ret.length; i2++) { + ret[i2].patchFlag = -2; + } } return ret; } -__name(renderList, "renderList"); -function createSlots(slots, dynamicSlots) { - for (let i2 = 0; i2 < dynamicSlots.length; i2++) { - const slot = dynamicSlots[i2]; - if (isArray$9(slot)) { - for (let j2 = 0; j2 < slot.length; j2++) { - slots[slot[j2].name] = slot[j2].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} -__name(createSlots, "createSlots"); +__name(getTransitionRawChildren, "getTransitionRawChildren"); /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ function defineComponent(options4, extraOptions) { - return isFunction$8(options4) ? ( - // #8326: extend call and options.name access are considered side-effects + return isFunction$c(options4) ? ( + // #8236: extend call and options.name access are considered side-effects // by Rollup, so we have to wrap it in a pure-annotated IIFE. /* @__PURE__ */ (() => extend$1({ name: options4.name }, extraOptions, { setup: options4 }))() ) : options4; } __name(defineComponent, "defineComponent"); -const isAsyncWrapper = /* @__PURE__ */ __name((i2) => !!i2.type.__asyncLoader, "isAsyncWrapper"); -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (isFunction$8(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = /* @__PURE__ */ __name(() => { - retries++; - pendingRequest = null; - return load2(); - }, "retry"); - const load2 = /* @__PURE__ */ __name(() => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve2, reject3) => { - const userRetry = /* @__PURE__ */ __name(() => resolve2(retry()), "userRetry"); - const userFail = /* @__PURE__ */ __name(() => reject3(err), "userFail"); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (false) { - warn$1$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (false) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }, "load"); - return /* @__PURE__ */ defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load2, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = /* @__PURE__ */ __name((err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }, "onError"); - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load2().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error2 = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error2.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error2.value = err; - } - }, timeout); - } - load2().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.effect.dirty = true; - queueJob(instance.parent.update); - } - }).catch((err) => { - onError(err); - error2.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error2.value && errorComponent) { - return createVNode(errorComponent, { - error: error2.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -__name(defineAsyncComponent, "defineAsyncComponent"); -function createInnerComp(comp, parent) { - const { ref: ref22, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref22; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} -__name(createInnerComp, "createInnerComp"); -function renderSlot(slots, name2, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { - if (name2 !== "default") props.name = name2; - return createVNode("slot", props, fallback && fallback()); - } - let slot = slots[name2]; - if (false) { - warn$1$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = /* @__PURE__ */ __name(() => [], "slot"); - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock( - Fragment$1, - { - key: props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key || `_${name2}` - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -__name(renderSlot, "renderSlot"); -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode$1(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment$1 && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} -__name(ensureValidVNode, "ensureValidVNode"); -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (false) { - warn$1$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} -__name(toHandlers, "toHandlers"); -const getPublicInstance = /* @__PURE__ */ __name((i2) => { - if (!i2) return null; - if (isStatefulComponent(i2)) return getComponentPublicInstance(i2); - return getPublicInstance(i2.parent); -}, "getPublicInstance"); -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), { - $: /* @__PURE__ */ __name((i2) => i2, "$"), - $el: /* @__PURE__ */ __name((i2) => i2.vnode.el, "$el"), - $data: /* @__PURE__ */ __name((i2) => i2.data, "$data"), - $props: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.props) : i2.props, "$props"), - $attrs: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.attrs) : i2.attrs, "$attrs"), - $slots: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.slots) : i2.slots, "$slots"), - $refs: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.refs) : i2.refs, "$refs"), - $parent: /* @__PURE__ */ __name((i2) => getPublicInstance(i2.parent), "$parent"), - $root: /* @__PURE__ */ __name((i2) => getPublicInstance(i2.root), "$root"), - $emit: /* @__PURE__ */ __name((i2) => i2.emit, "$emit"), - $options: /* @__PURE__ */ __name((i2) => true ? resolveMergedOptions(i2) : i2.type, "$options"), - $forceUpdate: /* @__PURE__ */ __name((i2) => i2.f || (i2.f = () => { - i2.effect.dirty = true; - queueJob(i2.update); - }), "$forceUpdate"), - $nextTick: /* @__PURE__ */ __name((i2) => i2.n || (i2.n = nextTick.bind(i2.proxy)), "$nextTick"), - $watch: /* @__PURE__ */ __name((i2) => true ? instanceWatch.bind(i2) : NOOP, "$watch") - }) -); -const isReservedPrefix = /* @__PURE__ */ __name((key) => key === "_" || key === "$", "isReservedPrefix"); -const hasSetupBinding = /* @__PURE__ */ __name((state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$3(state, key), "hasSetupBinding"); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data: data25, props, accessCache, type, appContext } = instance; - if (false) { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n2 = accessCache[key]; - if (n2 !== void 0) { - switch (n2) { - case 1: - return setupState[key]; - case 2: - return data25[key]; - case 4: - return ctx[key]; - case 3: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1; - return setupState[key]; - } else if (data25 !== EMPTY_OBJ && hasOwn$3(data25, key)) { - accessCache[key] = 2; - return data25[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn$3(normalizedProps, key) - ) { - accessCache[key] = 3; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn$3(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - } else if (false) { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn$3(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn$3(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (false) { - if (data25 !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn$3(data25, key)) { - warn$1$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value4) { - const { data: data25, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value4; - return true; - } else if (false) { - warn$1$1(`Cannot mutate - + +
diff --git a/web/templates/default.json b/web/templates/default.json index 657ac107..5a97075d 100644 --- a/web/templates/default.json +++ b/web/templates/default.json @@ -266,7 +266,7 @@ ], "properties": {}, "widgets_values": [ - "v1-5-pruned-emaonly.safetensors" + "v1-5-pruned-emaonly-fp16.safetensors" ] } ], @@ -349,8 +349,8 @@ "extra": {}, "version": 0.4, "models": [{ - "name": "v1-5-pruned-emaonly.safetensors", - "url": "https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly.safetensors?download=true", + "name": "v1-5-pruned-emaonly-fp16.safetensors", + "url": "https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors?download=true", "directory": "checkpoints" }] }